{"version":3,"file":"ns-components-angular.mjs","sources":["../../../projects/ns-components-angular/src/embedded/nsUtil.ts","../../../projects/ns-components-angular/src/embedded/nsContainerBase.ts","../../../projects/ns-components-angular/src/embedded/nsDateUtil.ts","../../../projects/ns-components-angular/src/embedded/nsExport.ts","../../../projects/ns-components-angular/src/embedded/nsPromise.ts","../../../projects/ns-components-angular/src/embedded/nsAjax.ts","../../../projects/ns-components-angular/src/embedded/nsTextBox.ts","../../../projects/ns-components-angular/src/embedded/nsMessageBox.ts","../../../projects/ns-components-angular/src/embedded/nsPanel.ts","../../../projects/ns-components-angular/src/embedded/nsDividerBox.ts","../../../projects/ns-components-angular/src/embedded/nsExpressionEvaluator.ts","../../../projects/ns-components-angular/src/embedded/nsMultiSelectDropdown.ts","../../../projects/ns-components-angular/src/embedded/nsScroller.ts","../../../projects/ns-components-angular/src/embedded/nsDashboard.ts","../../../projects/ns-components-angular/src/embedded/nsHorizontalNavigation.ts","../../../projects/ns-components-angular/src/embedded/nsNumericTextBox.ts","../../../projects/ns-components-angular/src/embedded/nsPagination.ts","../../../projects/ns-components-angular/src/embedded/nsProgressBar.ts","../../../projects/ns-components-angular/src/embedded/nsTabNavigator.ts","../../../projects/ns-components-angular/src/embedded/nsTableRowMover.ts","../../../projects/ns-components-angular/src/embedded/nsVirtualScroll.ts","../../../projects/ns-components-angular/src/embedded/nsEvent.ts","../../../projects/ns-components-angular/src/embedded/nsSVG.ts","../../../projects/ns-components-angular/src/embedded/nsConsole.ts","../../../projects/ns-components-angular/src/embedded/nsTouchToMouse.ts","../../../projects/ns-components-angular/src/embedded/nsDatePicker.ts","../../../projects/ns-components-angular/src/embedded/nsDocxExport.ts","../../../projects/ns-components-angular/src/embedded/nsEditor.ts","../../../projects/ns-components-angular/src/embedded/nsGrid.ts","../../../projects/ns-components-angular/src/embedded/nsList.ts","../../../projects/ns-components-angular/src/embedded/nsNavigation.ts","../../../projects/ns-components-angular/src/embedded/nsPluggins.ts","../../../projects/ns-components-angular/src/embedded/nsXlsxExport.ts","../../../projects/ns-components-angular/src/embedded/nsCalendar.ts","../../../projects/ns-components-angular/src/lib/script-loader.service.ts","../../../projects/ns-components-angular/src/lib/components/ns-base/ns-base.component.ts","../../../projects/ns-components-angular/src/lib/components/ns-textbox/ns-textbox-angular.component.ts","../../../projects/ns-components-angular/src/lib/components/ns-navigation/ns-navigation-angular.component.ts","../../../projects/ns-components-angular/src/lib/components/ns-multiselect-dropdown/ns-multiselect-dropdown.component.ts","../../../projects/ns-components-angular/src/lib/components/ns-panel/ns-panel-angular.component.ts","../../../projects/ns-components-angular/src/lib/components/ns-panel/interfaces.ts","../../../projects/ns-components-angular/src/lib/components/ns-calendar/ns-calendar-angular.component.ts","../../../projects/ns-components-angular/src/lib/components/ns-datepicker/ns-datepicker-angular.component.ts","../../../projects/ns-components-angular/src/lib/services/ns-dynamic-component.service.ts","../../../projects/ns-components-angular/src/lib/components/ns-dashboard/ns-dashboard-angular.component.ts","../../../projects/ns-components-angular/src/lib/components/ns-dashboard/interfaces.ts","../../../projects/ns-components-angular/src/lib/components/ns-messagebox/ns-messagebox-angular.component.ts","../../../projects/ns-components-angular/src/lib/components/ns-messagebox/interfaces.ts","../../../projects/ns-components-angular/src/lib/components/ns-grid/ns-grid-angular.component.ts","../../../projects/ns-components-angular/src/lib/components/ns-grid/interfaces.ts","../../../projects/ns-components-angular/src/lib/components/ns-tab-navigator/ns-tab-navigator-angular.component.ts","../../../projects/ns-components-angular/src/lib/components/ns-horizontal-navigation/ns-horizontal-navigation-angular.component.ts","../../../projects/ns-components-angular/src/lib/components/ns-editor/ns-editor-angular.component.ts","../../../projects/ns-components-angular/src/lib/components/ns-numeric-textbox/ns-numeric-textbox-angular.component.ts","../../../projects/ns-components-angular/src/lib/directives/ns-base-directive/ns-base.directive.ts","../../../projects/ns-components-angular/src/lib/directives/ns-table-row-mover/ns-table-row-mover.directive.ts","../../../projects/ns-components-angular/src/lib/utils/ns-expression-evaluator/ns-expression-evaluator.ts","../../../projects/ns-components-angular/src/lib/ns-components.module.ts","../../../projects/ns-components-angular/src/public-api.ts","../../../projects/ns-components-angular/src/ns-components-angular.ts"],"sourcesContent":["export const NSUtilCode = \"var nsModuleExport = (function()\\r\\n{\\r\\n\\tvar nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\treturn nsModuleExport;\\r\\n})();\\r\\n(function(root,name,prototype)\\r\\n{\\r\\n\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t{\\r\\n\\t\\tmodule.exports[name] = prototype;\\r\\n\\t}\\r\\n\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t{\\r\\n\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t}\\r\\n\\telse if(typeof exports === 'object')\\r\\n\\t{\\r\\n\\t\\texports[name] = prototype;\\r\\n\\t}\\r\\n\\telse\\r\\n\\t{\\r\\n\\t\\troot[name] = prototype;\\r\\n\\t}\\r\\n})(this,\\\"nsModuleExport\\\",nsModuleExport);\\r\\nvar NSUtil = (function()\\r\\n{\\r\\n\\tfunction NSUtil()\\r\\n\\t{\\r\\n\\t\\tthis.__sheetId = \\\"nsStyle\\\";\\r\\n\\t\\tthis.KEYCODE = {BACKSPACE:8, TAB:9, ENTER:13, SHIFT:16, CTRL:17, ALT:18, ESC:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DELETE:46};\\r\\n\\t\\tthis.ANIMATIONDELAY = 10;\\r\\n\\t\\t//for nsMenu and nsPinTip\\r\\n\\t\\tthis.POS_TOP = \\\"top\\\";\\r\\n\\t\\tthis.POS_BOTTOM = \\\"bottom\\\";\\r\\n\\t\\tthis.POS_LEFT = \\\"left\\\";\\r\\n\\t\\tthis.POS_RIGHT = \\\"right\\\";\\r\\n\\t\\tthis.POS_TOPLEFT = \\\"top-left\\\";\\r\\n\\t\\tthis.POS_TOPRIGHT = \\\"top-right\\\";\\r\\n\\t\\tthis.POS_BOTTOMLEFT = \\\"bottom-left\\\";\\r\\n\\t\\tthis.POS_BOTTOMRIGHT = \\\"bottom-right\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getDomVariables = function()\\r\\n\\t{\\r\\n\\t\\tvar retValue = {doc: null,win: null};\\r\\n\\t\\tif(typeof document === 'undefined')\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue.doc = {\\r\\n\\t\\t\\t\\t\\tbody: {},\\r\\n\\t\\t\\t\\t    addEventListener: function addEventListener() {},\\r\\n\\t\\t\\t\\t    removeEventListener: function removeEventListener() {},\\r\\n\\t\\t\\t\\t    activeElement: {\\r\\n\\t\\t\\t\\t      blur: function blur() {},\\r\\n\\t\\t\\t\\t      nodeName: '',\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    querySelector: function querySelector() {\\r\\n\\t\\t\\t\\t      return null;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    querySelectorAll: function querySelectorAll() {\\r\\n\\t\\t\\t\\t      return [];\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    getElementById: function getElementById() {\\r\\n\\t\\t\\t\\t      return null;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    createEvent: function createEvent() {\\r\\n\\t\\t\\t\\t      return {\\r\\n\\t\\t\\t\\t        initEvent: function initEvent() {},\\r\\n\\t\\t\\t\\t      };\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    createElement: function createElement() {\\r\\n\\t\\t\\t\\t      return {\\r\\n\\t\\t\\t\\t        children: [],\\r\\n\\t\\t\\t\\t        childNodes: [],\\r\\n\\t\\t\\t\\t        style: {},\\r\\n\\t\\t\\t\\t        setAttribute: function setAttribute() {},\\r\\n\\t\\t\\t\\t        getElementsByTagName: function getElementsByTagName() {\\r\\n\\t\\t\\t\\t          return [];\\r\\n\\t\\t\\t\\t        },\\r\\n\\t\\t\\t\\t      };\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    location: { hash: '' },\\r\\n\\t\\t\\t};\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue.doc = document;\\r\\n\\t\\t}\\r\\n\\t\\tif(typeof window === 'undefined')\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue.win = \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdocument: retValue.doc,\\r\\n\\t\\t\\t\\t    navigator: {\\r\\n\\t\\t\\t\\t      userAgent: '',\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    location: {},\\r\\n\\t\\t\\t\\t    history: {},\\r\\n\\t\\t\\t\\t    CustomEvent: function CustomEvent() {\\r\\n\\t\\t\\t\\t      return this;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    addEventListener: function addEventListener() {},\\r\\n\\t\\t\\t\\t    removeEventListener: function removeEventListener() {},\\r\\n\\t\\t\\t\\t    getComputedStyle: function getComputedStyle() {\\r\\n\\t\\t\\t\\t      return {\\r\\n\\t\\t\\t\\t        getPropertyValue: function getPropertyValue() {\\r\\n\\t\\t\\t\\t          return '';\\r\\n\\t\\t\\t\\t        },\\r\\n\\t\\t\\t\\t      };\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    Image: function Image() {},\\r\\n\\t\\t\\t\\t    Date: function Date() {},\\r\\n\\t\\t\\t\\t    screen: {},\\r\\n\\t\\t\\t\\t    setTimeout: function setTimeout() {},\\r\\n\\t\\t\\t\\t    clearTimeout: function clearTimeout() {},\\r\\n\\t\\t\\t};\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue.win = window;\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getSupportedEvents = function ()\\r\\n\\t{\\r\\n\\t\\tvar obj = this.getDomVariables();\\r\\n\\t\\tvar win = obj.win;\\r\\n\\t\\tvar doc = obj.doc;\\r\\n\\t\\tvar retValue = {};\\r\\n\\t\\tretValue.touch = (win.Modernizr && win.Modernizr.touch === true) || (!!((win.navigator.maxTouchPoints > 0) || ('ontouchstart' in win) || (win.DocumentTouch && doc instanceof win.DocumentTouch)));\\r\\n\\t\\tretValue.pointerEvents = !!win.PointerEvent && ('maxTouchPoints' in win.navigator) && win.navigator.maxTouchPoints > 0;\\r\\n\\t\\tretValue.passiveListener = (function checkPassiveListener() {\\r\\n\\t\\t        var supportsPassive = false;\\r\\n\\t\\t        try {\\r\\n\\t\\t          var opts = Object.defineProperty({}, 'passive', {\\r\\n\\t\\t            // eslint-disable-next-line\\r\\n\\t\\t            get: function get() {\\r\\n\\t\\t              supportsPassive = true;\\r\\n\\t\\t            },\\r\\n\\t\\t          });\\r\\n\\t\\t          win.addEventListener('testPassiveListener', null, opts);\\r\\n\\t\\t        } catch (e) {\\r\\n\\t\\t          // No support\\r\\n\\t\\t        }\\r\\n\\t\\t        return supportsPassive;\\r\\n\\t      }());\\r\\n\\t\\tretValue.gestures = 'ongesturestart' in win;\\r\\n\\t\\t\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isMobile = function(win)\\r\\n\\t{\\r\\n\\t\\tvar win = this.getWin(win);\\r\\n\\t\\tvar userAgent = (win.navigator && win.navigator.userAgent) ? win.navigator.userAgent : null;\\r\\n\\t\\tvar objOS = {android:{pattern:\\\"Android\\\",flags:\\\"i\\\"} ,blackberry:{pattern:\\\"BlackBerry\\\",flags:\\\"i\\\"} ,ios:{pattern:\\\"iPhone|iPad|iPod\\\",flags:\\\"i\\\"} ,opera:{pattern:\\\"Opera Mini\\\",flags:\\\"i\\\"} ,windows:{pattern:\\\"IEMobile\\\",flags:\\\"i\\\"}};\\r\\n\\t\\tvar objRet = {};\\r\\n\\t\\tif(userAgent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar any = false;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var os in objOS)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = objOS[os];\\r\\n\\t\\t\\t\\tobjRet[os] = userAgent.match(new RegExp(item.pattern,item.flags));\\r\\n\\t\\t\\t\\tif(objRet[os])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tany = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tobjRet[\\\"any\\\"] = any;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var os in objOS)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjRet[os] = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tobjRet[\\\"any\\\"] = false;\\r\\n\\t\\t}\\r\\n\\t\\treturn objRet;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getElement = function (element,doc)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.isObject(element))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn element;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(element.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdoc = this.getDoc(doc);\\r\\n\\t\\t\\t\\treturn doc.getElementById(element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getElementFromHtml = function (html)\\r\\n\\t{\\r\\n\\t\\tif(html)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar div = this.createDiv();\\r\\n\\t\\t\\tdiv.innerHTML = html.toString();\\r\\n\\t\\t\\tvar child = (div.firstChild !== div.lastChild || !div.firstChild) ? div : div.firstChild;\\r\\n\\t\\t\\treturn child;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getReferenceFromHtml = function(html)\\r\\n\\t{\\r\\n\\t\\tvar comp = this.getElementFromHtml(html);\\r\\n\\t\\tif(comp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrElement = comp.querySelectorAll(\\\"[ns-ref],[data-ns-ref]\\\");\\r\\n\\t\\t\\tvar objRefs = {};\\r\\n\\t\\t\\tvar ref = comp.getAttribute(\\\"ns-ref\\\") || comp.getAttribute(\\\"data-ns-ref\\\");\\r\\n\\t\\t\\tif(ref)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjRefs[ref] = comp;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(arrElement && arrElement.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrElement.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar element = arrElement[count];\\r\\n\\t\\t\\t\\t\\tref = element.getAttribute(\\\"ns-ref\\\") || element.getAttribute(\\\"data-ns-ref\\\");\\r\\n\\t\\t\\t\\t\\tobjRefs[ref] = element;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn {element : comp,refs: objRefs};\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getWebComponentElement = function (element)\\r\\n\\t{\\r\\n\\t\\tif(element && element[\\\"__impl4cf1e782hg__\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn element[\\\"__impl4cf1e782hg__\\\"];\\r\\n\\t\\t}\\r\\n\\t\\treturn element;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.hasAttribute = function (element,attributeName)\\r\\n\\t{\\r\\n\\t\\tif(element && attributeName && element[\\\"hasAttribute\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (element.hasAttribute(attributeName) || element.hasAttribute(\\\"data-\\\" + attributeName)); \\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getAttribute = function (element,attributeName)\\r\\n\\t{\\r\\n\\t\\tif(element && attributeName && element[\\\"hasAttribute\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (element.hasAttribute(attributeName) ? element.getAttribute(attributeName) : element.getAttribute(\\\"data-\\\" + attributeName)); \\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.removeAttribute = function (element,attributeName)\\r\\n\\t{\\r\\n\\t\\tif(element && attributeName && element[\\\"hasAttribute\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (element.hasAttribute(attributeName) ? element.removeAttribute(attributeName) : element.removeAttribute(\\\"data-\\\" + attributeName)); \\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.createDiv = function (id,styleName,doc)\\r\\n\\t{\\r\\n\\t    var div = this.createElement(\\\"div\\\",id,styleName,doc);\\r\\n\\t    return div;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.createElement = function(type,id,styleName,doc)\\r\\n\\t{\\r\\n\\t\\tdoc = this.getDoc(doc);\\r\\n\\t    var element = doc.createElement(type);\\r\\n\\t    if(id)\\r\\n\\t    {\\r\\n\\t    \\telement.setAttribute(\\\"id\\\",id);\\r\\n\\t    }\\r\\n\\t    if(styleName)\\r\\n\\t    {\\r\\n\\t    \\telement.className = styleName;   \\r\\n\\t    }\\r\\n\\t    return element;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//from JQuery\\r\\n\\tNSUtil.prototype.isElementVisible = function(element)\\r\\n\\t{\\r\\n\\t\\treturn !!(element.offsetWidth || element.offsetHeight || element.getClientRects().length); \\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.setDivVisibility = function (id,isVisible,doc)\\r\\n\\t{\\r\\n\\t\\tdoc = this.getDoc(doc);\\r\\n\\t    var div = doc.getElementById(id);\\r\\n\\t    if(div)\\r\\n\\t    {\\r\\n\\t        if(isVisible)\\r\\n\\t        {\\r\\n\\t            div.style.display = \\\"block\\\";\\r\\n\\t        }\\r\\n\\t        else\\r\\n\\t        {\\r\\n\\t            div.style.display = \\\"none\\\";\\r\\n\\t        }\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.removeDiv = function (id,doc)\\r\\n\\t{\\r\\n\\t\\tdoc = this.getDoc(doc);\\r\\n\\t    var div = doc.getElementById(id);\\r\\n\\t    if (div)\\r\\n\\t    {\\r\\n\\t        var parent = div.parentNode;\\r\\n\\t        if(parent)\\r\\n\\t        {\\r\\n\\t            parent.removeChild(div);\\r\\n\\t        }\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\t/*Utility Methods */\\r\\n\\tNSUtil.prototype.getKeys = function (object) \\r\\n\\t{\\r\\n\\t    var keys = [];\\r\\n\\t    for (var property in object)\\r\\n\\t    {\\r\\n\\t    \\tkeys.push(property);\\r\\n\\t    }\\r\\n\\t    return keys;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getValues = function (object)\\r\\n\\t{\\r\\n\\t\\tvar values = [];\\r\\n\\t\\tfor (var property in object)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvalues.push(object[property]);\\r\\n\\t\\t}\\r\\n\\t\\treturn values;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//from https://stackoverflow.com/questions/201183/how-to-determine-equality-for-two-javascript-objects/16788517#16788517\\r\\n\\t//used in frameworks wrapper\\r\\n\\tNSUtil.prototype.isObjectEqual = function(origValue, newValue) \\r\\n\\t{\\r\\n\\t\\tif (origValue === null || origValue === undefined || newValue === null || newValue === undefined) \\r\\n\\t\\t{ \\r\\n\\t\\t\\treturn origValue === newValue; \\r\\n\\t\\t}\\r\\n\\t\\t// after this just checking type of one would be enough\\r\\n\\t\\tif (origValue.constructor !== newValue.constructor) \\r\\n\\t\\t{ \\r\\n\\t\\t\\treturn false; \\r\\n\\t\\t}\\r\\n\\t\\t// if they are functions, they should exactly refer to same one (because of closures)\\r\\n\\t\\tif (origValue instanceof Function) \\r\\n\\t\\t{ \\r\\n\\t\\t\\treturn origValue === newValue; \\r\\n\\t\\t}\\r\\n\\t\\t// if they are regexps, they should exactly refer to same one (it is hard to better equality check on current ES)\\r\\n\\t\\tif (origValue instanceof RegExp) \\r\\n\\t\\t{ \\r\\n\\t\\t\\treturn origValue === newValue; \\r\\n\\t\\t}\\r\\n\\t\\tif (origValue === newValue || origValue.valueOf() === newValue.valueOf()) \\r\\n\\t\\t{ \\r\\n\\t\\t\\treturn true; \\r\\n\\t\\t}\\r\\n\\t\\tif (Array.isArray(origValue) && origValue.length !== newValue.length) \\r\\n\\t\\t{ \\r\\n\\t\\t\\treturn false; \\r\\n\\t\\t}\\r\\n\\t\\t// if they are dates, they must had equal valueOf\\r\\n\\t\\tif (origValue instanceof Date) \\r\\n\\t\\t{ \\r\\n\\t\\t\\treturn false; \\r\\n\\t\\t}\\r\\n\\t\\t// if they are strictly equal, they both need to be object at least\\r\\n\\t\\tif (!(origValue instanceof Object)) \\r\\n\\t\\t{ \\r\\n\\t\\t\\treturn false; \\r\\n\\t\\t}\\r\\n\\t\\tif (!(newValue instanceof Object)) \\r\\n\\t\\t{ \\r\\n\\t\\t\\treturn false; \\r\\n\\t\\t}\\r\\n\\t\\t// recursive object equality check\\r\\n\\t\\tvar arrKeys = Object.keys(origValue);\\r\\n\\t\\tvar arrNewKeys = Object.keys(newValue);\\r\\n\\t\\tfor(count = 0,len = arrNewKeys,length;count < len;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(arrKeys.indexOf(count) !== -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(innerCount = 0,len = arrKeys,length;innerCount < len;innerCount++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn this.isObjectEqual(origValue[innerCount], newValue[innerCount]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getValueByKeys = function(item,keyParam)\\r\\n\\t{\\r\\n\\t\\tvar objReturn = {};\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\t(function flatObject(item, index)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\tvar toString = Object.prototype.toString;\\r\\n\\t\\t\\t\\tvar suffix = toString.call(item) == \\\"[object Array]\\\" ? \\\"]\\\" : \\\"\\\";\\r\\n\\t\\t\\t\\tfor(var key in item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(!item.hasOwnProperty(key))continue;\\r\\n\\t\\t\\t\\t\\tobjReturn[index+key+suffix] = item[key];\\r\\n\\t\\t\\t\\t\\tif( toString.call(item[key]) == \\\"[object Array]\\\" )flatObject(item[key],index+key+suffix+\\\"[\\\");\\r\\n\\t\\t\\t\\t\\tif( toString.call(item[key]) == \\\"[object Object]\\\" )flatObject(item[key],index+key+suffix+\\\".\\\");   \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t })(item,\\\"\\\");\\r\\n\\t\\t}\\r\\n\\t\\treturn objReturn[keyParam];\\r\\n\\t};\\r\\n\\t\\r\\n\\t//arrIgnoreDeepCopy in case there is a circular reference in Hierarchical structure like in NSNavigation\\r\\n\\tNSUtil.prototype.cloneObject = function(objSource,deepCopy,arrIgnoreKeys,arrIgnoreDeepCopy) \\r\\n\\t{\\r\\n\\t\\tif(!arrIgnoreKeys)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrIgnoreKeys = [];\\r\\n\\t\\t}\\r\\n\\t\\tif(!arrIgnoreDeepCopy)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrIgnoreDeepCopy = [];\\r\\n\\t\\t}\\r\\n\\t\\tif(!objSource || typeof objSource != \\\"object\\\" || Object.prototype.toString.call(objSource) === \\\"[object Function]\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\t// null, undefined, any non-object, or function\\r\\n\\t\\t\\treturn objSource;\\t// anything\\r\\n\\t\\t}\\r\\n\\t\\tif(objSource.nodeType && \\\"cloneNode\\\" in objSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\t// DOM Node\\r\\n\\t\\t\\treturn objSource.cloneNode(true); // Node\\r\\n\\t\\t}\\r\\n\\t\\tif(objSource instanceof Date)\\r\\n\\t\\t{\\r\\n\\t\\t\\t// Date\\r\\n\\t\\t\\treturn new Date(objSource.getTime());\\t// Date\\r\\n\\t\\t}\\r\\n\\t\\tif(objSource instanceof RegExp)\\r\\n\\t\\t{\\r\\n\\t\\t\\t// RegExp\\r\\n\\t\\t\\treturn new RegExp(objSource);   // RegExp\\r\\n\\t\\t}\\r\\n\\t\\tif(objSource instanceof Array)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrClone = [];\\r\\n\\t\\t\\tvar length = objSource.length;\\r\\n\\t\\t    for (var count = 0; count < length; count++) \\r\\n\\t\\t    {\\r\\n\\t\\t        var item = objSource[count];\\r\\n\\t\\t        var obj = this.cloneObject(item,deepCopy,arrIgnoreKeys,arrIgnoreDeepCopy);\\r\\n\\t\\t        arrClone.push(obj);\\r\\n\\t\\t    }\\r\\n\\t\\t    return arrClone;\\r\\n\\t\\t}\\r\\n\\t\\t// we don't clone functions for performance reasons\\r\\n\\t\\t//\\t\\t}else if(d.isFunction(objSource)){\\r\\n\\t\\t//\\t\\t\\t// function\\r\\n\\t\\t//\\t\\t\\tr = function(){ return objSource.apply(this, arguments); };\\r\\n\\t\\t// generic objects\\r\\n\\t\\tvar objClone = {};\\r\\n\\t\\tvar clonedItem = null;\\r\\n\\t\\tfor (var key in objSource) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isClone = true;\\r\\n\\t\\t\\tfor (var count = 0; count < arrIgnoreKeys.length; count++) \\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tif(arrIgnoreKeys[count] == key)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tisClone = false;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t\\tif(isClone)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(deepCopy)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar isIgnoreDeepCopy = false;\\r\\n\\t\\t\\t\\t\\tfor (var ignoreDeepCount = 0; ignoreDeepCount < arrIgnoreDeepCopy.length; ignoreDeepCount++) \\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\t\\tif(arrIgnoreDeepCopy[ignoreDeepCount] == key)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tisIgnoreDeepCopy = true;\\r\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t\\tclonedItem = isIgnoreDeepCopy ? objSource[key] : this.cloneObject(objSource[key],deepCopy,arrIgnoreKeys,arrIgnoreDeepCopy);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tclonedItem = objSource[key];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tobjClone[key] = clonedItem;\\r\\n\\t\\t\\t}\\r\\n\\t    }\\r\\n\\t\\treturn objClone;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.copyElement = function(sourceElement,destinationElement)\\r\\n\\t{\\r\\n\\t\\tif(sourceElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(destinationElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdestinationElement.innerHTML = sourceElement.innerHTML;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdestinationElement = sourceElement.cloneNode(true);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor (var count = 0; count < sourceElement.attributes.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar attr = sourceElement.attributes.item(count);\\r\\n\\t\\t\\t\\tdestinationElement.setAttribute(attr.nodeName, attr.nodeValue);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//destinationElement.style.cssText = sourceElement.style.cssText;\\r\\n\\t\\t}\\r\\n\\t\\treturn destinationElement;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.swapArrayItems = function(arrInput,indFirst,indSecond) \\r\\n\\t{\\r\\n\\t\\tif(arrInput && arrInput.length > indFirst && arrInput.length > indSecond)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objTemp = arrInput[indFirst];\\r\\n\\t\\t\\tarrInput[indFirst] = arrInput[indSecond];\\r\\n\\t\\t\\tarrInput[indSecond] = objTemp;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.moveArrayItem = function(arrInput,sourceIndex,destinationIndex) \\r\\n\\t{\\r\\n\\t\\tif(arrInput && arrInput.length > destinationIndex && arrInput.length > sourceIndex && destinationIndex > -1 && sourceIndex > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\t// Remove the element from the array\\r\\n\\t\\t\\tvar removedElement = arrInput.splice(sourceIndex, 1)[0];\\r\\n\\t\\t\\t// At destinationIndex, remove 0 elements, insert the removedElement\\r\\n\\t\\t\\tarrInput.splice(destinationIndex, 0,removedElement);\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isObject = function (refObject)\\r\\n\\t{\\r\\n\\t\\tif (typeof refObject === 'object' && refObject !== null) \\r\\n\\t\\t{\\r\\n\\t\\t    return true;\\r\\n\\t\\t} \\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isTextNode = function (element)\\r\\n\\t{\\r\\n\\t\\ttry\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (element && \\\"nodeType\\\" in element && element.nodeType === Node.TEXT_NODE);\\r\\n\\t\\t}\\r\\n\\t    catch(err)\\r\\n\\t    {\\r\\n\\t    \\treturn false;\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isElement = function (element)\\r\\n\\t{\\r\\n\\t\\ttry\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (element && \\\"nodeType\\\" in element && element.nodeType === Node.ELEMENT_NODE);\\r\\n\\t\\t}\\r\\n\\t    catch(err)\\r\\n\\t    {\\r\\n\\t    \\treturn false;\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isElementOfType = function (element,tagName)\\r\\n\\t{\\r\\n\\t\\tif(element && tagName)\\r\\n\\t    {\\r\\n\\t        if(element.tagName && element.tagName.toLowerCase() === tagName.toLowerCase())\\r\\n\\t        {\\r\\n\\t        \\treturn true;\\r\\n\\t        }\\r\\n\\t    }\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isArray = function (refArr) \\r\\n\\t{\\r\\n\\t    return refArr != null && typeof refArr == \\\"object\\\" &&\\r\\n\\t      \\\"splice\\\" in refArr && \\\"join\\\" in refArr;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isVariable = function (variableName,context) \\r\\n\\t{\\r\\n\\t\\tcontext = this.getWin(context);\\r\\n\\t\\treturn !this.isUndefined(context[variableName]); \\r\\n\\t};\\r\\n\\t\\r\\n\\t//after\\r\\n\\tNSUtil.prototype.insertAfterElement = function(referenceElement,insertElement) \\r\\n\\t{\\r\\n\\t\\tif(referenceElement && insertElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar parentElement = this.getWebComponentElement(referenceElement.parentNode);\\r\\n\\t\\t\\tif(parentElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treferenceElement = this.getWebComponentElement(referenceElement);\\r\\n\\t\\t\\t\\tinsertElement = this.getWebComponentElement(insertElement);\\r\\n\\t\\t\\t\\tif (parentElement.lastChild === referenceElement) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tparentElement.appendChild(insertElement);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tparentElement.insertBefore(insertElement,referenceElement.nextSibling);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.insertElementAtIndex = function(parent,element,index)\\r\\n\\t{\\r\\n\\t\\tif (!index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tindex = 0;\\r\\n\\t\\t}\\r\\n\\t\\tif (index >= parent.children.length) \\r\\n\\t\\t{\\r\\n\\t\\t\\tparent.appendChild(element);\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tparent.insertBefore(element,parent.children[index]);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.swapElements = function(element1,element2)\\r\\n\\t{\\r\\n\\t\\tif(element1 && element2)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar parent2 = element2.parentNode;\\r\\n\\t\\t    var next2 = element2.nextSibling;\\r\\n\\t\\t    // special case for element1 is the next sibling of element2\\r\\n\\t\\t    if (next2 === element1) \\r\\n\\t\\t    {\\r\\n\\t\\t        // just put element1 before element2\\r\\n\\t\\t        parent2.insertBefore(element1, element2);\\r\\n\\t\\t    } \\r\\n\\t\\t    else \\r\\n\\t\\t    {\\r\\n\\t\\t        // insert element2 right before element1\\r\\n\\t\\t        element1.parentNode.insertBefore(element2, element1);\\r\\n\\t\\t        // now insert element1 where element2 was\\r\\n\\t\\t        if (next2) \\r\\n\\t\\t        {\\r\\n\\t\\t            // if there was an element after element2, then insert element1 right before that\\r\\n\\t\\t            parent2.insertBefore(element1, next2);\\r\\n\\t\\t        } \\r\\n\\t\\t        else \\r\\n\\t\\t        {\\r\\n\\t\\t            // otherwise, just append as last child\\r\\n\\t\\t            parent2.appendChild(element1);\\r\\n\\t\\t        }\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//replace\\r\\n\\tNSUtil.prototype.replaceElement = function(element,newElement,copyAttributes,moveContent,doc)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tmoveContent = this.isUndefinedOrNull(moveContent) ? true : Boolean.parse(moveContent);\\r\\n\\t\\t\\tnewElement = this.isString(newElement) ? this.createElement(newElement,null,null,doc) : newElement;\\r\\n\\t\\t\\tif(moveContent) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\twhile(element.firstChild) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tnewElement.appendChild(element.firstChild);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(copyAttributes && element.hasAttributes()) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar attrs = element.attributes;\\r\\n\\t\\t\\t    for(var count = attrs.length - 1;count >= 0;count--) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tnewElement.setAttribute(attrs[count].name, attrs[count].value);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(element.parentNode) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\telement.parentNode.replaceChild(newElement,element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn newElement;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//unwrap\\r\\n\\tNSUtil.prototype.insertElementParentsParent = function(element)\\r\\n\\t{\\r\\n\\t\\tif(element && element.parentNode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar parent = element.parentNode;\\r\\n\\t\\t\\twhile (element.firstChild) \\r\\n            {\\r\\n                parent.insertBefore(element.firstChild,element);\\r\\n            }\\r\\n\\t\\t\\tif(element.parentNode)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\telement.parentNode.removeChild(element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getFunction = function (functionInstance,context)\\r\\n\\t{\\r\\n\\t\\tif(functionInstance)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcontext = this.getWin(context);\\r\\n\\t\\t\\tif (typeof functionInstance === \\\"string\\\" || functionInstance instanceof String)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.isFunction(functionInstance))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfunctionInstance = context[functionInstance];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn functionInstance;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.callFunction = function (functionName,context) \\r\\n\\t{\\r\\n\\t\\tvar returnValue = null;\\r\\n\\t\\tcontext = this.getWin(context);\\r\\n\\t\\tif (typeof context[functionName] === \\\"function\\\") \\r\\n\\t\\t{\\r\\n\\t\\t\\treturnValue = context[functionName]();\\r\\n\\t\\t}\\r\\n\\t\\treturn returnValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.callFunctionFromString = function (functionString,replaceParameterFunction,context)\\r\\n\\t{\\r\\n\\t\\tvar returnValue = null;\\r\\n\\t\\tif(functionString)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcontext = this.getWin(context);\\r\\n\\t\\t\\tvar functionName = null;\\r\\n\\t\\t\\tvar arrParameter = null;\\r\\n\\t\\t\\tif(functionString.indexOf(\\\"(\\\") > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar param = functionString.split(\\\"(\\\");\\r\\n\\t\\t\\t\\tif(param && param.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfunctionName = param[0];\\r\\n\\t\\t\\t\\t\\tvar parameter = param[1];\\r\\n\\t\\t\\t\\t\\tif(parameter && parameter.charAt(parameter.length - 1) === \\\")\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tparameter = parameter.substring(0,parameter.length - 1);\\r\\n\\t\\t\\t\\t\\t\\tvar arrParam = parameter.split(\\\",\\\");\\r\\n\\t\\t\\t\\t\\t\\tif(arrParam && arrParam.length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrParameter = arrParam;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfunctionName = functionString;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.isFunction(functionName))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!arrParameter || arrParameter.length === 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturnValue = this.callFunction(functionName);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(replaceParameterFunction)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tfor(var count = 0;count < arrParameter.length;count++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t var newValue = replaceParameterFunction(arrParameter[count]);\\r\\n\\t\\t\\t\\t\\t\\t\\t if(!this.isUndefined(newValue))\\r\\n\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t arrParameter[count] = newValue;\\r\\n\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t}\\t\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tswitch (arrParameter.length) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t    case 1:\\r\\n\\t\\t\\t\\t\\t    \\treturnValue = context[functionName](arrParameter[0]);\\r\\n\\t\\t\\t\\t\\t        break;\\r\\n\\t\\t\\t\\t\\t    case 2:\\r\\n\\t\\t\\t\\t\\t    \\treturnValue = context[functionName](arrParameter[0],arrParameter[1]);\\r\\n\\t\\t\\t\\t\\t        break;\\r\\n\\t\\t\\t\\t\\t    case 3:\\r\\n\\t\\t\\t\\t\\t    \\treturnValue = context[functionName](arrParameter[0],arrParameter[1],arrParameter[2]);\\r\\n\\t\\t\\t\\t\\t        break;\\r\\n\\t\\t\\t\\t\\t    case 4:\\r\\n\\t\\t\\t\\t\\t    \\treturnValue = context[functionName](arrParameter[0],arrParameter[1],arrParameter[2],arrParameter[3]);\\r\\n\\t\\t\\t\\t\\t        break;\\r\\n\\t\\t\\t\\t\\t    case 5:\\r\\n\\t\\t\\t\\t\\t    \\treturnValue = context[functionName](arrParameter[0],arrParameter[1],arrParameter[2],arrParameter[3],arrParameter[4]);\\r\\n\\t\\t\\t\\t\\t        break;\\r\\n\\t\\t\\t\\t\\t    case 6:\\r\\n\\t\\t\\t\\t\\t    \\treturnValue = context[functionName](arrParameter[0],arrParameter[1],arrParameter[2],arrParameter[3],arrParameter[4],arrParameter[5]);\\r\\n\\t\\t\\t\\t\\t        break;\\r\\n\\t\\t\\t\\t\\t    case 7:\\r\\n\\t\\t\\t\\t\\t    \\treturnValue = context[functionName](arrParameter[0],arrParameter[1],arrParameter[2],arrParameter[3],arrParameter[4],arrParameter[5],arrParameter[6]);\\r\\n\\t\\t\\t\\t\\t        break;\\r\\n\\t\\t\\t\\t\\t    case 8:\\r\\n\\t\\t\\t\\t\\t    \\treturnValue = context[functionName](arrParameter[0],arrParameter[1],arrParameter[2],arrParameter[3],arrParameter[4],arrParameter[5],arrParameter[6],arrParameter[7]);\\r\\n\\t\\t\\t\\t\\t        break;\\r\\n\\t\\t\\t\\t\\t    case 9:\\r\\n\\t\\t\\t\\t\\t    \\treturnValue = context[functionName](arrParameter[0],arrParameter[1],arrParameter[2],arrParameter[3],arrParameter[4],arrParameter[5],arrParameter[6],arrParameter[7],arrParameter[8]);\\r\\n\\t\\t\\t\\t\\t        break;\\r\\n\\t\\t\\t\\t\\t    case 10:\\r\\n\\t\\t\\t\\t\\t    \\treturnValue = context[functionName](arrParameter[0],arrParameter[1],arrParameter[2],arrParameter[3],arrParameter[4],arrParameter[5],arrParameter[6],arrParameter[7],arrParameter[8],arrParameter[9]);\\r\\n\\t\\t\\t\\t\\t        break;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn returnValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.callFunctionOfObject = function (obj,functionName,...args) \\r\\n\\t{\\r\\n\\t\\tvar returnValue = null;\\r\\n\\t\\tif(obj) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif (typeof obj[functionName] === \\\"function\\\") \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturnValue = obj[functionName](args);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse \\r\\n\\t\\t\\t{\\r\\n\\t        \\tconsole.log(functionName + \\\" does not exist or is not a function.\\\");\\r\\n\\t    \\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn returnValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isElementInDOM = function(node,doc) \\r\\n\\t{\\r\\n\\t\\tdoc = this.getDoc(doc);\\r\\n\\t\\treturn (node === doc.body) ? false : doc.body.contains(node);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isElementInParent = function(node,parent) \\r\\n\\t{\\r\\n\\t\\tif(node && parent)\\r\\n\\t\\t{\\r\\n\\t\\t\\twhile (node.parentNode) \\r\\n\\t\\t\\t{\\r\\n\\t            if (node.parentNode === parent) \\r\\n\\t            {\\r\\n\\t                return true;\\r\\n\\t            }\\r\\n\\t            node = node.parentNode;\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n        return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isElementInOrParent = function(node,parent,onlyContains) \\r\\n\\t{\\r\\n\\t\\tif(node && parent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tonlyContains = Boolean.parse(onlyContains);\\r\\n\\t\\t\\treturn ((node === parent && !onlyContains) || this.isElementInParent(node,parent));\\r\\n\\t\\t}\\r\\n        return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isElementInView = function(element,parent,doc) \\r\\n\\t{\\r\\n\\t\\tdoc = this.getDoc(doc);\\r\\n\\t\\tvar rect = element.getBoundingClientRect();\\r\\n\\t\\tvar elem = element;\\r\\n\\t    var top = rect.top;\\r\\n\\t    var height = rect.height;\\r\\n\\t    do \\r\\n\\t    {\\r\\n\\t        if (elem && elem.parentNode) \\r\\n\\t        {\\r\\n\\t            elem = elem.parentNode;\\r\\n\\t            rect = elem.getBoundingClientRect();\\r\\n\\t            if (!(top <= rect.bottom)) \\r\\n\\t            {\\r\\n\\t                return false;\\r\\n\\t            }\\r\\n\\t            if (top + height <= rect.top) \\r\\n\\t            {\\r\\n\\t                return false;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t    } \\r\\n\\t    while (elem && elem !== parent && elem.parentNode);\\r\\n\\t    var retValue = (top <= ((doc.documentElement && doc.documentElement.clientHeight) || 0));\\r\\n\\t    return retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.scrollIntoView = function(element,parent,doc) \\r\\n\\t{\\r\\n\\t\\tif(!this.isElementInView(element,parent,doc))\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (parent.clientHeight !== parent.scrollHeight) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparent.scrollTop = element.offsetTop;\\r\\n\\t        }\\r\\n\\t        if (!this.isElementInView(element, parent, doc)) \\r\\n\\t        {\\r\\n\\t        \\telement.scrollIntoView();\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isElementVisible = function(element,win) \\r\\n\\t{\\r\\n\\t\\t if(element)\\r\\n\\t\\t {\\r\\n\\t\\t\\t if(!element.offsetParent)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t return false;\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t win = this.getWin(win);\\r\\n\\t\\t\\t var style = win.getComputedStyle(element);\\r\\n\\t\\t\\t if(style.display === \\\"none\\\" || style.visibility  === \\\"hidden\\\")\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t return false;\\r\\n\\t\\t\\t }\\r\\n\\t\\t }\\r\\n\\t\\t return true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isFunction = function(refFunction,context) \\r\\n\\t{\\r\\n\\t\\tcontext = this.getWin(context);\\r\\n\\t    if(refFunction && ((typeof refFunction == \\\"function\\\") || (typeof context[refFunction] === \\\"function\\\")))\\r\\n\\t    {\\r\\n\\t    \\treturn true;\\r\\n\\t    }\\r\\n\\t    return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isString = function(object) \\r\\n\\t{\\r\\n\\t    return typeof object == \\\"string\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isNumber = function(object) \\r\\n\\t{\\r\\n\\t\\ttry\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(typeof object == \\\"number\\\")\\r\\n\\t\\t    {\\r\\n\\t\\t    \\treturn true;\\r\\n\\t\\t    }\\r\\n\\t\\t    var regex = /^([+\\\\-])?[0-9]+(\\\\.?)([0-9]+)?(e[0-9]+)?$/;\\r\\n\\t\\t    if (!object.match(regex)) \\r\\n\\t\\t    {\\r\\n\\t            return false;\\r\\n\\t        }\\r\\n\\t        value = parseFloat(object);\\r\\n\\t        return !isNaN(value) && isFinite(value);\\r\\n\\t\\t}\\r\\n\\t    catch(error)\\r\\n\\t    {\\r\\n\\t    \\t\\r\\n\\t    }\\r\\n\\t    return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isBoolean = function(object) \\r\\n\\t{\\r\\n\\t    return typeof object == \\\"boolean\\\";\\r\\n\\t};\\r\\n\\t  \\r\\n\\tNSUtil.prototype.isUndefined = function(object) \\r\\n\\t{\\r\\n\\t    return typeof object == \\\"undefined\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isUndefinedOrNull = function(object) \\r\\n\\t{\\r\\n\\t    return (this.isUndefined(object) || object === null);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isStringValid = function(objString) \\r\\n\\t{\\r\\n\\t    if(!objString || objString === \\\"\\\")\\r\\n\\t    {\\r\\n\\t    \\treturn false;\\r\\n\\t    }\\r\\n\\t    return true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.toCamelCase = function(objString,isFirstLetterCapital) \\r\\n\\t{\\r\\n\\t\\tif(this.isString(objString))\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn ((isFirstLetterCapital ? \\\"-\\\" : \\\"\\\") + objString).replace(/-+([^-])/g, function(str, char) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t    \\t\\treturn char.toUpperCase();\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t\\treturn objString;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.fromCamelCase = function(objString) \\r\\n\\t{\\r\\n\\t\\tif(this.isString(objString))\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn objString.replace(/([A-Z]+)/g, function(match,letter) \\r\\n\\t\\t\\t{\\r\\n\\t\\t        return '-' + letter.toLowerCase();\\r\\n\\t\\t    });\\r\\n\\t\\t}\\r\\n\\t\\treturn objString;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//\\\"thisIsATest\\\" --> \\\"this-is-a-test\\\"\\r\\n\\tNSUtil.prototype.toKebabCase = function(objString) \\r\\n\\t{\\r\\n\\t\\tif(this.isString(objString))\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjString.replace(/([A-Z])([A-Z])([a-z])/g, '$1-$2$3')\\r\\n\\t\\t\\t\\t\\t .replace(/([a-z])([A-Z])/g, '$1-$2')\\r\\n\\t\\t\\t\\t\\t .replace(/[\\\\s_]+/g, '-')\\r\\n\\t\\t\\t\\t\\t .toLowerCase();\\r\\n\\t\\t}\\r\\n\\t\\treturn objString;\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\t\\r\\n\\t/*\\r\\n\\t * 1001 - function validation failure\\r\\n\\t * 1002 - function return Parameter is not valid\\r\\n\\t */\\r\\n\\tNSUtil.prototype.throwException = function (exceptionCode,exceptionName,exceptionDetails)\\r\\n\\t{\\r\\n\\t\\tfunction nsException() \\r\\n\\t\\t{\\r\\n\\t\\t\\t   this.code = exceptionCode;\\r\\n\\t\\t\\t   this.name = exceptionName;\\r\\n\\t\\t\\t   this.details = exceptionDetails;\\r\\n\\t\\t\\t   this.toString = function() \\r\\n\\t\\t\\t   {\\r\\n\\t\\t\\t      return \\\"Exception Occured with Code::\\\" +  this.code + \\\" and Details \\\" +  this.name + \\\"::\\\" + this.details;\\r\\n\\t\\t\\t   };\\r\\n\\t\\t}\\r\\n\\t    //alert(\\\"Error Occured with details code: \\\" + exceptionCode + \\\",name: \\\" + exceptionName + \\\",details: \\\" + exceptionDetails);\\r\\n\\t    throw new nsException();\\r\\n\\t};\\r\\n\\t\\r\\n\\t//other values of navigator.appName is \\\"Netscape\\\",\\\"Opera\\\"\\r\\n\\t//From IE 11 navigator.appName returns \\\"Netscape\\\" instead of \\\"Microsoft Internet Explorer\\\"\\r\\n\\t//and From IE 11 it follows standard API.\\r\\n\\tNSUtil.prototype.isBrowserIE = function ()\\r\\n\\t{\\r\\n\\t    if(navigator && ((navigator.appName && navigator.appName == \\\"Microsoft Internet Explorer\\\") || (navigator.userAgent && navigator.userAgent.match(/Trident/))))\\r\\n\\t    {\\r\\n\\t        return true;\\r\\n\\t    }\\r\\n\\t    return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getBrowser = function(win)\\r\\n\\t{\\r\\n\\t\\twin = this.getWin(win);\\r\\n\\t\\tvar objBrowser = {code:null,name:null,version:null,appName:null,appCodeName:null,platform:null,\\r\\n\\t\\t\\t\\t\\t\\t  isChrome:false,isFirefox:false,isOpera:false,isIE:false,isMSIE:false,isSafari:false};\\r\\n\\t\\tvar userAgent = win.navigator.userAgent;\\r\\n\\t\\tif(userAgent.indexOf(\\\"Chrome\\\") != -1) \\r\\n\\t\\t{\\r\\n\\t\\t\\tobjBrowser.code = \\\"chrome\\\";\\r\\n\\t\\t\\tobjBrowser.name = \\\"Google Chrome\\\";\\r\\n\\t\\t\\tobjBrowser.isChrome = true;\\r\\n\\t\\t} \\r\\n\\t\\telse if(userAgent.indexOf(\\\"Firefox\\\") != -1) \\r\\n\\t\\t{\\r\\n\\t\\t\\tobjBrowser.code = \\\"firefox\\\";\\r\\n\\t\\t\\tobjBrowser.name = \\\"Mozilla Firefox\\\";\\r\\n\\t\\t\\tobjBrowser.isFirefox = true;\\r\\n\\t\\t} \\r\\n\\t\\telse if(userAgent.indexOf(\\\"Opera\\\")!=-1) \\r\\n\\t\\t{\\r\\n\\t\\t\\tobjBrowser.code = \\\"opera\\\";\\r\\n\\t\\t\\tobjBrowser.name = \\\"Opera\\\";\\r\\n\\t\\t\\tobjBrowser.isOpera = true;\\r\\n\\t\\t}\\r\\n\\t\\t//for IE version 6 to 11\\r\\n\\t\\telse if(userAgent.indexOf('MSIE')!=-1 || navigator.userAgent.indexOf('Trident') > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjBrowser.code = \\\"ie\\\";\\r\\n\\t\\t\\tobjBrowser.name = \\\"Internet Explorer\\\";\\r\\n\\t\\t\\tobjBrowser.isIE = true;\\r\\n\\t\\t\\tobjBrowser.isMSIE = true;\\r\\n\\t\\t}\\r\\n\\t\\t//for IE 12\\r\\n\\t\\telse if(/x64|x32/ig.test(userAgent))\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjBrowser.code = \\\"ie\\\";\\r\\n\\t\\t\\tobjBrowser.name = \\\"Internet Explorer 12\\\";\\r\\n\\t\\t\\tobjBrowser.isIE = true;\\r\\n\\t\\t\\tobjBrowser.isMSIE = false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (userAgent.indexOf(\\\"Safari\\\")!=-1) \\r\\n\\t\\t{\\r\\n\\t\\t\\tobjBrowser.code = \\\"safari\\\";\\r\\n\\t\\t\\tobjBrowser.name = \\\"Safari\\\";\\r\\n\\t\\t\\tobjBrowser.isSafari = true;\\r\\n\\t\\t} \\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tobjBrowser.code = \\\"-1\\\";\\r\\n\\t\\t\\tobjBrowser.name = \\\"Unknown Browser\\\";\\r\\n\\t\\t}\\r\\n\\t\\tobjBrowser.version = navigator.appVersion;\\r\\n\\t\\tobjBrowser.appName = navigator.appName;\\r\\n\\t\\tobjBrowser.appCodeName = navigator.appCodeName;\\r\\n\\t\\tobjBrowser.platform = navigator.platform;\\r\\n\\t\\t\\r\\n\\t\\treturn objBrowser;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.findParentBySelector = function (element,parentSelector,doc)\\r\\n\\t{\\r\\n\\t    if(element && parentSelector)\\r\\n\\t    {\\r\\n\\t    \\tvar matchesFn = null;\\r\\n\\t    \\tvar parent = null;\\r\\n\\t    \\tdoc = this.getDoc(doc);\\r\\n\\t    \\t['matches','webkitMatchesSelector','mozMatchesSelector','msMatchesSelector','oMatchesSelector'].some(function(callback) \\r\\n\\t    \\t{\\r\\n\\t            if (typeof doc.body[callback] == 'function') \\r\\n\\t            {\\r\\n\\t                matchesFn = callback;\\r\\n\\t                return true;\\r\\n\\t            }\\r\\n\\t            return false;\\r\\n\\t        });\\r\\n\\t\\r\\n\\t        // traverse parents\\r\\n\\t        while (element) \\r\\n\\t        {\\r\\n\\t            parent = element.parentElement;\\r\\n\\t            if (parent && parent[matchesFn](parentSelector)) \\r\\n\\t            {\\r\\n\\t                return parent;\\r\\n\\t            }\\r\\n\\t            element = parent;\\r\\n\\t        }\\r\\n\\t    }\\r\\n\\t    return null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//navigates to the DOM Heirarchy to find the nearest parent of the specified HTML tag \\r\\n\\tNSUtil.prototype.findParent = function (element,param,querySelector,till)\\r\\n\\t{\\r\\n\\t\\tvar retElement = null;\\r\\n\\t    if(element)\\r\\n\\t    {\\r\\n\\t    \\tvar obj = this.getDomVariables();\\r\\n\\t    \\ttill = till ? till : obj.doc.body;\\r\\n\\t    \\tif(param)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tif(this.isString(param))\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\twhile(element) \\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\tif(element.tagName && element.tagName.toLowerCase() == param.toLowerCase()) \\r\\n\\t\\t    \\t\\t\\t{\\r\\n\\t\\t    \\t\\t\\t\\tretElement = element;\\r\\n\\t\\t    \\t\\t\\t    break;\\r\\n\\t\\t    \\t\\t\\t}\\r\\n\\t\\t    \\t\\t\\telement = element.parentElement;\\r\\n\\t\\t    \\t\\t}\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t\\telse if(this.isFunction(param))\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tvar start = element;\\r\\n\\t    \\t\\t\\tdo\\r\\n\\t\\t    \\t\\t{\\r\\n\\t    \\t            if (param(start)) \\r\\n\\t    \\t            {\\r\\n\\t    \\t                return start;\\r\\n\\t    \\t            }\\r\\n\\t    \\t            if (start == till || !start.parentNode) \\r\\n\\t    \\t            {\\r\\n\\t    \\t                break;\\r\\n\\t    \\t            }\\r\\n\\t    \\t            start = start.parentNode;\\r\\n\\t    \\t        } \\r\\n\\t    \\t\\t\\twhile (start && start !== till);\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t}\\r\\n\\t    \\telse if(querySelector)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\twhile(element) \\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tif(element.matches(querySelector)) \\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tretElement = element;\\r\\n\\t    \\t\\t\\t    break;\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t\\telement = element.parentElement;\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t}\\r\\n\\t    }\\r\\n\\t    return retElement;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//up\\r\\n\\tNSUtil.prototype.findParentByCallback = function(element,callback,root)\\r\\n\\t{\\r\\n\\t\\tif (!element || !this.isElementInOrParent(element,root)) \\r\\n\\t\\t{\\r\\n            return null;\\r\\n        }\\r\\n\\t\\tvar start = element;\\r\\n        do \\r\\n        {\\r\\n            if (callback && callback(start)) \\r\\n            {\\r\\n                return start;\\r\\n            }\\r\\n            if (start === root || !start.parentNode) \\r\\n            {\\r\\n                break;\\r\\n            }\\r\\n            start = start.parentNode;\\r\\n        } \\r\\n        while(start && start !== root);\\r\\n        return null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.findChild = function (element,childTag)\\r\\n\\t{\\r\\n\\t    if(element && childTag && element.getElementsByTagName(childTag).length > 0)\\r\\n\\t    {\\r\\n\\t        return element.getElementsByTagName(childTag)[0];\\r\\n\\t    }  \\r\\n\\t    return null;\\r\\n\\t};\\r\\n\\t\\t\\r\\n\\t//prev\\r\\n\\tNSUtil.prototype.findPrevNode = function(node,callback,root,withChild) \\r\\n\\t{\\r\\n\\t\\twithChild = this.isUndefinedOrNull(withChild) ? true : Boolean.parse(withChild);\\r\\n        return this.findNode(node,callback,root,false,\\\"previousSibling\\\",withChild ? \\\"lastChild\\\" : null);\\r\\n    };\\r\\n    \\r\\n    //next\\r\\n    NSUtil.prototype.findNextNode = function(node,callback,root,withChild) \\r\\n    {\\r\\n    \\twithChild = this.isUndefinedOrNull(withChild) ? true : Boolean.parse(withChild);\\r\\n        return this.findNode(node,callback,root,null,null,withChild ? \\\"firstChild\\\" : \\\"\\\");\\r\\n    };\\r\\n\\t\\r\\n\\t//find\\r\\n\\tNSUtil.prototype.findNode = function(node,callback,root,recursive,siblingProperty,childProperty) \\r\\n\\t{\\r\\n\\t\\trecursive = Boolean.parse(recursive);\\r\\n\\t\\tsiblingProperty = this.isUndefinedOrNull(siblingProperty) ? \\\"nextSibling\\\" : siblingProperty;\\r\\n\\t\\tchildProperty = this.isUndefinedOrNull(childProperty) ? \\\"firstChild\\\" : childProperty;\\r\\n        if (recursive && callback(node)) \\r\\n        {\\r\\n            return node;\\r\\n        }\\r\\n        var start = node;\\r\\n        var next = null;\\r\\n        do \\r\\n        {\\r\\n            next = start[siblingProperty];\\r\\n            if (callback(next)) \\r\\n            {\\r\\n                return next ? next : null;\\r\\n            }\\r\\n            if (childProperty && next && next[childProperty]) \\r\\n            {\\r\\n                var nextOne = this.findNode(next[childProperty],callback,next,true,siblingProperty,childProperty);\\r\\n                if (nextOne) \\r\\n                {\\r\\n                    return nextOne;\\r\\n                }\\r\\n            }\\r\\n            if(!next) \\r\\n            {\\r\\n                next = start.parentNode;\\r\\n            }\\r\\n            start = next;\\r\\n        } \\r\\n        while (start && start !== root);\\r\\n        return null;\\r\\n    };\\r\\n    \\r\\n   //findWithCurrent\\r\\n\\tNSUtil.prototype.findNodeWithCurrent = function(node,callback,root,siblingProperty,childProperty) \\r\\n\\t{\\r\\n\\t\\tsiblingProperty = this.isUndefinedOrNull(siblingProperty) ? \\\"nextSibling\\\" : siblingProperty;\\r\\n\\t\\tchildProperty = this.isUndefinedOrNull(childProperty) ? \\\"firstChild\\\" : childProperty;\\r\\n        var next = node;\\r\\n        do \\r\\n        {\\r\\n        \\tif (callback(next)) \\r\\n            {\\r\\n                return next || null;\\r\\n            }\\r\\n            if (childProperty && next && next[childProperty]) \\r\\n            {\\r\\n                var nextOne = this.findNodeWithCurrent(next[childProperty],callback,next,siblingProperty,childProperty);\\r\\n                if (nextOne) \\r\\n                {\\r\\n                    return nextOne;\\r\\n                }\\r\\n            }\\r\\n            while (next && !next[siblingProperty] && next != root) \\r\\n            {\\r\\n\\t\\t\\t\\tnext = next.parentNode;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (next && next[siblingProperty] && next != root) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tnext = next[siblingProperty];\\r\\n\\t\\t\\t}\\r\\n        } \\r\\n        while (next && next != root);\\r\\n        return null;\\r\\n    };\\r\\n    \\r\\n    //each\\r\\n    //It goes through all the children of the node calling a callback function\\r\\n    NSUtil.prototype.loopAllChildren = function (element,callback) \\r\\n    {\\r\\n        var node = element.firstChild;\\r\\n        if (node) \\r\\n        {\\r\\n            while (node) \\r\\n            {\\r\\n                var next = this.findNextNode(node,Boolean,element);\\r\\n                var value = callback(node);\\r\\n                if(value == false) \\r\\n                {\\r\\n                    return false;\\r\\n                }\\r\\n                // in case node is removed inside callback\\r\\n                if(node.parentNode) \\r\\n                {\\r\\n                \\tvalue = this.loopAllChildren(node,callback);\\r\\n                    if(!value)\\r\\n                    {\\r\\n                    \\treturn false;\\r\\n                    }\\r\\n                }\\r\\n                node = next;\\r\\n            }\\r\\n        }\\r\\n        return true;\\r\\n    };\\r\\n        \\r\\n\\tNSUtil.prototype.getZIndex = function (element,doc) \\r\\n\\t{\\r\\n\\t\\tdoc = this.getDoc(doc);\\r\\n\\t    var zIndex = doc.defaultView.getComputedStyle(element).getPropertyValue(\\\"z-index\\\");\\r\\n\\t    if(element.tagName !== \\\"BODY\\\" && element.tagName !== \\\"HTML\\\" && isNaN(zIndex)) \\r\\n\\t    {\\r\\n\\t    \\treturn this.getZIndex(element.parentNode);\\r\\n\\t    }\\r\\n\\t    else \\r\\n\\t    {\\r\\n\\t    \\treturn zIndex; \\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getStyleValue = function(element,styleProperty,getOrignalValue,getOnlyNumber,win)\\r\\n\\t{\\r\\n\\t\\twin = this.getWin(win);\\r\\n\\t\\tvar propertyValue = null;\\r\\n\\t\\tif(element && styleProperty && this.isElement(element))\\r\\n\\t\\t{\\r\\n\\t\\t\\telement = this.getElement(element);\\r\\n\\t\\t\\tgetOrignalValue = this.isUndefined(getOrignalValue) ? true : getOrignalValue;\\r\\n\\t\\t\\tvar getValue = function(styleProp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = null;\\r\\n\\t\\t\\t\\tif(element.style && element.style[styleProp])\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\tretValue = element.style[styleProp];\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\telse if(win.getComputedStyle)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue = win.getComputedStyle(element, null).getPropertyValue(styleProp);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(styleProperty === \\\"display\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tpropertyValue = getValue(styleProperty);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar displayValue = null;\\r\\n\\t\\t\\t\\tvar setStyleValue = false;\\r\\n\\t\\t\\t\\tif(getOrignalValue)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdisplayValue = getValue(\\\"display\\\");\\r\\n\\t\\t\\t\\t\\tif(element.style.display)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetStyleValue = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telement.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tpropertyValue = getValue(styleProperty);\\r\\n\\t\\t\\t\\tif(getOrignalValue)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\telement.style.display = (displayValue && setStyleValue) ? displayValue: \\\"\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(getOnlyNumber && !this.isUndefinedOrNull(propertyValue))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar numberFieldsReg = /^left|top|bottom|right|width|min|max|height|margin|padding|font-size/i;\\r\\n\\t\\t\\t\\tif (numberFieldsReg.test(styleProperty) && /^[\\\\-+]?[0-9.]+px$/.test(propertyValue.toString())) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tpropertyValue = parseInt(propertyValue.toString(), 10);\\r\\n\\t\\t\\t\\t\\tpropertyValue = this.isNumber(propertyValue) ? +propertyValue : propertyValue;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t }\\r\\n\\t\\t return propertyValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getControlValue = function(control)\\r\\n\\t{\\r\\n\\t\\tif(control)\\r\\n\\t\\t{\\r\\n\\t\\t\\t if(control.tagName == \\\"INPUT\\\") \\r\\n\\t\\t\\t {\\r\\n\\t            if(control.type == \\\"text\\\") \\r\\n\\t            {\\r\\n\\t            \\treturn control.value;\\r\\n\\t            }\\r\\n\\t            if(control.type == \\\"checkbox\\\") \\r\\n\\t            {\\r\\n\\t            \\treturn control.checked;\\r\\n\\t            }\\r\\n\\t            if(control.type == \\\"radio\\\") \\r\\n\\t            {\\r\\n\\t            \\treturn control.checked;\\r\\n\\t            }\\r\\n\\t         }  \\r\\n\\t         if(control.tagName == \\\"SELECT\\\") \\r\\n\\t         {\\r\\n\\t        \\t return control.value;\\r\\n\\t         }\\r\\n\\t         if(control.tagName == \\\"TEXTAREA\\\") \\r\\n\\t         {\\r\\n\\t        \\t return control.value;\\r\\n\\t         }\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.setControlValue = function(control,value)\\r\\n\\t{\\r\\n\\t\\tvar retValue = null;\\r\\n\\t\\tif(control)\\r\\n\\t\\t{\\r\\n\\t\\t\\t if(control.tagName == \\\"INPUT\\\") \\r\\n\\t\\t\\t {\\r\\n\\t            if(control.type == \\\"text\\\") \\r\\n\\t            {\\r\\n\\t            \\tretValue = value;\\r\\n\\t            \\tcontrol.value = value;\\r\\n\\t            }\\r\\n\\t            if(control.type == \\\"checkbox\\\") \\r\\n\\t            {\\r\\n\\t            \\tretValue = Boolean.parse(value);\\r\\n\\t            \\tcontrol.checked = retValue;\\r\\n\\t            }\\r\\n\\t            if(control.type == \\\"radio\\\") \\r\\n\\t            {\\r\\n\\t            \\tretValue = Boolean.parse(value);\\r\\n\\t            \\tcontrol.checked = retValue;\\r\\n\\t            }\\r\\n\\t         }  \\r\\n\\t         if(control.tagName == \\\"SELECT\\\") \\r\\n\\t         {\\r\\n\\t        \\t retValue = value;\\r\\n\\t        \\t control.value = value;\\r\\n\\t         }\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//returns the top y coordinate of the given div used while listening to scrolling events(vertical scrolling)\\r\\n\\tNSUtil.prototype.scrollTop = function (div)\\r\\n\\t{\\r\\n\\t\\t if(div)\\r\\n\\t\\t {\\r\\n\\t\\t    return (div.scrollHeight - div.clientHeight);\\r\\n\\t\\t }\\r\\n\\t\\t return -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//returns the top x coordinate of the given div used while listening to scrolling events(horizontal scrolling)\\r\\n\\tNSUtil.prototype.scrollLeft = function (div)\\r\\n\\t{\\r\\n\\t\\t if(div)\\r\\n\\t\\t {\\r\\n\\t\\t\\t return (div.scrollWidth - div.clientWidth);\\r\\n\\t\\t }\\r\\n\\t\\t return -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//adds Style class to an element's styles list \\r\\n\\tNSUtil.prototype.addStyleClass = function (element,styleClass)\\r\\n\\t{\\r\\n\\t    if(element && styleClass && styleClass.length > 0)\\r\\n\\t    {\\r\\n\\t    \\tvar arrStyleClass = styleClass.split(\\\" \\\");\\r\\n\\t        if(element.classList)\\r\\n\\t        {\\r\\n\\t        \\tfor(var count = 0;count < arrStyleClass.length;count++)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tif(!this.hasStyleClass(element,arrStyleClass[count]))\\r\\n\\t                {\\r\\n\\t                \\telement.classList.add(arrStyleClass[count]);\\r\\n\\t                }\\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t        else\\r\\n\\t        {\\r\\n\\t        \\tfor(var count = 0;count < arrStyleClass.length;count++)\\r\\n\\t        \\t{\\r\\n\\t\\t            if(!this.hasStyleClass(element,arrStyleClass[count]))\\r\\n\\t\\t            {\\r\\n\\t\\t            \\tif(element.className instanceof SVGAnimatedString)\\r\\n\\t\\t    \\t\\t\\t{\\r\\n\\t\\t            \\t\\tif(element.getAttribute(\\\"class\\\"))\\r\\n\\t\\t            \\t\\t{\\r\\n\\t\\t            \\t\\t\\telement.setAttribute(\\\"class\\\", element.getAttribute(\\\"class\\\") + \\\" \\\" + arrStyleClass[count]);\\r\\n\\t\\t            \\t\\t}\\r\\n\\t\\t            \\t\\telse\\r\\n\\t\\t            \\t\\t{\\r\\n\\t\\t            \\t\\t\\telement.setAttribute(\\\"class\\\",arrStyleClass[count]);\\r\\n\\t\\t            \\t\\t}\\r\\n\\t\\t    \\t\\t\\t}\\r\\n\\t\\t            \\telse\\r\\n\\t\\t            \\t{\\r\\n\\t\\t            \\t\\telement.className += \\\" \\\" + arrStyleClass[count];\\r\\n\\t\\t            \\t}\\r\\n\\t\\t            }\\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\t//returns true if a Style class is present in element's styles list\\r\\n\\tNSUtil.prototype.hasStyleClass = function (element,styleClass)\\r\\n\\t{\\r\\n\\t    if(element && styleClass && styleClass.length > 0)\\r\\n\\t    {\\r\\n\\t    \\ttry\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tif(!element.classList)\\r\\n\\t            {\\r\\n\\t    \\t\\t\\tif(element.className instanceof SVGAnimatedString)\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\treturn new RegExp('(\\\\\\\\s|^)' + styleClass + '(\\\\\\\\s|$)').test(element.getAttribute('class'));\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t\\telse\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\treturn (element.className.indexOf(\\\" \\\" + styleClass) > -1);\\r\\n\\t    \\t\\t\\t}\\r\\n\\t            }\\r\\n\\t            else if(element.classList.contains)\\r\\n\\t            {\\r\\n\\t            \\treturn element.classList.contains(styleClass);\\r\\n\\t            }\\r\\n\\t    \\t}\\r\\n\\t    \\tcatch(error)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\t\\r\\n\\t    \\t}\\r\\n\\t        \\r\\n\\t    }\\r\\n\\t    return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//removes Style class from an element's styles list\\r\\n\\tNSUtil.prototype.removeStyleClass = function(element,styleClass)\\r\\n\\t{\\r\\n\\t    if(element && styleClass && styleClass.length > 0)\\r\\n\\t    {\\r\\n\\t    \\tvar arrStyleClass = styleClass.split(\\\" \\\");\\r\\n\\t    \\tif(element.classList)\\r\\n\\t        {\\r\\n\\t\\t    \\tfor(var count = 0;count < arrStyleClass.length;count++)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t        \\telement.classList.remove(arrStyleClass[count]);\\r\\n\\t\\t        }\\r\\n\\t    \\t}\\r\\n\\t        else if(element.className)\\r\\n\\t        {\\r\\n\\t        \\tfor(var count = 0;count < arrStyleClass.length;count++)\\r\\n\\t        \\t{\\r\\n\\t\\t        \\tif(element.className instanceof SVGAnimatedString)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t        \\t\\tvar removedClass = element.getAttribute('class').replace(new RegExp('(\\\\\\\\s|^)' + arrStyleClass[count] + '(\\\\\\\\s|$)', 'g'), '$2');\\r\\n\\t\\t        \\t\\tif (this.hasStyleClass(arrStyleClass[count])) \\r\\n\\t\\t        \\t\\t{\\r\\n\\t\\t        \\t\\t   this.setAttribute('class', removedClass);\\r\\n\\t\\t        \\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t        \\telse\\r\\n\\t\\t        \\t{\\r\\n\\t\\t        \\t\\telement.className = element.className.replace(arrStyleClass[count],\\\"\\\");\\r\\n\\t\\t        \\t}\\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.toggleStyleClass = function(element,styleClass)\\r\\n\\t{\\r\\n\\t    if(element && styleClass && styleClass.length > 0)\\r\\n\\t    {\\r\\n\\t   \\t \\tthis.hasStyleClass(element,styleClass) ? this.removeStyleClass(element,styleClass) : this.addStyleClass(element,styleClass); \\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\t//change Style class from an element's styles list\\r\\n\\tNSUtil.prototype.changeStyleClass = function (element,oldStyleClass,newStyleClass)\\r\\n\\t{\\r\\n\\t    if(element && oldStyleClass && oldStyleClass.length > 0 && newStyleClass && newStyleClass.length > 0)\\r\\n\\t    {\\r\\n\\t        if(element.classList)\\r\\n\\t        {\\r\\n\\t        \\telement.classList.remove(oldStyleClass);\\r\\n\\t            if(!element.classList.contains(newStyleClass))\\r\\n\\t            {\\r\\n\\t                element.classList.add(newStyleClass);\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        else\\r\\n\\t        {\\r\\n\\t        \\tif(element.className instanceof SVGAnimatedString)\\r\\n\\t\\t\\t\\t{\\r\\n\\t        \\t\\tthis.removeStyleClass(element,oldStyleClass);\\r\\n\\t        \\t\\tthis.addStyleClass(element,newStyleClass);\\r\\n\\t\\t\\t\\t}\\r\\n\\t        \\telse if(element.className)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\telement.className = element.className.replace(oldStyleClass,newStyleClass);\\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.css = function (element,key,value)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar setStyle = function(prop)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar regexNumberProp = /^left|top|bottom|right|width|min|max|height|margin|padding|fontSize/i;\\r\\n\\t\\t\\tvar tempValue = styles[prop];\\r\\n\\t\\t\\tif(tempValue !== undefined && tempValue !== null && regexNumberProp.test(prop) && self.isNumber(tempValue))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttempValue = tempValue + \\\"px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telement.style[prop] = tempValue;\\r\\n\\t\\t};\\r\\n\\t\\tvar styles;\\r\\n\\t    if (this.isUndefined(value)) \\r\\n\\t    {\\r\\n\\t        if (this.isString(key)) \\r\\n\\t        {\\r\\n\\t            return element.style[key];\\r\\n\\t        }\\r\\n\\t        styles = key;\\r\\n\\t    } \\r\\n\\t    else \\r\\n\\t    {\\r\\n\\t        styles = {};\\r\\n\\t        styles[key] = value;\\r\\n\\t    }\\r\\n\\t    for(var style in styles)\\r\\n\\t    {\\r\\n\\t    \\tsetStyle(style);\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.addEvent = function(arrElement,eventType,listener,option)\\r\\n\\t{\\r\\n\\t\\tif(arrElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!Array.isArray(arrElement))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrElement = [arrElement];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tarrEventType = eventType.split(\\\" \\\");\\r\\n\\t\\t\\tvar type = null;\\r\\n\\t\\t\\tvar element = null;\\r\\n\\t\\t\\tfor(var count = 0;count < arrEventType.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttype = arrEventType[count];\\r\\n\\t\\t\\t\\tif(type)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var eleCount = 0;eleCount < arrElement.length;eleCount++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\telement = arrElement[eleCount];\\r\\n\\t\\t\\t\\t\\t\\tif(element)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(!element.__nsEventListeners) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t    element.__nsEventListeners = {};\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tif(!element.__nsEventListeners[type]) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t    element.__nsEventListeners[type] = [];\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t(element.addEventListener) ? element.addEventListener(type,listener,option) : element.attachEvent(\\\"on\\\" + type, listener);;\\r\\n\\t\\t\\t\\t\\t\\t\\telement.__nsEventListeners[type].push({listener: listener,option: option});\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.removeEvent = function(arrElement,eventType,listener,option)\\r\\n\\t{\\r\\n\\t\\tif(arrElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfunction removeEvent(paramElement,paramType,paramListener,paramOption)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t(paramElement.removeEventListener) ? paramElement.removeEventListener(paramType,paramListener,paramOption) : paramElement.detachEvent(\\\"on\\\" + paramType, paramListener);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(!Array.isArray(arrElement))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrElement = [arrElement];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tarrEventType = eventType.split(\\\" \\\");\\r\\n\\t\\t\\tvar type = null;\\r\\n\\t\\t\\tvar element = null;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0;count < arrEventType.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttype = arrEventType[count];\\r\\n\\t\\t\\t\\tif(type)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var eleCount = 0;eleCount < arrElement.length;eleCount++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\telement = arrElement[eleCount];\\r\\n\\t\\t\\t\\t\\t\\tif(element)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(listener == \\\"all\\\")\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tfor(var lstCount = 0;lstCount < element.__nsEventListeners[type].length;lstCount++)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\titem = element.__nsEventListeners[type][lstCount];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tremoveEvent(element,type,item.listener,item.option);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\telement.__nsEventListeners[type].splice(lstCount,1);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tremoveEvent(element,type,listener,option);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tif(element.__nsEventListeners && element.__nsEventListeners[type] && element.__nsEventListeners[type].length)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tfor(var lstCount = 0;lstCount < element.__nsEventListeners[type].length;lstCount++)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\titem = element.__nsEventListeners[type][lstCount];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(item.listener == listener)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\telement.__nsEventListeners[type].splice(lstCount,1);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.dispatchEvent = function(element,eventType,data,param,bubbles,cancelable,doc)\\r\\n\\t{\\r\\n\\t\\t var cancelled = false;\\r\\n\\t\\t var event = null;\\r\\n\\t\\t doc = this.getDoc(doc);\\r\\n\\t\\t if(this.isUndefined(bubbles) || bubbles === null)\\r\\n\\t\\t {\\r\\n\\t\\t\\t bubbles = true;\\r\\n\\t\\t }\\r\\n\\t\\t if(this.isUndefined(cancelable) || cancelable === null)\\r\\n\\t\\t {\\r\\n\\t\\t\\t cancelable = false;\\r\\n\\t\\t }\\r\\n\\t\\t if (doc.createEvent) \\r\\n\\t\\t {\\r\\n\\t\\t    event = doc.createEvent(\\\"HTMLEvents\\\",{ \\\"detail\\\": data});\\r\\n\\t\\t    event.initEvent(eventType, bubbles, cancelable);\\r\\n\\t\\t    try\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tempEvent = doc.createEvent(\\\"HTMLEvents\\\");\\r\\n\\t\\t\\t\\ttempEvent.initEvent(\\\"nsPing\\\", false, false);\\r\\n\\t\\t\\t\\telement.dispatchEvent(tempEvent);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcatch(error)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = event[\\\"__impl4cf1e782hg__\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t } \\r\\n\\t\\t else \\r\\n\\t\\t {\\r\\n\\t\\t    event = doc.createEventObject();\\r\\n\\t\\t    event.eventType = eventType;\\r\\n\\t\\t    event.cancelBubble = !bubbles;\\r\\n\\t\\t    event.cancelable = cancelable;\\r\\n\\t\\t    try\\r\\n\\t\\t\\t{\\r\\n\\t\\t    \\tvar tempEvent = doc.createEventObject();\\r\\n\\t\\t    \\ttempEvent.eventType = \\\"nsPing\\\";\\r\\n\\t\\t    \\ttempEvent.cancelBubble = true;\\r\\n\\t\\t    \\ttempEvent.cancelable = false;\\r\\n\\t\\t    \\telement.fireEvent(\\\"on\\\" + tempEvent.eventType, tempEvent);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcatch(error)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = event[\\\"__impl4cf1e782hg__\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t }\\r\\n\\t\\t event.eventName = eventType;\\r\\n\\t\\t event.detail = data;\\r\\n\\t\\t if(param)\\r\\n\\t\\t {\\r\\n\\t\\t\\t for (var key in param) \\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t if(param.hasOwnProperty(key)) \\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t event[key] = param[key];\\r\\n\\t\\t\\t\\t } \\r\\n\\t\\t\\t }   \\r\\n\\t\\t }\\r\\n\\t\\t if(doc.createEvent) \\r\\n\\t\\t {\\r\\n\\t\\t\\tcancelled = !element.dispatchEvent(event);\\r\\n\\t\\t } \\r\\n\\t\\t else \\r\\n\\t\\t {\\r\\n\\t\\t\\tcancelled = element.fireEvent(\\\"on\\\" + event.eventType, event);\\r\\n\\t\\t }\\r\\n\\t\\t return cancelled;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//equivalent to jquery trigger\\r\\n\\tNSUtil.prototype.triggerEvent = function(element,eventType,doc)\\r\\n\\t{\\r\\n\\t\\tdoc = this.getDoc(doc);\\r\\n\\t\\t// modern browsers, IE9+\\r\\n\\t\\tif (\\\"createEvent\\\" in doc) \\r\\n\\t\\t{\\r\\n\\t        var event = doc.createEvent(\\\"HTMLEvents\\\");\\r\\n\\t        event.initEvent(eventType, false, true);\\r\\n\\t        element.dispatchEvent(event);\\r\\n\\t    } \\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t        // IE 8\\r\\n\\t        var event = doc.createEventObject();\\r\\n\\t        event.eventType = eventType;\\r\\n\\t        element.fireEvent(\\\"on\\\" + event.eventType,event);\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\t//https://stackoverflow.com/questions/11974262/how-to-clone-or-re-dispatch-dom-events\\r\\n\\tNSUtil.prototype.redispatchEvent = function(element,originalEvent,doc)\\r\\n\\t{\\r\\n\\t\\tvar eventCopy = null;\\r\\n\\t\\tif (typeof Event === \\\"function\\\") \\r\\n\\t\\t{\\r\\n\\t\\t    eventCopy = new originalEvent.constructor(originalEvent.type, originalEvent);\\r\\n\\t\\t} \\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t    // Internet Explorer\\r\\n\\t\\t\\tdoc = this.getDoc(doc);\\r\\n\\t\\t\\tvar arrEvents = [\\\"MouseEvent\\\",\\\"DragEvent\\\",\\\"WheelEvent\\\",\\\"PointerEvent\\\",\\\"TouchEvent\\\",\\\"TextEvent\\\",\\\"CompositionEvent\\\",\\\"KeyboardEvent\\\",\\\"InputEvent\\\",\\\"UIEvent\\\",\\\"FocusEvent\\\",\\\"Event\\\"];\\r\\n\\t\\t\\tvar strFunc = originalEvent.constructor.toString();\\r\\n\\t\\t\\tvar eventType = null;\\r\\n\\t\\t\\tfor(var count = 0;count < arrEvents.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(strFunc.indexOf(arrEvents[count]) > -1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\teventType = arrEvents[count];\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t    if(eventType)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\teventCopy = doc.createEvent(eventType);\\r\\n\\t\\t\\t\\tif (originalEvent.getModifierState)\\r\\n\\t\\t\\t\\t  var modifiersList = allModifiers.filter(\\r\\n\\t\\t\\t\\t\\toriginalEvent.getModifierState,\\r\\n\\t\\t\\t\\t\\toriginalEvent\\r\\n\\t\\t\\t\\t  ).join(\\\" \\\");\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tif (eventType === \\\"MouseEvent\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\teventCopy.initMouseEvent(originalEvent.type, originalEvent.bubbles, originalEvent.cancelable,\\r\\n\\t\\t\\t\\t\\t\\t\\t  originalEvent.view, originalEvent.detail, originalEvent.screenX, originalEvent.screenY,\\r\\n\\t\\t\\t\\t\\t\\t\\t  originalEvent.clientX, originalEvent.clientY, originalEvent.ctrlKey,\\r\\n\\t\\t\\t\\t\\t\\t\\t  originalEvent.altKey, originalEvent.shiftKey, originalEvent.metaKey,\\r\\n\\t\\t\\t\\t\\t\\t\\t  originalEvent.button, originalEvent.relatedTarget\\r\\n\\t\\t\\t\\t\\t\\t\\t);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (eventType === \\\"DragEvent\\\")\\r\\n\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\teventCopy.initDragEvent(\\r\\n\\t\\t\\t\\t\\t  originalEvent.type, originalEvent.bubbles, originalEvent.cancelable,\\r\\n\\t\\t\\t\\t\\t  originalEvent.view, originalEvent.detail, originalEvent.screenX, originalEvent.screenY,\\r\\n\\t\\t\\t\\t\\t  originalEvent.clientX, originalEvent.clientY, originalEvent.ctrlKey,\\r\\n\\t\\t\\t\\t\\t  originalEvent.altKey, originalEvent.shiftKey, originalEvent.metaKey,\\r\\n\\t\\t\\t\\t\\t  originalEvent.button, originalEvent.relatedTarget, originalEvent.dataTransfer\\r\\n\\t\\t\\t\\t\\t);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (eventType === \\\"WheelEvent\\\") eventCopy.initWheelEvent(\\r\\n\\t\\t\\t\\t  originalEvent.detail, originalEvent.screenX, originalEvent.screenY,\\r\\n\\t\\t\\t\\t  originalEvent.clientX, originalEvent.clientY, originalEvent.button,\\r\\n\\t\\t\\t\\t  originalEvent.relatedTarget, modifiersList,\\r\\n\\t\\t\\t\\t  originalEvent.deltaX, originalEvent.deltaY, originalEvent.deltaZ, originalEvent.deltaMode\\r\\n\\t\\t\\t\\t);\\r\\n\\t\\t\\t\\telse if (eventType === \\\"PointerEvent\\\") eventCopy.initPointerEvent(\\r\\n\\t\\t\\t\\t  originalEvent.type, originalEvent.bubbles, originalEvent.cancelable,\\r\\n\\t\\t\\t\\t  originalEvent.view, originalEvent.detail, originalEvent.screenX, originalEvent.screenY,\\r\\n\\t\\t\\t\\t  originalEvent.clientX, originalEvent.clientY, originalEvent.ctrlKey,\\r\\n\\t\\t\\t\\t  originalEvent.altKey, originalEvent.shiftKey, originalEvent.metaKey,\\r\\n\\t\\t\\t\\t  originalEvent.button, originalEvent.relatedTarget,\\r\\n\\t\\t\\t\\t  originalEvent.offsetX, originalEvent.offsetY, originalEvent.width, originalEvent.height,\\r\\n\\t\\t\\t\\t  originalEvent.pressure, originalEvent.rotation,\\r\\n\\t\\t\\t\\t  originalEvent.tiltX, originalEvent.tiltY,\\r\\n\\t\\t\\t\\t  originalEvent.pointerId, originalEvent.pointerType,\\r\\n\\t\\t\\t\\t  originalEvent.timeStamp, originalEvent.isPrimary\\r\\n\\t\\t\\t\\t);\\r\\n\\t\\t\\t\\telse if (eventType === \\\"TouchEvent\\\") eventCopy.initTouchEvent(\\r\\n\\t\\t\\t\\t  originalEvent.type, originalEvent.bubbles, originalEvent.cancelable,\\r\\n\\t\\t\\t\\t  originalEvent.view, originalEvent.detail, originalEvent.screenX, originalEvent.screenY,\\r\\n\\t\\t\\t\\t  originalEvent.clientX, originalEvent.clientY, originalEvent.ctrlKey,\\r\\n\\t\\t\\t\\t  originalEvent.altKey, originalEvent.shiftKey, originalEvent.metaKey,\\r\\n\\t\\t\\t\\t  originalEvent.touches, originalEvent.targetTouches, originalEvent.changedTouches,\\r\\n\\t\\t\\t\\t  originalEvent.scale, originalEvent.rotation\\r\\n\\t\\t\\t\\t);\\r\\n\\t\\t\\t\\telse if (eventType === \\\"TextEvent\\\") eventCopy.initTextEvent(\\r\\n\\t\\t\\t\\t  originalEvent.type, originalEvent.bubbles, originalEvent.cancelable,\\r\\n\\t\\t\\t\\t  originalEvent.view,\\r\\n\\t\\t\\t\\t  originalEvent.data, originalEvent.inputMethod, originalEvent.locale\\r\\n\\t\\t\\t\\t);\\r\\n\\t\\t\\t\\telse if (eventType === \\\"CompositionEvent\\\") eventCopy.initTextEvent(\\r\\n\\t\\t\\t\\t  originalEvent.type, originalEvent.bubbles, originalEvent.cancelable,\\r\\n\\t\\t\\t\\t  originalEvent.view,\\r\\n\\t\\t\\t\\t  originalEvent.data, originalEvent.inputMethod, originalEvent.locale\\r\\n\\t\\t\\t\\t);\\r\\n\\t\\t\\t\\telse if (eventType === \\\"KeyboardEvent\\\") eventCopy.initKeyboardEvent(\\r\\n\\t\\t\\t\\t  originalEvent.type, originalEvent.bubbles, originalEvent.cancelable,\\r\\n\\t\\t\\t\\t  originalEvent.view, originalEvent.char, originalEvent.key,\\r\\n\\t\\t\\t\\t  originalEvent.location, modifiersList, originalEvent.repeat\\r\\n\\t\\t\\t\\t);\\r\\n\\t\\t\\t\\telse if (eventType === \\\"InputEvent\\\" || eventType === \\\"UIEvent\\\")\\r\\n\\t\\t\\t\\t  eventCopy.initUIEvent(\\r\\n\\t\\t\\t\\t\\toriginalEvent.type, originalEvent.bubbles, originalEvent.cancelable,\\r\\n\\t\\t\\t\\t\\toriginalEvent.view, originalEvent.detail\\r\\n\\t\\t\\t\\t  );\\r\\n\\t\\t\\t\\telse if (eventType === \\\"FocusEvent\\\") eventCopy.initFocusEvent(\\r\\n\\t\\t\\t\\t\\toriginalEvent.type, originalEvent.bubbles, originalEvent.cancelable,\\r\\n\\t\\t\\t\\t\\toriginalEvent.view, originalEvent.detail, originalEvent.relatedTarget\\r\\n\\t\\t\\t\\t);\\r\\n\\t\\t\\t\\telse if(eventType === \\\"Event\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\teventCopy.initEvent(originalEvent.type, originalEvent.bubbles, originalEvent.cancelable);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telement.dispatchEvent(eventCopy);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getDoc = function(doc)\\r\\n\\t{\\r\\n\\t\\tdoc = doc || document;\\r\\n\\t\\treturn doc;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getWin = function(win)\\r\\n\\t{\\r\\n\\t\\twin = win || window;\\r\\n\\t\\treturn win;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//returns event for all kind of browser\\r\\n\\tNSUtil.prototype.getEvent = function (event,win)\\r\\n\\t{\\r\\n\\t\\twin = this.getWin(win);\\r\\n\\t\\tif (this.isUndefinedOrNull(event))\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = win.event;\\r\\n\\t\\t}\\r\\n\\t\\tif(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar touchEvent = null;\\r\\n\\t\\t\\tif (event.targetTouches && event.targetTouches.length > 0) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttouchEvent = event.targetTouches[0];\\r\\n\\t\\t    } \\r\\n\\t\\t\\telse if (event.originalEvent && event.originalEvent.targetTouches && event.originalEvent.targetTouches.length > 0) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttouchEvent = event.originalEvent.targetTouches[0];\\r\\n\\t\\t    }\\r\\n\\t\\t\\telse if(event[\\\"type\\\"] && event.type.match(/^touch/) && event.changedTouches && event.changedTouches.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttouchEvent = event.changedTouches[0];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(event instanceof Event)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(touchEvent)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrProp = ['clientX', 'clientY', 'pageX', 'pageY'];\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < arrProp.length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar prop = arrProp[count];\\r\\n\\t\\t\\t\\t\\t\\tevent[prop] = touchEvent[prop];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (!event.touchEvent) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t            event.touchEvent = touchEvent;\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn event;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//returns target for all kind of browser\\r\\n\\tNSUtil.prototype.getTarget = function (event,doc)\\r\\n\\t{\\r\\n\\t\\tevent = this.getEvent(event);\\r\\n\\t\\tdoc = this.getDoc(doc);\\r\\n\\t\\tvar target = event.target ? event.target : event.srcElement;\\r\\n\\t\\tif(target && target instanceof SVGElement && event.currentTarget != doc)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttarget = event.currentTarget;\\r\\n\\t\\t}\\r\\n\\t\\treturn target;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//preventDefault for all kind of browser\\r\\n\\tNSUtil.prototype.preventDefault = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.getEvent(event);\\r\\n\\t\\tif(event.preventDefault) \\r\\n\\t\\t{\\r\\n\\t\\t   event.preventDefault();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t   event.returnValue = false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.preventDefaultForScrollKeys = function(event)\\r\\n\\t{\\r\\n\\t\\t// left: 37, up: 38, right: 39, down: 40,\\r\\n\\t\\tvar objKeys = {37: 1, 38: 1, 39: 1, 40: 1};\\r\\n\\t\\tevent = this.getEvent(event);\\r\\n\\t\\tif (objKeys[event.keyCode]) \\r\\n\\t\\t{\\r\\n\\t        this.util.preventDefault(event);\\r\\n\\t        return false;\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\t//reference: http://www.broofa.com/Tools/Math.uuid.js\\r\\n\\tNSUtil.prototype.getUniqueId = function () \\r\\n\\t{\\r\\n\\t    var chars = \\\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\\\".split(\\\"\\\");\\r\\n\\t    var uuid = new Array(36);\\r\\n\\t    var rnd=0;\\r\\n\\t    var r;\\r\\n\\t    \\r\\n\\t    for (var count = 0; count < 36; count++) \\r\\n\\t    {\\r\\n\\t      if (count==14) \\r\\n\\t      {\\r\\n\\t        uuid[count] = '4';\\r\\n\\t      } \\r\\n\\t      else \\r\\n\\t      {\\r\\n\\t        if (rnd <= 0x02) \\r\\n\\t        {\\r\\n\\t        \\trnd = 0x2000000 + (Math.random()*0x1000000) | 0;\\r\\n\\t        }\\r\\n\\t        r = rnd & 0xf;\\r\\n\\t        rnd = rnd >> 4;\\r\\n\\t        uuid[count] = chars[(count == 19) ? (r & 0x3) | 0x8 : r];\\r\\n\\t      }\\r\\n\\t    }\\r\\n\\t    return uuid.join('');\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.addCSSClassInDOM = function(arrClassName,arrCSSText,checkExisting,doc)\\r\\n\\t {\\r\\n\\t\\t doc = this.getDoc(doc);\\r\\n\\t\\t if(doc.styleSheets && arrClassName && arrCSSText && arrCSSText.length === arrCSSText.length)\\r\\n\\t\\t {\\r\\n\\t\\t\\t checkExisting = this.isUndefined(checkExisting) ? true : checkExisting;\\r\\n\\t\\t\\t var arrStyleSheet = doc.styleSheets;\\r\\n\\t\\t\\t//var styleSheet = null;\\r\\n\\t\\t\\t//var media = null; \\r\\n\\t\\t\\t//var styleSheetLength = arrStyleSheet.length;\\r\\n\\t\\t\\t/* 1. search for media == \\\"screen\\\" */\\r\\n\\t\\t\\t/*while(styleSheetLength > -1)\\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\t--styleSheetLength;\\r\\n\\t\\t\\t\\t// dont take into account the disabled stylesheets \\r\\n\\t\\t\\t\\tif(arrStyleSheet[styleSheetLength].disabled) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcontinue; \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tmedia = arrStyleSheet[styleSheetLength].media;\\r\\n\\t\\t\\t\\tif(typeof media == \\\"object\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tmedia = media.mediaText;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(media == \\\"\\\" || media=='all' || media.indexOf(\\\"screen\\\") != -1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstyleSheet = arrStyleSheet[styleSheetLength];\\r\\n\\t\\t\\t\\t\\tstyleSheetLength = -1;   // indication that media==\\\"screen\\\" was found (if not, then styleSheetLength==0)\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t\\tvar styleSheet = null;\\r\\n\\t\\t\\tvar styleSheetElement = doc.getElementById(this.__sheetId);\\r\\n\\t\\t\\t/* if not found, create one */\\r\\n\\t\\t\\t//if(styleSheetLength != -1)\\r\\n\\t\\t\\tif(styleSheetElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstyleSheet = styleSheetElement.sheet;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar head = doc.head || doc.getElementsByTagName('head')[0];\\r\\n\\t\\t\\t\\tstyleSheetElement = doc.createElement(\\\"style\\\");\\r\\n\\t\\t\\t\\tstyleSheetElement.setAttribute(\\\"id\\\",this.__sheetId);\\r\\n\\t\\t\\t\\tstyleSheetElement.setAttribute(\\\"type\\\",\\\"text/css\\\");\\r\\n\\t\\t\\t\\thead.appendChild(styleSheetElement);\\r\\n\\t\\t\\t\\tstyleSheet = doc.styleSheets[arrStyleSheet.length - 1]; /* take the new stylesheet to add the className and the style */\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar existingCSSClassList = null;\\r\\n\\t\\t\\tvar classLength = arrCSSText.length; \\r\\n\\t\\t\\tvar className = null;\\r\\n\\t\\t\\tvar cssText = null;\\r\\n\\t\\t\\t/* 3. add the className and style */\\r\\n\\t\\t\\tswitch (typeof styleSheet.media) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase \\\"string\\\":\\r\\n\\t\\t\\t\\t\\texistingCSSClassList = styleSheet.rules;\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < classLength;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tclassName = arrClassName[count];\\r\\n\\t\\t\\t\\t\\t\\tcssText = arrCSSText[count];\\r\\n\\t\\t\\t\\t\\t\\tif(!checkExisting || !this.modifyExistingClass(existingCSSClassList, className, cssText))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tstyleSheet.addRule(className, cssText);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"object\\\":\\r\\n\\t\\t\\t\\t\\texistingCSSClassList = styleSheet.cssRules;\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < classLength;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tclassName = arrClassName[count];\\r\\n\\t\\t\\t\\t\\t\\tcssText = arrCSSText[count];\\r\\n\\t\\t\\t\\t\\t\\tif(!checkExisting || !this.modifyExistingClass(existingCSSClassList, className, cssText))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tstyleSheet.insertRule(className + \\\"{\\\" + cssText + \\\"}\\\", styleSheet.cssRules.length);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t }\\r\\n\\t };\\r\\n\\t NSUtil.prototype.removeCSSClassInDOM = function(arrClassName,doc)\\r\\n\\t {\\r\\n\\t\\t doc = this.getDoc(doc);\\r\\n\\t\\t if(doc.styleSheets && arrClassName)\\r\\n\\t\\t {\\r\\n\\t\\t\\tvar styleSheet = null;\\r\\n\\t\\t\\tvar styleSheetElement = doc.getElementById(this.__sheetId);\\r\\n\\t\\t\\tif(styleSheetElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstyleSheet = styleSheetElement.sheet;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar existingCSSClassList = null;\\r\\n\\t\\t\\tvar classLength = arrClassName.length; \\r\\n\\t\\t\\tvar className = null;\\r\\n\\t\\t\\tif(styleSheet && styleSheet.media)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t/* 3. add the className and style */\\r\\n\\t\\t\\t\\tswitch (typeof styleSheet.media) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcase \\\"string\\\":\\r\\n\\t\\t\\t\\t\\t\\texistingCSSClassList = styleSheet.rules;\\r\\n\\t\\t\\t\\t\\t\\tfor(var count = 0;count < classLength;count++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tclassName = arrClassName[count];\\r\\n\\t\\t\\t\\t\\t\\t\\tif(this.removeExistingClass(styleSheet,existingCSSClassList, className))\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase \\\"object\\\":\\r\\n\\t\\t\\t\\t\\t\\texistingCSSClassList = styleSheet.cssRules;\\r\\n\\t\\t\\t\\t\\t\\tfor(var count = 0;count < classLength;count++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tclassName = arrClassName[count];\\r\\n\\t\\t\\t\\t\\t\\t\\tif(this.removeExistingClass(styleSheet,existingCSSClassList, className))\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t }\\r\\n\\t\\t }\\r\\n\\t };\\r\\n\\t /*\\r\\n\\t  * If Class exists then modifies the content with new one and return true\\r\\n\\t  * If Class does not exist it returns false\\r\\n\\t  */\\r\\n\\t NSUtil.prototype.modifyExistingClass = function(existingCSSClassList,className,cssText)\\r\\n\\t {\\r\\n\\t\\t if(existingCSSClassList && existingCSSClassList.length > 0)\\r\\n\\t\\t {\\r\\n\\t\\t\\t var length = existingCSSClassList.length;\\r\\n\\t\\t\\t var cssClass = null;\\r\\n\\t\\t\\t for(var count = 0; count < length; count++) \\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\tcssClass = existingCSSClassList[count];\\r\\n\\t\\t\\t\\tif(cssClass.selectorText && cssClass.selectorText.toLowerCase() == className.toLowerCase()) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcssClass.style.cssText = cssText;\\r\\n\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t }\\r\\n\\t\\t }\\r\\n\\t\\t return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.removeExistingClass = function(styleSheet,existingCSSClassList,className)\\r\\n\\t{\\r\\n\\t\\t if(styleSheet && existingCSSClassList && existingCSSClassList.length > 0)\\r\\n\\t\\t {\\r\\n\\t\\t\\t var length = existingCSSClassList.length;\\r\\n\\t\\t\\t var cssClass = null;\\r\\n\\t\\t\\t for(var count = 0; count < length; count++) \\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\tcssClass = existingCSSClassList[count];\\r\\n\\t\\t\\t\\tif(cssClass.selectorText && cssClass.selectorText.toLowerCase() == className.toLowerCase()) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar isRemoved = false;\\r\\n\\t\\t\\t\\t\\tif(\\\"deleteRule\\\" in styleSheet) \\r\\n\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\tstyleSheet.deleteRule(count); \\r\\n\\t\\t\\t\\t\\t\\tisRemoved = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t    else if(\\\"removeRule\\\" in styleSheet) \\r\\n\\t\\t\\t\\t    { \\r\\n\\t\\t\\t\\t    \\tstyleSheet.removeRule(count); \\r\\n\\t\\t\\t\\t    \\tisRemoved = true;\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t\\tif(isRemoved)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t }\\r\\n\\t\\t }\\r\\n\\t\\t return false;\\r\\n\\t};\\r\\n\\t \\r\\n\\t NSUtil.prototype.addPseudoStyleFromExistingStyle = function(control,className,property,cssClassName,checkClassCallBack)\\r\\n\\t {\\r\\n\\t \\tvar styleProperties = this.getCSSClass(cssClassName);\\r\\n\\t \\tif(checkClassCallBack)\\r\\n\\t \\t{\\r\\n\\t \\t\\tstyleProperties = checkClassCallBack(styleProperties);\\r\\n\\t \\t}\\r\\n\\t \\tvar _head = doc.head || doc.getElementsByTagName('head')[0];\\r\\n\\t \\tvar _sheet = doc.getElementById(this.__sheetId) || doc.createElement('style');\\r\\n\\t \\t_sheet.id = this.__sheetId;\\r\\n\\t \\tcontrol.className +=  \\\" \\\" + className; \\r\\n\\t \\t_sheet.innerHTML += \\\"\\\\n.\\\" + className + \\\":\\\" + property + \\\"{\\\" +styleProperties + \\\"}\\\";\\r\\n\\t \\t_head.appendChild(_sheet);\\r\\n\\t };\\r\\n\\t\\r\\n\\t NSUtil.prototype.getCSSClass = function(cssClassName,doc)\\r\\n\\t {\\r\\n\\t\\tdoc = this.getDoc(doc);\\r\\n\\t    if(!doc.styleSheets) \\r\\n\\t \\t{\\r\\n\\t \\t\\treturn \\\"\\\";\\r\\n\\t \\t}\\r\\n\\t \\tvar regEx = null;\\r\\n\\t \\tvar styleSheets = doc.styleSheets;\\r\\n\\t \\tvar counter = styleSheets.length;\\r\\n\\t \\tvar result = [];\\r\\n\\t    if(typeof cssClassName == \\\"string\\\") \\r\\n\\t \\t{\\r\\n\\t \\t\\tregEx = RegExp('\\\\\\\\b' + cssClassName + '\\\\\\\\b','i');\\r\\n\\t \\t}\\r\\n\\t    while(counter)\\r\\n\\t \\t{\\r\\n\\t     \\tvar currentSheet = styleSheets[--counter];\\r\\n\\t     \\tvar cssRules = (currentSheet.rules) ? currentSheet.rules: currentSheet.cssRules;\\r\\n\\t \\t\\tvar cssRulesLength = cssRules.length;\\r\\n\\t     \\tfor(var count = 0 ; count < cssRulesLength; count++)\\r\\n\\t \\t\\t{\\r\\n\\t     \\t\\tvar tempClassDetails = cssRules[count].selectorText ? [cssRules[count].selectorText, cssRules[count].style.cssText]: [cssRules[count]+''];\\r\\n\\t     \\t\\tif(regEx.test(tempClassDetails[0])) \\r\\n\\t \\t\\t\\t{\\r\\n\\t \\t\\t\\t\\tresult[result.length]= tempClassDetails;\\r\\n\\t \\t\\t\\t}\\r\\n\\t     \\t}\\r\\n\\t     }\\r\\n\\t \\tif(result && result.length === 1 && result[0] && result[0].length > 1)\\r\\n\\t \\t{\\r\\n\\t \\t\\treturn result[0][1];\\r\\n\\t \\t}\\r\\n\\t     return result.join('\\\\n\\\\n');\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.addStylesToHead = function(styleTagId, arrStyle) {\\r\\n\\t\\t if(arrStyle && arrStyle.length) {\\r\\n\\t\\t\\t var style = document.createElement(\\\"style\\\");\\r\\n\\t\\t\\t if(styleTagId) {\\r\\n\\t\\t\\t\\t style.setAttribute(\\\"id\\\",styleTagId);\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t style.textContent = arrStyle.join(\\\"\\\\n\\\");\\r\\n\\t\\t\\t document.head.appendChild(style);\\r\\n\\t\\t\\t return style;\\r\\n\\t\\t }\\r\\n\\t\\t return null;\\r\\n\\t};\\r\\n\\t \\r\\n\\t NSUtil.prototype.convertCSSPropToJS = function(cssClassProp)\\r\\n\\t {\\r\\n\\t\\t if(cssClassProp)\\r\\n\\t\\t {\\r\\n\\t\\t\\t var arrIndex = this.indexesOf(cssClassProp,\\\"-\\\");\\r\\n\\t\\t\\t if(arrIndex && arrIndex.length > 0)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t for(var count = 0;count < arrIndex.length; count++)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t var index = arrIndex[count] + 1;\\r\\n\\t\\t\\t\\t\\t cssClassProp = cssClassProp.substring(0,index) + cssClassProp[index].toUpperCase() + cssClassProp.slice(index + 1);\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t cssClassProp = cssClassProp.replaceAll(\\\"-\\\",\\\"\\\");\\r\\n\\t\\t\\t }\\r\\n\\t\\t }\\r\\n\\t\\t return cssClassProp;\\r\\n\\t };\\r\\n\\t \\r\\n\\t//CSS Property \\\"transition\\\",\\\"-o-transition\\\",\\\"-ms-transition\\\",\\\"-moz-transition\\\",\\\"webkit-transition\\\"\\r\\n\\t //Javascript Equivalent \\\"transition\\\",\\\"OTransition\\\",\\\"msTransition\\\",\\\"MozTransition\\\",\\\"WebkitTransition\\\"\\r\\n\\t NSUtil.prototype.getSupportedCSSPropertyName = function(arrPropertyNames,doc)\\r\\n\\t {\\r\\n\\t\\t if(arrPropertyNames && arrPropertyNames.length > 0)\\r\\n\\t\\t {\\r\\n\\t\\t\\t doc = this.getDoc(doc);\\r\\n\\t\\t\\t var root = doc.documentElement;\\r\\n\\t\\t\\t for (var count=0; count < arrPropertyNames.length; count++)\\r\\n\\t\\t \\t {\\r\\n\\t\\t\\t \\t //if property exists on element (value will be string, empty string if not set)\\r\\n\\t\\t\\t\\t if(arrPropertyNames[count] in root.style)\\r\\n\\t\\t \\t\\t { \\r\\n\\t\\t\\t\\t\\t return arrPropertyNames[count];\\r\\n\\t\\t \\t\\t }\\r\\n\\t\\t \\t }\\r\\n\\t\\t }\\r\\n\\t\\t return null;\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.throwNSError = function(componentName,message)\\r\\n\\t {\\r\\n\\t \\tthrow new Error(\\\"Error in \\\" + componentName + \\\" with details::\\\" + message);\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.warning = function(componentName,message)\\r\\n\\t {\\r\\n\\t \\tconsole.warn(\\\"Warning in \\\" + componentName + \\\" with details::\\\" + message);\\r\\n\\t };\\r\\n\\r\\n\\t NSUtil.prototype.info = function(componentName,message)\\r\\n\\t {\\r\\n\\t \\tconsole.info(\\\"Info in \\\" + componentName + \\\" with details::\\\" + message);\\r\\n\\t };\\r\\n\\r\\n\\t NSUtil.prototype.debug = function(componentName,message)\\r\\n\\t {\\r\\n\\t \\tconsole.debug(\\\"Debugging Message in \\\" + componentName + \\\" with details::\\\" + message);\\r\\n\\t };\\r\\n\\t \\r\\n\\t //gets the offset of the element \\r\\n\\t //equivalent offset() of jquery\\r\\n\\t NSUtil.prototype.getOffSet = function(element, offset) \\r\\n\\t {\\r\\n\\t\\t if(!offset)\\r\\n\\t\\t {\\r\\n\\t\\t\\t offset = {left : 0, top : 0};\\r\\n\\t\\t }\\r\\n\\t\\t if(element)\\r\\n\\t     {\\r\\n\\t\\t\\toffset.left += (element.offsetLeft - element.scrollLeft + element.clientLeft);\\r\\n\\t\\t\\toffset.top += (element.offsetTop - element.scrollTop + element.clientTop);\\r\\n\\t\\t    offset = this.getOffSet(element.offsetParent, offset);\\r\\n\\t     }\\r\\n\\t\\t return offset;\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.setOffSet = function(element, offset) \\r\\n\\t {\\r\\n\\t\\t if(element && offset)\\r\\n\\t     {\\r\\n\\t\\t\\tvar calculatePosition = false;\\r\\n\\t\\t\\tvar position = this.getStyleValue(element,\\\"position\\\",true);\\r\\n\\t\\t\\tif (position === \\\"static\\\") \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\telement.style.position = \\\"relative\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar currentOffset = this.getOffSet(element);\\r\\n\\t\\t\\tvar curCSSTop = element.style.top;\\r\\n\\t\\t\\tvar curCSSLeft =  element.style.left;\\r\\n\\t\\t\\tvar curTop,curLeft;\\r\\n\\t\\t\\tcalculatePosition = (position === \\\"absolute\\\" || position === \\\"fixed\\\" ) && (curCSSTop + curCSSLeft).indexOf( \\\"auto\\\" ) > -1;\\r\\n\\t\\t\\tif (calculatePosition) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar curPosition = this.getPosition(element);\\r\\n\\t\\t\\t\\tcurTop = curPosition.top;\\r\\n\\t\\t\\t\\tcurLeft = curPosition.left;\\r\\n\\t\\t\\t} \\r\\n\\t\\t\\telse \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcurTop = parseFloat( curCSSTop ) || 0;\\r\\n\\t\\t\\t\\tcurLeft = parseFloat( curCSSLeft ) || 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (offset.top != null) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\telement.style.top = ((offset.top - currentOffset.top) + curTop) + \\\"px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (offset.left != null) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\telement.style.left = ((offset.left - currentOffset.left ) + curLeft) + \\\"px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t     }\\r\\n\\t\\t return offset;\\r\\n\\t };\\r\\n\\t \\r\\n\\t//equivalent position() of jquery\\r\\n\\t NSUtil.prototype.getPosition = function(element,isElementScrollable,doc) \\r\\n\\t {\\r\\n\\t\\t if(isElementScrollable)\\r\\n\\t\\t {\\r\\n\\t\\t\\t doc = this.getDoc(doc);\\r\\n\\t\\t\\t var self = this;\\r\\n\\t\\t\\t var offsetParent = function(node) \\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\tvar offsetParent = node.offsetParent || doc.documentElement;\\r\\n\\t\\t\\t\\twhile (offsetParent && offsetParent.tagName != \\\"html\\\" && self.getStyleValue(offsetParent,\\\"position\\\",false) === \\\"static\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\toffsetParent = offsetParent.offsetParent;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn offsetParent || doc.documentElement;\\r\\n\\t\\t\\t };\\r\\n\\t\\t\\t var offsetParent,offset,parentOffset = { top: 0, left: 0 };\\r\\n\\t\\t\\t // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent\\r\\n\\t\\t\\t if (this.getStyleValue(element,\\\"position\\\",false) === \\\"fixed\\\" ) \\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t// we assume that getBoundingClientRect is available when computed position is fixed\\r\\n\\t\\t\\t\\toffset = element.getBoundingClientRect();\\r\\n\\t\\t\\t } \\r\\n\\t\\t\\t else \\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\toffsetParent = offsetParent(element);\\r\\n\\t\\t\\t\\t// Get correct offsets\\r\\n\\t\\t\\t\\toffset = element.getBoundingClientRect();\\r\\n\\t\\t\\t\\tif(offsetParent.tagName != \\\"html\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tparentOffset = offsetParent.getBoundingClientRect();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\r\\n\\t\\t\\t\\t// Add offsetParent borders\\r\\n\\t\\t\\t\\tparentOffset.top  += this.getDimensionAsNumber(this.getStyleValue(offsetParent,\\\"borderTopWidth\\\",false));\\r\\n\\t\\t\\t\\tparentOffset.left += this.getDimensionAsNumber(this.getStyleValue(offsetParent,\\\"borderLeftWidth\\\",false));\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t // Subtract parent offsets and element margins\\r\\n\\t\\t\\t // note: when an element has margin: auto the offsetLeft and marginLeft\\r\\n\\t\\t\\t // are the same in Safari causing offset.left to incorrectly be 0\\r\\n\\t\\t\\t return {\\r\\n\\t\\t\\t\\ttop:  offset.top  - parentOffset.top - this.getDimensionAsNumber(this.getStyleValue((element,\\\"marginTop\\\",false))),\\r\\n\\t\\t\\t\\tleft: offset.left - parentOffset.left - this.getDimensionAsNumber(this.getStyleValue((element,\\\"marginLeft\\\",false)))\\r\\n\\t\\t\\t };\\r\\n\\t\\t }\\r\\n\\t\\t else\\r\\n\\t\\t {\\r\\n\\t\\t\\t var offset = {left : 0, top : 0};\\r\\n\\t\\t\\t if(element)\\r\\n\\t\\t     {\\r\\n\\t\\t\\t\\t offset = {left : element.offsetLeft, top : element.offsetTop};\\r\\n\\t\\t     }\\r\\n\\t\\t\\t return offset;\\r\\n\\t\\t }\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.getOffSetForElementRectangle = function(rectElement,doc,win) \\r\\n\\t {\\r\\n\\t\\t  doc = this.getDoc(doc);\\r\\n\\t\\t  win = this.getWin(win);\\r\\n\\t\\t  var body = doc.body || doc.getElementsByTagName('body')[0];\\r\\n\\t\\t  var docElement = doc.documentElement || body.parentNode;\\r\\n\\t\\t  var clientTop  = docElement.clientTop  || body.clientTop  || 0;\\r\\n\\t\\t  var clientLeft = docElement.clientLeft || body.clientLeft || 0;\\r\\n\\t\\t  var scrollTop  = win.pageYOffset || docElement.scrollTop;\\r\\n\\t\\t  var scrollLeft = win.pageXOffset || docElement.scrollLeft;\\r\\n\\t\\t  \\r\\n\\t\\t  var top = rectElement.top  + scrollTop  - clientTop;\\r\\n\\t\\t  var left = rectElement.left + scrollLeft - clientLeft;\\r\\n\\t\\r\\n\\t\\t  return {top:top,left:left};\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.getOffSetByRect = function(element,doc) \\r\\n\\t {\\r\\n\\t\\t doc = this.getDoc(doc);\\r\\n\\t\\t var rect = element.getBoundingClientRect();\\r\\n\\t\\t var top = rect.top + doc.body.scrollTop;\\r\\n\\t\\t var left = rect.left + doc.body.scrollLeft;\\r\\n\\t\\t return {top:top,left:left};\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.getDPI = function(doc)\\r\\n\\t {\\r\\n\\t\\tdoc = this.getDoc(doc);\\r\\n\\t \\tvar dpi = {width:0,height:0};\\r\\n\\t\\tvar divDPI = this.createDiv(null,\\\"nsGetDPI\\\");\\r\\n\\t    doc.body.appendChild(divDPI);\\r\\n\\t    dpi.width = divDPI.offsetWidth;\\r\\n\\t    dpi.height = divDPI.offsetHeight;\\r\\n\\t    doc.body.removeChild(divDPI);\\r\\n\\t \\t\\r\\n\\t \\treturn dpi;\\r\\n\\t };\\r\\n\\t \\r\\n\\t//gives dimension for the visible part i.e. body or viewport\\r\\n\\t NSUtil.prototype.getBodyDimension = function(doc,win) \\r\\n\\t {\\r\\n\\t\\t doc = this.getDoc(doc);\\r\\n\\t\\t win = this.getWin(win);\\r\\n\\t\\t var objReturn = {};\\r\\n\\t\\t objReturn.width = win.innerWidth || doc.documentElement.clientWidth || doc.body.offsetWidth;\\r\\n\\t\\t objReturn.height = win.innerHeight || doc.documentElement.clientHeight || doc.body.offsetHeight;\\r\\n\\t\\t return objReturn;\\r\\n\\t };\\r\\n\\t \\r\\n\\t//gives dimension for the whole document i.e. with scroll bars\\r\\n\\t NSUtil.prototype.getDocumentDimension = function(doc) \\r\\n\\t {\\r\\n\\t\\t var objReturn = {};\\r\\n\\t\\t doc = this.getDoc(doc);\\r\\n\\t\\t objReturn.width = Math.max(\\r\\n\\t\\t\\t\\t \\tdoc.body.scrollWidth, doc.documentElement.scrollWidth,\\r\\n\\t\\t\\t\\t \\tdoc.body.offsetWidth, doc.documentElement.offsetWidth,\\r\\n\\t\\t\\t\\t \\tdoc.body.clientWidth, doc.documentElement.clientWidth\\r\\n\\t\\t\\t    );\\r\\n\\t\\t objReturn.height = Math.max(\\r\\n\\t\\t\\t\\t \\tdoc.body.scrollHeight, doc.documentElement.scrollHeight,\\r\\n\\t\\t\\t\\t \\tdoc.body.offsetHeight, doc.documentElement.offsetHeight,\\r\\n\\t\\t\\t\\t \\tdoc.body.clientHeight, doc.documentElement.clientHeight\\r\\n\\t\\t\\t    );\\r\\n\\t\\t return objReturn;\\r\\n\\t };\\r\\n\\t \\r\\n\\t //equivalent to jquery outerHeight\\r\\n\\t NSUtil.prototype.getOuterHeight = function(element,win)\\r\\n\\t {\\r\\n\\t\\t var height = -1;\\r\\n\\t\\t if(element)\\r\\n\\t\\t {\\r\\n\\t\\t\\t win = this.getWin(win);\\r\\n\\t\\t\\t height = element.offsetHeight;\\r\\n\\t\\t\\t var style = win.getComputedStyle(element);\\r\\n\\t\\t\\t height += parseInt(style.marginTop) + parseInt(style.marginBottom);\\r\\n\\t\\t }\\r\\n\\t\\t return height;\\r\\n\\t };\\r\\n\\t //equivalent to jquery outerWidth\\r\\n\\t NSUtil.prototype.getOuterWidth = function(element,win)\\r\\n\\t {\\r\\n\\t\\t var width = -1;\\r\\n\\t\\t if(element)\\r\\n\\t\\t {\\r\\n\\t\\t\\t win = this.getWin(win);\\r\\n\\t\\t\\t width = element.offsetWidth;\\r\\n\\t\\t\\t var style = win.getComputedStyle(element);\\r\\n\\t\\t\\t width += parseInt(style.marginLeft) + parseInt(style.marginRight);\\r\\n\\t\\t }\\r\\n\\t\\t return width;\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.getInnerWidth = function(element, win) \\r\\n\\t {\\r\\n\\t\\t win = this.getWin(win);\\r\\n\\t\\t var computedStyle = win.getComputedStyle(element);\\r\\n\\t\\t var elementWidth = element.clientWidth;\\r\\n\\t\\t elementWidth -= parseFloat(computedStyle.paddingLeft || \\\"0\\\") + parseFloat(computedStyle.paddingRight || \\\"0\\\");\\r\\n\\t\\t return elementWidth;\\r\\n\\t };\\r\\n\\t \\r\\n\\t //returns measured width of text\\r\\n\\t NSUtil.prototype.getWidthOfText = function(text,fontSize,fontName,doc)\\r\\n\\t {\\t\\r\\n\\t\\tdoc = this.getDoc(doc);\\r\\n\\t \\tvar canvas = doc.createElement(\\\"canvas\\\");\\r\\n\\t \\tvar context = canvas.getContext(\\\"2d\\\");\\r\\n\\t \\tvar fontArgs = context.font.split(\\\" \\\");\\r\\n\\t \\tif(fontSize)\\r\\n\\t \\t{\\r\\n\\t \\t\\tfontArgs[0] = fontSize;\\r\\n\\t \\t}\\r\\n\\t \\tif(fontName)\\r\\n\\t \\t{\\r\\n\\t \\t\\tfontArgs[1] = fontName;\\r\\n\\t \\t}\\r\\n\\t \\tcontext.font = fontArgs[0] + \\\" \\\" + fontArgs[1];        \\r\\n\\t \\tvar width = context.measureText(text).width;\\r\\n\\t \\treturn width;\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.getMaxZIndex = function (element,doc) \\r\\n\\t {\\r\\n\\t\\t doc = this.getDoc(doc);\\r\\n\\t     var currentzIndex = -1;\\r\\n\\t     var maxZIndex = 0;\\r\\n\\t     var checkZIndex = function(currElement)\\r\\n\\t     {\\r\\n\\t     \\tcurrentzIndex = doc.defaultView.getComputedStyle(currElement,null).getPropertyValue(\\\"z-index\\\");\\r\\n\\t     \\tcurrentzIndex = parseInt(currentzIndex, 10);\\r\\n\\t     \\tmaxZIndex = (currentzIndex) ? Math.max(maxZIndex, currentzIndex) : maxZIndex;\\r\\n\\t     };\\r\\n\\t     if(element)\\r\\n\\t     {\\r\\n\\t     \\tvar currentElement = element;\\r\\n\\t         while(currentElement)\\r\\n\\t         {\\r\\n\\t         \\tcheckZIndex(currentElement);\\r\\n\\t             currentElement = currentElement.offsetParent;\\r\\n\\t         }\\r\\n\\t     }\\r\\n\\t     else\\r\\n\\t     {\\r\\n\\t     \\tvar arrElements = doc.getElementsByTagName(\\\"*\\\");\\r\\n\\t         var length = arrElements.length;\\r\\n\\t         for (var count = 0; count < length; count++) \\r\\n\\t         {\\r\\n\\t         \\tcheckZIndex(arrElements[count]);\\r\\n\\t         }\\r\\n\\t     }\\r\\n\\t     return maxZIndex;\\r\\n\\t };\\r\\n\\t\\r\\n\\t \\r\\n\\t//function for scrollbar click detection\\r\\n\\t //pass event.clientX for mouse events\\r\\n\\t NSUtil.prototype.clickedOnScrollbar = function(element,mouseX)\\r\\n\\t {\\r\\n\\t\\t if(element)\\r\\n\\t\\t {\\r\\n\\t\\t\\t return (this.getOuterWidth(element) <= mouseX);\\r\\n\\t\\t }\\r\\n\\t\\t return false;\\r\\n\\t };\\r\\n\\t \\r\\n\\t //concept from https://tylercipriani.com/2014/07/12/crossbrowser-javascript-scrollbar-detection.html\\r\\n\\t NSUtil.prototype.hasScrollbar = function(element,axis,doc,win)\\r\\n\\t {\\r\\n\\t\\t doc = this.getDoc(doc);\\r\\n\\t\\t win = this.getWin(win);\\r\\n\\t\\t if(!element)\\r\\n\\t\\t {\\r\\n\\t\\t\\t element = doc.documentElement || doc.body;\\r\\n\\t\\t }\\r\\n\\t     var overflowStyle = null;\\r\\n\\t     var overflowYStyle = null;\\r\\n\\t \\r\\n\\t\\t if (typeof element.currentStyle !== 'undefined') \\r\\n\\t\\t {\\r\\n\\t\\t     overflowStyle = element.currentStyle.overflow;\\r\\n\\t\\t     overflowYStyle = element.currentStyle.overflowY;\\r\\n\\t\\t }\\r\\n\\t\\t overflowStyle = overflowStyle || win.getComputedStyle(element, \\\"\\\").overflow;\\r\\n\\t\\t overflowYStyle = overflowYStyle || win.getComputedStyle(element, \\\"\\\").overflowY;\\r\\n\\t\\t\\r\\n\\t\\t if (axis === 'x') \\r\\n\\t\\t {\\r\\n\\t\\t     var contentOverflows = element.scrollWidth > element.clientWidth,\\r\\n\\t\\t         overflowShown = /^(visible|auto)$/.test(overflowStyle), \\r\\n\\t\\t         alwaysShowScroll = overflowStyle === 'scroll';\\r\\n\\t\\t     return (contentOverflows && overflowShown) || (alwaysShowScroll);\\r\\n\\t\\t }\\r\\n\\t\\t else if (axis === 'y') \\r\\n\\t\\t {\\r\\n\\t\\t     var contentOverflows = element.scrollHeight > element.clientHeight,\\r\\n\\t\\t         overflowShown = /^(visible|auto)$/.test(overflowYStyle), \\r\\n\\t\\t         alwaysShowScroll = overflowYStyle === 'scroll';\\r\\n\\t\\t     return (contentOverflows && overflowShown) || (alwaysShowScroll);\\r\\n\\t\\t }\\r\\n\\t\\t else \\r\\n\\t\\t {\\r\\n\\t\\t     var contentOverflows = element.scrollWidth > element.clientWidth || element.scrollHeight > element.clientHeight,\\r\\n\\t\\t         overflowShown    = /^(visible|auto)$/.test(overflowStyle) || /^(visible|auto)$/.test(overflowYStyle),\\r\\n\\t\\t         alwaysShowScroll = overflowStyle === 'scroll' || overflowYStyle === 'scroll';\\r\\n\\t\\t     \\r\\n\\t\\t     return (contentOverflows && overflowShown) || (alwaysShowScroll);\\r\\n\\t\\t }\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.isChildInParent = function(parent,child)\\r\\n\\t {\\r\\n\\t\\t if(parent && child)\\r\\n\\t\\t {\\r\\n\\t\\t\\t var contains = (parent === child || (parent.compareDocumentPosition(child) & Node.DOCUMENT_POSITION_CONTAINED_BY));\\r\\n\\t\\t\\t return (contains > 0);\\r\\n\\t\\t }\\r\\n\\t\\t return false;\\r\\n\\t };\\r\\n\\t \\r\\n\\t //gives position where event has occured(like mouseClick) \\r\\n\\t NSUtil.prototype.getEventPosition = function(event,parentWithScroll,doc) \\r\\n\\t {\\r\\n\\t\\t  event = this.getEvent(event);\\r\\n\\t\\t  doc = this.getDoc(doc);\\r\\n\\t\\t  var left = 0;\\r\\n\\t\\t  var top = 0;\\r\\n\\t\\t  if (event.pageX || event.pageY) \\r\\n\\t\\t  { \\r\\n\\t\\t\\t  left = event.pageX;\\r\\n\\t\\t\\t  top = event.pageY;\\r\\n\\t\\t  }\\r\\n\\t\\t  else \\r\\n\\t\\t  { \\r\\n\\t\\t\\t  left = event.clientX + doc.body.scrollLeft + doc.documentElement.scrollLeft; \\r\\n\\t\\t\\t  top = event.clientY + doc.body.scrollTop + doc.documentElement.scrollTop; \\r\\n\\t\\t  }\\r\\n\\t\\t  if(parentWithScroll)\\r\\n\\t\\t  {\\r\\n\\t\\t\\t  left += parentWithScroll.scrollLeft;\\r\\n\\t\\t\\t  top += parentWithScroll.scrollTop;\\r\\n\\t\\t  }\\r\\n\\t\\t  return {left: left, top: top};\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.getMouseOffset = function(event,element)\\r\\n\\t {\\r\\n\\t\\t event = this.getEvent(event);\\r\\n\\t     var elementPosition = this.getCumulativeOffset(element);\\r\\n\\t     var mousePosition = this.getEventPosition(event);\\r\\n\\t     return {x:(mousePosition.left - elementPosition.x), y:(mousePosition.top - elementPosition.y)};\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.getMaxScrollPosition = function(element) \\r\\n\\t {\\r\\n\\t\\t var offset = {left : 0, top : 0};\\r\\n\\t\\t if(element)\\r\\n\\t     {\\r\\n\\t\\t\\t var maxX = element.scrollWidth - element.clientWidth;\\r\\n\\t         var maxY = element.scrollHeight - element.clientHeight;\\r\\n\\t\\t\\t offset = {left : maxX, top : maxY};\\r\\n\\t     }\\r\\n\\t\\t return offset;\\r\\n\\t };\\r\\n\\t \\r\\n\\t \\r\\n\\t NSUtil.prototype.addTemplateInContainer = function(container,templateID) \\r\\n\\t {\\r\\n\\t\\t if(container && templateID)\\r\\n\\t\\t {\\r\\n\\t\\t\\t var templateClone = this.getTemplate(templateID);\\r\\n\\t\\t\\t if(templateClone)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t container.appendChild(templateClone);\\r\\n\\t\\t\\t }\\r\\n\\t\\t }\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.getTemplate = function(templateID,doc) \\r\\n\\t {\\r\\n\\t\\t var templateClone = null;\\r\\n\\t\\t if(templateID)\\r\\n\\t\\t {\\r\\n\\t\\t\\t doc = this.getDoc(doc);\\r\\n\\t\\t\\t if(typeof templateID === \\\"string\\\")\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t var template = doc.getElementById(templateID);\\r\\n\\t\\t\\t\\t if(template)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t if(this.supportsTemplate())\\r\\n\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t templateClone = template.content.children[0]; //doc.importNode(template.content, true); \\r\\n\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t else\\r\\n\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t templateClone = template.cloneNode(true);\\r\\n\\t\\t\\t\\t\\t\\t template.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t else\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t templateClone = templateID.cloneNode(true);\\r\\n\\t\\t\\t }\\r\\n\\t\\t }\\r\\n\\t\\t return templateClone;\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.supportsTemplate = function(doc) \\r\\n\\t {\\r\\n\\t\\t doc = this.getDoc(doc);\\r\\n\\t\\t return (\\\"content\\\" in doc.createElement('template'));\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.getTemplateFromURL = function(url,callback,errorCallback,win) \\r\\n\\t {\\r\\n\\t\\t if(url)\\r\\n\\t\\t {\\r\\n\\t\\t\\twin = this.getWin(win);\\r\\n\\t\\t\\tvar xmlhttp;\\r\\n\\t\\t\\tif (win.XMLHttpRequest)\\r\\n\\t\\t\\t{// code for IE7+, Firefox, Chrome, Opera, Safari\\r\\n\\t\\t\\t\\txmlhttp = new XMLHttpRequest();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{// code for IE6, IE5\\r\\n\\t\\t\\t\\txmlhttp = new ActiveXObject(\\\"Microsoft.XMLHTTP\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\txmlhttp.onreadystatechange=function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t  if(xmlhttp.readyState === 4)\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  if (xmlhttp.status === 200) \\r\\n\\t\\t\\t\\t  {  \\r\\n\\t\\t\\t\\t\\t  if(callback)\\r\\n\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t  callback(xmlhttp.responseText);\\r\\n\\t\\t\\t\\t\\t  }\\r\\n\\t\\t\\t      } \\r\\n\\t\\t\\t\\t  else \\r\\n\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t  console.debug(\\\"Error loading Template from URL:: \\\" + url);\\r\\n\\t\\t\\t\\t\\t  if(errorCallback)\\r\\n\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t errorCallback(xmlhttp.statusText);\\r\\n\\t\\t\\t\\t\\t  }\\r\\n\\t\\t\\t      }  \\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\txmlhttp.open(\\\"GET\\\",url,true);\\r\\n\\t\\t\\txmlhttp.send();\\r\\n\\t\\t }\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.supportsImports = function(doc) \\r\\n\\t {\\r\\n\\t\\t doc = this.getDoc(doc);\\r\\n\\t\\t return (\\\"import\\\" in doc.createElement('link'));\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.removeAllChildren = function(element) \\r\\n\\t {\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar node = element;\\r\\n\\t\\t    while (element.hasChildNodes()) \\r\\n\\t\\t    {              \\r\\n\\t\\r\\n\\t\\t        if (node.hasChildNodes()) \\r\\n\\t\\t        {                \\r\\n\\t\\t            node = node.lastChild;                 \\r\\n\\t\\t        }\\r\\n\\t\\t        else \\r\\n\\t\\t        {                                     \\r\\n\\t\\t            node = node.parentNode;                \\r\\n\\t\\t            node.removeChild(node.lastChild);      \\r\\n\\t\\t        }\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.getScrollBarWidth = function(element,doc)\\r\\n\\t {\\r\\n\\t\\tdoc = this.getDoc(doc);\\r\\n\\t \\tvar scrollBarWidth = 0;\\r\\n\\t \\tif(element)\\r\\n\\t \\t{\\r\\n\\t \\t\\tscrollBarWidth = element.offsetWidth - element.clientWidth;\\r\\n\\t \\t}\\r\\n\\t \\telse\\r\\n\\t \\t{\\r\\n\\t \\t\\tvar divScroll = this.createDiv(null,\\\"nsGetScrollBar\\\");\\r\\n\\t \\t\\tvar divScrollChild = this.createDiv(null);\\r\\n\\t \\t\\tdivScroll.appendChild(divScrollChild);\\r\\n\\t        doc.body.appendChild(divScroll);\\r\\n\\t        var oldWidth = divScrollChild.getBoundingClientRect().width;\\r\\n\\t        divScrollChild.style.height = \\\"99px\\\";\\r\\n\\t        var newWidth = divScrollChild.getBoundingClientRect().width;\\r\\n\\t        scrollBarWidth = oldWidth - newWidth;\\r\\n\\t        doc.body.removeChild(divScroll);\\r\\n\\t \\t}\\r\\n\\t \\treturn scrollBarWidth;\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.getKeyUnicode = function(event) \\r\\n\\t {\\r\\n\\t\\t event = this.getEvent(event);\\r\\n\\t     var unicode=event.keyCode ? event.keyCode : event.charCode;\\r\\n\\t     return unicode;\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.getNumber = function(objNumber) \\r\\n\\t {\\r\\n\\t\\t objNumber = Number(objNumber);\\r\\n\\t\\t if(isNaN(objNumber))\\r\\n\\t\\t {\\r\\n\\t\\t\\t objNumber = 0;\\r\\n\\t\\t }\\r\\n\\t\\t return objNumber;\\r\\n\\t };\\r\\n\\t\\r\\n\\t NSUtil.prototype.getDimensionAsNumber = function(element,dimension)\\r\\n\\t {\\r\\n\\t \\tvar retValue = 0;\\r\\n\\t \\tvar dimensionUnit = this.getDimensionUnit(dimension);\\r\\n\\t\\tif(dimensionUnit === 1 && element && element.parentNode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdimension = dimension.substring(0,dimension.length - 1);\\r\\n\\t\\t\\tretValue = (dimension / 100) * element.parentNode.offsetHeight;\\r\\n\\t\\t}\\r\\n\\t\\telse if(dimensionUnit === 2)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = dimension.substring(0,dimension.length - 2);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = dimension;\\r\\n\\t\\t}\\r\\n\\t \\tif(retValue === \\\"\\\" || isNaN(retValue))\\r\\n\\t \\t{\\r\\n\\t \\t\\tretValue = 0;\\r\\n\\t \\t}\\r\\n\\t \\treturn parseInt(retValue);\\r\\n\\t };\\r\\n\\t \\r\\n\\t /*returns 0 if dimension has no unit\\r\\n\\t  returns 1 if dimension is in %\\r\\n\\t  returns 2 if dimension is in px \\r\\n\\t  returns -1 if dimension is not valid */ \\r\\n\\t NSUtil.prototype.getDimensionUnit = function(dimensionValue)\\r\\n\\t {\\r\\n\\t \\tvar retValue = -1;\\r\\n\\t \\tif(!this.isUndefined(dimensionValue) && dimensionValue != null )\\r\\n\\t \\t{\\r\\n\\t \\t\\tretValue = 0;\\r\\n\\t \\t\\tif(dimensionValue.toString().substring(dimensionValue.toString().length - 1) == \\\"%\\\")\\r\\n\\t \\t\\t{\\r\\n\\t \\t\\t\\tretValue = 1;\\r\\n\\t \\t\\t}\\r\\n\\t \\t\\telse if(dimensionValue.toString().substring(dimensionValue.toString().length - 2) == \\\"px\\\")\\r\\n\\t \\t\\t{\\r\\n\\t \\t\\t\\tretValue = 2;\\r\\n\\t \\t\\t}\\r\\n\\t \\t}\\r\\n\\t \\treturn retValue;\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.getCumulativeOffset = function(element,tillElement)\\r\\n\\t {\\r\\n\\t     var x = 0;\\r\\n\\t     var y = 0;\\r\\n\\t     var prevElement = null;\\r\\n\\t     var currentElement = (element.offsetHeight > 0) ? element : element.firstChild;\\r\\n\\t     while(currentElement && (!tillElement || (tillElement != prevElement)))\\r\\n\\t     {\\r\\n\\t         x += currentElement.offsetLeft;\\r\\n\\t         y += currentElement.offsetTop;\\r\\n\\t         prevElement = currentElement;\\r\\n\\t         currentElement = currentElement.offsetParent;\\r\\n\\t     }\\r\\n\\t     return { x: x, y: y };\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.round = function(num, decimalPlaces) \\r\\n\\t {\\r\\n\\t     return Math.round(num * Math.pow(10, decimalPlaces)) / Math.pow(10, decimalPlaces);\\r\\n\\t };\\r\\n\\t  \\r\\n\\t NSUtil.prototype.makeElementUnselectable = function(element,makeChildrenUnselectable)\\r\\n\\t {\\r\\n\\t\\t if(element)\\r\\n\\t\\t {\\r\\n\\t\\t\\t if (element.nodeType == 1) \\r\\n\\t\\t     {\\r\\n\\t\\t\\t\\t element.setAttribute(\\\"unselectable\\\", \\\"on\\\");\\r\\n\\t\\t     }\\r\\n\\t\\t\\t if(makeChildrenUnselectable)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t var childElement = element.firstChild;\\r\\n\\t\\t\\t     while (childElement) \\r\\n\\t\\t\\t     {\\r\\n\\t\\t\\t    \\t this.makeElementUnselectable(childElement,makeChildrenUnselectable);\\r\\n\\t\\t\\t         childElement = childElement.nextSibling;\\r\\n\\t\\t\\t     }\\r\\n\\t\\t\\t }\\r\\n\\t\\t }\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.makeBodyUnselectable = function(doc)\\r\\n\\t {\\r\\n\\t\\t doc = this.getDoc(doc);\\r\\n\\t\\t this.addStyleClass(doc.body,\\\"nsUnselectable\\\");\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSUtil.prototype.makeBodySelectable = function(doc)\\r\\n\\t {\\r\\n\\t\\t doc = this.getDoc(doc);\\r\\n\\t\\t this.removeStyleClass(doc.body,\\\"nsUnselectable\\\");\\r\\n\\t };\\r\\n\\t \\r\\n\\t\\r\\n\\tNSUtil.prototype.startsWith = function(sourceString,searchString,caseSensitive) \\r\\n\\t{\\r\\n\\t\\tif(!sourceString || !searchString)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\tif(caseSensitive)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn sourceString.length >= searchString.length && sourceString.substring(0, searchString.length) === searchString;\\r\\n\\t\\t}\\r\\n\\t\\treturn sourceString.length >= searchString.length && sourceString.substring(0, searchString.length).toLowerCase() === searchString.toLowerCase();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.endsWith = function(sourceString,searchString,caseSensitive) \\r\\n\\t{\\r\\n\\t\\tif(!sourceString || !searchString)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\tif(caseSensitive)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn sourceString.length >= searchString.length && sourceString.substring(sourceString.length - searchString.length,sourceString.length) === searchString;\\r\\n\\t\\t}\\r\\n\\t\\treturn sourceString.length >= searchString.length && sourceString.substring(sourceString.length - searchString.length,sourceString.length).toLowerCase() === searchString.toLowerCase();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.contains = function(sourceString,searchString,startIndex,caseSensitive) \\r\\n\\t{\\r\\n\\t\\tif(!sourceString || !searchString)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\tif(isNaN(startIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\tstartIndex = 0;\\r\\n\\t\\t}\\r\\n\\t\\tif(caseSensitive)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn sourceString.length >= searchString.length && ''.indexOf.call(sourceString, searchString, startIndex) !== -1;\\r\\n\\t\\t}\\r\\n\\t\\treturn sourceString.length >= searchString.length && ''.indexOf.call(sourceString.toLowerCase(), searchString.toLowerCase(), startIndex) !== -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.indexesOf = function(sourceString,charToFind) \\r\\n\\t{\\r\\n\\t\\tvar match = \\\"\\\";\\r\\n\\t    var arrIndexes = [] ;\\r\\n\\t\\tif(sourceString && charToFind)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar regex = new RegExp(charToFind,\\\"g\\\");\\r\\n\\t\\t\\twhile (match = regex.exec(sourceString)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrIndexes.push(match.index);\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t\\treturn arrIndexes;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.checkRegexValue = function(strRegex,value) \\r\\n\\t{\\r\\n\\t\\ttry\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar regex = new RegExp(strRegex,\\\"g\\\");\\r\\n\\t\\t    return regex.test(value);\\r\\n\\t\\t}\\r\\n\\t    catch(error)\\r\\n\\t    {\\r\\n\\t    \\tconsole.log(\\\"Invalid Regex with details::\\\" + error.message);\\r\\n\\t    }\\r\\n\\t    return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isValueNull = function(value) \\r\\n\\t{\\r\\n\\t\\tif(value === null || this.isUndefined(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\tvar nullValues = [\\\"null\\\"];\\r\\n\\t\\tvar len = nullValues.length;\\r\\n\\t\\tfor (var count = 0;count < len; count++)\\r\\n\\t\\t{\\r\\n\\t\\t    if (value === nullValues[count]) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\treturn true;\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//call when you want to wait for all the changes to complete\\r\\n\\tNSUtil.prototype.debounce = function(callback,timeout) \\r\\n\\t{\\r\\n\\t\\tvar timerID; \\r\\n\\t    var debounceHandler = function() \\r\\n\\t    {\\r\\n\\t    \\t//shallow copy\\r\\n\\t    \\tvar args = [];\\r\\n            for (var count = 0;count < arguments.length; count++) \\r\\n            {\\r\\n                args[count] = arguments[count];\\r\\n            }\\r\\n\\t        if (!timeout) \\r\\n\\t        {\\r\\n\\t        \\tcallback.apply(null,args);\\r\\n            }\\r\\n\\t        else\\r\\n\\t        {\\r\\n\\t        \\tclearTimeout(timerID);\\r\\n\\t\\t        timerID = setTimeout(function(){callback.apply(null, args)}, timeout);\\r\\n\\t        }\\r\\n\\t    };\\r\\n\\t    return debounceHandler;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//call when you want a function after certain interval\\r\\n\\tNSUtil.prototype.throttle  = function(callback,timeout) \\r\\n\\t{\\r\\n\\t\\tvar throttleTimeout = null;\\r\\n\\t\\tvar storedEvent = null;\\r\\n\\t\\tvar throttleHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tstoredEvent = event;\\r\\n\\t\\t\\tvar shouldHandleEvent = !throttleTimeout;\\r\\n\\t\\t    if(shouldHandleEvent) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar func = function()\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthrottleTimeout = null;\\r\\n\\t\\t    \\t\\tif(storedEvent) \\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\tthrottleHandler(storedEvent);\\r\\n\\t\\t    \\t\\t}\\r\\n\\t\\t    \\t};\\r\\n\\t\\t    \\tcallback(storedEvent);\\r\\n\\t\\t    \\tstoredEvent = null;\\r\\n\\t\\t    \\tthrottleTimeout = setTimeout(func,timeout);\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\treturn throttleHandler;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.highlightText = function(container,searchText,styleClass,doc) \\r\\n\\t{\\r\\n\\t\\tdoc = this.getDoc(doc);\\r\\n\\t\\tfunction innerHighlight(node,text,styleClass) \\r\\n\\t\\t{\\r\\n\\t\\t\\t  var skip = 0;\\r\\n\\t\\t\\t  if (node.nodeType == 3) \\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t   var position = node.data.toUpperCase().indexOf(text);\\r\\n\\t\\t\\t\\t   position -= (node.data.substr(0, position).toUpperCase().length - node.data.substr(0, position).length);\\r\\n\\t\\t\\t\\t   if (position >= 0) \\r\\n\\t\\t\\t\\t   {\\r\\n\\t\\t\\t\\t\\t\\tvar spannode = doc.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\t\\tspannode.className = styleClass;\\r\\n\\t\\t\\t\\t\\t\\tvar middlebit = node.splitText(position);\\r\\n\\t\\t\\t\\t\\t\\tvar endbit = middlebit.splitText(text.length);\\r\\n\\t\\t\\t\\t\\t\\tvar middleclone = middlebit.cloneNode(true);\\r\\n\\t\\t\\t\\t\\t\\tspannode.appendChild(middleclone);\\r\\n\\t\\t\\t\\t\\t\\tmiddlebit.parentNode.replaceChild(spannode, middlebit);\\r\\n\\t\\t\\t\\t\\t\\tskip = 1;\\r\\n\\t\\t\\t\\t   }\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  else if (node.nodeType == 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) \\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t   for (var count = 0; count < node.childNodes.length; ++count) \\r\\n\\t\\t\\t\\t   {\\r\\n\\t\\t\\t\\t\\t\\tcount += innerHighlight(node.childNodes[count], text,styleClass);\\r\\n\\t\\t\\t\\t   }\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  return skip;\\r\\n\\t\\t}\\r\\n\\t\\tif(container && searchText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!styleClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstyleClass = \\\"nsTextHighlight\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar util = new NSUtil();\\r\\n\\t\\t\\tif(util.isArray(searchText))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t for (var count = 0; count < searchText.length; count++) \\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t innerHighlight(container,searchText[count].toUpperCase(),styleClass);\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tinnerHighlight(container,searchText.toUpperCase(),styleClass);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.unHighlightText = function(container,styleClass) \\r\\n\\t{\\r\\n\\t\\tif(container)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!styleClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstyleClass = \\\"nsTextHighlight\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar arrHighlight = container.querySelectorAll(\\\"span.\\\" + styleClass); \\r\\n\\t\\t\\tif(arrHighlight && arrHighlight.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar elementHighlight = null;\\r\\n\\t\\t\\t\\tvar length = arrHighlight.length;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\telementHighlight = arrHighlight[count];\\r\\n\\t\\t\\t\\t\\tif(elementHighlight)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\telementHighlight.parentNode.replaceChild(elementHighlight.firstChild, elementHighlight);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t var falseExpression = /^(?:f(?:alse)?|no?|0+)$/i;\\r\\n\\t Boolean.parse = function(value) \\r\\n\\t { \\r\\n\\t    return !falseExpression.test(value) && !!value;\\r\\n\\t };\\r\\n\\t\\r\\n\\t//Defining the indexOf function (before you call it!) if it doesn't exist taken from MDN (for Internet Explorer 8 and below)\\r\\n\\tif (!Array.prototype.indexOf)\\r\\n\\t{\\r\\n\\t   Array.prototype.indexOf = function (searchElement /*, fromIndex */ )\\r\\n\\t   {\\r\\n\\t     'use strict';\\r\\n\\t     if (this == null)\\r\\n\\t     {\\r\\n\\t       throw new TypeError();\\r\\n\\t     }\\r\\n\\t     var n, k, t = Object(this),\\r\\n\\t         len = t.length >>> 0;\\r\\n\\t     if (len === 0)\\r\\n\\t     {\\r\\n\\t       return -1;\\r\\n\\t     }\\r\\n\\t     n = 0;\\r\\n\\t     if (arguments.length > 1) \\r\\n\\t     {\\r\\n\\t       n = Number(arguments[1]);\\r\\n\\t       if (n != n)\\r\\n\\t       { // shortcut for verifying if it's NaN\\r\\n\\t         n = 0;\\r\\n\\t       }\\r\\n\\t       else if (n != 0 && n != Infinity && n != -Infinity)\\r\\n\\t       {\\r\\n\\t         n = (n > 0 || -1) * Math.floor(Math.abs(n));\\r\\n\\t       }\\r\\n\\t     }\\r\\n\\t     if (n >= len)\\r\\n\\t     {\\r\\n\\t       return -1;\\r\\n\\t     }\\r\\n\\t     for (k = n >= 0 ? n : Math.max(len - Math.abs(n), 0); k < len; k++)\\r\\n\\t     {\\r\\n\\t       if (k in t && t[k] === searchElement)\\r\\n\\t       {\\r\\n\\t         return k;\\r\\n\\t       }\\r\\n\\t     }\\r\\n\\t     return -1;\\r\\n\\t   };\\r\\n\\t}\\r\\n\\t\\r\\n\\t//JavaScript Array filter\\r\\n\\tif (!Array.prototype.filter) \\r\\n\\t{\\r\\n\\t    Array.prototype.filter = function(fun /*, thisp*/) \\r\\n\\t    {\\r\\n\\t        var len = this.length >>> 0;\\r\\n\\t        if (typeof fun != \\\"function\\\") \\r\\n\\t        {\\r\\n\\t            throw new TypeError();\\r\\n\\t        }\\r\\n\\t        var res = [];\\r\\n\\t        var thisp = arguments[1];\\r\\n\\t        for (var count = 0; count < len; count++) \\r\\n\\t        {\\r\\n\\t            if (count in this) \\r\\n\\t            {\\r\\n\\t                var val = this[count]; // in case fun mutates this\\r\\n\\t                if (fun.call(thisp, val, count, this)) \\r\\n\\t                {\\r\\n\\t                    res.push(val);\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t\\r\\n\\t        return res;\\r\\n\\t    };\\r\\n\\t}\\r\\n\\t\\r\\n\\tif (!String.prototype.replaceAll) \\r\\n\\t{\\r\\n\\t\\tString.prototype.replaceAll = function(character,replaceChar)\\r\\n\\t\\t{\\r\\n\\t\\t    var word = this.valueOf();\\r\\n\\t\\t    while(word.indexOf(character) != -1)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tword = word.replace(character,replaceChar);\\r\\n\\t\\t    }\\r\\n\\t\\t    return word;\\r\\n\\t\\t};\\r\\n\\t}\\r\\n\\t\\r\\n\\tif (!HTMLTableRowElement.prototype.update) \\r\\n\\t{\\r\\n\\t\\tHTMLTableRowElement.prototype.update = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar util = new NSUtil();\\r\\n\\t\\t\\tvar grid = util.findParent(this,\\\"ns-grid\\\");\\r\\n\\t\\t\\tif(grid)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tgrid.updateRow(parseInt(this.getAttribute(\\\"index\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t}\\r\\n\\t\\r\\n\\t//From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys\\r\\n\\tif (!Object.keys) \\r\\n\\t{\\r\\n\\t  Object.keys = (function() {\\r\\n\\t    'use strict';\\r\\n\\t    var hasOwnProperty = Object.prototype.hasOwnProperty,\\r\\n\\t        hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),\\r\\n\\t        dontEnums = [\\r\\n\\t          'toString',\\r\\n\\t          'toLocaleString',\\r\\n\\t          'valueOf',\\r\\n\\t          'hasOwnProperty',\\r\\n\\t          'isPrototypeOf',\\r\\n\\t          'propertyIsEnumerable',\\r\\n\\t          'constructor'\\r\\n\\t        ],\\r\\n\\t        dontEnumsLength = dontEnums.length;\\r\\n\\t\\r\\n\\t    return function(obj) {\\r\\n\\t      if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {\\r\\n\\t        throw new TypeError('Object.keys called on non-object');\\r\\n\\t      }\\r\\n\\t\\r\\n\\t      var result = [];\\r\\n\\t\\r\\n\\t      for (var prop in obj) {\\r\\n\\t        if (hasOwnProperty.call(obj, prop)) {\\r\\n\\t          result.push(prop);\\r\\n\\t        }\\r\\n\\t      }\\r\\n\\t\\r\\n\\t      if (hasDontEnumBug) {\\r\\n\\t        for (var i = 0; i < dontEnumsLength; i++) {\\r\\n\\t          if (hasOwnProperty.call(obj, dontEnums[i])) {\\r\\n\\t            result.push(dontEnums[i]);\\r\\n\\t          }\\r\\n\\t        }\\r\\n\\t      }\\r\\n\\t      return result;\\r\\n\\t    };\\r\\n\\t  }());\\r\\n\\t}\\r\\n\\t\\r\\n\\t//https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\\r\\n\\tif (!Array.prototype.find) \\r\\n\\t{\\r\\n\\t\\t  Array.prototype.find = function(predicate) \\r\\n\\t\\t  {\\r\\n\\t\\t    if (this === null) {\\r\\n\\t\\t      throw new TypeError('Array.prototype.find called on null or undefined');\\r\\n\\t\\t    }\\r\\n\\t\\t    if (typeof predicate !== 'function') {\\r\\n\\t\\t      throw new TypeError('predicate must be a function');\\r\\n\\t\\t    }\\r\\n\\t\\t    var list = Object(this);\\r\\n\\t\\t    var length = list.length >>> 0;\\r\\n\\t\\t    var thisArg = arguments[1];\\r\\n\\t\\t    var value;\\r\\n\\t\\t\\r\\n\\t\\t    for (var i = 0; i < length; i++) {\\r\\n\\t\\t      value = list[i];\\r\\n\\t\\t      if (predicate.call(thisArg, value, i, list)) {\\r\\n\\t\\t        return value;\\r\\n\\t\\t      }\\r\\n\\t\\t    }\\r\\n\\t\\t    return undefined;\\r\\n\\t\\t  };\\r\\n\\t}\\r\\n\\t\\r\\n\\t//https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex\\r\\n\\tif (!Array.prototype.findIndex) \\r\\n\\t{\\r\\n\\t\\t  Array.prototype.findIndex = function(predicate) {\\r\\n\\t\\t    if (this === null) {\\r\\n\\t\\t      throw new TypeError('Array.prototype.findIndex called on null or undefined');\\r\\n\\t\\t    }\\r\\n\\t\\t    if (typeof predicate !== 'function') {\\r\\n\\t\\t      throw new TypeError('predicate must be a function');\\r\\n\\t\\t    }\\r\\n\\t\\t    var list = Object(this);\\r\\n\\t\\t    var length = list.length >>> 0;\\r\\n\\t\\t    var thisArg = arguments[1];\\r\\n\\t\\t    var value;\\r\\n\\t\\r\\n\\t\\t    for (var i = 0; i < length; i++) {\\r\\n\\t\\t      value = list[i];\\r\\n\\t\\t      if (predicate.call(thisArg, value, i, list)) {\\r\\n\\t\\t        return i;\\r\\n\\t\\t      }\\r\\n\\t\\t    }\\r\\n\\t\\t    return -1;\\r\\n\\t\\t  };\\r\\n\\t}\\r\\n\\t\\r\\n\\tif (!Array.from) \\r\\n\\t{\\r\\n\\t    Array.from = function (object) \\r\\n\\t    {\\r\\n\\t        return [].slice.call(object);\\r\\n\\t    };\\r\\n\\t}\\r\\n\\t\\r\\n\\tif (!String.prototype.format) \\r\\n\\t{\\r\\n\\t\\tString.prototype.format = function()\\r\\n\\t\\t{\\r\\n\\t\\t   var content = this;\\r\\n\\t\\t   for (var i=0; i < arguments.length; i++)\\r\\n\\t\\t   {\\r\\n\\t\\t        var replacement = '{' + (i + 1) + '}';\\r\\n\\t\\t        content = content.replace(replacement, arguments[i]);  \\r\\n\\t\\t   }\\r\\n\\t\\t   return content;\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSUtil.prototype.defaultRenderer = function(doc)\\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tdoc = this.util.getDoc(doc);\\r\\n\\t\\tthis.divItemRenderer = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.getRenderer = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.divItemRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__createComponents();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn this.divItemRenderer;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.setData = function(renderer,item,labelField)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(renderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(item && item[labelField])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trenderer.rendererBody.rendererLabel.innerHTML = item[labelField];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.clearData(renderer);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.clearData = function(renderer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(renderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trenderer.rendererBody.rendererLabel.innerHTML = \\\"\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createComponents = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.divItemRenderer = this.util.createDiv(null,\\\"nsListRenderer\\\"); \\r\\n\\t\\t\\t//this.divItemRenderer.style.height = 20 + \\\"px\\\";\\r\\n\\t\\t\\tthis.divItemRenderer.style.padding = 1 + \\\"px\\\";\\r\\n\\t\\t\\tthis.divItemRenderer.setAttribute(\\\"accessor-name\\\",\\\"rendererBody\\\"); \\r\\n\\t\\t\\tvar lblItemRenderer = doc.createElement(\\\"LABEL\\\");\\r\\n\\t\\t\\tlblItemRenderer.setAttribute(\\\"accessor-name\\\",\\\"rendererLabel\\\");\\r\\n\\t\\t\\tthis.divItemRenderer.appendChild(lblItemRenderer);\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.fadeIn = function(element,displayType,callback,win)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\twin = this.getWin(win);\\r\\n\\t\\t\\tvar util = this;\\r\\n\\t\\t\\telement.style.opacity = 0;\\r\\n\\t\\t\\telement.style.display = displayType || \\\"block\\\";\\r\\n\\t\\t\\t(function fade() \\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t    var value = parseFloat(element.style.opacity);\\r\\n\\t\\t\\t    if (!((value += .1) > 1)) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\telement.style.opacity = value;\\r\\n\\t\\t\\t    \\tutil.getRequestAnimationFrame.bind(win)(fade.bind(util));\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    else\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tif(callback)\\r\\n\\t\\t\\t      \\t{\\r\\n\\t\\t\\t    \\t\\tcallback(element);\\r\\n\\t\\t\\t      \\t}\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t })();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.fadeOut = function(element,callback,win)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar util = this;\\r\\n\\t\\t\\twin = this.getWin(win);\\r\\n\\t\\t\\telement.style.opacity = 1;\\r\\n\\t\\t\\t(function fade() \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    if((element.style.opacity -= .1) < 0) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t      element.style.display = \\\"none\\\";\\r\\n\\t\\t\\t      if(callback)\\r\\n\\t\\t\\t      {\\r\\n\\t\\t\\t    \\t  callback(element);\\r\\n\\t\\t\\t      }\\r\\n\\t\\t\\t    } \\r\\n\\t\\t\\t    else \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tutil.getRequestAnimationFrame.bind(win)(fade.bind(util));\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t})();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.addAnimatedLineOnHover = function(element,config)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!config)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar setting = {\\r\\n\\t\\t\\t\\t\\tlineWidth : (config.lineWidth) ? config.lineWidth : element.offsetWidth,\\r\\n\\t\\t\\t\\t\\tlineHeight : (config.lineHeight) ? config.lineHeight : 5,\\r\\n\\t\\t\\t\\t\\tlineColor : (config.lineColor) ? config.lineColor : \\\"black\\\",\\r\\n\\t\\t\\t\\t\\toffsetX : (config.offsetX) ? config.offsetX : 0,\\r\\n\\t\\t\\t\\t\\toffsetY : (config.offsetY) ? config.offsetY : 0,\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar offset = this.getCumulativeOffset(element);\\r\\n\\t\\t\\tvar id = element.getAttribute(\\\"id\\\");\\r\\n\\t\\t\\tif(!id)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tid = this.getUniqueId();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar styleName = \\\"ns\\\" + id + \\\"line\\\";\\r\\n\\t\\t\\tthis.addCSSClassInDOM([\\\".\\\" + styleName + \\\":after\\\"],[\\\"content: '';position: absolute;height: \\\" + setting.lineHeight + \\\"px;width: 0%;left: \\\" + (offset.x + setting.offsetX) + \\\"px;\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t \\\"top: \\\" + (offset.y + element.offsetHeight + setting.offsetY) + \\\"px;\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t \\\"background-color: \\\" + setting.lineColor + \\\";-webkit-transition: width 200ms ease-in;transition: width 200ms ease-in;\\\"]);\\r\\n\\t\\t\\tthis.addCSSClassInDOM([\\\".\\\" + styleName + \\\":hover:after\\\"],[\\\"width:\\\" + setting.lineWidth + \\\"px;\\\"]);\\r\\n\\t\\t\\tthis.addStyleClass(element,styleName);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getTextBetweenSymbol = function(strText,startSymbol,endSymbol)\\r\\n\\t{\\r\\n\\t\\tvar arrReturn = null;\\r\\n\\t\\tif(strText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!startSymbol)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstartSymbol = \\\"{{\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!endSymbol)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tendSymbol = \\\"}}\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar regexString = \\\"\\\\\\\\\\\" + startSymbol + \\\"([^\\\" + endSymbol + \\\"]+)\\\\\\\\\\\" + endSymbol;\\r\\n\\t\\t\\tvar regex = new RegExp(regexString,\\\"g\\\");\\r\\n\\t\\t\\tvar arrMatches = strText.match(regex);\\r\\n\\t\\t\\tif(arrMatches && arrMatches.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrReturn = [];\\r\\n\\t\\t\\t\\tvar length = arrMatches.length;\\r\\n\\t\\t\\t\\tvar subStrLength = startSymbol.length;\\r\\n\\t\\t\\t\\tfor (var count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t    var match = arrMatches[count];\\r\\n\\t\\t\\t\\t    arrReturn.push(match.substring(subStrLength,match.length - subStrLength));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn arrReturn;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isBinary = function(str) \\r\\n\\t{\\r\\n\\t\\tvar isBuffer = (typeof Buffer == 'undefined')? false : Buffer.isBuffer(str);\\r\\n\\t\\tfor (var count = 0;count < 24;count++) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar charCode = isBuffer ? str[count] : str.charCodeAt(count);\\r\\n\\t\\t\\tif (charCode === 65533 || charCode <= 8) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.resolveFunctionOrPromise = function(obj,callback)\\r\\n\\t{\\r\\n\\t\\tif(obj)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//if(Object.prototype.toString.call(obj) === \\\"[object Promise]\\\")\\r\\n\\t\\t\\tif (obj instanceof Promise && typeof obj.then === 'function')\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobj.then(function(objRef){\\r\\n\\t\\t\\t\\t\\tcallback.apply(null,[objRef]);\\r\\n                });\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcallback.apply(null,[obj]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tcallback();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//from https://github.com/sindresorhus/is-svg/blob/master/index.js\\r\\n\\tNSUtil.prototype.isSVGString = function(str) \\r\\n\\t{\\r\\n\\t\\tif(str)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cleanEntities = function(svg)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar entityRegex = /\\\\s*<!Entity\\\\s+\\\\S*\\\\s*(?:\\\"|')[^\\\"]+(?:\\\"|')\\\\s*>/img;\\r\\n\\t\\t\\t\\treturn svg.replace(entityRegex, '');\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar commentRegex = /<!--([\\\\s\\\\S]*?)-->/g;\\r\\n\\t\\t\\tvar regex = /^\\\\s*(?:<\\\\?xml[^>]*>\\\\s*)?(?:<!doctype svg[^>]*\\\\s*(?:\\\\[?(?:\\\\s*<![^>]*>\\\\s*)*\\\\]?)*[^>]*>\\\\s*)?(?:<svg[^>]*>[^]*<\\\\/svg>|<svg[^/>]*\\\\/\\\\s*>)\\\\s*$/i;\\r\\n\\t\\t\\tvar isSvg = Boolean(str) && !this.isBinary(str) && regex.test(cleanEntities(str.toString()).replace(commentRegex,\\\"\\\"));\\r\\n\\t\\t\\treturn isSvg;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.isBase64String = function(str) \\r\\n\\t{\\r\\n\\t\\tif(str)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar regex = /^\\\\s*data:([a-z]+\\\\/[a-z]+(;[a-z\\\\-]+\\\\=[a-z\\\\-]+)?)?(;base64)?,[a-z0-9\\\\!\\\\$\\\\&\\\\'\\\\,\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=\\\\-\\\\.\\\\_\\\\~\\\\:\\\\@\\\\/\\\\?\\\\%\\\\s]*\\\\s*$/i;\\r\\n\\t\\t\\treturn !!str.match(regex);\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.convertSvgToBase64 = function(svgText,callback,doc) \\r\\n\\t{\\r\\n\\t   if(svgText)\\r\\n\\t   {\\r\\n\\t\\t   doc = this.getDoc(doc);\\r\\n\\t\\t   var svg = null;\\r\\n\\t\\t   if(svgText instanceof SVGElement) \\r\\n\\t\\t   {\\r\\n\\t\\t\\t   svg = svgText;\\r\\n\\t\\t   }\\r\\n\\t\\t   else\\r\\n\\t\\t   {\\r\\n\\t\\t\\t   var span = doc.createElement(\\\"span\\\");\\r\\n\\t\\t\\t   span.innerHTML = svgText;\\r\\n\\t\\t\\t   doc.body.appendChild(span);\\r\\n\\t\\t\\t   svg = span.children[0];\\r\\n\\t\\t\\t   doc.body.removeChild(span);\\r\\n\\t\\t   }\\r\\n\\t\\t   var canvas = doc.createElement(\\\"canvas\\\");\\r\\n\\t\\t   canvas.width = svg.getBoundingClientRect().width;\\r\\n\\t       canvas.height = svg.getBoundingClientRect().height;\\r\\n\\t       doc.body.appendChild(canvas);\\r\\n\\t       var svgXml = (new XMLSerializer()).serializeToString(svg);\\r\\n\\t       var ctx = canvas.getContext('2d');\\r\\n\\t       var img = new Image();\\r\\n\\t       img.onload = function() \\r\\n\\t       {\\r\\n\\t            ctx.drawImage(img, 0, 0);\\r\\n\\t       };\\r\\n\\t       img.src = 'data:image/svg+xml;base64,' + btoa(svgXml);\\r\\n\\t       var base64 = img.src;\\r\\n\\t       //to handle the callback inside onload of img\\r\\n\\t       if(callback)\\r\\n\\t       {\\r\\n\\t    \\t   callback(base64);\\r\\n\\t       }\\r\\n\\t       doc.body.removeChild(canvas);\\r\\n\\t\\t   return base64;\\r\\n\\t   }\\r\\n\\t   return null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.convertImageToBase64 = function(src,forceCloneImg,crossOrigin,doc) \\r\\n\\t{\\r\\n\\t\\tif(src)\\r\\n\\t\\t{\\r\\n\\t\\t   doc = this.getDoc(doc);\\r\\n\\t\\t   var img = null;\\r\\n\\t\\t   var origImg = null;\\r\\n\\t\\t   var isAdded = false;\\r\\n\\t\\t   var dataURL = null;\\r\\n\\t\\t   if(this.isElement(src) && this.isElementOfType(src,\\\"img\\\") && !forceCloneImg) \\r\\n\\t\\t   {\\r\\n\\t\\t\\t   img = src;\\r\\n\\t\\t   }\\r\\n\\t\\t   else\\r\\n\\t\\t   {\\r\\n\\t\\t\\t   if(this.isElement(src) && this.isElementOfType(src,\\\"img\\\") && forceCloneImg) \\r\\n\\t\\t\\t   {\\r\\n\\t\\t\\t\\t   origImg = src;\\r\\n\\t\\t\\t\\t   crossOrigin = (this.isUndefinedOrNull(crossOrigin) && origImg.hasAttribute(\\\"crossOrigin\\\")) ? origImg.getAttribute(\\\"crossOrigin\\\") : null;\\r\\n\\t\\t\\t\\t   src = origImg.getAttribute(\\\"src\\\");\\r\\n\\t\\t\\t   }\\r\\n\\t\\t\\t   img = doc.createElement(\\\"img\\\");\\r\\n\\t\\t\\t   this.css(img,{position: \\\"absolute\\\",left: \\\"-9999px\\\",top: \\\"-9999px\\\"});\\r\\n\\t\\t\\t   img.setAttribute(\\\"src\\\", src);\\r\\n\\t\\t\\t   if(crossOrigin)\\r\\n\\t\\t\\t   {\\r\\n\\t\\t\\t\\t   img.setAttribute(\\\"crossOrigin\\\",crossOrigin);\\r\\n\\t\\t\\t   }\\r\\n\\t\\t\\t   doc.body.appendChild(img);\\r\\n\\t\\t\\t   isAdded = true;\\r\\n\\t\\t   }\\r\\n\\t\\t   var self = this;\\r\\n\\t\\t   var objPromise = new Promise(function(resolve,reject)\\r\\n\\t\\t   {\\r\\n\\t\\t\\t   var callCallback = function()\\r\\n\\t\\t\\t   {\\r\\n\\t\\t\\t\\t   var canvas = doc.createElement(\\\"canvas\\\");\\r\\n\\t\\t\\t\\t   canvas.width = (origImg && origImg.width) ? origImg.width : img.width;\\r\\n\\t\\t\\t       canvas.height = (origImg && origImg.height) ? origImg.height :img.height;\\r\\n\\t\\t\\t       doc.body.appendChild(canvas);\\r\\n\\t\\t\\t       var ctx = canvas.getContext('2d');\\r\\n\\t\\t\\t       ctx.clearRect(0, 0, canvas.width, canvas.height);\\r\\n\\t\\t\\t       ctx.drawImage(img, 0, 0);\\r\\n\\t\\t\\t       var hasError = false;\\r\\n\\t\\t\\t       var errorDetails = null;\\r\\n\\t\\t\\t       //mainly for Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.\\r\\n\\t\\t\\t       try\\r\\n\\t\\t\\t       {\\r\\n\\t\\t\\t    \\t   dataURL = canvas.toDataURL();\\r\\n\\t\\t\\t       }\\r\\n\\t\\t\\t       catch(error)\\r\\n\\t\\t\\t       {\\r\\n\\t\\t\\t    \\t   hasError = true;\\r\\n\\t\\t\\t    \\t   errorDetails = error;\\r\\n\\t\\t\\t       }\\r\\n\\t\\t\\t\\t   doc.body.removeChild(canvas);\\r\\n\\t\\t\\t\\t   if(dataURL != \\\"data:,\\\" || hasError)\\r\\n\\t\\t\\t\\t   {\\r\\n\\t\\t\\t\\t       if(isAdded)\\r\\n\\t\\t\\t\\t       {\\r\\n\\t\\t\\t\\t    \\t   if(img && img.parentNode)\\r\\n\\t\\t\\t\\t\\t       {\\r\\n\\t\\t\\t\\t    \\t\\t   img.parentNode.removeChild(img);\\r\\n\\t\\t\\t\\t\\t       }\\r\\n\\t\\t\\t\\t       }\\r\\n\\t\\t\\t\\t       resolve({base64:dataURL,param:src,hasError: hasError,errorDetails: errorDetails});\\r\\n\\t\\t\\t\\t   }\\r\\n\\t\\t\\t   };\\r\\n\\t\\t\\t   img.onload = function() \\r\\n\\t\\t       {\\r\\n\\t\\t\\t\\t   callCallback();\\r\\n\\t\\t       };\\r\\n\\t\\t       callCallback();\\r\\n\\t\\t   });\\r\\n\\t\\t   return objPromise;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\t//Converts rgba text representation of color in hex\\r\\n\\tNSUtil.prototype.colorToHex = function (color)\\r\\n\\t{\\r\\n\\t\\tif (color === 'rgba(0, 0, 0, 0)' || color == '') \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t}\\r\\n\\t\\tif (!color) \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn '#000000';\\r\\n\\t\\t}\\r\\n\\t\\tif (color.substr(0, 1) === '#') \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn color;\\r\\n\\t\\t}\\r\\n\\t\\tvar digits = /([\\\\s\\\\n\\\\t\\\\r]*?)rgb\\\\((\\\\d+), (\\\\d+), (\\\\d+)\\\\)/.exec(color) || /([\\\\s\\\\n\\\\t\\\\r]*?)rgba\\\\((\\\\d+), (\\\\d+), (\\\\d+), ([\\\\d.]+)\\\\)/.exec(color);\\r\\n\\t\\tif (!digits) \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn '#000000';\\r\\n\\t\\t}\\r\\n\\t\\tvar red = parseInt(digits[2],10);\\r\\n\\t\\tvar green = parseInt(digits[3],10);\\r\\n\\t\\tvar blue = parseInt(digits[4],10);\\r\\n\\t\\tvar rgb = blue | (green << 8) | (red << 16);\\r\\n\\t\\tvar hex = rgb.toString(16).toUpperCase();\\r\\n\\t\\twhile (hex.length < 6) \\r\\n\\t\\t{\\r\\n\\t\\t\\thex = '0' + hex;\\r\\n\\t\\t}\\r\\n\\t\\treturn digits[1] + '#' + hex;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.groupCollection = function(dataSource,setting)\\r\\n\\t{\\r\\n\\t\\tthis.__dataSource = dataSource;\\r\\n\\t\\tthis.__util = new NSUtil();\\r\\n\\t\\tthis.__childField = null;\\r\\n\\t\\tthis.__parentLevelIndicatorField = null;\\r\\n\\t\\tthis.__isSingleLevel = true;\\r\\n\\t\\tthis.__groupField = null;\\r\\n\\t\\tthis.__childrenCountField = null;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__childField = setting[\\\"childField\\\"];\\r\\n\\t\\t\\tthis.__parentLevelIndicatorField = setting[\\\"parentLevelIndicatorField\\\"];\\r\\n\\t\\t\\tthis.__isSingleLevel = setting[\\\"isSingleLevel\\\"];\\r\\n\\t\\t\\tthis.__groupField = setting[\\\"groupField\\\"];\\r\\n\\t\\t\\tthis.__childrenCountField = setting[\\\"childrenCountField\\\"];\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__childField)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__childField = \\\"children\\\";\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__parentLevelIndicatorField)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__parentLevelIndicatorField = \\\"ns-IsParent\\\";\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__util.isUndefined(this.__isSingleLevel))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isSingleLevel = true;\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__groupField)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__groupField = \\\"nsGroup\\\";\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__childrenCountField)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__childrenCountField = \\\"nsChildrenCountField\\\";\\r\\n\\t\\t}\\r\\n\\t\\tthis.groupBy = function(arrGroupField)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrResult = this.__dataSource;\\r\\n\\t  \\t    if(arrGroupField && arrGroupField.length > 0)\\r\\n\\t  \\t    {\\r\\n\\t  \\t    \\tif(this.__isSingleLevel)\\r\\n\\t  \\t    \\t{\\r\\n\\t  \\t    \\t\\tarrResult = this.__groupByFieldOnSingleLevel(this.__dataSource,arrGroupField);\\r\\n\\t  \\t    \\t}\\r\\n\\t  \\t    \\telse\\r\\n\\t  \\t    \\t{\\r\\n\\t  \\t    \\t\\tarrResult = this.__groupByFieldOnMultiLevel(this.__dataSource,arrGroupField);\\r\\n\\t  \\t    \\t}\\r\\n\\t  \\t    \\t\\r\\n\\t  \\t    }\\r\\n\\t  \\t    return arrResult;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__groupByFieldOnSingleLevel = function(list,arrGroupField)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar groups = {};\\r\\n\\t\\t\\tif(list)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (var count = 0; count < list.length; count++) \\r\\n\\t\\t  \\t    {\\r\\n\\t\\t  \\t    \\tvar item = list[count];\\r\\n\\t\\t  \\t    \\tvar arrItems = this.__getGroupItemValues(item,arrGroupField);\\r\\n\\t\\t  \\t        var group = JSON.stringify(arrItems);\\r\\n\\t\\t  \\t        if (group in groups) \\r\\n\\t\\t  \\t        {\\r\\n\\t\\t  \\t            groups[group][this.__childField].push(item); \\r\\n\\t\\t  \\t        } \\r\\n\\t\\t  \\t        else \\r\\n\\t\\t  \\t        {\\r\\n\\t\\t  \\t        \\tvar objEmpty = this.__createEmptyItem(list[count]);\\r\\n\\t\\t  \\t        \\tobjEmpty[this.__parentLevelIndicatorField] = true;\\r\\n\\t\\t  \\t        \\tfor(var fieldCount = 0;fieldCount < arrGroupField.length;fieldCount++)\\r\\n\\t\\t  \\t    \\t\\t{\\r\\n\\t\\t  \\t        \\t\\tvar fieldName = arrGroupField[fieldCount];\\r\\n\\t\\t  \\t        \\t\\tobjEmpty[fieldName] = item[fieldName];\\r\\n\\t\\t  \\t    \\t\\t}\\r\\n\\t\\t  \\t        \\tobjEmpty[this.__childField] = [];\\r\\n\\t\\t  \\t        \\tobjEmpty[this.__childField].push(item); \\r\\n\\t\\t  \\t            groups[group] = objEmpty;\\r\\n\\t\\t  \\t        }\\r\\n\\t\\t  \\t    }\\r\\n\\t\\t\\t}\\r\\n\\t  \\t    return this.__arrayFromObject(groups);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getGroupItemValues = function(item,arrGroupField)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrResult = [];\\r\\n\\t\\t\\tif(item && arrGroupField && arrGroupField.length > 0)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tfor(var count = 0;count < arrGroupField.length;count++)\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tvar fieldValue = item[arrGroupField[count]];\\r\\n\\t    \\t\\t\\tif(!this.__util.isUndefined(fieldValue) && fieldValue != null)\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tarrResult.push(fieldValue);\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t}\\r\\n\\t\\t\\treturn arrResult;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__groupByFieldOnMultiLevel = function(list,arrGroupField)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrSource = list;\\r\\n\\t\\t\\tfor(var fieldCount = 0;fieldCount < arrGroupField.length;fieldCount++)\\r\\n\\t  \\t\\t{\\r\\n\\t      \\t\\tvar fieldName = arrGroupField[fieldCount];\\r\\n\\t      \\t\\tarrSource = this.__groupByField(arrSource,fieldName);\\r\\n\\t  \\t\\t}\\r\\n\\t\\t\\treturn arrSource;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__groupByField = function(source,field)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\tif(source && field)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar groups = {};\\r\\n\\t\\t\\t\\tfor (var count = 0; count < source.length; count++) \\r\\n\\t\\t  \\t    {\\r\\n\\t\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\t\\tif(item.hasOwnProperty(this.__childField) && item[this.__childField].length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrChildren = this.__groupByField(item[this.__childField],field);\\r\\n\\t\\t\\t\\t\\t\\tif(arrChildren && arrChildren.length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\titem[this.__childField] = arrChildren;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar group = item[field];\\r\\n\\t\\t\\t\\t\\t\\tif (group in groups) \\r\\n\\t\\t\\t  \\t        {\\r\\n\\t\\t\\t  \\t            groups[group][this.__childField].push(item); \\r\\n\\t\\t\\t  \\t            groups[group][this.__childrenCountField] += 1;\\r\\n\\t\\t\\t  \\t        } \\r\\n\\t\\t\\t  \\t        else \\r\\n\\t\\t\\t  \\t        {\\r\\n\\t\\t\\t  \\t        \\tvar objEmpty = this.__createEmptyItem(item);\\r\\n\\t\\t\\t  \\t        \\tobjEmpty[this.__parentLevelIndicatorField] = true;\\r\\n\\t\\t\\t  \\t        \\tobjEmpty[field] = item[field];\\r\\n\\t\\t\\t  \\t        \\tobjEmpty[this.__groupField] = item[field];\\r\\n\\t\\t\\t  \\t        \\tobjEmpty[this.__childField] = [];\\r\\n\\t\\t\\t  \\t        \\tobjEmpty[this.__childField].push(item);\\r\\n\\t\\t\\t  \\t        \\tobjEmpty[this.__childrenCountField] = 1;\\r\\n\\t\\t\\t  \\t            groups[group] = objEmpty;\\r\\n\\t\\t\\t  \\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t  \\t    }\\r\\n\\t\\t\\t\\tif(groups)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrChild = this.__arrayFromObject(groups);\\r\\n\\t\\t\\t\\t\\tif(arrChild && arrChild.length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tfor (var childCount = 0; childCount < arrChild.length; childCount++) \\r\\n\\t\\t\\t\\t  \\t    {\\r\\n\\t\\t\\t\\t\\t\\t\\tarrReturn.push(arrChild[childCount]);\\r\\n\\t\\t\\t\\t  \\t    }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrReturn;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__arrayFromObject = function(objArr)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arr = [];\\r\\n\\t\\t\\tif(objArr)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (var count in objArr) \\r\\n\\t\\t  \\t    {\\r\\n\\t\\t  \\t        arr.push(objArr[count]);\\r\\n\\t\\t  \\t    }\\r\\n\\t\\t\\t}\\r\\n\\t  \\t    return arr;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createEmptyItem = function(objSource)\\r\\n\\t  \\t{\\r\\n\\t  \\t\\tvar objCopy = {};\\r\\n\\t  \\t\\tif (objSource instanceof Object) \\r\\n\\t  \\t\\t{\\r\\n\\t  \\t        for (var attr in objSource) \\r\\n\\t  \\t        {\\r\\n\\t  \\t            if (objSource.hasOwnProperty(attr))\\r\\n\\t  \\t            {\\r\\n\\t  \\t            \\tobjCopy[attr] = null;\\r\\n\\t  \\t            }\\r\\n\\t  \\t        }\\r\\n\\t  \\t    }\\r\\n\\t  \\t\\treturn objCopy;\\r\\n\\t  \\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\t/** Explaination http://javascript.info/tutorial/animation of animation .. not the code **/\\r\\n\\tNSUtil.prototype.animation = function(element,arrOptions,win)\\r\\n\\t{\\r\\n\\t\\tthis.__element = element;\\r\\n\\t\\tthis.__arrOptions = arrOptions;\\r\\n\\t\\tthis.__util = new NSUtil();\\r\\n\\t\\tthis.win = this.__util.getWin(win);\\r\\n\\t\\t\\r\\n\\t\\tthis.__duration = 0;\\r\\n\\t\\tthis.__currentOption = null;\\r\\n\\t\\tthis.__currentStart = 0;\\r\\n\\t\\tthis.__currentEnd = 0;\\r\\n\\t\\t\\r\\n\\t\\tthis.animate = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__element)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__run();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__util.warning(\\\"NSAnimation\\\",\\\"The element is not valid\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__run = function() \\r\\n\\t\\t{\\r\\n\\t\\t    var current = new Date();\\r\\n\\t\\t    var remaining = this.__currentEnd - current;\\r\\n\\t\\t    if(remaining < this.__util.ANIMATIONDELAY) \\r\\n\\t\\t    {\\r\\n\\t\\t\\t      if(this.__currentOption) \\r\\n\\t\\t\\t      {\\r\\n\\t\\t\\t    \\t  this.__step(1);  //1 = progress is at 100%\\r\\n\\t\\t\\t    \\t  if(this.__currentOption.animationCompleteHandler)\\r\\n\\t\\t\\t    \\t  {\\r\\n\\t\\t\\t    \\t\\t  this.__currentOption.animationCompleteHandler(this.__currentOption);\\r\\n\\t\\t\\t    \\t  }\\r\\n\\t\\t\\t      }\\r\\n\\t\\t\\t      this.__currentOption = this.__arrOptions.shift();  //get the next item\\r\\n\\t\\t\\t      if(this.__currentOption) \\r\\n\\t\\t\\t      {\\r\\n\\t\\t\\t    \\t  if(this.__currentOption[\\\"style\\\"])\\r\\n\\t\\t\\t    \\t  {\\r\\n\\t\\t\\t    \\t\\t  this.__currentStart = this.__util.getDimensionAsNumber(this.__element,this.__element.style[this.__currentOption.style]);\\r\\n\\t\\t\\t    \\t  }\\r\\n\\t\\t\\t    \\t  else\\r\\n\\t\\t\\t    \\t  {\\r\\n\\t\\t\\t    \\t\\t  this.__currentStart = this.__element[this.__currentOption.property];\\r\\n\\t\\t\\t    \\t  }\\r\\n\\t\\t\\t    \\t  this.__duration = this.__currentOption.time;\\r\\n\\t\\t\\t    \\t  this.__currentEnd = new Date(current.getTime() + this.__duration);\\r\\n\\t\\t\\t    \\t  this.__step(0);  //0 = progress is at 0%\\r\\n\\t\\t\\t      }\\r\\n\\t\\t\\t      else \\r\\n\\t\\t\\t      {\\r\\n\\t\\t\\t    \\t  return;\\r\\n\\t\\t\\t      }\\r\\n\\t\\t    }\\r\\n\\t\\t    else \\r\\n\\t\\t    {\\r\\n\\t\\t\\t      var progress = remaining / this.__duration;\\r\\n\\t\\t\\t      var delta = this.__delta(progress);\\r\\n\\t\\t\\t      this.__step(delta);\\r\\n\\t\\t    }\\r\\n\\t\\t    this.__util.getRequestAnimationFrame.bind(this.win)(this.__run.bind(this));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__delta = function(progress)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (1 - Math.pow(progress, 3));  //easing formula\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__step = function(progress) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar newValue = progress * (this.__currentOption.target - this.__currentStart) + this.__currentStart;\\r\\n\\t\\t\\tif(this.__currentOption[\\\"style\\\"])\\r\\n\\t  \\t  \\t{\\r\\n\\t\\t\\t\\tthis.__element.style[this.__currentOption.style] = newValue + \\\"px\\\";\\r\\n\\t\\t\\t\\t//this.__element.style[this.__currentOption.style] = (progress * this.__currentOption.target) + \\\"px\\\";\\r\\n\\t  \\t  \\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__element[this.__currentOption.property] = newValue;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getSearchTextBox = function(textInput)\\r\\n\\t{\\r\\n\\t\\tvar divWrapper = null;\\r\\n\\t\\tif(textInput)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar id = textInput.getAttribute(\\\"id\\\");\\r\\n\\t\\t\\tvar parent = textInput.parentNode;\\r\\n\\t\\t\\tdivWrapper = this.createDiv(id + \\\"searchWrapper\\\",\\\"nsSearchTextBoxWrapper\\\");\\r\\n\\t\\t\\tthis.addStyleClass(textInput,\\\"nsSearchInput\\\");\\r\\n\\t\\t\\tvar divSearchWrapper = this.createDiv(id + \\\"searchIconWrapper\\\",\\\"nsSearchIconWrapper\\\");\\r\\n\\t\\t\\tvar divSearchParent = this.createDiv(id + \\\"searchIconParent\\\",\\\"nsSearchIconParent\\\");\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar searchID = new NSSvgShapes().__SEARCH_ICON_ID;\\r\\n\\t\\t\\tvar svg = objSVG.addSVG(divSearchParent,id + \\\"searchsvg\\\",\\\"nsSearchIcon\\\",null,null,null,null,null,null,false);\\r\\n\\t\\t\\tobjSVG.addUse(svg,id + \\\"use\\\",null,\\\"#\\\" + searchID);\\r\\n\\t\\t\\tdivSearchWrapper.appendChild(divSearchParent);\\r\\n\\t\\t\\tdivWrapper.appendChild(divSearchWrapper);\\r\\n\\t\\t\\tif(parent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparent.replaceChild(divWrapper,textInput);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdivWrapper.appendChild(textInput);\\r\\n\\t\\t}\\r\\n\\t\\treturn divWrapper;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.transition = function(element,transitionEndCallback)\\r\\n\\t{\\r\\n\\t\\tthis.__element = element;\\r\\n\\t\\tthis.__transitionEndCallback = transitionEndCallback;\\r\\n\\t\\tthis.__transitions = {\\r\\n\\t      'transition':'transitionend',\\r\\n\\t      'OTransition':'oTransitionEnd',\\r\\n\\t      'MozTransition':'transitionend',\\r\\n\\t      'WebkitTransition':'webkitTransitionEnd'\\r\\n\\t    };\\r\\n\\t\\tthis.__util = new NSUtil();\\r\\n\\t\\tthis.getTransitionEvent = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__element)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var trans in this.__transitions)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t        if(this.__element.style[trans] !== undefined)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t            return this.__transitions[trans];\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\tthis.callEndCallBack = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar transitionEvent = this.getTransitionEvent();\\r\\n\\t\\t\\tif(transitionEvent && this.__transitionEndCallback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__util.addEvent(this.__element,transitionEvent,this.__transitionEndCallback);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tthis.callEndCallBack();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.getRequestAnimationFrame = (function()\\r\\n\\t{\\r\\n\\t\\t  return  window.requestAnimationFrame       ||\\r\\n\\t\\t          window.webkitRequestAnimationFrame ||\\r\\n\\t\\t          window.mozRequestAnimationFrame    ||\\r\\n\\t\\t          window.oRequestAnimationFrame      ||\\r\\n\\t\\t          function(callback)\\r\\n\\t\\t          {\\r\\n\\t\\t              window.setTimeout(callback,1000 / 60);\\r\\n\\t\\t          };\\r\\n\\t})();\\r\\n\\t\\r\\n\\tNSUtil.prototype.getCancelAnimationFrame = (function() \\r\\n\\t{\\r\\n\\t    return window.cancelAnimationFrame           \\t||\\r\\n\\t\\t       window.webkitCancelRequestAnimationFrame ||\\r\\n\\t\\t       window.mozCancelRequestAnimationFrame    ||\\r\\n\\t\\t       window.oCancelRequestAnimationFrame      ||\\r\\n\\t\\t       window.msCancelRequestAnimationFrame     ||\\r\\n\\t\\t       clearTimeout;\\r\\n\\t})();\\r\\n\\t\\r\\n\\tNSUtil.prototype.fitStringToElement = function(element,doc)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdoc = this.getDoc(doc);\\r\\n\\t\\t\\tvar str = element.innerHTML;\\r\\n\\t\\t\\tvar width = element.getBoundingClientRect().width;\\r\\n\\t\\t\\tfunction escTag(string)\\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\treturn string.replace(\\\"<\\\",\\\"&lt;\\\").replace(\\\">\\\",\\\"&gt;\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//Create a span element that will be used to get the width\\r\\n\\t\\t\\tvar span = doc.createElement(\\\"span\\\");\\r\\n\\t\\t\\t//Allow a classname to be set to get the right font-size.\\r\\n\\t\\t\\tif (element.className) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tspan.className = element.className;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tspan.style.display = 'inline';\\r\\n\\t\\t\\tspan.style.visibility = 'hidden';\\r\\n\\t\\t\\tspan.style.padding = '0px';\\r\\n\\t\\t\\tdoc.body.appendChild(span);\\r\\n\\t\\r\\n\\t\\t\\tvar result = escTag(str); // default to the whole string\\r\\n\\t\\t\\tspan.innerHTML = result;\\r\\n\\t\\t\\t// Check if the string will fit in the allowed width. NOTE: if the width\\r\\n\\t\\t\\t// can't be determined (offsetWidth==0) the whole string will be returned.\\r\\n\\t\\t\\tif (span.offsetWidth > width) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar posStart = 0, posMid, posEnd = str.length, posLength;\\r\\n\\t\\t\\t\\t// Calculate (posEnd - posStart) integer division by 2 and\\r\\n\\t\\t\\t\\t// assign it to posLength. Repeat until posLength is zero.\\r\\n\\t\\t\\t\\twhile (posLength = (posEnd - posStart) >> 1) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t  posMid = posStart + posLength;\\r\\n\\t\\t\\t\\t  //Get the string from the beginning up to posMid;\\r\\n\\t\\t\\t\\t  span.innerHTML = escTag(str.substring(0,posMid)) + '&hellip;';\\r\\n\\t\\r\\n\\t\\t\\t\\t  // Check if the current width is too wide (set new end)\\r\\n\\t\\t\\t\\t  // or too narrow (set new start)\\r\\n\\t\\t\\t\\t  if(span.offsetWidth > width) \\r\\n\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\tposEnd = posMid; \\r\\n\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t  else \\r\\n\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\tposStart=posMid;\\r\\n\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\r\\n\\t\\t\\t\\tresult = '<abbr title=\\\"' + str.replace(\\\"\\\\\\\"\\\",\\\"&quot;\\\") + '\\\">' + escTag(str.substring(0,posStart)) +'&hellip;<\\\\/abbr>';\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdoc.body.removeChild(span);\\r\\n\\t\\t\\treturn result;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.slideUp = function(element,duration,callback,heightSubstracter)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tduration = duration || 20;\\r\\n\\t\\t\\theightSubstracter = heightSubstracter || 10;\\r\\n\\t\\t\\tvar rect = element.getBoundingClientRect();\\r\\n\\t\\t\\tvar height = rect.height;\\r\\n\\t\\t\\tvar counter = height;\\r\\n\\t\\t\\tvar subtractor = height / heightSubstracter;\\r\\n\\t\\t\\t//element.style.overflow = \\\"hidden\\\";\\r\\n\\t\\t\\tvar interval = setInterval(function () {\\r\\n\\t\\t\\t\\t counter -= subtractor;\\r\\n\\t\\t\\t\\t if(counter > 0) \\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t element.style.height = counter + \\\"px\\\";\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t else\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t element.style.height = null;\\r\\n\\t\\t\\t    \\t clearInterval(interval);\\r\\n\\t\\t\\t    \\t if(callback)\\r\\n\\t\\t\\t    \\t {\\r\\n\\t\\t\\t    \\t\\t  callback(element);\\r\\n\\t\\t\\t    \\t }\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t},duration);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.slideDown = function(element,duration,callback,heightAdder)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tduration = duration || 20;\\r\\n\\t\\t\\theightAdder = heightAdder || 10;\\r\\n\\t\\t\\tvar counter = 0;\\r\\n\\t\\t\\tvar height = this.getHiddenElementHeight(element);\\r\\n\\t\\t\\tvar adder = height / heightAdder;\\r\\n\\t\\t\\telement.style.height = \\\"0px\\\";    \\r\\n\\t\\t\\telement.style.display = \\\"\\\";\\r\\n\\t\\t\\tvar interval = setInterval(function () {            \\r\\n\\t\\t      counter += adder;\\r\\n\\t\\t      if(counter < height) \\r\\n\\t\\t      {\\r\\n\\t\\t    \\t  element.style.height = counter + \\\"px\\\";\\r\\n\\t\\t      } \\r\\n\\t\\t      else \\r\\n\\t\\t      {\\r\\n\\t\\t    \\t  element.style.height = null;\\r\\n\\t\\t    \\t  clearInterval(interval);\\r\\n\\t\\t    \\t  if(callback)\\r\\n\\t\\t    \\t  {\\r\\n\\t\\t    \\t\\t  callback(element);\\r\\n\\t\\t    \\t  }\\r\\n\\t\\t      }\\r\\n\\t\\t    }, duration); \\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.slideDownTransition = function(element,duration,callback) {\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.isUndefinedOrNull(duration)) {\\r\\n\\t\\t\\t\\tduration = 500;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar display = element.style.display;\\r\\n\\t\\t\\telement.style.display = 'block';\\r\\n\\t\\t\\tvar origHeight = element.style.height;\\r\\n\\t\\t\\tvar height = element.offsetHeight;\\r\\n\\t\\t\\tvar overflow = element.style.overflow;\\r\\n\\t\\t\\tvar transition = element.style.transition;\\r\\n\\t\\t    element.style.height = '0px';\\r\\n\\t\\t    element.style.overflow = 'hidden';\\r\\n\\t\\t    element.style.transition = \\\"height \\\" + (duration / 1000) + \\\"s ease-in-out\\\";\\r\\n\\t\\t\\tfunction handleTransitionEnd(event) {\\r\\n\\t\\t\\t\\tif (event.target === element || event.currentTarget === element) {\\r\\n\\t\\t\\t\\t\\telement.removeEventListener('transitionend', handleTransitionEnd);\\r\\n\\t\\t\\t\\t\\t//element.style.display = display;\\r\\n\\t\\t\\t\\t\\telement.style.height = origHeight;\\r\\n\\t\\t\\t\\t\\telement.style.overflow = overflow;\\r\\n\\t\\t\\t\\t\\telement.style.transition = transition;\\r\\n\\t\\t\\t\\t\\tcallback && callback(element);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t        \\r\\n\\t\\t\\telement.addEventListener('transitionend', handleTransitionEnd);\\r\\n\\t\\t\\tsetTimeout(function() {\\r\\n\\t\\t         element.style.height = height + \\\"px\\\";\\r\\n\\t\\t    }, 0);\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSUtil.prototype.slideUpTransition = function(element, duration, callback) {\\r\\n\\t    if(element)\\r\\n\\t\\t{\\r\\n\\t    \\tif(this.isUndefinedOrNull(duration)) {\\r\\n\\t\\t\\t\\tduration = 500;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar display = element.style.display;\\r\\n\\t\\t\\tvar height = element.style.height;\\r\\n\\t\\t\\tvar overflow = element.style.overflow;\\r\\n\\t\\t\\tvar transition = element.style.transition;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\telement.style.height = element.offsetHeight + 'px';\\r\\n\\t\\t\\telement.style.transition = \\\"height \\\" + (duration / 1000) + \\\"s ease-in-out\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tsetTimeout(function() {\\r\\n\\t\\t\\t\\telement.style.height = '0px';\\r\\n\\t\\t\\t\\telement.style.overflow = 'hidden';\\r\\n\\t\\t\\t}, 0);\\r\\n\\r\\n\\t\\t\\tfunction handleTransitionEnd(event) {\\r\\n\\t\\t\\t\\tif (event.target === element || event.currentTarget === element) {\\r\\n\\t\\t\\t\\t\\telement.removeEventListener('transitionend', handleTransitionEnd);\\r\\n\\t\\t\\t\\t\\telement.style.display = 'none';\\r\\n\\t\\t\\t\\t\\telement.style.height = height;\\r\\n\\t\\t\\t\\t\\telement.style.overflow = overflow;\\r\\n\\t\\t\\t\\t\\telement.style.transition = transition;\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\tcallback && callback(element);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\telement.addEventListener('transitionend', handleTransitionEnd);\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\t\\r\\n\\t//will work only if element parent is not hidden\\r\\n\\tNSUtil.prototype.getHiddenElementHeight = function(element,win)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\twin = this.getWin(win);\\r\\n\\t\\t\\tvar style = win.getComputedStyle(element);\\r\\n\\t\\t\\tvar maxHeight = style.maxHeight.replace('px', '').replace('%', '');\\r\\n\\t\\t\\tif(style.display !== 'none' && maxHeight !== '0') \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar rect = element.getBoundingClientRect();\\r\\n\\t\\t\\t\\treturn rect.height;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar id = \\\"nsTemp-\\\"+ Math.floor(Math.random() * 99999);\\r\\n\\t\\t\\tvar clonedElement = element.cloneNode(true);\\r\\n\\t\\t\\tclonedElement.setAttribute(\\\"id\\\",id);\\r\\n\\t\\t\\tclonedElement.style.position = \\\"absolute\\\";\\r\\n\\t\\t\\tclonedElement.style.height = \\\"auto\\\";\\r\\n\\t\\t\\tclonedElement.style.width = \\\"1000px\\\";\\r\\n\\t\\t\\tclonedElement.style.left = \\\"-10000em\\\";\\r\\n\\t\\t\\tclonedElement.style.display = \\\"\\\";\\r\\n\\t\\t\\telement.parentElement.appendChild(clonedElement);\\r\\n\\t\\t\\tvar rect = clonedElement.getBoundingClientRect();\\r\\n\\t\\t\\tvar height = rect.height;\\r\\n\\t\\t\\tclonedElement.parentElement.removeChild(clonedElement);\\r\\n\\t\\t}\\r\\n\\t\\treturn 0;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.addRemoteFileToElement = function(element,filePath,win)\\r\\n\\t{\\r\\n\\t\\tif(element && filePath)\\r\\n\\t\\t{\\r\\n\\t\\t\\twin = this.getWin(win);\\r\\n\\t\\t\\tvar xmlhttp;\\r\\n\\t\\t\\tif (win.XMLHttpRequest)\\r\\n\\t\\t\\t{// code for IE7+, Firefox, Chrome, Opera, Safari\\r\\n\\t\\t\\t\\txmlhttp=new XMLHttpRequest();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{// code for IE6, IE5\\r\\n\\t\\t\\t\\txmlhttp=new ActiveXObject(\\\"Microsoft.XMLHTTP\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\txmlhttp.onreadystatechange=function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t  if(xmlhttp.readyState == 4 && xmlhttp.status == 200)\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  element.innerHTML = xmlhttp.responseText;\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\txmlhttp.open(\\\"GET\\\",filePath,true);\\r\\n\\t\\t\\txmlhttp.send();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.stringifyOnce = function(obj, replacer, indent)\\r\\n\\t{\\r\\n\\t\\tvar printedObjects = [];\\r\\n\\t    var printedObjectKeys = [];\\r\\n\\t    function printOnceReplacer(key, value)\\r\\n\\t    {\\r\\n\\t        var printedObjIndex = false;\\r\\n\\t        printedObjects.forEach(function(obj, index)\\r\\n\\t        {\\r\\n\\t            if(obj===value)\\r\\n\\t            {\\r\\n\\t                printedObjIndex = index;\\r\\n\\t            }\\r\\n\\t        });\\r\\n\\t        if(value && printedObjIndex && typeof(value)==\\\"object\\\")\\r\\n\\t        {\\r\\n\\t        \\tvar name = (value.constructor && value.constructor.name) ? value.constructor.name : printedObjectKeys[printedObjIndex];\\r\\n\\t            return \\\"(see \\\" + name.toLowerCase() + \\\" with key \\\" + printedObjectKeys[printedObjIndex] + \\\")\\\";\\r\\n\\t        }\\r\\n\\t        else\\r\\n\\t        {\\r\\n\\t            var qualifiedKey = key || \\\"(empty key)\\\";\\r\\n\\t            printedObjects.push(value);\\r\\n\\t            printedObjectKeys.push(qualifiedKey);\\r\\n\\t            if(replacer)\\r\\n\\t            {\\r\\n\\t                return replacer(key, value);\\r\\n\\t            }\\r\\n\\t            else\\r\\n\\t            {\\r\\n\\t                return value;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t    }\\r\\n\\t    return JSON.stringify(obj, printOnceReplacer, indent);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.caretPosition = function(element,position,doc)\\r\\n\\t{\\r\\n\\t\\tif(!element)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t}\\r\\n\\t\\tdoc = this.getDoc(doc);\\r\\n\\t\\tvar start = 0, end = 0;\\r\\n\\t\\tif (typeof element.selectionStart == \\\"number\\\" && typeof element.selectionEnd == \\\"number\\\") \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.isUndefinedOrNull(position))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\telement.focus();\\r\\n\\t\\t\\t\\telement.setSelectionRange(position,position);\\r\\n\\t\\t\\t}\\r\\n\\t        start = element.selectionStart;\\r\\n\\t        end = element.selectionEnd;\\r\\n\\t    }\\r\\n\\t\\telse if(element.createTextRange)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar range = null;\\r\\n\\t\\t\\tif(!this.isUndefinedOrNull(position))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trange = elem.createTextRange();\\r\\n\\t            range.move('character',position);\\r\\n\\t            range.select();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\trange = doc.selection.createRange();\\r\\n\\t\\t\\tif (range && range.parentElement() == element) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar len = element.value.length;\\r\\n\\t\\t\\t\\tvar normalizedValue = element.value.replace(/\\\\r\\\\n/g, \\\"\\\\n\\\");\\r\\n\\t\\t\\t\\tvar textInputRange = element.createTextRange();\\r\\n\\t            textInputRange.moveToBookmark(range.getBookmark());\\r\\n\\t            var endRange = element.createTextRange();\\r\\n\\t            endRange.collapse(false);\\r\\n\\t            if (textInputRange.compareEndPoints(\\\"StartToEnd\\\", endRange) > -1) \\r\\n\\t            {\\r\\n\\t                start = end = len;\\r\\n\\t            } \\r\\n\\t            else \\r\\n\\t            {\\r\\n\\t                start = -textInputRange.moveStart(\\\"character\\\", -len);\\r\\n\\t                start += normalizedValue.slice(0, start).split(\\\"\\\\n\\\").length - 1;\\r\\n\\r\\n\\t                if (textInputRange.compareEndPoints(\\\"EndToEnd\\\", endRange) > -1) \\r\\n\\t                {\\r\\n\\t                    end = len;\\r\\n\\t                } \\r\\n\\t                else \\r\\n\\t                {\\r\\n\\t                    end = -textInputRange.moveEnd(\\\"character\\\", -len);\\r\\n\\t                    end += normalizedValue.slice(0, end).split(\\\"\\\\n\\\").length - 1;\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.isUndefinedOrNull(position))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\telement.focus();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn {start: start,end: end};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.copyObjectWithNullValues = function(item) {\\r\\n\\t\\tif(item) {\\r\\n\\t\\t\\tconst retItem = {};\\r\\n\\t\\t\\tfor (var key of Object.keys(item)) {\\r\\n\\t\\t\\t\\tretItem[key] = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retItem;\\r\\n\\t\\t}\\r\\n\\t\\treturn item;\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSUtil.prototype.loader = function(parentContainer,isOverlayRequired,doc,win)\\r\\n\\t{\\r\\n\\t\\tthis.parentContainer = parentContainer;\\r\\n\\t\\tthis.isOverlayRequired = isOverlayRequired;\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.doc = this.util.getDoc(doc);\\r\\n\\t\\tthis.win = this.util.getWin(win);\\r\\n\\t\\tthis.divOverlay = null;\\r\\n\\t\\tthis.divLoaderContainerParent = null;\\r\\n\\t\\tthis.canvasLoader = null;\\r\\n\\t\\tthis.loaderContext= null;\\r\\n\\t\\tthis.idPrefix = null;\\r\\n\\t\\tthis.loaderLines = 16;\\r\\n\\t\\tthis.canvasWidth = 100;\\r\\n\\t\\tthis.canvasHeight = 100;\\r\\n\\t\\tthis.animationStart = null;\\r\\n\\t\\tthis.orignalParentPosition = null;\\r\\n\\t\\tthis.documentResizeRef = null;\\r\\n\\t\\tthis.timeout = null;\\r\\n\\t\\tthis.isVisible = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.createComponents = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.documentResizeRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.documentResizeRef = this.documentResizeListener.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.win,\\\"resize\\\",this.documentResizeRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.idPrefix = this.parentContainer.id ? this.parentContainer.id : this.util.getUniqueId();\\r\\n\\t\\t\\tif(this.util.isUndefined(this.isOverlayRequired))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.isOverlayRequired = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.isOverlayRequired)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.orignalParentPosition = this.parentContainer.style.position;\\r\\n\\t\\t\\t\\tthis.parentContainer.style.position = \\\"relative\\\";\\r\\n\\t\\t\\t\\tthis.divOverlay = this.util.createDiv(\\\"divOverlay\\\",\\\"nsLoaderOverlay\\\");\\r\\n\\t\\t\\t\\tthis.divOverlay.style.height = this.parentContainer.offsetHeight + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.divOverlay.style.width = this.parentContainer.offsetWidth + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.parentContainer.appendChild(this.divOverlay);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.divLoaderContainerParent = this.util.createDiv(this.idPrefix + \\\"divLoaderContainerParent\\\",\\\"nsLoaderContainerParent\\\"); \\r\\n\\t\\t\\tthis.parentContainer.appendChild(this.divLoaderContainerParent);\\r\\n\\t\\t\\tvar divLoaderContainer = this.util.createDiv(this.idPrefix + \\\"divLoaderContainer\\\",\\\"nsLoaderContainer\\\"); \\r\\n\\t\\t\\tthis.divLoaderContainerParent.appendChild(divLoaderContainer);\\r\\n\\t\\t\\tthis.canvasLoader = this.doc.createElement(\\\"canvas\\\");\\r\\n\\t\\t\\tthis.canvasLoader.id = this.idPrefix + \\\"canvas\\\";\\r\\n\\t\\t\\tthis.canvasLoader.width = this.canvasWidth;\\r\\n\\t\\t\\tthis.canvasLoader.height = this.canvasHeight;\\r\\n\\t\\t\\tthis.canvasLoader.style.background = \\\"#FFFFFF\\\";\\r\\n\\t\\t\\tthis.canvasLoader.style.position = \\\"absolute\\\";\\r\\n\\t\\t\\tdivLoaderContainer.appendChild(this.canvasLoader);\\r\\n\\t\\t\\tthis.loaderContext= this.canvasLoader.getContext(\\\"2d\\\");\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar divLoadingLabel = this.util.createDiv(this.idPrefix + \\\"divLoadingLabel\\\",\\\"nsLoaderText\\\"); \\r\\n\\t\\t\\tdivLoadingLabel.appendChild(this.doc.createTextNode(\\\"Loading\\\"));\\r\\n\\t\\t\\tdivLoaderContainer.appendChild(divLoadingLabel);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tthis.centerElement(this.divLoaderContainerParent);\\r\\n\\t\\t\\tvar canvasLeft = (((divLoaderContainer.offsetWidth - this.canvasWidth) / 2) - 5);\\r\\n\\t\\t\\tvar canvasTop = Math.max((((divLoaderContainer.offsetHeight - this.canvasHeight) / 2)),0);\\r\\n\\t\\t\\tthis.canvasLoader.style.left = canvasLeft + \\\"px\\\";\\r\\n\\t\\t\\tthis.canvasLoader.style.top = canvasTop + \\\"px\\\";\\r\\n\\t\\t\\tthis.centerElement(divLoadingLabel);\\r\\n\\t\\t\\tdivLoadingLabel.style.top = (canvasTop + this.canvasHeight) + \\\"px\\\";\\r\\n\\t\\t\\tthis.animationStart = new Date();\\r\\n\\t\\t\\tthis.win.setInterval(this.draw.bind(this), 1000 / 30);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.centerElement = function(component)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(component)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar parent = component.parentNode;\\r\\n\\t\\t\\t\\tcomponent.style.left = ((parent.offsetWidth - component.offsetWidth) / 2) + \\\"px\\\";\\r\\n\\t\\t\\t\\tcomponent.style.top = ((parent.offsetHeight - component.offsetHeight) / 2) + \\\"px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.draw = function() \\r\\n\\t\\t{\\r\\n\\t\\t    var rotation = parseInt(((new Date() - this.animationStart) / 1000) * this.loaderLines) / this.loaderLines;\\r\\n\\t\\t    this.loaderContext.save();\\r\\n\\t\\t    this.loaderContext.clearRect(0, 0, this.canvasWidth, this.canvasHeight);\\r\\n\\t\\t    this.loaderContext.translate(this.canvasWidth / 2, this.canvasHeight / 2);\\r\\n\\t\\t    this.loaderContext.rotate(Math.PI * 2 * rotation);\\r\\n\\t\\t    for (var count = 0; count < this.loaderLines; count++) {\\r\\n\\t\\t \\r\\n\\t\\t    \\tthis.loaderContext.beginPath();\\r\\n\\t\\t    \\tthis.loaderContext.rotate(Math.PI * 2 / this.loaderLines);\\r\\n\\t\\t    \\tthis.loaderContext.moveTo(this.canvasWidth / 10, 0);\\r\\n\\t\\t    \\tthis.loaderContext.lineTo(this.canvasWidth / 4, 0);\\r\\n\\t\\t    \\tthis.loaderContext.lineWidth = this.canvasWidth / 30;\\r\\n\\t\\t    \\tthis.loaderContext.strokeStyle = \\\"rgba(0,0,0,\\\" + count / this.loaderLines + \\\")\\\";\\r\\n\\t\\t    \\tthis.loaderContext.stroke();\\r\\n\\t\\t    }\\r\\n\\t\\t    this.loaderContext.restore();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.documentResizeListener = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tclearTimeout(this.timeout);\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.timeout = setTimeout(function () {\\r\\n\\t\\t\\t\\t\\tself.resizeHandler.bind(self)();\\r\\n\\t\\t\\t    }, 500);\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.resizeHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.isVisible)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.hide();\\r\\n\\t\\t\\t\\tthis.show();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.show = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.divLoaderContainerParent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.createComponents();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.divLoaderContainerParent.style.display = \\\"inline-block\\\";\\r\\n\\t\\t\\tif(this.isOverlayRequired)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.divOverlay.style.display = \\\"inline-block\\\";\\r\\n\\t\\t\\t\\tthis.parentContainer.style.position = \\\"relative\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.isVisible = true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.hide = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.divLoaderContainerParent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.divLoaderContainerParent.parentNode.removeChild(this.divLoaderContainerParent);\\r\\n\\t\\t\\t\\tthis.divLoaderContainerParent = null;\\r\\n\\t\\t\\t\\t//this.divLoaderContainerParent.style.display = \\\"none\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.divOverlay)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//this.divOverlay.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\tthis.divOverlay.parentNode.removeChild(this.divOverlay);\\r\\n\\t\\t\\t\\tthis.divOverlay = null;\\r\\n\\t\\t\\t\\tthis.parentContainer.style.position = this.orignalParentPosition;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.documentResizeRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.win,\\\"resize\\\",this.documentResizeRef);\\r\\n\\t\\t\\t\\tthis.documentResizeRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.isVisible = false;\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.nsDragResizeElements = function(setting,doc,win)\\r\\n\\t{\\r\\n\\t\\tthis.DRAG_STARTING = \\\"dragStaring\\\";\\r\\n\\t\\tthis.DRAGGING = \\\"dragging\\\";\\r\\n\\t\\tthis.DRAG_END = \\\"dragEnd\\\";\\r\\n\\t\\tthis.RESIZE_STARTING = \\\"resizeStaring\\\";\\r\\n\\t\\tthis.RESIZING = \\\"resizing\\\";\\r\\n\\t\\tthis.RESIZE_END = \\\"resizeEnd\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__ELEMENT_OFFSET = 4;\\r\\n\\t\\t\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\t\\r\\n\\t\\t//Drag Variables\\r\\n\\t\\tthis.__dragSetting = {x:0,y:0,isDragging:false};\\r\\n\\t\\t\\r\\n\\t\\t//Resize Variables\\r\\n\\t\\tthis.__resizeSetting = {isResizing:false};\\r\\n\\t\\tthis.__resizeDirection = {top:false,right:false,bottom:false,left:false};\\r\\n\\t\\tthis.__dragEdge = {right:null,bottm:null};\\r\\n\\t\\tthis.__elementRect = null;\\r\\n\\t\\tthis.__lastElementDimension = null;\\r\\n\\t\\tthis.__posX = null;\\r\\n\\t\\tthis.__posY = null;\\r\\n\\t\\tthis.__tempEvent = null;\\r\\n\\t\\r\\n\\t\\t//Common Variables\\r\\n\\t\\tthis.__divHidden = null;\\r\\n\\t\\tthis.__rePaint = false;\\r\\n\\t\\tthis.__isStopMoveOnClick = false;\\r\\n\\t\\tthis.__disableDrag = false;\\r\\n\\t\\tthis.__disableResize = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.doc = this.util.getDoc(doc);\\r\\n\\t\\tthis.win = this.util.getWin(win);\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentMouseMoveRef = null;\\r\\n\\t\\tthis.__documentMouseUpRef = null;\\r\\n\\t\\tthis.__documentTouchMoveRef = null;\\r\\n\\t\\tthis.__documentTouchEndRef = null;\\r\\n\\t\\tthis.__containerClickRef = null;\\r\\n\\t\\tthis.__elementMouseDownRef = null;\\r\\n\\t\\tthis.__elementTouchStartRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\telement: this.__setting[\\\"element\\\"] || null,\\r\\n\\t\\t\\t\\t\\tenableDrag: Boolean.parse(this.__setting[\\\"enableDrag\\\"]),\\r\\n\\t\\t\\t\\t\\tenableResize: Boolean.parse(this.__setting[\\\"enableResize\\\"]),\\r\\n\\t\\t\\t\\t\\tenableMoveOnClick: Boolean.parse(this.__setting[\\\"enableMoveOnClick\\\"]),\\r\\n\\t\\t\\t\\t\\tminWidth: this.util.getDimensionAsNumber(this.__setting[\\\"element\\\"],this.__setting[\\\"minWidth\\\"]),\\r\\n\\t\\t\\t\\t\\tminHeight: this.util.getDimensionAsNumber(this.__setting[\\\"element\\\"],this.__setting[\\\"minHeight\\\"]),\\r\\n\\t\\t\\t\\t\\tcreateGhostElementCallback: this.__setting[\\\"createGhostElementCallback\\\"] || this.__createHiddenDiv.bind(this),\\r\\n\\t\\t\\t\\t\\tenableDragContainment:Boolean.parse(this.__setting[\\\"enableDragContainment\\\"]),\\r\\n\\t\\t\\t\\t\\tcontainer: this.__setting[\\\"container\\\"] || this.doc.documentElement,\\r\\n\\t\\t\\t\\t\\texcludeElement: this.__setting[\\\"excludeElement\\\"] || []\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(this.__config.element)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__config.enableDrag)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__divHidden = this.__config.createGhostElementCallback(this.__config.element);\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(this.__divHidden,\\\"nsDragGhost\\\");\\r\\n\\t\\t\\t\\t\\tthis.__initializeHiddenDiv();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__addEvent();\\r\\n\\t\\t\\t\\tif(this.__config.enableDrag)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__initializeDrag();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__config.enableResize)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__initializeResize();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__config.enableMoveOnClick)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__initializeMoveOnClick();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__animateAction();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.stopMoveOnClick = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isStopMoveOnClick = true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.disableDrag = function(value)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__disableDrag = Boolean.parse(value);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.disableResize = function(value)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__disableResize = Boolean.parse(value);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.destroy = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__elementMouseDownRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__config.element,\\\"mousedown\\\",this.__elementMouseDownRef);\\r\\n\\t\\t\\t\\tthis.__elementMouseDownRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__elementTouchStartRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__config.element,\\\"touchstart\\\",this.__elementTouchStartRef);\\r\\n\\t\\t\\t\\tthis.__elementTouchStartRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__documentMouseMoveRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__config.container,\\\"mousemove\\\",this.__documentMouseMoveRef);\\r\\n\\t\\t\\t\\tthis.__documentMouseMoveRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__documentMouseUpRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__config.container,\\\"mouseup\\\",this.__documentMouseUpRef);\\r\\n\\t\\t\\t\\tthis.__documentMouseUpRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__documentTouchMoveRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__config.container,\\\"touchmove\\\",this.__documentTouchMoveRef);\\r\\n\\t\\t\\t\\tthis.__documentTouchMoveRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__documentTouchEndRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__config.container,\\\"touchend\\\",this.__documentTouchEndRef);\\r\\n\\t\\t\\t\\tthis.__documentTouchEndRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__containerClickRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__config.container,\\\"click\\\",this.__containerClickRef);\\r\\n\\t\\t\\t\\tthis.__containerClickRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__divHidden)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divHidden.parentNode.removeChild(this.__divHidden);\\r\\n\\t\\t\\t\\tthis.__divHidden = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__addEvent = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__elementMouseDownRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__elementMouseDownRef = this.__elementMouseDownHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__config.element,\\\"mousedown\\\",this.__elementMouseDownRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__elementTouchStartRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__elementTouchStartRef = this.__elementTouchStartHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__config.element,\\\"touchstart\\\",this.__elementTouchStartRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__documentMouseMoveRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__documentMouseMoveRef = this.__documentMouseMoveHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__config.container,\\\"mousemove\\\",this.__documentMouseMoveRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__documentMouseUpRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__documentMouseUpRef = this.__documentMouseUpHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__config.container,\\\"mouseup\\\",this.__documentMouseUpRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__documentTouchMoveRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__documentTouchMoveRef = this.__documentTouchMoveHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__config.container,\\\"touchmove\\\",this.__documentTouchMoveRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__documentTouchEndRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__documentTouchEndRef = this.__documentTouchEndHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__config.container,\\\"touchend\\\",this.__documentTouchEndRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__elementMouseDownHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tthis.__downActionHandler(event);\\r\\n\\t\\t\\t//this.util.preventDefault(event); \\r\\n\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__elementTouchStartHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t event = this.util.getEvent(event);\\r\\n\\t\\t\\t this.__downActionHandler(event.touches[0]);\\r\\n\\t\\t\\t //this.util.preventDefault(event);\\r\\n\\t\\t\\t event.stopImmediatePropagation();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentMouseMoveHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tthis.__moveActionHandler(event);\\r\\n\\t\\t\\t//this.util.preventDefault(event); \\r\\n\\t\\t\\t//event.stopImmediatePropagation();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentMouseUpHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tthis.__upActionHandler(event);\\r\\n\\t\\t\\t//this.util.preventDefault(event); \\r\\n\\t\\t\\t//event.stopPropagation();\\r\\n\\t\\t\\t//event.stopImmediatePropagation();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentTouchMoveHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tthis.__moveActionHandler(event.touches[0]);\\r\\n\\t\\t\\t//this.util.preventDefault(event); \\r\\n\\t\\t\\t//event.stopImmediatePropagation();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentTouchEndHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tif (event.touches.length === 0) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__upActionHandler(event.changedTouches[0]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//this.util.preventDefault(event); \\r\\n\\t\\t\\t//event.stopImmediatePropagation();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__downActionHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__isTargetValid(event.target))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__setResizeVariables(event);\\r\\n\\t\\t\\t\\tvar isResizing = this.__isResizeValid();\\r\\n\\t\\t\\t\\tvar isDragging = !isResizing && this.__isDragValid();\\r\\n\\t\\t\\t\\tif(isResizing && !this.__disableResize)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__startResize(event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(isDragging && !this.__disableDrag)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__startDrag(event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__moveActionHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setResizeVariables(event);\\r\\n\\t\\t\\tthis.__tempEvent = event;\\r\\n\\t\\t\\tthis.__rePaint = true;\\r\\n\\t\\t\\tif(this.__resizeSetting.isResizing) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__actionResize(event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__dragSetting.isDragging)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__actionDrag(event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__upActionHandler = function(event)\\r\\n\\t\\t{ \\r\\n\\t\\t\\tthis.__setResizeVariables(event);\\r\\n\\t\\t\\tif(this.__resizeSetting.isResizing)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__endResize(event);\\r\\n\\t\\t\\t\\t//this.stopMoveOnClick();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__dragSetting.isDragging)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__endDrag(event);\\r\\n\\t\\t\\t\\tthis.stopMoveOnClick();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isTargetValid = function(target)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(target && this.__config.excludeElement && this.__config.excludeElement.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < this.__config.excludeElement.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__config.excludeElement[count] ==  target)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t};\\r\\n\\t\\t/*********************************Resize Methods Starts*********************************/\\r\\n\\t\\tthis.__initializeResize = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__resizeElement = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__startResize = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__config.element,this.RESIZE_STARTING,null,null);\\r\\n\\t\\t\\tthis.__resizeSetting = {\\r\\n\\t\\t\\t\\t    posX: this.__posX,\\r\\n\\t\\t\\t\\t    posY: this.__posY,\\r\\n\\t\\t\\t\\t    clientX: event.clientX,\\r\\n\\t\\t\\t\\t    clientY: event.clientY,\\r\\n\\t\\t\\t\\t    elementWidth: this.__elementRect.width,\\r\\n\\t\\t\\t\\t    elementHeight: this.__elementRect.height,\\r\\n\\t\\t\\t\\t    isResizing: true,\\r\\n\\t\\t\\t\\t    isResizeTop: this.__resizeDirection.top,\\r\\n\\t\\t\\t\\t    isResizeLeft: this.__resizeDirection.left,\\r\\n\\t\\t\\t\\t    isResizeRight: this.__resizeDirection.right,\\r\\n\\t\\t\\t\\t    isResizeBottom: this.__resizeDirection.bottom\\r\\n\\t\\t\\t };\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__actionResize = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__resizeSetting.isResizeRight) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__config.element.style.width = Math.max(this.__posX, this.__config.minWidth) + \\\"px\\\";\\r\\n\\t\\t    }\\r\\n\\t\\t    if(this.__resizeSetting.isResizeBottom) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__config.element.style.height = Math.max(this.__posY, this.__config.minHeight) + \\\"px\\\";\\r\\n\\t\\t    }\\r\\n\\t\\t    if(this.__resizeSetting.isResizeLeft) \\r\\n\\t\\t    {\\r\\n\\t\\t\\t     var currentWidth = Math.max(this.__resizeSetting.clientX - this.__tempEvent.clientX  + this.__resizeSetting.elementWidth, this.__config.minWidth);\\r\\n\\t\\t\\t     if (currentWidth > this.__config.minWidth) \\r\\n\\t\\t\\t     {\\r\\n\\t\\t\\t    \\t this.__config.element.style.width = currentWidth + \\\"px\\\";\\r\\n\\t\\t\\t    \\t this.__config.element.style.left = this.__tempEvent.clientX + \\\"px\\\";\\t\\r\\n\\t\\t\\t     }\\r\\n\\t\\t    }\\r\\n\\t\\t    if (this.__resizeSetting.isResizeTop) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar currentHeight = Math.max(this.__resizeSetting.clientY - this.__tempEvent.clientY  + this.__resizeSetting.elementHeight, this.__config.minHeight);\\r\\n\\t\\t\\t    if(currentHeight > this.__config.minHeight) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tthis.__config.element.style.height = currentHeight + \\\"px\\\";\\r\\n\\t\\t\\t    \\tthis.__config.element.style.top = this.__tempEvent.clientY + \\\"px\\\";\\t\\r\\n\\t\\t\\t    }\\r\\n\\t\\t    }\\r\\n\\t\\t    this.__updateHiddenDivDimension();\\r\\n\\t\\t    var elementRect = this.__config.element.getBoundingClientRect();\\r\\n\\t\\t    this.util.dispatchEvent(this.__config.element,this.RESIZING,elementRect,{dimension:elementRect});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__endResize = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__resizeSetting = {isResizing:false};\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__config.element,this.RESIZE_END,null,null);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setResizeVariables = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t  this.__elementRect = this.__config.element.getBoundingClientRect();\\r\\n\\t\\t\\t  this.__posX = event.clientX - this.__elementRect.left;\\r\\n\\t\\t\\t  this.__posY = event.clientY - this.__elementRect.top;\\r\\n\\t\\r\\n\\t\\t\\t  this.__resizeDirection.top = this.__posY < this.__ELEMENT_OFFSET;\\r\\n\\t\\t\\t  this.__resizeDirection.left = this.__posX < this.__ELEMENT_OFFSET;\\r\\n\\t\\t\\t  this.__resizeDirection.right = this.__posX >= this.__elementRect.width - this.__ELEMENT_OFFSET;\\r\\n\\t\\t\\t  this.__resizeDirection.bottom = this.__posY >= this.__elementRect.height - this.__ELEMENT_OFFSET;\\r\\n\\t\\t\\t  \\r\\n\\t\\t\\t  this.__dragEdge.right = this.win.innerWidth - this.__ELEMENT_OFFSET;\\r\\n\\t\\t\\t  this.__dragEdge.bottom = this.win.innerHeight - this.__ELEMENT_OFFSET;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isResizeValid = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.enableResize)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue =  this.__resizeDirection.right || this.__resizeDirection.bottom || this.__resizeDirection.top || this.__resizeDirection.left;\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t/*********************************Resize Methods Ends*********************************/\\r\\n\\t\\t\\t\\r\\n\\t\\t/*********************************Drag Methods Starts*********************************/\\r\\n\\t\\tthis.__initializeDrag = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar container = this.__config.container;\\r\\n\\t\\t\\tvar isContainerBody = false;\\r\\n\\t\\t\\tif(container.tagName === \\\"BODY\\\" || container.tagName === \\\"HTML\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tisContainerBody = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar setPosition = function(element,rectElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar style = getComputedStyle(element);\\r\\n\\t\\t\\t\\tif(isContainerBody && style.position !== \\\"absolute\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\telement.style.position = \\\"absolute\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (style.position !== \\\"relative\\\" && style.position !== \\\"absolute\\\" ) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\telement.style.position = \\\"relative\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(rectElement)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(rectElement.width > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\telement.style.width = rectElement.width + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(rectElement.height > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\telement.style.height = rectElement.height + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar element = this.__config.element;\\r\\n\\t\\t\\tvar rectElement = element.getBoundingClientRect();\\r\\n\\t\\t\\tsetPosition(element,rectElement);\\r\\n\\t\\t\\tvar rectHiddenElement = this.__divHidden.getBoundingClientRect();\\r\\n\\t\\t\\tif(rectHiddenElement.width <= 0 || rectHiddenElement.height <= 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trectHiddenElement = rectElement;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tsetPosition(this.__divHidden,rectHiddenElement);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dragElement = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__startDrag = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\tvar cancelled = this.util.dispatchEvent(this.__config.element,this.DRAG_STARTING,target,null,true,true);\\r\\n\\t\\t\\tif(!cancelled)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dragSetting.isDragging = true;\\r\\n\\t\\t\\t\\tvar rectElement = this.__config.element.getBoundingClientRect();\\r\\n\\t\\t\\t\\tthis.__dragSetting.posX = event.clientX;\\r\\n\\t\\t\\t\\tthis.__dragSetting.posY = event.clientY;\\r\\n\\t\\t\\t\\tthis.__dragSetting.elementTop = rectElement.top;\\r\\n\\t\\t\\t\\tthis.__dragSetting.elementLeft = rectElement.left;\\r\\n\\t\\t\\t\\tthis.__dragSetting.elementWidth = rectElement.width;\\r\\n\\t\\t\\t\\tthis.__dragSetting.elementHeight = rectElement.height;\\r\\n\\t\\t\\t\\tthis.__dragSetting.diffX = this.__dragSetting.posX - this.__dragSetting.elementLeft;\\r\\n\\t\\t\\t\\tthis.__dragSetting.diffY = this.__dragSetting.posY - this.__dragSetting.elementTop;\\r\\n\\t\\t\\t\\tthis.__dragSetting.containerWidth = 0;\\r\\n\\t\\t\\t\\tthis.__dragSetting.containerHeight = 0;\\r\\n\\t\\t\\t\\tif(this.__config.enableDragContainment)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar containerRect = this.__config.container.getBoundingClientRect();\\r\\n\\t\\t\\t\\t\\tthis.__dragSetting.containerWidth = containerRect.width;\\r\\n\\t\\t\\t\\t\\tthis.__dragSetting.containerHeight = containerRect.height;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__actionDrag = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setHiddenDivVisiblity(true);\\r\\n\\t\\t\\tvar posX = event.clientX;\\r\\n\\t        var posY = event.clientY;\\r\\n\\t        var newX = posX - this.__dragSetting.diffX;\\r\\n\\t        var newY = posY - this.__dragSetting.diffY;\\r\\n\\t        var newPosition = this.__getRestrictedPosition(newX,newY);\\r\\n\\t        this.__divHidden.style.top = newPosition.y + \\\"px\\\";\\r\\n\\t\\t\\tthis.__divHidden.style.left = newPosition.x  + \\\"px\\\";\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__config.element,this.DRAGGING,newPosition,{position:newPosition});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__endDrag = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__dragSetting.isDragging = false;\\r\\n\\t\\t\\tthis.__config.element.style.top = this.__divHidden.style.top;\\r\\n\\t\\t\\tthis.__config.element.style.left = this.__divHidden.style.left;\\r\\n\\t\\t\\tthis.__setHiddenDivVisiblity(false);\\r\\n\\t\\t\\tthis.__dragSetting = {x:0,y:0,isDragging:false};\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__config.element,this.DRAG_END,null,null);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getRestrictedPosition = function(newX,newY)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.enableDragContainment)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//newX = (newX < 0) ? 0 : newX;\\r\\n\\t\\t\\t\\t//newY = (newY < 0) ? 0 : newY;\\r\\n\\t\\t\\t\\tif((newX + this.__dragSetting.elementWidth) > this.__dragSetting.containerWidth)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tnewX = this.__dragSetting.containerWidth - this.__dragSetting.elementWidth;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif((newY + this.__dragSetting.elementHeight) > this.__dragSetting.containerHeight)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tnewY = this.__dragSetting.containerHeight - this.__dragSetting.elementHeight;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn {x:newX,y:newY};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isDragValid = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.enableDrag)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = this.__posX > 0 && this.__posX < this.__elementRect.width && this.__posY > 0 && this.__posY < this.__elementRect.height && this.__posY < 30;\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t/*********************************Drag Methods Ends*********************************/\\r\\n\\t\\t/*********************************Move On Click Method Starts***********************/\\r\\n\\t\\tthis.__initializeMoveOnClick = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__config.element,\\\"nsMoveOnClick\\\");\\r\\n\\t\\t\\tthis.__containerClickRef = this.__containerClickHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(this.__config.container,\\\"click\\\",this.__containerClickRef);\\r\\n\\t\\t\\tthis.util.addEvent(this.__config.element,\\\"click\\\",this.__elementClickHandler.bind(this));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__elementClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tthis.util.preventDefault(event); \\r\\n\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__containerClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__isStopMoveOnClick)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\tvar element = this.__config.element;\\r\\n\\t\\t\\t\\tvar parentPosition = this.__getElementPosition(event.currentTarget);\\r\\n\\t\\t\\t\\tvar newX = event.clientX - parentPosition.x - (element.clientWidth / 2);\\r\\n\\t\\t\\t\\tvar newY = event.clientY - parentPosition.y - (element.clientHeight / 2);\\r\\n\\t\\t\\t\\tvar rectElement = this.__config.element.getBoundingClientRect();\\r\\n\\t\\t\\t\\tvar containerRect = this.__config.container.getBoundingClientRect();\\r\\n\\t\\t\\t\\tvar elementWidth = rectElement.width;\\r\\n\\t\\t\\t\\tvar elementHeight = rectElement.height;\\r\\n\\t\\t\\t\\tvar containerWidth = containerRect.width;\\r\\n\\t\\t\\t\\tvar containerHeight = containerRect.height;\\r\\n\\t\\t\\t\\tnewX = (newX < 0) ? 0 : newX;\\r\\n\\t\\t\\t\\tnewY = (newY < 0) ? 0 : newY;\\r\\n\\t\\t\\t\\tif((newX + elementWidth) > containerWidth)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tnewX = containerWidth - elementWidth;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif((newY + elementHeight) > containerHeight)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tnewY = containerHeight - elementHeight;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telement.style.left = newX + \\\"px\\\";\\r\\n\\t\\t\\t\\telement.style.top = newY + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.util.preventDefault(event); \\r\\n\\t\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__isStopMoveOnClick = false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getElementPosition = function(element) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar position = {x:0,y:0};\\r\\n\\t\\t\\twhile(element) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t   if(element.tagName === \\\"BODY\\\" || element.tagName === \\\"HTML\\\") \\r\\n\\t\\t\\t   {\\r\\n\\t\\t\\t      var xScroll = element.scrollLeft || this.doc.documentElement.scrollLeft;\\r\\n\\t\\t\\t      var yScroll = element.scrollTop || this.doc.documentElement.scrollTop;\\r\\n\\t\\t\\t      position.x += (element.offsetLeft - xScroll + element.clientLeft);\\r\\n\\t\\t\\t      position.y += (element.offsetTop - yScroll + element.clientTop);\\r\\n\\t\\t\\t   } \\r\\n\\t\\t\\t   else \\r\\n\\t\\t\\t   {\\r\\n\\t\\t\\t\\t  position.x += (element.offsetLeft - element.scrollLeft + element.clientLeft);\\r\\n\\t\\t\\t\\t  position.y += (element.offsetTop - element.scrollTop + element.clientTop);\\r\\n\\t\\t\\t   }\\r\\n\\t\\t\\t   element = element.offsetParent;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn position;\\r\\n\\t\\t};\\r\\n\\t\\t/*********************************Move On Click Method Ends***************************/\\r\\n\\t\\t/*********************************Common Methods Starts*********************************/\\r\\n\\t\\tthis.__animateAction = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.getRequestAnimationFrame.bind(this.win)(this.__animateAction.bind(this));\\r\\n\\t\\t\\tif(this.__rePaint)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__rePaint = false;\\r\\n\\t\\t\\t\\tif(this.__resizeSetting && this.__resizeSetting.isResizing) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__resizeElement();\\r\\n\\t\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__dragSetting && this.__dragSetting.isDragging) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__dragElement();\\r\\n\\t\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__setElementCursor();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setElementCursor = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.enableResize && this.__resizeDirection.right && this.__resizeDirection.bottom || this.__resizeDirection.left && this.__resizeDirection.top) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t this.__config.element.style.cursor = \\\"nwse-resize\\\";\\r\\n\\t\\t\\t} \\r\\n\\t\\t\\telse if(this.__config.enableResize && this.__resizeDirection.right && this.__resizeDirection.top || this.__resizeDirection.bottom && this.__resizeDirection.left) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t this.__config.element.style.cursor = \\\"nesw-resize\\\";\\r\\n\\t\\t\\t} \\r\\n\\t\\t\\telse if(this.__config.enableResize && (this.__resizeDirection.right || this.__resizeDirection.left)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t this.__config.element.style.cursor = \\\"ew-resize\\\";\\r\\n\\t\\t\\t} \\r\\n\\t\\t\\telse if(this.__config.enableResize && (this.__resizeDirection.bottom || this.__resizeDirection.top)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t this.__config.element.style.cursor = \\\"ns-resize\\\";\\r\\n\\t\\t\\t} \\r\\n\\t\\t\\telse if(this.__isDragValid()) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t this.__config.element.style.cursor = \\\"move\\\";\\r\\n\\t\\t\\t} \\r\\n\\t\\t\\telse \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t this.__config.element.style.cursor = \\\"default\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setHiddenDivVisiblity = function(isVisible) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divHidden.style.display = (isVisible ? \\\"\\\" : \\\"none\\\");\\r\\n\\t\\t\\tthis.__config.element.style.display = (isVisible ? \\\"none\\\" : \\\"\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__updateHiddenDivDimension = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__updateElementDimension(this.__divHidden, this.__elementRect.left,this.__elementRect.top, this.__elementRect.width, this.__elementRect.height);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__updateElementDimension = function(element,posX,posY,width,height) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar updateDimension = function(property,value)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t(element && value !== -1) ? (element.style[property] = value + \\\"px\\\") : null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tupdateDimension(\\\"left\\\",posX);\\r\\n\\t\\t\\tupdateDimension(\\\"top\\\",posY);\\r\\n\\t\\t\\tupdateDimension(\\\"width\\\",width);\\r\\n\\t\\t\\tupdateDimension(\\\"height\\\",height);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createHiddenDiv = function(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar divHidden = this.util.createDiv(element.id + \\\"Hidden\\\", \\\"nsGhostElement\\\");\\r\\n\\t\\t\\tdivHidden.style.width = this.util.getStyleValue(element,\\\"width\\\");\\r\\n\\t\\t\\tdivHidden.style.height = this.util.getStyleValue(element,\\\"height\\\");\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn divHidden;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initializeHiddenDiv = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__divHidden)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwException(1002,\\\"Dragging Util\\\",\\\"Function should return Ghost Element\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__divHidden.setAttribute(\\\"id\\\",this.__config.element.id + \\\"Hidden\\\");\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar setDimension = function(property)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!self.__config.element.style[property])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar propertyValue = self.util.getStyleValue(self.__config.element,property);\\r\\n\\t\\t\\t\\t\\tif(propertyValue !== \\\"auto\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tself.__divHidden.style[property] = propertyValue;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tsetDimension(\\\"width\\\");\\r\\n\\t\\t\\tsetDimension(\\\"height\\\");\\r\\n\\t\\t\\tthis.__divHidden.style.pointerEvents = \\\"none\\\";\\r\\n\\t\\t\\tvar element = this.__config.element;\\r\\n\\t\\t\\tvar parentNode = element.parentNode;\\r\\n\\t\\t\\ttry\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparentNode.appendChild(this.__divHidden);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcatch(error)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divHidden = this.util.getWebComponentElement(this.__divHidden);\\r\\n\\t\\t\\t\\tparentNode.appendChild(this.__divHidden);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tthis.__setHiddenDivVisiblity(false);\\r\\n\\t\\t};\\r\\n\\t\\t/*********************************Common Methods Ends*********************************/\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\t//Idea from http://stackoverflow.com/questions/4770025/how-to-disable-scrolling-temporarily\\r\\n\\tNSUtil.prototype.nsScrollEnableDisable = function(parent,orignalScrollHandler,enablerCallback)\\r\\n\\t{\\r\\n\\t\\tthis.__parent = parent;\\r\\n\\t\\tthis.__orignalScrollHandler = orignalScrollHandler;\\r\\n\\t\\tthis.__enablerCallback = enablerCallback;\\r\\n\\t\\t // spacebar: 32, pageup: 33, pagedown: 34, end: 35, home: 36\\r\\n\\t    // left: 37, up: 38, right: 39, down: 40\\r\\n\\t\\tthis.__scrollEventKeys = [32, 33, 34, 35, 36, 37, 38, 39, 40];\\r\\n\\t\\tthis.__lastScrollPos = [0,0];\\r\\n\\t\\t\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.disabled = false; \\r\\n\\t\\t\\r\\n\\t\\tthis.__parentMouseWheelRef = null;\\r\\n\\t\\tthis.__parentMouseScrollRef = null;\\r\\n\\t\\tthis.__parentTouchMoveRef = null;\\r\\n\\t\\tthis.__parentScrollRef = null;\\r\\n\\t\\tthis.__documentKeyDownRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.disable = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__lastScrollPos = [this.__parent.scrollLeft,this.__parent.scrollTop];\\r\\n\\t\\t\\tthis.disabled = true;\\r\\n\\t\\t\\tif(this.__orignalScrollHandler)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__parent,\\\"scroll\\\",this.__orignalScrollHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__parentMouseWheelRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__parentMouseWheelRef = this.__handleWheel.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__parent,\\\"mousewheel\\\",this.__parentMouseWheelRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__parentMouseScrollRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__parentMouseScrollRef = this.__handleWheel.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__parent,\\\"DOMMouseScroll\\\",this.__parentMouseScrollRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__parentTouchMoveRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__parentTouchMoveRef = this.__handleWheel.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__parent,\\\"touchmove\\\",this.__parentTouchMoveRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__parentScrollRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__parentScrollRef = this.__handleScrollbar.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__parent,\\\"scroll\\\",this.__parentScrollRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__documentKeyDownRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__documentKeyDownRef = this.__handleKeydown.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.doc,\\\"keydown\\\",this.__documentKeyDownRef);\\r\\n\\t\\t\\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.enable = function() \\r\\n\\t\\t{\\r\\n\\t    \\tthis.disabled = false;\\r\\n\\t    \\tif(this.__orignalScrollHandler)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__parent,\\\"scroll\\\",this.__orignalScrollHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__parentMouseWheelRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__parent,\\\"mousewheel\\\",this.__parentMouseWheelRef);\\r\\n\\t\\t\\t\\tthis.__parentMouseWheelRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__parentMouseScrollRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__parent,\\\"DOMMouseScroll\\\",this.__parentMouseScrollRef);\\r\\n\\t\\t\\t\\tthis.__parentMouseScrollRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__parentTouchMoveRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__parent,\\\"touchmove\\\",this.__parentTouchMoveRef);\\r\\n\\t\\t\\t\\tthis.__parentTouchMoveRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__parentScrollRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__parent,\\\"scroll\\\",this.__parentScrollRef);\\r\\n\\t\\t\\t\\tthis.__parentScrollRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__documentKeyDownRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.doc,\\\"keydown\\\",this.__documentKeyDownRef);\\r\\n\\t\\t\\t\\tthis.__documentKeyDownRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t    };\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleWheel = function(event) \\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t        event.preventDefault();\\r\\n\\t    };\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleScrollbar = function(event) \\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t        this.__parent.scrollLeft = this.__lastScrollPos[0];\\r\\n\\t        this.__parent.scrollTop = this.__lastScrollPos[1];\\r\\n\\t        if(this.__enablerCallback && this.__enablerCallback(event))\\r\\n\\t        {\\r\\n\\t        \\tthis.enable();\\r\\n\\t        }\\r\\n\\t    };\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleKeydown = function(event) \\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t        for (var count = 0; count < this.__scrollEventKeys.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t            if (event.keyCode === this.__scrollEventKeys[count]) \\r\\n\\t\\t\\t\\t{\\r\\n\\t                event.preventDefault();\\r\\n\\t                return;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t    };\\r\\n\\t};\\r\\n\\t\\r\\n\\t//Idea from http://stackoverflow.com/questions/10344498/best-way-to-iterate-over-an-array-without-blocking-the-ui\\r\\n\\tNSUtil.prototype.processArrayAsync = function(array,callBack,maxTimePerChunk,completeHandler,context,win) \\r\\n\\t{\\r\\n\\t\\tthis.__array = array;\\r\\n\\t\\tthis.__callBack = callBack;\\r\\n\\t\\tthis.__maxTimePerChunk = maxTimePerChunk || 50;\\r\\n\\t\\tthis.__completeHandler = completeHandler;\\r\\n\\t    this.__index = 0;\\r\\n\\t    \\r\\n\\t    this.util = new NSUtil();\\r\\n\\t    this.win = this.util.getWin(win);\\r\\n\\t    this.__context = context || this.win;\\r\\n\\t    this.__requestId = null;\\r\\n\\t    this.__hasPaused = false;\\r\\n\\t    this.__hasCompleted = false;\\r\\n\\t    \\r\\n\\t    this.start = function(startIndex)\\r\\n\\t    {\\r\\n\\t    \\tthis.__index = startIndex || 0;\\r\\n\\t    \\tthis.__hasPaused = false;\\r\\n\\t    \\tthis.__process();\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.stop = function()\\r\\n\\t    {\\r\\n\\t    \\tthis.__hasPaused = true;\\r\\n\\t    \\tif(this.__requestId)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tthis.win.cancelAnimationFrame(this.__requestId);\\r\\n\\t    \\t\\t//this.util.getCancelAnimationFrame.bind(this.win)(this.__requestId);\\r\\n\\t    \\t\\tthis.__requestId = null;\\r\\n\\t    \\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.resume = function()\\r\\n\\t    {\\r\\n\\t    \\tthis.__hasPaused = false;\\r\\n\\t    \\tif(!this.__hasCompleted)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tthis.__process();\\r\\n\\t    \\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.__process = function() \\r\\n\\t    {\\r\\n\\t    \\tif(!this.__hasPaused)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tvar startTime = this.__getCurrentTime();\\r\\n\\t            while(this.__index < this.__array.length && (this.__getCurrentTime() - startTime) <= this.__maxTimePerChunk) \\r\\n\\t            {\\r\\n\\t            \\tthis.__callBack.bind(this.__context)(this.__array[this.__index], this.__index, this.__array);\\r\\n\\t                ++this.__index;\\r\\n\\t            }\\r\\n\\t            if(this.__index < this.__array.length) \\r\\n\\t            {\\r\\n\\t                // set Timeout for async iteration\\r\\n\\t            \\tthis.__requestId = this.util.getRequestAnimationFrame.bind(this.win)(this.__process.bind(this));\\r\\n\\t            }\\r\\n\\t            else if(this.__completeHandler)\\r\\n\\t            {\\r\\n\\t            \\tthis.__completeHandler.bind(this.__context)();\\r\\n\\t            \\tthis.__hasCompleted = true;\\r\\n\\t            }\\r\\n\\t    \\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.__getCurrentTime = function()\\r\\n\\t    {\\r\\n\\t        return new Date().getTime();\\r\\n\\t    };\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.image = function(doc)\\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.doc = this.util.getDoc(doc);\\r\\n\\t\\tthis.getMoveIcon = function(toolTip)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__createImage('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAoZJREFUeNpsU81rE0EUf7uzu2lNVJL6Eb0IBWusepqcKm3wEFkvxqDgQbwUtYeeg5cccwj4F7QKChEPipRcdMGDiaAoJAexLYViwYsfbU1JYkx3Zz98b8220Wbg7ez7vXm/mffmN9Kh1G2QGQOmMDiRyYEkSaCoKjDGdAAooOUdxzFsIcDzPPhSvgeO7YDrOLBRmQdlJHULVE0DNRSCvqFjUuHqhWP8+etvhR5m0CeengVhmiAsywdl2Dt03K1wZSrO220XaCaf8AFrQel32s0mrDcaWfovrq3Vc9OTvHj/Tb0Xzh6JxQwNyxtIgPXpqqJk94fDM+1Oh6CaEF4QTiIOGJ/DdQtBObsEmGxbll/rkCyDPDwMzW4XhHD88EH0NcRxDUeX4/qdnsi0s8Aas+kEp8Zg82pMkmpDigKbjSbQTD7hFL94/jin9ZRHBNLo3Wrt+uUkbzQsiEZVMPGKfv76DaawodnahkhY86+PNnXxs77ZgVOjMahWVuufi1NJRZhWvvT0beHGtQn++Nm7en+DzqXO8vfVxX+wsYnT/JWxWEe95P0eILsvkkdPKn4PUEBJmunILab5992PLVU++skoNmOniT7JX2Fkt5GM1EjqbMohXzQmqo7KwCQ6zYKiabu30PpQAnZ0HKSRMcMRwnBddw4ZOO4GLRYKFFdDhrrteTMMdWB9/QTdH8sIp0EKmNT4GWDjGZAPJ3TcrbBv+ibfwtwDqBvzYck/truxYjjLZRDflwLt7JUmEoAymdPV7INa5IXn0Uw+4f8PIqATMLQIWpQ0E/RFTmQ4nLx0B1Zfzrsr5eAmbLQW2hYpHwkcqfegNBJhzwY9sGC4aCZaF81CAvePAAMAcwtApJX/Wo0AAAAASUVORK5CYII=',toolTip);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getLeftIcon = function(toolTip)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__createImage('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAe9JREFUeNqkUz1oE2EYfu7uuyRKLCFt6g+4VNQWWod+mQRRR1En0UFOHKoNCMKNju4SEQsOzsFNcRGl4CS42AzaKhKcsqhk0Etj7u+773y/6+USbOLSF5574b33eX+e906L4xh7MaYeC/c/IFcowMznEzDTBGPMoldnqEFtkPy708mIqvHHe0s7BcaYJYSwRwPu9vbYRH1XJI4tEYb2jYtHOHko9LvdxE9cYZQcBoF9+9oJ7jgRQt+HFAJSyv9rkO6UkGvXF3mr9QelkpkUINsYR6T8Jrkay8i+b9+5yfnmppMmSFw6e4yrIynBBsdS3jQ1PH/zeTiBIt+9dZpvbTlZh1+Oh/Z3F33XRUj7R1GUxA3DwMx0EYHnDUUMPe9Rfe1tc26uiL6M8aXno+UH6O7PIShPIapMQx6sQMxW4JbL+MkKCKhwNgGN2FD7Pnz82j63coF/aoc4ekDHtxfrzUniaZrW/FfEBomI9Scv7fnVq7zdBwIqajBWpeTd99d3vgBNCaQSzMOLyJ+6ApSPWxSzD61a/MfThupSjVuvxk2A3sazYYGBGbML0OcvW9rMyeRLFO8eVGXnKyacMiug5ikSplLs05dXzqNQWpbv6/URjpK+m6JH3GhQQI2QI+RTmBO0EwQ/RUBcqe31d/4rwAB0lPTXqN6HzgAAAABJRU5ErkJggg==',toolTip);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getRightIcon = function(toolTip)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__createImage('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfBJREFUeNqkUz1s00AU/hwSh1SEhiFCYuhCVSExgHRiYKjEVCEyMMGAsjCxZunesWM7dIgEA8JISPyoUhFDFoZOSE2GgtrSIAYWSEPb1HUS23c+8+7iuE5/JKQ+6fOdz/e+970fG2EY4jyWVo9b819hGEZ8WCgW4z2dV2lZFUJYgnNwz9PwXRebc3cGBMfN6XSQy+eHryyCMuv43dRpBCpSz7b1qlB+cI3RWkEYlv+LQFkgBLxuV8s9OAhQLk0w7vsnSHQKVMhqQuYRSRBouK5AqyXwpHSdvfywUYkKb8UEFIU9fXybOY6A+jbszGAP7O/7RBKg2eR4dH+KvV5ej0k0gaqobXO0214c3acUDnt99Pp9cKqDUqLsx68LuHd3gtU+b1eOCOiSaaZQKJjgMsSOy7EnJcSYCZnLwKbojic1weTVMXz81KhTexeSKdSXqrUzh2X84Qxr9SQmx1P48q6mnTPZrJUs4jMp5QlHlSd1Y203fRGFK8DPV28HzqZpjXShW3+D00bamCrpNU9DuvvcGsjea1rO+nvw39+AxRCGckyO8ciQFG8gPT27ptX8/b4gt1asYGdzRGE6MVCXCJcj5NShbG9B/NnYhttpyMYL5XmTYEdw1KgMFSgJJiEbIXNGPQXBi+CTrzTO+zv/E2AA3Y8Nbp4Kn1sAAAAASUVORK5CYII=',toolTip);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createImage = function(source,toolTip)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar img = this.doc.createElement('img');\\r\\n\\t\\t\\t\\timg.setAttribute(\\\"src\\\",source);\\r\\n\\t\\t\\t\\tif(toolTip)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\timg.setAttribute(\\\"title\\\",toolTip);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t        return img;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.localStorage = function(win)\\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.win = this.util.getWin(win);\\r\\n\\t\\tthis.STORAGE_PREFIX = \\\"nsStorage\\\";\\r\\n\\t\\tthis.setData = function(key,data) \\r\\n\\t\\t{\\r\\n\\t\\t    if (this.isAPISupported() && key) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar calcKey = this.__getKey(key);\\r\\n\\t\\t    \\tvar item = data;\\r\\n\\t\\t    \\tthis.removeData(calcKey);\\r\\n\\t\\t    \\tif(item && !this.util.isString(item) && this.__isJSONSupported())\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\titem = JSON.stringify(item);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tlocalStorage.setItem(calcKey,item);\\r\\n\\t\\t    \\treturn true;\\r\\n\\t\\t    }\\r\\n\\t\\t    return false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getData = function(key) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif (this.isAPISupported() && key) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = localStorage.getItem(this.__getKey(key));\\r\\n\\t\\t\\t    if (item) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tif(this.__isJSONSupported())\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\treturn JSON.parse(item);\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    \\telse\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\treturn item;\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    \\t\\r\\n\\t\\t\\t    }\\r\\n\\t\\t    }\\r\\n\\t\\t    return null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.removeData = function(key) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif (this.isAPISupported() && key) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlocalStorage.removeItem(this.__getKey(key));\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t    }\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.removeAll = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (this.isAPISupported()) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar callBack = function(key)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.removeData(key);\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.__manipulateAllKeys(callBack.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isAPISupported = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (!this.win.localStorage || !this.win.JSON) \\r\\n\\t\\t\\t{\\r\\n\\t\\t        return false;\\r\\n\\t\\t    }\\r\\n\\t\\t\\t return true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isJSONSupported = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (!this.win.JSON) \\r\\n\\t\\t\\t{\\r\\n\\t\\t        return false;\\r\\n\\t\\t    }\\r\\n\\t\\t\\t return true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__manipulateAllKeys = function(callBack) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(callBack)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar keyRegex = new RegExp(\\\"^\\\" + this.STORAGE_PREFIX + \\\"(.*)\\\");\\r\\n\\t\\t\\t\\tfor (var count = localStorage.length-1; count >= 0 ; --count) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t      var key = localStorage.key(count);\\r\\n\\t\\t\\t\\t      key = key && key.match(keyRegex);\\r\\n\\t\\t\\t\\t      key = key && key[1];\\r\\n\\t\\t\\t\\t      if (key && key.indexOf(this.STORAGE_PREFIX) < 0) \\r\\n\\t\\t\\t\\t      {\\r\\n\\t\\t\\t\\t    \\t  callBack(key);\\r\\n\\t\\t\\t\\t      }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getKey = function(key)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (this.STORAGE_PREFIX + key);\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.replaceHTMLFromObject = function(config,doc)\\r\\n\\t{\\r\\n\\t\\tthis.__config = config;\\r\\n\\t\\tthis.__setting = {};\\r\\n\\t\\t\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.doc = this.util.getDoc(doc);\\r\\n\\t\\tthis.__regex = \\\"([\\\\\\\\w\\\\\\\\.\\\\\\\\^]+)\\\";\\r\\n\\t\\tthis.__regexString = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__config)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__setting = \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstartSeparatorTag : (this.__config.startSeparatorTag) ? this.__config.startSeparatorTag : \\\"{{\\\",\\r\\n\\t\\t\\t\\tendSeparatorTag : (this.__config.endSeparatorTag) ? this.__config.endSeparatorTag : \\\"}}\\\"\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tthis.__regexString = this.__setting.startSeparatorTag + this.__regex + this.__setting.endSeparatorTag;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.replace = function(template,data,parent,isPureHTML) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retHTML = \\\"\\\";\\r\\n\\t\\t\\tif(template && data)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tisPureHTML = Boolean.parse(isPureHTML);\\r\\n\\t\\t\\t\\tvar innerHTML = \\\"\\\";\\r\\n\\t\\t\\t\\tif(isPureHTML)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tinnerHTML = template;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(this.util.isString(template))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar element = this.doc.querySelector(\\\"#\\\" + template);\\r\\n\\t\\t\\t\\t\\tif(element)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tinnerHTML = element.innerHTML;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(this.util.isElement(template))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttemplate = template.innerHTML;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tinnerHTML = template;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar length = data.length;\\r\\n\\t\\t\\t\\tfor (var count = 0;count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretHTML += this.__replaceWithItem(data[count],innerHTML);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\tif(parent)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.util.isString(parent))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar element = this.doc.querySelector(\\\"#\\\" + parent);\\r\\n\\t\\t\\t\\t\\t\\tif(element)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tparent = element;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(parent)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tparent.innerHTML += retHTML;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retHTML;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__replaceWithItem = function(item,htmlText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar html = null;\\r\\n\\t        for (prop in item) \\r\\n\\t        {\\r\\n\\t            var regex = new RegExp(this.__setting.startSeparatorTag + prop + this.__setting.endSeparatorTag,\\\"g\\\");\\r\\n\\t            html = (html || htmlText).replace(regex, item[prop]);\\r\\n\\t        }\\r\\n\\t        return html;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.nsPopUp = function(config,doc,win)\\r\\n\\t{\\r\\n\\t\\tthis.__config = config;\\r\\n\\t\\tthis.__setting = {};\\r\\n\\t\\tthis.__popUp = null;\\r\\n\\t\\tthis.__documentClickHandlerRef = null;\\r\\n\\t\\tthis.__lastZIndex = null;\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.doc = this.util.getDoc(doc);\\r\\n\\t\\tthis.win = this.util.getWin(win);\\r\\n\\t\\t\\r\\n\\t\\tthis.create = function (dataSource) \\r\\n\\t\\t{ \\r\\n\\t\\t\\tthis.__createElement();\\r\\n\\t\\t\\treturn this.__popUp;\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.remove = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__popUp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__popUp.parentNode.removeChild(this.__popUp);\\r\\n\\t\\t\\t\\tthis.__popUp = null;\\r\\n\\t\\t\\t\\tif(this.__documentClickHandlerRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(this.doc,\\\"click\\\",this.__documentClickHandlerRef);\\r\\n\\t\\t\\t\\t\\tthis.__documentClickHandlerRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.show = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__popUp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__popUp,\\\"nsShowPopUp\\\");\\r\\n\\t\\t\\t\\tif(this.__setting.setZIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar zIndex = this.util.getMaxZIndex();\\r\\n\\t\\t\\t\\t\\tif(zIndex > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(this.__popUp.style.zIndex)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__lastZIndex = this.__popUp.style.zIndex;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tthis.__popUp.style.zIndex = zIndex + 1;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.hide = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__popUp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__popUp,\\\"nsShowPopUp\\\");\\r\\n\\t\\t\\t\\tif(this.__lastZIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__popUp.style.zIndex = this.__lastZIndex;\\r\\n\\t\\t\\t\\t\\tthis.__lastZIndex = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__popUp.style.zIndex = \\\"\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.placePopUp = function(event,isAbsolute)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__popUp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar position = this.__setting[\\\"position\\\"];\\r\\n\\t\\t\\t\\tposition = this.__getSuggestedPosition(event,position);\\r\\n\\t\\t\\t\\tvar offset = this.__getOffset(event,position,isAbsolute);\\r\\n\\t\\t\\t\\tthis.__popUp.style.top = offset.top + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.__popUp.style.left = offset.left + \\\"px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.hideOtherNSPopUp = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrMenus = this.doc.querySelectorAll(\\\".nsPopUp\\\");\\r\\n\\t\\t\\tif(arrMenus && arrMenus.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar menu = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrMenus.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tmenu = arrMenus[count];\\r\\n\\t\\t\\t\\t\\tthis.util.removeStyleClass(menu,\\\"nsShowPopUp\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getPopUp = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__popUp;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isOpen = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__popUp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn this.util.hasStyleClass(this.__popUp,\\\"nsShowPopUp\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__config)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__setting = \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tid: this.__config[\\\"id\\\"] || null,\\r\\n\\t\\t\\t\\ttype: this.__config[\\\"type\\\"] || \\\"div\\\",\\r\\n\\t\\t\\t\\tparent: this.__config[\\\"parent\\\"] || this.doc.body,\\r\\n\\t\\t\\t\\twidth: this.__config[\\\"width\\\"] || -1,\\r\\n\\t\\t\\t\\tposition: this.__config[\\\"position\\\"] || this.util.POS_BOTTOMRIGHT,\\r\\n\\t\\t\\t\\tcloseOnOutsideClick: Boolean.parse(this.__config[\\\"closeOnOutsideClick\\\"]),\\r\\n\\t\\t\\t\\thideOrRemoveOnOutsideClick: this.__config[\\\"hideOrRemoveOnOutsideClick\\\"] || \\\"remove\\\",\\r\\n\\t\\t\\t\\ttitle: this.__config[\\\"title\\\"],\\r\\n\\t\\t\\t\\tsetZIndex: this.util.isUndefinedOrNull(this.__config[\\\"setZIndex\\\"]) ? true : Boolean.parse(this.__config[\\\"setZIndex\\\"]),\\r\\n\\t\\t\\t\\tcloseRequired: Boolean.parse(this.__config[\\\"closeRequired\\\"]),\\r\\n\\t\\t\\t\\tcloseHtml: this.__config[\\\"closeHtml\\\"],\\r\\n\\t\\t\\t};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createElement = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__popUp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.remove();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__popUp = this.doc.createElement(this.__setting[\\\"type\\\"]); \\r\\n\\t\\t\\tif(this.__setting[\\\"id\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__popUp.setAttribute(\\\"id\\\",this.__setting[\\\"id\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__popUp,\\\"nsPopUp\\\");\\r\\n\\t\\t\\tif(this.__setting.width)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isNumber(this.__setting.width) && parseInt(this.__setting.width) > -1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__popUp.style.width = this.__setting.width + \\\"px\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse //for width as auto\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__popUp.style.width = this.__setting.width;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__setting[\\\"title\\\"] || this.__setting[\\\"closeRequired\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__popUp.style.minHeight = \\\"50px\\\";\\r\\n\\t\\t\\t\\tvar divHead = this.util.createDiv(null,\\\"nsPopUpHeader\\\");\\r\\n\\t\\t\\t\\tvar divHeadContainer = this.util.createDiv(null,\\\"nsPopUpHeaderContainer\\\");\\r\\n\\t\\t\\t\\tvar divTitleContainer = this.util.createDiv(null,\\\"nsPopUpTitleContainer\\\");\\r\\n\\t\\t\\t\\tif(this.__setting[\\\"title\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar divTitle = this.util.createDiv(null,\\\"nsPopUpTitle\\\");\\r\\n\\t\\t\\t\\t\\tdivTitle.innerHTML = this.__setting[\\\"title\\\"];\\r\\n\\t\\t\\t\\t\\tdivTitleContainer.appendChild(divTitle);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tdivHeadContainer.appendChild(divTitleContainer);\\r\\n\\t\\t\\t\\tvar divCloseContainer = this.util.createDiv(null,\\\"nsPopUpCloseContainer\\\");\\r\\n\\t\\t\\t\\tif(this.__setting[\\\"closeRequired\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar btnTitle = this.util.createElement(\\\"button\\\",null,\\\"nsPopUpBtnClose\\\");\\r\\n\\t\\t\\t\\t\\tdivCloseContainer.appendChild(btnTitle);\\r\\n\\t\\t\\t\\t\\tbtnTitle.innerHTML = this.__setting[\\\"closeHtml\\\"] || \\\"<span class=\\\\\\\"nsPopUpClose\\\\\\\"></span>\\\";\\r\\n\\t\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(btnTitle,\\\"click\\\",function(event){\\r\\n\\t\\t\\t\\t\\t\\tself.__closeHandler.call(self,event);\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tdivHeadContainer.appendChild(divCloseContainer);\\r\\n\\t\\t\\t\\tdivHead.appendChild(divHeadContainer);\\r\\n\\t\\t\\t\\tthis.__popUp.appendChild(divHead);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__setting[\\\"closeOnOutsideClick\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__popUp,\\\"click\\\",this.__popUpClickHandler.bind(this));\\r\\n\\t\\t\\t\\tif(!this.__documentClickHandlerRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__documentClickHandlerRef = this.__documentClickHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.doc,\\\"click\\\",this.__documentClickHandlerRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__setting[\\\"parent\\\"].appendChild(this.__popUp);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__popUpClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__closeHandler(event);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__closeHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__setting.hideOrRemoveOnOutsideClick == \\\"remove\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.remove();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.hide();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__getOffset = function(event,position,isAbsolute)\\r\\n\\t\\t{\\r\\n\\t\\t\\t  var rectPopUp = this.__popUp.getBoundingClientRect();\\r\\n\\t\\t\\t  var item = {top: 0,left:0};\\r\\n\\t\\t\\t  if(rectPopUp)\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  var popUpWidth = rectPopUp.width;\\r\\n\\t\\t\\t\\t  var popUpHeight = rectPopUp.height;\\r\\n\\t\\t\\t\\t  var offset = null;\\r\\n\\t\\t\\t\\t  if(this.util.isElement(event))\\r\\n\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t  if(isAbsolute) {\\r\\n\\t\\t\\t\\t\\t\\t  var coords = this.__getAbsoluteOffset(event);\\r\\n\\t\\t\\t\\t\\t      offset = {\\r\\n\\t\\t\\t\\t            top: coords.top + event.offsetHeight,\\r\\n\\t\\t\\t\\t            left: coords.left\\r\\n\\t\\t\\t\\t\\t      };\\r\\n\\t\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t\\t  else {\\r\\n\\t\\t\\t\\t\\t\\t  var rects = event.getClientRects();\\r\\n\\t\\t\\t\\t\\t  \\t  offset = {top:rects[0].top + event.offsetHeight,left:rects[0].left};\\r\\n\\t\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t  else\\r\\n\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t  offset = this.util.getEventPosition(event);\\r\\n\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t  switch(position) \\r\\n\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\tcase this.util.POS_TOP:\\r\\n\\t\\t\\t\\t\\t\\titem.top = offset.top - popUpHeight;\\r\\n\\t\\t\\t\\t\\t\\titem.left = offset.left - popUpWidth / 2;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase this.util.POS_BOTTOM:\\r\\n\\t\\t\\t\\t\\t\\titem.top = offset.top;\\r\\n\\t\\t\\t\\t\\t\\titem.left = offset.left - popUpWidth / 2;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase this.util.POS_LEFT:\\r\\n\\t\\t\\t\\t\\t\\titem.top =  offset.top - popUpHeight / 2;\\r\\n\\t\\t\\t\\t\\t\\titem.left = offset.left - popUpWidth;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase this.util.POS_RIGHT:\\r\\n\\t\\t\\t\\t\\t\\titem.top =  offset.top - popUpHeight / 2,\\r\\n\\t\\t\\t\\t\\t\\titem.left = offset.left;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase this.util.POS_TOPLEFT:\\r\\n\\t\\t\\t\\t\\t\\titem.top = offset.top - popUpHeight;\\r\\n\\t\\t\\t\\t\\t\\titem.left = offset.left - popUpWidth;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase this.util.POS_TOPRIGHT:\\r\\n\\t\\t\\t\\t\\t\\titem.top =  offset.top - popUpHeight;\\r\\n\\t\\t\\t\\t\\t\\titem.left = offset.left;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase this.util.POS_BOTTOMLEFT:\\r\\n\\t\\t\\t\\t\\t\\titem.top =  offset.top;\\r\\n\\t\\t\\t\\t\\t\\titem.left = offset.left - popUpWidth;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase this.util.POS_BOTTOMRIGHT:\\r\\n\\t\\t\\t\\t\\t\\titem.top =  offset.top;\\r\\n\\t\\t\\t\\t\\t\\titem.left = offset.left;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t  }\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  return item;\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__getSuggestedPosition = function(event,position)\\r\\n\\t\\t{\\r\\n\\t\\t\\t  var popUpWidth = this.__popUp.clientWidth;\\r\\n\\t\\t\\t  var popUpHeight = this.__popUp.clientHeight;\\r\\n\\t\\t\\t  var offset = {};\\r\\n\\t\\t\\t  if(this.util.isElement(event))\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  var coords = this.__getAbsoluteOffset(event);\\r\\n\\t\\t\\t\\t  offset = {\\r\\n\\t\\t\\t        top: coords.top + event.offsetHeight,\\r\\n\\t\\t\\t        left: coords.left\\r\\n\\t\\t\\t\\t  };\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  else\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  event = this.util.getEvent(event);\\r\\n\\t\\t\\t\\t  offset = this.util.getEventPosition(event);\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  var top = this.win.scrollY;\\r\\n\\t\\t\\t  var left = this.win.scrollX;\\r\\n\\t\\t\\t  var totalWidth = this.win.innerWidth;\\r\\n\\t\\t\\t  var totalHeight = this.win.innerHeight;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t  var objPosition = {};\\r\\n\\t\\t\\t  objPosition[this.util.POS_TOP] = true;\\r\\n\\t\\t\\t  objPosition[this.util.POS_BOTTOM] = true;\\r\\n\\t\\t\\t  objPosition[this.util.POS_LEFT] = true;\\r\\n\\t\\t\\t  objPosition[this.util.POS_RIGHT] = true;\\r\\n\\t\\t\\t  if (offset.top < top) \\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  objPosition[this.util.POS_TOP] = false;\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  if (offset.top + popUpHeight > top + totalHeight) \\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  objPosition[this.util.POS_BOTTOM] = false;\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  if (offset.left < left)\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  objPosition[this.util.POS_LEFT] = false;\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  if (offset.left + popUpWidth > left + totalWidth) \\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  objPosition[this.util.POS_RIGHT] = false;\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t  var positions = position.split(\\\"-\\\");\\r\\n\\t\\t\\t  //below loop tries to give favourable position like bottom-right so if position has bottom and right both true it returns that position\\r\\n\\t\\t\\t  for (var count = 0; count < positions.length; count++) \\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\tif (!objPosition[positions[count]]) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}   \\r\\n\\t\\t\\t\\tif (count === positions.length - 1) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t  return position;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  //below loop tries to give one favourable position like in bottom-right if bottom is true or right is true it gets returned\\r\\n\\t\\t\\t  for (var count = 0; count < positions.length; count++) \\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\tif (objPosition[positions[count]]) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn positions[count];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  if (objPosition[position]) \\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  return position;\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  for(var tmpPosition in objPosition)\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  if (objPosition[tmpPosition]) \\r\\n\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t  return tmpPosition;\\r\\n\\t\\t\\t\\t  }\\r\\n\\t\\t\\t  }\\r\\n\\t\\t};\\r\\n\\t\\tthis.__getAbsoluteOffset = function(elem) {\\r\\n\\t\\t    var x = 0, y = 0;\\r\\n\\t\\t    while (elem) {\\r\\n\\t\\t        x += (elem.offsetLeft - elem.scrollLeft + elem.clientLeft);\\r\\n\\t\\t        y += (elem.offsetTop - elem.scrollTop + elem.clientTop);\\r\\n\\t\\t        elem = elem.offsetParent;\\r\\n\\t\\t    }\\r\\n\\t\\t    return { top: y, left: x };\\r\\n\\t\\t};\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.nsToolTipInElement = function(doc)\\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.doc = this.util.getDoc(doc);\\r\\n\\t\\tthis.__nsToolTip = null;\\r\\n\\t\\tthis.__nsToolTipContent = null;\\r\\n\\t\\tthis.__documentClickHandlerRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.addToolTip = function(element,toolTipHTML)\\r\\n\\t\\t{\\r\\n\\t\\t\\telement = this.util.getElement(element);\\r\\n\\t\\t\\tif(element && toolTipHTML && toolTipHTML.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__createToolTip();\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(element,\\\"nsElementTooltip\\\");\\r\\n\\t\\t\\t\\telement.setAttribute(\\\"nsToolTip\\\",toolTipHTML);\\r\\n\\t\\t\\t\\tthis.util.addEvent(element,\\\"mouseover\\\",this.__elementMouseOverHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.util.addEvent(element,\\\"mouseout\\\",this.__elementMouseOutHandler.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createToolTip = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__nsToolTip)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar id = \\\"nsElementToolTip\\\" + this.util.getUniqueId();\\r\\n\\t\\t\\t\\tthis.__nsToolTip = this.util.createElement(\\\"span\\\",id + \\\"ElementTooltipContainer\\\", \\\"nsElementTooltipContainer\\\");\\r\\n\\t\\t\\t\\tvar arrow = this.util.createElement(\\\"span\\\",id + \\\"ElementTooltipArrow\\\", \\\"nsElementTooltipTipArrow\\\");\\r\\n\\t\\t\\t\\tthis.__nsToolTip.appendChild(arrow);\\r\\n\\t\\t\\t\\tthis.__nsToolTipContent = this.util.createElement(\\\"span\\\",id + \\\"ElementTooltipContent\\\", \\\"nsElementTooltipContent\\\");\\r\\n\\t\\t\\t\\tthis.__nsToolTip.appendChild(this.__nsToolTipContent);\\r\\n\\t\\t\\t\\tthis.doc.body.appendChild(this.__nsToolTip);\\r\\n\\t\\t\\t\\tif(!this.__documentClickHandlerRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__documentClickHandlerRef = this.__documentClickHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.doc,\\\"click\\\",this.__documentClickHandlerRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__elementMouseOverHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\tif(!this.util.hasStyleClass(target, \\\"nsElementTooltip\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttarget = this.util.findParentBySelector(target,\\\".nsElementTooltip\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(target)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar toolTipHTML = target.getAttribute(\\\"nsToolTip\\\");\\r\\n\\t\\t\\t\\t//var parentWithScroll = \\r\\n\\t\\t\\t\\tthis.__nsToolTipContent.innerHTML = toolTipHTML;\\r\\n\\t\\t\\t\\tvar offset = this.util.getEventPosition(event);\\r\\n\\t\\t\\t\\tthis.__nsToolTip.style.left = offset.left + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.__nsToolTip.style.top = offset.top + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__nsToolTip,\\\"nsElementTooltipContainerVisible\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__elementMouseOutHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__nsToolTip,\\\"nsElementTooltipContainerVisible\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__elementMouseOutHandler();\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.nsCSSAnimationHelper = function()\\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__prefixes = [\\\"webkit\\\", \\\"moz\\\", \\\"MS\\\", \\\"o\\\", \\\"\\\"];\\r\\n\\t\\t\\r\\n\\t\\tthis.addStartEvent = function(element,callback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__addEvent(element,\\\"AnimationStart\\\",callback);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.addIterationEvent = function(element,callback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__addEvent(element,\\\"AnimationIteration\\\",callback);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.addEndEvent = function(element,callback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__addEvent(element,\\\"AnimationEnd\\\",callback);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.removeStartEvent = function(element,callback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__removeEvent(element,\\\"AnimationStart\\\",callback);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.removeIterationEvent = function(element,callback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__removeEvent(element,\\\"AnimationIteration\\\",callback);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.removeEndEvent = function(element,callback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__removeEvent(element,\\\"AnimationEnd\\\",callback);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__addEvent = function(element,type,callback) \\r\\n\\t\\t{\\r\\n\\t\\t    for (var count = 0; count < this.__prefixes.length; count++) \\r\\n\\t\\t    {\\r\\n\\t\\t        if (!this.__prefixes[count])\\r\\n\\t\\t        {\\r\\n\\t\\t        \\ttype = type.toLowerCase();\\r\\n\\t\\t        }\\r\\n\\t\\t        var eventType = this.__prefixes[count] + type;\\r\\n\\t\\t        this.util.addEvent(element,eventType,callback);\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__removeEvent = function(element,type,callback) \\r\\n\\t\\t{\\r\\n\\t\\t    for (var count = 0; count < this.__prefixes.length; count++) \\r\\n\\t\\t    {\\r\\n\\t\\t        if (!this.__prefixes[count])\\r\\n\\t\\t        {\\r\\n\\t\\t        \\ttype = type.toLowerCase();\\r\\n\\t\\t        }\\r\\n\\t\\t        var eventType = this.__prefixes[count] + type;\\r\\n\\t\\t        this.util.removeEvent(element,eventType,callback);\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSUtil.prototype.nsResizeListener = function(doc,win)\\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.doc = this.util.getDoc(doc);\\r\\n\\t\\tthis.win = this.util.getWin(win);\\r\\n\\t\\tthis.__windowResizeRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.addResizeListener = function(element,callback) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__isResizeObserverSupported())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__addResizeObserver(element,callback);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__isMutationSupported()) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__addMutationObserver(element,callback);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__addResizeListener(element,callback);\\r\\n\\t\\t\\t}\\r\\n\\t    };\\r\\n\\t    //below method will not work as we have to store the reference and then detach it\\r\\n\\t    this.removeResizeListener = function(element,callback) \\r\\n\\t    {\\r\\n\\t    \\tif(this.__isResizeObserverSupported())\\r\\n\\t\\t\\t{\\r\\n\\t    \\t\\tthis.__removeResizeObserver(element,callback);\\r\\n\\t\\t\\t}\\r\\n\\t    \\telse if(this.__isMutationSupported())\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tif(this.__windowResizeRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t    \\t\\t\\tthis.util.removeEvent(this.win,\\\"resize\\\",this.__windowResizeRef);\\r\\n\\t    \\t\\t\\tthis.__windowResizeRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t    \\t}\\r\\n\\t    \\telse\\r\\n\\t    \\t{\\r\\n\\t    \\t\\telement.__resizeListeners__.splice(element.__resizeListeners__.indexOf(callback), 1);\\r\\n\\t            if (!element.__resizeListeners__.length) \\r\\n\\t            {\\r\\n\\t                if (attachEvent) \\r\\n\\t                {\\r\\n\\t                \\telement.detachEvent('onresize', this.__resizeListener.bind(this));\\r\\n\\t                }\\r\\n\\t                else \\r\\n\\t                {\\r\\n\\t                    element.__resizeTrigger__.contentDocument.defaultView.removeEventListener('resize', this.__resizeListener.bind(this));\\r\\n\\t                    element.__resizeTrigger__ = !element.removeChild(element.__resizeTrigger__);\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t    \\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.__addResizeObserver = function(element,callback)\\r\\n\\t    {\\r\\n\\t    \\t//For performance reason creating 1 instance of ResizeObserver\\r\\n\\t\\t\\tif(!NSUtil.__resizeObserverInstance)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tNSUtil.__resizeObserverInstance = new ResizeObserver(function(entries)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor (var count = 0;count < entries.length; count++) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar entry = entries[count];\\r\\n\\t\\t\\t\\t\\t\\tvar callbacks = NSUtil.__resizeObserverCallbacks.get(entry.target);\\r\\n\\t\\t\\t\\t\\t\\tif (callbacks) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tcallbacks.forEach(function logSetElements(key,value,set) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvalue(entry,entry.target);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t  //console.log(key);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t  //console.log(value);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t  //console.log(set);\\r\\n\\t\\t\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t\\t\\t\\tfor (var innerCount = 0;innerCount < callbacks.length; innerCount++) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcallbacks[innerCount](entry,entry.target);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (!NSUtil.__resizeObserverCallbacks) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tNSUtil.__resizeObserverCallbacks = new Map();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar callbacks = NSUtil.__resizeObserverCallbacks.get(element);\\r\\n\\t\\t\\tif (!callbacks) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcallbacks = new Set();\\r\\n\\t\\t\\t\\tNSUtil.__resizeObserverCallbacks.set(element,callbacks);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcallbacks.add(callback);\\r\\n\\t\\t\\tNSUtil.__resizeObserverInstance.observe(element);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.__addMutationObserver = function(element,callback)\\r\\n\\t    {\\r\\n\\t    \\tvar self = this;\\r\\n\\t\\t\\tfunction getParameter(ele) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(ele)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn [ele.style.width,ele.style.height,ele.clientWidth,ele.clientHeight].join('');\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar win = self.win;\\r\\n\\t\\t\\t\\t\\treturn [win.innerWidth,win.innerHeight].join('');\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t    \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar resizeCallback = function(event)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar current = getParameter(element);\\r\\n\\t\\t\\t\\tvar currentWin = getParameter();\\r\\n\\t\\t\\t\\tif (current !== last || currentWin !== lastWin) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tlast = current;\\r\\n\\t\\t\\t\\t\\tlastWin = currentWin;\\r\\n\\t\\t\\t\\t\\tcallback(event,element);\\r\\n\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar last = getParameter(element);\\r\\n\\t\\t\\tvar lastWin = getParameter();\\r\\n\\t\\t\\tvar observer = new MutationObserver(function (mutations) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (var count = 0; count < mutations.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t    var mutation = mutations[count];\\r\\n\\t\\t\\t\\t    if (mutation.attributeName !== \\\"style\\\")\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\tcontinue;\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t    if(resizeCallback())\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\t  break;\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t});\\r\\n\\t\\t\\tobserver.observe(element,{\\r\\n\\t\\t\\t    attributes: true,\\r\\n\\t\\t\\t    childList: false,\\r\\n\\t\\t\\t    characterData: false\\r\\n\\t\\t\\t});\\r\\n\\t\\t\\tif(!this.__windowResizeRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__windowResizeRef = resizeCallback.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.win,\\\"resize\\\",this.__windowResizeRef);\\r\\n\\t\\t\\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.__addResizeListener = function(element,callback)\\r\\n\\t    {\\r\\n\\t    \\tif (!element.__resizeListeners__) \\r\\n\\t        {\\r\\n\\t            element.__resizeListeners__ = [];\\r\\n\\t            if (this.doc.attachEvent) \\r\\n\\t            {\\r\\n\\t                element.__resizeTrigger__ = element;\\r\\n\\t                element.attachEvent('onresize', this.__resizeListener.bind(this));\\r\\n\\t            } \\r\\n\\t            else \\r\\n\\t            {\\r\\n\\t                if (getComputedStyle(element).position === 'static') \\r\\n\\t                {\\r\\n\\t                \\telement.style.position = 'relative';\\r\\n\\t                }\\r\\n\\t                var obj = element.__resizeTrigger__ = this.doc.createElement('object');\\r\\n\\t                this.util.addStyleClass(obj,\\\"nsResizeDetector\\\");\\r\\n\\t                obj.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;');\\r\\n\\t                obj.__resizeElement__ = element;\\r\\n\\t                obj.onload = this.__objectLoad.bind(this);\\r\\n\\t                obj.type = 'text/html';\\r\\n\\t                var isIE = navigator.userAgent.match(/Trident/);//this.util.isBrowserIE();\\r\\n\\t                if(isIE) \\r\\n\\t                {\\r\\n\\t                \\telement.appendChild(obj);\\r\\n\\t                }\\r\\n\\t                obj.data = 'about:blank';\\r\\n\\t                if(!isIE) \\r\\n\\t                {\\r\\n\\t                \\telement.appendChild(obj);\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        element.__resizeListeners__.push(callback);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    //if callback is null then delete and unobserver the element else just delete the callback\\r\\n\\t    this.__removeResizeObserver = function(element,callback) \\r\\n\\t    {\\r\\n\\t\\t\\tvar callbacks = NSUtil.__resizeObserverCallbacks.get(element);\\r\\n\\t\\t\\tif (callbacks) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcallback && callbacks.delete(callback);\\r\\n\\t\\t\\t\\tif (!callback || !callbacks.size) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tNSUtil.__resizeObserverCallbacks.delete(element);\\r\\n\\t\\t\\t\\t\\tNSUtil.__resizeObserverInstance.unobserve(element);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (NSUtil.__resizeObserverCallbacks && !NSUtil.__resizeObserverCallbacks.size) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tNSUtil.__resizeObserverCallbacks = null;\\r\\n\\t\\t\\t\\tNSUtil.__resizeObserverInstance = null;\\r\\n\\t\\t\\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.__resizeListener = function(event) \\r\\n\\t    {\\r\\n\\t    \\tvar requestAnimation = function()\\r\\n\\t    \\t{\\r\\n\\t    \\t\\t var trigger = win.__resizeTrigger__;\\r\\n\\t             trigger.__resizeListeners__.forEach(function (callback) \\r\\n\\t             {\\r\\n\\t                 callback(event,trigger);\\r\\n\\t             });\\r\\n\\t    \\t};\\r\\n\\t    \\tvar win = this.util.getTarget(event);\\r\\n\\t        if (win.__resizeRAF__) \\r\\n\\t        {\\r\\n\\t        \\tthis.util.getCancelAnimationFrame.bind(this.win)(win.__resizeRAF__);\\r\\n\\t        }\\r\\n\\t        win.__resizeRAF__ = this.util.getRequestAnimationFrame.bind(this.win)(requestAnimation.bind(this));\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.__objectLoad = function(event) \\r\\n\\t    {\\r\\n\\t    \\tvar target = this.util.getTarget(event);\\r\\n\\t    \\ttarget.contentDocument.defaultView.__resizeTrigger__ = target.__resizeElement__;\\r\\n\\t    \\ttarget.contentDocument.defaultView.addEventListener('resize', this.__resizeListener.bind(this));\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.__isMutationSupported = function()\\r\\n\\t    {\\r\\n\\t    \\treturn (\\\"MutationObserver\\\" in this.win);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.__isResizeObserverSupported = function()\\r\\n\\t    {\\r\\n\\t    \\treturn (\\\"ResizeObserver\\\" in this.win);\\r\\n\\t    };\\r\\n\\t};\\r\\n\\t\\r\\n\\t//if renderer component is refreshed using updateRowByIndex,updateRowByKeyField,updateCellByIndex,updateCellByKeyField \\r\\n    //then React throws error in removeChild as Grid is internally deleting all cell element while reRendering data\\r\\n\\tNSUtil.prototype.overrideRemoveChild = function()\\r\\n\\t{\\r\\n\\t\\tif(!Element.prototype.__removeChild) \\r\\n\\t\\t{\\r\\n\\t\\t\\tDocument.prototype.__removeChild = Document.prototype.removeChild;\\r\\n\\t\\t\\tElement.prototype.__removeChild = Element.prototype.removeChild;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tDocument.prototype.removeChild = Element.prototype.removeChild = function removeChild(child) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(child && child.parentNode) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(child.parentNode == this)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__removeChild(child);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tchild.parentNode.__removeChild(child);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tif (!String.prototype.startsWith) \\r\\n\\t{\\r\\n\\t\\t  String.prototype.startsWith = function(searchString, position) \\r\\n\\t\\t  {\\r\\n\\t\\t    position = position || 0;\\r\\n\\t\\t    return this.indexOf(searchString, position) === position;\\r\\n\\t\\t  };\\r\\n\\t}\\r\\n\\t\\r\\n\\tif (!Element.prototype.matches) \\r\\n\\t{\\r\\n\\t    Element.prototype.matches = Element.prototype.msMatchesSelector;\\r\\n\\t}\\r\\n\\t\\r\\n\\t(function(doc, proto) \\r\\n\\t{\\r\\n\\t  try \\r\\n\\t  { // check if browser supports :scope natively\\r\\n\\t    doc.querySelector(':scope body');\\r\\n\\t  } \\r\\n\\t  catch (err) \\r\\n\\t  { // polyfill native methods if it doesn't\\r\\n\\t    ['querySelector', 'querySelectorAll'].forEach(function(method) \\r\\n\\t    {\\r\\n\\t      var nativ = proto[method];\\r\\n\\t      proto[method] = function(selectors) \\r\\n\\t      {\\r\\n\\t        if (/(^|,)\\\\s*:scope/.test(selectors)) { // only if selectors contains :scope\\r\\n\\t          var id = this.id; // remember current element id\\r\\n\\t          this.id = 'ID_' + Date.now(); // assign new unique id\\r\\n\\t          selectors = selectors.replace(/((^|,)\\\\s*):scope/g, '$1#' + this.id); // replace :scope with #ID\\r\\n\\t          var result = doc[method](selectors);\\r\\n\\t          this.id = id; // restore previous id\\r\\n\\t          return result;\\r\\n\\t        } else {\\r\\n\\t          return nativ.call(this, selectors); // use native code for other selectors\\r\\n\\t        }\\r\\n\\t      };\\r\\n\\t    });\\r\\n\\t  }\\r\\n\\t})(this.doc, Element.prototype);\\r\\n\\t\\r\\n\\treturn NSUtil;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSUtil\\\",NSUtil);\";","export const NSContainerBaseCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\n\\r\\n\\t\\t}\\r\\n\\\"use strict\\\";\\r\\nvar nsExtendPrototype = (function()\\r\\n{\\r\\n\\tvar nsExtendPrototype = function(source,destination) \\r\\n\\t{\\r\\n\\t\\tif(source && destination)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdestination.prototype = Object.create(source.prototype);\\r\\n\\t\\t\\tdestination.prototype.constructor = destination;\\r\\n\\t\\t\\tdestination.prototype.base = source.prototype;\\r\\n\\t\\t\\treturn source.prototype;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\treturn nsExtendPrototype;\\r\\n})();\\r\\nnsModuleExport(this,\\\"nsExtendPrototype\\\",nsExtendPrototype);\\r\\n\\r\\nvar NSContainerBase = (function()\\r\\n{\\r\\n\\tvar NSContainerBase = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\t/*start of functions */\\r\\n\\t//set checkVisibility to true if component needs to reRender when baseComponent width or height > 0 or baseComponent is Visible\\r\\n\\tNSContainerBase.prototype.__setBaseComponent = function(component,checkVisibility)\\r\\n\\t{\\r\\n\\t\\tif(component)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__baseComponent = (typeof component == \\\"string\\\") ? document.getElementById(component) : component;\\r\\n\\t\\t\\tthis.__initialize();\\r\\n\\t\\t\\tif(checkVisibility == true)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__checkBaseComponentVisibility();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthrow new Error(\\\"Component is undefined\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.__initialize = function() \\r\\n\\t{\\r\\n\\t\\tthis.INITIALIZE = \\\"initialize\\\";\\r\\n\\t\\tthis.CREATION_COMPLETE = \\\"creationComplete\\\";\\r\\n\\t\\tthis.PROPERTY_CHANGE = \\\"propertyChange\\\";\\r\\n\\t\\tthis.REMOVE = \\\"remove\\\";\\r\\n\\t\\tthis.RESIZE = \\\"resize\\\";\\r\\n\\t\\t\\r\\n\\t\\t  /*start of private variables */\\r\\n\\t\\t//this.__baseComponent = null;\\r\\n\\t\\tthis.__isCreationCompleted = false;\\r\\n\\t\\tthis.__isRemoved = false;\\r\\n\\t\\tthis.__setProperty = true; \\r\\n\\t\\tthis.__id = null;\\r\\n\\t\\tthis.__shadow = null;\\r\\n\\t\\tthis.__focused = false;\\r\\n\\t\\tthis.__mediaQuery = null;\\r\\n\\t\\tthis.__arrQueries = [];\\r\\n\\t\\tthis.__arrQueriesTrimmed = [];\\r\\n\\t\\tthis.__focusHandlerRef = null;\\r\\n\\t\\tthis.__blurHandlerRef = null;\\r\\n\\t\\tthis.__resizeHandlerRef = null;\\r\\n\\t\\tthis.__nsResizeListener = null;\\r\\n\\t\\tthis.__baseDocumentMouseDownRef = null;\\r\\n\\t\\tthis.__creationCompleteInterval = -1;\\r\\n\\t\\tthis.__themeContainer = null;\\r\\n\\t\\tthis.__themePrefix = null;\\r\\n\\t\\tthis.__theme = \\\"White\\\";\\r\\n\\t\\tthis.__domVariables = null; \\r\\n\\t\\tthis.__doc = null;\\r\\n\\t\\tthis.__win = null;\\r\\n\\t\\tthis.__isMobile = false;\\r\\n\\t\\tthis.__baseCompObserver = null;\\r\\n\\t\\t  /*end of private variables */\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__setDomVariables();\\r\\n\\t\\tthis.__setID();\\r\\n\\t\\tthis.initializeComponent();\\r\\n\\t\\tif(this.util.isElementInDOM(this.__baseComponent))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__creationComplete();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.__creationCompleteInterval = setTimeout(\\r\\n\\t\\t\\tfunction()\\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\tself.__callCreationComplete.bind(self)();\\r\\n\\t\\t\\t},10);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__focusHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__focusHandlerRef = this.focusHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(this.__baseComponent,\\\"focus\\\",this.__focusHandlerRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__blurHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__blurHandlerRef = this.blurHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(this.__baseComponent,\\\"blur\\\",this.__blurHandlerRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__baseDocumentMouseDownRef && this.__baseComponent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__baseDocumentMouseDownRef = this.__baseDocumentMouseDownHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"mousedown\\\", this.__baseDocumentMouseDownRef);\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,this.INITIALIZE);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.__callCreationComplete = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__creationCompleteInterval != -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tclearTimeout(this.__creationCompleteInterval);\\r\\n\\t\\t\\tthis.__creationCompleteInterval = -1;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isElementInDOM(this.__baseComponent))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__creationComplete();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.__creationCompleteInterval = setTimeout(\\r\\n\\t\\t\\tfunction()\\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\tself.__callCreationComplete.bind(self)();\\r\\n\\t\\t\\t},10);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.__creationComplete = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__isCreationCompleted)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setProperty = false;\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsContainer\\\");\\r\\n\\t\\t\\tif(this.__isMobile)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsContainerMobile\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.setComponentProperties();\\r\\n\\t\\t\\tthis.__addMediaQueries();\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,this.CREATION_COMPLETE);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.__checkBaseComponentVisibility = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__baseComponent && !this.__baseCompObserver)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isElementVisible(this.__baseComponent))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tvar callback = function() \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(self.util.isElementVisible(self.__baseComponent))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(self.__baseCompObserver)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tclearInterval(self.__baseCompObserver);\\r\\n\\t\\t\\t\\t\\t\\t\\tself.__baseCompObserver = null;\\r\\n\\t\\t\\t\\t\\t\\t\\tif(self[\\\"reRender\\\"])\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tself[\\\"reRender\\\"].call(self);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.__baseCompObserver = setInterval(function(){ callback() }, 1000);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__baseCompObserver)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tclearInterval(this.__baseCompObserver);\\r\\n\\t\\t\\t\\t\\tthis.__baseCompObserver = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//derived component should call this function to attach resize listener so that \\r\\n\\t//when the component is fully rendered then resize starts working than in between \\r\\n\\tNSContainerBase.prototype.attachResizeListener = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__resizeHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__resizeHandlerRef = this.resizeHandler.bind(this);\\r\\n\\t\\t\\tthis.__nsResizeListener = new this.util.nsResizeListener();\\r\\n\\t\\t\\tthis.__nsResizeListener.addResizeListener(this.__baseComponent,this.__resizeHandlerRef);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.attributeChangedCallback = function(attrName, oldVal, newVal)\\r\\n\\t{\\r\\n\\t\\tvar data = {};\\r\\n\\t\\tdata.propertyName = attrName;\\r\\n\\t\\tdata.oldValue = oldVal;\\r\\n\\t\\tdata.newValue = newVal;\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,this.PROPERTY_CHANGE,data);\\r\\n\\t\\tthis.propertyChange(attrName, oldVal, newVal, this.__setProperty);\\r\\n\\t\\tthis.__setProperty = true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.detachedCallback = function()\\r\\n\\t{\\r\\n\\t\\tthis.removeComponent();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.__setDomVariables = function()\\r\\n\\t{\\r\\n\\t\\tthis.__domVariables = this.util.getDomVariables();\\r\\n\\t\\tthis.__doc = this.__domVariables.doc;\\r\\n\\t\\tthis.__win = this.__domVariables.win;\\r\\n\\t\\tvar objMobile = this.util.isMobile(this.__win);\\r\\n\\t\\tthis.__isMobile = objMobile.any;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.__setID = function()\\r\\n\\t{\\r\\n\\t\\tvar setID = false;\\r\\n\\t\\tif(this.__baseComponent && this.__baseComponent.hasAttribute(\\\"id\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__id = this.__baseComponent.getAttribute(\\\"id\\\");\\r\\n\\t\\t}\\r\\n\\t\\telse if(this.__baseComponent && this.__baseComponent.hasAttribute(\\\"name\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__id = this.__baseComponent.getAttribute(\\\"name\\\");\\r\\n\\t\\t\\tsetID = true;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__id = \\\"comp\\\" + this.util.getUniqueId();\\r\\n\\t\\t\\tsetID = true;\\r\\n\\t\\t}\\r\\n\\t\\tif(setID)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__baseComponent.setAttribute(\\\"id\\\",this.__id);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.__applyTheme = function(container,themePrefix) \\r\\n\\t{\\r\\n\\t\\tif(container)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__themeContainer = container;\\r\\n\\t\\t\\tthis.__themePrefix = themePrefix;\\r\\n\\t\\t\\tthis.setTheme(this.__theme);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.__addMediaQueries = function(isReset) \\r\\n\\t{\\r\\n\\t\\tif(this.__arrQueries && this.__arrQueries.length && (!this.__arrQueriesTrimmed.length || isReset))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar query = null;\\r\\n\\t\\t\\tvar mediaQuery = null;\\r\\n\\t\\t\\tvar trimmedMediaQuery = null;\\r\\n\\t\\t\\tfor (var count = 0; count < this.__arrQueries.length; count++)\\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\tquery = this.__arrQueries[count];\\r\\n\\t\\t\\t\\ttrimmedMediaQuery = query.replace(/ /g, \\\"\\\");\\r\\n\\t\\t\\t\\tthis.__arrQueriesTrimmed.push(trimmedMediaQuery);\\r\\n\\t\\t\\t\\tmediaQuery = window.matchMedia(query);\\r\\n\\t\\t\\t\\tmediaQuery.addListener(this.__mediaChangeHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.__mediaChangeHandler(mediaQuery);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.__mediaChangeHandler = function(changed) \\r\\n\\t{\\r\\n\\t\\tvar conditionTrue = false;\\r\\n\\t\\tif(changed.matches) \\r\\n\\t\\t{\\r\\n\\t\\t\\tconditionTrue = true;\\r\\n\\t    } \\r\\n\\t\\tvar tempMedia = changed.media.replace(/ /g, \\\"\\\");\\r\\n\\t\\tvar queryIndex = -1;\\r\\n\\t\\tvar trimmedMediaQuery = null;\\r\\n\\t\\tvar length = this.__arrQueriesTrimmed.length;\\r\\n\\t\\tfor (var count = 0; count < length; count++)\\r\\n\\t\\t{ \\r\\n\\t\\t\\ttrimmedMediaQuery = this.__arrQueriesTrimmed[count];\\r\\n\\t\\t\\tif(conditionTrue)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t/*console.log(tempMedia);\\r\\n\\t\\t\\t\\tconsole.log(trimmedMediaQuery);\\r\\n\\t\\t\\t\\tconsole.log(tempMedia == trimmedMediaQuery);*/\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(tempMedia === trimmedMediaQuery)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tqueryIndex = count;\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.deviceViewChanged(conditionTrue,queryIndex,changed.media);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.resizeHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.componentResized(event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.__isCreationCompleted = true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty) \\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.__isRemoved = true;\\r\\n\\t\\tif(this.__baseCompObserver)\\r\\n\\t\\t{\\r\\n\\t\\t\\tclearInterval(this.__baseCompObserver);\\r\\n\\t\\t\\tthis.__baseCompObserver = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__resizeHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsResizeListener.removeResizeListener(this.__baseComponent,this.__resizeHandlerRef);\\r\\n\\t\\t\\tthis.__resizeHandlerRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__baseDocumentMouseDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"mousedown\\\", this.__baseDocumentMouseDownRef);\\r\\n\\t\\t\\tthis.__baseDocumentMouseDownRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,this.REMOVE);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.deviceViewChanged = function(conditionTrue,queryIndex,query) \\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.initializeDOM = function(requireStyleClass)\\r\\n\\t{\\r\\n\\t\\tif(document.head.createShadowRoot) \\r\\n\\t\\t{\\r\\n\\t\\t    if(!this.__shadow)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__shadow = this.__baseComponent.createShadowRoot();\\r\\n\\t\\t    }\\r\\n\\t\\t    if(requireStyleClass)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar shadow = this.__shadow;\\r\\n\\t\\t    \\tnew this.util.ajax(ns.__dicPath[\\\"nsComponent.css\\\"], function (response) {\\r\\n\\t\\t    \\t\\tif(response)\\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\tvar sheet = document.createElement(\\\"style\\\");\\r\\n\\t\\t\\t\\t    \\tsheet.innerHTML = response;\\r\\n\\t\\t\\t\\t    \\tshadow.appendChild(sheet);\\r\\n\\t\\t    \\t\\t}\\r\\n\\t\\t\\t    });\\r\\n\\t\\t    \\tnew this.util.ajax(requireStyleClass, function (response) {\\r\\n\\t\\t    \\t\\tif(response)\\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\tvar sheet = document.createElement(\\\"style\\\");\\r\\n\\t\\t\\t\\t    \\tsheet.innerHTML = response;\\r\\n\\t\\t\\t\\t    \\tshadow.appendChild(sheet);\\r\\n\\t\\t    \\t\\t}\\r\\n\\t\\t\\t    });\\r\\n\\t\\t    \\t\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.getID = function() \\r\\n\\t{\\r\\n\\t\\treturn this.__id;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.focusHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tthis.__focused = true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.blurHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tthis.__focused = false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.__baseDocumentMouseDownHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__baseComponent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\tvar hasFocus = (this.__baseComponent === target || (this.__baseComponent.compareDocumentPosition(target) & Node.DOCUMENT_POSITION_CONTAINED_BY));\\r\\n\\t\\t\\thasFocus = (hasFocus > 0);\\r\\n\\t\\t\\tif(hasFocus != this.__focused)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\thasFocus = hasFocus ? this.focusHandler(event) : this.blurHandler(event);\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.addChild = function(element)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t    if(this.__shadow)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\t this.__shadow.appendChild(element);\\r\\n\\t\\t    }\\r\\n\\t\\t\\telse \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__baseComponent.appendChild(element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.deleteChild = function(element)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t    if(this.__shadow)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\t this.__shadow.removeChild(element);\\r\\n\\t\\t    }\\r\\n\\t\\t\\telse \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    this.removeChild(element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.setStyle = function(styleProp,value) \\r\\n\\t{\\r\\n\\t\\tif(this.__baseComponent && styleProp && !this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__baseComponent.style[styleProp] = value;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.setFocus = function(isFocus)\\r\\n\\t{\\r\\n\\t    this.__focused = isFocus;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.hasFocus = function()\\r\\n\\t{\\r\\n\\t    return this.__focused;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.isRemoved = function()\\r\\n\\t{\\r\\n\\t    return this.__isRemoved;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.setTheme = function(theme) \\r\\n\\t{\\r\\n\\t\\tif(this.__themeContainer && this.__themePrefix)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__isMobile)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsContainerMobile\\\" +  this.__theme);\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__themeContainer,this.__themePrefix + \\\"Mobile\\\" +  this.__theme);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__themeContainer,this.__themePrefix + this.__theme);\\r\\n\\t\\t\\tthis.__theme = theme;\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__themeContainer,this.__themePrefix + this.__theme);\\r\\n\\t\\t\\tif(this.__isMobile)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsContainerMobile\\\" +  this.__theme);\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__themeContainer,this.__themePrefix + \\\"Mobile\\\" + this.__theme);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSContainerBase.prototype.changeProperty = function(propertyName,value)\\r\\n\\t{\\r\\n\\t\\tthis.__setProperty = true;\\r\\n\\t\\tthis.attributeChangedCallback(propertyName,null,value);\\r\\n\\t};\\r\\n\\t/*end of functions */\\r\\n\\t\\r\\n\\treturn NSContainerBase;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSContainerBase\\\",NSContainerBase);\";","export const NSDateUtilCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\n\\r\\n\\t\\t}\\r\\n\\\"use strict\\\"; \\r\\n/*  Taken from http://www.JavascriptToolbox.com but has been modified */\\r\\nvar NSDateUtil = (function()\\r\\n{\\r\\n\\tfunction NSDateUtil() \\r\\n\\t{\\r\\n\\t\\tthis.__monthNames = new Array('January','February','March','April','May','June','July','August','September','October','November','December');\\r\\n\\t\\tthis.__monthNamesShort = new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');\\r\\n\\t\\tthis.__dayNames = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');\\r\\n\\t\\tthis.__dayNamesShort = new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');\\r\\n\\t\\tthis.__dayNamesMini = new Array('Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa');\\r\\n\\t\\tthis.__dateFormat = \\\"mm/dd/yyyy\\\";\\r\\n\\t\\t\\r\\n\\t\\tvar self = this;\\r\\n\\t\\t\\r\\n\\t\\tthis.format = function(date,format,settings)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = \\\"\\\";\\r\\n\\t\\t\\tif(this.isValidDate(date))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tformat = format || self.__dateFormat;\\r\\n\\t\\t\\t\\tsettings = settings || {};\\r\\n\\t\\t\\t\\tvar monthNames = settings.monthNames || self.__monthNames;\\r\\n\\t\\t\\t\\tvar monthNamesShort = settings.monthNamesShort || self.__monthNamesShort;\\r\\n\\t\\t\\t\\tvar dayNames = settings.dayNames || self.__dayNames;\\r\\n\\t\\t\\t\\tvar dayNamesShort = settings.dayNamesShort || self.__dayNamesShort;\\r\\n\\t\\t\\t\\tvar objChar = getDateInFormat(date,monthNames,monthNamesShort,dayNames,dayNamesShort);\\r\\n\\t\\t\\t\\tvar index = 0;\\r\\n\\t\\t\\t\\tvar char = \\\"\\\";\\r\\n\\t\\t\\t\\tvar repeatedChar = \\\"\\\";\\r\\n\\t\\t\\t\\twhile (index < format.length) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchar = format.charAt(index);\\r\\n\\t\\t\\t\\t\\trepeatedChar = \\\"\\\";\\r\\n\\t\\t\\t\\t\\twhile ((format.charAt(index) === char) && (index < format.length)) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\trepeatedChar += format.charAt(index);\\r\\n\\t\\t\\t\\t\\t\\tindex++;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (typeof(objChar[repeatedChar]) != \\\"undefined\\\") \\r\\n\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\tretValue = retValue + objChar[repeatedChar]; \\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\tretValue = retValue + repeatedChar; \\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconsole.log(date + \\\"is invalid\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.parseString = function(value,format,settings)\\r\\n\\t\\t{\\r\\n\\t\\t\\tformat = format || this.__dateFormat;\\r\\n\\t\\t\\tsettings = settings || {};\\r\\n\\t\\t\\tvar monthNames = settings.monthNames || self.__monthNames;\\r\\n\\t\\t\\tvar monthNamesShort = settings.monthNamesShort || self.__monthNamesShort;\\r\\n\\t\\t\\tvar dayNames = settings.dayNames || self.__dayNames;\\r\\n\\t\\t\\tvar dayNamesShort = settings.dayNamesShort || self.__dayNamesShort;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar index = 0;\\r\\n\\t\\t\\tvar indexValue = 0;\\r\\n\\t\\t\\tvar char = \\\"\\\";\\r\\n\\t\\t\\tvar repeatedChar = \\\"\\\";\\r\\n\\t\\t\\tvar x,y;\\r\\n\\t\\t\\tvar year = new Date().getFullYear();\\r\\n\\t\\t\\tvar month = 1;\\r\\n\\t\\t\\tvar date = 1;\\r\\n\\t\\t\\tvar hh = 0;\\r\\n\\t\\t\\tvar mm = 0;\\r\\n\\t\\t\\tvar ss = 0;\\r\\n\\t\\t\\tvar ampm=\\\"\\\";\\r\\n\\t\\t\\twhile (index < format.length) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tchar = format.charAt(index);\\r\\n\\t\\t\\t\\trepeatedChar = \\\"\\\";\\r\\n\\t\\t\\t\\twhile ((format.charAt(index) === char) && (index < format.length)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trepeatedChar += format.charAt(index);\\r\\n\\t\\t\\t\\t\\tindex++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (repeatedChar === \\\"yyyy\\\" || repeatedChar === \\\"yy\\\" || repeatedChar === \\\"y\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (repeatedChar === \\\"yyyy\\\") \\r\\n\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\tx=4;\\r\\n\\t\\t\\t\\t\\t\\ty=4; \\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (repeatedChar === \\\"yy\\\") \\r\\n\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\tx=2;\\r\\n\\t\\t\\t\\t\\t\\ty=2; \\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (repeatedChar === \\\"y\\\") \\r\\n\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\tx=2;\\r\\n\\t\\t\\t\\t\\t\\ty=4; \\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tyear= getInt(value,indexValue,x,y);\\r\\n\\t\\t\\t\\t\\tif (year == null) \\r\\n\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\treturn null; \\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tindexValue += year.length;\\r\\n\\t\\t\\t\\t\\tif (year.length==2) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif (year > 70) \\r\\n\\t\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\t\\tyear = 1900 + (year - 0); \\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\t\\tyear = 2000 + (year - 0); \\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (repeatedChar==\\\"MMM\\\" || repeatedChar==\\\"NNN\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tmonth = 0;\\r\\n\\t\\t\\t\\t\\tvar names = (repeatedChar == \\\"MMM\\\" ? (monthNames.concat(monthNamesShort)) : monthNamesShort);\\r\\n\\t\\t\\t\\t\\tfor (var i=0; i < names.length; i++) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar month_name = names[i];\\r\\n\\t\\t\\t\\t\\t\\tif (value.substring(indexValue,indexValue + month_name.length).toLowerCase() == month_name.toLowerCase()) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tmonth=(i % 12) + 1;\\r\\n\\t\\t\\t\\t\\t\\t\\tindexValue += month_name.length;\\r\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif ((month < 1) || (month>12))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (repeatedChar == \\\"EE\\\" || repeatedChar == \\\"E\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar names = (repeatedChar == \\\"EE\\\" ? dayNames : dayNamesShort);\\r\\n\\t\\t\\t\\t\\tfor (var i=0; i< names.length; i++) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar day_name=names[i];\\r\\n\\t\\t\\t\\t\\t\\tif (value.substring(indexValue,indexValue + day_name.length).toLowerCase() == day_name.toLowerCase()) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tindexValue += day_name.length;\\r\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (repeatedChar == \\\"MM\\\" || repeatedChar == \\\"M\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tmonth=getInt(value,indexValue,repeatedChar.length,2);\\r\\n\\t\\t\\t\\t\\tif(month == null || (month<1) || (month>12))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tindexValue += month.length;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (repeatedChar == \\\"dd\\\" || repeatedChar == \\\"d\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdate=getInt(value,indexValue,repeatedChar.length,2);\\r\\n\\t\\t\\t\\t\\tif(date == null || (date < 1)||(date > 31))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tindexValue += date.length;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (repeatedChar == \\\"hh\\\" || repeatedChar == \\\"h\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\thh = getInt(value,indexValue,repeatedChar.length,2);\\r\\n\\t\\t\\t\\t\\tif(hh == null||(hh < 1)||(hh > 12))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tindexValue += hh.length;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (repeatedChar == \\\"HH\\\" || repeatedChar == \\\"H\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\thh = getInt(value,indexValue,repeatedChar.length,2);\\r\\n\\t\\t\\t\\t\\tif(hh == null || (hh < 0) || (hh > 23))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tindexValue += hh.length;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (repeatedChar == \\\"KK\\\"|| repeatedChar == \\\"K\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\thh = getInt(value,indexValue,repeatedChar.length,2);\\r\\n\\t\\t\\t\\t\\tif(hh == null||(hh < 0)||(hh > 11))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tindexValue += hh.length;\\r\\n\\t\\t\\t\\t\\thh++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (repeatedChar == \\\"kk\\\" || repeatedChar == \\\"k\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\thh = getInt(value,indexValue,repeatedChar.length,2);\\r\\n\\t\\t\\t\\t\\tif(hh == null||(hh < 1)||(hh > 24))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tindexValue += hh.length;\\r\\n\\t\\t\\t\\t\\thh--;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (repeatedChar == \\\"mm\\\" || repeatedChar == \\\"m\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tmm = getInt(value,indexValue,repeatedChar.length,2);\\r\\n\\t\\t\\t\\t\\tif(mm == null || (mm < 0) || (mm > 59))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tindexValue += mm.length;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (repeatedChar == \\\"ss\\\" || repeatedChar == \\\"s\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tss = getInt(value,indexValue,repeatedChar.length,2);\\r\\n\\t\\t\\t\\t\\tif(ss == null || (ss < 0) || (ss > 59))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tindexValue += ss.length;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (repeatedChar == \\\"a\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (value.substring(indexValue,indexValue + 2).toLowerCase() == \\\"am\\\") \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tampm=\\\"AM\\\";\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if (value.substring(indexValue,indexValue + 2).toLowerCase() == \\\"pm\\\") \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tampm=\\\"PM\\\";\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tindexValue += 2;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (value.substring(indexValue,indexValue + repeatedChar.length) != repeatedChar) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tindexValue += repeatedChar.length;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (indexValue != value.length) \\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\treturn null; \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (month == 2) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t// Check for leap year\\r\\n\\t\\t\\t\\tif (this.isLeapYear(year)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (date > 29)\\r\\n\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\treturn null; \\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\tif (date > 28) \\r\\n\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\treturn null; \\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif ((month == 4) ||(month == 6) ||(month == 9) || (month == 11)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (date > 30) \\r\\n\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\treturn null; \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t// Correct hours value\\r\\n\\t\\t\\tif (hh < 12 && ampm == \\\"PM\\\") \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\thh += 12; \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if (hh > 11 && ampm == \\\"AM\\\") \\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\thh -= 12; \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn new Date(year,month-1,date,hh,mm,ss);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isValidDate = function(date) \\r\\n\\t\\t{\\r\\n\\t\\t\\t  return date && Object.prototype.toString.call(date) === \\\"[object Date]\\\" && !isNaN(date);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getDateInFormat = function(date,monthNames,monthNamesShort,dayNames,dayNamesShort)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = {};\\r\\n\\t\\t\\tvar year = \\\"\\\" + date.getFullYear();\\r\\n\\t\\t\\tvar month = date.getMonth() + 1;\\r\\n\\t\\t\\tvar day = date.getDate();\\r\\n\\t\\t\\tvar dayOfWeek = date.getDay();\\r\\n\\t\\t\\tvar hour = date.getHours();\\r\\n\\t\\t\\tvar hourIn12Format = ((hour === 0) ? 12 : ((hour > 12) ? (hour - 12) : hour));\\r\\n\\t\\t\\tvar amorpm = (hour > 11) ? \\\"PM\\\" : \\\"AM\\\";\\r\\n\\t\\t\\tvar minutes = date.getMinutes();\\r\\n\\t\\t\\tvar seconds = date.getSeconds();\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tretValue[\\\"y\\\"]=\\\"\\\" + year;\\r\\n\\t\\t\\tretValue[\\\"yyyy\\\"]= retValue[\\\"y\\\"];\\r\\n\\t\\t\\tretValue[\\\"yy\\\"]= retValue[\\\"y\\\"].substring(2,4);\\r\\n\\t\\t\\tretValue[\\\"M\\\"]= month;\\r\\n\\t\\t\\tretValue[\\\"MM\\\"]= appendZero(retValue[\\\"M\\\"]);\\r\\n\\t\\t\\tretValue[\\\"MMM\\\"]= monthNames[retValue[\\\"M\\\"] - 1];\\r\\n\\t\\t\\tretValue[\\\"NNN\\\"]= monthNamesShort[retValue[\\\"M\\\"] - 1];\\r\\n\\t\\t\\tretValue[\\\"d\\\"]= day;\\r\\n\\t\\t\\tretValue[\\\"dd\\\"]= appendZero(retValue[\\\"d\\\"]);\\r\\n\\t\\t\\tretValue[\\\"E\\\"]= dayNamesShort[dayOfWeek];\\r\\n\\t\\t\\tretValue[\\\"EE\\\"]= dayNames[dayOfWeek];\\r\\n\\t\\t\\tretValue[\\\"H\\\"]= hour;\\r\\n\\t\\t\\tretValue[\\\"HH\\\"]= appendZero(retValue[\\\"H\\\"]);\\r\\n\\t\\t\\tretValue[\\\"h\\\"] = hourIn12Format;\\r\\n\\t\\t\\tretValue[\\\"hh\\\"]= appendZero(retValue[\\\"h\\\"]);\\r\\n\\t\\t\\tretValue[\\\"K\\\"]= retValue[\\\"h\\\"] - 1;\\r\\n\\t\\t\\tretValue[\\\"k\\\"]= retValue[\\\"H\\\"] + 1;\\r\\n\\t\\t\\tretValue[\\\"KK\\\"]= appendZero(retValue[\\\"K\\\"]);\\r\\n\\t\\t\\tretValue[\\\"kk\\\"]= appendZero(retValue[\\\"k\\\"]);\\r\\n\\t\\t\\tretValue[\\\"a\\\"] = amorpm;\\r\\n\\t\\t\\tretValue[\\\"m\\\"]= minutes;\\r\\n\\t\\t\\tretValue[\\\"mm\\\"]= appendZero(retValue[\\\"m\\\"]);\\r\\n\\t\\t\\tretValue[\\\"s\\\"]= seconds;\\r\\n\\t\\t\\tretValue[\\\"ss\\\"]= appendZero(retValue[\\\"s\\\"]);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isLeapYear = function(year) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(year % 4 === 0 || (year % 100 === 0 && year % 400 === 0)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getInt = function(value,index,fromLength,toLength)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor (var count = toLength; count >= fromLength; count--) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar repeatedChar = value.substring(index,index + count);\\r\\n\\t\\t\\t\\tif (repeatedChar.length < fromLength) \\r\\n\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\treturn null; \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (isInteger(repeatedChar)) \\r\\n\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\treturn repeatedChar; \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar appendZero = function(value) \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (value < 0 || value > 9 ? \\\"\\\":\\\"0\\\") + value;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar isInteger = function(value) \\r\\n\\t\\t{\\r\\n\\t\\t\\tfor (var i=0; i < value.length; i++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (\\\"1234567890\\\".indexOf(value.charAt(i))==-1) \\r\\n\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\treturn false; \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSDateUtil;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSDateUtil\\\",NSDateUtil);\";","export const NSExportCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\nvar svgRef = require('./nsSVG.min.js');\\r\\nvar NSSvg = svgRef.NSSvg;\\r\\nvar NSSvgShapes = svgRef.NSSvgShapes;\\r\\nvar plugginsRef = require('./nsPluggins.min.js');\\r\\nvar nsTextEditor = plugginsRef.nsTextEditor;\\r\\nvar nsTextAreaEditor = plugginsRef.nsTextAreaEditor;\\r\\nvar NSCellSelection = plugginsRef.NSCellSelection;\\r\\nvar NSTableCellNavigator = plugginsRef.NSTableCellNavigator;\\r\\nvar dateutilRef = require('./nsDateUtil.min.js');\\r\\nvar NSDateUtil = dateutilRef.NSDateUtil;\\r\\n\\r\\n\\t\\t}\\r\\nvar NSExport = (function()\\r\\n{\\r\\n\\t//DONOT REMOVE: taken from https://gist.github.com/sevir/3946819\\r\\n\\tif (window && !window.atob && !window.btoa)\\r\\n\\t{\\r\\n\\t ( function( window ) {\\r\\n\\t    var _PADCHAR = \\\"=\\\",\\r\\n\\t      _ALPHA = \\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\";\\r\\n\\t   \\r\\n\\t    function _getbyte64( s, i ) { \\r\\n\\t      var idx = _ALPHA.indexOf( s.charAt( i ) );\\r\\n\\t   \\r\\n\\t      if ( idx === -1 ) {\\r\\n\\t        throw \\\"Cannot decode base64\\\";\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      return idx;\\r\\n\\t    }\\r\\n\\t   \\r\\n\\t    function _decode( s ) {\\r\\n\\t      var pads = 0,\\r\\n\\t        i,\\r\\n\\t        b10,\\r\\n\\t        imax = s.length,\\r\\n\\t        x = [];\\r\\n\\t   \\r\\n\\t      s = String( s );\\r\\n\\t   \\r\\n\\t      if ( imax === 0 ) {\\r\\n\\t        return s;\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      if ( imax % 4 !== 0 ) {\\r\\n\\t        throw \\\"Cannot decode base64\\\";\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      if ( s.charAt( imax - 1 ) === _PADCHAR ) {\\r\\n\\t        pads = 1;\\r\\n\\t   \\r\\n\\t        if ( s.charAt( imax - 2 ) === _PADCHAR ) {\\r\\n\\t          pads = 2;\\r\\n\\t        }\\r\\n\\t   \\r\\n\\t        // either way, we want to ignore this last block\\r\\n\\t        imax -= 4;\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      for ( i = 0; i < imax; i += 4 ) {\\r\\n\\t        b10 = ( _getbyte64( s, i ) << 18 ) | ( _getbyte64( s, i + 1 ) << 12 ) | ( _getbyte64( s, i + 2 ) << 6 ) | _getbyte64( s, i + 3 );\\r\\n\\t        x.push( String.fromCharCode( b10 >> 16, ( b10 >> 8 ) & 0xff, b10 & 0xff ) );\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      switch ( pads ) {\\r\\n\\t        case 1:\\r\\n\\t          b10 = ( _getbyte64( s, i ) << 18 ) | ( _getbyte64( s, i + 1 ) << 12 ) | ( _getbyte64( s, i + 2 ) << 6 );\\r\\n\\t          x.push( String.fromCharCode( b10 >> 16, ( b10 >> 8 ) & 0xff ) );\\r\\n\\t          break;\\r\\n\\t   \\r\\n\\t        case 2:\\r\\n\\t          b10 = ( _getbyte64( s, i ) << 18) | ( _getbyte64( s, i + 1 ) << 12 );\\r\\n\\t          x.push( String.fromCharCode( b10 >> 16 ) );\\r\\n\\t          break;\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      return x.join( \\\"\\\" );\\r\\n\\t    }\\r\\n\\t   \\r\\n\\t    function _getbyte( s, i ) {\\r\\n\\t      var x = s.charCodeAt( i );\\r\\n\\t   \\r\\n\\t      if ( x > 255 ) {\\r\\n\\t        throw \\\"INVALID_CHARACTER_ERR: DOM Exception 5\\\";\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      return x;\\r\\n\\t    }\\r\\n\\t   \\r\\n\\t    function _encode( s ) {\\r\\n\\t      if ( arguments.length !== 1 ) {\\r\\n\\t        throw \\\"SyntaxError: exactly one argument required\\\";\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      s = String( s );\\r\\n\\t   \\r\\n\\t      var i,\\r\\n\\t        b10,\\r\\n\\t        x = [],\\r\\n\\t        imax = s.length - s.length % 3;\\r\\n\\t   \\r\\n\\t      if ( s.length === 0 ) {\\r\\n\\t        return s;\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      for ( i = 0; i < imax; i += 3 ) {\\r\\n\\t        b10 = ( _getbyte( s, i ) << 16 ) | ( _getbyte( s, i + 1 ) << 8 ) | _getbyte( s, i + 2 );\\r\\n\\t        x.push( _ALPHA.charAt( b10 >> 18 ) );\\r\\n\\t        x.push( _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) );\\r\\n\\t        x.push( _ALPHA.charAt( ( b10 >> 6 ) & 0x3f ) );\\r\\n\\t        x.push( _ALPHA.charAt( b10 & 0x3f ) );\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      switch ( s.length - imax ) {\\r\\n\\t        case 1:\\r\\n\\t          b10 = _getbyte( s, i ) << 16;\\r\\n\\t          x.push( _ALPHA.charAt( b10 >> 18 ) + _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) + _PADCHAR + _PADCHAR );\\r\\n\\t          break;\\r\\n\\t   \\r\\n\\t        case 2:\\r\\n\\t          b10 = ( _getbyte( s, i ) << 16 ) | ( _getbyte( s, i + 1 ) << 8 );\\r\\n\\t          x.push( _ALPHA.charAt( b10 >> 18 ) + _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) + _ALPHA.charAt( ( b10 >> 6 ) & 0x3f ) + _PADCHAR );\\r\\n\\t          break;\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      return x.join(\\\"\\\");\\r\\n\\t    }\\r\\n\\t\\r\\n\\t    window.btoa = _encode;\\r\\n\\t    window.atoa = _decode;\\r\\n\\t   \\r\\n\\t  })( window );\\r\\n\\t}\\r\\n\\t\\r\\n\\t\\\"use strict\\\"; \\r\\n\\tfunction NSExport(grid,fileName,extPath,ignoreColumn) \\r\\n\\t{\\r\\n\\t\\tthis.__grid = grid;\\r\\n\\t\\tthis.__fileName = fileName;\\r\\n\\t\\tthis.__ignoreColumn = ignoreColumn;\\r\\n\\t\\tthis.__extFilePath = extPath ? extPath : \\\"../lib/com/ext\\\";\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__defaultDelimiter = \\\",\\\";\\r\\n\\t\\tthis.__defaultNewLine = \\\"\\\\r\\\\n\\\";\\r\\n\\t\\tthis.__externalScriptLoad = {jspdf:false,html2canvas:false};\\r\\n\\t}\\r\\n\\t\\r\\n\\t//Orientation: portrait or landscape\\r\\n\\tNSExport.prototype.word = function(setting) \\r\\n\\t{\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.type === \\\"doc\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar docSetting = {appType:\\\"doc\\\",extension:\\\"doc\\\",event:setting.event,orientation:setting.orientation,element:setting.element,pageBreakTag:setting.pageBreakTag,headerFooterCss:\\\"\\\",startHtml:\\\"\\\",endHtml:\\\"\\\"};\\r\\n\\t\\t\\t\\tif(setting.hasHeaderOrFooter)\\r\\n\\t            {\\r\\n\\t            \\tdocSetting.headerFooterCss = setting.headerFooterCss || \\\"\\\";\\r\\n\\t            \\tdocSetting.startHtml = setting.startHtml || \\\"\\\";\\r\\n\\t            \\tdocSetting.endHtml = setting.endHtml || \\\"\\\";\\r\\n\\t            }\\r\\n\\t\\t\\t\\tif(setting.enablePageNumber)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdocSetting.headerFooterCss += \\\"p.MsoHeader, li.MsoHeader, div.MsoHeader{     margin:0in;     margin-top:.0001pt;     mso-pagination:widow-orphan;     tab-stops:center 3.0in right 6.0in; } p.MsoFooter, li.MsoFooter, div.MsoFooter{     margin:0in 0in 1in 0in;     margin-bottom:.0001pt;     mso-pagination:widow-orphan;     tab-stops:center 3.0in right 6.0in; } .footer {     font-size: 9pt; } @page Section1{     size:8.5in 11.0in;     margin:0.5in 0.5in 0.5in 0.5in;     mso-header-margin:0.5in;     mso-header:h1;     mso-footer:f1;     mso-footer-margin:0.5in;     mso-paper-source:0; } div.Section1{     page:Section1; } table#hrdftrtbl{     margin:0in 0in 0in 9in; }\\\";\\r\\n\\t\\t\\t\\t\\tdocSetting.startHtml = \\\"<div class=\\\\\\\"Section1\\\\\\\">\\\" + docSetting.startHtml; \\r\\n\\t\\t\\t\\t\\tdocSetting.endHtml += \\\"<table id=\\\\\\\"hrdftrtbl\\\\\\\" border=\\\\\\\"1\\\\\\\" cellspacing=\\\\\\\"0\\\\\\\" cellpadding=\\\\\\\"0\\\\\\\"> <tr> <td> <div style=\\\\\\\"mso-element:footer\\\\\\\" id=\\\\\\\"f1\\\\\\\"> <p class=\\\\\\\"MsoFooter\\\\\\\"> <table width=\\\\\\\"100%\\\\\\\" border=\\\\\\\"0\\\\\\\" cellspacing=\\\\\\\"0\\\\\\\" cellpadding=\\\\\\\"0\\\\\\\"> <tr> <td align=\\\\\\\"center\\\\\\\" class=\\\\\\\"footer\\\\\\\"> <g:message code=\\\\\\\"offer.letter.page.label\\\\\\\"/> <span style=\\\\\\\"mso-field-code: PAGE \\\\\\\"></span> of <span style=\\\\\\\"mso-field-code: NUMPAGES \\\\\\\"></span> </td> </tr> </table> </p> </div> </td> </tr> </table> </div>\\\";;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__exportOfficeTypes(docSetting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!setting.orientation || (setting.orientation !== \\\"portrait\\\" && setting.orientation !== \\\"landscape\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.warning(\\\"NSExport\\\",\\\"Docx type value was either not valid or not in the correct format.Hence defaulting to portrait\\\");\\r\\n\\t\\t\\t\\t\\tsetting.orientation = \\\"portrait\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar docSetting = {appType:\\\"doc\\\",element:setting.element,pageBreakTag:setting.pageBreakTag,headerFooterCss:\\\"\\\",startHtml:\\\"\\\",endHtml:\\\"\\\"};\\r\\n\\t\\t\\t\\tif(setting.hasHeaderOrFooter)\\r\\n\\t            {\\r\\n\\t            \\tdocSetting.headerFooterCss = setting.headerFooterCss;\\r\\n\\t            \\tdocSetting.startHtml = setting.startHtml;\\r\\n\\t            \\tdocSetting.endHtml = setting.endHtml;\\r\\n\\t            }\\r\\n\\t\\t\\t\\tvar htmlText = this.__getHTMLTextForOffice(docSetting);\\r\\n\\t\\t\\t\\tif(htmlText && htmlText.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar fileName = this.__getFileName(\\\"docx\\\");\\r\\n\\t\\t\\t\\t\\tvar exportSetting = {fileName:fileName,htmlSetting:{html:htmlText,htmlStyle: setting.extraStyle,loopNodesCallback: setting.loopNodesCallback},printSetting:{orientation: setting.orientation}};\\r\\n\\t\\t\\t\\t\\tvar docxExport = new NSDocxExport(exportSetting);\\r\\n\\t\\t\\t\\t\\tdocxExport.process();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.powerpoint = function(setting) \\r\\n\\t{\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar docSetting = {appType:\\\"powerpoint\\\",extension:\\\"ppt\\\",event:setting.event,element:setting.element};\\r\\n\\t\\t\\tthis.__exportOfficeTypes(docSetting);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.excel = function(setting) \\r\\n\\t{\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.type === \\\"xls\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar docSetting = {appType:\\\"excel\\\",extension:\\\"xls\\\",sheetName:setting.sheetName,event:setting.event,element:setting.element,properties:setting.properties};\\r\\n\\t\\t\\t\\tthis.__exportOfficeTypes(docSetting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objXslxExport = new this.xslxExport(this,setting.sheetName,setting.event,setting.properties);\\r\\n\\t\\t\\t\\tobjXslxExport.exportToxlsx();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.csv = function(event) \\r\\n\\t{ \\r\\n\\t\\tvar csvText = this.__getTableAsString(this.__defaultDelimiter,this.__defaultNewLine);\\r\\n\\t\\tif(csvText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar uri = \\\"application/csv\\\";\\r\\n\\t\\t\\tthis.__downloadFile(csvText,uri,\\\"csv\\\",event);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.xml = function(event) \\r\\n\\t{ \\r\\n\\t\\tvar xmlText = this.__getTableAsXML();\\r\\n\\t\\tif(xmlText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar uri = \\\"application/xml\\\";\\r\\n\\t\\t\\tthis.__downloadFile(xmlText,uri,\\\"xml\\\",event);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.text = function(event) \\r\\n\\t{ \\r\\n\\t\\tvar csvText = this.__getTableAsString(this.__defaultDelimiter,this.__defaultNewLine,\\\"-\\\");\\r\\n\\t\\tif(csvText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar uri = \\\"application/txt\\\";\\r\\n\\t\\t\\tthis.__downloadFile(csvText,uri,\\\"txt\\\",event);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.json = function(event) \\r\\n\\t{ \\r\\n\\t\\tvar jsonText = this.__getTableAsJson();\\r\\n\\t\\tif(jsonText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar uri = \\\"application/json\\\";\\r\\n\\t\\t\\tthis.__downloadFile(jsonText,uri,\\\"json\\\",event);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.pdf = function(event,setting) \\r\\n\\t{ \\r\\n\\t\\tthis.__processPDF = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__externalScriptLoad.jspdf = true;\\r\\n\\t\\t\\tif(!setting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetting = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar config = {\\r\\n\\t\\t\\t\\t\\tfontSize: setting[\\\"fontSize\\\"] || 14,\\r\\n\\t\\t\\t\\t\\twidth: setting[\\\"width\\\"] || 1200,\\r\\n\\t\\t\\t\\t\\ttopMargin: setting[\\\"topMargin\\\"] || 30,\\r\\n\\t\\t\\t\\t\\tbottomMargin: setting[\\\"bottomMargin\\\"] || 60,\\r\\n\\t\\t\\t\\t\\tleftMargin: setting[\\\"leftMargin\\\"] || 60,\\r\\n\\t\\t\\t\\t\\tmaxWidth: setting[\\\"maxWidth\\\"] || 550\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar divSource = this.__getStructureForPDF(config.width,config.fontSize);\\r\\n\\t\\t\\tdocument.body.appendChild(divSource);\\r\\n\\t\\t\\tvar pdf = new jsPDF(\\\"p\\\", \\\"pt\\\", \\\"ledger\\\");\\r\\n\\t\\t\\t// we support special element handlers. Register them with jQuery-style \\r\\n\\t\\t    // ID selector for either ID or node name. (\\\"#iAmID\\\", \\\"div\\\", \\\"span\\\" etc.)\\r\\n\\t\\t    // There is no support for any other type of selectors \\r\\n\\t\\t    // (class, of compound) at this time.\\r\\n\\t\\t\\tspecialElementHandlers = \\r\\n\\t\\t\\t{\\r\\n\\t\\t        // element with id of \\\"bypass\\\" - jQuery style selector\\r\\n\\t\\t        '#bypassme' : function(element, renderer) {\\r\\n\\t\\t            // true = \\\"handled elsewhere, bypass text extraction\\\"\\r\\n\\t\\t            return true;\\r\\n\\t\\t        }\\r\\n\\t\\t    };\\r\\n\\t\\t    margins = {\\r\\n\\t\\t        top : config.topMargin,\\r\\n\\t\\t        bottom : config.bottomMargin,\\r\\n\\t\\t        left : config.leftMargin,\\r\\n\\t\\t        width : config.maxWidth\\r\\n\\t\\t    };\\r\\n\\t\\t    var self =  this;\\r\\n\\t\\t    // all coords and widths are in jsPDF instance's declared units\\r\\n\\t\\t    // 'inches' in this case\\r\\n\\t\\t    pdf.fromHTML(divSource, // HTML string or DOM elem ref.\\r\\n\\t\\t    margins.left, // x coord\\r\\n\\t\\t    margins.top, { // y coord\\r\\n\\t\\t        'width' : margins.width, // max width of content on PDF\\r\\n\\t\\t        'elementHandlers' : specialElementHandlers\\r\\n\\t\\t    },\\r\\n\\t\\r\\n\\t\\t    function(dispose) {\\r\\n\\t\\t        // dispose: object with X, Y of the last line add to the PDF \\r\\n\\t\\t        //          this allow the insertion of new lines after html\\r\\n\\t\\t        pdf.save(self.__getFileName(\\\"pdf\\\"));\\r\\n\\t\\t\\t\\tdocument.body.removeChild(divSource);\\r\\n\\t\\t    }, margins);\\r\\n\\t\\t};\\r\\n\\t\\tif(!this.__externalScriptLoad.jspdf)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__includeJavaScriptFile(this.__extFilePath + \\\"/jspdf/jspdf.min.js\\\",this.__processPDF.bind(this));\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__processPDF.bind(this)();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.image = function(setting) \\r\\n\\t{\\r\\n\\t\\tif(!setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsetting = {};\\r\\n\\t\\t}\\r\\n\\t\\tthis.__processImage = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__externalScriptLoad.html2canvas = true;\\r\\n\\t\\t\\tif(!setting.type || (setting.type !== \\\"png\\\" && setting.type !== \\\"jpeg\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.warning(\\\"NSExport\\\",\\\"Image type value was either not valid or not in the correct format.Hence defaulting to png\\\");\\r\\n\\t\\t\\t\\tsetting.type = \\\"png\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar imageType = \\\"image/\\\" + setting.type; \\r\\n\\t\\t\\tvar divParent = this.__getStructureForImage();\\r\\n\\t\\t\\tif(divParent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar nsExport = this;\\r\\n\\t\\t\\t\\thtml2canvas(divParent,{\\r\\n\\t\\t\\t\\t\\tonrendered: function(canvas) {\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t//document.body.appendChild(canvas);\\r\\n\\t\\t\\t\\t\\t\\tvar data = canvas.toDataURL(imageType);\\r\\n\\t\\t\\t\\t\\t\\tif(!data || data === \\\"data:,\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tnsExport.util.throwNSError(\\\"NSExport\\\",\\\"Please give table some width and height\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tnsExport.__downloadFile(data,imageType,setting.type);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t});\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSExport\\\",\\\"Please add the table inside a parent Element\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tif(!this.__externalScriptLoad.html2canvas)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__includeJavaScriptFile(this.__extFilePath + \\\"/html2canvas/html2canvas.min.js\\\",this.__processImage.bind(this));\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__processImage.bind(this)();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__exportOfficeTypes = function(setting) \\r\\n\\t{\\r\\n\\t\\tvar htmlText = this.__getHTMLTextForOffice(setting);\\r\\n\\t\\tif(htmlText && htmlText.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar uri = \\\"application/vnd.ms-\\\" + setting.appType;\\r\\n\\t\\t\\tif(setting.extension === \\\"doc\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\turi = \\\"application/msword\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__downloadFile(htmlText,uri,setting.extension,setting.event);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getHTMLTextForOffice = function(setting) \\r\\n\\t{\\r\\n\\t\\tvar appType = setting.appType;\\r\\n\\t\\tvar element = setting.element;\\r\\n\\t\\tvar headerFooterCss = setting.headerFooterCss ? setting.headerFooterCss : \\\"\\\";\\r\\n\\t    var startHtml = setting.startHtml ? setting.startHtml : \\\"\\\";\\r\\n\\t    var endHtml = setting.endHtml ? setting.endHtml : \\\"\\\";\\r\\n\\t\\tvar htmlText = \\\"\\\";\\r\\n\\t\\tvar outerHTML = null;\\r\\n\\t\\tvar isTable =  false;\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\touterHTML = element.outerHTML;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar table = this.__getTable();\\r\\n\\t\\t\\tif(table)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\touterHTML = table.outerHTML;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tisTable = true;\\r\\n\\t\\t}\\r\\n\\t\\tvar objValue = {};\\r\\n\\t\\tswitch(appType)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcase \\\"doc\\\":\\r\\n\\t\\t\\t\\tobjValue = this.__getHTMLTextForWord(setting,outerHTML,isTable);\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase \\\"excel\\\":\\r\\n\\t\\t\\t\\tobjValue = this.__getHTMLTextForExcel(setting,outerHTML,isTable);\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase \\\"powerpoint\\\":\\r\\n\\t\\t\\t\\tobjValue = this.__getHTMLTextForPpt(setting,outerHTML,isTable);\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t}\\r\\n\\t\\tif(outerHTML)\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjValue.style = (objValue.style) ? objValue.style : \\\"\\\";\\r\\n\\t\\t\\thtmlText = '<html  xmlns:o=\\\"urn:schemas-microsoft-com:office:office\\\" xmlns:x=\\\"urn:schemas-microsoft-com:office:' + appType +'\\\" xmlns=\\\"http://www.w3.org/TR/REC-html40\\\">';\\r\\n\\t\\t\\thtmlText += '<head><meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=UTF-8\\\">';\\r\\n\\t\\t\\thtmlText +='<!--[if gte mso 9]><xml>';\\r\\n\\t\\t\\thtmlText += objValue.header;\\r\\n\\t\\t\\thtmlText += '</xml><![endif]-->';\\r\\n\\t\\t    //htmlText +=\\\"<o:shapedefaults v:ext=\\\\\\\"edit\\\\\\\" spidmax=\\\\\\\"1026\\\\\\\"/>\\\";\\r\\n\\t\\t\\thtmlText += '<style>' + objValue.style + headerFooterCss + '.header{mso-style-parent:style0;color:white;font-size:10.0pt;font-weight:700;font-family:Tahoma, sans-serif;mso-font-charset:0;text-align:center;background:gray;mso-pattern:black none;}</style>';\\r\\n\\t\\t\\thtmlText += '</head>';\\r\\n\\t\\t\\thtmlText += '<body link=\\\"blue\\\" vlink=\\\"purple\\\">';\\r\\n\\t\\t\\thtmlText += startHtml + objValue.html + endHtml;\\r\\n\\t\\t\\thtmlText += '</body></html>';\\r\\n\\t\\t}\\r\\n\\t\\treturn htmlText;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getHTMLTextForWord = function(setting,html,isTable)\\r\\n\\t{\\r\\n\\t\\tvar objReturn = {header:null,style:null,html:html};\\r\\n\\t\\tobjReturn.header = \\\"<w:WordDocument><w:View>Print</w:View><w:Zoom>100</w:Zoom><w:DoNotOptimizeForBrowser/></w:WordDocument>\\\";\\r\\n\\t\\tif(isTable)\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjReturn.style = 'table{border-collapse: collapse;} table, th, td {border: 1px solid black;} ';\\r\\n\\t\\t}\\r\\n\\t\\tif(setting[\\\"pageBreakTag\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjReturn.html = objReturn.html.replaceAll(setting[\\\"pageBreakTag\\\"],\\\"<br clear=all style='mso-special-character:line-break;page-break-before:always'>\\\");\\r\\n\\t\\t}\\r\\n\\t\\treturn objReturn;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getHTMLTextForExcel = function(setting,html,isTable)\\r\\n\\t{\\r\\n\\t\\tvar objReturn = {header:null,style:null,html:html};\\r\\n\\t\\tobjReturn.header = \\\"<x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>\\\";\\r\\n\\t\\tobjReturn.header += (setting[\\\"sheetName\\\"] ? setting[\\\"sheetName\\\"]: ((this.__fileName ? this.__fileName : \\\"Sheet 1\\\")));\\r\\n\\t\\tobjReturn.header += '</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook>';\\r\\n\\t\\treturn objReturn;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getHTMLTextForPpt = function(setting,html,isTable)\\r\\n\\t{\\r\\n\\t\\tvar objReturn = {header:null,style:null,html:html};\\r\\n\\t\\tobjReturn.header = \\\"<x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>\\\";\\r\\n\\t\\tobjReturn.header += (setting[\\\"sheetName\\\"] ? setting[\\\"sheetName\\\"]: ((this.__fileName ? this.__fileName : \\\"Sheet 1\\\")));\\r\\n\\t\\tobjReturn.header += '</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook>';\\r\\n\\t\\treturn objReturn;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__downloadFile = function(text,uri,fileType,event) \\r\\n\\t{\\r\\n\\t\\tif(text && fileType)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (\\\"Blob\\\" in window) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar fileName = this.__getFileName(fileType);\\r\\n\\t\\t\\t\\tif (\\\"msSaveOrOpenBlob\\\" in window.navigator) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar blobObject = null;\\r\\n\\t\\t\\t\\t\\tif(text instanceof Blob)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tblobObject = text;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if(!(text instanceof ArrayBuffer) && text.indexOf(\\\"base64\\\") > -1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tblobObject = this.__dataURItoBlob(text);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tblobObject = new Blob([text], { type: uri});\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\twindow.navigator.msSaveOrOpenBlob(blobObject,fileName);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar hrefvalue = null;\\r\\n\\t\\t\\t\\t\\tif(text instanceof ArrayBuffer)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar blobObject = new Blob([text], {type: uri});\\r\\n\\t\\t\\t\\t\\t\\threfvalue = URL.createObjectURL(blobObject);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if(text instanceof Blob)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\threfvalue = URL.createObjectURL(text);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(text.indexOf(\\\"data:\\\") === -1)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\turi = \\\"data:\\\" + uri;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(text.indexOf(\\\";base64,\\\") === -1)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar base64String = \\\";base64,\\\" + window.btoa(window.unescape(encodeURIComponent(text)));\\r\\n\\t\\t\\t\\t\\t\\t\\threfvalue = uri + base64String;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\threfvalue = text;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t    var anchor = document.createElement(\\\"a\\\");\\r\\n\\t\\t\\t\\t    if (\\\"webkitURL\\\" in window) \\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t          // Chrome allows the link to be clicked without actually adding it to the DOM.\\r\\n\\t\\t\\t\\t    \\t//hrefvalue = window.webkitURL.createObjectURL([hrefvalue]);\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t    else\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\t//hrefvalue = window.URL.createObjectURL([hrefvalue]);\\r\\n\\t\\t\\t\\t    \\tanchor.style.display = 'none';\\r\\n\\t\\t\\t\\t        document.body.appendChild(anchor);\\r\\n\\t\\t\\t\\t        this.util.addEvent(anchor,\\\"click\\\",function(event){\\r\\n\\t\\t\\t\\t    \\t\\tdocument.body.removeChild(event.target);\\r\\n\\t\\t\\t\\t    \\t});\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t    anchor.setAttribute(\\\"href\\\",hrefvalue);\\r\\n\\t\\t\\t\\t    anchor.setAttribute(\\\"download\\\",this.__getFileName(fileType));\\r\\n\\t\\t\\t\\t    anchor.setAttribute(\\\"target\\\",\\\"_blank\\\");\\r\\n\\t\\t\\t\\t    anchor.innerHTML = \\\"Download File\\\";\\r\\n\\t\\t\\t\\t    /*if(window.URL && window.URL.revokeObjectURL)\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\twindow.URL.revokeObjectURL(hrefvalue);\\r\\n\\t\\t\\t\\t    }*/\\r\\n\\t\\t\\t\\t    anchor.click();\\r\\n\\t\\t\\t\\t    if(event)\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\tthis.util.preventDefault(event);\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getTable = function() \\r\\n\\t{ \\r\\n\\t\\tvar tblResult = null;\\r\\n\\t\\tif(this.__grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar grid = this.__getPrototype(this.__grid);\\r\\n\\t\\t\\tif(grid && this.__isTypeNSGrid(grid))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tblHeader = grid.__tblCenterHeader;\\r\\n\\t\\t    \\tvar tblBody = grid.__tblCenterBody;\\r\\n\\t\\t    \\ttblResult = document.createElement(\\\"TABLE\\\");\\r\\n\\t\\t    \\ttblResult.style.width = tblHeader.style.width;\\r\\n\\t\\t    \\tif(tblHeader && tblHeader.tBodies && tblHeader.tBodies.length > 0 && tblHeader.tBodies[0].rows && tblHeader.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\tvar arrColumns = grid.__columns;\\r\\n\\t\\t    \\t\\tif(grid.gridType === grid.GRID_TYPE_GROUP)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrColumns = grid.util.cloneObject(arrColumns);\\r\\n\\t\\t\\t\\t\\t\\tarrColumns.splice(0, 1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\tvar header = tblResult.createTHead();\\r\\n\\t\\t    \\t\\tvar headerRow = header.insertRow(-1);\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t        for(colIndex = 0; colIndex < arrColumns.length; colIndex++)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t        \\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t        \\t\\tvar headerCell = headerRow.insertCell(-1);\\r\\n\\t\\t\\t        \\t\\tthis.util.addStyleClass(headerCell,\\\"header\\\");\\r\\n\\t\\t\\t\\t    \\t\\theaderCell.style.width = colItem[\\\"width\\\"]; \\r\\n\\t\\t\\t\\t    \\t\\tvar headerText = colItem[\\\"headerText\\\"];\\r\\n\\t\\t\\t\\t    \\t\\theaderCell.appendChild(document.createTextNode(headerText));\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        if(tblBody && tblBody.tBodies && tblBody.tBodies.length > 0 && tblBody.tBodies[0].rows && tblBody.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t        \\tvar arrItems = grid.__getAllItems();\\r\\n\\t\\t\\t        \\tvar body = document.createElement(\\\"tbody\\\");\\r\\n\\t\\t\\t        \\ttblResult.appendChild(body);\\r\\n\\t\\t\\t        \\tvar colText = \\\"\\\";\\r\\n\\t\\t\\t        \\tvar row = null;\\r\\n\\t\\t\\t        \\tfor(rowIndex = 0;rowIndex < arrItems.length;rowIndex++)\\r\\n\\t\\t\\t \\t        {\\r\\n\\t\\t\\t        \\t\\tvar item = arrItems[rowIndex];\\r\\n\\t\\t\\t        \\t\\tif(!item.hasOwnProperty(grid.__fieldRowVisible) || item[grid.__fieldRowVisible])\\r\\n\\t\\t\\t        \\t\\t{\\r\\n\\t\\t\\t\\t        \\t\\tvar bodyRow = body.insertRow(-1);\\r\\n\\t\\t\\t\\t        \\t\\tfor(colIndex = 0;colIndex < arrColumns.length;colIndex++)\\r\\n\\t\\t\\t\\t    \\t        {\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t\\t        \\t\\t\\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t\\t    \\t        \\t{\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolText = item[colItem[\\\"dataField\\\"]];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(colItem.hasOwnProperty(\\\"exportRenderer\\\"))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcolText = colItem[\\\"exportRenderer\\\"](item,colItem[\\\"dataField\\\"],item[grid.__fieldIndex],count);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tvar bodyCell = bodyRow.insertCell(-1);\\r\\n\\t\\t\\t\\t\\t        \\t\\t\\tbodyCell.style.width = colItem[\\\"width\\\"]; \\r\\n\\t\\t\\t\\t\\t    \\t    \\t\\tbodyCell.innerHTML = colText;\\r\\n\\t\\t\\t\\t    \\t        \\t}\\r\\n\\t\\t\\t\\t    \\t        }\\r\\n\\t\\t\\t        \\t\\t}\\r\\n\\t\\t\\t \\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttblResult = this.__grid.cloneNode(true);\\r\\n\\t\\t\\t\\tif(tblResult.tHead && tblResult.tHead.rows && tblResult.tHead.rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar headerRow = tblResult.tHead.rows[0];\\r\\n\\t\\t\\t\\t\\tif(headerRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrCells = [];\\r\\n\\t\\t\\t\\t\\t\\tvar arrTempCells = [];\\r\\n\\t\\t\\t\\t\\t\\tif(headerRow.getElementsByTagName(\\\"th\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrTempCells = headerRow.getElementsByTagName(\\\"th\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(headerRow.getElementsByTagName(\\\"td\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrTempCells = headerRow.getElementsByTagName(\\\"td\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tarrCells = Array.prototype.slice.call(arrTempCells).slice(0);\\r\\n\\t\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t    \\t\\tvar cell = null;\\r\\n\\t\\t\\t    \\t\\tfor(colIndex = arrCells.length - 1; colIndex >= 0; colIndex--)\\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t    \\t\\t\\theaderRow.deleteCell(colIndex);\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t        for(colIndex = 0; colIndex < arrCells.length; colIndex++)\\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\tcell = arrCells[colIndex];\\r\\n\\t\\t\\t\\t        \\tvar headerCell = headerRow.insertCell(-1);\\r\\n\\t\\t\\t\\t        \\theaderCell.style.width = cell.offsetWidth + \\\"px\\\";\\r\\n\\t\\t\\t\\t        \\theaderCell.color = \\\"red\\\";\\r\\n\\t\\t\\t\\t        \\theaderCell.appendChild(document.createTextNode(cell.textContent.trim()));\\r\\n\\t\\t\\t\\t        \\tthis.util.addStyleClass(headerCell,\\\"header\\\");\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(tblResult)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttblResult.setAttribute(\\\"border\\\",0);\\r\\n\\t\\t    \\ttblResult.setAttribute(\\\"cellpadding\\\",0);\\r\\n\\t\\t    \\ttblResult.setAttribute(\\\"cellspacing\\\",0);\\r\\n\\t\\t    \\ttblResult.setAttribute(\\\"style\\\",\\\"border-collapse:collapse;table-layout:fixed;\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn tblResult;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getTableAsString = function(delimiter,newLine,headerSeparator) \\r\\n\\t{ \\r\\n\\t\\tvar strResult = \\\"\\\";\\r\\n\\t\\tif(this.__grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar grid = this.__getPrototype(this.__grid);\\r\\n\\t\\t\\tif(grid && this.__isTypeNSGrid(grid))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tblHeader = grid.__tblCenterHeader;\\r\\n\\t\\t    \\tvar tblBody = grid.__tblCenterBody;\\r\\n\\t\\t    \\tif(tblHeader && tblHeader.tBodies && tblHeader.tBodies.length > 0 && tblHeader.tBodies[0].rows && tblHeader.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\tvar arrColumns = grid.__columns;\\r\\n\\t\\t    \\t\\tif(grid.gridType === grid.GRID_TYPE_GROUP)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrColumns = grid.util.cloneObject(arrColumns);\\r\\n\\t\\t\\t\\t\\t\\tarrColumns.splice(0, 1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t    \\t\\tvar cell = null;\\r\\n\\t\\t    \\t\\tvar arrCollItem = [];\\r\\n\\t\\t\\t        for(colIndex = 0; colIndex < arrColumns.length; colIndex++)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t        \\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t    \\t\\tvar headerText = colItem[\\\"headerText\\\"];\\r\\n\\t\\t\\t\\t    \\t\\tif(colIndex > 0)\\r\\n\\t\\t\\t\\t    \\t\\t{\\r\\n\\t\\t\\t\\t    \\t\\t\\tstrResult += delimiter;\\r\\n\\t\\t\\t\\t    \\t\\t}\\r\\n\\t\\t\\t\\t    \\t\\tstrResult += this.__getFieldValue(headerText,delimiter);\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        strResult += newLine;\\r\\n\\t\\t\\t        if(headerSeparator)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar separatorLength = strResult.length + 20;\\r\\n\\t\\t\\t        \\tfor(var count = 0;count < separatorLength;count++)\\r\\n\\t\\t\\t \\t        {\\r\\n\\t\\t\\t        \\t\\tstrResult += headerSeparator;\\r\\n\\t\\t\\t \\t        }\\r\\n\\t\\t\\t        \\tstrResult += newLine;\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        if(tblBody && tblBody.tBodies && tblBody.tBodies.length > 0 && tblBody.tBodies[0].rows && tblBody.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t        \\tvar arrItems = grid.__getAllItems();\\r\\n\\t\\t\\t        \\tvar colText = \\\"\\\";\\r\\n\\t\\t\\t        \\tfor(rowIndex = 0;rowIndex < arrItems.length;rowIndex++)\\r\\n\\t\\t\\t \\t        {\\r\\n\\t\\t\\t        \\t\\tvar item = arrItems[rowIndex];\\r\\n\\t\\t\\t        \\t\\tif(!item.hasOwnProperty(grid.__fieldRowVisible) || item[grid.__fieldRowVisible])\\r\\n\\t\\t\\t        \\t\\t{\\r\\n\\t\\t\\t\\t        \\t\\tfor(colIndex = 0;colIndex < arrColumns.length;colIndex++)\\r\\n\\t\\t\\t\\t    \\t        {\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t\\t        \\t\\t\\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t\\t    \\t        \\t{\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tif(colIndex > 0)\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\t\\t\\tstrResult += delimiter;\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\t\\t}\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolText = item[colItem[\\\"dataField\\\"]];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(colItem.hasOwnProperty(\\\"exportRenderer\\\"))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcolText = colItem[\\\"exportRenderer\\\"](item,colItem[\\\"dataField\\\"],item[grid.__fieldIndex],count);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tstrResult += this.__getFieldValue(colText,delimiter);\\r\\n\\t\\t\\t\\t    \\t        \\t}\\r\\n\\t\\t\\t\\t    \\t        }\\r\\n\\t\\t\\t\\t        \\t\\tstrResult += newLine;\\r\\n\\t\\t\\t        \\t\\t}\\r\\n\\t\\t\\t \\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__grid.tHead && this.__grid.tHead.rows && this.__grid.tHead.rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar headerRow = this.__grid.tHead.rows[0];\\r\\n\\t\\t\\t\\t\\tif(headerRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrCells = [];\\r\\n\\t\\t\\t\\t\\t\\tif(headerRow.getElementsByTagName(\\\"th\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"th\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(headerRow.getElementsByTagName(\\\"td\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"td\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t    \\t\\tvar cell = null;\\r\\n\\t\\t\\t\\t        for(colIndex = 0; colIndex < arrCells.length; colIndex++)\\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t\\t        \\tcell = arrCells[colIndex];\\r\\n\\t\\t\\t\\t\\t    \\t\\tvar headerText = cell.textContent.trim();\\r\\n\\t\\t\\t\\t\\t    \\t\\tif(colIndex > 0)\\r\\n\\t\\t\\t\\t\\t    \\t\\t{\\r\\n\\t\\t\\t\\t\\t    \\t\\t\\tstrResult += delimiter;\\r\\n\\t\\t\\t\\t\\t    \\t\\t}\\r\\n\\t\\t\\t\\t\\t    \\t\\tstrResult += this.__getFieldValue(headerText,delimiter);\\r\\n\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t        strResult += newLine;\\r\\n\\t\\t\\t\\t        if(headerSeparator)\\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\tvar separatorLength = strResult.length + 20;\\r\\n\\t\\t\\t\\t        \\tfor(var count = 0;count < separatorLength;count++)\\r\\n\\t\\t\\t\\t \\t        {\\r\\n\\t\\t\\t\\t        \\t\\tstrResult += headerSeparator;\\r\\n\\t\\t\\t\\t \\t        }\\r\\n\\t\\t\\t\\t        \\tstrResult += newLine;\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__grid.tBodies && this.__grid.tBodies.length > 0 && this.__grid.tBodies[0].rows && this.__grid.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrRows = this.__grid.tBodies[0].rows;\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t    \\t\\tfor(rowIndex = 0;rowIndex < arrRows.length;rowIndex++)\\r\\n\\t\\t \\t        {\\r\\n\\t\\t        \\t\\tvar row = arrRows[rowIndex];\\r\\n\\t\\t        \\t\\tvar cells = row.cells;\\r\\n\\t\\t        \\t\\tfor(colIndex = 0;colIndex < cells.length;colIndex++)\\r\\n\\t\\t    \\t        {\\r\\n\\t\\t        \\t\\t\\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t        \\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t\\t        \\t\\t\\tif(colIndex > 0)\\r\\n\\t\\t\\t\\t\\t    \\t\\t{\\r\\n\\t\\t\\t\\t\\t    \\t\\t\\tstrResult += delimiter;\\r\\n\\t\\t\\t\\t\\t    \\t\\t}\\r\\n\\t\\t\\t        \\t\\t\\tstrResult += this.__getFieldValue(cell.textContent.trim());\\r\\n\\t\\t\\t\\t        \\t}\\r\\n\\t\\t    \\t        }\\r\\n\\t\\t        \\t\\tstrResult += newLine;\\r\\n\\t\\t \\t        }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn strResult;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getTableAsXML = function() \\r\\n\\t{ \\r\\n\\t\\tvar strXML = \\\"\\\";\\r\\n\\t\\tif(this.__grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tstrXML = '<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>';\\r\\n\\t\\t\\tstrXML += '<root>';\\r\\n\\t\\t\\tvar grid = this.__getPrototype(this.__grid);\\r\\n\\t\\t\\tif(grid && this.__isTypeNSGrid(grid))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tblHeader = grid.__tblCenterHeader;\\r\\n\\t\\t    \\tvar tblBody = grid.__tblCenterBody;\\r\\n\\t\\t    \\tif(tblHeader && tblHeader.tBodies && tblHeader.tBodies.length > 0 && tblHeader.tBodies[0].rows && tblHeader.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\tstrXML += '<columns>';\\r\\n\\t\\t    \\t\\tvar arrColumns = grid.__columns;\\r\\n\\t\\t    \\t\\tif(grid.gridType === grid.GRID_TYPE_GROUP)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrColumns = grid.util.cloneObject(arrColumns);\\r\\n\\t\\t\\t\\t\\t\\tarrColumns.splice(0, 1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t    \\t\\tvar cell = null;\\r\\n\\t\\t    \\t\\tvar arrCollItem = [];\\r\\n\\t\\t\\t        for(colIndex = 0; colIndex < arrColumns.length; colIndex++)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t        \\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t    \\t\\tvar headerText = colItem[\\\"headerText\\\"];\\r\\n\\t\\t\\t\\t    \\t\\tstrXML += \\\"<column>\\\" + headerText + \\\"</column>\\\";\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        strXML += '</columns>';\\r\\n\\t\\t\\t        if(tblBody && tblBody.tBodies && tblBody.tBodies.length > 0 && tblBody.tBodies[0].rows && tblBody.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t        \\tstrXML += '<rows>';\\r\\n\\t\\t\\t        \\tvar arrItems = grid.__getAllItems();\\r\\n\\t\\t\\t        \\tvar colText = \\\"\\\";\\r\\n\\t\\t\\t        \\tvar rowCounter = 1;\\r\\n\\t\\t\\t        \\tfor(rowIndex = 0;rowIndex < arrItems.length;rowIndex++)\\r\\n\\t\\t\\t \\t        {\\r\\n\\t\\t\\t        \\t\\tvar item = arrItems[rowIndex];\\r\\n\\t\\t\\t        \\t\\tif(!item.hasOwnProperty(grid.__fieldRowVisible) || item[grid.__fieldRowVisible])\\r\\n\\t\\t\\t        \\t\\t{\\r\\n\\t\\t\\t        \\t\\t\\tstrXML += '<row id=\\\"row-'+ rowCounter++ +'\\\">';\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar colCounter = 1;\\r\\n\\t\\t\\t\\t        \\t\\tfor(colIndex = 0;colIndex < arrColumns.length;colIndex++)\\r\\n\\t\\t\\t\\t    \\t        {\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t\\t        \\t\\t\\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t\\t    \\t        \\t{\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolText = item[colItem[\\\"dataField\\\"]];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(colItem.hasOwnProperty(\\\"exportRenderer\\\"))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcolText = colItem[\\\"exportRenderer\\\"](item,colItem[\\\"dataField\\\"],item[grid.__fieldIndex],count);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tstrXML += '<column id=\\\"column-'+ colCounter++ +'\\\">';\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tstrXML += colText;\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tstrXML += '</column>';\\r\\n\\t\\t\\t\\t    \\t        \\t}\\r\\n\\t\\t\\t\\t    \\t        }\\r\\n\\t\\t\\t\\t        \\t\\tstrXML += '</row>';\\r\\n\\t\\t\\t        \\t\\t}\\r\\n\\t\\t\\t \\t        }\\r\\n\\t\\t\\t        \\tstrXML += '</rows>';\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__grid.tHead && this.__grid.tHead.rows && this.__grid.tHead.rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar headerRow = this.__grid.tHead.rows[0];\\r\\n\\t\\t\\t\\t\\tif(headerRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrCells = [];\\r\\n\\t\\t\\t\\t\\t\\tif(headerRow.getElementsByTagName(\\\"th\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"th\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(headerRow.getElementsByTagName(\\\"td\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"td\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tstrXML += '<columns>';\\r\\n\\t\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t    \\t\\tvar cell = null;\\r\\n\\t\\t\\t\\t        for(colIndex = 0; colIndex < arrCells.length; colIndex++)\\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t\\t        \\tcell = arrCells[colIndex];\\r\\n\\t\\t\\t\\t\\t        \\tstrXML += \\\"<column>\\\" + cell.textContent.trim() + \\\"</column>\\\";\\r\\n\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t        strXML += '</columns>';\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__grid.tBodies && this.__grid.tBodies.length > 0 && this.__grid.tBodies[0].rows && this.__grid.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrRows = this.__grid.tBodies[0].rows;\\r\\n\\t\\t\\t\\t\\tstrXML += '<rows>';\\r\\n\\t\\t        \\tvar rowCounter = 1;\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t    \\t\\tfor(rowIndex = 0;rowIndex < arrRows.length;rowIndex++)\\r\\n\\t\\t \\t        {\\r\\n\\t\\t    \\t\\t\\tstrXML += '<row id=\\\"row-'+ rowCounter++ +'\\\">';\\r\\n\\t\\t    \\t\\t\\tvar colCounter = 1;\\r\\n\\t\\t        \\t\\tvar row = arrRows[rowIndex];\\r\\n\\t\\t        \\t\\tvar cells = row.cells;\\r\\n\\t\\t        \\t\\tfor(colIndex = 0;colIndex < cells.length;colIndex++)\\r\\n\\t\\t    \\t        {\\r\\n\\t\\t        \\t\\t\\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t        \\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t\\t        \\t\\t\\tstrXML += '<column id=\\\"column-'+ colCounter++ +'\\\">';\\r\\n\\t\\t        \\t\\t\\t\\tstrXML += cell.textContent.trim();\\r\\n\\t\\t        \\t\\t\\t\\tstrXML += '</column>';\\r\\n\\t\\t\\t\\t        \\t}\\r\\n\\t\\t    \\t        }\\r\\n\\t\\t        \\t\\tstrXML += '</row>';\\r\\n\\t\\t \\t        }\\r\\n\\t\\t    \\t\\tstrXML += '</rows>';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tstrXML += '</root>';\\r\\n\\t\\t}\\r\\n\\t\\treturn strXML;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getTableAsJson = function() \\r\\n\\t{ \\r\\n\\t\\tvar retValue = { columns: [], rows: [] };\\r\\n\\t\\tif(this.__grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar grid = this.__getPrototype(this.__grid);\\r\\n\\t\\t\\tif(grid && this.__isTypeNSGrid(grid))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tblHeader = grid.__tblCenterHeader;\\r\\n\\t\\t    \\tvar tblBody = grid.__tblCenterBody;\\r\\n\\t\\t    \\tif(tblHeader && tblHeader.tBodies && tblHeader.tBodies.length > 0 && tblHeader.tBodies[0].rows && tblHeader.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\tvar arrColumns = grid.__columns;\\r\\n\\t\\t    \\t\\tif(grid.gridType === grid.GRID_TYPE_GROUP)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrColumns = grid.util.cloneObject(arrColumns);\\r\\n\\t\\t\\t\\t\\t\\tarrColumns.splice(0, 1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t        for(colIndex = 0; colIndex < arrColumns.length; colIndex++)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t        \\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t    \\t\\tvar headerText = colItem[\\\"headerText\\\"];\\r\\n\\t\\t\\t\\t    \\t\\tretValue.columns.push(headerText);\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        if(tblBody && tblBody.tBodies && tblBody.tBodies.length > 0 && tblBody.tBodies[0].rows && tblBody.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t        \\tvar arrItems = grid.__getAllItems();\\r\\n\\t\\t\\t        \\tvar colText = \\\"\\\";\\r\\n\\t\\t\\t        \\tfor(rowIndex = 0;rowIndex < arrItems.length;rowIndex++)\\r\\n\\t\\t\\t \\t        {\\r\\n\\t\\t\\t        \\t\\tvar item = arrItems[rowIndex];\\r\\n\\t\\t\\t        \\t\\tif(!item.hasOwnProperty(grid.__fieldRowVisible) || item[grid.__fieldRowVisible])\\r\\n\\t\\t\\t        \\t\\t{\\r\\n\\t\\t\\t\\t        \\t\\tvar rowData = [];\\r\\n\\t\\t\\t\\t        \\t\\tfor(colIndex = 0;colIndex < arrColumns.length;colIndex++)\\r\\n\\t\\t\\t\\t    \\t        {\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t\\t        \\t\\t\\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t\\t    \\t        \\t{\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolText = item[colItem[\\\"dataField\\\"]];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(colItem.hasOwnProperty(\\\"exportRenderer\\\"))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcolText = colItem[\\\"exportRenderer\\\"](item,colItem[\\\"dataField\\\"],item[grid.__fieldIndex],count);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\trowData.push(colText ? colText : \\\"\\\");\\r\\n\\t\\t\\t\\t    \\t        \\t}\\r\\n\\t\\t\\t\\t    \\t        }\\r\\n\\t\\t\\t\\t        \\t\\tretValue.rows.push(rowData);\\r\\n\\t\\t\\t        \\t\\t}\\r\\n\\t\\t\\t \\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__grid.tHead && this.__grid.tHead.rows && this.__grid.tHead.rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar headerRow = this.__grid.tHead.rows[0];\\r\\n\\t\\t\\t\\t\\tif(headerRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrCells = [];\\r\\n\\t\\t\\t\\t\\t\\tif(headerRow.getElementsByTagName(\\\"th\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"th\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(headerRow.getElementsByTagName(\\\"td\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"td\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t    \\t\\tvar cell = null;\\r\\n\\t\\t\\t\\t        for(colIndex = 0; colIndex < arrCells.length; colIndex++)\\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t\\t        \\tcell = arrCells[colIndex];\\r\\n\\t\\t\\t\\t\\t        \\tretValue.columns.push(typeof cell !== \\\"undefined\\\" ? cell.textContent.trim() : \\\"\\\");\\r\\n\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__grid.tBodies && this.__grid.tBodies.length > 0 && this.__grid.tBodies[0].rows && this.__grid.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrRows = this.__grid.tBodies[0].rows;\\r\\n\\t\\t        \\tvar rowCounter = 1;\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t    \\t\\tfor(rowIndex = 0;rowIndex < arrRows.length;rowIndex++)\\r\\n\\t\\t \\t        {\\r\\n\\t\\t        \\t\\tvar row = arrRows[rowIndex];\\r\\n\\t\\t        \\t\\tvar style = window.getComputedStyle(row);\\r\\n\\t\\t        \\t\\tif (style.display !== \\\"none\\\") \\r\\n\\t\\t        \\t\\t{\\r\\n\\t\\t        \\t\\t\\tvar rowData = [];\\r\\n\\t\\t\\t        \\t\\tvar cells = row.cells;\\r\\n\\t\\t\\t        \\t\\tfor(colIndex = 0;colIndex < cells.length;colIndex++)\\r\\n\\t\\t\\t    \\t        {\\r\\n\\t\\t\\t        \\t\\t\\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t\\t\\t        \\t\\t\\trowData.push(typeof cell !== \\\"undefined\\\" ? cell.textContent.trim() : \\\"\\\");\\r\\n\\t\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t    \\t        }\\r\\n\\t\\t\\t        \\t\\tretValue.rows.push(rowData);\\r\\n\\t\\t        \\t\\t}\\r\\n\\t\\t \\t        }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn JSON.stringify(retValue);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getTableAsArray = function() \\r\\n\\t{ \\r\\n\\t\\tvar arrSource = [];\\r\\n\\t\\tvar arrColumns = [];\\r\\n\\t\\tvar util = this.util;\\r\\n\\t\\tif(this.__grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar grid = this.__getPrototype(this.__grid);\\r\\n\\t\\t\\tif(grid && this.__isTypeNSGrid(grid))\\r\\n\\t\\t\\t{\\r\\n\\t\\t    \\tif(grid.__columns && grid.__columns.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\tvar arrColumnsTemp = grid.util.cloneObject(grid.__columns,true);\\r\\n\\t\\t    \\t\\tif(grid.gridType === grid.GRID_TYPE_GROUP)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\t\\tarrColumnsTemp.splice(0, 1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t        for(colIndex = 0; colIndex < arrColumnsTemp.length; colIndex++)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar colItem = arrColumnsTemp[colIndex];\\r\\n\\t\\t\\t        \\tif(!(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"]))))\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t        \\t\\tarrColumnsTemp.splice(colIndex, 1);\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        \\telse\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t        \\t\\tcolItem.headerCellStyle = colItem[\\\"excelStyleHeaderFunction\\\"] ? colItem[\\\"excelStyleHeaderFunction\\\"](colItem,colIndex) : null;\\r\\n\\t\\t\\t        \\t\\tcolItem.type = colItem.exportType;\\r\\n\\t\\t\\t        \\t\\tif(!util.isUndefinedOrNull(colItem.width))\\r\\n\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t        \\t\\tvar unit = util.getDimensionUnit(colItem.width);\\r\\n\\t\\t\\t\\t        \\t\\tswitch(unit)\\r\\n\\t\\t\\t\\t        \\t\\t{\\r\\n\\t\\t\\t\\t        \\t\\t\\tcase 1:\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolItem.widthInPercentage = parseInt(colItem.width.substring(0,colItem.width.length - 1));\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolItem.width = null;\\r\\n\\t\\t\\t\\t        \\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t        \\t\\t\\tcase 2:\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolItem.widthInPx = util.getDimensionAsNumber(null,colItem.width);\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolItem.width = null;\\r\\n\\t\\t\\t\\t        \\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t        \\t\\t}\\r\\n\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        var dataSource = grid.getFilteredData();\\r\\n\\t\\t\\t        if(dataSource && dataSource.length > 0)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tfor(rowIndex = 0;rowIndex < dataSource.length;rowIndex++)\\r\\n\\t\\t\\t \\t        {\\r\\n\\t\\t\\t        \\t\\tvar data = dataSource[rowIndex];\\r\\n\\t\\t\\t        \\t\\tvar item = {};\\r\\n\\t\\t\\t        \\t\\tfor(colIndex = 0;colIndex < arrColumnsTemp.length;colIndex++)\\r\\n\\t\\t\\t    \\t        {\\r\\n\\t\\t\\t        \\t\\t\\tvar colItem = arrColumnsTemp[colIndex];\\r\\n\\t\\t\\t        \\t\\t\\tvar dataField = colItem.dataField;\\r\\n\\t\\t\\t        \\t\\t\\tvar text = colItem[\\\"exportGetBodyTextFunction\\\"] ? colItem[\\\"exportGetBodyTextFunction\\\"](data,dataField,colItem) : data[dataField];\\r\\n\\t\\t\\t        \\t\\t\\tvar style = colItem[\\\"excelStyleBodyFunction\\\"] ? colItem[\\\"excelStyleBodyFunction\\\"](data,dataField,colItem,text) : null;\\r\\n\\t\\t\\t        \\t\\t\\titem[dataField] = {value: text,style: style};\\r\\n\\t\\t\\t    \\t        }\\r\\n\\t\\t\\t        \\t\\tarrSource.push(item);\\r\\n\\t\\t\\t \\t        }\\r\\n\\t\\t\\t        \\tif(grid.__enableFooter)\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t        \\t\\tvar item = {};\\r\\n\\t\\t\\t        \\t\\tfor (var colIndex = 0; colIndex < arrColumnsTemp.length; colIndex++)\\r\\n\\t\\t\\t    \\t\\t    {\\r\\n\\t\\t\\t    \\t\\t    \\tvar colItem = arrColumnsTemp[colIndex];\\r\\n\\t\\t\\t    \\t\\t    \\tvar dataField = colItem.dataField;\\r\\n\\t\\t\\t    \\t\\t    \\tvar text = colItem[\\\"exportGetFooterTextFunction\\\"] ? colItem[\\\"exportGetFooterTextFunction\\\"](dataField,colItem,grid.getGroupedSource(),0,colIndex) : \\\"\\\";\\r\\n\\t\\t\\t    \\t\\t    \\tvar style = colItem[\\\"excelStyleFooterFunction\\\"] ? colItem[\\\"excelStyleFooterFunction\\\"](dataField,colItem,grid.getGroupedSource(),0,colIndex,text) : null;\\r\\n\\t\\t\\t        \\t\\t\\titem[dataField] = {value: text,style: style};\\r\\n\\t\\t\\t    \\t\\t    }\\r\\n\\t\\t\\t        \\t\\tarrSource.push(item);\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        arrColumns = arrColumnsTemp;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__grid.tHead && this.__grid.tHead.rows && this.__grid.tHead.rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar headerRow = this.__grid.tHead.rows[0];\\r\\n\\t\\t\\t\\t\\tif(headerRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrCells = [];\\r\\n\\t\\t\\t\\t\\t\\tif(headerRow.getElementsByTagName(\\\"th\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"th\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(headerRow.getElementsByTagName(\\\"td\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"td\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t    \\t\\tvar cell = null;\\r\\n\\t\\t\\t    \\t\\tvar text = \\\"\\\";\\r\\n\\t\\t\\t    \\t\\tvar headerText = \\\"\\\";\\r\\n\\t\\t\\t    \\t\\tvar dataField = \\\"\\\";\\r\\n\\t\\t\\t\\t        for(colIndex = 0; colIndex < arrCells.length; colIndex++)\\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t\\t        \\tcell = arrCells[colIndex];\\r\\n\\t\\t\\t\\t\\t        \\tvar altText = \\\"col\\\" + colIndex;\\r\\n\\t\\t\\t\\t\\t        \\tif(typeof cell == \\\"undefined\\\" || cell.textContent.trim() !== \\\"\\\")\\r\\n\\t\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t\\t        \\t\\ttext = \\\"\\\";\\r\\n\\t\\t\\t\\t\\t        \\t\\theaderText = \\\"\\\";\\r\\n\\t\\t\\t\\t\\t        \\t\\tdataField = altText;\\r\\n\\t\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t\\t\\t        \\telse\\r\\n\\t\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t\\t        \\t\\ttext = cell.textContent.trim();\\r\\n\\t\\t\\t\\t\\t        \\t\\theaderText = text;\\r\\n\\t\\t\\t\\t\\t        \\t\\tdataField = text;\\r\\n\\t\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t\\t\\t        \\tarrColumns.push({headerText:headerText,dataField:dataField,widthInPx:cell.offsetWidth});\\r\\n\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__grid.tBodies && this.__grid.tBodies.length > 0 && this.__grid.tBodies[0].rows && this.__grid.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrRows = this.__grid.tBodies[0].rows;\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t    \\t\\tfor(rowIndex = 0;rowIndex < arrRows.length;rowIndex++)\\r\\n\\t\\t \\t        {\\r\\n\\t\\t        \\t\\tvar row = arrRows[rowIndex];\\r\\n\\t\\t        \\t\\tvar style = window.getComputedStyle(row);\\r\\n\\t\\t        \\t\\tif (style.display !== \\\"none\\\") \\r\\n\\t\\t        \\t\\t{\\r\\n\\t\\t\\t        \\t\\tvar cells = row.cells;\\r\\n\\t\\t\\t        \\t\\tvar item = {};\\r\\n\\t\\t\\t        \\t\\tvar arrColIndex = 0;\\r\\n\\t\\t\\t        \\t\\tfor(colIndex = 0;colIndex < cells.length;colIndex++)\\r\\n\\t\\t\\t    \\t        {\\r\\n\\t\\t\\t        \\t\\t\\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar objColumn = arrColumns[arrColIndex];\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar text = (typeof cell == \\\"undefined\\\" || cell.textContent.trim() !== \\\"\\\") ? cell.textContent.trim() : \\\"\\\";\\r\\n\\t\\t\\t\\t        \\t\\t\\titem[objColumn.dataField] = {value: text};\\r\\n\\t\\t\\t\\t        \\t\\t\\tarrColIndex++;\\r\\n\\t\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t    \\t        }\\r\\n\\t\\t\\t        \\t\\tarrSource.push(item);\\r\\n\\t\\t        \\t\\t}\\r\\n\\t\\t \\t        }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn {columns:arrColumns,source:arrSource};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getStructureForPDF = function(width,fontSize) \\r\\n\\t{ \\r\\n\\t\\tif(this.__grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar tblResult = this.__getTable();\\r\\n\\t\\t\\ttblResult.style.width = width + \\\"px\\\";\\r\\n\\t\\t\\ttblResult.style.fontSize = fontSize + \\\"px\\\";\\r\\n\\t\\t\\tvar divParent = this.util.createDiv(\\\"div\\\" + this.util.getUniqueId());\\r\\n\\t\\t\\tdivParent.appendChild(tblResult);\\r\\n\\t\\t\\treturn divParent;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getStructureForImage = function() \\r\\n\\t{ \\r\\n\\t\\tvar divReturn = null;\\r\\n\\t\\tif(this.__grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar grid = this.__getPrototype(this.__grid);\\r\\n\\t\\t\\tif(grid && this.__isTypeNSGrid(grid))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivReturn = grid.__divOuterContainer;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivReturn = this.__grid.parentElement;\\r\\n\\t\\t\\t\\tif(divReturn && divReturn.nodeName === \\\"BODY\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdivReturn = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn divReturn;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__isColumnIgnored = function(colIndex) \\r\\n\\t{\\r\\n\\t    if(this.__ignoreColumn && this.__ignoreColumn.length > 0)\\r\\n\\t    {\\r\\n\\t    \\tfor(var count = 0;count < this.__ignoreColumn.length;count++)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tif(this.__ignoreColumn[count] === colIndex)\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\treturn true;\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t}\\r\\n\\t    }\\r\\n\\t    return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getFieldValue = function(value,delimiter) \\r\\n\\t{\\r\\n\\t\\tif(!value)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvalue = \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t\\tvalue = \\\"\\\" + value;\\r\\n\\t    var addQuotes = (value.indexOf(delimiter) !== -1) || (value.indexOf('\\\\r') !== -1) || (value.indexOf('\\\\n') !== -1);\\r\\n\\t    var replaceDoubleQuotes = (value.indexOf('\\\"') !== -1);\\r\\n\\t    if (replaceDoubleQuotes) \\r\\n\\t    {\\r\\n\\t    \\tvalue = fixedValue.replace(/\\\"/g, '\\\"\\\"');\\r\\n\\t    }\\r\\n\\t    if (addQuotes || replaceDoubleQuotes) \\r\\n\\t    {\\r\\n\\t    \\tvalue = '\\\"' + value + '\\\"';\\r\\n\\t    }\\r\\n\\t    return value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getFileName = function(format) \\r\\n\\t{\\r\\n\\t\\tvar date = new Date();\\r\\n\\t    var day = date.getDate();\\r\\n\\t    var month = date.getMonth() + 1;\\r\\n\\t    var year = date.getFullYear();\\r\\n\\t    var hour = date.getHours();\\r\\n\\t    var mins = date.getMinutes();\\r\\n\\t    var timePart = day + \\\".\\\" + month + \\\".\\\" + year + \\\"_\\\" + hour + \\\".\\\" + mins;\\r\\n\\t    var fileName = (this.__fileName? this.__fileName : \\\"download\\\");\\r\\n\\t    fileName = fileName + \\\"(\\\" + timePart + \\\")\\\" + \\\".\\\" + format;\\r\\n\\t    \\r\\n\\t    return fileName;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//taken from http://stackoverflow.com/questions/4998908/convert-data-uri-to-file-then-append-to-formdata\\r\\n\\tNSExport.prototype.__dataURItoBlob = function(dataURI) \\r\\n\\t{\\r\\n\\t    // convert base64/URLEncoded data component to raw binary data held in a string\\r\\n\\t    var byteString = null;\\r\\n\\t    var uintArray = null;\\r\\n\\t    var mimeString = null;\\r\\n\\t    if (dataURI.split(',')[0].indexOf('base64') >= 0)\\r\\n\\t    {\\r\\n\\t    \\t byteString = window.atob(dataURI.split(',')[1]);\\r\\n\\t    }\\r\\n\\t    else\\r\\n\\t    {\\r\\n\\t    \\t byteString = decodeURIComponent(dataURI.split(',')[1]);\\r\\n\\t    }\\r\\n\\t    // separate out the mime component\\r\\n\\t    mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\\r\\n\\t    // write the bytes of the string to a typed array\\r\\n\\t    uintArray = new Uint8Array(byteString.length);\\r\\n\\t    for (var count = 0; count < byteString.length; count++) \\r\\n\\t    {\\r\\n\\t    \\tuintArray[count] = byteString.charCodeAt(count);\\r\\n\\t    }\\r\\n\\t\\r\\n\\t    return new Blob([uintArray], {type:mimeString});\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__includeJavaScriptFile = function (filePath,callback,position)\\r\\n\\t{\\r\\n\\t    if(filePath)\\r\\n\\t    {\\r\\n\\t        if(!position)\\r\\n\\t        {\\r\\n\\t            position = \\\"body\\\";\\r\\n\\t        }\\r\\n\\t        var domPosition = document.getElementsByTagName(position)[0];\\r\\n\\t        var script = document.createElement(\\\"script\\\");\\r\\n\\t        script.setAttribute(\\\"id\\\", filePath);\\r\\n\\t        script.setAttribute(\\\"type\\\",\\\"text/javascript\\\");\\r\\n\\t        script.setAttribute(\\\"src\\\",filePath);\\r\\n\\t        if(callback)\\r\\n\\t        {\\r\\n\\t            script.onload = function()\\r\\n\\t            {\\r\\n\\t            \\tcallback(filePath);\\r\\n\\t            }; \\r\\n\\t        }\\r\\n\\t        domPosition.appendChild(script);\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getPrototype = function(grid) \\r\\n\\t{\\r\\n\\t\\tif(grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isElementOfType(grid,\\\"NS-GRID\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tgrid = grid.__nsGrid;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn grid;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__isTypeNSGrid = function(grid) \\r\\n\\t{\\r\\n\\t\\ttry\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(grid)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(grid instanceof NSGrid)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tcatch(error)\\r\\n\\t\\t{}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.xslxExport = function(objNSExport,worksheetName,event,properties)\\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__objNSExport = objNSExport;\\r\\n\\t\\tthis.__worksheetName = worksheetName;\\r\\n\\t\\tthis.__event = event;\\r\\n\\t\\tthis.__properties = properties;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\t\\r\\n\\t\\tthis.exportToxlsx = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar processXSLX = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objTableValue = self.__objNSExport.__getTableAsArray();\\r\\n\\t\\t\\t\\tif(objTableValue)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(!self.__properties)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tself.__properties = {};\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar fileName = self.__objNSExport.__getFileName(\\\"xlsx\\\");\\r\\n\\t\\t\\t\\t\\tvar headerStyle = {\\r\\n\\t\\t\\t\\t\\t\\t\\tfont: {bold: true, color: '#FFFFFF'},\\r\\n\\t\\t\\t\\t\\t\\t\\thorizontal: 'center',\\r\\n\\t\\t\\t\\t\\t\\t\\tpattern: {color: '#000000'}\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\tvar prop = {};\\r\\n\\t\\t\\t\\t\\tfor(var key in self.__properties)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tprop[key] = self.__properties[key];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tprop.dataSource = objTableValue.source;\\r\\n\\t\\t\\t\\t\\tprop.columns = objTableValue.columns;\\r\\n\\t\\t\\t\\t\\tprop.name = prop.name || \\\"Sheet 1\\\";\\r\\n\\t\\t\\t\\t\\tprop.headerStyle = prop.headerStyle || headerStyle;\\r\\n\\t\\t\\t\\t\\tvar arrSheet=[prop];\\r\\n\\t\\t\\t\\t\\tvar setting = {fileName:fileName,sheets:arrSheet};\\r\\n\\t\\t\\t\\t\\tvar xlsxExport = new NSXlsxExport(setting);\\r\\n\\t\\t\\t\\t\\txlsxExport.process();\\r\\n\\t\\t\\t\\t\\tif(self.__event)\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\t\\tself.util.preventDefault(this.__event);\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tprocessXSLX();\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\treturn NSExport;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSExport\\\",NSExport);\";","export const NSPromiseCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\n\\r\\n\\t\\t}\\r\\n//https://github.com/YahooArchive/ypromise/blob/master/promise.js\\r\\nvar Promise = (function () \\r\\n{\\r\\n\\tfunction Resolver() \\r\\n\\t{\\r\\n\\t\\tthis._callbacks = [];\\r\\n\\t\\tthis._errbacks = [];\\r\\n\\t\\tthis._status = 'pending';\\r\\n\\t\\tthis._result = null;\\r\\n\\t}\\r\\n\\t\\r\\n\\tResolver.prototype.fulfill = function (value) \\r\\n    {\\r\\n\\t\\tvar status = this._status;\\r\\n        if (status === 'pending' || status === 'accepted') \\r\\n        {\\r\\n            this._result = value;\\r\\n            this._status = 'fulfilled';\\r\\n        }\\r\\n        if (this._status === 'fulfilled') \\r\\n        {\\r\\n            this._notify(this._callbacks, this._result);\\r\\n            this._callbacks = [];\\r\\n            this._errbacks = null;\\r\\n        }\\r\\n    };\\r\\n    \\r\\n    Resolver.prototype.reject = function (reason) \\r\\n    {\\r\\n    \\tvar status = this._status;\\r\\n        if (status === 'pending' || status === 'accepted') \\r\\n        {\\r\\n            this._result = reason;\\r\\n            this._status = 'rejected';\\r\\n        }\\r\\n        if (this._status === 'rejected') \\r\\n        {\\r\\n            this._notify(this._errbacks, this._result);\\r\\n            this._callbacks = null;\\r\\n            this._errbacks = [];\\r\\n        }\\r\\n    };\\r\\n    \\r\\n    Resolver.prototype.resolve = function (value) \\r\\n    {\\r\\n        if (this._status === 'pending') \\r\\n        {\\r\\n            this._status = 'accepted';\\r\\n            this._value = value;\\r\\n            if ((this._callbacks && this._callbacks.length) || this._errbacks && this._errbacks.length)\\r\\n            {\\r\\n                this._unwrap(this._value);\\r\\n            }\\r\\n        }\\r\\n    };\\r\\n    \\r\\n    Resolver.prototype._unwrap = function (value) \\r\\n    {\\r\\n        var self = this, unwrapped = false, then;\\r\\n        if (!value || (typeof value !== 'object' && typeof value !== 'function')) \\r\\n        {\\r\\n            self.fulfill(value);\\r\\n            return;\\r\\n        }\\r\\n        try \\r\\n        {\\r\\n            then = value.then;\\r\\n            if (typeof then === 'function') \\r\\n            {\\r\\n                then.call(value, function (value) \\r\\n                {\\r\\n                    if (!unwrapped) \\r\\n                    {\\r\\n                        unwrapped = true;\\r\\n                        self._unwrap(value);\\r\\n                    }\\r\\n                }, \\r\\n                function (reason) \\r\\n                {\\r\\n                    if (!unwrapped) \\r\\n                    {\\r\\n                        unwrapped = true;\\r\\n                        self.reject(reason);\\r\\n                    }\\r\\n                });\\r\\n            } \\r\\n            else \\r\\n            {\\r\\n                self.fulfill(value);\\r\\n            }\\r\\n        } \\r\\n        catch (e) \\r\\n        {\\r\\n            if (!unwrapped) \\r\\n            {\\r\\n                self.reject(e);\\r\\n            }\\r\\n        }\\r\\n    };\\r\\n\\r\\n    Resolver.prototype._addCallbacks = function (callback, errback) \\r\\n    {\\r\\n        var callbackList = this._callbacks,\\r\\n            errbackList  = this._errbacks;\\r\\n        if (callbackList) \\r\\n        {\\r\\n            callbackList.push(callback);\\r\\n        }\\r\\n        if (errbackList) \\r\\n        {\\r\\n            errbackList.push(errback);\\r\\n        }\\r\\n        switch (this._status) \\r\\n        {\\r\\n            case 'accepted':\\r\\n                this._unwrap(this._value);\\r\\n                break;\\r\\n            case 'fulfilled':\\r\\n                this.fulfill(this._result);\\r\\n                break;\\r\\n            case 'rejected':\\r\\n                this.reject(this._result);\\r\\n                break;\\r\\n        }\\r\\n    };\\r\\n    \\r\\n    Resolver.prototype._notify = function (subs, result) \\r\\n    {\\r\\n        if (subs.length) \\r\\n        {\\r\\n            Promise.async(function () \\r\\n            {\\r\\n                var i, len;\\r\\n                for (i = 0, len = subs.length; i < len; ++i) \\r\\n                {\\r\\n                    subs[i](result);\\r\\n                }\\r\\n            });\\r\\n        }\\r\\n    };\\r\\n\\t\\r\\n    function Promise(fn) \\r\\n    {\\r\\n    \\tif (!(this instanceof Promise))\\r\\n    \\t{\\r\\n    \\t\\tthrow new TypeError('Promises must be constructed via new');\\r\\n    \\t}\\r\\n    \\tif (typeof fn !== 'function')\\r\\n    \\t{\\r\\n    \\t\\tthrow new TypeError(\\\"Promise constructor takes a function argument\\\");\\r\\n    \\t}\\r\\n    \\tvar resolver = new Resolver();\\r\\n    \\tthis._resolver = resolver;\\r\\n\\r\\n        try \\r\\n        {\\r\\n            fn(function (value) \\r\\n            {\\r\\n                resolver.resolve(value);\\r\\n            }, \\r\\n            function (reason) \\r\\n            {\\r\\n                resolver.reject(reason);\\r\\n            });\\r\\n        } \\r\\n        catch (e) \\r\\n        {\\r\\n            resolver.reject(e);\\r\\n        }\\r\\n    }\\r\\n        \\r\\n    Promise.prototype.then = function (callback, errback) \\r\\n    {\\r\\n    \\tvar resolve, reject,\\r\\n        promise = new this.constructor(function (res, rej) \\r\\n        {\\r\\n            resolve = res;\\r\\n            reject = rej;\\r\\n        });\\r\\n\\r\\n\\t    this._resolver._addCallbacks(typeof callback === 'function' ? Promise._makeCallback(promise, resolve, reject, callback) : resolve,\\r\\n\\t        typeof errback === 'function' ? Promise._makeCallback(promise, resolve, reject, errback) : reject);\\r\\n\\r\\n\\t    return promise;\\r\\n    };\\r\\n    \\r\\n    Promise.prototype[\\\"catch\\\"] = function(errback) \\r\\n    {\\r\\n    \\treturn this.then(undefined, errback);\\r\\n    };\\r\\n    \\r\\n    Promise.resolve = function (value) \\r\\n    {\\r\\n        if (value && value.constructor === this) \\r\\n        {\\r\\n            return value;\\r\\n        }\\r\\n        return new this(function (resolve) \\r\\n        {\\r\\n            resolve(value);\\r\\n        });\\r\\n    };\\r\\n    \\r\\n    Promise.reject = function (reason) \\r\\n    {\\r\\n        var promise = new this(function () {});\\r\\n       promise._resolver._result = reason;\\r\\n       promise._resolver._status = 'rejected';\\r\\n\\r\\n       return promise;\\r\\n    };\\r\\n    \\r\\n    Promise.all = function (values) \\r\\n    {\\r\\n        var Promise = this;\\r\\n        var util = new NSUtil();\\r\\n        return new Promise(function (resolve, reject) \\r\\n        {\\r\\n            if (!util.isArray(values)) \\r\\n            {\\r\\n                reject(new TypeError('Promise.all expects an array of values or promises'));\\r\\n                return;\\r\\n            }\\r\\n\\r\\n            var remaining = values.length,\\r\\n                i         = 0,\\r\\n                length    = values.length,\\r\\n                results   = [];\\r\\n\\r\\n            function oneDone(index) \\r\\n            {\\r\\n                return function (value) \\r\\n                {\\r\\n                    results[index] = value;\\r\\n\\r\\n                    remaining--;\\r\\n\\r\\n                    if (!remaining) \\r\\n                    {\\r\\n                        resolve(results);\\r\\n                    }\\r\\n                };\\r\\n            }\\r\\n\\r\\n            if (length < 1) \\r\\n            {\\r\\n                return resolve(results);\\r\\n            }\\r\\n\\r\\n            for (; i < length; i++) \\r\\n            {\\r\\n                Promise.resolve(values[i]).then(oneDone(i), reject);\\r\\n            }\\r\\n        });\\r\\n    };\\r\\n    \\r\\n    Promise.race = function (values) \\r\\n    {\\r\\n        var Promise = this;\\r\\n        var util = new NSUtil();\\r\\n        return new Promise(function (resolve, reject) \\r\\n        {\\r\\n            if (!util.isArray(values)) \\r\\n            {\\r\\n                reject(new TypeError('Promise.race expects an array of values or promises'));\\r\\n                return;\\r\\n            }\\r\\n            for (var i = 0, count = values.length; i < count; i++) \\r\\n            {\\r\\n                Promise.resolve(values[i]).then(resolve, reject);\\r\\n            }\\r\\n        });\\r\\n    };\\r\\n    \\r\\n    Promise.async = typeof setImmediate !== 'undefined' ?\\r\\n            function (fn) {setImmediate(fn);} :\\r\\n        typeof process !== 'undefined' && process.nextTick ?\\r\\n            process.nextTick :\\r\\n        function (fn) {setTimeout(fn, 0);};\\r\\n    \\r\\n    Promise._makeCallback = function (promise, resolve, reject, fn) \\r\\n    {\\r\\n        return function (valueOrReason) \\r\\n        {\\r\\n            var result;\\r\\n            try \\r\\n            {\\r\\n                result = fn(valueOrReason);\\r\\n            } \\r\\n            catch (e) \\r\\n            {\\r\\n                reject(e);\\r\\n                return;\\r\\n            }\\r\\n            if (result === promise) \\r\\n            {\\r\\n                reject(new TypeError('Cannot resolve a promise with itself'));\\r\\n                return;\\r\\n            }\\r\\n            resolve(result);\\r\\n        };\\r\\n    };\\r\\n    \\r\\n    Promise.Resolver = Resolver;\\r\\n    \\r\\n    var globalNS = (function() \\r\\n    {\\r\\n    \\t  if (typeof self !== 'undefined') {\\r\\n    \\t    return self;\\r\\n    \\t  }\\r\\n    \\t  if (typeof window !== 'undefined') {\\r\\n    \\t    return window;\\r\\n    \\t  }\\r\\n    \\t  if (typeof global !== 'undefined') {\\r\\n    \\t    return global;\\r\\n    \\t  }\\r\\n    \\t  throw new Error('unable to locate global object');\\r\\n    })();\\r\\n    \\r\\n    if (typeof globalNS['Promise'] !== 'function') \\r\\n    {\\r\\n    \\tglobalNS['Promise'] = Promise;\\r\\n    }\\r\\n    else\\r\\n    {\\r\\n    \\tPromise = globalNS['Promise'];\\r\\n    }\\r\\n    \\r\\n    return Promise;\\r\\n}());\\r\\nnsModuleExport(this,\\\"Promise\\\",Promise);\";","export const NSAjaxCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\n\\r\\n\\t\\t}\\r\\n\\\"use strict\\\";\\r\\nvar NSAjax = (function()\\r\\n{\\r\\n\\tfunction NSAjax(defaultSetting) \\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tself.__defaultSetting = defaultSetting || {};\\r\\n\\t\\tvar activeReq = 0;\\r\\n\\t\\tself.__eligibleMethods = [\\\"POST\\\",\\\"GET\\\",\\\"DELETE\\\",\\\"HEAD\\\",\\\"OPTIONS\\\",\\\"PUT\\\"];\\r\\n\\t\\t\\r\\n\\t\\t/*var post = function(url,data,setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn processRequest(getSetting(\\\"POST\\\",url,data,setting));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar get = function(url,data,setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn processRequest(getSetting(\\\"GET\\\",url,data,setting));\\r\\n\\t\\t};*/\\r\\n\\t\\t\\r\\n\\t\\tvar jsonp = function(url,data,setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsetting = setting ? setting : {};\\r\\n\\t\\t\\tsetting.dataType = \\\"JSONP\\\";\\r\\n\\t\\t\\tsetting.url = url;\\r\\n\\t\\t\\tsetting.param = data;\\r\\n\\t\\t\\treturn processRequest(setting);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getSetting = function(method,url,data,setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsetting = setting ? setting : {};\\r\\n\\t\\t\\tsetting.method = method || self.__defaultSetting.method;\\r\\n\\t\\t\\tsetting.url = url || self.__defaultSetting.url;\\r\\n\\t\\t\\tsetting.param = data || self.__defaultSetting.param;\\r\\n\\t\\t\\tsetting.dataType = setting.dataType || self.__defaultSetting.dataType;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn setting;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar processRequest = function(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar config = null;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar onInit = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!setting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tself.util = new NSUtil();\\r\\n\\t\\t\\t\\tself.ajaxUtil = new AjaxUtil(self);\\r\\n\\t\\t\\t\\tself.dom = self.util.getDomVariables();\\r\\n\\t\\t\\t\\tconfig = {\\r\\n\\t\\t\\t\\t\\t\\tmethod: setting[\\\"method\\\"] || \\\"POST\\\",\\r\\n\\t\\t\\t\\t\\t\\turl: setting[\\\"url\\\"] || \\\"\\\",\\r\\n\\t\\t\\t\\t\\t\\tparam: setting[\\\"param\\\"] || {},\\r\\n\\t\\t\\t\\t\\t\\tdataType: setting[\\\"dataType\\\"] || \\\"\\\",\\r\\n\\t\\t\\t\\t\\t\\tcompleteHandler: setting[\\\"completeHandler\\\"],\\r\\n\\t\\t\\t\\t\\t\\ttimeOutHandler: setting[\\\"timeOutHandler\\\"],\\r\\n\\t\\t\\t\\t\\t\\t//if browser supports W3C Events then the below function will fire\\r\\n\\t\\t\\t\\t\\t\\tloadStartHandler: setting[\\\"loadStartHandler\\\"],\\r\\n\\t\\t\\t\\t\\t\\tprogressHandler: setting[\\\"progressHandler\\\"],\\r\\n\\t\\t\\t\\t\\t\\tabortHandler: setting[\\\"abortHandler\\\"],\\r\\n\\t\\t\\t\\t\\t\\t//end of browser supports W3C Events then the below function will fire\\r\\n\\t\\t\\t\\t\\t\\ttimeout: setting.timeout || -1,\\r\\n\\t\\t\\t\\t\\t\\theader: setting[\\\"header\\\"],\\r\\n\\t\\t\\t\\t\\t\\tencodeParam: (typeof setting[\\\"encodeParam\\\"] == \\\"undefined\\\") ? false : setting[\\\"encodeParam\\\"],\\r\\n\\t\\t\\t\\t\\t\\tprocessData: (typeof setting[\\\"processData\\\"] == \\\"undefined\\\") ? true : setting[\\\"processData\\\"],\\r\\n\\t\\t\\t\\t\\t\\tmimeType: setting[\\\"mimeType\\\"],\\r\\n\\t\\t\\t\\t\\t\\t//should be set to false if param or data sent with get or post is of type FormData\\r\\n\\t\\t\\t\\t\\t\\tsetDefaultHeaders: (typeof setting[\\\"setDefaultHeaders\\\"] == \\\"undefined\\\") ? true : setting[\\\"setDefaultHeaders\\\"],\\r\\n\\t\\t\\t\\t\\t\\t//enhanced inline with fetch\\r\\n\\t\\t\\t\\t\\t\\tmode: setting[\\\"mode\\\"] || \\\"cors\\\", // no-cors, *cors, same-origin\\r\\n\\t\\t\\t\\t\\t\\tcache: setting[\\\"cache\\\"] || \\\"default\\\", // *default, no-cache, reload, force-cache, only-if-cached\\r\\n\\t\\t\\t\\t\\t    credentials: setting[\\\"credentials\\\"] || \\\"same-origin\\\", // include, *same-origin, omit\\r\\n\\t\\t\\t\\t\\t    jsonpCallback: setting[\\\"callback\\\"],\\r\\n\\t\\t\\t\\t\\t    jsonpType: setting[\\\"type\\\"],\\r\\n\\t\\t\\t\\t\\t    jsonpCharset: setting[\\\"charset\\\"],\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getPromise = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(config)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\thandleActiveReq(true);\\r\\n\\t\\t\\t\\t\\tvar objPromise = (config.dataType.toUpperCase() === \\\"JSONP\\\") ? new AjaxJSONP(self,config,handleActiveReq) : AjaxNormal(self,config,handleActiveReq);\\r\\n\\t\\t\\t\\t\\treturn objPromise;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tonInit();\\r\\n\\t\\t\\treturn getPromise();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar handleActiveReq = function(add)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(add)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tactiveReq++;\\r\\n\\t\\t\\t\\tif(activeReq == 1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.util.dispatchEvent(self.dom.win,NSAjax.REQUEST_STARTED);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tactiveReq--;\\r\\n\\t\\t\\t\\tif(activeReq == 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.util.dispatchEvent(self.dom.win,NSAjax.ALL_REQUEST_COMPLETED);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar addMethods = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < self.__eligibleMethods.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\taddMethod(self.__eligibleMethods[count]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar addMethod = function(method)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!self[method.toLowerCase()])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself[method.toLowerCase()] = function(url,data,setting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn processRequest(getSetting(method,url,data,setting));\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\taddMethods();\\r\\n\\t\\t\\r\\n\\t\\t/*self.post = post;\\r\\n\\t\\tself.get = get;*/\\r\\n\\t\\tself.jsonp = jsonp;\\r\\n\\t\\tself.processRequest = processRequest;\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar AjaxNormal = function(ajax,config,handleActiveReq)\\r\\n\\t{\\r\\n\\t\\tvar xhr = null;\\r\\n\\t\\tvar request = null;\\r\\n\\t\\tvar response = null;\\r\\n\\t\\tvar requestDone = false;\\r\\n\\t\\tvar resolve = null;\\r\\n\\t\\tvar reject = null;\\r\\n\\t\\t\\r\\n\\t\\tvar init = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objPromise = new Promise(function(paramResolve,paramReject)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tresolve = paramResolve;\\r\\n\\t\\t\\t\\treject = paramReject;\\r\\n\\t\\t\\t\\trequest = new AjaxRequest(ajax,config);\\r\\n\\t\\t\\t\\tif(config.timeout > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tajax.dom.win.setTimeout(function() \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\trequestDone = true;\\r\\n\\t\\t\\t\\t\\t}, config.timeout);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\txhr = getRequest();\\r\\n\\t\\t\\t\\txhr.open(request.method,request.url,true);\\r\\n\\t\\t\\t\\tif(\\\"onloadstart\\\" in xhr)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\txhr.onloadstart = loadStartHandler;\\r\\n\\t\\t\\t\\t\\txhr.onprogress = progressHandler;\\r\\n\\t\\t\\t\\t\\txhr.onabort = abortHandler;\\r\\n\\t\\t\\t\\t\\txhr.onerror = errorHandler;\\r\\n\\t\\t\\t\\t\\txhr.onload = loadHandler;\\r\\n\\t\\t\\t\\t\\txhr.ontimeout = timeOutHandler;\\r\\n\\t\\t\\t\\t\\txhr.onloadend = loadEndHandler;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\txhr.onreadystatechange = stateChange;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (config.credentials == \\\"include\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\txhr.withCredentials = true;\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse if (config.credentials == \\\"omit\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t    xhr.withCredentials = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (\\\"responseType\\\" in xhr) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t    if(ajax.ajaxUtil.browserSupprots.blob) \\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t        xhr.responseType = \\\"blob\\\";\\r\\n\\t\\t\\t\\t    } \\r\\n\\t\\t\\t\\t    else if(ajax.ajaxUtil.browserSupprots.arrayBuffer && request.headers[\\\"Content-Type\\\"] &&\\r\\n\\t\\t\\t\\t        request.headers[\\\"Content-Type\\\"].indexOf('application/octet-stream') != -1) \\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t        xhr.responseType = \\\"arraybuffer\\\";\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tfor(var key in request.headers)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\txhr.setRequestHeader(key,request.headers[key]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\txhr.send(request.params);\\r\\n\\t\\t\\t});\\r\\n\\t\\t\\treturn objPromise;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getRequest = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tif (ajax.dom.win.XMLHttpRequest)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn new XMLHttpRequest();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar versions = [\\\"Microsoft\\\", \\\"msxm3\\\", \\\"msxml2\\\", \\\"msxml1\\\"];\\r\\n                for (var count = 0;count < versions.length; count++) \\r\\n                {\\r\\n                    try \\r\\n                    {\\r\\n                        var version = versions[count] + \\\".XMLHTTP\\\";\\r\\n                        return new ActiveXObject(version);\\r\\n                    } \\r\\n                    catch (error) \\r\\n                    {\\r\\n                    }\\r\\n                }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar stateChange = function(object) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(xhr.readyState == 4 && !requestDone)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar callback = function(value)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(isRequestSuccess()) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdefaultSuccessHandler(value,response);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdefaultErrorHandler(value,response);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tdefaultCompleteHandler();\\r\\n\\t\\t\\t\\t\\txhr = null;\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tvar data = getResponseData();\\r\\n\\t\\t\\t\\tif(ajax.ajaxUtil.isPromise(data))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdata.then(function(value) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcallback(value);\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcallback(data);\\r\\n\\t\\t\\t\\t\\tdefaultCompleteHandler();\\r\\n\\t\\t\\t\\t\\txhr = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(xhr.readyState != 4 && requestDone) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(config[\\\"timeOutHandler\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconfig[\\\"timeOutHandler\\\"]();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\txhr.onreadystatechange = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar isRequestSuccess = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = false;\\r\\n\\t\\t\\t//if requesting a local resource\\r\\n\\t\\t\\tif(!xhr.status && location.protocol == \\\"file:\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t// Any status in the 200 range is good\\r\\n\\t\\t\\telse if (xhr.status >= 200 && xhr.status < 300)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//Successful if the document has not been modified and Safari returns an empty status if the file has not been modified\\r\\n\\t\\t\\telse if(xhr.status == 304 || (navigator.userAgent.indexOf(\\\"Safari\\\") >= 0 && typeof xhr.status == \\\"undefined\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getResponseData = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tresponse = new AjaxResponse(ajax,config,xhr);\\r\\n\\t\\t\\tvar value = response.getValue();\\r\\n\\t\\t\\treturn value;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar loadStartHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(config[\\\"loadStartHandler\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig[\\\"loadStartHandler\\\"]();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tvar progressHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(config[\\\"progressHandler\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (event.lengthComputable) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconfig[\\\"progressHandler\\\"](event.loaded,event.total);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconfig[\\\"progressHandler\\\"](event.loaded,-1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tvar abortHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(config[\\\"abortHandler\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig[\\\"abortHandler\\\"](event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdefaultErrorHandler(event);\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tvar errorHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar data = getResponseData(event);\\r\\n\\t\\t\\tif(ajax.ajaxUtil.isPromise(data))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdata.then(function(value) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdefaultErrorHandler(event,value,response);\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdefaultErrorHandler(event,data,response);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tvar loadHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar callback = function(value)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(isRequestSuccess()) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdefaultSuccessHandler(value,response);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdefaultErrorHandler(value,response);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar data = getResponseData();\\r\\n\\t\\t\\tif(ajax.ajaxUtil.isPromise(data))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdata.then(function(value) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcallback(value);\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcallback(data);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tvar timeOutHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(config[\\\"timeOutHandler\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig[\\\"timeOutHandler\\\"](event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdefaultErrorHandler(event);\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tvar loadEndHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefaultCompleteHandler();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar defaultSuccessHandler = function(value,response)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(resolve)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tresolve(value);\\r\\n\\t\\t\\t\\tresolve = null;\\r\\n\\t\\t\\t\\thandleActiveReq(false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tvar defaultErrorHandler = function(value,response)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(reject)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treject(value);\\r\\n\\t\\t\\t\\treject = null;\\r\\n\\t\\t\\t\\thandleActiveReq(false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tvar defaultCompleteHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(config.completeHandler)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig.completeHandler();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\treturn init();\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar AjaxJSONP = function(ajax,config,handleActiveReq)\\r\\n\\t{\\r\\n\\t\\tvar functionNameInitials = \\\"nsjsonp\\\";\\r\\n\\t\\tvar instanceNameInitials = \\\"nsjsonpIns\\\";\\r\\n\\t\\tvar random = -1;\\r\\n\\t\\t\\r\\n\\t\\tvar resolve = null;\\r\\n\\t\\tvar reject = null;\\r\\n\\t\\tvar origCallback = null;\\r\\n\\t\\tvar callback = null;\\r\\n\\t\\t\\r\\n\\t\\tvar objPromise = new Promise(function(parResolve,parReject)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar util = new NSUtil();\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getParam = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(config.processData)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar strParam = \\\"\\\";\\r\\n\\t\\t\\t\\t\\tvar param = config.param;\\r\\n\\t\\t\\t\\t\\tif(util.isString(param))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn param;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tfor(var paramKey in param)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(param[paramKey])\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(config.encodeParam)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tstrParam += \\\"&\\\" + encodeURIComponent(paramKey) + \\\"=\\\" + encodeURIComponent(param[paramKey]);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tstrParam += \\\"&\\\" + paramKey + \\\"=\\\" + param[paramKey];\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(strParam && strParam.length > 1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tstrParam = strParam.substring(1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\treturn strParam;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn config.param;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar createScript = function(url)\\r\\n\\t\\t\\t{\\r\\n\\t\\t        var domPosition = ajax.dom.doc.body;\\r\\n\\t\\t        var script = ajax.dom.doc.createElement(\\\"script\\\");\\r\\n\\t\\t        script.async = true;\\r\\n\\t\\t        script.setAttribute(\\\"id\\\", url);\\r\\n\\t\\t        if(config.jsonpType)\\r\\n\\t\\t        {\\r\\n\\t\\t        \\tscript.setAttribute(\\\"type\\\",config.jsonpType);\\r\\n\\t\\t        }\\r\\n\\t\\t        if (config.jsonpCharset) \\r\\n\\t\\t        {\\r\\n\\t\\t        \\tscript.setAttribute(\\\"charset\\\",config.jsonpCharset);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t        script.setAttribute(\\\"src\\\",url);\\r\\n\\t\\t        script.onload = script.onreadystatechange = function()\\r\\n\\t\\t        {\\r\\n\\t\\t        \\tif (!script.readyState || /loaded|complete/.test(script.readyState)) \\r\\n\\t\\t        \\t{\\r\\n\\t\\t\\t\\t\\t\\tscript.onload = script.onreadystatechange = null;\\r\\n\\t\\t\\t\\t\\t\\tif (script.parentNode) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tscript.parentNode.removeChild(script);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tscript = null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t        }; \\r\\n\\t\\t        domPosition.appendChild(script);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar defaultSuccessHandler = function(response)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar win = ajax.dom.win;\\r\\n\\t\\t\\t\\tvar instanceName = instanceNameInitials + random;\\r\\n\\t\\t\\t\\tif(win[instanceName])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\twin[instanceName] = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(win[callback])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\twin[callback] = origCallback;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(origCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\torigCallback(response);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\torigCallback = null;\\r\\n\\t\\t\\t\\tif(resolve)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tresolve(response);\\r\\n\\t\\t\\t\\t\\tresolve = null;\\r\\n\\t\\t\\t\\t\\thandleActiveReq(false);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tresolve = parResolve;\\r\\n\\t\\t\\treject = parReject;\\r\\n\\t\\t\\tif(random == -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trandom = ajax.util.getUniqueId();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcallback = config.jsonpCallback;\\r\\n\\t\\t\\tif(callback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\torigCallback = util.getFunction(callback);\\r\\n\\t\\t\\t\\tif(origCallback && util.isString(origCallback))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\torigCallback = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcallback = functionNameInitials + random;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar instanceName = instanceNameInitials + random;\\r\\n\\t\\t\\t//ajax.dom.win[instanceName] = this;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tajax.dom.win[callback] = function(json){\\r\\n\\t\\t\\t\\tdefaultSuccessHandler(json);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar url = config.url + \\\"?callback=\\\" + callback;\\r\\n\\t\\t\\tvar strParam = getParam();\\r\\n\\t\\t\\tif(strParam && strParam != \\\"\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\turl += \\\"&\\\" + strParam;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcreateScript(url);\\r\\n\\t\\t});\\r\\n\\t\\t\\r\\n\\t\\treturn objPromise;\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar AjaxRequest = function(ajax,config)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar dom = null;\\r\\n\\t\\t\\r\\n\\t\\tvar init = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tdom = ajax.dom;\\r\\n\\t\\t\\tself.method = getMethodName(config.method);\\r\\n\\t\\t\\tself.params = getParams();\\r\\n\\t\\t\\tself.headers = getHeader();\\r\\n\\t\\t\\tself.url = getUrl();\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getParams = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar param = config.param;\\r\\n\\t\\t\\tif(config.processData && param && !ajax.ajaxUtil.isTypeFormData(param))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (self.method != \\\"GET\\\" && self.method != \\\"HEAD\\\" && config.dataType != null && config.dataType.toUpperCase() == \\\"JSON\\\" && !config.encodeParam && !ajax.util.isString(param)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn JSON.stringify(param);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(ajax.util.isString(param))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn param;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (self.method == \\\"GET\\\" || self.method == \\\"HEAD\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar strParam = \\\"\\\";\\r\\n\\t\\t\\t\\t\\tfor(var paramKey in param)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(param[paramKey])\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(config.encodeParam)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tstrParam += \\\"&\\\" + encodeURIComponent(paramKey) + \\\"=\\\" + encodeURIComponent(param[paramKey]);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tstrParam += \\\"&\\\" + paramKey + \\\"=\\\" + param[paramKey];\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(strParam && strParam.length > 1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tstrParam = strParam.substring(1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn strParam;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn param;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getHeader = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar header = config.header || {};\\r\\n\\t\\t\\tvar dataType = config.dataType ? config.dataType : null;\\r\\n\\t\\t\\tvar contentType = header[\\\"content-type\\\"];\\r\\n\\t\\t\\tvar param = config.param;\\r\\n\\t\\t\\tif(!contentType && !ajax.ajaxUtil.isTypeFormData(param)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(dataType == \\\"JSON\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcontentType = \\\"application/json\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(typeof param === \\\"string\\\") \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tcontentType = \\\"text/plain;charset=UTF-8\\\";\\r\\n\\t\\t\\t    } \\r\\n\\t\\t\\t    else if(ajax.ajaxUtil.browserSupprots.blob && Blob.prototype.isPrototypeOf(param) && param.type) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tcontentType = param.type;\\r\\n\\t\\t\\t    } \\r\\n\\t\\t\\t    else if(ajax.ajaxUtil.browserSupprots.urlSearchParams && URLSearchParams.prototype.isPrototypeOf(param)) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tcontentType = \\\"application/x-www-form-urlencoded;charset=UTF-8\\\";\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(contentType)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\theader[\\\"content-type\\\"] = contentType;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn header;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getUrl = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar url = config.url;\\r\\n\\t\\t\\tif(self.method == \\\"GET\\\" || self.method == \\\"HEAD\\\") \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(self.params && self.params != \\\"\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\turl += \\\"?\\\" + self.params;\\r\\n\\t\\t\\t\\t\\t//so that send method sends as null for GET\\r\\n\\t\\t\\t\\t\\tself.params = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t    if(config.cache == \\\"no-store\\\" || config.cache == \\\"no-cache\\\") \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\t// handling underscore parameter in the query string\\r\\n\\t\\t\\t    \\tvar underscoreSearch = /([?&])_=[^&]*/;\\r\\n\\t\\t\\t    \\tif (underscoreSearch.test(url)) \\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\t// If it already exists then set the value with the current time\\r\\n\\t\\t\\t    \\t\\turl = url.replace(underscoreSearch, '$1_=' + new Date().getTime())\\r\\n\\t\\t\\t    \\t} \\r\\n\\t\\t\\t    \\telse \\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\t// Otherwise add a new '_' parameter to the end with the current time\\r\\n\\t\\t\\t    \\t\\tvar reQueryString = /\\\\?/;\\r\\n\\t\\t\\t    \\t\\turl += (reQueryString.test(url) ? '&' : '?') + '_=' + new Date().getTime();\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t    try \\r\\n\\t\\t    {\\r\\n\\t\\t    \\turl = (url == \\\"\\\" && dom.win.location.href) ? dom.win.location.href : url\\r\\n\\t\\t    } \\r\\n\\t\\t    catch (e) \\r\\n\\t\\t    {\\r\\n\\t\\t    }\\r\\n\\t\\t    return url;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getMethodName = function(name)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar methodName = name.toUpperCase();\\r\\n\\t\\t\\tif(ajax.__eligibleMethods.indexOf(methodName) == -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tajax.util.throwNSError(\\\"NSAjax\\\",\\\"Method is not valid\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn methodName;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tinit();\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar AjaxResponse = function(ajax,config,xhr)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\t\\r\\n\\t\\tvar init = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.headers = getHeader();\\r\\n\\t\\t\\tself.status = (xhr.status == null) ? 200 : xhr.status;\\r\\n\\t\\t\\tself.statusText = (xhr.statusText == null) ? \\\"\\\" : (\\\"\\\" + xhr.statusText);\\r\\n\\t\\t\\tself.url = \\\"responseURL\\\" in xhr ? xhr.responseURL : self.headers[\\\"X-Request-URL\\\"];\\r\\n\\t\\t\\tself.params = \\\"response\\\" in xhr ? xhr.response : xhr.responseText;\\r\\n\\t\\t\\tpopulateBodyParams(self.params);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar populateBodyParams = function(params)\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__paramInit = params;\\r\\n\\t\\t    if(!params) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tself.__paramText = \\\"\\\";\\r\\n\\t\\t    } \\r\\n\\t\\t    else if(typeof params == \\\"string\\\") \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tself.__paramText = params;\\r\\n\\t\\t    } \\r\\n\\t\\t    else if (ajax.ajaxUtil.browserSupprots.blob && Blob.prototype.isPrototypeOf(params)) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tself.__paramBlob = params;\\r\\n\\t\\t    } \\r\\n\\t\\t    else if (ajax.ajaxUtil.browserSupprots.formData && FormData.prototype.isPrototypeOf(params)) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tself.__paramFormData = params;\\r\\n\\t\\t    } \\r\\n\\t\\t    else if (ajax.ajaxUtil.browserSupprots.urlSearchParams && URLSearchParams.prototype.isPrototypeOf(params)) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tself.__paramText = params.toString();\\r\\n\\t\\t    } \\r\\n\\t\\t    else if (ajax.ajaxUtil.browserSupprots.arrayBuffer && ajax.ajaxUtil.browserSupprots.blob && ajax.ajaxUtil.isTypeDataView(params)) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tself.__paramArrayBuffer = ajax.ajaxUtil.bufferClone(params.buffer);\\r\\n\\t\\t    \\t// IE 10-11 can't handle a DataView params.\\r\\n\\t\\t    \\tself.__paramInit = new Blob([self.__paramArrayBuffer])\\r\\n\\t\\t    } \\r\\n\\t\\t    else if (ajax.ajaxUtil.browserSupprots.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(params) || ajax.ajaxUtil.isArrayBufferView(params))) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tself.__paramArrayBuffer = ajax.ajaxUtil.bufferClone(params);\\r\\n\\t\\t    } \\r\\n\\t\\t    else \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tself.__paramText = params = Object.prototype.toString.call(params);\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.getValue = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = null;\\r\\n\\t\\t\\t//for some reason IE is taking Content-Type\\r\\n\\t\\t\\tvar contentType = self.headers[\\\"content-type\\\"] || self.headers[\\\"Content-Type\\\"];\\r\\n\\t\\t\\tvar dataType = xhr.dataType;\\r\\n\\t\\t\\tvar isXMLData = false;\\r\\n\\t\\t\\tif(!dataType && contentType && contentType.indexOf(\\\"xml\\\") > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tisXMLData = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(contentType && contentType.indexOf(\\\"json\\\") > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = self.getJson();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(isXMLData || (dataType && dataType.indexOf(\\\"xml\\\") > -1))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = xhr.responseXML;\\r\\n\\t\\t\\t}\\r\\n\\t\\t    else\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tretValue = self.getText();\\r\\n\\t\\t    }\\r\\n\\t\\t\\t// If the specified type is \\\"script\\\", execute the returned text response as if it was JavaScript\\r\\n\\t\\t\\tif (dataType == \\\"script\\\") \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(ajax.ajaxUtil.isPromise(retValue))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdata.then(function(value) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\teval.call(ajax.dom.win,value);\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\teval.call(ajax.dom.win,value);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.getBlob = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(ajax.ajaxUtil.browserSupprots.blob) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t     if(self.__paramBlob) \\r\\n\\t\\t\\t     {\\r\\n\\t\\t\\t    \\treturn Promise.resolve(self.__paramBlob);\\r\\n\\t\\t\\t     } \\r\\n\\t\\t\\t     else if (self.__paramArrayBuffer) \\r\\n\\t\\t\\t     {\\r\\n\\t\\t\\t    \\treturn Promise.resolve(new Blob([self.__paramArrayBuffer]));\\r\\n\\t\\t\\t     } \\r\\n\\t\\t\\t     else if (self.__paramFormData) \\r\\n\\t\\t\\t     {\\r\\n\\t\\t\\t    \\tthrow ajax.util.throwNSError(\\\"NSAjax\\\",\\\"FormData body could not be read as blob\\\");\\r\\n\\t\\t\\t     } \\r\\n\\t\\t\\t     else \\r\\n\\t\\t\\t     {\\r\\n\\t\\t\\t    \\treturn Promise.resolve(new Blob([self.__paramText]));\\r\\n\\t\\t\\t     }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthrow ajax.util.throwNSError(\\\"NSAjax\\\",\\\"Blob is not supported\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t    };\\r\\n\\r\\n\\t    self.getArrayBuffer = function() \\r\\n\\t    {\\r\\n\\t    \\tif(ajax.ajaxUtil.browserSupprots.blob) \\r\\n\\t\\t\\t{\\r\\n\\t\\t      if (self.__paramArrayBuffer) \\r\\n\\t\\t      {\\r\\n\\t\\t    \\t  if(ArrayBuffer.isView(self.__paramArrayBuffer)) \\r\\n\\t\\t    \\t  {\\r\\n\\t\\t\\t          return Promise.resolve(\\r\\n\\t\\t\\t        \\t\\t  self.__paramArrayBuffer.buffer.slice(self.__paramArrayBuffer.byteOffset,(self.__paramArrayBuffer.byteOffset + self.__paramArrayBuffer.byteLength))\\r\\n\\t\\t\\t          );\\r\\n\\t\\t    \\t  } \\r\\n\\t\\t    \\t  else \\r\\n\\t\\t    \\t  {\\r\\n\\t\\t    \\t\\t  return Promise.resolve(self.__paramArrayBuffer);\\r\\n\\t\\t    \\t  }\\r\\n\\t\\t      } \\r\\n\\t\\t      else \\r\\n\\t\\t      {\\r\\n\\t\\t    \\t  return self.blob().then(ajax.ajaxUtil.readBlobAsArrayBuffer);\\r\\n\\t\\t      }\\r\\n\\t\\t\\t}\\r\\n\\t    \\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthrow ajax.util.throwNSError(\\\"NSAjax\\\",\\\"Blob is not supported\\\");\\r\\n\\t\\t\\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    self.getFormData = function() \\r\\n\\t    {\\r\\n\\t    \\tif(ajax.ajaxUtil.browserSupprots.formData) \\r\\n\\t\\t\\t{\\r\\n\\t    \\t\\tself.getText().then(decodeFormData);\\r\\n\\t\\t    }\\r\\n\\t    \\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthrow ajax.util.throwNSError(\\\"NSAjax\\\",\\\"FormData is not supported\\\");\\r\\n\\t\\t\\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    self.getText = function() \\r\\n\\t    {\\r\\n\\t        if (self.__paramBlob) \\r\\n\\t        {\\r\\n\\t        \\treturn ajax.ajaxUtil.readBlobAsText(self.__paramBlob);\\r\\n\\t        } \\r\\n\\t        else if (self.__paramArrayBuffer) \\r\\n\\t        {\\r\\n\\t        \\treturn Promise.resolve(ajax.ajaxUtil.readArrayBufferAsText(self.__paramArrayBuffer));\\r\\n\\t        }\\r\\n\\t        else if (self.__paramFormData) \\r\\n\\t        {\\r\\n\\t        \\tthrow ajax.util.throwNSError(\\\"NSAjax\\\",\\\"FormData body could not be read as blob\\\");\\r\\n\\t        }\\r\\n\\t        else \\r\\n\\t        {\\r\\n\\t        \\treturn Promise.resolve(self.__paramText);\\r\\n\\t        }\\r\\n\\t    };\\r\\n\\r\\n\\t    self.getJson = function() \\r\\n\\t    {\\r\\n\\t        return self.getText().then(JSON.parse);\\r\\n\\t    };\\r\\n\\t      \\r\\n\\t    var decodeFormData = function(param) \\r\\n\\t    {\\r\\n\\t    \\tparam = param || \\\"\\\";\\r\\n\\t    \\tvar objRet = new FormData();\\r\\n\\t    \\tvar arrParam = param.trim().split(\\\"&\\\");\\r\\n\\t    \\tfor(var count = 0;count < arrParam.length;count++)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tvar bytes = arrParam[count];\\r\\n\\t    \\t\\tvar split = bytes.split(\\\"=\\\");\\r\\n    \\t        var key = split.shift().replace(/\\\\+/g, \\\" \\\");\\r\\n    \\t        var value = split.join('=').replace(/\\\\+/g,\\\" \\\");\\r\\n    \\t        objRet.append(decodeURIComponent(key), decodeURIComponent(value))\\r\\n\\t    \\t}\\r\\n\\t    \\treturn objRet;\\r\\n\\t    };\\r\\n\\t      \\r\\n\\t\\tvar getHeader = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objHeader = {};\\r\\n\\t\\t\\tvar strHeader = xhr.getAllResponseHeaders() || \\\"\\\";\\r\\n\\t\\t\\t//replace \\\\r\\\\n and \\\\n with space\\r\\n\\t\\t\\tstrHeader = strHeader.replace(/\\\\r?\\\\n[\\\\t ]+/g,\\\" \\\");\\r\\n\\t\\t\\tvar arrHeader = strHeader.split(\\\"\\\\r\\\");\\r\\n\\t\\t\\tfor(var count = 0;count < arrHeader.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar header = arrHeader[count];\\r\\n\\t\\t\\t\\theader = (header.indexOf(\\\"\\\\n\\\") == 0) ? header.substr(1,header.length) : header;\\r\\n\\t\\t\\t\\tvar arrParts = header.split(':');\\r\\n\\t\\t\\t    var key = arrParts.shift().trim();\\r\\n\\t\\t\\t    if(key) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t        var value = arrParts.join(':').trim();\\r\\n\\t\\t\\t        objHeader[key] = value;\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn objHeader;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tinit();\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar AjaxUtil = function(ajax)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar dom = null;\\r\\n\\t\\tself.browserSupprots = null;\\r\\n\\t\\t\\r\\n\\t\\tvar init = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tdom = ajax.util.getDomVariables();\\r\\n\\t\\t\\tself.browserSupprots = {blob: self.isBlobSupproted(),formData: self.isFormDataSupproted(),arrayBuffer: self.isArrayBufferSupproted(),\\r\\n\\t\\t\\t\\t\\t\\t\\t   urlSearchParams: self.isURLSearchParamsSupproted(),iterator: self.isIterartorSupproted()};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.isBlobSupproted = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(\\\"FileReader\\\" in dom.win && \\\"FileReader\\\" in dom.win)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttry \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t        new Blob();\\r\\n\\t\\t\\t        return true;\\r\\n\\t\\t\\t    } \\r\\n\\t\\t\\t\\tcatch (e) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.isURLSearchParamsSupproted = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn \\\"URLSearchParams\\\" in dom.win;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.isIterartorSupproted = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn \\\"Symbol\\\" in dom.win && \\\"iterator\\\" in Symbol;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.isFormDataSupproted = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn \\\"FormData\\\" in dom.win;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.isArrayBufferSupproted = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn \\\"ArrayBuffer\\\" in dom.win;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.isTypeDataView = function(type) \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn type && DataView.prototype.isPrototypeOf(type);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.isTypeArrayBuffer = function(type) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(ArrayBuffer.isView && type)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrayBufferClasses = [\\r\\n\\t\\t\\t\\t    '[object Int8Array]',\\r\\n\\t\\t\\t\\t    '[object Uint8Array]',\\r\\n\\t\\t\\t\\t    '[object Uint8ClampedArray]',\\r\\n\\t\\t\\t\\t    '[object Int16Array]',\\r\\n\\t\\t\\t\\t    '[object Uint16Array]',\\r\\n\\t\\t\\t\\t    '[object Int32Array]',\\r\\n\\t\\t\\t\\t    '[object Uint32Array]',\\r\\n\\t\\t\\t\\t    '[object Float32Array]',\\r\\n\\t\\t\\t\\t    '[object Float64Array]'\\r\\n\\t\\t\\t\\t  ];\\r\\n\\t\\t\\t\\treturn arrayBufferClasses.indexOf(Object.prototype.toString.call(type)) > -1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.isTypeFormData = function(type) \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn self.browserSupprots.formData && type && (Object.prototype.toString.call(type) == \\\"[object FormData]\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.isPromise = function(type) \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn self.browserSupprots.formData && type && (Object.prototype.toString.call(type) == \\\"[object Promise]\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.normalize = function(value) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif (typeof value !== 'string') \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvalue = String(value)\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn value;\\r\\n\\t\\t};\\r\\n\\r\\n\\t\\tself.iteratorFor = function(items) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar iterator = {next: function() \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar value = items.shift();\\r\\n\\t\\t\\t\\treturn {done: value === undefined, value: value};\\r\\n\\t\\t    }};\\r\\n\\r\\n\\t\\t\\tif (support.iterator) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titerator[Symbol.iterator] = function() \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn iterator\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn iterator;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.fileReaderReady = function(reader) \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn new Promise(function(resolve, reject) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treader.onload = function() \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tresolve(reader.result)\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\treader.onerror = function() \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treject(reader.error)\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t});\\r\\n\\t\\t};\\r\\n\\r\\n\\t\\tself.readBlobAsArrayBuffer = function(blob) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar reader = new FileReader();\\r\\n\\t\\t\\tvar promise = self.fileReaderReady(reader);\\r\\n\\t\\t\\treader.readAsArrayBuffer(blob);\\r\\n\\t\\t\\treturn promise;\\r\\n\\t\\t};\\r\\n\\r\\n\\t\\tself.readBlobAsText = function(blob) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar reader = new FileReader();\\r\\n\\t\\t\\tvar promise = self.fileReaderReady(reader);\\r\\n\\t\\t\\treader.readAsText(blob);\\r\\n\\t\\t\\treturn promise;\\r\\n\\t\\t};\\r\\n\\r\\n\\t\\tself.readArrayBufferAsText = function(buf) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar view = new Uint8Array(buf);\\r\\n\\t\\t\\tvar chars = new Array(view.length);\\r\\n\\t\\t\\tfor (var count = 0; count < view.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tchars[i] = String.fromCharCode(view[count]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn chars.join('');\\r\\n\\t\\t};\\r\\n\\r\\n\\t\\tself.bufferClone = function(buf) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif (buf.slice) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn buf.slice(0);\\r\\n\\t\\t\\t} \\r\\n\\t\\t\\telse \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar view = new Uint8Array(buf.byteLength);\\r\\n\\t\\t\\t\\tview.set(new Uint8Array(buf));\\r\\n\\t\\t\\t\\treturn view.buffer;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tinit();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSAjax.REQUEST_STARTED = \\\"requestStarted\\\";\\r\\n\\tNSAjax.ALL_REQUEST_COMPLETED = \\\"allRequestCompleted\\\";\\r\\n\\treturn NSAjax;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSAjax\\\",NSAjax);\";","export const NSTextBoxCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\nvar svgRef = require('./nsSVG.min.js');\\r\\nvar NSSvg = svgRef.NSSvg;\\r\\nvar NSSvgShapes = svgRef.NSSvgShapes;\\r\\nvar plugginsRef = require('./nsPluggins.min.js');\\r\\nvar nsTextEditor = plugginsRef.nsTextEditor;\\r\\nvar nsTextAreaEditor = plugginsRef.nsTextAreaEditor;\\r\\nvar NSCellSelection = plugginsRef.NSCellSelection;\\r\\nvar NSTableCellNavigator = plugginsRef.NSTableCellNavigator;\\r\\nvar dateutilRef = require('./nsDateUtil.min.js');\\r\\nvar NSDateUtil = dateutilRef.NSDateUtil;\\r\\nvar gridRef = require('./nsGrid.min.js');\\r\\nvar NSGrid = gridRef.NSGrid;\\r\\n\\r\\n\\t\\t}\\r\\nvar NSList = (function()\\r\\n{\\r\\n\\tfunction NSList(component,setting) \\r\\n\\t{\\r\\n\\t\\t//this.base.call(this);\\r\\n\\t\\tthis.ITEM_SELECTED = \\\"itemSelected\\\";\\r\\n\\t\\tthis.ITEM_UNSELECTED = \\\"itemUnselected\\\";\\r\\n\\t\\tthis.ITEM_NAVIGATED = \\\"itemNavigated\\\";\\r\\n\\t\\tthis.NAVIGATION_UP = \\\"up\\\";\\r\\n\\t\\tthis.NAVIGATION_DOWN = \\\"down\\\";\\r\\n\\t\\tthis.ITEM_DROPPING = \\\"itemDropping\\\";\\r\\n\\t\\tthis.ITEM_DROPPED = \\\"itemDropped\\\";\\r\\n\\t\\tthis.DRAG_STARTED = \\\"dragStarted\\\";\\r\\n\\t\\tthis.DRAGGING = \\\"dragging\\\";\\r\\n\\t\\tthis.DRAG_END = \\\"dragEnd\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__dataSource = null;\\r\\n\\t\\tthis.__labelField = \\\"label\\\";\\r\\n\\t\\tthis.__itemRenderer = null;\\r\\n\\t\\tthis.__templateID = null;\\r\\n\\t\\tthis.__setData = null;\\r\\n\\t\\tthis.__labelFunction = null;\\r\\n\\t\\tthis.__enableHierarchical = false;\\r\\n\\t\\tthis.__enableMouseHover = false;\\r\\n\\t\\tthis.__enableMouseHoverAnimation = false;\\r\\n\\t\\tthis.__disableHoverField = null;\\r\\n\\t\\tthis.__disableHoverFunction = null;\\r\\n\\t\\tthis.__enableKeyboardNavigation = false;\\r\\n\\t\\tthis.__enableMultipleSelection = false;\\r\\n\\t\\tthis.__enableCustomScrollBar = false;\\r\\n\\t\\tthis.__enableVirtualScroll = false;\\r\\n\\t\\tthis.__isDraggable = true;\\r\\n\\t\\tthis.__isDroppable = true;\\r\\n\\t\\tthis.__enableDragByHandle = false;\\r\\n\\t\\tthis.__dragHandlerClass = null;\\r\\n\\t\\tthis.__enableDragAfterHold = false;\\r\\n\\t\\tthis.__holdTime = 500;\\r\\n\\t\\tthis.__enableCloneMode = false;\\r\\n\\t\\tthis.__rowHeight = -1;\\r\\n\\t\\tthis.__noDataMessage = \\\"No matching records found\\\";\\r\\n\\t\\tthis.__enableContextMenu = false;\\r\\n\\t\\tthis.__enableVariableRowHeight = false;\\r\\n\\t\\tthis.__contextMenuProvider = null;\\r\\n\\t\\tthis.__contextMenuSetting = null;\\r\\n\\t\\tthis.__enableTruncateToFit = false;\\r\\n\\t\\tthis.__toolTipField = null;\\r\\n\\t\\tthis.__enableToolTipForTruncateText = false;\\r\\n\\t\\tthis.__toolTipRenderer = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__arrWrapper = null;\\r\\n\\t\\tthis.__arrInternalSource = null;\\r\\n\\t\\tthis.__arrFlatHierarchicalSource = [];\\r\\n\\t\\t\\r\\n\\t\\tthis.__divOuterContainer = null;\\r\\n\\t\\tthis.__divParentContainer = null;\\r\\n\\t\\tthis.__listContainer = null;\\r\\n\\t\\tthis.__scroller = null;\\r\\n\\t\\tthis.__scrollerSetting = {};\\r\\n\\t\\tthis.__customScrollBarSetting = {};\\r\\n\\t\\tthis.__customScrollBarTooltip = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__template = null;\\r\\n\\t\\tthis.__currentIndex = -1;\\r\\n\\t\\tthis.__selectedIndex = -1;\\r\\n\\t\\tthis.__navigationIndex = -1;\\r\\n\\t\\tthis.__selectedItem = null;\\r\\n\\t\\tthis.__selectedItems = [];\\t\\r\\n\\t\\tthis.__selectedIndexes = [];\\r\\n\\t\\tthis.__lastNavigationDirection = null;\\r\\n\\t\\tthis.__orignalItemKey = [];\\r\\n\\t\\t//for keyboard navigation\\r\\n\\t\\tthis.__pageSize = 0;\\r\\n\\t\\tthis.__scrollTarget = null;\\r\\n\\t\\tthis.__startArrayElement = -1;\\r\\n\\t\\tthis.__listItemHeight = 0;\\r\\n\\t\\t//for Virtual Scroll\\r\\n\\t\\tthis.__virtualScrollSetting = {};\\r\\n\\t\\tthis.__nsVirtualScroll = null; \\r\\n\\t\\tthis.__virtualRowHeight = 0;\\r\\n\\t\\t\\r\\n\\t\\tthis.__childField = \\\"children\\\";\\r\\n\\t\\tthis.__CLASS_GROUP_CELL = \\\"nsListGroupCell\\\";\\r\\n\\t\\tthis.__CLASS_CELL_CHILD = \\\"nsListCellChild\\\";\\r\\n\\t\\t\\r\\n\\t\\t//removing this.getID() as prefix as move functionality from one list to another would have different fields.\\r\\n\\t\\tthis.__fieldPrefix = \\\"ns_field\\\";\\r\\n\\t\\tthis.__fieldIndex =  this.__fieldPrefix + \\\"_item_index\\\";\\r\\n\\t\\tthis.__fieldVisibleIndex = this.__fieldPrefix + \\\"_item_visible_index\\\";\\r\\n\\t\\tthis.__fieldItem = this.__fieldPrefix + \\\"_item\\\";\\r\\n\\t\\tthis.__fieldDisableHover = this.__fieldPrefix + \\\"_disableHover\\\";\\r\\n\\t\\tthis.__fieldSelected = this.__fieldPrefix + \\\"_selected\\\";\\r\\n\\t\\tthis.__fieldHover = this.__fieldPrefix + \\\"_hover\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__fieldItemLevel = this.__fieldPrefix + \\\"_item_level\\\";\\r\\n\\t\\tthis.__fieldItemVisible = this.__fieldPrefix + \\\"_item_visible\\\";\\r\\n\\t\\tthis.__fieldParentIndex = this.__fieldPrefix + \\\"_parent_index\\\";\\r\\n\\t\\tthis.__fieldHasChild = this.__fieldPrefix + \\\"_item_hasChild\\\";\\r\\n\\t\\tthis.__fieldHasParent = this.__fieldPrefix + \\\"_item_hasParent\\\";\\r\\n\\t\\tthis.__fieldIsCollapsed = this.__fieldPrefix + \\\"_item_isCollapsed\\\";\\r\\n\\t\\tthis.__fieldItemArrow = this.__fieldPrefix + \\\"_item_arrow\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__isShiftPressed = false;\\r\\n\\t\\tthis.__isCtrlPressed = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.__objGrid = null;\\r\\n\\t\\tthis.__nsListFilter = null;\\r\\n\\t\\tthis.__nsListDragDrop = null;\\r\\n\\t\\tthis.__nsToolTipInElement = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__keyDownRef = null;\\r\\n\\t\\tthis.__keyUpRef = null;\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component);\\r\\n\\t};\\r\\n\\tnsExtendPrototype(NSContainerBase,NSList);\\r\\n\\tNSList.prototype.constructor = NSList;\\r\\n\\t\\r\\n\\tNSList.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t\\tthis.__initializePluggins();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t\\tthis.__objGrid.__addSVGInPage();\\r\\n\\t\\tthis.__setTemplate();\\r\\n\\t\\tthis.__objGrid.__initialize();\\r\\n\\t\\tthis.__addListenerForBody();\\r\\n\\t\\tif(this.__dataSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.dataSource(this.__dataSource);\\r\\n\\t\\t}\\r\\n\\t\\tif(!window[\\\"nsListMap\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\twindow[\\\"nsListMap\\\"] = {};\\r\\n\\t\\t}\\r\\n\\t\\twindow[\\\"nsListMap\\\"][this.getID()] = this;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__keyDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"keydown\\\",this.__keyDownRef);\\r\\n\\t\\t\\tthis.__keyDownRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__keyUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"keyup\\\",this.__keyUpRef);\\r\\n\\t\\t\\tthis.__keyUpRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__scroller)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__scroller.__destroyElements();\\r\\n\\t\\t\\tthis.__scroller = null;\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.base.componentResized.call(this,event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.expandAll = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableHierarchical)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__expandCollapseAll(false);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.collapseAll = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableHierarchical)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__expandCollapseAll(true);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setContextMenuSetting = function(contextMenuSetting)\\r\\n\\t{\\r\\n\\t\\tthis.__contextMenuSetting = contextMenuSetting;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tvar setting = this.__setting;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableHierarchical\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableHierarchical = Boolean.parse(setting[\\\"enableHierarchical\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableVirtualScroll\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableVirtualScroll = Boolean.parse(setting[\\\"enableVirtualScroll\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableDragDrop\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enableDragDrop = Boolean.parse(setting[\\\"enableDragDrop\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"isDraggable\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__isDraggable = Boolean.parse(setting[\\\"isDraggable\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"isDroppable\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__isDroppable = Boolean.parse(setting[\\\"isDroppable\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableDragByHandle\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableDragByHandle = Boolean.parse(setting[\\\"enableDragByHandle\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"dragHandlerClass\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dragHandlerClass = setting[\\\"dragHandlerClass\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableDragAfterHold\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableDragAfterHold = Boolean.parse(setting[\\\"enableDragAfterHold\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"holdTime\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__holdTime = parseInt(setting[\\\"holdTime\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableCloneMode\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableCloneMode = Boolean.parse(setting[\\\"enableCloneMode\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"labelField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__labelField = setting[\\\"labelField\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"itemRenderer\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__itemRenderer = setting[\\\"itemRenderer\\\"];\\r\\n\\t\\t\\t\\tthis.__itemRenderer = this.util.getFunction(this.__itemRenderer);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"template\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__templateID = setting[\\\"template\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"setData\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__setData = setting[\\\"setData\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"labelFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__labelFunction = setting[\\\"labelFunction\\\"];\\r\\n\\t\\t\\t\\tthis.__labelFunction = this.util.getFunction(this.__labelFunction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMultipleSelection\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMultipleSelection =  Boolean.parse(setting[\\\"enableMultipleSelection\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableCustomScrollBar\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableCustomScrollBar =  Boolean.parse(setting[\\\"enableCustomScrollBar\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableKeyboardNavigation\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableKeyboardNavigation =  Boolean.parse(setting[\\\"enableKeyboardNavigation\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMouseHover\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMouseHover =  Boolean.parse(setting[\\\"enableMouseHover\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMouseHoverAnimation\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMouseHoverAnimation =  Boolean.parse(setting[\\\"enableMouseHoverAnimation\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"disableHoverField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__disableHoverField = setting[\\\"disableHoverField\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"disableHoverFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__disableHoverFunction = setting[\\\"disableHoverFunction\\\"];\\r\\n\\t\\t\\t\\tthis.__disableHoverFunction = this.util.getFunction(this.__disableHoverFunction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"rowHeight\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__rowHeight =  parseInt(setting[\\\"rowHeight\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"noDataMessage\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__noDataMessage = setting[\\\"noDataMessage\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"dataSource\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dataSource = setting[\\\"dataSource\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"childField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__childField = setting[\\\"childField\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableContextMenu\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableContextMenu = Boolean.parse(setting[\\\"enableContextMenu\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"contextMenuProvider\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__contextMenuProvider =  setting[\\\"contextMenuProvider\\\"];\\r\\n\\t\\t\\t\\tthis.__contextMenuProvider = this.util.getFunction(this.__contextMenuProvider);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableVariableRowHeight\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableVariableRowHeight =  Boolean.parse(setting[\\\"enableVariableRowHeight\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"customScrollBarSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__customScrollBarSetting =  setting[\\\"customScrollBarSetting\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__customScrollBarSetting = {enableTooltip: false,toolTipLabelFunction: null,verticalScrollButtons: {enable: false},horizontalScrollButtons:{enable: false}};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"virtualScrollSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__virtualScrollSetting = setting[\\\"virtualScrollSetting\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__virtualScrollSetting = {pageSize: null,pagesRendered: null,enableScrollDelay: false,scrollInterval: null,resizeInterval: null,enableLoader: false,getLoaderComponent: null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.dataSource = function(source)\\r\\n\\t{\\r\\n\\t\\tthis.__dataSource = source;\\r\\n\\t\\tif(this.__listContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeAllChildren(this.__listContainer);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createStructure();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__dataSource && this.__dataSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__orignalItemKey = Object.keys(this.__dataSource[0]);\\r\\n\\t\\t\\tthis.__objGrid.dataSource();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__arrWrapper = [];\\r\\n\\t\\t\\tthis.__arrInternalSource = [];\\r\\n\\t\\t\\tthis.__updateTotalRecords(0);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__renderBody();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getOrignalItem = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item && this.__orignalItemKey && this.__orignalItemKey.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retItem = {};\\r\\n\\t\\t\\tvar key = null;\\r\\n\\t\\t\\tfor(var count = 0;count < this.__orignalItemKey.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tkey = this.__orignalItemKey[count];\\r\\n\\t\\t\\t\\tretItem[key] = item[key];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retItem;\\r\\n\\t\\t}\\r\\n\\t\\treturn item;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.addItems = function(arrItem)\\r\\n\\t{\\r\\n\\t\\tthis.__addItem(arrItem);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.addItemsAsChildren = function(item,arrChildren)\\r\\n\\t{\\r\\n\\t\\tthis.__objGrid.addItemsAsChildren(item,arrChildren);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.removeItems = function(arrObject)\\r\\n\\t{\\r\\n\\t\\tif(arrObject && arrObject.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrIndex = [];\\r\\n\\t\\t\\tif(this.util.isNumber(arrObject[0]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrIndex = arrObject;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (var count = 0;count < arrObject.length;count++)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\tvar item = arrObject[count];\\r\\n\\t\\t\\t\\t\\tif(item && item[this.__fieldIndex])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrIndex.push(item[this.__fieldIndex]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tarrIndex.sort();\\r\\n\\t   \\t \\tfor (var rowIndex = arrIndex.length - 1; rowIndex >= 0; rowIndex--)\\r\\n\\t\\t    {\\r\\n\\t   \\t \\t\\tvar index = arrIndex[rowIndex];\\r\\n\\t   \\t \\t\\tif(index > 0 && index < this.__arrInternalSource.length)\\r\\n\\t   \\t \\t\\t{\\r\\n\\t\\t   \\t \\t\\t//if virtual scroll or Pagination of type Page is enabled then do not remove rows\\r\\n\\t\\t   \\t \\t\\tif(!this.__enableVirtualScroll)\\r\\n\\t\\t   \\t \\t\\t{\\r\\n\\t\\t   \\t \\t\\t\\tthis.__listContainer.removeChild(this.__listContainer.childNodes[index]);\\r\\n\\t\\t   \\t \\t\\t}\\r\\n\\t\\t   \\t \\t\\tthis.__arrInternalSource.splice(index, 1);\\r\\n\\t\\t   \\t \\t\\tthis.__arrWrapper.splice(index, 1);\\r\\n\\t   \\t \\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t \\tthis.__updateTotalRecords();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.scrollToIndex = function(selectedIndex,animationRequired)\\r\\n\\t{\\r\\n\\t\\tselectedIndex = parseInt(selectedIndex);\\r\\n\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\tif(selectedIndex > -1 && source && selectedIndex < source.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(selectedIndex);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__enableCustomScrollBar)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar targetDimension = this.__virtualRowHeight * (selectedIndex - 1);\\r\\n\\t\\t\\t\\t\\t\\tthis.__setVirtualScroll_ScrollTop(targetDimension);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t//var item = this.__getVisibleItemByIndex(this.__arrInternalSource,selectedIndex);\\r\\n\\t\\t\\t\\t\\t\\tif(this.__nsVirtualScroll)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t//because in list index is index+1\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__nsVirtualScroll.scrollToIndex(selectedIndex - 1,animationRequired);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item[this.__fieldItem])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar targetDimension = item[this.__fieldItem].offsetTop;\\r\\n\\t\\t\\t\\t\\t\\tvar scrollTarget = this.__divOuterContainer;\\r\\n\\t\\t\\t\\t\\t\\tif(animationRequired)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar animation = new this.util.animation(scrollTarget,[\\r\\n\\t\\t\\t\\t       \\t  \\t    {\\r\\n\\t\\t\\t\\t       \\t  \\t      time: 500,\\r\\n\\t\\t\\t\\t       \\t  \\t      property:\\\"scrollTop\\\",\\r\\n\\t\\t\\t\\t       \\t  \\t      target: targetDimension,\\r\\n\\t\\t\\t\\t       \\t  \\t    }\\r\\n\\t\\t\\t\\t       \\t  \\t]);\\r\\n\\t\\t\\t\\t   \\t  \\t  \\tanimation.animate();\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tscrollTarget.scrollTop = targetDimension;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setSelectedItems = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__clearAllRowSelection(false);\\r\\n\\t\\t\\t\\tvar length = arrItems.length;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = arrItems[count];\\r\\n\\t\\t\\t\\t\\tindex = this.__getIndexByItem(item);\\r\\n\\t\\t\\t\\t\\tif(index > -1 && source && index < source.length)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__setIndex(index,true);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setSelectedItem = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tthis.setSelectedItems([arrItems]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setSelectedIndexes = function(arrSelectedIndex)\\r\\n\\t{\\r\\n\\t\\tif(arrSelectedIndex && arrSelectedIndex.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar length = arrSelectedIndex.length;\\r\\n\\t\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tindex = arrSelectedIndex[count];\\r\\n\\t\\t\\t\\t\\tif(index > -1 && source && index < source.length)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__setIndex(index,true);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setSelectedIndex = function(selectedIndex)\\r\\n\\t{\\r\\n\\t\\tthis.setSelectedIndexes([selectedIndex]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.unSelectItems = function(arrItems)\\r\\n\\t{\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.unSelectItem = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tthis.unSelectItems([arrItems]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.unSelectIndexes = function(arrSelectedIndex)\\r\\n\\t{\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.unSelectIndex = function(selectedIndex)\\r\\n\\t{\\r\\n\\t\\tthis.unSelectIndexes([selectedIndex]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getSelectedIndex = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedIndex;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getSelectedItem = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getSelectedIndexes = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedIndexes;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getSelectedItems = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedItems;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.deselectAll = function()\\r\\n\\t{\\r\\n\\t\\tthis.__clearAllRowSelection(true);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.filter = function(strData,setting,enableHighlighting,recordLimit)\\r\\n\\t{\\r\\n\\t\\tthis.__nsListFilter.filter(strData,setting,enableHighlighting,recordLimit);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.resetFilter = function()\\r\\n\\t{\\r\\n\\t\\tthis.__nsListFilter.reset();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.updateListItemByIndex = function(index)\\r\\n\\t{\\r\\n\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = this.__getListItemFromItem(item);\\r\\n\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = this.__getIndexByItem(item);\\r\\n\\t\\t\\t\\tthis.__updateListItemText(listItem,item,index);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__highlightDiv = function(divText)\\r\\n\\t{\\r\\n\\t\\tthis.__nsListFilter.__highlightDiv(divText);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__initializePluggins = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__objGrid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableHierarchical)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__objGrid = new NSHierarchicalList(this);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__objGrid = new NSFlatList(this);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__nsListFilter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsListFilter = new NSListFilter(this);\\r\\n\\t\\t\\tif(this.__enableDragDrop)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsListDragDrop = new NSListDragDrop(this);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__nsToolTipInElement = new this.util.nsToolTipInElement();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createStructure = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divOuterContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divOuterContainer = this.util.createDiv(this.getID() + \\\"container\\\",\\\"nsListOuterContainer\\\");\\r\\n\\t\\t\\tif(this.__enableHierarchical)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__divOuterContainer,\\\"nsListOuterContainerHierarchical\\\")\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__divOuterContainer.style.width = this.util.getStyleValue(this.__baseComponent,\\\"width\\\");\\r\\n\\t\\t\\t//this.__divOuterContainer.style.height = this.util.getStyleValue(this.__baseComponent,\\\"height\\\");\\r\\n\\t\\t\\tthis.addChild(this.__divOuterContainer);\\r\\n\\t\\t\\tthis.__divParentContainer = this.util.createDiv(this.getID() + \\\"parentContainer\\\",\\\"nsListParentContainer\\\");\\r\\n\\t\\t\\tthis.__divOuterContainer.appendChild(this.__divParentContainer);\\r\\n\\t\\t\\tthis.__listContainer = this.util.createElement(\\\"ul\\\",this.getID() + \\\"list\\\",\\\"nsListContainer\\\");\\r\\n\\t\\t\\tthis.__listContainer.style.minHeight = (this.__divOuterContainer.clientHeight - 10) + \\\"px\\\";\\r\\n\\t\\t\\tthis.__divParentContainer.appendChild(this.__listContainer);\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__divParentContainer,\\\"nsListBodyContainerVirtual\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__createCustomScroller();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\r\\n\\tNSList.prototype.__renderBody = function()\\r\\n\\t{\\r\\n\\t\\tthis.__navigationIndex = -1;\\r\\n\\t\\tif(this.__enableContextMenu)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeContextMenu();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setNSVirtualScroll(this.__arrInternalSource);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeAllChildren(this.__listContainer);\\r\\n\\t\\t\\tthis.__createList(this.__arrInternalSource,0,this.__arrInternalSource.length);\\r\\n\\t\\t\\t//5 is offset for number of rows\\r\\n\\t\\t\\tvar listItem = this.__getListItemByIndex(0);\\r\\n\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__listItemHeight = listItem.clientHeight;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__pageSize = (this.__divOuterContainer.clientHeight/this.__listItemHeight) - 5;\\r\\n\\t\\t\\tthis.__startArrayElement = 0;\\r\\n\\t\\t}\\r\\n\\t\\t//this.__listContainer.scrollTop = 0;\\r\\n\\t\\tif(this.__nsListDragDrop)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsListDragDrop.initialize();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setNSVirtualScroll = function(source)\\r\\n\\t{\\r\\n\\t\\tvar length = 0;\\r\\n\\t\\tif(source && source.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(source[count][this.__fieldItemVisible])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tlength++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__nsVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsVirtualScroll.dataSource(length);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__rowHeight > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__virtualRowHeight = this.__rowHeight;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__createList(this.__arrInternalSource,0,1);\\r\\n\\t\\t\\t\\t\\tvar item = this.__arrInternalSource[0];\\r\\n\\t\\t\\t\\t\\tvar listItem = item[this.__fieldItem];\\r\\n\\t\\t\\t\\t    this.__virtualRowHeight = listItem.offsetHeight;\\r\\n\\t\\t\\t\\t    listItem.parentNode.removeChild(listItem);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar setting = {scrollElement: this.__divOuterContainer,contentElement: this.__listContainer,itemTag: \\\"li\\\",totalLength: length,getItemComponent:this.__getItemComponentForVirtual.call(this),getEmptyItemComponent:this.__getEmptyItemComponentForVirtual.call(this)};\\r\\n\\t\\t\\t\\tvar virtualScrollSetting = this.__virtualScrollSetting;\\r\\n\\t\\t\\t\\tvar arrCopyFields = [\\\"pageSize\\\",\\\"pagesRendered\\\",\\\"enableScrollDelay\\\",\\\"scrollInterval\\\",\\\"resizeInterval\\\",\\\"enableLoader\\\",\\\"getLoaderComponent\\\"];\\r\\n\\t\\t\\t\\tvar field = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrCopyFields.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfield = arrCopyFields[count];\\r\\n\\t\\t\\t\\t\\tif(!this.util.isUndefinedOrNull(virtualScrollSetting[field]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetting[field] = virtualScrollSetting[field];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__nsVirtualScroll = new NSVirtualScroll(setting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getItemComponentForVirtual = function()\\r\\n\\t{\\r\\n\\t\\tvar list = this;\\r\\n\\t\\tvar CreateListItem = function(index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__index = index;\\r\\n\\t\\t\\tthis.__list =  list;\\r\\n\\t\\t\\tthis.__item = null;\\r\\n\\t\\t\\tthis.__listItem = null;\\r\\n\\t\\t};\\r\\n\\t\\tCreateListItem.prototype.getElement = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__list.__enableHierarchical)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__item = this.__list.__getVisibleItemByIndex(null,this.__index);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__item = this.__list.__arrInternalSource[this.__index];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__listItem = this.__list.__createListItem(this.__item,false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn this.__listItem;\\r\\n\\t\\t};\\r\\n\\t\\treturn CreateListItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getEmptyItemComponentForVirtual = function()\\r\\n\\t{\\r\\n\\t\\tvar list = this;\\r\\n\\t\\tvar CreateEmptyListItem = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__list =  list;\\r\\n\\t\\t\\tthis.__listItem = null;\\r\\n\\t\\t};\\r\\n\\t\\tCreateEmptyListItem.prototype.getElement = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__listItem = this.__list.__createNoDataRow.call(this.__list);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn this.__listItem;\\r\\n\\t\\t};\\r\\n\\t\\treturn CreateEmptyListItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createCustomScroller = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableCustomScrollBar && !this.__scroller)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting = {element: this.__divOuterContainer,enableCustomHandler: true,verticalScrollButtons:this.__customScrollBarSetting.verticalScrollButtons,horizontalScrollButtons:this.__customScrollBarSetting.horizontalScrollButtons};\\r\\n\\t\\t\\tfor (var key in setting) \\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\tthis.__scrollerSetting[key] = setting[key]; \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__scroller = new NSScroller(this.__scrollerSetting);\\r\\n\\t\\t\\tthis.util.addEvent(this.__scrollerSetting.element,NSScroller.SCROLLING,this.__customScrollHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(this.__scrollerSetting.element,NSScroller.SCROLL_END,this.__customScrollEndHandler.bind(this));\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__customScrollHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar virtualVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t//todo Virtual Scroll impl for Custom Scroll Bar\\r\\n\\t\\t};\\r\\n\\t\\tvar dataRefreshVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\tvar asyncLoadVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\tvar paginationVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\tvar normalVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__divOuterContainer.scrollTop = scrollPos;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar first,last;\\r\\n\\t\\t\\tvar arrRows = self.__listContainer.querySelectorAll(\\\"li\\\");\\r\\n\\t\\t\\tfor(var count = 0;count < arrRows.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar li = arrRows[count];\\r\\n\\t\\t\\t\\tif(isInViewport(li))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfirst = li;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(;count < arrRows.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar li = arrRows[count];\\r\\n\\t\\t\\t\\tif(!isInViewport(li))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tlast = li;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tconsole.log(first,last);\\r\\n\\t\\t};\\r\\n\\t\\tvar normalHorHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__divOuterContainer.scrollLeft = scrollPos;\\r\\n\\t\\t};\\r\\n\\t\\tvar isInViewport = function (elem) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(elem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t/*var distance = elem.getBoundingClientRect();\\r\\n\\t\\t\\t\\treturn (\\r\\n\\t\\t\\t\\t\\tdistance.top >= 0 &&\\r\\n\\t\\t\\t\\t\\tdistance.left >= 0 &&\\r\\n\\t\\t\\t\\t\\tdistance.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\\r\\n\\t\\t\\t\\t\\tdistance.right <= (window.innerWidth || document.documentElement.clientWidth)\\r\\n\\t\\t\\t\\t);*/\\r\\n\\t\\t\\t\\tconst rect = elem.getBoundingClientRect();\\r\\n\\t\\t\\t    const windowHeight = (window.innerHeight || document.documentElement.clientHeight);\\r\\n\\t\\t\\t    const windowWidth = (window.innerWidth || document.documentElement.clientWidth);\\r\\n\\r\\n\\t\\t\\t    const vertInView = (rect.top <= windowHeight) && ((rect.top + rect.height) >= 0);\\r\\n\\t\\t\\t    const horInView = (rect.left <= windowWidth) && ((rect.left + rect.width) >= 0);\\r\\n\\r\\n\\t\\t\\t    return (vertInView && horInView);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\tvar objCondition = {virtualScroll:{eligible:this.__enableVirtualScroll,verHandler:virtualVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tdataRefreshOnEnd:{eligible:this.__enableDataRefreshOnScrollEnd,verHandler:dataRefreshVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tasyncLoad:{eligible:this.__enableAsyncLoadPagination,verHandler:asyncLoadVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tpagination:{eligible:(this.__enablePagination && this.__isPaginationTypeScroll),verHandler:paginationVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tnormal:{eligible:true,verHandler:normalVerHandler,horHandler:normalHorHandler}\\r\\n\\t\\t\\t\\t\\t\\t   };\\r\\n\\t\\tvar eventItem = event;\\r\\n\\t\\tvar direction = eventItem.direction;\\r\\n\\t\\tvar scrollPos = eventItem.scrollPos;\\r\\n\\t\\tvar oldScrollPos = eventItem.oldScrollPos;\\r\\n\\t\\tvar orignalEvent = eventItem.orignalEvent;\\r\\n\\t\\tvar scrollBar = eventItem.scrollBar;\\r\\n\\t\\tvar position = eventItem.absoluteScrollBarPos;\\r\\n\\t\\tfor(var key in objCondition)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = objCondition[key];\\r\\n\\t\\t\\tif(item.eligible)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(direction == \\\"vertical\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item.verHandler)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(this.__customScrollBarSetting[\\\"enableTooltip\\\"] && !this.__customScrollBarTooltip)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__customScrollBarTooltip = this.util.createElement(\\\"span\\\",null,\\\"tooltiptext tooltip-left\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\tdocument.body.appendChild(this.__customScrollBarTooltip);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\titem.verHandler();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item.horHandler)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem.horHandler();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__customScrollEndHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__customScrollBarTooltip)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdocument.body.removeChild(this.__customScrollBarTooltip);\\r\\n\\t\\t\\tthis.__customScrollBarTooltip = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__customScrollTooltipPos = function(scrollbar,position,itemFrom,itemTo)\\r\\n\\t{\\r\\n\\t\\tif(this.__customScrollBarTooltip)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar toolTip = this.__customScrollBarTooltip;\\r\\n\\t\\t\\tvar css = {};\\r\\n\\t\\t\\t//5 for the triangle\\r\\n\\t\\t\\tcss.left = (position.x - toolTip.offsetWidth - 5) + \\\"px\\\";\\r\\n\\t\\t\\tcss.top = position.y + \\\"px\\\";\\r\\n\\t\\t\\tthis.util.css(toolTip,css);\\r\\n\\t\\t\\tif(this.__customScrollBarSetting.toolTipLabelFunction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolTip.innerHTML = this.__customScrollBarSetting.toolTipLabelFunction(itemFrom,itemTo);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolTip.innerHTML = \\\"Showing Record from index \\\" + itemFrom + \\\" to \\\" +  itemTo;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__virtualRowSelection = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__listContainer.children && this.__listContainer.children.length > 0 && this.__arrInternalSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = null;\\r\\n\\t\\t\\tvar index = null;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0; count < this.__listContainer.children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlistItem = this.__listContainer.children[count];\\r\\n\\t\\t\\t\\tindex = this.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\t\\titem = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\tif(item && this.__isMouseHoverAllowed(index))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item[this.__fieldSelected])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t//DONOT REPLACE WITH __markRowSelected\\r\\n\\t\\t\\t\\t\\t\\tthis.util.addStyleClass(listItem,\\\"nsListItemSelected\\\"); \\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t//DONOT REPLACE WITH __markRowUnselected\\r\\n\\t\\t\\t\\t\\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemSelected\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__virtualRowHover = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__listContainer.children && this.__listContainer.children.length > 0 && this.__arrInternalSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = null;\\r\\n\\t\\t\\tvar index = null;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0; count < this.__listContainer.children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlistItem = this.__listContainer.children[count];\\r\\n\\t\\t\\t\\tindex = this.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\t\\titem = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\t(item && item[this.__fieldHover]) ? this.util.addStyleClass(listItem,\\\"nsListItemHover\\\") : this.util.removeStyleClass(listItem,\\\"nsListItemHover\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setVirtualRowHoverField = function(indexToSet)\\r\\n\\t{\\r\\n\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t{\\r\\n\\t\\t\\tindexToSet = -1;\\r\\n\\t\\t}\\r\\n\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\tif(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0; count < source.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__fieldHover] = (item[this.__fieldIndex] === indexToSet); \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setVirtualRowHover = function(indexToSet)\\r\\n\\t{\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tindexToSet = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar item = this.__getVisibleItemByIndex(null,indexToSet);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__navigationIndex = indexToSet;\\r\\n\\t\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\tthis.__setVirtualRowHoverField(index);\\r\\n\\t\\t\\t\\tthis.__virtualRowHover();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setRowHover = function(indexToSet)\\r\\n\\t{\\r\\n\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t{\\r\\n\\t\\t\\tindexToSet = 0;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setVirtualRowHover(indexToSet);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tindexToSet = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__navigationIndex = indexToSet;\\r\\n\\t\\t\\tvar listItem = this.__getListItemFromContainer(this.__navigationIndex);\\r\\n\\t\\t\\tthis.util.addStyleClass(listItem,\\\"nsListItemHover\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createNoDataRow = function()\\r\\n\\t{\\r\\n\\t\\tvar listItem = this.util.createElement(\\\"li\\\",null,\\\"nsListNoRecordsFound\\\");\\r\\n\\t\\tlistItem.setAttribute(\\\"nsNoData\\\",\\\"true\\\");\\r\\n\\t\\tvar textNode = document.createTextNode(this.__noDataMessage);\\r\\n\\t\\tlistItem.appendChild(textNode);\\r\\n\\t\\treturn listItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__addListenerForBody = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__keyDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__keyDownRef = this.__keyDownHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"keydown\\\",this.__keyDownRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__keyUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__keyUpRef = this.__keyUpHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"keyup\\\",this.__keyUpRef);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createList = function(dataSet,startIndex,endIndex)\\r\\n\\t{\\r\\n\\t\\tif(dataSet && dataSet.length > 0)\\r\\n\\t    {\\r\\n\\t\\t\\tthis.__objGrid.__createList(dataSet,startIndex,endIndex);\\r\\n\\t    }\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__listContainer.appendChild(this.__createNoDataRow());\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createListAt = function(item,index,isResetIndex)\\r\\n\\t{\\r\\n\\t\\tif(item && index > -1)\\r\\n\\t    {\\r\\n\\t\\t\\tthis.__updateItem(item,index,true,isResetIndex);\\r\\n\\t\\t\\tvar listItem = this.__createListItem(item,false);\\r\\n\\t\\t\\tthis.__listContainer.insertBefore(listItem, this.__listContainer.childNodes[index]);\\r\\n\\t\\t\\treturn listItem;\\r\\n\\t    }\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateItem = function(item,index,isReset,isResetIndex)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isResetIndex || !item.hasOwnProperty(this.__fieldIndex))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldIndex] = index;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(isReset || !item.hasOwnProperty(this.__fieldDisableHover))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldDisableHover] = this.__isHoverDisabled(item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(isReset || !item.hasOwnProperty(this.__fieldSelected))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldSelected] = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createListItem = function(item,isAdd)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\t if(this.util.isUndefined(isAdd) || isAdd === null)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t isAdd = true;\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t var listItem = this.util.createElement(\\\"li\\\",null,\\\"nsListItem\\\");\\r\\n\\t\\t\\t this.__objGrid.__createListItem(listItem,item);\\r\\n\\t\\t\\t if(this.__enableMouseHover)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t this.util.addEvent(listItem,\\\"mouseover\\\",this.__itemMouseOverHandler.bind(this));\\r\\n\\t\\t\\t\\t this.util.addEvent(listItem,\\\"mouseout\\\",this.__itemMouseOutHandler.bind(this));\\r\\n\\t\\t\\t\\t if(this.__enableMouseHoverAnimation)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t this.util.addStyleClass(listItem,\\\"nsListItemAnimated\\\");\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t else\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t this.util.addStyleClass(listItem,\\\"nsListItemNormal\\\");\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t this.util.addEvent(listItem,\\\"click\\\",this.__itemClickHandler.bind(this));\\r\\n\\t\\t\\t this.__setListItemProperties(listItem,item);\\r\\n\\t\\t\\t if(isAdd)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t this.__listContainer.appendChild(listItem);\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t return listItem;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setListItemProperties = function(listItem,item)\\r\\n\\t{\\r\\n\\t\\tthis.__objGrid.__setListItemProperties(listItem,item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__addCellText = function(listItem,item,div)\\r\\n\\t{\\r\\n\\t\\tvar toolTipText = null;\\r\\n\\t\\tif(listItem && item && div)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__itemRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objRenderer = this.__itemRenderer(item,this.__labelField,item[this.__fieldIndex],item[this.__fieldDisableHover],listItem);\\r\\n\\t\\t\\t\\tif(objRenderer)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.util.isString(objRenderer))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar compBodySpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\t\\tcompBodySpan.innerHTML = objRenderer;\\r\\n\\t\\t\\t\\t\\t\\tdiv.appendChild(compBodySpan);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdiv.appendChild(objRenderer);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__template)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdiv.appendChild(this.__template.cloneNode(true));\\r\\n\\t\\t\\t\\tthis.__setDataInTemplateRenderer(div,item,listItem);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__labelFunction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar text = this.__labelFunction(item,this.__labelField);\\r\\n\\t\\t\\t\\tdiv.appendChild(document.createTextNode(text));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(item.hasOwnProperty(this.__labelField) && !this.util.isUndefined(item[this.__labelField]) && item[this.__labelField] != null)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar text = item[this.__labelField];\\r\\n\\t\\t\\t\\tdiv.appendChild(document.createTextNode(text));\\r\\n\\t\\t    }\\r\\n\\t\\t\\tthis.__highlightDiv(div);\\r\\n\\t\\t\\tif(this.__toolTipField)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolTipText = item[this.__toolTipField];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__toolTipRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolTipText = this.__toolTipRenderer(item,this.__labelField,item[this.__fieldIndex],item[this.__fieldDisableHover],listItem);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableTruncateToFit)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(div,\\\"nsListTruncateToFit\\\");\\r\\n\\t\\t\\t\\t//This condition is above so that toolTip and title are not set togeather\\r\\n\\t\\t\\t\\tif(!toolTipText || toolTipText === \\\"\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__enableToolTipForTruncateText)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\ttoolTipText = div.textContent;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdiv.setAttribute(\\\"title\\\",div.textContent);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(toolTipText && toolTipText !== \\\"\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsToolTipInElement.addToolTip(div,toolTipText);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setDataInTemplateRenderer = function(cellItem,data,listItem)\\r\\n\\t{\\r\\n\\t\\tif(cellItem && this.__setData)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setRendererProperties(cellItem);\\r\\n\\t\\t\\tthis.__setRendererInData(cellItem,data,listItem);\\r\\n\\t\\t\\t//IE bug\\r\\n\\t\\t\\tcellItem.data = data;\\r\\n\\t\\t\\tif(this.util.isFunction(this.__setData))\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar strParam = \\\"(cellItem,data,dataField,isDisabled,listItem)\\\"; \\r\\n\\t\\t    \\tif(this.util.isString(this.__setData))\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tvar base = this;\\r\\n\\t\\t    \\t\\tthis.util.callFunctionFromString(this.__setData + strParam,function(paramValue){\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"cellItem\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn cellItem;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"data\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn data;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"dataField\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn base.__labelField;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"isDisabled\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn data[base.__fieldDisableHover];\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"listItem\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn listItem;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\treturn paramValue;\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\telse\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.__setData(cellItem,data,this.__labelField,data[this.__fieldDisableHover],listItem);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setRendererInData = function(cellItem,data,listItem)\\r\\n\\t{\\r\\n\\t\\tif(cellItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compChild = null;\\r\\n\\t\\t\\tfor(var count = 0; count < cellItem.children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompChild = cellItem.children[count];\\r\\n\\t\\t\\t\\tif(compChild)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompChild.data = data;\\r\\n\\t\\t\\t\\t\\tcompChild.listItem = listItem;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//IE 9 Bug,you got to assign it back\\r\\n\\t\\t\\t\\t//listItem.children[count] = compChild;\\r\\n\\t\\t\\t\\tthis.__setRendererInData(compChild,data,listItem);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setRendererProperties = function(cellItem)\\r\\n\\t{\\r\\n\\t\\tif(cellItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compChild = null;\\r\\n\\t\\t\\tfor(var count = 0; count < cellItem.children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompChild = cellItem.children[count];\\r\\n\\t\\t\\t\\tvar grid = this;\\r\\n\\t\\t\\t\\tArray.prototype.slice.call(compChild.attributes).forEach(function(attribute) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t        if(grid.util.isFunction(attribute.value))\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar newValue = attribute.value + \\\"(this)\\\";\\r\\n\\t\\t\\t        \\tcompChild.removeAttribute(attribute.name);\\r\\n\\t\\t\\t\\t\\t\\tcompChild.setAttribute(attribute.name,newValue);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\tif(compChild)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(compChild.hasAttribute(\\\"accessor-name\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcellItem[compChild.getAttribute(\\\"accessor-name\\\")] = compChild;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__setRendererProperties(compChild);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setTemplate = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__templateID)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__template = this.util.getTemplate(this.__templateID);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isHoverDisabled = function(item)\\r\\n\\t{\\r\\n\\t\\tif(this.__disableHoverField)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn Boolean.parse(item[this.__disableHoverField]);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__disableHoverFunction)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn Boolean.parse(this.__disableHoverFunction(item,this.__fieldIndex));\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__itemClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t    var target = this.util.getTarget(event);\\r\\n\\t    target = this.util.findParent(target,\\\"li\\\");\\r\\n\\t    var index = this.__getIndexFromTarget(target);\\r\\n\\t    this.__setIndex(index,false);\\r\\n\\t    this.__lastNavigationDirection = null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setIndex = function(index,isMultiSelect)\\r\\n\\t{\\r\\n\\t\\tif(index > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisMultiSelect = Boolean.parse(isMultiSelect);\\r\\n\\t\\t\\tif (this.__isShiftPressed && this.__enableMultipleSelection)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__multiSectionHandler(index);\\r\\n\\t\\t    }\\r\\n\\t\\t    else if(isMultiSelect || (this.__isCtrlPressed && this.__enableMultipleSelection))\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tif(this.__isRowSelected(index))\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.__markRowUnselected(index);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\telse\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.__markRowSelected(index);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    }\\r\\n\\t\\t    else\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__clearAllRowSelection(false);\\r\\n\\t\\t    \\tthis.__markRowSelected(index);\\r\\n\\t\\t    } \\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__itemMouseOverHandler = function(event)\\r\\n\\t{\\r\\n\\t\\t var target = this.util.getTarget(event);\\r\\n\\t     target = this.util.findParent(target,\\\"li\\\");\\r\\n\\t     var index = this.__getIndexFromTarget(target);\\r\\n\\t     var item = this.__getItemByIndex(index);\\r\\n\\t     if(target && index > -1 && this.__isMouseHoverAllowed(index))\\r\\n\\t     {\\r\\n\\t    \\t this.util.addStyleClass(target,\\\"nsListItemHover\\\");\\r\\n\\t    \\t this.__navigationIndex = index;\\r\\n\\t    \\t this.util.dispatchEvent(this.__baseComponent,this.ITEM_NAVIGATED,item,{index:this.__navigationIndex});\\r\\n\\t     }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__itemMouseOutHandler = function(event)\\r\\n\\t{\\r\\n\\t\\t var target = this.util.getTarget(event);\\r\\n\\t     target = this.util.findParent(target,\\\"li\\\");\\r\\n\\t     if(target)\\r\\n\\t     {\\r\\n\\t    \\t this.util.removeStyleClass(target,\\\"nsListItemHover\\\");\\r\\n\\t     }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__keyDownHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tif(this.hasFocus())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isShiftPressed = event.shiftKey;\\r\\n\\t\\t\\tthis.__isCtrlPressed = event.ctrlKey;\\r\\n\\t\\t\\tvar isShiftCtrlPressed = this.__isShiftPressed || this.__isCtrlPressed;\\r\\n\\t\\t\\tvar keyCode = this.util.getKeyUnicode(event);\\r\\n\\t\\t\\tif(this.__enableKeyboardNavigation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\t\\t\\t//key Up\\r\\n\\t\\t\\t\\tif(keyCode === this.util.KEYCODE.UP && isShiftCtrlPressed && this.__enableMultipleSelection)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__lastNavigationDirection && this.__lastNavigationDirection === this.NAVIGATION_DOWN)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.NAVIGATION_UP);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(this.__selectedIndex != 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__selectedIndex--;\\r\\n\\t\\t\\t\\t\\t\\tthis.__navigationIndex--;\\r\\n\\t\\t\\t\\t\\t\\twhile(!this.__isMouseHoverAllowed(this.__selectedIndex))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__selectedIndex--;\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__navigationIndex--;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.NAVIGATION_UP);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//key down\\r\\n\\t\\t\\t\\telse if(keyCode === this.util.KEYCODE.DOWN && isShiftCtrlPressed && this.__enableMultipleSelection)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__lastNavigationDirection && this.__lastNavigationDirection === this.NAVIGATION_UP)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.NAVIGATION_DOWN);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(source && this.__selectedIndex != source.length - 1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__selectedIndex++;\\r\\n\\t\\t\\t\\t\\t\\tthis.__navigationIndex++;\\r\\n\\t\\t\\t\\t\\t\\twhile(!this.__isMouseHoverAllowed(this.__selectedIndex))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__selectedIndex++;\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__navigationIndex++;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.NAVIGATION_DOWN);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(keyCode === this.util.KEYCODE.UP)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(source && this.__navigationIndex === -1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__navigationIndex = source.length - 1;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(this.__navigationIndex > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardNavigationHandler(event,this.NAVIGATION_UP);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(keyCode === this.util.KEYCODE.DOWN)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t/*if(this.__navigationIndex === -1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__navigationIndex = 0;\\r\\n\\t\\t\\t\\t\\t}*/\\r\\n\\t\\t\\t\\t\\tif(source)//&& this.__navigationIndex < source.length\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardNavigationHandler(event,this.NAVIGATION_DOWN);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(keyCode === this.util.KEYCODE.ENTER)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__clearAllRowSelection(false);\\r\\n\\t\\t\\t\\t\\tvar listItem = this.__getkeyboardNavigationListItem();\\r\\n\\t\\t\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__markRowSelected(this.__getIndexFromTarget(listItem));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(keyCode === this.util.KEYCODE.SHIFT)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.makeBodyUnselectable();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__keyUpHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.util.getKeyUnicode(event) === this.util.KEYCODE.CTRL)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isCtrlPressed = false;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.getKeyUnicode(event) === this.util.KEYCODE.SHIFT)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isShiftPressed = false;\\r\\n\\t\\t\\tthis.util.makeBodySelectable();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__keyBoardNavigationHandler = function(event,direction)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar lastIndex = this.__navigationIndex;\\r\\n\\t\\tvar currentIndex = this.__navigationIndex;\\r\\n\\t\\t(direction === this.NAVIGATION_UP) ? currentIndex--:currentIndex++;\\r\\n\\t\\twhile(!this.__isMouseHoverAllowed(currentIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\t(direction === this.NAVIGATION_UP) ? currentIndex--:currentIndex++;\\r\\n\\t\\t}\\r\\n\\t\\tvar endHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__navigationIndex = currentIndex;\\r\\n\\t\\t\\tvar listItem = self.__getkeyboardNavigationListItem();\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar source = self.__objGrid.__getFlatSource();\\r\\n\\t\\t\\t\\tindex = self.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\t\\titem = self.__getItemByIndex(index, source);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tself.util.dispatchEvent(self.__baseComponent,self.ITEM_NAVIGATED,item,{index:index});\\r\\n\\t\\t\\tself.__lastNavigationDirection = null;\\r\\n\\t\\t};\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar virtualHandler = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//self.__setVirtualRowHover.call(self,index);\\r\\n\\t\\t\\t\\tvar item = self.__getVisibleItemByIndex.call(self,null,currentIndex);\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar index = item[self.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tself.__setVirtualRowHoverField.call(self,index);\\r\\n\\t\\t\\t\\t\\tself.__virtualRowHover.call(self);\\r\\n\\t\\t\\t\\t\\tendHandler();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tthis.scrollToIndex(currentIndex,false);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tsetTimeout(function()\\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\tvirtualHandler();\\r\\n\\t\\t\\t},0);\\r\\n\\t\\t\\t//this.__setVirtualRowHover(currentIndex);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = this.__getListItemFromContainer(lastIndex - this.__startArrayElement);\\r\\n\\t\\t\\tvar currentListItem = this.__getListItemFromContainer(currentIndex - this.__startArrayElement);\\r\\n\\t\\t\\t//var listItem = this.__getListItemByIndex(lastIndex - this.__startArrayElement);\\r\\n\\t\\t\\t//var currentListItem = this.__getListItemByIndex(currentIndex - this.__startArrayElement);\\r\\n\\t\\t\\tif(currentListItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemHover\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(currentListItem,\\\"nsListItemHover\\\");\\r\\n\\t\\t\\t\\tthis.__refreshScrollPosition(currentListItem,direction);\\r\\n\\t\\t\\t\\tendHandler();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tevent.preventDefault();\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__keyBoardSelectionHandler = function(event,direction)\\r\\n\\t{\\r\\n\\t\\tif(this.__isRowSelected(this.__selectedIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__markRowUnselected(this.__selectedIndex);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__markRowSelected(this.__selectedIndex);\\r\\n\\t\\t}\\r\\n\\t\\tif(direction === this.NAVIGATION_DOWN)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.scrollToIndex(this.__selectedIndex,false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(Math.floor(this.__selectedIndex % this.__pageSize) === 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar listItem = this.__getListItemByIndex(this.__selectedIndex);\\r\\n\\t\\t\\t\\tthis.__refreshScrollPosition(listItem,this.NAVIGATION_DOWN);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse if(direction === this.NAVIGATION_UP)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.scrollToIndex(this.__selectedIndex,false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar listItem = this.__getListItemByIndex(this.__selectedIndex);\\r\\n\\t\\t\\t\\tthis.__refreshScrollPosition(listItem,this.NAVIGATION_UP);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__lastNavigationDirection = direction;\\r\\n\\t\\tevent.preventDefault();\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__refreshScrollPosition = function(listItem,direction)\\r\\n\\t{\\r\\n\\t\\tif(!this.__isElementInView(listItem))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__scrollToListItem(listItem);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isElementInView = function(listItem)\\r\\n\\t{\\r\\n\\t\\tvar cellBottom = 0;\\r\\n\\t    var parentBottom = 0;\\r\\n\\t    var cellTop = 0;\\r\\n\\t    var parentTop = 0;\\r\\n\\t\\tif(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar scrollParent = this.__divOuterContainer;\\r\\n\\t\\t\\tvar listChild = listItem.querySelector(\\\".nsListChild\\\");\\r\\n\\t\\t\\tif(scrollParent && listChild)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cellRect = listChild.getBoundingClientRect();\\r\\n\\t            parentTop = 0;\\r\\n\\t            var rectScrollParent = scrollParent.getBoundingClientRect();\\r\\n\\t            parentBottom = rectScrollParent.height;\\r\\n\\t            cellTop =  cellRect.top - rectScrollParent.top;\\r\\n\\t            cellBottom = cellTop + cellRect.height;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn cellBottom <= parentBottom && cellTop >= parentTop;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__scrollToListItem = function(listItem)\\r\\n\\t{\\r\\n\\t\\tif(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rectCell = listItem.getBoundingClientRect();\\r\\n\\t\\t\\tvar rectParentContainer = this.__divParentContainer.getBoundingClientRect();\\r\\n\\t        var scrollTop = rectCell.top - rectParentContainer.top;\\r\\n\\t        this.__divOuterContainer.scrollTop = scrollTop;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getkeyboardNavigationListItem = function()\\r\\n\\t{\\r\\n\\t\\tvar listItem = null;\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem = this.__listContainer.querySelector(\\\".nsListItemHover\\\");\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem = this.__getListItemFromContainer(this.__navigationIndex);\\r\\n\\t\\t}\\r\\n\\t\\treturn listItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isMouseHoverAllowed = function(index)\\r\\n\\t{\\r\\n\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn !item[this.__fieldDisableHover];\\r\\n\\t\\t}\\r\\n\\t\\treturn true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__markRowSelected= function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1)\\r\\n\\t    {\\r\\n\\t        if(!this.__isRowSelected(index))\\r\\n\\t        {\\r\\n\\t        \\tthis.__setMultiSelectedVars(index,true);\\r\\n\\t            this.__setValuesForSelectedRow(index);\\r\\n\\t        \\tif(this.__enableVirtualScroll)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tthis.__virtualRowSelection();\\r\\n\\t        \\t}\\r\\n\\t        \\telse\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar listItem = this.__getListItemByIndex(index);\\r\\n\\t            \\tthis.util.addStyleClass(listItem,\\\"nsListItemSelected\\\"); \\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__markRowUnselected = function(index)\\r\\n\\t{\\r\\n\\t    if(this.__isRowSelected(index) && this.__isMouseHoverAllowed(index))\\r\\n\\t    {\\r\\n\\t    \\tvar isUnselected = this.__setMultiSelectedVars(index,false);\\r\\n\\t        if(isUnselected)\\r\\n\\t        {\\r\\n\\t        \\tthis.__setValuesForUnselectedRow(index);\\r\\n\\t        }\\r\\n\\t        if(this.__enableVirtualScroll)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tthis.__virtualRowSelection();\\r\\n\\t    \\t}\\r\\n\\t    \\telse\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tvar listItem = this.__getListItemByIndex(index);\\r\\n\\t    \\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemSelected\\\");\\r\\n\\t    \\t}\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setValuesForSelectedRow = function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1 && this.__isMouseHoverAllowed(index))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldSelected] = true;\\r\\n\\t\\t\\t    this.__selectedIndex = index;\\r\\n\\t\\t\\t    this.__navigationIndex = index;\\r\\n\\t\\t\\t    this.util.dispatchEvent(this.__baseComponent,this.ITEM_SELECTED,item,{index:index});\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setValuesForUnselectedRow = function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1 && this.__isMouseHoverAllowed(index))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldSelected] = false;\\r\\n\\t\\t    \\tthis.util.dispatchEvent(this.__baseComponent,this.ITEM_UNSELECTED,item,{index:index});\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__clearAllRowSelection = function(setIndexVariables)\\r\\n\\t{\\r\\n\\t\\tvar size = this.__selectedIndexes.length;\\r\\n\\t    for (var count = size - 1; count >= 0 ; count--)\\r\\n\\t    {\\r\\n\\t    \\tvar index = this.__selectedIndexes[count];\\r\\n\\t        this.__markRowUnselected(index);\\r\\n\\t    }\\r\\n\\t    this.__setMultiSelectedVars(-1,true);\\r\\n\\t    if(setIndexVariables)\\r\\n\\t    {\\r\\n\\t    \\tthis.__selectedIndex = -1;\\r\\n\\t        this.__navigationIndex = -1;\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__multiSectionHandler = function(lastIndex)\\r\\n\\t{\\r\\n\\t\\t if(lastIndex < 0)\\r\\n\\t\\t {\\r\\n\\t\\t\\t return;\\r\\n\\t\\t }\\r\\n\\t\\t if (this.__selectedIndexes.length === 0)\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.__isRowSelected(lastIndex);\\r\\n\\t\\t     return;\\r\\n\\t\\t }\\r\\n\\t\\t var firstIndex = this.__selectedIndexes[this.__selectedIndexes.length - 1];\\r\\n\\t\\t if(lastIndex === firstIndex)\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.__markRowUnselected(lastIndex);\\r\\n\\t\\t\\t return;\\r\\n\\t\\t }\\r\\n\\t\\t var isDown = lastIndex > firstIndex;\\r\\n\\t\\t var isSelection = !this.__isRowSelected(lastIndex);\\r\\n\\t\\t var counter = firstIndex;\\r\\n\\t\\t do\\r\\n\\t\\t {\\r\\n\\t\\t\\t  counter = isDown ? (counter + 1) : (counter - 1);\\r\\n\\t\\t\\t  if (isSelection)\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  this.__markRowSelected(counter);\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  else\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  this.__markRowUnselected(counter);\\r\\n\\t\\t\\t  }\\r\\n\\t\\t }\\r\\n\\t\\t while(counter != lastIndex);\\t \\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setMultiSelectedVars = function(index,add)\\r\\n\\t{\\r\\n\\t\\tif(index === -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__selectedItems = [];\\t\\r\\n\\t\\t\\tthis.__selectedIndexes = [];\\t\\r\\n\\t\\t}\\r\\n\\t\\telse if(add)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar data = this.__getItemByIndex(index);\\r\\n\\t\\t\\tthis.__selectedItems.push(data);\\r\\n\\t\\t\\tthis.__selectedIndexes.push(index);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isUnselected = false;\\r\\n\\t\\t\\tfor (var count= 0; count < this.__selectedIndexes.length ; count++)\\r\\n\\t        {\\r\\n\\t            if (this.__selectedIndexes[count] === index)\\r\\n\\t            {\\r\\n\\t                this.__selectedItems.splice(count,1);\\r\\n\\t                this.__selectedIndexes.splice(count,1);\\r\\n\\t                isUnselected = true;\\r\\n\\t                break;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t\\t\\treturn isUnselected;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\treturn true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isRowSelected= function(index)\\r\\n\\t{\\r\\n\\t    if(index > -1)\\r\\n\\t    {\\r\\n\\t    \\tvar item = this.__getItemByIndex(index);\\r\\n\\t    \\tif(item)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn item[this.__fieldSelected];\\r\\n\\t    \\t}\\r\\n\\t    }   \\r\\n\\t    return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\t/******************************************************Start of Context Menu*************************************************************/\\r\\n\\tNSList.prototype.__initializeContextMenu = function()\\r\\n\\t{\\r\\n\\t\\t//if(!this.__contextMenu)\\r\\n\\t\\t//{\\r\\n\\t\\t\\tvar contextMenuSetting = {parent:this.__listContainer,isContextMenu:true,createRunTime:true,sourceProvider:this.__getContextMenuDataProvider.bind(this),targetType:\\\"LI\\\"};\\r\\n\\t\\t\\tif(this.__contextMenuSetting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var key in this.__contextMenuSetting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t//grid setting should not be overriden by the users\\r\\n\\t\\t\\t\\t\\tif(!contextMenuSetting[key])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcontextMenuSetting[key] = this.__contextMenuSetting[key];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__contextMenu = new NSMenu(contextMenuSetting);\\r\\n\\t\\t//}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getContextMenuDataProvider = function(listItem)\\r\\n\\t{\\r\\n\\t\\tif(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem = this.util.findParent(listItem,\\\"LI\\\");\\r\\n\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = this.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\tif(item && this.__contextMenuProvider) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn this.__contextMenuProvider(item,index);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t/******************************************************End of Context Menu*************************************************************/\\r\\n\\t/******************************Custom Function *************************************/\\r\\n\\tNSList.prototype.__getIndexFromTarget = function(target)\\r\\n\\t{\\r\\n\\t\\tif(target)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn parseInt(target.getAttribute(\\\"ns-index\\\"));\\r\\n\\t\\t}\\r\\n\\t\\treturn -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getListItemFromItem = function(item)\\r\\n\\t{\\r\\n\\t\\tvar listItem = null;\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem = item[this.__fieldItem];\\r\\n\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t//below case is true if row reference has been removed due to virtual scroll \\r\\n\\t\\t\\tvar listItemRawIndex = this.__getListItemRawIndex(listItem); \\r\\n\\t\\t\\tif(!listItem || listItemRawIndex === -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrListItem = this.__listContainer.querySelectorAll('[ns-index=\\\"' + index + '\\\"]');\\r\\n\\t\\t\\t\\tif(arrListItem && arrListItem.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tlistItem = arrListItem[0];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn listItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getListItemByIndex = function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1)\\r\\n\\t    {\\r\\n\\t    \\tvar item = this.__getItemByIndex(index);\\r\\n\\t    \\tif(item)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn item[this.__fieldItem];\\r\\n\\t    \\t}\\r\\n\\t    }   \\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getListItemFromContainer = function(index)\\r\\n\\t{\\r\\n\\t\\tif(this.__listContainer.children.length > index)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__listContainer.children[index];\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getItemByIndex = function(indexToFind,source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__objGrid.__getFlatSource();\\r\\n\\t\\t}\\r\\n\\t\\tif(source && source.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldIndex] === indexToFind)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getIndexByItem = function(itemToFind,source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__objGrid.__getFlatSource();\\r\\n\\t\\t}\\r\\n\\t\\tif(itemToFind && source && source.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldIndex] === itemToFind[this.__fieldIndex])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__addItem = function(arrItem,atIndex)\\r\\n\\t{\\r\\n\\t\\tvar flatSource = this.__objGrid.__getFlatSource();\\r\\n\\t\\tif(this.util.isUndefined(atIndex) || atIndex === null)\\r\\n\\t\\t{\\r\\n\\t\\t\\tatIndex = flatSource.length;\\r\\n\\t\\t}\\r\\n\\t\\tif(arrItem && arrItem.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__listContainer && this.__listContainer.children && this.__listContainer.children.length > 0 && this.__listContainer.children.length < 3)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < this.__listContainer.children.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar listItem = this.__listContainer.children[count];\\r\\n\\t\\t\\t\\t\\tif(listItem.hasAttribute(\\\"nsNoData\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__listContainer.removeChild(listItem);\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__addRemoveRowCallInternal)\\r\\n\\t   \\t \\t{\\r\\n\\t\\t\\t\\tthis.__objGrid.__setWrapperSource(arrItem,atIndex,-1,0,true);\\r\\n\\t   \\t \\t};\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar length = arrItem.length;\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrItem[count];\\r\\n\\t\\t\\t\\tindex = atIndex + count;\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__dataSource.splice(index, 0, item);\\r\\n\\t\\t\\t\\t\\tthis.__arrWrapper.splice(index, 0, item);\\r\\n\\t\\t\\t\\t\\tthis.__arrInternalSource.splice(index, 0, item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t/*flatSource = this.__objGrid.__getFlatSource();\\r\\n\\t\\t\\tthis.__updateSourceIndex(flatSource);*/\\r\\n\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrItem[count];\\r\\n\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__createListAt(item,item[this.__fieldIndex]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__moveItem = function(arrItem,toIndex)\\r\\n\\t{\\r\\n\\t\\tif(arrItem && arrItem.length > 0 && !this.util.isUndefined(toIndex) && toIndex !== null)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar length = arrItem.length;\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\tvar fromIndex = -1;\\r\\n\\t\\t\\tvar listContainer = this.__listContainer;\\r\\n\\t\\t\\tvar listItem = null;\\r\\n\\t\\t\\tfor(var count = length - 1;count >= 0;count--)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrItem[count];\\r\\n\\t\\t\\t\\tindex = toIndex + count;\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfromIndex = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tthis.util.moveArrayItem(this.__dataSource,fromIndex,index);\\r\\n\\t\\t\\t\\t\\tthis.util.moveArrayItem(this.__arrWrapper,fromIndex,index);\\r\\n\\t\\t\\t\\t\\tthis.util.moveArrayItem(this.__arrInternalSource,fromIndex,index);\\r\\n\\t\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t// donot use item[this.__fieldItem] for getting listItem as after de-serialization the reference get lost \\r\\n\\t\\t\\t\\t\\t\\t// hence getting the item back from dataSource\\r\\n\\t\\t\\t\\t\\t\\titem = this.__getItemByIndex(fromIndex);\\r\\n\\t\\t\\t\\t\\t\\tlistItem = item[this.__fieldItem];\\r\\n\\t\\t\\t\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(listItem.parentNode === listContainer)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tlistContainer.removeChild(listItem);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tindex = (index === 0) ? index : (index - 1);\\r\\n\\t\\t\\t\\t\\t\\t\\tlistContainer.insertBefore(listItem, listContainer.children[index]);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateSourceIndex = function(source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar listItem = null;\\r\\n\\t\\tvar length = source.length;\\r\\n\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = source[count];\\r\\n\\t\\t\\tvar index = this.__enableHierarchical ? (count + 1) : count;\\r\\n\\t\\t\\titem[this.__fieldIndex] = index;\\r\\n\\t\\t\\tlistItem = item[this.__fieldItem];\\r\\n\\t\\t\\tif(listItem && this.util.isElementOfType(listItem,\\\"li\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\t\\tvar compArrow = listItem.querySelector(\\\".nsListArrow\\\");\\r\\n\\t\\t\\t\\tif(compArrow)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompArrow.setAttribute(\\\"ns-parent-row-count\\\",index);\\r\\n\\t\\t\\t\\t\\tvar arrowID = this.getID() + \\\"compArrow\\\" + index;\\r\\n\\t\\t\\t\\t\\tcompArrow.setAttribute(\\\"id\\\",arrowID);\\r\\n\\t\\t\\t\\t\\tvar compSvg = compArrow.querySelector(\\\"svg\\\");\\r\\n\\t\\t\\t\\t\\tif(compSvg)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar svgID = arrowID + \\\"svg\\\";\\r\\n\\t\\t\\t\\t\\t\\tcompSvg.setAttribute(\\\"id\\\",svgID);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar compUse = compArrow.querySelector(\\\"use\\\");\\r\\n\\t\\t\\t\\t\\tif(compUse)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar useID = arrowID + \\\"use\\\";\\r\\n\\t\\t\\t\\t\\t\\tcompUse.setAttribute(\\\"id\\\",useID);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createArrow = function(item,parentRowCount,parentElement,isCollapsed)\\r\\n\\t{\\r\\n\\t\\t if(parentElement)\\r\\n\\t\\t {\\r\\n\\t\\t\\t var cellArrowParent = this.util.createDiv(null,\\\"nsListArrowParent\\\");\\r\\n\\t\\t\\t var arrowID = this.getID() + \\\"compArrow\\\" + parentRowCount;\\r\\n\\t\\t\\t var compArrow = this.util.createDiv(arrowID,\\\"nsListArrow\\\");\\r\\n\\t\\t\\t compArrow.style.paddingTop = \\\"3px\\\";\\r\\n\\t\\t\\t compArrow.setAttribute(\\\"ns-parent-row-count\\\",parentRowCount);\\r\\n\\t\\t\\t \\r\\n\\t\\t\\t var objSVG = new NSSvg();\\r\\n\\t\\t\\t this.__objGrid.__createArrow(compArrow,objSVG,arrowID,isCollapsed);\\r\\n\\t\\t\\t this.util.addEvent(compArrow,\\\"click\\\",this.__arrowClickHandler.bind(this));\\r\\n\\t\\t\\t cellArrowParent.appendChild(compArrow);\\r\\n\\t\\t\\t parentElement.appendChild(cellArrowParent);\\r\\n\\t\\t\\t item[this.__fieldItemArrow] = compArrow;\\r\\n\\t\\t\\t return compArrow;\\r\\n\\t\\t }\\r\\n\\t\\t return null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setArrowDirection = function(compArrow,isCollapsed)\\r\\n\\t{\\r\\n\\t\\tif(compArrow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = compArrow.getAttribute(\\\"id\\\") + \\\"use\\\";\\r\\n\\t\\t\\tthis.__objGrid.__setArrowDirection(objSVG,useID,isCollapsed);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isArrowCollapsed = function(compArrow)\\r\\n\\t{\\r\\n\\t\\tif(compArrow && compArrow.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rowIndex = parseInt(compArrow.getAttribute(\\\"ns-parent-row-count\\\"));\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn item[this.__fieldIsCollapsed];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__arrowClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"DIV\\\");\\r\\n\\t\\tif(target && target.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rowIndex = target.getAttribute(\\\"ns-parent-row-count\\\");\\r\\n\\t\\t\\tvar isCollapse = this.__isArrowCollapsed(target);\\r\\n\\t\\t\\trowIndex = parseInt(rowIndex);\\r\\n\\t\\t\\tif(rowIndex > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t\\tif(item[this.__childField]  && item[this.__childField].length > 0)\\r\\n\\t\\t        {\\r\\n\\t\\t\\t\\t\\tthis.__showHideRow(rowIndex,target,!isCollapse);\\r\\n\\t\\t        }\\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__objGrid.__handleOnDemandClick(item,event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__expandCollapseAll = function(isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(!this.__enableVirtualScroll && this.__getTotalListItems() < this.__totalRecords)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.warning(\\\"nsList\\\",\\\"Please let all the items to render.\\\");\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t}\\r\\n\\t\\tvar dataSource = this.__arrInternalSource;\\r\\n\\t\\tif(dataSource && dataSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__expandCollapseAllVirtual(dataSource,isCollapse);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__expandCollapseAllNormal(dataSource,isCollapse);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__expandCollapseAllNormal = function(dataSource,isCollapse)\\r\\n\\t{\\r\\n\\t\\tfor(var count = 0;count < dataSource.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t//setting __fieldIsCollapsed here assuming that __showHideAllArrows() will be called after this function\\r\\n\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\tif(parseInt(item[this.__fieldItemLevel]) > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar row = item[this.__fieldItem];\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__showHideAllArrows(isCollapse);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__expandCollapseAllVirtual = function(dataSource,isCollapse)\\r\\n\\t{\\r\\n\\t\\tfor(var count = 0;count < dataSource.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t//setting __fieldIsCollapsed here assuming that __showHideAllArrows() will be called after this function\\r\\n\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\tif(parseInt(item[this.__fieldItemLevel]) > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__showHideAllArrows(isCollapse);\\r\\n\\t\\tthis.__updateVisibleIndex(null,0);\\r\\n\\t\\tthis.__setNSVirtualScroll(this.__arrInternalSource);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__showHideRow = function(rowIndex,compArrow,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(rowIndex > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\tif(!compArrow)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompArrow = this.__getArrow(item[this.__fieldIndex]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar rowLevel = parseInt(item[this.__fieldItemLevel]);\\r\\n\\t\\t\\tvar arrChildItems = [];\\r\\n\\t\\t\\tif(item && item[this.__fieldHasChild])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar startIndex = 0;\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrChildItems = this.__arrInternalSource;\\r\\n\\t\\t\\t\\t\\tstartIndex = rowIndex;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrChildItems = this.__getImmediateChildItems(arrChildItems, item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__showHideRowVirtual(item,arrChildItems,startIndex,rowLevel,isCollapse);\\r\\n\\t\\t\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\t\\t\\t//this.__updateItemInSource(item);\\r\\n\\t\\t\\t\\t\\tthis.__setNSVirtualScroll(this.__arrInternalSource);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__showHideRowNormal(item,arrChildItems,startIndex,rowLevel,isCollapse);\\r\\n\\t\\t\\t\\t\\tthis.__setArrowDirection(compArrow,isCollapse);\\r\\n\\t\\t\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__showHideRowNormal = function(item,arrChildItems,startIndex,rowLevel,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(arrChildItems && arrChildItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retIndex = this.__getActualIndex(arrChildItems,startIndex);\\r\\n\\t\\t\\t\\tif(retIndex !== startIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstartIndex = (retIndex + 1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar rowItem = null;\\r\\n\\t\\t\\tfor(var count = startIndex;count < arrChildItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowItem = arrChildItems[count];\\r\\n\\t\\t\\t\\tvar row = rowItem[this.__fieldItem];\\r\\n\\t\\t\\t\\tif(!row)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow = this.__createListAt(rowItem,rowItem[this.__fieldIndex] - 1,false);\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItem] = row;\\r\\n\\t\\t\\t\\t\\tthis.__updateSourceIndex();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(rowLevel >= parseInt(rowItem[this.__fieldItemLevel]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t\\tif(rowItem[this.__fieldHasChild])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\trowItem[this.__fieldIsCollapsed] = true;\\r\\n\\t\\t\\t\\t\\t\\tif(rowItem[this.__fieldItemArrow])\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar divArrow = rowItem[this.__fieldItemArrow];\\r\\n\\t\\t\\t\\t\\t\\t\\tif(divArrow)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tthis.__setArrowDirection(divArrow,true);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__showHideRowVirtual = function(item,arrChildItems,startIndex,rowLevel,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(arrChildItems && arrChildItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retIndex = this.__getActualIndex(arrChildItems,startIndex);\\r\\n\\t\\t\\t\\tif(retIndex !== startIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstartIndex = (retIndex + 1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(var count = startIndex;count < arrChildItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar rowItem = arrChildItems[count];\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(rowLevel >= parseInt(rowItem[this.__fieldItemLevel]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t\\tif(rowItem[this.__fieldHasChild])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\trowItem[this.__fieldIsCollapsed] = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\tthis.__updateVisibleIndex(null,index - 1);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__showHideAllArrows = function(isCollapse)\\r\\n\\t{\\r\\n\\t\\tvar arrDivs = this.__getAllArrows();\\r\\n\\t\\tif(arrDivs && arrDivs.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrDivs.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar div = arrDivs[count];\\r\\n\\t\\t\\t\\tif(div && div.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__setArrowDirection(div,isCollapse);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getAllItems = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__objGrid.__getFlatSource();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateListItemText = function(listItem,item,index)\\r\\n\\t{\\r\\n\\t\\treturn this.__objGrid.__updateListItemText(listItem,item,index);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getImmediateChildItems = function(arrItems,item)\\r\\n\\t{\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = [];\\r\\n\\t\\t}\\r\\n\\t\\tif(item && item[this.__fieldHasChild])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChild = this.__arrInternalSource;\\r\\n\\t\\t\\tvar rowLevel = parseInt(item[this.__fieldItemLevel]);\\r\\n\\t\\t\\tvar startIndex = item[this.__fieldIndex];\\r\\n\\t\\t\\tvar retIndex = this.__getActualIndex(arrChild,startIndex);\\r\\n\\t\\t\\tif(retIndex !== startIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstartIndex = (retIndex + 1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = arrChild.length;\\r\\n\\t\\t\\tfor(var count = startIndex;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar itemChild = arrChild[count];\\r\\n\\t\\t\\t\\tvar childRowLevel = parseInt(itemChild[this.__fieldItemLevel]);\\r\\n\\t\\t\\t\\tif(rowLevel >= childRowLevel)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif((rowLevel + 1) === childRowLevel)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrItems.push(itemChild);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn arrItems;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//generally used for Filter condition\\r\\n\\tNSList.prototype.__getActualIndex = function(arrChild,startIndex,addCompareOne)\\r\\n\\t{\\r\\n\\t\\t//(startIndex + 1) as __fieldIndex starts from 1\\r\\n\\t\\t//if(arrChild && arrChild.length < startIndex || arrChild[startIndex][this.__fieldIndex] !== (startIndex + 1))\\r\\n\\t\\tif(arrChild && arrChild.length > startIndex && arrChild[startIndex][this.__fieldIndex] !== (startIndex + 1))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compareIndex = startIndex;\\r\\n\\t\\t\\tif(addCompareOne)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompareIndex += 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar rowItem = null;\\r\\n\\t\\t\\tfor(var count = 0;count < arrChild.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowItem = arrChild[count];\\r\\n\\t\\t\\t\\tif(rowItem[this.__fieldIndex] === compareIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn count;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn startIndex;\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSList.prototype.__getAllChildItems = function(arrItems,item)\\r\\n\\t{\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = [];\\r\\n\\t\\t}\\r\\n\\t\\tif(item && item[this.__fieldHasChild])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChild = this.__arrInternalSource;\\r\\n\\t\\t\\tvar rowLevel = parseInt(item[this.__fieldItemLevel]);\\r\\n\\t\\t\\tvar startIndex = item[this.__fieldIndex];\\r\\n\\t\\t\\tvar length = arrChild.length;\\r\\n\\t\\t\\tfor(var count = startIndex;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar itemChild = arrChild[count];\\r\\n\\t\\t\\t\\tif(rowLevel >= parseInt(itemChild[this.__fieldItemLevel]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tarrItems.push(itemChild);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn arrItems;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getAllVisibleItems = function()\\r\\n\\t{\\r\\n\\t\\tvar totalRecords = 0;\\r\\n\\t\\tvar arrItems = this.__getAllItems();\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrItems[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldItemVisible])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttotalRecords += 1;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn totalRecords;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getFirstVisibleItemBeforeIndex = function(itemIndex)\\r\\n\\t{\\r\\n\\t\\tvar arrItems = this.__getAllItems();\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retIndex = this.__getActualIndex(arrItems,itemIndex);\\r\\n\\t\\t\\tif(retIndex !== itemIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titemIndex = (retIndex + 1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(var count = itemIndex;count >= 0;count--)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrItems[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldItemVisible] && item[this.__fieldVisibleIndex] > -1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getVisibleItemByIndex = function(source,index)\\r\\n\\t{\\r\\n\\t\\tvar arrItems = source;\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this; \\r\\n\\t\\t\\tvar findItem = function(itemCompare)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t return (itemCompare[self.__fieldVisibleIndex] === (index + 1));\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\treturn arrItems.find(findItem);\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateVisibleIndex = function(source,fromIndex)\\r\\n\\t{\\r\\n\\t\\tvar arrItems = source;\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isUndefinedOrNull(fromIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\tfromIndex = 0;\\r\\n\\t\\t}\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar visibleRowIndex = 1;\\r\\n\\t\\t\\tif(fromIndex > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar visibleItem = this.__getFirstVisibleItemBeforeIndex(fromIndex);\\r\\n\\t\\t\\t\\tif(visibleItem)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvisibleRowIndex = visibleItem[this.__fieldVisibleIndex];\\r\\n\\t\\t\\t\\t\\tfromIndex = visibleItem[this.__fieldIndex] - 1;\\r\\n\\t\\t\\t\\t\\tvar retIndex = this.__getActualIndex(arrItems,fromIndex,true);\\r\\n\\t\\t\\t\\t\\tif(retIndex !== fromIndex)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tfromIndex = retIndex;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = arrItems.length;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = fromIndex; count < length; count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrItems[count];\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item[this.__fieldItemVisible])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = visibleRowIndex;\\r\\n\\t\\t\\t\\t\\t\\tvisibleRowIndex++;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = -1;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateVisibleIndexByListItem = function(source,arrAllItems)\\r\\n\\t{\\r\\n\\t\\tif(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItems = arrAllItems;\\r\\n\\t\\t\\tif(!arrItems)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrItems = this.__getAllItems();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = source.length;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar objVisibleIndex = {};\\r\\n\\t\\t\\tfor(var count = 0; count < length; count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tobjVisibleIndex[index] = \\\"NSList\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlength = arrItems.length;\\r\\n\\t\\t\\t\\titem = null;\\r\\n\\t\\t\\t\\tvar visibleRowIndex = 1;\\r\\n\\t\\t\\t\\tfor(var count = 0; count < length; count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = arrItems[count];\\r\\n\\t\\t\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tif(this.util.isUndefinedOrNull(objVisibleIndex[index]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = -1;\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = visibleRowIndex;\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t\\t\\tvisibleRowIndex++;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateIndexForAllItems = function(source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tvar length = source.length;\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tfor(var count = 0; count < length; count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = source[count];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldIndex] = count;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getArrow = function(rowCount)\\r\\n\\t{\\r\\n\\t\\tvar arrDivs = this.__getAllArrows();\\r\\n\\t\\tif(arrDivs && arrDivs.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrDivs.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar div = arrDivs[count];\\r\\n\\t\\t\\t\\tif(div && div.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar rowParentCount = div.getAttribute(\\\"ns-parent-row-count\\\");\\r\\n\\t\\t\\t\\t\\tif(rowParentCount && rowParentCount == rowCount)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn div;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getAllArrows = function(divParent)\\r\\n\\t{\\r\\n\\t\\tif(!divParent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdivParent = this.__listContainer;\\r\\n\\t\\t}\\r\\n\\t\\treturn divParent.querySelectorAll(\\\".nsListArrow\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getTotalListItems = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__listContainer && this.__listContainer.children)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__listContainer.children.length;\\r\\n\\t\\t}\\r\\n\\t\\treturn 0;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateTotalRecords = function(totalCount)\\r\\n\\t{\\r\\n\\t\\tif(this.util.isUndefined(totalCount) || totalCount === null)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttotalCount = this.__arrInternalSource.length; \\r\\n\\t\\t}\\r\\n\\t\\tthis.__totalRecords = totalCount;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getListItemRawIndex = function(listItem)\\r\\n\\t{\\r\\n\\t\\tif(listItem && listItem.parentNode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar index = [].slice.call(listItem.parentNode.children).indexOf(listItem);\\r\\n\\t\\t\\treturn index;\\r\\n\\t\\t}\\r\\n\\t\\treturn -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__checkForVirtualMode = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enablePagination)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableVirtualScroll = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setVirtualScroll_ScrollTop = function(scrollTop)\\r\\n\\t{\\r\\n\\t\\tif(this.__enableCustomScrollBar)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__scroller)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__scroller.setScrollTop(scrollTop);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar NSFlatList = function(nsList)\\r\\n\\t{\\r\\n\\t\\tthis.__nsList = nsList;\\r\\n\\t\\tthis.util = nsList.util;\\r\\n\\t\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.dataSource = function(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsList.__arrWrapper = this.__nsList.__dataSource.slice(0);\\r\\n\\t\\t\\tthis.__setWrapperSource(this.__nsList.__arrWrapper,0,-1,0,true);\\r\\n\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrWrapper.slice(0);\\r\\n\\t\\t\\tthis.__nsList.__updateTotalRecords();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.addItemsAsChildren = function(item,arrChildren)\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setWrapperSource = function(source,offset,parentIndex,level,setFieldIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!offset)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\toffset = 0;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar length = source.length;\\r\\n\\t\\t\\t\\tvar count = 0;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar index = -1; \\r\\n\\t\\t\\t\\tfor (count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\tindex = offset + count;\\r\\n\\t\\t\\t\\t\\tthis.__setItemProperty(item,index,setFieldIndex);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__createList= function(dataSet,startIndex,endIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t    for(var count = startIndex; count < endIndex; count++)\\r\\n\\t\\t     {\\r\\n\\t    \\t\\titem = dataSet[count];\\r\\n\\t    \\t\\tindex =  item[this.__nsList.__fieldIndex];\\r\\n\\t    \\t\\tthis.__nsList.__updateItem(item,index);\\r\\n\\t    \\t\\tthis.__nsList.__createListItem(item);\\r\\n\\t\\t     }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createListItem = function(listItem,item)\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__addSVGInPage = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__setListItemProperties = function(listItem,item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(listItem && item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = item[this.__nsList.__fieldIndex];\\r\\n\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldItem] = listItem;\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(listItem);\\r\\n\\t\\t\\t\\tvar divCell = this.util.createDiv(null,\\\"nsListChild\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(divCell,this.__nsList.__CLASS_CELL_CHILD);\\r\\n\\t\\t\\t\\tlistItem.appendChild(divCell);\\r\\n\\t\\t\\t\\tthis.__nsList.__addCellText(listItem,item,divCell);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__updateListItemText = function(listItem,item,index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(listItem && item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(listItem);\\r\\n\\t\\t\\t\\tthis.__setListItemProperties(listItem,item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__getFlatSource= function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__nsList.__arrWrapper;\\r\\n\\t\\t};\\r\\n\\t\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\t\\tthis.__setItemProperty = function(item,rowIndex,setFieldIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(setFieldIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldIndex] = rowIndex;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldVisibleIndex] = rowIndex + 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__resetListItem = function(listItem,index,item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem.style.display = \\\"\\\";\\r\\n\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemSelected\\\");\\r\\n\\t\\t\\tthis.__nsList.__updateItem(item,index);\\r\\n\\t\\t\\tthis.__setListItemProperties(listItem,item);\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar NSHierarchicalList = function(nsList)\\r\\n\\t{\\r\\n\\t\\tthis.__nsList = nsList;\\r\\n\\t\\tthis.util = nsList.util;\\r\\n\\t\\tthis.__ARROW_COLLAPSE_PATH = \\\"M 0 9.99994L 6.10352e-005 -3.05176e-005L 5 5.00006L 0 9.99994 Z\\\";\\r\\n\\t\\tthis.__ARROW_EXPANDED_PATH = \\\"M 0 3.05176e-005L 9.99994 9.15527e-005L 4.99988 5.00003L 0 3.05176e-005 Z\\\";\\r\\n\\t\\tthis.__CLASS_ARROW = \\\"nsListArrowFill\\\";\\r\\n\\t\\tthis.__rowCounter = -1;\\r\\n\\t\\tthis.__enableOnDemandHierarchy = false;\\r\\n\\t\\tthis.__onDemandChildDetectionField = \\\"hasChildren\\\";\\r\\n\\t\\tthis.__onDemandChildFetchCallback = null;\\r\\n\\t\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting = this.__nsList.__setting;\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableOnDemandHierarchy\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableOnDemandHierarchy = Boolean.parse(setting[\\\"enableOnDemandHierarchy\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableOnDemandHierarchy)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(setting.hasOwnProperty(\\\"onDemandChildDetectionField\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__onDemandChildDetectionField = setting[\\\"onDemandChildDetectionField\\\"];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(setting.hasOwnProperty(\\\"onDemandChildFetchCallback\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__onDemandChildFetchCallback = setting[\\\"onDemandChildFetchCallback\\\"];\\r\\n\\t\\t\\t\\t\\tthis.__onDemandChildFetchCallback = this.util.getFunction(this.__onDemandChildFetchCallback);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__onDemandChildDetectionField)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.throwNSError(\\\"NSList\\\",\\\"Value for onDemandChildDetectionField is not valid\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__onDemandChildFetchCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.throwNSError(\\\"NSList\\\",\\\"Value for onDemandChildFetchCallback is not valid\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.warning(\\\"NSList\\\",\\\"As enableVirtualScroll is true so OnDemandHierarchy will have no impact.\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.dataSource = function(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsList.__arrWrapper = this.__nsList.__dataSource.slice(0);\\r\\n\\t\\t\\tthis.__setWrapperSource(this.__nsList.__arrWrapper,0,-1,0,true,true,true);\\r\\n\\t\\t\\tthis.__nsList.__updateTotalRecords(this.__rowCounter);\\r\\n\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrFlatHierarchicalSource.slice(0);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.addItemsAsChildren = function(item,arrChildren)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item && arrChildren && arrChildren.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!item[this.__nsList.__childField])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__childField] = [];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem[this.__nsList.__childField].push.apply(item[this.__nsList.__childField], arrChildren);\\r\\n\\t\\t\\t\\tthis.__setWrapperSource(this.__nsList.__arrWrapper,0,-1,0,true,false,false);\\r\\n\\t\\t\\t\\tthis.__nsList.__updateTotalRecords(this.__rowCounter);\\r\\n\\t\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrFlatHierarchicalSource.slice(0);\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldIsCollapsed] = false;\\r\\n\\t\\t   \\t\\tvar listItem = this.__nsList.__getListItemFromItem(item);\\r\\n\\t\\t   \\t\\tvar rowIndex = this.__nsList.__getIndexByItem(item);\\r\\n\\t\\t   \\t\\tthis.__nsList.__showHideRow(rowIndex,null,false);\\r\\n\\t\\t   \\t\\tconsole.log(this.__nsList.__arrFlatHierarchicalSource);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setWrapperSource = function(source,offset,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(level === 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(!offset)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\toffset = 0;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__nsList.__arrFlatHierarchicalSource = [];\\r\\n\\t\\t\\t\\t\\tthis.__rowCounter = offset;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar length = source.length;\\r\\n\\t\\t\\t\\tvar count = 0;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tfor (count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\tthis.__rowCounter++;\\r\\n\\t\\t\\t\\t\\tthis.__nsList.__arrFlatHierarchicalSource.push(item);\\r\\n\\t\\t\\t\\t\\tthis.__setItemProperty(item,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__createList= function(dataSet,startIndex,endIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t    for(var count = startIndex; count < endIndex; count++)\\r\\n\\t\\t    {\\r\\n\\t    \\t\\titem = dataSet[count];\\r\\n\\t    \\t\\tif(item)\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tindex =  item[this.__nsList.__fieldIndex];\\r\\n\\t        \\t\\tthis.__nsList.__updateItem(item,index);\\r\\n\\t        \\t\\tthis.__nsList.__createListItem(item);\\r\\n\\t    \\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createListItem = function(listItem,item)\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__addSVGInPage = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tobjSVG.addPath(\\\"svgListArrowDown\\\",this.__ARROW_EXPANDED_PATH,\\\"0 0 16 16\\\");\\r\\n\\t\\t\\tobjSVG.addPath(\\\"svgListArrowRight\\\",this.__ARROW_COLLAPSE_PATH,\\\"0 0 16 16\\\");\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__setListItemProperties = function(listItem,item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(listItem && item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = item[this.__nsList.__fieldIndex];\\r\\n\\t\\t\\t\\tvar level = item[this.__nsList.__fieldItemLevel];\\r\\n\\t\\t\\t\\tvar parentIndex = item[this.__nsList.__fieldParentIndex];\\r\\n\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-level\\\",level);\\r\\n\\t\\t\\t\\tif(item[this.__nsList.__fieldHasParent])\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-parent-index\\\",parentIndex);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldItem] = listItem;\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(listItem);\\r\\n\\t\\t\\t\\tvar divCell = this.util.createDiv(null,\\\"nsListChild\\\");\\r\\n\\t\\t\\t\\tlistItem.appendChild(divCell);\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tvar hierarchicalPadding = 0;\\r\\n\\t\\t\\t\\tvar divText = null;\\r\\n\\t\\t\\t\\tif(item && item.hasOwnProperty(this.__nsList.__labelField) && item[this.__nsList.__labelField])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t        if((item[this.__nsList.__childField]  && item[this.__nsList.__childField].length > 0) || (this.__isOnDemandHasChildren(item)))\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tthis.util.addStyleClass(divCell,this.__nsList.__CLASS_GROUP_CELL);\\r\\n\\t\\t\\t        \\tthis.__nsList.__createArrow(item,index,divCell,item[this.__nsList.__fieldIsCollapsed]);\\r\\n\\t\\t\\t        \\tvar cellText = this.util.createDiv(null,this.__nsList.__CLASS_CELL_CHILD);\\r\\n\\t\\t\\t        \\tthis.util.addStyleClass(cellText,\\\"nsListGroupCellText\\\");\\r\\n\\t\\t\\t        \\tcellText.style.verticalAlign = \\\"top\\\";\\r\\n\\t\\t\\t        \\tdivText = cellText;\\r\\n\\t\\t\\t        \\tdivCell.appendChild(cellText);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        else\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tthis.util.addStyleClass(divCell,this.__nsList.__CLASS_CELL_CHILD);\\r\\n\\t\\t\\t        \\tdivText = divCell;\\r\\n\\t\\t\\t        \\t//24 = 16(Arrow Width) + 6(Arrow Parent Padding) + 2(divCell horizontalGap between elements shown in debugger)\\r\\n\\t\\t\\t        \\thierarchicalPadding = 24;\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        this.__nsList.__addCellText(listItem,item,divText);\\r\\n\\t\\t        \\tif(level === 0)\\r\\n\\t\\t        \\t{\\r\\n\\t\\t        \\t\\tlistItem.style.paddingLeft = \\\"1px\\\";\\r\\n\\t\\t        \\t}\\r\\n\\t\\t        \\telse\\r\\n\\t\\t        \\t{\\r\\n\\t\\t        \\t\\tvar paddingLeft = (10 * level) + hierarchicalPadding;\\r\\n\\t\\t        \\t\\tlistItem.style.paddingLeft = paddingLeft + \\\"px\\\";\\r\\n\\t\\t        \\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__updateListItemText = function(listItem,item,index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(listItem && item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(listItem);\\r\\n\\t\\t\\t\\tthis.__setListItemProperties(listItem,item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__getFlatSource= function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__nsList.__arrFlatHierarchicalSource;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleOnDemandClick = function(item,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item && this.__isOnDemandHasChildren(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__onDemandChildFetchCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\t\\tvar rowLevel = item[this.__nsList.__fieldItemLevel];\\r\\n\\t\\t\\t\\t\\tvar rowIndex = this.__nsList.__getIndexByItem(item);\\r\\n\\t\\t\\t\\t\\tthis.__onDemandChildFetchCallback(item,rowIndex,rowLevel,event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\t\\tthis.__setItemProperty = function(item,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isUndefinedOrNull(setIsCollapsed))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsetIsCollapsed = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.util.isUndefinedOrNull(setItemVisible))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsetItemVisible = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar totalRowCount = this.__rowCounter;\\r\\n\\t\\t\\t\\tif(setFieldIndex || this.util.isUndefinedOrNull(item[this.__nsList.__fieldIndex]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldIndex] = totalRowCount;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldVisibleIndex] = totalRowCount;\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldItemLevel] = level;\\r\\n\\t\\t\\t\\tvar hasChild = false;\\r\\n\\t\\t\\t\\tif(item.hasOwnProperty(this.__nsList.__childField) && item[this.__nsList.__childField] && item[this.__nsList.__childField].length > 0)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\thasChild = true;\\r\\n\\t\\t\\t    \\tthis.__setWrapperSource(item[this.__nsList.__childField],0,totalRowCount,level + 1,setFieldIndex,setIsCollapsed,setItemVisible);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldParentIndex] = parentIndex;\\r\\n\\t\\t\\t\\tif(parentIndex > -1)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldHasParent] = true;\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldHasParent] = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldHasChild] = hasChild;\\r\\n\\t\\t\\t\\tif(setItemVisible || this.util.isUndefinedOrNull(item[this.__nsList.__fieldItemVisible]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(setIsCollapsed || this.util.isUndefinedOrNull(item[this.__nsList.__fieldIsCollapsed]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldIsCollapsed] = this.__isOnDemandHasChildren(item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createArrow = function(compArrow,objSVG,arrowID,isCollapsed)\\r\\n\\t\\t{\\r\\n\\t\\t\\t var svg = objSVG.addSVG(compArrow,arrowID + \\\"svg\\\",this.__CLASS_ARROW,null,null,null,null,null,null,true);\\r\\n\\t\\t\\t if(isCollapsed)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t objSVG.addUse(svg,arrowID + \\\"use\\\",null,\\\"#svgListArrowRight\\\");\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t else\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t objSVG.addUse(svg,arrowID + \\\"use\\\",null,\\\"#svgListArrowDown\\\");\\r\\n\\t\\t\\t }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__setArrowDirection = function(objSVG,useID,isCollapsed)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCollapsed)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#svgListArrowRight\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#svgListArrowDown\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__resetListItem = function(listItem,index,item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem.style.display = \\\"\\\";\\r\\n\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemSelected\\\");\\r\\n\\t\\t\\tthis.__nsList.__updateItem(item,index);\\r\\n\\t\\t\\tthis.__setListItemProperties(listItem,item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isOnDemandHasChildren = function(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (this.__enableOnDemandHierarchy && item[this.__onDemandChildDetectionField]);\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar NSListFilter = function(nsList)\\r\\n\\t{\\r\\n\\t\\tthis.__nsList = nsList;\\r\\n\\t\\t\\r\\n\\t\\tthis.util = nsList.util;\\r\\n\\t\\tthis.__filteredColumn = [];\\r\\n\\t\\tthis.__config = {};\\r\\n\\t\\tthis.__nsDragDrop = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.filter = function(strData,filterSetting,enableHighlighting,recordLimit)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!filterSetting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfilterSetting = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(enableHighlighting))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tenableHighlighting = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar config = {\\r\\n\\t\\t\\t\\t\\tcaseSensitive: this.util.isUndefinedOrNull(filterSetting[\\\"caseSensitive\\\"]) ? false : Boolean.parse(filterSetting[\\\"caseSensitive\\\"]),\\r\\n\\t\\t\\t\\t\\tmultiline: this.util.isUndefinedOrNull(filterSetting[\\\"multiline\\\"]) ? false : Boolean.parse(filterSetting[\\\"multiline\\\"]),\\r\\n\\t\\t\\t\\t\\tmatchType: filterSetting[\\\"matchType\\\"] || new NSFilter().CONTAINS\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar filter = {};\\r\\n\\t\\t\\tvar setting = {};\\r\\n\\t\\t\\tvar field = this.__nsList.__labelField;\\r\\n\\t\\t\\tfilter[field] = strData;\\r\\n\\t\\t\\tsetting[field] = {caseSensitive:config[\\\"caseSensitive\\\"],multiline:config[\\\"multiline\\\"],matchType:config[\\\"matchType\\\"]};\\r\\n\\t\\t\\tif(filter && Object.keys(filter).length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__handleFiltering(filter,setting,enableHighlighting,recordLimit);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__resetFiltering();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.reset = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__resetFiltering();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleFiltering = function(filter,setting,enableHighlighting,recordLimit)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__filteredColumn = [];\\r\\n\\t\\t\\tif(filter)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\t var field = this.__nsList.__labelField;\\r\\n\\t\\t\\t\\t var source = this.__nsList.__arrWrapper;\\r\\n\\t\\t\\t\\t var isHierarchical = false;\\r\\n\\t\\t\\t\\t if(this.__nsList.__enableHierarchical)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t isHierarchical = true;\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t   \\t var nsFilter = new NSFilter(source,filter,setting,recordLimit,isHierarchical,this.__nsList.__childField);\\r\\n\\t\\t\\t   \\t this.__nsList.__arrInternalSource = nsFilter.execute();\\r\\n\\t\\t\\t   \\t if(enableHighlighting)\\r\\n\\t\\t\\t   \\t {\\r\\n\\t\\t\\t   \\t\\tfor(var key in filter) \\r\\n\\t\\t  \\t        {\\r\\n\\t\\t  \\t        \\tthis.__filteredColumn.push({field:key,text:filter[key]});\\r\\n\\t\\t  \\t        }\\r\\n\\t\\t\\t   \\t }\\r\\n\\t\\t\\t   \\t if(isHierarchical)\\r\\n\\t\\t\\t   \\t {\\r\\n\\t\\t\\t   \\t\\tthis.__nsList.__objGrid.__setWrapperSource(this.__nsList.__arrInternalSource,0,-1,0,false);\\r\\n\\t\\t\\t   \\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrFlatHierarchicalSource.slice(0); \\r\\n\\t\\t\\t   \\t }\\r\\n\\t\\t\\t   \\t this.__nsList.__updateTotalRecords();\\r\\n\\t\\t\\t   \\t this.__nsList.__renderBody();\\r\\n\\t\\t\\t   \\t this.__nsList.__updateVisibleIndexByListItem(this.__nsList.__arrInternalSource);\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__resetFiltering = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsList.__dataSource)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrWrapper.slice(0);\\r\\n\\t\\t\\t\\tthis.__filteredColumn = [];\\r\\n\\t\\t\\t\\tif(this.__nsList.__enableHierarchical)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsList.__objGrid.__setWrapperSource(this.__nsList.__arrInternalSource,0,-1,0,false);\\r\\n\\t\\t\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrFlatHierarchicalSource.slice(0); \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__nsList.__updateTotalRecords();\\r\\n\\t\\t\\t\\tthis.__nsList.__renderBody();\\r\\n\\t\\t\\t\\tthis.__nsList.__updateVisibleIndexByListItem(this.__nsList.__arrInternalSource);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__highlightDiv = function(divText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar length = this.__filteredColumn.length;\\r\\n\\t\\t\\tfor (var count = 0; count < length; count++) \\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar text = this.__filteredColumn[count].text;\\r\\n\\t\\t\\t\\tthis.util.highlightText(divText,text,\\\"nsTextHighlight\\\");\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar NSListDragDrop = function(nsList)\\r\\n\\t{\\r\\n\\t\\tthis.__nsList = nsList;\\r\\n\\t\\tthis.util = nsList.util;\\r\\n\\t\\t\\r\\n\\t\\tthis.__disableDraggableFunction = null;\\r\\n\\t\\tthis.__disableDropableFunction = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar container = this.__nsList.__listContainer;\\r\\n\\t\\t\\tvar setting = {container:container,childNodeType:\\\"LI\\\",isContainerDraggable:this.__nsList.__isDraggable,isContainerDroppable:this.__nsList.__isDroppable,\\r\\n\\t\\t\\t\\t\\t\\t   enableDragByHandle:this.__nsList.__enableDragByHandle,dragHandlerClass:this.__nsList.__dragHandlerClass,\\r\\n\\t\\t\\t\\t\\t\\t   enableDragAfterHold:this.__nsList.__enableDragAfterHold,enableCloneMode:this.__nsList.__enableCloneMode,holdTime:this.__nsList.__holdTime,createCloneCallback:this.__createClone.bind(this),\\r\\n\\t\\t\\t\\t\\t\\t   createPlaceholderCallback:this.__createPlaceholder.bind(this),nodeDroppableCallback:this.__isListItemDroppable.bind(this),\\r\\n\\t\\t\\t\\t\\t\\t   nodeDraggableCallback:this.__isListItemDraggable.bind(this),insertNodeCallback:this.__insertListItemHandler.bind(this),\\r\\n\\t\\t\\t\\t\\t\\t   moveNodeCallback:this.__moveListItemHandler.bind(this),removeNodeCallback:this.__removeListItemHandler.bind(this)};\\r\\n\\t\\t\\tthis.__nsDragDrop = new NSDragDrop(setting);\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.ITEM_DROPPING,this.__itemDroppingHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.ITEM_DROPPED,this.__itemDroppedHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.DRAG_STARTING,this.__dragStartingHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.DRAG_STARTED,this.__dragStartHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.DRAGGING,this.__draggingHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.DRAG_END,this.__dragEndHandler.bind(this));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting = this.__nsList.__setting;\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"disableDraggableFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__disableDraggableFunction = setting[\\\"disableDraggableFunction\\\"];\\r\\n\\t\\t\\t\\tthis.__disableDraggableFunction = this.util.getFunction(this.__disableDraggableFunction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"disableDropableFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__disableDropableFunction = setting[\\\"disableDropableFunction\\\"];\\r\\n\\t\\t\\t\\tthis.__disableDropableFunction = this.util.getFunction(this.__disableDropableFunction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dragStartingHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = event.node;\\r\\n\\t\\t\\tvar arrItems = this.__getSelectedItems(listItem);\\r\\n\\t\\t\\tvar data = {parentID:this.__nsList.__listContainer.getAttribute(\\\"id\\\"),arrItems:arrItems};\\r\\n\\t\\t\\tthis.__nsDragDrop.setDragData(data);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dragStartHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = event.node;\\r\\n\\t\\t\\tvar data = this.__nsDragDrop.getDragData();\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.DRAG_STARTED,arrItems,{items:arrItems});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__draggingHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listData = event.item;\\r\\n\\t\\t\\tvar data = this.__nsDragDrop.getDragData();\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tlistData.arrItems = arrItems;\\r\\n\\t \\t    this.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.DRAGGING,listData,{item:listData});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dragEndHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar data = this.__nsDragDrop.getDragData();\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t \\t    this.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.DRAG_END,arrItems,{items:arrItems});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__itemDroppingHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cancelled = this.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.ITEM_DROPPING,event.item,{item:event.item},true,true);\\r\\n\\t\\t\\tif(cancelled)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__itemDroppedHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.ITEM_DROPPED,event.item,{item:event.item},true,false);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createClone = function(listItem,containerConfiguration)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listContainer = this.__nsList.__listContainer.cloneNode(false);\\r\\n\\t\\t\\tvar data = this.__nsDragDrop.getDragData();\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tvar clonedNode = null;\\r\\n\\t\\t\\t//make a clone only when clone Mode is ON or the list is not droppable\\r\\n\\t\\t\\tif(this.__nsList.__enableCloneMode || !this.__nsList.__isDroppable)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrItems.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tclonedNode = arrItems[count][this.__nsList.__fieldItem].cloneNode(true);\\r\\n\\t\\t\\t\\t\\tclonedNode.setAttribute(\\\"id\\\",\\\"comp\\\" + listContainer.id + \\\"ClonedNode\\\" + count);\\r\\n\\t\\t\\t\\t\\tlistContainer.appendChild(clonedNode);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrItems.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tclonedNode = arrItems[count][this.__nsList.__fieldItem];\\r\\n\\t\\t\\t\\t\\tlistContainer.appendChild(clonedNode);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tlistContainer.style.width = containerConfiguration.width + \\\"px\\\";\\r\\n\\t\\t\\treturn listContainer;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createPlaceholder = function(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = this.util.createElement(\\\"li\\\",null,\\\"nsListEmptyItem\\\");\\r\\n\\t\\t\\tlistItem.innerHTML = \\\"<div class='nsListEmptyChild'>&nbsp;</div>\\\";\\r\\n\\t\\t\\treturn listItem;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isListItemDroppable = function(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemFromTarget(listItem);\\r\\n\\t\\t\\treturn this.__isItemDroppable(listItem,item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isListItemDraggable = function(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemFromTarget(listItem);\\r\\n\\t\\t\\treturn this.__isItemDraggable(listItem,item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__insertListItemHandler = function(container,newListItem,index,currentListItem,data)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tthis.__nsList.__addItem(arrItems,index);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__moveListItemHandler = function(container,newListItem,index,currentListItem,data)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tthis.__nsList.__moveItem(arrItems,index);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__removeListItemHandler = function(container,listItem,data)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getSelectedItems = function(target)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar list = this.__nsList;\\r\\n\\t\\t\\tvar listContainer = list.__listContainer;\\r\\n\\t\\t\\tvar index = parseInt(list.__getIndexFromTarget(target));\\r\\n\\t\\t\\tvar item = list.__getItemByIndex(index);\\r\\n\\t\\t\\tvar arrItems = [];\\r\\n\\t\\t\\tvar arrSelectedItems = list.getSelectedItems();\\r\\n\\t\\t\\tvar itemSelected = false; \\r\\n\\t\\t\\tif(arrSelectedItems && arrSelectedItems.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tempItem = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrSelectedItems.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttempItem = this.__cloneItem(arrSelectedItems[count]);\\r\\n\\t\\t\\t\\t\\tif(tempItem[list.__fieldIndex] === item[list.__fieldIndex])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titemSelected = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tarrItems.push(tempItem);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!itemSelected || !arrItems || arrItems.length === 0 || !arrItems[0])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tempItem = this.__cloneItem(item);\\r\\n\\t\\t\\t\\tarrItems = [tempItem];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrItems;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__cloneItem = function(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar list = this.__nsList;\\r\\n\\t\\t\\tvar tempItem = null;\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttempItem = this.util.cloneObject(item);\\r\\n\\t\\t\\t\\tif(list.__enableHierarchical && tempItem[list.__childField] && tempItem[list.__childField].length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrChild = tempItem[list.__childField];\\r\\n\\t\\t\\t\\t\\tvar length = arrChild.length;\\r\\n\\t\\t\\t\\t\\tvar childItem = null;\\r\\n\\t\\t\\t\\t\\tvar tempChildItem = null;\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tchildItem = arrChild[count];\\r\\n\\t\\t\\t\\t\\t\\ttempChildItem = this.__cloneItem(childItem);\\r\\n\\t\\t\\t\\t\\t\\tif(tempChildItem)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\ttempItem[list.__childField][count] = tempChildItem;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn tempItem;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getItemFromTarget = function(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar itemIndex = this.__nsList.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\treturn this.__nsList.__getItemByIndex(itemIndex);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isItemDraggable = function(listItem,item) \\r\\n\\t    {\\r\\n\\t\\t\\tvar retValue = true;\\r\\n\\t\\t\\tif(this.__disableDraggableFunction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = this.__disableDraggableFunction(item,this.__nsList.__labelField,item[this.__nsList.__fieldIndex],item[this.__nsList.__fieldDisableHover],listItem);\\r\\n\\t\\t\\t\\tretValue = !retValue;\\r\\n\\t\\t\\t}\\r\\n\\t    \\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isItemDroppable = function(event) \\r\\n\\t    {\\r\\n\\t\\t\\tvar retValue = true;\\r\\n\\t\\t\\tif(this.__disableDropableFunction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\t\\ttarget = this.util.findParent(target,\\\"li\\\");\\r\\n\\t\\t\\t\\tvar index = this.__nsList.__getIndexFromTarget(target);\\r\\n\\t\\t\\t\\tvar item = this.__nsList.__getItemByIndex(index);\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue = this.__disableDropableFunction(item,this.__nsList.__labelField,item[this.__nsList.__fieldIndex],item[this.__nsList.__fieldDisableHover],target);\\r\\n\\t\\t\\t\\t\\tretValue = !retValue;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t    \\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\treturn NSList;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSList\\\",NSList);\\r\\n\\\"use strict\\\";\\r\\nvar NSFilter = (function()\\r\\n{\\r\\n\\tfunction NSFilter(data,filter,setting,recordLimit,isHierarchical,childField,filterFunction,hierarchyFilterChildren,arrIgnoreKeysInCloneDataSource) \\r\\n\\t{\\r\\n\\t\\tthis.EXACT = \\\"exact\\\";\\r\\n\\t\\tthis.STARTS_WITH = \\\"startsWith\\\";\\r\\n\\t\\tthis.ENDS_WITH = \\\"endsWith\\\";\\r\\n\\t\\tthis.CONTAINS = \\\"contains\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.IS_FOUND_FIELD = \\\"__nsFilter__found\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__data = data;\\r\\n\\t\\tthis.__filter = filter;\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__recordLimit = (parseInt(recordLimit) > 0) ? recordLimit : -1;\\r\\n\\t\\tthis.__isHierarchical = this.util.isUndefined(isHierarchical) ? false : Boolean.parse(isHierarchical);\\r\\n\\t\\tthis.__childField = childField ? childField : \\\"children\\\";\\r\\n\\t\\tthis.__filterFunction = filterFunction;\\r\\n\\t\\tthis.__hierarchyFilterChildren = hierarchyFilterChildren;\\r\\n\\t\\tthis.__arrIgnoreKeysInCloneDataSource = arrIgnoreKeysInCloneDataSource;\\r\\n\\t\\tthis.__ignoreSameLevelNode = true;\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSFilter.prototype.execute = function(data,filter,setting,recordLimit,isHierarchical,childField,filterFunction,hierarchyFilterChildren,arrIgnoreKeysInCloneDataSource) \\r\\n\\t{ \\r\\n\\t\\tdata = data ? data : this.__data;\\r\\n\\t\\tfilter = filter ? filter : this.__filter;\\r\\n\\t\\tsetting = setting ? setting : this.__setting;\\r\\n\\t\\trecordLimit = (parseInt(recordLimit) > 0) ? recordLimit : this.__recordLimit;\\r\\n\\t\\tisHierarchical = this.util.isUndefined(isHierarchical) ? Boolean.parse(this.__isHierarchical) : Boolean.parse(isHierarchical);\\r\\n\\t\\tchildField = childField ? childField : this.__childField;\\r\\n\\t\\tfilterFunction = filterFunction ? filterFunction : this.__filterFunction;\\r\\n\\t\\thierarchyFilterChildren = hierarchyFilterChildren ? hierarchyFilterChildren : this.__hierarchyFilterChildren;\\r\\n\\t\\tarrIgnoreKeysInCloneDataSource = this.util.isUndefinedOrNull(arrIgnoreKeysInCloneDataSource) ? this.__arrIgnoreKeysInCloneDataSource : arrIgnoreKeysInCloneDataSource;\\r\\n\\t\\tif(data && filter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar dataSource = data.slice(0);\\r\\n\\t\\t\\tvar arrFilter = [];\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar callFilterFunction = function(source,level,parentItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\t\\tfor (var count = 0; count < source.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\t\\tvar found = false;\\r\\n\\t\\t\\t\\t\\tif(isHierarchical && item[childField] && item[childField].length > 0 )\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrChild = callFilterFunction(item[childField],level + 1,item);\\r\\n\\t\\t\\t\\t\\t\\tif(arrChild && arrChild.length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tfound = true;\\r\\n\\t\\t\\t\\t\\t\\t\\tif(self.__ignoreSameLevelNode)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t            item[childField] = arrChild;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(!found && self.__filterItem(item,filter,setting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(isHierarchical && hierarchyFilterChildren)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar arrChildren = item[childField];\\r\\n\\t\\t\\t\\t\\t\\t\\tif(arrChildren && arrChildren.length > 0)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar childItem = null;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar childLength = arrChildren.length;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tfor(var childCount = childLength - 1;childCount > -1;childCount--)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tchildItem = arrChildren[childCount];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif(childItem)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(!hierarchyFilterChildren(childItem,childCount,childItem[self.IS_FOUND_FIELD],filter,setting,item))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tarrChildren.splice(childCount, 1);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tfound = true;\\r\\n\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t\\tif(!isHierarchical && recordLimit > 0 && arrReturn.length >= recordLimit)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//return false;\\r\\n\\t\\t\\t\\treturn arrReturn;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar callNonHierarchicalFilterFunction = function(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\t\\tfor (var count = 0; count < source.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\t\\tif(self.__filterItemNonHierarchical(item,filter,setting,filterFunction))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn arrReturn;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tdataSource = this.util.cloneObject(dataSource,isHierarchical,[],arrIgnoreKeysInCloneDataSource);\\r\\n\\t\\t\\tif(isHierarchical)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrFilter = callFilterFunction(dataSource,1,null);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrFilter = callNonHierarchicalFilterFunction(dataSource);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrFilter;\\r\\n\\t\\t}\\r\\n\\t\\treturn data;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterItemNonHierarchical = function(item,filter,setting,filterFunction) \\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tif(filterFunction)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = filterFunction(item,filter,setting);\\r\\n\\t\\t\\tthis.__setItem(item,retValue);\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t}\\r\\n\\t\\telse if(filter instanceof Function) \\r\\n\\t    {\\r\\n\\t\\t\\tretValue = filter(item,setting);\\r\\n\\t        this.__setItem(item,retValue);\\r\\n\\t        return retValue;\\r\\n\\t    }\\r\\n\\t    else if(filter instanceof Array) \\r\\n\\t    {\\r\\n\\t        for (var count = 0; count < filter.length; ++count) \\r\\n\\t        {\\r\\n\\t            if (this.__filterItemNonHierarchical(item,filter[count],setting,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\tthis.__setItem(item,true);\\r\\n\\t            \\treturn true;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    }\\r\\n\\t    else if(setting.type === \\\"date\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterDate(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if(typeof(item) === \\\"string\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterString(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if (item === item + 0 && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterNumeric(item,filter);\\r\\n\\t    }\\r\\n\\t    else if(typeof (filter) === \\\"object\\\") \\r\\n\\t    {\\r\\n\\t        for(var key in filter) \\r\\n\\t        {\\r\\n\\t        \\tvar tempSetting = {};\\r\\n\\t        \\tif(setting && setting[key])\\r\\n\\t        \\t{\\r\\n\\t        \\t\\ttempSetting = setting[key];\\r\\n\\t        \\t}\\r\\n\\t            if(!this.__filterItemNonHierarchical(item[key],filter[key],tempSetting,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\treturn false;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        this.__setItem(item,true);\\r\\n\\t        return true;\\r\\n\\t    }\\r\\n\\t\\tretValue = (filter == item);\\r\\n\\t    this.__setItem(item,retValue);\\r\\n\\t    return retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterItem = function(item,filter,setting,isHierarchical,childField,parentItem,filterFunction) \\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tif(filterFunction)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = filterFunction(item,filter,setting,isHierarchical,childField,parentItem);\\r\\n\\t\\t\\tthis.__setItem(item,retValue);\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t}\\r\\n\\t\\telse if(filter instanceof Function) \\r\\n\\t    {\\r\\n\\t\\t\\tretValue = filter(item,setting);\\r\\n\\t        this.__setItem(item,retValue);\\r\\n\\t        return retValue;\\r\\n\\t    }\\r\\n\\t    else if(filter instanceof Array) \\r\\n\\t    {\\r\\n\\t        for (var count = 0; count < filter.length; ++count) \\r\\n\\t        {\\r\\n\\t            if (this.__filterItem(item,filter[count],setting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\tthis.__setItem(item,true);\\r\\n\\t            \\treturn true;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    }\\r\\n\\t    else if(setting.type === \\\"date\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterDate(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if(typeof(item) === \\\"string\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterString(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if (item === item + 0 && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterNumeric(item,filter);\\r\\n\\t    }\\r\\n\\t    else if(typeof (filter) === \\\"object\\\") \\r\\n\\t    {\\r\\n\\t        for(var key in filter) \\r\\n\\t        {\\r\\n\\t        \\tif(isHierarchical && key === childField)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tcontinue;\\r\\n\\t        \\t}\\r\\n\\t        \\tvar tempSetting = {};\\r\\n\\t        \\tif(setting && setting[key])\\r\\n\\t        \\t{\\r\\n\\t        \\t\\ttempSetting = setting[key];\\r\\n\\t        \\t}\\r\\n\\t            if(!this.__filterItem(item[key],filter[key],tempSetting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\treturn false;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        this.__setItem(item,true);\\r\\n\\t        return true;\\r\\n\\t    }\\r\\n\\t\\tretValue = (filter == item);\\r\\n\\t    this.__setItem(item,retValue);\\r\\n\\t    return retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__setItem = function(item,isFound)\\r\\n\\t{\\r\\n\\t\\tif(item && typeof (item) === \\\"object\\\" && isFound)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem[this.IS_FOUND_FIELD] = true;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterNumeric= function(value,searchParam)\\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tvalue = parseFloat(value);\\r\\n\\t\\tif(!isNaN(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(/<=/.test(searchParam)) // first checks if there is an operator (<,>,<=,>=)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value <= parseFloat(searchParam.replace(/<=/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/>=/.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value >= parseFloat(searchParam.replace(/>=/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/</.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value < parseFloat(searchParam.replace(/</,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/>/.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value > parseFloat(searchParam.replace(/>/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value === parseFloat(searchParam));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterDate= function(value,searchParam,setting)\\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar matchValue = function(compareValue,opt)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compValue = false;\\r\\n\\t\\t\\tif(self.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar newVal = self.__getDate(value,setting.cellFormat);\\r\\n\\t\\t\\t\\tif(newVal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tnewVal.setHours(0, 0, 0, 0);\\r\\n\\t\\t\\t\\t\\tcompareValue.setHours(0, 0, 0, 0);\\r\\n\\t\\t\\t\\t\\tswitch(opt)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"equals\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() === newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"greaterThan\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() < newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"lessThan\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() > newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"notEqual\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() != newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.util.warning(\\\"NSFilter\\\",value + \\\" cannot be converted to date Object for given cell format\\\");\\r\\n\\t\\t\\t\\t\\tcompValue = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn compValue;\\r\\n\\t\\t};\\r\\n\\t\\tvar processDate = function(date,type)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compValue = false;\\r\\n\\t\\t\\tif(date && matchType1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!date || !Object.prototype.toString.call(date) === '[object Date]')\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(setting.comparator)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = setting.comparator(value,date,setting);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = matchValue(date,type);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn compValue;\\r\\n\\t\\t};\\r\\n\\t\\tif(setting.matchType1 || setting.matchType2)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar matchType1 = setting.matchType1;\\r\\n\\t\\t\\tvar firstDate = setting.firstDate;\\r\\n\\t\\t\\tvar operation = setting.operation;\\r\\n\\t\\t\\tvar matchType2 = setting.matchType2;\\r\\n\\t\\t\\tvar secondDate = setting.secondDate;\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(firstDate && secondDate && matchType1 && matchType2 && operation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar firstVal = processDate(firstDate,matchType1);\\r\\n\\t\\t\\t\\tvar secondVal = processDate(secondDate,matchType2);\\r\\n\\t\\t\\t\\tswitch(operation)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcase \\\"and\\\":\\r\\n\\t\\t\\t\\t\\t\\tretValue = (firstVal && secondVal);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase \\\"or\\\":\\r\\n\\t\\t\\t\\t\\t\\tretValue = (firstVal || secondVal);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(firstDate && matchType1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = processDate(firstDate,matchType1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(secondDate && matchType2)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = processDate(secondDate,matchType2);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!searchParam || !Object.prototype.toString.call(searchParam) === '[object Date]')\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(setting.comparator)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = setting.comparator(value,searchParam,setting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = matchValue(searchParam,\\\"equals\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterString= function(value,searchParam,setting)\\r\\n\\t{\\r\\n\\t\\tvar regExp = null;\\r\\n\\t\\tvar regExpModifier = \\\"g\\\";\\r\\n\\t\\tvar startWithChar = \\\"(^)\\\";\\r\\n\\t\\tvar endsWithChar = \\\"($)\\\";\\r\\n\\t\\tvar searchString = \\\"\\\";\\r\\n\\t\\tvar isCaseSensitive = false;\\r\\n\\t\\tvar isMultiline = false;\\r\\n\\t\\tvar matchType = this.CONTAINS;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisCaseSensitive = Boolean.parse(setting[\\\"caseSensitive\\\"]);\\r\\n\\t\\t\\tisMultiline = Boolean.parse(setting[\\\"multiline\\\"]);\\r\\n\\t\\t\\tmatchType = setting[\\\"matchType\\\"] ? setting[\\\"matchType\\\"] : matchType;\\r\\n\\t\\t}\\r\\n\\t\\tif(!isCaseSensitive)\\r\\n\\t\\t{\\r\\n\\t\\t\\tregExpModifier += \\\"i\\\";\\r\\n\\t\\t}\\r\\n\\t\\tif(isMultiline)\\r\\n\\t\\t{\\r\\n\\t\\t\\tregExpModifier += \\\"m\\\";\\r\\n\\t\\t}\\r\\n\\t\\tsearchParam = this.__removeSpecialCharacter(searchParam);\\r\\n\\t\\tif(matchType === this.EXACT)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = startWithChar + searchParam + endsWithChar;\\r\\n\\t\\t}\\r\\n\\t\\telse if(matchType === this.STARTS_WITH)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = startWithChar + searchParam;\\r\\n\\t\\t}\\r\\n\\t\\telse if(matchType === this.ENDS_WITH)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = searchParam + endsWithChar;\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = searchParam;\\r\\n\\t\\t}\\r\\n\\t\\tregExp = new RegExp(searchString,regExpModifier);\\r\\n\\t\\treturn regExp.test(value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__removeSpecialCharacter = function(text)\\r\\n\\t{\\r\\n\\t\\tfunction replaceEscape(char)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(text)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar exp = new RegExp(\\\"\\\\\\\\\\\" + char,\\\"g\\\");\\r\\n\\t\\t\\t\\ttext = text.replace(exp,\\\"\\\\\\\\\\\" + char);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar specialChar = ['\\\\\\\\','[','^','$','.','|','?','*','+','(',')'];\\r\\n\\t\\tfor(var count = 0;count < specialChar.length;count++) \\r\\n\\t\\t{\\r\\n\\t\\t\\treplaceEscape(specialChar[count]);\\r\\n\\t\\t}\\r\\n\\t\\treturn text;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//ref from : https://stackoverflow.com/questions/7445328/check-if-a-string-is-a-date-value\\r\\n\\tNSFilter.prototype.__getDate = function(value,arrFormat) \\r\\n\\t{\\r\\n\\t\\tif(value)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar dateFormat;\\r\\n\\t\\t    if (Object.prototype.toString.call(value) === '[object Date]') \\r\\n\\t\\t    {\\r\\n\\t\\t        return value;\\r\\n\\t\\t    }\\r\\n\\t\\t    if(arrFormat)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar dateUtil = new NSDateUtil();\\r\\n\\t\\t    \\tif(!this.util.isArray(arrFormat))\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tarrFormat = [arrFormat];\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tfor(var count = 0;count < arrFormat.length;count++)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tvar format = arrFormat[count];\\r\\n\\t\\t    \\t\\tvar date = dateUtil.parseString(value,format);\\r\\n\\t\\t    \\t\\tif(date)\\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\treturn date;\\r\\n\\t\\t    \\t\\t}\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    }\\r\\n\\t\\t    else\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tif (typeof value.replace === 'function') \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t        value.replace(/^\\\\s+|\\\\s+$/gm, '');\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    dateFormat = /(^\\\\d{1,4}[\\\\.|\\\\\\\\/|-]\\\\d{1,2}[\\\\.|\\\\\\\\/|-]\\\\d{1,4})(\\\\s*(?:0?[1-9]:[0-5]|1(?=[012])\\\\d:[0-5])\\\\d\\\\s*[ap]m)?$/;\\r\\n\\t\\t\\t    if(dateFormat.test(value))\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\treturn new Date(value);//Date.parse(value);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t    return null;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSFilter;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSFilter\\\",NSFilter);var NSTextBox = (function()\\r\\n{\\r\\n\\tfunction NSTextBox(component,setting) \\r\\n\\t{\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__outerContainer = null;\\r\\n\\t\\tthis.__textBox = null;\\r\\n\\t\\tthis.__list = null;\\r\\n\\t\\tthis.__nsList = null;\\r\\n\\t\\tthis.__nsGrid = null;\\r\\n\\t\\tthis.__renderer =  null;\\r\\n\\t\\tthis.__itemRenderer = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__context = window;\\r\\n\\t\\tthis.__dataSource = null;\\r\\n\\t\\tthis.__type = \\\"text\\\";\\r\\n\\t\\tthis.__enableAutoComplete = false;\\r\\n\\t\\tthis.__dropDownType = NSTextBox.DROPDOWN_TYPE_LIST;\\r\\n\\t\\tthis.__minChars = -1;\\r\\n\\t\\tthis.__maxChars = -1;\\r\\n\\t\\tthis.__minSearchStartChars = 1;\\r\\n\\t\\tthis.__caseSensitive = true;\\r\\n\\t\\tthis.__required = false;\\r\\n\\t\\tthis.__placeholder = null;\\r\\n\\t\\tthis.__displayAsPassword = false;\\r\\n\\t\\tthis.__enableServerSide = false;\\r\\n\\t\\tthis.__enableServerWithSmartSearch = false;\\r\\n\\t\\tthis.__delay = 150;\\r\\n\\t\\tthis.__listWidth = -1;\\r\\n\\t\\tthis.__maxListHeight = 300;\\r\\n\\t\\tthis.__noRecordsFoundMessage = \\\"No Records Found\\\";\\r\\n\\t\\t//can be [a-zA-Z0-9,-]\\r\\n\\t\\tthis.__restrict = null;\\r\\n\\t\\tthis.__pattern = null;\\r\\n\\t\\tthis.__styleClass = null;\\r\\n\\t\\tthis.__dropDownSetting = null;\\r\\n\\t\\tthis.__serverSearchCallback = null;\\r\\n\\t\\tthis.__textBoxRendererCallback = null;\\r\\n\\t\\t/* arrGridSearchField used when type = \\\"autocomplete\\\" and dropDownType = NSTextBox.DROPDOWN_TYPE_GRID */\\r\\n\\t\\tthis.__arrGridSearchField = null;\\r\\n\\t\\tthis.__isGridOrFilter = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.__labelField = \\\"label\\\";\\r\\n\\t\\tthis.__stopHoveringField = \\\"stopHover\\\";\\r\\n\\t\\tthis.__labelFunction = null;\\r\\n\\t\\tthis.__templateID = null;\\r\\n\\t\\tthis.__setDataCallBack = null;\\r\\n\\t\\tthis.__enableKeyboardNavigation = false;\\r\\n\\t\\tthis.__enableMultipleSelection = false;\\r\\n\\t\\tthis.__multiSelectionSeparator = \\\";\\\";\\r\\n\\t\\tthis.__filterSetting = {};\\r\\n\\t\\tthis.__enableHighlighting = false;\\r\\n\\t\\tthis.__searchRecordLimit = -1;\\r\\n\\t\\t//temp merging Manish's code\\r\\n\\t\\tthis.__splitSearchType = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__selectedItem = null;\\r\\n\\t\\tthis.__selectedItems = [];\\t\\r\\n\\t\\tthis.__timerInstance = null;\\r\\n\\t\\tthis.__isFromItemSelected = false;\\r\\n\\t\\tthis.__isFromCloseIcon = false;\\r\\n\\t\\tthis.__isFromSearchTextSever = false;\\r\\n\\t\\tthis.__lastNavigatedItem = {};\\r\\n\\t\\tthis.__lastSearchParam = \\\"\\\";\\r\\n\\t\\t\\r\\n\\t\\t\\r\\n\\t\\tthis.__keyPressedRef = null;\\r\\n\\t\\tthis.__pasteRef = null;\\r\\n\\t\\tthis.__documentClickRef = null;\\r\\n\\t\\tthis.__documentKeyUpRef = null;\\r\\n\\t\\tthis.__documentKeyDownRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component);\\r\\n\\t};\\r\\n\\tnsExtendPrototype(NSContainerBase,NSTextBox);\\r\\n\\tNSTextBox.prototype.constructor = NSTextBox;\\r\\n\\t\\r\\n\\tNSTextBox.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t\\tthis.__createComponents();\\r\\n\\t\\tthis.__setTextBoxProperty();\\r\\n\\t\\tif(this.__dataSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.dataSource(this.__dataSource);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tvar callTextProperty = false;\\r\\n\\t\\tif(attributeName === \\\"maxchars\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__maxChars =  parseInt(newVal);\\r\\n\\t\\t\\tcallTextProperty = true;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"minchars\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__minChars =  parseInt(newVal);\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"minsearchstartchars\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__minSearchStartChars =  parseInt(newVal);\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"casesensitive\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__caseSensitive = Boolean.parse(newVal);\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"required\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__required = Boolean.parse(newVal);\\r\\n\\t\\t\\tcallTextProperty = true;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"placeholder\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__placeholder = newVal;\\r\\n\\t\\t\\tcallTextProperty = true;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"delay\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__delay =  parseInt(newVal);\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"maxlistheight\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__maxListHeight =  parseInt(newVal);\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"listwidth\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__listWidth =  parseInt(newVal);\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"labelfield\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__labelField = newVal;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"labelfunction\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__labelFunction = newVal;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"enablemultipleselection\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__enableMultipleSelection =  Boolean.parse(newVal);\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"enablekeyboardnavigation\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__enableKeyboardNavigation =  Boolean.parse(newVal);\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"norecordsfoundmessage\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__noRecordsFoundMessage = newVal;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"multiselectionseparator\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__multiSelectionSeparator = newVal;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"pattern\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__pattern = newVal;\\r\\n\\t\\t\\tcallTextProperty = true;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"restrict\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__restrict = newVal;\\r\\n\\t\\t\\tif(this.util.isValueNull(this.__restrict))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__restrict = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t/*else\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__restrict = \\\"[\\\" + this.__restrict + \\\"]\\\";\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t\\tcallTextProperty = true;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"styleclass\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__styleClass = newVal;\\r\\n\\t\\t\\tcallTextProperty = true;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"filtersetting\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__filterSetting =  newVal;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"enablehighlighting\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__enableHighlighting =  Boolean.parse(newVal);\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"searchrecordlimit\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__searchRecordLimit =  parseInt(newVal);\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName === \\\"splitsearchtype\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__splitSearchType =  newVal;\\r\\n\\t\\t}\\r\\n\\t\\tif(callTextProperty)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setTextBoxProperty();\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.dataSource = function(dataSource)\\r\\n\\t{\\r\\n\\t\\tthis.__dataSource = dataSource;\\r\\n\\t\\tif(this.__enableAutoComplete)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setListDataSource(this.__dataSource);\\r\\n\\t\\t\\tif(this.__isFromSearchTextSever)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__isFromSearchTextSever = false;\\r\\n\\t\\t\\t\\tthis.__searchText(this.__getSearchText(this.__textBox.value),true);\\r\\n\\t\\t\\t\\tthis.__showHideList(true);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__documentClickRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__documentClickRef = this.__documentClickHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(document,\\\"click\\\",this.__documentClickRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableMultipleSelection)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.__documentKeyUpRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__documentKeyUpRef = this.__documentKeyUpHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document.body,\\\"keyup\\\",this.__documentKeyUpRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__documentKeyDownRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__documentKeyDownRef = this.__documentKeyDownHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document.body,\\\"keydown\\\",this.__documentKeyDownRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.__updateListPos();\\r\\n\\t\\tthis.base.componentResized(event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__documentClickRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"click\\\",this.__documentClickRef);\\r\\n\\t\\t\\tthis.__documentClickRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__documentKeyUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document.body,\\\"keyup\\\",this.__documentKeyUpRef);\\r\\n\\t\\t\\tthis.__documentKeyUpRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__keyDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document.body,\\\"keydown\\\",this.__documentKeyDownRef);\\r\\n\\t\\t\\tthis.__documentKeyDownRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tvar control = this.__getNSControl();\\r\\n\\t\\tif(control && control.removeComponent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcontrol.removeComponent.call(control);\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.getTextBox = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__textBox;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.setText = function(text)\\r\\n\\t{\\r\\n\\t\\tif(this.__textBox)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(text && this.__maxChars > -1 && text.length > this.__maxChars)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttext = text.substring(0, this.__maxChars);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__textBox.value = text;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.getText = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__textBox)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__textBox.value;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.setSelectedItems = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tif(this.__getNSControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__getNSControl().setSelectedItems(arrItems);\\r\\n\\t\\t}\\r\\n\\t\\t//this.setText();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.setSelectedItem = function(item)\\r\\n\\t{\\r\\n\\t\\tif(this.__getNSControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__getNSControl().setSelectedItem(item);\\r\\n\\t\\t}\\r\\n\\t\\t//this.setText();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.setSelectedIndexes = function(arrSelectedIndex)\\r\\n\\t{\\r\\n\\t\\tif(this.__getNSControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__getNSControl().setSelectedIndexes(arrSelectedIndex);\\r\\n\\t\\t}\\r\\n\\t\\t//this.setText();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.setSelectedIndex = function(selectedIndex)\\r\\n\\t{\\r\\n\\t\\tif(this.__getNSControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__getNSControl().setSelectedIndex(selectedIndex);\\r\\n\\t\\t}\\r\\n\\t\\t//this.setText();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.unSelectItems = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tif(this.__getNSControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__getNSControl().unSelectItems(arrItems);\\r\\n\\t\\t}\\r\\n\\t\\t//this.setText();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.unSelectItem = function(item)\\r\\n\\t{\\r\\n\\t\\tif(this.__getNSControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__getNSControl().unSelectItem(item);\\r\\n\\t\\t}\\r\\n\\t\\t//this.setText();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.unSelectIndexes = function(arrSelectedIndex)\\r\\n\\t{\\r\\n\\t\\tif(this.__getNSControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__getNSControl().unSelectIndexes(arrSelectedIndex);\\r\\n\\t\\t}\\r\\n\\t\\t//this.setText();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.unSelectIndex = function(selectedIndex)\\r\\n\\t{\\r\\n\\t\\tif(this.__getNSControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__getNSControl().unSelectIndexes(selectedIndex);\\r\\n\\t\\t}\\r\\n\\t\\t//this.setText();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.unSelectAll = function(fireEvent)\\r\\n\\t{\\r\\n\\t\\t/*if(this.__getNSControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__getNSControl().unSelectIndexes(selectedIndex);\\r\\n\\t\\t}*/\\r\\n\\t\\tthis.setText(null);\\r\\n\\t\\tif(fireEvent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__itemUnSelectHandler();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//IMPORTANT:: not exposing getSelectedIndex and getSelectedIndexes as it will be relative to filtered dataSource\\r\\n\\tNSTextBox.prototype.getSelectedItem = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.getSelectedItems = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__getNSControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__getNSControl().getSelectedItems();\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__selectedItems;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tvar setting = this.__setting;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"type\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__type = setting[\\\"type\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"context\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__context = setting[\\\"context\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"dropDownType\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dropDownType = setting[\\\"dropDownType\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"maxChars\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__maxChars = parseInt(setting[\\\"maxChars\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minChars\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minChars = parseInt(setting[\\\"minChars\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minSearchStartChars\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minSearchStartChars = parseInt(setting[\\\"minSearchStartChars\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"caseSensitive\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__caseSensitive = Boolean.parse(setting[\\\"caseSensitive\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"required\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__required = Boolean.parse(setting[\\\"required\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"placeholder\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__placeholder = setting[\\\"placeholder\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"displayAsPassword\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__displayAsPassword = Boolean.parse(setting[\\\"displayAsPassword\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableServerSide\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableServerSide = Boolean.parse(setting[\\\"enableServerSide\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableServerWithSmartSearch\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableServerWithSmartSearch = Boolean.parse(setting[\\\"enableServerWithSmartSearch\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"serverSearchCallback\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__serverSearchCallback = setting[\\\"serverSearchCallback\\\"];\\r\\n\\t\\t\\t\\tif (typeof this.__serverSearchCallback === \\\"string\\\" || this.__serverSearchCallback instanceof String)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.util.isFunction(this.__serverSearchCallback))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__serverSearchCallback = this.__context[this.__serverSearchCallback];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"textBoxRendererCallback\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__textBoxRendererCallback = setting[\\\"textBoxRendererCallback\\\"];\\r\\n\\t\\t\\t\\tif (typeof this.__textBoxRendererCallback === \\\"string\\\" || this.__textBoxRendererCallback instanceof String)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.util.isFunction(this.__textBoxRendererCallback))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__textBoxRendererCallback = this.__context[this.__textBoxRendererCallback];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"delay\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__delay =  parseInt(setting[\\\"delay\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"maxListHeight\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__maxListHeight =  parseInt(setting[\\\"maxListHeight\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"listWidth\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__listWidth =  parseInt(setting[\\\"listWidth\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"labelField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__labelField = setting[\\\"labelField\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"arrGridSearchField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__arrGridSearchField = setting[\\\"arrGridSearchField\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"isGridOrFilter\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__isGridOrFilter = setting[\\\"isGridOrFilter\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"stopHoveringField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__stopHoveringField = setting[\\\"stopHoveringField\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"labelFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__labelFunction = setting[\\\"labelFunction\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"template\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__templateID = setting[\\\"template\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"setDataCallBack\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__setDataCallBack = setting[\\\"setDataCallBack\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"itemRenderer\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__itemRenderer = setting[\\\"itemRenderer\\\"];\\r\\n\\t\\t\\t\\tif (typeof this.__itemRenderer === \\\"string\\\" || this.__itemRenderer instanceof String)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.util.isFunction(this.__itemRenderer))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__itemRenderer = this.__context[this.__itemRenderer];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMultipleSelection\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMultipleSelection =  Boolean.parse(setting[\\\"enableMultipleSelection\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableKeyboardNavigation\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableKeyboardNavigation =  Boolean.parse(setting[\\\"enableKeyboardNavigation\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"noRecordsFoundMessage\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__noRecordsFoundMessage =  setting[\\\"noRecordsFoundMessage\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"multiSelectionSeparator\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__multiSelectionSeparator =  setting[\\\"multiSelectionSeparator\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"pattern\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__pattern =  setting[\\\"pattern\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"restrict\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__restrict =  setting[\\\"restrict\\\"];\\r\\n\\t\\t\\t\\tif(this.__restrict)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t//this.__restrict = \\\"[\\\" + this.__restrict + \\\"]\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"dataSource\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dataSource = setting[\\\"dataSource\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"styleClass\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__styleClass = setting[\\\"styleClass\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"dropDownSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dropDownSetting = setting[\\\"dropDownSetting\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"filterSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__filterSetting = setting[\\\"filterSetting\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableHighlighting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableHighlighting = Boolean.parse(setting[\\\"enableHighlighting\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"searchRecordLimit\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__searchRecordLimit = parseInt(setting[\\\"searchRecordLimit\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"splitSearchType\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__splitSearchType =  setting[\\\"splitSearchType\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__createComponents = function() \\r\\n\\t{\\r\\n\\t\\tif(!this.__outerContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__applyTipToCoreComp = true;\\r\\n\\t\\t\\tthis.__outerContainer = this.util.createDiv(this.getID() + \\\"#container\\\",\\\"nsTextBoxContainer\\\");\\r\\n\\t\\t\\tthis.addChild(this.__outerContainer);\\r\\n\\t\\t\\tthis.__textBox = this.util.createElement(\\\"INPUT\\\",this.getID()+ \\\"#textBox\\\",\\\"nsTextBox\\\");\\r\\n\\t\\t\\tthis.__textBox.setAttribute(\\\"type\\\", this.__getType());\\r\\n\\t\\t\\tthis.util.addEvent(this.__textBox,\\\"blur\\\",this.__textBoxFocusOutHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(this.__textBox,\\\"focus\\\",this.__focusInHandler.bind(this));\\r\\n\\t\\t\\t//this.util.addEvent(this.__textBox,\\\"search\\\",this.__searchHandler.bind(this));\\r\\n\\t\\t\\tif(this.__enableAutoComplete)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__outerContainer,\\\"nsTextBoxContainerAutoComplete\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__textBox,\\\"nsTextBoxAutoComplete\\\");\\r\\n\\t\\t\\t\\tthis.__textBox.setAttribute(\\\"autocomplete\\\",\\\"off\\\");\\r\\n\\t\\t\\t\\tif(this.__enableMultipleSelection)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__textBox,\\\"keyup\\\",this.__keyUpMultiSelectionHandler.bind(this));\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__textBox,\\\"keydown\\\",this.__keyDownMultiSelectionHandler.bind(this));\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(this.__outerContainer,\\\"nsTextBoxMultiSelectContainer\\\");\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__outerContainer,\\\"click\\\",this.__outerContainerClickHandler.bind(this));\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(this.__textBox,\\\"nsTextBoxMultiSelect\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__textBox,\\\"keyup\\\",this.__keyUpHandler.bind(this));\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__textBox,\\\"keydown\\\",this.__keyDownHandler.bind(this));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__outerContainer.appendChild(this.__textBox);\\r\\n\\t\\t\\tthis.__createList();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__getType = function()\\r\\n\\t{\\r\\n\\t\\tvar textBoxType = \\\"text\\\";\\r\\n\\t\\tif(this.__type)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__type ===  NSTextBox.TYPE_AUTOCOMPLETE)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttextBoxType = \\\"search\\\";\\r\\n\\t\\t\\t\\tthis.__enableAutoComplete = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__displayAsPassword)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttextBoxType = \\\"password\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__type ===  NSTextBox.TYPE_AUTOTEXT || this.__type ===  NSTextBox.TYPE_EMAIL || this.__type ===  NSTextBox.TYPE_NUMBER || this.__type ===  NSTextBox.TYPE_PASSWORD || this.__type ===  NSTextBox.TYPE_URL)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttextBoxType = this.__type;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn textBoxType;\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__setTextBoxProperty = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__textBox)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__required)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__textBox.setAttribute(\\\"required\\\", \\\"\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__textBox.removeAttribute(\\\"required\\\");   \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__placeholder && this.__placeholder.length > 0 && !this.__enableMultipleSelection)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__textBox.setAttribute(\\\"placeholder\\\", this.__placeholder);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__textBox.removeAttribute(\\\"placeholder\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__maxChars > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__textBox.setAttribute(\\\"maxLength\\\", this.__maxChars);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__pattern)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__textBox.setAttribute(\\\"pattern\\\", this.__pattern);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__textBox.removeAttribute(\\\"pattern\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__styleClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__setStyleClass(this.__styleClass);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__restrict)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.__keyPressedRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__keyPressedRef = this.__keyPressHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__textBox,\\\"keypress\\\",this.__keyPressedRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__pasteRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__pasteRef = this.__pasteHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__textBox,\\\"paste\\\",this.__pasteRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__keyPressedRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(this.__textBox,\\\"keypress\\\",this.__keyPressedRef);\\r\\n\\t\\t\\t\\t\\tthis.__keyPressedRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__pasteRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(this.__textBox,\\\"paste\\\",this.__pasteRef);\\r\\n\\t\\t\\t\\t\\tthis.__pasteRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar genericEventHandler = this.__genericTextBoxEvent.bind(this);\\r\\n\\t\\tthis.util.addEvent(this.__textBox,\\\"change\\\",genericEventHandler);\\r\\n\\t\\tthis.util.addEvent(this.__textBox,\\\"input\\\",this.__searchHandler.bind(this));\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__setStyleClass = function(cssClass)\\r\\n\\t{\\r\\n\\t\\tif(cssClass && cssClass.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__textBox.setAttribute(\\\"class\\\",\\\"\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__textBox,cssClass);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__outerContainerClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__textBox.focus();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__documentKeyUpHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar keyCode = this.util.getKeyUnicode(event);\\r\\n\\t\\tif(this.__isFocusOnControl() && this.__enableMultipleSelection && (keyCode == this.util.KEYCODE.SHIFT || keyCode == this.util.KEYCODE.CTRL))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__multiSelectHandler();\\r\\n\\t\\t\\tthis.__hideList();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__documentKeyDownHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar keyCode = this.util.getKeyUnicode(event);\\r\\n\\t\\tif(this.__isFocusOnControl() && this.__enableMultipleSelection && (keyCode == this.util.KEYCODE.BACKSPACE))\\r\\n\\t\\t{\\r\\n\\t\\t\\t var arrSelectedItems = this.getSelectedItems();\\r\\n\\t\\t\\t if(arrSelectedItems && arrSelectedItems.length > 0) \\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t arrSelectedItems.pop();\\r\\n\\t\\t\\t\\t if(this.__getNSControl())\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t this.setSelectedItems(arrSelectedItems);\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t this.__selectedItems = arrSelectedItems;\\r\\n\\t\\t\\t\\t this.__refreshMultiSelectTags();\\r\\n\\t         }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__keyUpHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__isFocusOnControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar keyCode = this.util.getKeyUnicode(event);\\r\\n\\t\\t\\tif (keyCode == this.util.KEYCODE.ESC) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__hideList();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if (!(keyCode == this.util.KEYCODE.UP || keyCode == this.util.KEYCODE.DOWN || keyCode == this.util.KEYCODE.ENTER || keyCode == this.util.KEYCODE.SHIFT || keyCode == this.util.KEYCODE.CTRL)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__itemUnSelectHandler(event);\\r\\n\\t\\t\\t\\tif(!this.__textBox.value || this.__textBox.value == \\\"\\\" || this.__textBox.value.length < this.__minSearchStartChars)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__hideList();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__timerInstance)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tclearTimeout(this.__timerInstance);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar compRef = this;\\r\\n\\t\\t\\t\\t\\tthis.__timerInstance = setTimeout(\\r\\n\\t\\t\\t\\t\\tfunction()\\r\\n\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\tcompRef.__searchText(compRef.__getSearchText(compRef.__textBox.value));\\r\\n\\t\\t\\t\\t\\t},this.__delay);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if (keyCode == this.util.KEYCODE.UP || keyCode == this.util.KEYCODE.DOWN)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar nsControl = this.__getNSControl();\\r\\n\\t\\t\\t\\tif(nsControl && !nsControl.hasFocus())\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tnsControl.setFocus(true);\\r\\n\\t\\t\\t\\t\\tnsControl.__setRowHover(0);\\r\\n\\t\\t\\t\\t\\tthis.__lastNavigatedItem = (nsControl.__arrInternalSource && nsControl.__arrInternalSource.length > 0) ? nsControl.__arrInternalSource[0] : null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__keyDownHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__isFocusOnControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar keyCode = this.util.getKeyUnicode(event);\\r\\n\\t\\t\\tif(keyCode == this.util.KEYCODE.TAB)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__lastNavigatedItem)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__itemSelectHandler(null,this.__lastNavigatedItem);\\r\\n\\t\\t\\t\\t\\tthis.__lastNavigatedItem = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__keyUpMultiSelectionHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__isFocusOnControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar keyCode = this.util.getKeyUnicode(event);\\r\\n\\t\\t\\t//if backspace is pressed then return\\r\\n\\t\\t\\tif(keyCode == this.util.KEYCODE.BACKSPACE)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (keyCode == this.util.KEYCODE.ESC) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__hideList();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(keyCode == this.util.KEYCODE.SHIFT || keyCode == this.util.KEYCODE.CTRL)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__multiSelectHandler();\\r\\n\\t\\t\\t\\tthis.__hideList();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t//key Up\\r\\n\\t\\t\\t/*if(keyCode === this.util.KEYCODE.UP && isShiftCtrlPressed && this.__enableMultipleSelection)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//key down\\r\\n\\t\\t\\telse if(keyCode === this.util.KEYCODE.DOWN && isShiftCtrlPressed && this.__enableMultipleSelection)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t\\telse if (!(keyCode == this.util.KEYCODE.UP || keyCode == this.util.KEYCODE.DOWN || keyCode == this.util.KEYCODE.ENTER || keyCode == this.util.KEYCODE.SHIFT || keyCode == this.util.KEYCODE.CTRL)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.__textBox.value || this.__textBox.value == \\\"\\\" || this.__textBox.value.length < this.__minSearchStartChars)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__hideList();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__timerInstance)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tclearTimeout(this.__timerInstance);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar compRef = this;\\r\\n\\t\\t\\t\\t\\tthis.__timerInstance = setTimeout(\\r\\n\\t\\t\\t\\t\\tfunction()\\r\\n\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\tcompRef.__searchText(compRef.__getSearchText(compRef.__textBox.value));\\r\\n\\t\\t\\t\\t\\t},this.__delay);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__keyDownMultiSelectionHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar currentWidth = this.__textBox.offsetWidth;\\r\\n\\t\\tvar width = this.__measureString(this.__textBox,this.__textBox.value + event.key) + 4;\\r\\n\\t\\tif (width !== currentWidth) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__textBox.style.width = width + \\\"px\\\";\\r\\n\\t\\t\\tthis.__updateListPos();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__keyPressHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__isFocusOnControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar keyCode = this.util.getKeyUnicode(event);\\r\\n\\t\\t\\tvar keyPressed = String.fromCharCode(keyCode);\\r\\n\\t\\t\\tif(!this.util.checkRegexValue(this.__restrict,keyPressed))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__genericTextBoxEvent = function(event,fireForcefully)\\r\\n\\t{\\r\\n\\t\\tif(this.__isFocusOnControl() || fireForcefully)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar cancelled = this.util.dispatchEvent(this.__baseComponent,event.type,this.getText(),{changeEvent:event},null,true);\\r\\n\\t\\t\\tif(cancelled)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__documentClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar closeList = true;\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\tif(target && target === this.__textBox)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcloseList = false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar targetList = this.util.findParentBySelector(target,\\\".nsTextBoxList\\\");\\r\\n\\t\\t\\tif(targetList)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcloseList = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(closeList)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__hideList();\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSTextBox.LIST_CLOSED_WITHOUT_SELECTION,this.getText(),{changeEvent:event});\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__pasteHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar pastedText = undefined;\\r\\n\\t\\tvar text = \\\"\\\";\\r\\n\\t\\tif (this.__context.clipboardData && this.__context.clipboardData.getData) \\r\\n\\t\\t{ // IE\\r\\n\\t\\t    pastedText = this.__context.clipboardData.getData(\\\"Text\\\");\\r\\n\\t\\t} \\r\\n\\t\\telse if (event.clipboardData && event.clipboardData.getData) \\r\\n\\t\\t{\\r\\n\\t\\t    pastedText = event.clipboardData.getData(\\\"text/plain\\\");\\r\\n\\t\\t}\\r\\n\\t\\tvar pastedTextLength = pastedText.length;\\r\\n\\t\\tfor (var count = 0; count < pastedTextLength; count++) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar char = pastedText.charAt(count);\\r\\n\\t        if(this.util.checkRegexValue(this.__restrict,char))\\r\\n\\t    \\t{\\r\\n\\t        \\ttext += char;\\r\\n\\t    \\t}\\r\\n\\t    }\\r\\n\\t\\tthis.__textBox.value += text;\\r\\n\\t\\tevent.preventDefault();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__focusInHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.nsTip)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.nsTip.remove();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableAutoComplete)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__textBox.value.length >= this.__minSearchStartChars && this.__dataSource && this.__dataSource.length > 0 && !this.__isFromItemSelected && !this.__isFromCloseIcon)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__setListDataSource(this.__dataSource);\\r\\n\\t\\t\\t\\tif(this.__textBox.value.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__searchText(this.__getSearchText(this.__textBox.value));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__showHideList(true);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__isFromItemSelected = false;\\r\\n\\t\\t\\tthis.__isFromCloseIcon = false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__textBoxFocusOutHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__minChars > -1 && this.__textBox.value && this.__textBox.value.length < this.__minChars)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__textBox.setCustomValidity(\\\"Please enter atleast \\\" + this.__minChars  + \\\" characters.\\\");\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__textBox.setCustomValidity(\\\"\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__searchHandler = function(event)\\r\\n\\t{\\r\\n\\t\\t//the above code is for cross icon clicked when we enter any character\\r\\n\\t\\t//it might result in ITEM_UNSELECTED event called multiple times\\r\\n\\t\\tif(this.__enableAutoComplete && this.getSelectedItem() && this.__textBox.value == \\\"\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.unSelectAll(true);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__genericTextBoxEvent(event,true);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__searchText = function(searchString,callClientSearch)\\r\\n\\t{\\r\\n\\t\\tif(!callClientSearch && this.__isServerSideCall(searchString))\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__lastSearchParam.toLowerCase() !== searchString.substr(0,this.__minSearchStartChars).toLowerCase())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__serverSearchCallback && this.util.isFunction(this.__serverSearchCallback))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__isFromSearchTextSever = true;\\r\\n\\t\\t\\t\\t\\tvar sendString = searchString;\\r\\n\\t\\t\\t\\t\\tif(this.__enableServerWithSmartSearch)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__lastSearchParam = searchString.substr(0,this.__minSearchStartChars);\\r\\n\\t\\t\\t\\t\\t\\tsendString = this.__lastSearchParam;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__serverSearchCallback(sendString,this.__filterSetting,this.__enableHighlighting,this.__searchRecordLimit);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.throwNSError(\\\"NSTextBox\\\",\\\"ServerSearchCallback attribute doesnot have a valid value\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse if(this.__dataSource && this.__dataSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(searchString === \\\"\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//should not have been done like this but grid has method resetFilters and List has resetFilter\\r\\n\\t\\t\\t\\tvar nsControl = this.__getNSControl();\\r\\n\\t\\t\\t\\tvar resetFilter = nsControl[\\\"resetFilter\\\"] ? nsControl[\\\"resetFilter\\\"] : nsControl[\\\"resetFilters\\\"];\\r\\n\\t\\t\\t\\tresetFilter();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar control = this.__getNSControl();\\r\\n\\t\\t\\t\\tif(this.__isAutoCompleteTypeList())\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcontrol.filter(searchString,this.__filterSetting,this.__enableHighlighting,this.__searchRecordLimit);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrFilterField = this.__arrGridSearchField;\\r\\n\\t\\t\\t\\t\\tif(!arrFilterField || arrFilterField.length === 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrFilterField = [this.__labelField];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(this.__isGridOrFilter)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t var filter = [];\\r\\n\\t\\t\\t\\t\\t\\t var setting = {};\\r\\n\\t\\t\\t\\t\\t\\t for(var count = 0;count < arrFilterField.length;count++)\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t var field = arrFilterField[count];\\r\\n\\t\\t\\t\\t\\t\\t\\t if(field)\\r\\n\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t var item = {};\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t item[field] = searchString;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t setting[field] = this.__filterSetting;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t filter.push(item);\\r\\n\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar filter = {};\\r\\n\\t\\t\\t\\t\\t\\tvar setting = {};\\r\\n\\t\\t\\t\\t\\t\\tfor(var count = 0;count < arrFilterField.length;count++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar field = arrFilterField[count];\\r\\n\\t\\t\\t\\t\\t\\t\\tif(field)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tfilter[field] = searchString;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tsetting[field] = this.__filterSetting;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tcontrol.filter(filter,setting,this.__enableHighlighting,this.__searchRecordLimit);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__showHideList(true);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__isServerSideCall = function(searchString)\\r\\n\\t{\\r\\n\\t\\tif(this.__enableServerWithSmartSearch)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isSearchLength = ((searchString.length === this.__minSearchStartChars) || (searchString.length > this.__minSearchStartChars));\\r\\n\\t\\t\\tvar isContainsTempSearch = (!this.__dataSource || this.__dataSource.length == 0) || (this.__lastSearchParam.toLowerCase() !== searchString.substr(0,this.__minSearchStartChars).toLowerCase());\\r\\n\\t\\t\\treturn (isSearchLength && isContainsTempSearch);\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__enableServerSide;\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__createList = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__list)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__list = this.util.createDiv(this.getID() + \\\"list\\\",\\\"nsTextBoxList\\\");\\r\\n\\t\\t\\tthis.__list.style.height = this.__maxListHeight + \\\"px\\\";\\r\\n\\t\\t\\tthis.__outerContainer.appendChild(this.__list);\\r\\n\\t\\t\\tif(this.__isAutoCompleteTypeList())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.__nsList)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(!this.__dropDownSetting)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__dropDownSetting = {};\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar overrideSetting = {labelField:this.__labelField,enableDragDrop:false,enableDragByHandle:false,\\r\\n\\t\\t\\t\\t\\t\\t\\t   \\t   enableMultipleSelection:this.__enableMultipleSelection,enableKeyboardNavigation:this.__enableKeyboardNavigation,\\r\\n\\t\\t\\t\\t\\t\\t\\t   \\t   enableMouseHover:true,enableMouseHoverAnimation:false,disableHoverField:this.__stopHoveringField};\\r\\n\\t\\t\\t\\t\\tif(this.__templateID)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\toverrideSetting[\\\"template\\\"] = this.__templateID;\\r\\n\\t\\t\\t\\t\\t\\toverrideSetting[\\\"setData\\\"] = this.__setDataCallBack;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\toverrideSetting[\\\"itemRenderer\\\"] = this.__itemRenderer;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar setting =  this.util.cloneObject(this.__dropDownSetting);\\r\\n\\t\\t\\t\\t\\tfor(var key in overrideSetting)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetting[key] = overrideSetting[key];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__nsList = new NSList(this.__list,setting);\\r\\n\\t\\t\\t\\t\\t//this.__updateListPos();\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__list,this.__nsList.ITEM_NAVIGATED,this.__itemNavigationHandler.bind(this));\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__list,this.__nsList.ITEM_SELECTED,this.__itemSelectHandler.bind(this));\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__list,this.__nsList.ITEM_UNSELECTED,this.__itemUnSelectHandler.bind(this));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.__nsGrid)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(!this.__dropDownSetting)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__dropDownSetting = {};\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar overrideSetting = {type:\\\"\\\",enableMouseHover:true,enableFilter:true,enableAdvancedFilter:false,enablePagination:false, \\r\\n\\t\\t\\t\\t\\t          \\t\\t\\t\\tcolumnResizable:false,columnDraggable:false,leftFixedColumn:0,rightFixedColumn:0,\\r\\n\\t\\t\\t\\t\\t          \\t\\t\\t\\tenableRowMove:false,enableContextMenu:false,enableExport:false,enableResponsive:false,\\r\\n\\t\\t\\t\\t\\t          \\t\\t\\t\\ttheme:\\\"White\\\",enableCellSelection:false,enableRowSelection:true,enableDragDrop:false,\\r\\n\\t\\t\\t\\t\\t          \\t\\t\\t\\tenableDragByHandle:false,enableMultipleSelection:this.__enableMultipleSelection,\\r\\n\\t\\t\\t\\t\\t          \\t\\t\\t\\tenableKeyboardNavigation:this.__enableKeyboardNavigation,disableHoverField:this.__stopHoveringField,\\r\\n\\t\\t\\t\\t\\t          \\t\\t\\t\\tisPopUp:true};\\r\\n\\t\\t\\t\\t\\t/*if(this.__templateID)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\toverrideSetting[\\\"template\\\"] = this.__templateID;\\r\\n\\t\\t\\t\\t\\t\\toverrideSetting[\\\"setData\\\"] = this.__setDataCallBack;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\toverrideSetting[\\\"itemRenderer\\\"] = this.__itemRenderer;\\r\\n\\t\\t\\t\\t\\t}*/\\r\\n\\t\\t\\t\\t\\tvar setting =  this.util.cloneObject(this.__dropDownSetting);\\r\\n\\t\\t\\t\\t\\tfor(var key in overrideSetting)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetting[key] = overrideSetting[key];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < setting[\\\"columns\\\"].length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar column = setting[\\\"columns\\\"][count];\\r\\n\\t\\t\\t\\t\\t\\tcolumn[\\\"enableFilter\\\"] = false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid = new NSGrid(this.__list,setting);\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.setColumn(setting[\\\"columns\\\"]);\\r\\n\\t\\t\\t\\t\\t//this.__nsGrid.dataSource(arrItems);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__list,NSGrid.ROW_NAVIGATED,this.__itemNavigationHandler.bind(this));\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__list,NSGrid.ROW_SELECTED,this.__itemSelectHandler.bind(this));\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__list,NSGrid.ROW_UNSELECTED,this.__itemUnSelectHandler.bind(this));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__hideList();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__setListDataSource = function(dataSource)\\r\\n\\t{\\r\\n\\t\\tif(this.__getNSControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar source = this.util.cloneObject(dataSource);\\r\\n\\t\\t\\tthis.__getNSControl().dataSource(source);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__updateListPos = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__list)\\r\\n\\t\\t{\\r\\n\\t\\t\\t/*var offset = {left:0,top:1};\\r\\n            var rect = this.__outerContainer.getBoundingClientRect();\\r\\n            this.__list.style.left = Math.round(rect.left + (window.pageXOffset || document.documentElement.scrollLeft) + offset.left) + 'px';\\r\\n            this.__list.style.top = Math.round(rect.bottom + (window.pageYOffset || document.documentElement.scrollTop) + offset.top) + 'px';*/\\r\\n            if(this.__listWidth > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__list.style.width = this.__listWidth + \\\"px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__list.style.width = Math.round(rect.right - rect.left) + 'px'; // outerWidth\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__hideList = function()\\r\\n\\t{\\r\\n\\t\\tthis.__showHideList(false);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__showHideList = function(isShow)\\r\\n\\t{\\r\\n\\t\\tif(this.__list)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__list.style.visibility = isShow ? \\\"\\\" : \\\"hidden\\\";\\r\\n\\t\\t\\t//this.__list.style.display = isShow ? \\\"\\\" : \\\"none\\\";\\r\\n\\t\\t\\tif(isShow)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__updateListPos();\\r\\n\\t\\t\\t\\tvar control = this.__getNSControl();\\r\\n\\t\\t\\t\\tif(control && control.reRender)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsetTimeout(function(){\\r\\n\\t\\t\\t\\t\\t\\tcontrol.reRender.call(control);\\r\\n\\t\\t\\t\\t\\t},10);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__getNSControl().setFocus(false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__isListVisible = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__list)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn !(this.__list.style.visibility == \\\"hidden\\\");\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__itemNavigationHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(event && event.detail)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__lastNavigatedItem = event.detail;\\r\\n\\t\\t\\tif(!this.__enableMultipleSelection)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//this.__textBox.value = this.__lastNavigatedItem[this.__labelField];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__itemSelectHandler = function(event,item)\\r\\n\\t{\\r\\n\\t\\tvar selectedItem = item ? item : ((event && event.detail) ? event.detail : null);\\r\\n\\t\\tif(selectedItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\t selectedItem = this.__getNSControl().getOrignalItem(selectedItem);\\r\\n\\t\\t\\t//console.log(this.__nsList.getSelectedItems());\\r\\n\\t\\t\\tthis.__selectedItem = selectedItem;\\r\\n\\t\\t\\tif(this.__enableMultipleSelection)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__refreshMultiSelectTags();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__textBox.value = this.__getItemText(this.__selectedItem);\\r\\n\\t\\t\\t\\tthis.__isFromItemSelected = true;\\r\\n\\t\\t\\t\\tthis.__hideList();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tevent ? event.stopPropagation() : null;\\r\\n\\t\\t\\tvar index = event ? event.index : null;\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSTextBox.ITEM_SELECTED,selectedItem,{index:index});\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__itemUnSelectHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__enableMultipleSelection)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__refreshMultiSelectTags();\\r\\n\\t\\t}\\r\\n\\t\\t//this.__selectedItem = null;\\r\\n\\t\\t//this.__selectedItems = [];\\r\\n\\t\\tif(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSTextBox.ITEM_UNSELECTED,event.detail,{index:event.index});\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSTextBox.ITEM_UNSELECTED);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__multiSelectHandler = function()\\r\\n\\t{\\r\\n\\t\\tvar nsControl = this.__getNSControl();\\r\\n\\t\\tif(nsControl && nsControl.getSelectedItems() && nsControl.getSelectedItems().length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__selectedItems = this.getSelectedItems();\\r\\n\\t\\t\\tthis.__refreshMultiSelectTags();\\r\\n\\t\\t\\t/*var setText = \\\"\\\";\\r\\n\\t\\t\\tfor(var count = 0;count < this.__selectedItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetText += this.__multiSelectionSeparator + this.__selectedItems[count][this.__labelField];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setText && setText.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__textBox.value = setText.substring(1,setText.length);\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__refreshMultiSelectTags = function() \\r\\n\\t{\\r\\n\\t    var arrTags = this.__getAllMultiSelectTags();\\r\\n\\t    var length = arrTags.length;\\r\\n\\t    var tag = null;\\r\\n\\t    var count = 0;\\r\\n\\t    for(count = length - 1;count > -1;count--)\\r\\n\\t    {\\r\\n\\t    \\ttag = arrTags[count];\\r\\n\\t    \\ttag.parentNode.removeChild(tag);\\r\\n\\t    }\\r\\n\\t    var arrSelectedItems = this.getSelectedItems();\\r\\n\\t    if(arrSelectedItems && arrSelectedItems.length > 0) \\r\\n\\t    {\\r\\n\\t    \\tlength = arrSelectedItems.length;\\r\\n\\t    \\tfor(count = 0; count < length; count++) \\r\\n\\t    \\t{\\r\\n\\t    \\t\\ttag = this.__createMultiSelectTag(arrSelectedItems[count]);\\r\\n\\t    \\t\\tthis.__outerContainer.insertBefore(tag,this.__textBox);\\r\\n\\t        }\\r\\n\\t    }\\r\\n\\t    this.__textBox.value = \\\"\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__createMultiSelectTag = function(item) \\r\\n\\t{\\r\\n\\t\\tvar tag = this.util.createDiv(null,\\\"nsTextBoxMultiSelectTag\\\");\\r\\n\\t    var content = this.util.createDiv(null,\\\"nsTextBoxMultiSelectTagText\\\");\\r\\n\\t    content.textContent = this.__getItemText(item);\\r\\n\\t    tag.appendChild(content);\\r\\n\\t    var btnRemove = this.util.createDiv(null,\\\"nsTextBoxMultiSelectTagClose\\\");\\r\\n\\t    this.util.addEvent(btnRemove,\\\"click\\\",this.__removeMultiSelectTag.bind(this,tag,item));\\r\\n\\t    tag.appendChild(btnRemove);\\r\\n\\t    return tag;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__removeMultiSelectTag = function(tag,item,event) \\r\\n\\t{\\r\\n\\t\\tvar selectedItems = this.getSelectedItems();\\r\\n\\t\\tvar index = selectedItems.indexOf(item);\\r\\n\\t\\tif(index > -1) \\r\\n\\t\\t{\\r\\n\\t\\t\\titem[\\\"ns_field_selected\\\"] = false;\\r\\n\\t\\t\\tselectedItems.splice(index,1);\\r\\n\\t\\t\\tthis.setSelectedItems(selectedItems);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__refreshMultiSelectTags();\\r\\n\\t\\tthis.__isFromCloseIcon = true;\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tif(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__getAllMultiSelectTags = function() \\r\\n\\t{\\r\\n\\t\\treturn this.__outerContainer.querySelectorAll(\\\".nsTextBoxMultiSelectTag\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__getItemText = function(item)\\r\\n\\t{\\r\\n\\t\\tvar retValue = \\\"\\\";\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isNoRecord = false;\\r\\n\\t\\t\\tif(this.__selectedItem[\\\"__ns__index\\\"] === -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tisNoRecord = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!isNoRecord)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__textBoxRendererCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue = this.__textBoxRendererCallback(item,this.__labelField);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue = item[this.__labelField];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__isMouseHoverAllowed = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item && Boolean.parse(item[this.__stopHoveringField]))\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\treturn true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__isFocusOnControl = function()\\r\\n\\t{\\r\\n\\t\\tif(this.hasFocus() || (document.activeElement == this.__textBox) || (this.__getNSControl() && this.__getNSControl().hasFocus()))\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__isAutoCompleteTypeList = function()\\r\\n\\t{\\r\\n\\t\\treturn (this.__dropDownType === NSTextBox.DROPDOWN_TYPE_LIST);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__getNSControl = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__isAutoCompleteTypeList())\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__nsList;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__nsGrid;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__measureString = function(control,text)\\r\\n\\t{\\r\\n\\t\\tif (!text) \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn 0;\\r\\n\\t\\t}\\r\\n\\t\\tvar self= this;\\r\\n\\t\\tvar transferStyles = function(fromControl,toControl,arrProperties) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar style = \\\"\\\";\\r\\n\\t\\t\\tif (arrProperties) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar length = arrProperties.length;\\r\\n\\t\\t\\t\\tfor (var count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstyle += arrProperties[count] + \\\":\\\" + self.util.getStyleValue(fromControl,arrProperties[count]) + \\\";\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t} \\r\\n\\t\\t\\telse \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstyle = fromControl.getAttribute(\\\"style\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\ttoControl.setAttribute(\\\"style\\\",style);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar test = this.util.createElement(\\\"test\\\",null,\\\"nsTextBoxTest\\\");\\r\\n\\t\\ttest.appendChild(document.createTextNode(text)); \\r\\n\\t\\tdocument.body.appendChild(test);\\r\\n\\t\\ttransferStyles(control,test,['letterSpacing','fontSize','fontFamily','fontWeight','textTransform']);\\r\\n\\t\\tvar width = test.offsetWidth;\\r\\n\\t\\tdocument.body.removeChild(test);\\r\\n\\t\\r\\n\\t\\treturn width;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.prototype.__getSearchText = function(searchValue)\\r\\n\\t{\\r\\n\\t\\tif(searchValue && this.__splitSearchType)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrSplit = searchValue.split(this.__splitSearchType);\\r\\n\\t\\t\\tif(arrSplit && arrSplit.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsearchValue = arrSplit[arrSplit.length - 1]\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn searchValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTextBox.ITEM_SELECTED = \\\"itemSelected\\\";\\r\\n\\tNSTextBox.ITEM_UNSELECTED = \\\"itemUnselected\\\";\\r\\n\\tNSTextBox.TYPE_AUTOTEXT = \\\"text\\\";\\r\\n\\tNSTextBox.TYPE_AUTOCOMPLETE = \\\"autocomplete\\\";\\r\\n\\tNSTextBox.TYPE_EMAIL = \\\"email\\\";\\r\\n\\tNSTextBox.TYPE_NUMBER = \\\"number\\\";\\r\\n\\tNSTextBox.TYPE_PASSWORD = \\\"password\\\";\\r\\n\\tNSTextBox.TYPE_URL = \\\"url\\\";\\r\\n\\tNSTextBox.DROPDOWN_TYPE_LIST = \\\"list\\\";\\r\\n\\tNSTextBox.DROPDOWN_TYPE_GRID = \\\"grid\\\";\\r\\n\\tNSTextBox.LIST_CLOSED_WITHOUT_SELECTION = \\\"listClosedWithoutSelection\\\";\\r\\n\\t\\r\\n\\treturn NSTextBox;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSTextBox\\\",NSTextBox);\";","export const NSMessageBoxCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\nvar svgRef = require('./nsSVG.min.js');\\r\\nvar NSSvg = svgRef.NSSvg;\\r\\nvar NSSvgShapes = svgRef.NSSvgShapes;\\r\\nvar plugginsRef = require('./nsPluggins.min.js');\\r\\nvar nsTextEditor = plugginsRef.nsTextEditor;\\r\\nvar nsTextAreaEditor = plugginsRef.nsTextAreaEditor;\\r\\nvar NSCellSelection = plugginsRef.NSCellSelection;\\r\\nvar NSTableCellNavigator = plugginsRef.NSTableCellNavigator;\\r\\nvar dateutilRef = require('./nsDateUtil.min.js');\\r\\nvar NSDateUtil = dateutilRef.NSDateUtil;\\r\\n\\r\\n\\t\\t}\\r\\n\\\"use strict\\\";\\r\\nvar NSPanel = (function()\\r\\n{\\r\\n\\tfunction NSPanel(component,setting) \\r\\n\\t{\\r\\n\\t\\tthis.__DEFAULT_ANIMATION_STEPS = 10;\\r\\n\\t\\tthis.__DEFAULT_ANIMATION_DELAY = 20;\\r\\n\\t\\t\\r\\n\\t\\t\\r\\n\\t\\tthis.__OUTER_CONTAINER_ID = \\\"panelContainer\\\";\\r\\n\\t\\tthis.__TITLE_CONTAINER_ID = \\\"divTitleBar\\\";\\r\\n\\t\\tthis.__BODY_CONTAINER_ID = \\\"divBody\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__CLASS_OUTER_CONTAINER = \\\"nsPanelContainer\\\";\\r\\n\\t\\tthis.__CLASS_TITLEBAR = \\\"nsPanelTitleBar\\\";\\r\\n\\t\\tthis.__CLASS_BODY_CONTAINER = \\\"nsPanelBody\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\t\\r\\n\\t\\tthis.__header = null;\\r\\n\\t\\tthis.__body = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__context = window;\\r\\n\\t\\tthis.__title = null;\\r\\n\\t\\tthis.__titleHtml = null;\\r\\n\\t\\tthis.__content = null;\\r\\n\\t\\tthis.__parent = document.body;\\r\\n\\t\\tthis.__templateID = null;\\r\\n\\t\\tthis.__templateUrl = null;\\r\\n\\t\\tthis.__contentComponent = null;\\r\\n\\t\\tthis.__contentComponentData = null;\\r\\n\\t\\tthis.__minWidth = null;\\r\\n\\t\\tthis.__minHeight = null;\\r\\n\\t\\tthis.__enablePopUp = false;\\r\\n\\t\\tthis.__enableModal = false;\\r\\n\\t\\tthis.__enableCollapse = false;\\r\\n\\t\\tthis.__enableMinimization = false;\\r\\n\\t\\tthis.__enableFullScreen = false;\\r\\n\\t\\tthis.__enableDrag = false;\\r\\n\\t\\tthis.__enableResize = false;\\r\\n\\t\\tthis.__enableTitleDblClick = false;\\r\\n\\t\\tthis.__enableMoveOnClick = false;\\r\\n\\t\\tthis.__enableModalAnimation = false;\\r\\n\\t\\tthis.__modalAnimationType = \\\"Top\\\";\\r\\n\\t\\tthis.__enableModalCloseOnOutsideClick = false;\\r\\n\\t\\tthis.__enableModalCloseOnEscape = false;\\r\\n\\t\\tthis.__enableCloseIconVisibility = true;\\r\\n\\t\\tthis.__customClass = {};\\r\\n\\t\\tthis.__toolBarDetails = {};\\r\\n\\t\\tthis.__panelSetting = {};\\r\\n\\t\\t\\r\\n\\t\\tthis.__origBaseDimension = {}; \\r\\n\\t\\tthis.__lastHeight = null;\\r\\n\\t\\tthis.__lastBodyHeight = -1;\\r\\n\\t\\tthis.__nsDragResizeElements = null;\\r\\n\\t\\tthis.__divGhost = null;\\r\\n\\t\\tthis.__divModal = null;\\r\\n\\t\\tthis.__isCollapsingExpanding = false;\\r\\n\\t\\tthis.__isCollapsed = false;\\r\\n\\t\\tthis.__isMinimized = false;\\r\\n\\t\\tthis.__isFullScreen = false;\\r\\n\\t\\tthis.__isInternalRemove = false;\\r\\n\\t\\tthis.__divOrignalChildren = null;\\r\\n\\t\\tthis.__dragExcludeElement = [];\\r\\n\\t\\tthis.__disableCollapse = false;\\r\\n\\t\\tthis.__disableMinMax = false;\\r\\n\\t\\tthis.__disableFullScreen = false;\\r\\n\\t\\tthis.__toolBarDivs = {};\\r\\n\\t\\tthis.__lastModalAnimationCss = null;\\r\\n\\t\\tthis.__bodyCompInstance = null;\\r\\n\\t\\t//Minimize Variables\\r\\n\\t\\tthis.__divMinFixedContainer = null;\\r\\n\\t\\tthis.__minimizedDirection = \\\"left\\\";\\r\\n\\t\\tthis.__baseComponentParent = null;\\r\\n\\t\\tthis.__minimizeAddRemoveElementCallback = null;\\r\\n\\t\\t//FullScreen Variables\\r\\n\\t\\tthis.__origFullScreenDimension = {baseComponentRect:null,baseComponentStyle:null};\\r\\n\\t\\t\\r\\n\\t\\tthis.__windowClickRef = null;\\r\\n\\t\\tthis.__documentKeydownRef = null;\\r\\n\\t\\tthis.__modalAnimationEndRef = null;\\r\\n\\t\\tthis.__isComponentNull = false;\\r\\n\\t\\tif(!component)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcomponent = document.createElement(\\\"div\\\");\\r\\n\\t\\t\\tcomponent.style.display = \\\"none\\\";\\r\\n\\t\\t\\tthis.__parent.appendChild(component);\\r\\n\\t\\t\\tthis.__isComponentNull = true;\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(NSContainerBase,NSPanel);\\r\\n\\tNSPanel.prototype.constructor = NSPanel;\\r\\n\\t\\r\\n\\tNSPanel.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t\\tif(this.__isComponentNull)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__baseComponent.setAttribute(\\\"id\\\",this.getID() + \\\"Panel\\\");\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createStructure();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tif(attributeName == \\\"title\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__title = newVal;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName == \\\"titleHtml\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__titleHtml = newVal;\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tif(!this.__isInternalRemove || this.__isComponentNull)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsDragResizeElements)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsDragResizeElements.destroy();\\r\\n\\t\\t\\t\\tthis.__nsDragResizeElements = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__bodyCompInstance)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callEditorFunction(this.__bodyCompInstance,\\\"destroy\\\");\\r\\n\\t\\t\\t\\tthis.__bodyCompInstance = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__windowClickRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__context,\\\"click\\\",this.__windowClickRef);\\r\\n\\t\\t\\t\\tthis.__windowClickRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__documentKeydownRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(document,\\\"keydown\\\",this.__documentKeydownRef);\\r\\n\\t\\t\\t\\tthis.__documentKeydownRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__dragExcludeElement = [];\\r\\n\\t\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__isInternalRemove = false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.base.componentResized.call(this,event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.open = function(animation)\\r\\n\\t{\\r\\n\\t\\tif(this.__isComponentNull)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createStructure();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__divModal)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableModal)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divModal.style.zIndex = this.util.getMaxZIndex() + 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableModalAnimation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__modalAnimationType = animation || this.__modalAnimationType;\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,this.__lastModalAnimationCss);\\r\\n\\t\\t\\t\\tif(animation)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar css = \\\"nsPanelModal\\\" + this.util.toCamelCase(this.__modalAnimationType,true);\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,css);\\r\\n\\t\\t\\t\\t\\tvar cssAnimationHelper = new this.util.nsCSSAnimationHelper();\\r\\n\\t\\t\\t\\t\\tthis.__modalAnimationEndRef = this.__modalAnimationEndHandler.bind(this,css,true,cssAnimationHelper);\\r\\n\\t\\t\\t\\t\\tcssAnimationHelper.addEndEvent(this.__baseComponent,this.__modalAnimationEndRef);\\r\\n\\t\\t\\t\\t\\tthis.__lastModalAnimationCss = css;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__showHideModal(true);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.close = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableModalAnimation)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cssAnimationHelper = new this.util.nsCSSAnimationHelper();\\r\\n\\t\\t\\tthis.__modalAnimationEndRef = this.__modalAnimationEndHandler.bind(this,this.__lastModalAnimationCss,false,cssAnimationHelper);\\r\\n\\t\\t\\tcssAnimationHelper.addEndEvent(this.__baseComponent,this.__modalAnimationEndRef);\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__divModal,\\\"nsPanelModalOpen\\\");\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelOpen\\\");\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__showHideModal(false);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.removeModal = function()\\r\\n\\t{\\r\\n\\t\\tthis.close();\\r\\n\\t\\tthis.removeComponent();\\r\\n\\t\\tif(this.__divModal && this.__divModal.parentNode) {\\r\\n\\t\\t\\tthis.__divModal.parentNode.removeChild(this.__divModal);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.getBaseElement = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__baseComponent;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.minimize = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.isMinimized())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeMinMax();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.maximize = function()\\r\\n\\t{\\r\\n\\t\\tif(this.isMinimized())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeMinMax();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.collapse = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.isCollapsed())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeExpCol();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.expand = function()\\r\\n\\t{\\r\\n\\t\\tif(this.isCollapsed())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeExpCol();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.fullScreen = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.isFullScreen())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeFullScreen();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.restore = function()\\r\\n\\t{\\r\\n\\t\\tif(this.isFullScreen())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeFullScreen();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableResize = function(value)\\r\\n\\t{\\r\\n\\t\\tif(this.__nsDragResizeElements)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsDragResizeElements.disableResize(value);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableDrag = function(value)\\r\\n\\t{\\r\\n\\t\\tif(this.__nsDragResizeElements)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsDragResizeElements.disableDrag(value);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableCollapse = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__disableCollapse = value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableMinMax = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__disableMinMax = value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableFullScreen = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__disableFullScreen = value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.isCollapsed = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__isCollapsed;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.isMinimized = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__isMinimized;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.isFullScreen = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__isFullScreen;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tvar setting = this.__setting;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"context\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__context = setting[\\\"context\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"title\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__title = setting[\\\"title\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"titleHtml\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__titleHtml = setting[\\\"titleHtml\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"content\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__content = setting[\\\"content\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"parent\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__parent = setting[\\\"parent\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"template\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__templateID = setting[\\\"template\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"templateUrl\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__templateUrl = setting[\\\"templateUrl\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"contentComponent\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__contentComponent = setting[\\\"contentComponent\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"contentComponentData\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__contentComponentData = setting[\\\"contentComponentData\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minWidth\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minWidth = this.util.getNumber(setting[\\\"minWidth\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minHeight\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minHeight = this.util.getNumber(setting[\\\"minHeight\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enablePopUp\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enablePopUp = Boolean.parse(setting[\\\"enablePopUp\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableModal\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableModal = Boolean.parse(setting[\\\"enableModal\\\"]);\\r\\n\\t\\t\\t\\tif(this.__enableModal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enablePopUp = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableCollapse\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableCollapse = Boolean.parse(setting[\\\"enableCollapse\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMinimization\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMinimization = Boolean.parse(setting[\\\"enableMinimization\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableFullScreen\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableFullScreen = Boolean.parse(setting[\\\"enableFullScreen\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableDrag\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableDrag = Boolean.parse(setting[\\\"enableDrag\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableResize\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableResize = Boolean.parse(setting[\\\"enableResize\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableTitleDblClick\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableTitleDblClick = Boolean.parse(setting[\\\"enableTitleDblClick\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMoveOnClick\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.__enablePopUp)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enableMoveOnClick = Boolean.parse(setting[\\\"enableMoveOnClick\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableModalAnimation\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableModalAnimation = Boolean.parse(setting[\\\"enableModalAnimation\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"modalAnimationType\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__modalAnimationType = setting[\\\"modalAnimationType\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableModalCloseOnOutsideClick\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__enableModal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enableModalCloseOnOutsideClick = Boolean.parse(setting[\\\"enableModalCloseOnOutsideClick\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableModalCloseOnEscape\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__enableModal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enableModalCloseOnEscape = Boolean.parse(setting[\\\"enableModalCloseOnEscape\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableCloseIconVisibility\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableCloseIconVisibility = this.util.isUndefinedOrNull(setting[\\\"enableCloseIconVisibility\\\"]) ? true : Boolean.parse(setting[\\\"enableCloseIconVisibility\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minimizedDirection\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minimizedDirection = setting[\\\"minimizedDirection\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"theme\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__theme = setting[\\\"theme\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minimizeAddRemoveElementCallback\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minimizeAddRemoveElementCallback = setting[\\\"minimizeAddRemoveElementCallback\\\"];\\r\\n\\t\\t\\t\\tif (typeof this.__minimizeAddRemoveElementCallback === \\\"string\\\" || this.__minimizeAddRemoveElementCallback instanceof String)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.util.isFunction(this.__minimizeAddRemoveElementCallback))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__minimizeAddRemoveElementCallback = this.__config.context[this.__minimizeAddRemoveElementCallback];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar customClass = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"customClass\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcustomClass = setting[\\\"customClass\\\"];\\r\\n\\t\\t\\t\\tif(!customClass)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcustomClass = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__customClass = {container:customClass[\\\"container\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  titleBar:customClass[\\\"titleBar\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  titleBarContent:customClass[\\\"titleBarContent\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  iconContainer:customClass[\\\"iconContainer\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  icon:customClass[\\\"icon\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  body:customClass[\\\"body\\\"] || null};\\r\\n\\t\\t\\tvar toolBarDetails = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"toolBarDetails\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolBarDetails = setting[\\\"toolBarDetails\\\"];\\r\\n\\t\\t\\t\\tif(!toolBarDetails)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttoolBarDetails = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__toolBarDetails = {\\r\\n\\t\\t\\t\\t\\tminimize:toolBarDetails[\\\"minimize\\\"] || {iconHTML:null,title:\\\"Minimize\\\"},\\r\\n\\t\\t\\t\\t\\tmaximize:toolBarDetails[\\\"maximize\\\"] || {iconHTML:null,title:\\\"Maximize\\\"},\\r\\n\\t\\t\\t\\t\\texpand:toolBarDetails[\\\"expand\\\"] || {iconHTML:null,title:\\\"Expand\\\"},\\r\\n\\t\\t\\t\\t\\tcollapse:toolBarDetails[\\\"collapse\\\"] || {iconHTML:null,title:\\\"Collapse\\\"},\\r\\n\\t\\t\\t\\t\\tfullScreen:toolBarDetails[\\\"fullScreen\\\"] || {iconHTML:null,title:\\\"FullScreen\\\"},\\r\\n\\t\\t\\t\\t\\trestore:toolBarDetails[\\\"restore\\\"] || {iconHTML:null,title:\\\"Restore\\\"},\\r\\n\\t\\t\\t\\t\\tclose:toolBarDetails[\\\"close\\\"] || {iconHTML:null,title:\\\"Close\\\"}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar panelSetting = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"panelSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tpanelSetting = setting[\\\"panelSetting\\\"];\\r\\n\\t\\t\\t\\tif(!panelSetting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tpanelSetting = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__panelSetting = {\\r\\n\\t\\t\\t\\ttop:panelSetting[\\\"top\\\"],\\r\\n\\t\\t\\t\\tleft:panelSetting[\\\"left\\\"],\\r\\n\\t\\t\\t\\twidth:panelSetting[\\\"width\\\"],\\r\\n\\t\\t\\t\\theight:panelSetting[\\\"height\\\"],\\r\\n\\t\\t\\t};\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createStructure = function()\\r\\n\\t{\\r\\n\\t\\tthis.__saveRestoreBaseComponentDimension(true);\\r\\n\\t\\tthis.__copyOrignalContent();\\r\\n\\t\\tvar arrKeys = Object.keys(this.__panelSetting);\\r\\n\\t\\tfor(var index = 0;index < arrKeys.length;index++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__panelSetting[arrKeys[index]])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__baseComponent.style[arrKeys[index]] = this.__panelSetting[arrKeys[index]];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanel\\\");\\r\\n\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelExpanded\\\");\\r\\n\\t\\tthis.__applyTheme(this.__baseComponent,\\\"nsPanel\\\");\\r\\n\\t\\tthis.__applyTheme(this.__baseComponent,\\\"nsPanelWidget\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__baseComponent,\\\"container\\\");\\r\\n\\t\\tif(this.__enableDrag)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelModalContentDrag\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enablePopUp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar parentNode = this.__parent;\\r\\n\\t\\t\\tthis.__divModal = this.__createModal();\\r\\n\\t\\t\\tthis.__isInternalRemove = true;\\r\\n\\t\\t\\tthis.__divModal.appendChild(this.__baseComponent);\\r\\n\\t\\t\\tparentNode.appendChild(this.__divModal);\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelModalContent\\\");\\r\\n\\t\\t\\tif(this.__enableModalCloseOnOutsideClick)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//this.__windowClickRef = this.__windowClickHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__divModal,\\\"click\\\",this.__modalClickHandler.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableModalCloseOnEscape)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//To detect escape button\\r\\n\\t\\t\\t\\tthis.__documentKeydownRef = this.__documentKeydownHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(document,\\\"keydown\\\",this.__documentKeydownRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__header = this.__createTitleBar(this.__baseComponent);\\r\\n\\t\\tthis.__body = this.__createBody(this.__baseComponent);\\r\\n\\t\\tthis.__lastHeight = this.util.getStyleValue(this.__baseComponent,\\\"height\\\");\\r\\n\\t\\tvar dragResizeSetting = {element:this.__baseComponent,\\r\\n\\t\\t\\t\\tenableDrag:this.__enableDrag,\\r\\n\\t\\t\\t\\tenableResize:this.__enableResize,\\r\\n\\t\\t\\t\\tenableMoveOnClick:this.__enableMoveOnClick,\\r\\n\\t\\t\\t\\tminWidth:this.__minWidth,\\r\\n\\t\\t\\t\\tminHeight:this.__minHeight,\\r\\n\\t\\t\\t\\tcreateGhostElementCallback:this.__createGhostElement.bind(this),\\r\\n\\t\\t\\t\\tenableDragContainment:true,\\r\\n\\t\\t\\t\\texcludeElement:this.__dragExcludeElement};\\r\\n\\t\\tthis.__nsDragResizeElements = new this.util.nsDragResizeElements(dragResizeSetting);\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,this.__nsDragResizeElements.DRAG_STARTING,this.__dragResizeEventHandler.bind(this));\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,this.__nsDragResizeElements.DRAG_END,this.__dragResizeEventHandler.bind(this));\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,this.__nsDragResizeElements.RESIZE_END,this.__dragResizeEventHandler.bind(this));\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,\\\"click\\\",this.__baseComponentClickHandler.bind(this));\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,NSPanel.__ELEMENT_FOCUS_OUT,this.__baseComponentFocusOutHandler.bind(this));\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__saveRestoreBaseComponentDimension = function(isSave)\\r\\n\\t{\\r\\n\\t\\tif(this.__baseComponent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrAttributeName = [\\\"class\\\",\\\"style\\\"];\\r\\n\\t\\t\\tif(isSave)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__origBaseDimension = {};\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrAttributeName.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__origBaseDimension[arrAttributeName[count]] = this.__baseComponent.getAttribute(arrAttributeName[count]); \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__origBaseDimension[\\\"children\\\"] = this.__baseComponent.children;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrAttributeName.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__baseComponent.setAttribute(arrAttributeName[count],this.__origBaseDimension[arrAttributeName[count]]); \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__origBaseDimension[\\\"children\\\"] && this.__origBaseDimension[\\\"children\\\"].length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeAllChildren(this.__baseComponent);\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < this.__origBaseDimension[\\\"children\\\"].length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__baseComponent.appendChild(this.__origBaseDimension[\\\"children\\\"][count]); \\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__origBaseDimension = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createModal = function()\\r\\n\\t{\\r\\n\\t\\tvar divModal = this.util.createDiv(this.getID() + \\\"modal\\\",\\\"nsPanelModal\\\");\\r\\n\\t\\tif(this.__enableModal)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(divModal,\\\"nsPanelModalProp\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableModalAnimation)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(divModal,\\\"nsPanelModalAnimation\\\");\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.addStyleClass(divModal,\\\"nsPanelModal\\\" + this.__theme);\\r\\n\\t\\treturn divModal;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createTitleBar = function(parentElement)\\r\\n\\t{\\r\\n\\t\\tif(parentElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar divTitleBar = this.util.createDiv(this.getID() + this.__TITLE_CONTAINER_ID,\\\"nsPanelTitleBar\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(divTitleBar,this.__CLASS_TITLEBAR);\\r\\n\\t\\t\\tthis.__applyCustomClass(divTitleBar,\\\"titleBar\\\");\\r\\n\\t\\t\\tvar divTitleBarContent = this.util.createDiv(this.getID() + this.__TITLE_CONTAINER_ID + \\\"Content\\\",\\\"nsPanelTitleBarContent\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(divTitleBarContent,\\\"titleBarContent\\\");\\r\\n\\t\\t\\tdivTitleBar.appendChild(divTitleBarContent);\\r\\n\\t\\t\\tif(this.__titleHtml && this.__titleHtml.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivTitleBarContent.innerHTML = this.__titleHtml;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__title && this.__title.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar titleText = document.createTextNode(this.__title);\\r\\n\\t\\t\\t\\tdivTitleBarContent.appendChild(titleText);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar svgShapes = new NSSvgShapes();\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar divIcon = this.util.createDiv(this.getID() + this.__TITLE_CONTAINER_ID + \\\"IconContainer\\\",\\\"nsPanelControlbar\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(divIcon,\\\"iconContainer\\\");\\r\\n\\t\\t\\tvar divButton = null;\\r\\n\\t\\t\\tif(this.__enableCollapse)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addExpandInPage();\\r\\n\\t\\t\\t\\tsvgShapes.addCollapseInPage();\\r\\n\\t\\t\\t\\tvar expColID = this.getID() + \\\"ExpCol\\\";\\r\\n\\t\\t\\t\\tvar headerDoubleClickRef = this.__headerDoubleClickHandler.bind(this);\\r\\n\\t\\t\\t\\tdivButton = this.__addToolbarIcon(divIcon,objSVG,\\\"collapse\\\",\\\"nsPanelExpColContainer\\\",expColID,\\\"nsPanelExpColIcon\\\",svgShapes.__COLLAPSE_ICON_ID,headerDoubleClickRef);\\r\\n\\t\\t\\t\\tthis.__toolBarDivs[\\\"expand\\\"] = this.__toolBarDivs[\\\"collapse\\\"] = divButton;\\r\\n\\t\\t\\t\\tif(this.__enableTitleDblClick)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(divTitleBar,\\\"dblclick\\\",headerDoubleClickRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableMinimization)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addMinimizeInPage();\\r\\n\\t\\t\\t\\tsvgShapes.addMaximizeInPage();\\r\\n\\t\\t\\t\\tvar minMaxID = this.getID() + \\\"MinMax\\\";\\r\\n\\t\\t\\t\\tdivButton = this.__addToolbarIcon(divIcon,objSVG,\\\"minimize\\\",\\\"nsPanelMinMaxContainer\\\",minMaxID,\\\"nsPanelMinMaxIcon\\\",svgShapes.__MINIMIZE_ICON_ID,this.__minimizeIconClickHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.__toolBarDivs[\\\"maximize\\\"] = this.__toolBarDivs[\\\"minimize\\\"] = divButton;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableFullScreen)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addFullScreenInPage();\\r\\n\\t\\t\\t\\tsvgShapes.addRestoreInPage();\\r\\n\\t\\t\\t\\tvar fullScreenID = this.getID() + \\\"FullScreen\\\";\\r\\n\\t\\t\\t\\tdivButton = this.__addToolbarIcon(divIcon,objSVG,\\\"fullScreen\\\",\\\"nsPanelFullScreenContainer\\\",fullScreenID,\\\"nsPanelFullScreenIcon\\\",svgShapes.__FULLSCREEN_ICON_ID,this.__fullScreenIconClickHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.__toolBarDivs[\\\"fullScreen\\\"] = this.__toolBarDivs[\\\"restore\\\"] = divButton;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enablePopUp && this.__enableCloseIconVisibility)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addCloseIcon();\\r\\n\\t\\t\\t\\tvar closeID = this.getID() + \\\"Close\\\";\\r\\n\\t\\t\\t\\tdivButton = this.__addToolbarIcon(divIcon,objSVG,\\\"close\\\",\\\"nsPanelCloseContainer\\\",closeID,\\\"nsPanelCloseIcon\\\",svgShapes.__CLOSE_ICON_ID,this.__closeIconClickHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.__toolBarDivs[\\\"close\\\"] = divButton;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdivTitleBar.appendChild(divIcon);\\r\\n\\t\\t\\tparentElement.appendChild(divTitleBar);\\r\\n\\t\\t\\treturn divTitleBar;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createBody = function(parentElement)\\r\\n\\t{\\t\\r\\n\\t\\tif(parentElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar divBody = this.util.createDiv(this.getID() + this.__BODY_CONTAINER_ID,this.__CLASS_BODY_CONTAINER);\\r\\n\\t\\t\\tthis.__applyCustomClass(divBody,\\\"body\\\");\\r\\n\\t\\t\\tif(this.__divOrignalChildren)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivBody.appendChild(this.__divOrignalChildren);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__content)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isString(this.__content))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar compSpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\tcompSpan.innerHTML = this.__content;\\r\\n\\t\\t\\t\\t\\tdivBody.appendChild(compSpan);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdivBody.appendChild(this.__content);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__templateID && this.__templateID.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivBody.appendChild(this.util.getTemplate(this.__templateID));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__templateUrl && this.__templateUrl.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tvar templateLoadHandler = function(templateText)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(templateText)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdivBody.innerHTML = templateText;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tconsole.error(self.__templateUrl + \\\" was not loaded.Please check the URL\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tvar templateErrorHandler = function(errorText)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconsole.error(self.__templateUrl + \\\" was not loaded.Please check the URL\\\");\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.util.getTemplateFromURL(this.__templateUrl,templateLoadHandler,templateErrorHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__contentComponent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar callback = function(component)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__bodyCompInstance)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__bodyCompInstance = null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__bodyCompInstance = new component();\\r\\n\\t\\t\\t\\t\\tvar retVal = this.__callEditorFunction(this.__bodyCompInstance,\\\"init\\\",this.__contentComponentData);\\r\\n\\t\\t\\t\\t\\tvar initCallback = function(bodyCompInstance)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(!this.__bodyCompInstance) {\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__bodyCompInstance = bodyCompInstance;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tvar element = this.__bodyCompInstance.getElement();\\r\\n\\t\\t\\t\\t\\t\\tdivBody.appendChild(element);\\r\\n\\t\\t\\t\\t\\t\\tthis.__callEditorFunction(this.__bodyCompInstance,\\\"elementAdded\\\");\\r\\n\\t\\t\\t\\t\\t\\tvar config = {instance: this.__bodyCompInstance,parentComp: this,element: element};\\r\\n\\t\\t\\t\\t\\t\\tthis.__bodyCompInstance[this.__getAttributeKey(\\\"config\\\")] = config;\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\tthis.util.resolveFunctionOrPromise(retVal,initCallback.bind(this));\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.util.resolveFunctionOrPromise(this.__contentComponent,callback.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tparentElement.appendChild(divBody);\\r\\n\\t\\t\\treturn divBody;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createGhostElement = function(element)\\r\\n\\t{\\r\\n\\t\\tthis.__divGhost = element.cloneNode(true);\\r\\n\\t\\tvar divPanelControlbar = this.__divGhost.querySelector(\\\".nsPanelControlbar\\\");\\r\\n\\t\\tif(divPanelControlbar)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdivPanelControlbar.parentNode.removeChild(divPanelControlbar);\\r\\n\\t\\t}\\r\\n\\t\\tvar divBody = this.__divGhost.querySelector(\\\".nsPanelBody\\\");\\r\\n\\t\\tif(divBody)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdivBody.innerHTML = \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__divGhost;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__modalClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\tif(target !== this.__baseComponent && !this.__baseComponent.contains(target))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.close();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__documentKeydownHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tif (event.keyCode === this.util.KEYCODE[\\\"ESC\\\"]) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.close();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__copyOrignalContent = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__baseComponent && this.__baseComponent.childNodes.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divOrignalChildren = this.util.createDiv(this.getID() + \\\"orignalChildren\\\");\\r\\n\\t\\t\\twhile (this.__baseComponent.childNodes.length > 0) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divOrignalChildren.appendChild(this.__baseComponent.childNodes[0]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__headerDoubleClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__initializeExpCol();\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__minimizeIconClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__initializeMinMax();\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__fullScreenIconClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__initializeFullScreen();\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__closeIconClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.close();\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__modalAnimationEndHandler = function(css,show,cssAnimationHelper,event)\\r\\n\\t{\\r\\n\\t\\tcssAnimationHelper.removeEndEvent(this.__baseComponent,this.__modalAnimationEndRef);\\r\\n\\t\\tthis.__modalAnimationEndRef = null;\\r\\n\\t\\tif(show)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//this.util.removeStyleClass(this.__baseComponent,css);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__showHideModal(false);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__dragResizeEventHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(event.eventName === NSPanel.DRAG_STARTING)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar target = event.detail;\\r\\n\\t\\t\\tif(target && (this.util.hasStyleClass(target,\\\"nsPanelMinMaxContainer\\\")))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.preventDefault(event);\\r\\n\\t\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse if(event.eventName === NSPanel.DRAG_END)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t\\t}\\r\\n\\t\\telse if(event.eventName === NSPanel.RESIZE_END)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__lastHeight = this.util.getStyleValue(this.__baseComponent,\\\"height\\\");\\r\\n\\t\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__baseComponentClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tconsole.log(\\\"__baseComponentClickHandler \\\" + this.__baseComponent.id);\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar currentPanel,highlightedPanel;\\r\\n\\t\\tvar arrElement = document.querySelectorAll(\\\".nsPanel:not(.nsDragGhost)\\\");\\r\\n\\t\\tvar currentPanelParent = currentPanel =  this.__baseComponent;\\r\\n\\t\\tvar highlightedPanelParent = highlightedPanel = arrElement[arrElement.length - 1];\\r\\n\\t\\t//if popup then select its parent\\r\\n\\t\\tif(this.__divModal && highlightedPanel)\\r\\n\\t\\t{\\r\\n\\t\\t\\thighlightedPanelParent = highlightedPanel.parentNode;\\r\\n\\t\\t\\tcurrentPanelParent = this.__divModal;\\r\\n\\t\\t\\t//below line stops click handler of button on Panel\\r\\n\\t\\t\\t//event.stopPropagation();\\r\\n\\t\\t}\\r\\n\\t\\tif(highlightedPanelParent != currentPanelParent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.insertAfterElement(highlightedPanelParent,currentPanelParent);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t\\tif(highlightedPanel)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.dispatchEvent(highlightedPanel,NSPanel.__ELEMENT_FOCUS_OUT,null,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__baseComponentFocusOutHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tconsole.log(\\\"__baseComponentFocusOutHandler \\\" + this.__baseComponent.id);\\r\\n\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__addToolbarIcon = function(divIcon,objSVG,toolbarKey,containerClass,iconID,svgClass,svgShapeIconID,clickHandler)\\r\\n\\t{\\r\\n\\t\\tvar divButton = this.util.createDiv(null,\\\"nsPanelControlButton\\\");\\r\\n\\t\\tthis.util.addStyleClass(divButton,containerClass);\\r\\n\\t\\tthis.__applyCustomClass(divButton,\\\"icon\\\");\\r\\n\\t\\tif(!this.__setToolBarButton(toolbarKey,divButton))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar svg = objSVG.addSVG(divButton,iconID,svgClass,null,null,null,null,null,null,true);\\r\\n\\t\\t\\tobjSVG.addUse(svg,iconID + \\\"use\\\",svgClass + \\\"Use\\\",\\\"#\\\" + svgShapeIconID);\\r\\n\\t\\t}\\r\\n\\t\\tdivIcon.appendChild(divButton);\\r\\n\\t\\tthis.util.addEvent(divButton,\\\"click\\\",clickHandler);\\r\\n\\t\\tthis.__dragExcludeElement.push(divButton);\\r\\n\\t\\treturn divButton;\\r\\n\\t};\\r\\n\\t//call this function if svg icons are used and container changes its parent because of IE issue\\r\\n\\tNSPanel.prototype.__refreshToolbarIcon = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__toolBarDivs)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var key in this.__toolBarDivs)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar div = this.__toolBarDivs[key];\\r\\n\\t\\t\\t\\tif(div && div.children.length > 0 && div.children[0].nodeName == \\\"svg\\\" && div.children[0].childNodes.length > 0 && div.children[0].childNodes[0].nodeName == \\\"use\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar use = div.children[0].childNodes[0];\\r\\n\\t\\t\\t\\t\\tuse.setAttribute(\\\"xlink:href\\\",use.getAttribute(\\\"xlink:href\\\"));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__setToolBarButton = function(toolbarKey,divButton)\\r\\n\\t{\\r\\n\\t\\tvar isIconFound = false;\\r\\n\\t\\tif(!divButton)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdivButton = this.__toolBarDivs[toolbarKey];\\r\\n\\t\\t}\\r\\n\\t\\tif(divButton && this.__toolBarDetails[toolbarKey])\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__toolBarDetails[toolbarKey][\\\"iconHTML\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivButton.innerHTML = this.__toolBarDetails[toolbarKey][\\\"iconHTML\\\"];\\r\\n\\t\\t\\t\\tfor(var count = 0;count < divButton.children.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdivButton.children[count].style.pointerEvents = \\\"none\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tisIconFound = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__toolBarDetails[toolbarKey][\\\"title\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivButton.setAttribute(\\\"title\\\",this.__toolBarDetails[toolbarKey][\\\"title\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn isIconFound;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__applyCustomClass = function(element,type)\\r\\n\\t{\\r\\n\\t\\tif(element && type && this.__customClass[type])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(element,this.__customClass[type]);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__showHideModal = function(show)\\r\\n\\t{\\r\\n\\t\\tif(show)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__divModal,\\\"nsPanelModalOpen\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelOpen\\\");\\r\\n\\t\\t\\tthis.__divModal.style.display = \\\"block\\\";\\r\\n\\t\\t\\tthis.__baseComponent.style.display = \\\"block\\\";\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__divModal,\\\"nsPanelModalOpen\\\");\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelOpen\\\");\\r\\n\\t\\t\\tif(this.__isComponentNull)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.removeComponent();\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(this.__baseComponent);\\r\\n\\t\\t\\t\\tif(this.__divModal && this.__divModal.parentNode)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__divModal.parentNode.removeChild(this.__divModal);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__saveRestoreBaseComponentDimension(false);\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\tthis.__parent.appendChild(this.__baseComponent);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__divModal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__divModal.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.CLOSED,this.__setting,{item: this.__setting});\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__context,NSPanel.CLOSED,this.__setting,{item: this.__setting});\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t/******************************Start of Expansion Collapse Function *************************************/\\r\\n\\tNSPanel.prototype.__initializeExpCol = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__body && !this.__isCollapsingExpanding && !this.__disableCollapse)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objBrowser = this.util.getBrowser();\\r\\n\\t\\t\\t//for some weird reason browser other than Chrome moves on click and know how to fix it\\r\\n\\t\\t\\tif(objBrowser && objBrowser.code !== \\\"chrome\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsDragResizeElements.stopMoveOnClick();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__isCollapsingExpanding = true;\\r\\n\\t\\t\\tvar isCollapsed = this.util.hasStyleClass(this.__baseComponent,\\\"nsPanelCollapsed\\\");\\r\\n\\t\\t\\tif(isCollapsed)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t// expanding\\r\\n\\t\\t\\t\\tthis.disableDrag(true);\\r\\n\\t\\t\\t\\tthis.disableResize(true);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t// collapsing\\r\\n\\t\\t\\t\\tthis.disableDrag(false);\\r\\n\\t\\t\\t\\tthis.disableResize(false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tthis.__animateExpCol(isCollapsed);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__animateExpCol = function(isExpanding)\\r\\n\\t{\\r\\n\\t\\tvar eventType = isExpanding ? NSPanel.EXPANSION_STARTING:NSPanel.COLLAPSE_STARTING;\\r\\n\\t\\tthis.util.dispatchEvent(this.getBaseElement(),eventType,null,null);\\r\\n\\t\\tthis.__body.style.display = \\\"block\\\";\\r\\n\\t\\tvar contentHeight = this.__body.offsetHeight;\\r\\n\\t\\tif (isExpanding)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__body.style.height = \\\"0px\\\";\\r\\n\\t\\t\\tcontentHeight = this.__lastBodyHeight;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__lastBodyHeight = this.__body.offsetHeight;\\r\\n\\t\\t}\\r\\n\\t\\tvar stepHeight = contentHeight / this.__DEFAULT_ANIMATION_STEPS;\\r\\n\\t\\tvar direction = (isExpanding ? 1 : -1);\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tsetTimeout(function(){self.__animateExpColStep.bind(self)(1,stepHeight,direction);}, this.__DEFAULT_ANIMATION_DELAY);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__animateExpColStep = function(iteration, stepHeight, direction)\\r\\n\\t{\\r\\n\\t\\tif (iteration < this.__DEFAULT_ANIMATION_STEPS)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__body.style.height = Math.round(((direction > 0) ? iteration : 10 - iteration) * stepHeight) +\\\"px\\\";\\r\\n\\t\\t\\titeration++;\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tsetTimeout(function(){self.__animateExpColStep.bind(self)(iteration,stepHeight,direction);}, this.__DEFAULT_ANIMATION_DELAY);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar eventType = \\\"\\\";\\r\\n\\t\\t\\tif(direction < 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.changeStyleClass(this.__baseComponent,\\\"nsPanelExpanded\\\",\\\"nsPanelCollapsed\\\");\\r\\n\\t\\t\\t\\tthis.__body.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = this.__header.offsetHeight + \\\"px\\\";\\r\\n\\t\\t\\t\\teventType = NSPanel.COLLAPSE_END;\\r\\n\\t\\t\\t\\tif(this.__divGhost)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.changeStyleClass(this.__divGhost,\\\"nsPanelExpanded\\\",\\\"nsPanelCollapsed\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.changeStyleClass(this.__baseComponent,\\\"nsPanelCollapsed\\\",\\\"nsPanelExpanded\\\");\\r\\n\\t\\t\\t\\tthis.__body.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = (this.__lastHeight) ? this.__lastHeight : (this.__lastBodyHeight + this.__header.offsetHeight + \\\"px\\\");\\r\\n\\t\\t\\t\\tthis.__lastBodyHeight = 0;\\r\\n\\t\\t\\t\\teventType = NSPanel.EXPANSION_END;\\r\\n\\t\\t\\t\\tif(this.__divGhost)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.changeStyleClass(this.__divGhost,\\\"nsPanelCollapsed\\\",\\\"nsPanelExpanded\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__divGhost)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar divGhostBody = this.__divGhost.querySelector(\\\".nsPanelBody\\\");\\r\\n\\t\\t\\t\\tdivGhostBody.style.display = this.__body.style.display;\\r\\n\\t\\t\\t\\tthis.__divGhost.style.height = this.__baseComponent.style.height;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__body.style.height = \\\"\\\";\\r\\n\\t\\t\\tthis.__handleExpColIcon(direction < 0);\\r\\n\\t\\t\\tthis.__isCollapsingExpanding = false;\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),eventType,null,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__handleExpColIcon = function(isCollapsed)\\r\\n\\t{\\r\\n\\t\\tvar svgID = \\\"\\\";\\r\\n\\t\\tvar toolBarKey = \\\"\\\";\\r\\n\\t\\tif(isCollapsed)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"expand\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__EXPAND_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"collapse\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__COLLAPSE_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__setToolBarButton(toolBarKey))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = this.getID() + \\\"ExpCol\\\" + \\\"use\\\";\\r\\n\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#\\\" + svgID);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__isCollapsed = isCollapsed;\\r\\n\\t};\\r\\n\\t/******************************End of Expansion Collapse Function *************************************/\\r\\n\\t/******************************Start of Minimize Maximize Function *************************************/\\r\\n\\tNSPanel.prototype.__initializeMinMax = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__body && !this.__disableMinMax)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar fixedContainer = this.__getMinFixedContainer();\\r\\n\\t\\t\\tvar eventType = \\\"\\\";\\r\\n\\t\\t\\tif(this.__isMinimized)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//maximize\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.MAXIMIZE_STARTING,null,null);\\r\\n\\t\\t\\t\\tthis.disableDrag(false);\\r\\n\\t\\t\\t\\tthis.disableResize(false);\\r\\n\\t\\t\\t\\tthis.disableCollapse(false);\\r\\n\\t\\t\\t\\tthis.disableFullScreen(false);\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelMinimized\\\");\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelMinimized\\\" + this.__minimizedDirection);\\r\\n\\t\\t\\t\\tfixedContainer.removeChild(this.__baseComponent);\\r\\n\\t\\t\\t\\tif(this.__minimizeAddRemoveElementCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__minimizeAddRemoveElementCallback(this.__baseComponent,this.__baseComponentParent,true);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__baseComponentParent.appendChild(this.__baseComponent);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__body.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = (this.__lastHeight) ? this.__lastHeight : (this.__lastBodyHeight + this.__header.offsetHeight + \\\"px\\\");\\r\\n\\t\\t\\t\\tthis.__lastBodyHeight = 0;\\r\\n\\t\\t\\t\\teventType = NSPanel.MAXIMIZE_END;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//minimize\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.MINIMIZE_STARTING,null,null);\\r\\n\\t\\t\\t\\tthis.disableDrag(true);\\r\\n\\t\\t\\t\\tthis.disableResize(true);\\r\\n\\t\\t\\t\\tthis.disableCollapse(true);\\r\\n\\t\\t\\t\\tthis.disableFullScreen(true);\\r\\n\\t\\t\\t\\tthis.__lastBodyHeight = this.__body.offsetHeight;\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelMinimized\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelMinimized\\\" + this.__minimizedDirection);\\r\\n\\t\\t\\t\\tthis.__baseComponentParent = this.__baseComponent.parentNode;\\r\\n\\t\\t\\t\\tif(this.__minimizeAddRemoveElementCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__minimizeAddRemoveElementCallback(this.__baseComponent,this.__baseComponentParent,false);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__baseComponentParent.removeChild(this.__baseComponent);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tfixedContainer.appendChild(this.__baseComponent);\\r\\n\\t\\t\\t\\tthis.__body.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = this.__header.offsetHeight + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.__body.style.height = \\\"\\\";\\r\\n\\t\\t\\t\\teventType = NSPanel.MINIMIZE_END;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__handleMinMaxIcon(!this.__isMinimized);\\r\\n\\t\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t\\t\\tthis.__isMinimized = !this.__isMinimized;\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),eventType,null,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__handleMinMaxIcon = function(isMinimized)\\r\\n\\t{\\r\\n\\t\\tvar svgID = \\\"\\\";\\r\\n\\t\\tvar toolBarKey = \\\"\\\";\\r\\n\\t\\tif(isMinimized)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"maximize\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__MAXIMIZE_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"minimize\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__MINIMIZE_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__setToolBarButton(toolBarKey))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = this.getID() + \\\"MinMax\\\" + \\\"use\\\";\\r\\n\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#\\\" + svgID);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__getMinFixedContainer = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divMinFixedContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divMinFixedContainer = document.getElementById(\\\"nsPanelMinimizeContainer\\\");\\r\\n\\t\\t\\tif(!this.__divMinFixedContainer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divMinFixedContainer = this.util.createDiv(\\\"nsPanelMinimizeContainer\\\",\\\"nsPanelMinimizeContainer\\\");\\r\\n\\t\\t\\t\\tdocument.body.appendChild(this.__divMinFixedContainer);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__divMinFixedContainer;\\r\\n\\t};\\r\\n\\t/******************************End of Minimize Maximize Function *************************************/\\r\\n\\t/******************************Start of FullScreen Function *************************************/\\r\\n\\tNSPanel.prototype.__initializeFullScreen = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__body && !this.__disableFullScreen)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar getValue = function(element,property)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar styleProp = self.util.getStyleValue(element,property);\\r\\n\\t\\t\\t\\tif(styleProp == \\\"auto\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar rect = element.getBoundingClientRect();\\r\\n\\t\\t\\t\\t\\tstyleProp = rect[property];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstyleProp = parseInt(styleProp.substring(0,styleProp.length - 2));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn styleProp;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar windowHeight = function() \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar docElemProp = this.__context.document.documentElement.clientHeight;\\r\\n\\t\\t\\t\\tvar body = this.__context.document.body;\\r\\n\\t\\t\\t\\treturn this.__context.document.compatMode === \\\"CSS1Compat\\\" && docElemProp || body && body.clientHeight || docElemProp;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar eventType = \\\"\\\";\\r\\n\\t\\t\\tif(this.__isFullScreen)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//restore\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.RESTORE_STARTING,null,null);\\r\\n\\t\\t\\t\\tthis.disableDrag(false);\\r\\n\\t\\t\\t\\tthis.disableResize(false);\\r\\n\\t\\t\\t\\tthis.disableCollapse(false);\\r\\n\\t\\t\\t\\tthis.disableMinMax(false);\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelFullScreen\\\");\\r\\n\\t\\t\\t\\tthis.__baseComponent.setAttribute(\\\"style\\\",this.__origFullScreenDimension.baseComponentStyle);\\r\\n\\t\\t\\t\\tthis.__origFullScreenDimension.baseComponentStyle = null;\\r\\n\\t\\t\\t\\tthis.__origFullScreenDimension.baseComponentRect = null;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\teventType = NSPanel.RESTORE_END;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//fullscreen\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.FULLSCREEN_STARTING,null,null);\\r\\n\\t\\t\\t\\tthis.disableDrag(true);\\r\\n\\t\\t\\t\\tthis.disableResize(true);\\r\\n\\t\\t\\t\\tthis.disableCollapse(true);\\r\\n\\t\\t\\t\\tthis.disableMinMax(true);\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelFullScreen\\\");\\r\\n\\t\\t\\t\\tvar rect = this.__baseComponent.getBoundingClientRect();\\r\\n\\t\\t\\t\\tthis.__origFullScreenDimension.baseComponentRect = rect;\\r\\n\\t\\t\\t\\tthis.__origFullScreenDimension.baseComponentStyle = this.__baseComponent.getAttribute(\\\"style\\\");\\r\\n\\t\\t\\t\\tvar zIndex = this.__getZIndex();\\r\\n\\t\\t\\t\\tif(!isNaN(zIndex) && zIndex > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__baseComponent.style.zIndex = zIndex;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t/*var offsetWidthDialog = this.util.getOuterWidth(this.__baseComponent) - getValue(this.__baseComponent,\\\"width\\\");\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.width = (window.outerWidth - offsetWidthDialog) + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = windowHeight() + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.top = 0;\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.left = 0;\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.zIndex = zIndex;*/\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\teventType = NSPanel.FULLSCREEN_END;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__handleFullScreenIcon(!this.__isFullScreen);\\r\\n\\t\\t\\tthis.__isFullScreen = !this.__isFullScreen;\\r\\n\\t\\t\\tif(this.__bodyCompInstance)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callEditorFunction(this.__bodyCompInstance,\\\"fullScreenChanged\\\",this.__isFullScreen);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),eventType,null,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__handleFullScreenIcon = function(isFullScreen)\\r\\n\\t{\\r\\n\\t\\tvar svgID = \\\"\\\";\\r\\n\\t\\tvar toolBarKey = \\\"\\\";\\r\\n\\t\\tif(isFullScreen)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"restore\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__RESTORE_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"fullScreen\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__FULLSCREEN_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__setToolBarButton(toolBarKey))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = this.getID() + \\\"FullScreen\\\" + \\\"use\\\";\\r\\n\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#\\\" + svgID);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__callEditorFunction = function(editor,functionRef,param,defaultValue)\\r\\n\\t{\\r\\n\\t\\tif(editor && editor[functionRef] && this.util.isFunction(editor[functionRef]))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = null;\\r\\n\\t\\t\\tif(param && this.util.isArray(param) && param.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = editor[functionRef].apply(null,param);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = editor[functionRef](param);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(retValue))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn defaultValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__getAttributeKey = function(key)\\r\\n\\t{\\r\\n\\t\\treturn \\\"__\\\" + \\\"ns_panel_field\\\" + \\\"_\\\" + key;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__getZIndex = function()\\r\\n\\t{\\r\\n\\t\\t/*var zIndex = parseInt(this.util.getZIndex(this.__baseComponent));\\r\\n\\t\\tvar arrElement = document.querySelectorAll(\\\".nsPanel:not(.nsDragGhost)\\\");\\r\\n\\t\\tfor(var count = 0;count < arrElement.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar eleZIndex = parseInt(this.util.getZIndex(arrElement[count]));\\r\\n\\t\\t\\tif (eleZIndex >= zIndex && arrElement[count] != this.__baseComponent) \\r\\n\\t\\t\\t{\\r\\n\\t            zIndex = eleZIndex + 1;\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t\\treturn zIndex;*/\\r\\n\\t\\tvar maxZIndex = this.util.getMaxZIndex();\\r\\n\\t\\treturn maxZIndex;\\r\\n\\t};\\r\\n\\t/******************************End of FullScreen Function *************************************/\\r\\n\\tNSPanel.__ELEMENT_FOCUS_OUT = \\\"elementFocusOut\\\";\\r\\n\\t\\r\\n\\tNSPanel.DRAG_STARTING = \\\"dragStaring\\\";\\r\\n\\tNSPanel.DRAGGING = \\\"dragging\\\";\\r\\n\\tNSPanel.DRAG_END = \\\"dragEnd\\\";\\r\\n\\tNSPanel.RESIZE_STARTING = \\\"resizeStaring\\\";\\r\\n\\tNSPanel.RESIZING = \\\"resizing\\\";\\r\\n\\tNSPanel.RESIZE_END = \\\"resizeEnd\\\";\\r\\n\\tNSPanel.COLLAPSE_STARTING = \\\"collapseStarting\\\";\\r\\n\\tNSPanel.COLLAPSE_END = \\\"collapseEnd\\\";\\r\\n\\tNSPanel.EXPANSION_STARTING = \\\"expansionStarting\\\";\\r\\n\\tNSPanel.EXPANSION_END = \\\"expansionEnd\\\";\\r\\n\\tNSPanel.MINIMIZE_STARTING = \\\"minimizeStarting\\\";\\r\\n\\tNSPanel.MINIMIZE_END = \\\"minimizeEnd\\\";\\r\\n\\tNSPanel.MAXIMIZE_STARTING = \\\"maximizeStarting\\\";\\r\\n\\tNSPanel.MAXIMIZE_END = \\\"maximizeEnd\\\";\\r\\n\\tNSPanel.FULLSCREEN_STARTING = \\\"fullScreenStarting\\\";\\r\\n\\tNSPanel.FULLSCREEN_END = \\\"fullScreenEnd\\\";\\r\\n\\tNSPanel.RESTORE_STARTING = \\\"restoreStarting\\\";\\r\\n\\tNSPanel.RESTORE_END = \\\"restoreEnd\\\";\\r\\n\\tNSPanel.CLOSED = \\\"closed\\\";\\r\\n\\t\\r\\n\\treturn NSPanel;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSPanel\\\",NSPanel);\\\"use strict\\\";\\r\\nvar NSMessageBox = (function()\\r\\n{\\r\\n\\tfunction NSMessageBox(setting) \\r\\n\\t{\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\t\\r\\n\\t\\tthis.util = null;\\r\\n\\t\\tthis.__baseComponent = null;\\r\\n\\t\\tthis.__nsPanel = null;\\r\\n\\t\\tthis.__divContainer = null; \\r\\n\\t\\tthis.__divBody = null;\\r\\n\\t\\tthis.__divFooter = null;\\r\\n\\t\\tthis.__arrButtonInstance = [];\\r\\n\\t\\t\\r\\n\\t\\tthis.__bodyCompInstance = null;\\r\\n\\t\\tthis.__context = window;\\r\\n\\t\\tthis.__customClass = {};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initializeComponent();\\r\\n\\t};\\r\\n\\t\\t\\r\\n\\tNSMessageBox.prototype.__initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__id = \\\"comp\\\" + this.util.getUniqueId();\\r\\n\\t\\tthis.__setSetting(this.__setting);\\r\\n\\t\\tthis.__createStructure();\\r\\n\\t};\\t\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.alert = function(message,title,callback)\\r\\n\\t{\\r\\n\\t\\tif(message)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isString(message))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar setting = {\\r\\n\\t\\t\\t\\t\\tbodyContent:message,\\r\\n\\t\\t\\t\\t\\ttitle:title,\\r\\n\\t\\t\\t\\t\\tcallback:callback\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.__alert(setting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__alert(message);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.confirm = function(message,title,confirmCallback,cancelCallback)\\r\\n\\t{\\r\\n\\t\\tif(message)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isString(message))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar setting = {\\r\\n\\t\\t\\t\\t\\t\\tbodyContent:message,\\r\\n\\t\\t\\t\\t\\t\\ttitle: title,\\r\\n\\t\\t\\t\\t\\t\\tconfirm:{callback:confirmCallback},\\r\\n\\t\\t\\t\\t\\t\\tcancel:{callback:cancelCallback}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.__confirm(setting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__confirm(message);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.custom = function(setting)\\r\\n\\t{\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createMessageBox(setting);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.close = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__nsPanel)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsPanel.close();\\r\\n\\t\\t\\tthis.__nsPanel.removeComponent();\\r\\n\\t\\t\\tthis.__baseComponent = null;\\r\\n\\t\\t\\tthis.__nsPanel = null;\\r\\n\\t\\t\\tif(this.__bodyCompInstance)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callEditorFunction(this.__bodyCompInstance,\\\"destroy\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.removeModal = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__nsPanel)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsPanel.removeModal();\\r\\n\\t\\t\\tthis.__baseComponent = null;\\r\\n\\t\\t\\tthis.__nsPanel = null;\\r\\n\\t\\t\\tif(this.__bodyCompInstance)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callEditorFunction(this.__bodyCompInstance,\\\"destroy\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//btnIdentifier can be event,button,label\\r\\n\\tNSMessageBox.prototype.changeButtonStyle = function(btnIdentifier,objStyle)\\r\\n\\t{\\r\\n\\t\\tif(btnIdentifier && objStyle)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar button =  null;\\r\\n\\t\\t\\tif(btnIdentifier instanceof Event)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbutton = this.util.getTarget(btnIdentifier);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isElement(btnIdentifier) && this.util.isElementOfType(btnIdentifier,\\\"BUTTON\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbutton = btnIdentifier;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isString(btnIdentifier))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < this.__arrButtonInstance.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = this.__arrButtonInstance[count];\\r\\n\\t\\t\\t\\t\\tif(item && item.label == btnIdentifier)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tbutton = item.button;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(button)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.css(button,objStyle);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.getPanel = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__nsPanel;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.__setSetting = function(setting)\\r\\n\\t{\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"context\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__context = setting[\\\"context\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"theme\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__theme = \\\"MessageBox\\\" + setting[\\\"theme\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar customClass = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"customClass\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcustomClass = setting[\\\"customClass\\\"];\\r\\n\\t\\t\\t\\tif(!customClass)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcustomClass = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__customClass = {messageBody:customClass[\\\"messageBody\\\"] || null,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t  messageFooter:customClass[\\\"messageFooter\\\"] || null,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t  messageFooterLeft:customClass[\\\"messageFooterLeft\\\"] || null,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t  messageFooterRight:customClass[\\\"messageFooterRight\\\"] || null};\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.__createStructure = function()\\r\\n\\t{\\r\\n\\t\\tthis.__createBody();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.__createBody = function()\\r\\n\\t{\\r\\n\\t\\tthis.__divContainer = this.util.createDiv(this.__id + \\\"MessageBoxContainer\\\",\\\"nsMessageBoxContainer\\\");\\r\\n\\t\\tthis.__divBody = this.util.createDiv(this.__id + \\\"messageBody\\\",\\\"nsMessageBoxBody\\\");\\r\\n\\t\\tthis.__divFooter = this.util.createDiv(this.__id + \\\"messageFooter\\\",\\\"nsMessageBoxFooter\\\");\\r\\n\\t\\tthis.__divContainer.appendChild(this.__divBody);\\r\\n\\t\\tthis.__divContainer.appendChild(this.__divFooter);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.__createNSPanel = function(setting)\\r\\n\\t{\\r\\n\\t\\tif(!setting[\\\"customClass\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tsetting[\\\"customClass\\\"] = {};\\r\\n\\t\\t}\\r\\n\\t\\tsetting[\\\"customClass\\\"][\\\"titleBar\\\"] = setting[\\\"customClass\\\"][\\\"titleBar\\\"] ? setting[\\\"customClass\\\"][\\\"titleBar\\\"] : \\\"nsMessageBoxHeader\\\";\\r\\n\\t\\tsetting[\\\"customClass\\\"][\\\"titleBarContent\\\"] = setting[\\\"customClass\\\"][\\\"titleBarContent\\\"] ? setting[\\\"customClass\\\"][\\\"titleBarContent\\\"] : \\\"nsMessageBoxTitle\\\";\\r\\n\\t\\tif(!setting[\\\"toolBarDetails\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tsetting[\\\"toolBarDetails\\\"] = {};\\r\\n\\t\\t}\\r\\n\\t\\tsetting[\\\"toolBarDetails\\\"][\\\"close\\\"] = setting[\\\"toolBarDetails\\\"][\\\"close\\\"] ? setting[\\\"toolBarDetails\\\"][\\\"close\\\"] : {iconHTML:'<button type=\\\"button\\\" class=\\\"nsMessageBoxClose\\\">&times;</button>',title:\\\"Close\\\"};\\r\\n\\t\\tsetting[\\\"content\\\"] = this.__divContainer;\\r\\n\\t\\tsetting[\\\"template\\\"] = null;\\r\\n\\t\\tsetting[\\\"templateUrl\\\"] = null;\\r\\n\\t\\tsetting[\\\"enablePopUp\\\"] = true;\\r\\n\\t\\tsetting[\\\"enableModal\\\"] = true;\\r\\n\\t\\tthis.__nsPanel = new NSPanel(null,setting);\\r\\n\\t\\tthis.__baseComponent =  this.__nsPanel.getBaseElement();\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,NSPanel.CLOSED,this.__panelClosedHandled.bind(this));\\r\\n\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsMessageBox\\\");\\r\\n\\t\\t//this.__applyTheme(this.__baseComponent,\\\"nsMessageBox\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.__panelClosedHandled = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__baseComponent && this.__baseComponent.parentNode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__baseComponent.parentNode.removeChild(this.__baseComponent);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.__setBodyContent = function(content,templateID,templateUrl,component,componentData)\\r\\n\\t{\\r\\n\\t\\tif(this.__divBody)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divBody.innerHTML = \\\"\\\";\\r\\n\\t\\t\\tthis.__applyCustomClass(this.__divBody,\\\"messageBody\\\");\\r\\n\\t\\t\\tif(content)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isString(content))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar compSpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\tcompSpan.innerHTML = content;\\r\\n\\t\\t\\t\\t\\tthis.__divBody.appendChild(compSpan);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__divBody.appendChild(content);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(templateID && templateID.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divBody.appendChild(this.util.getTemplate(templateID));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(templateUrl && templateUrl.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tvar templateLoadHandler = function(templateText)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(templateText)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tself.__divBody.innerHTML = templateText;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tconsole.error(templateUrl + \\\" was not loaded.Please check the URL\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tvar templateErrorHandler = function(errorText)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconsole.error(templateUrl + \\\" was not loaded.Please check the URL\\\");\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.util.getTemplateFromURL(templateUrl,templateLoadHandler,templateErrorHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(component)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar callback = function(component)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__bodyCompInstance)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__bodyCompInstance = null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__bodyCompInstance = new component();\\r\\n\\t\\t\\t\\t\\tvar retVal = this.__callEditorFunction(this.__bodyCompInstance,\\\"init\\\",componentData);\\r\\n\\t\\t\\t\\t\\tvar initCallback = function(bodyCompInstance)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(!this.__bodyCompInstance) {\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__bodyCompInstance = bodyCompInstance;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tvar element = this.__bodyCompInstance.getElement();\\r\\n\\t\\t\\t\\t\\t\\tthis.__divBody.appendChild(element);\\r\\n\\t\\t\\t\\t\\t\\tthis.__callEditorFunction(this.__bodyCompInstance,\\\"elementAdded\\\");\\r\\n\\t\\t\\t\\t\\t\\tvar config = {instance: this.__bodyCompInstance,parentComp: this,element: element};\\r\\n\\t\\t\\t\\t\\t\\tthis.__bodyCompInstance[this.__getAttributeKey(\\\"config\\\")] = config;\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\tthis.util.resolveFunctionOrPromise(retVal,initCallback.bind(this));\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.util.resolveFunctionOrPromise(component,callback.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.__callEditorFunction = function(editor,functionRef,param,defaultValue)\\r\\n\\t{\\r\\n\\t\\tif(editor && editor[functionRef] && this.util.isFunction(editor[functionRef]))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = null;\\r\\n\\t\\t\\tif(param && this.util.isArray(param) && param.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = editor[functionRef].apply(null,param);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = editor[functionRef](param);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(retValue))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn defaultValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.__getAttributeKey = function(key)\\r\\n\\t{\\r\\n\\t\\treturn \\\"__\\\" + \\\"ns_msg_field\\\" + \\\"_\\\" + key;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.__setFooterContent = function(arrButtons)\\r\\n\\t{\\r\\n\\t\\tif(this.__divFooter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divFooter.innerHTML = \\\"\\\";\\r\\n\\t\\t\\tthis.__applyCustomClass(this.__divFooter,\\\"messageFooter\\\");\\r\\n\\t\\t\\tif(arrButtons)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar divLeft = this.util.createDiv(null,\\\"nsMessageBoxFooterLeft\\\");\\r\\n\\t\\t\\t\\tthis.__applyCustomClass(divLeft,\\\"messageFooterLeft\\\");\\r\\n\\t\\t\\t\\tthis.__divFooter.appendChild(divLeft);\\r\\n\\t\\t\\t\\tvar divRight = this.util.createDiv(null,\\\"nsMessageBoxFooterRight\\\");\\r\\n\\t\\t\\t\\tthis.__applyCustomClass(divRight,\\\"messageFooterRight\\\");\\r\\n\\t\\t\\t\\tthis.__divFooter.appendChild(divRight);\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar divButton = null;\\r\\n\\t\\t\\t\\tvar button = null;\\r\\n\\t\\t\\t\\tvar label =  null;\\r\\n\\t\\t\\t\\tfor(var index = 0;index < arrButtons.length;index++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = arrButtons[index];\\r\\n\\t\\t\\t\\t\\tdivButton = this.util.createDiv(null,\\\"nsMessageBoxButtonContainer\\\");\\r\\n\\t\\t\\t\\t\\tif(item[\\\"parentCssClass\\\"])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.util.addStyleClass(divButton, item[\\\"parentCssClass\\\"]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tbutton = this.util.createElement(\\\"button\\\");\\r\\n\\t\\t\\t\\t\\tlabel = item[\\\"label\\\"];\\r\\n\\t\\t\\t\\t\\tbutton.innerHTML = label;\\r\\n\\t\\t\\t\\t\\tif(item[\\\"cssClass\\\"])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tbutton.setAttribute(\\\"class\\\",item[\\\"cssClass\\\"]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(item[\\\"callback\\\"])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.util.addEvent(button,\\\"click\\\",item[\\\"callback\\\"]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tdivButton.appendChild(button);\\r\\n\\t\\t\\t\\t\\tthis.__arrButtonInstance.push({button: button,divButton: divButton,item: item,label: label});\\r\\n\\t\\t\\t\\t\\tif(item[\\\"horizontalAlign\\\"] || item[\\\"horizontalAlign\\\"] == \\\"left\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdivLeft.appendChild(divButton);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdivRight.appendChild(divButton);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.__applyCustomClass = function(element,type)\\r\\n\\t{\\r\\n\\t\\tif(element && type && this.__customClass[type])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(element,this.__customClass[type]);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.__createMessageBox = function(setting)\\r\\n\\t{\\r\\n\\t\\tif(this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrKeys = Object.keys(this.__setting);\\r\\n\\t\\t\\tfor(var index = 0;index < arrKeys.length;index++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isUndefinedOrNull(setting[arrKeys[index]]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsetting[arrKeys[index]] = this.__setting[arrKeys[index]];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(!setting.hasOwnProperty(\\\"theme\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tsetting[\\\"theme\\\"] = \\\"White\\\";\\r\\n\\t\\t}\\r\\n\\t\\tsetting[\\\"theme\\\"] = \\\"MessageBox\\\" + setting[\\\"theme\\\"];\\r\\n\\t\\tthis.__setSetting(setting);\\r\\n\\t\\tthis.__createNSPanel(setting);\\r\\n\\t\\tthis.__setBodyContent(setting[\\\"bodyContent\\\"],setting[\\\"bodyTemplate\\\"],setting[\\\"bodyTemplateUrl\\\"],setting[\\\"bodyComponent\\\"],setting[\\\"bodyComponentData\\\"]);\\r\\n\\t\\tthis.__setFooterContent(setting[\\\"buttons\\\"]);\\r\\n\\t\\tthis.__nsPanel.open();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.__alert = function(config)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar okHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = self.util.getEvent(event);\\r\\n\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t\\tself.close();\\r\\n\\t\\t\\tif(config[\\\"callback\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig[\\\"callback\\\"](event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tif(!config)\\r\\n\\t\\t{\\r\\n\\t\\t\\tconfig = {};\\r\\n\\t\\t}\\r\\n\\t\\tconfig.buttons = [{label:config[\\\"buttonLabel\\\"] || \\\"OK\\\",cssClass:config[\\\"buttonClass\\\"],parentCssClass: config[\\\"parentClass\\\"],horizontalAlign: config[\\\"horizontalAlign\\\"],callback:okHandler.bind(this)}];\\r\\n\\t\\tthis.__createMessageBox(config);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMessageBox.prototype.__confirm = function(config)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar confirmHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = self.util.getEvent(event);\\r\\n\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t\\tself.close();\\r\\n\\t\\t\\tif(config[\\\"confirm\\\"][\\\"callback\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig[\\\"confirm\\\"][\\\"callback\\\"](event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tvar cancelHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = self.util.getEvent(event);\\r\\n\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t\\tself.close();\\r\\n\\t\\t\\tif(config[\\\"cancel\\\"][\\\"callback\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig[\\\"cancel\\\"][\\\"callback\\\"](event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tif(!config)\\r\\n\\t\\t{\\r\\n\\t\\t\\tconfig = {};\\r\\n\\t\\t}\\r\\n\\t\\tif(!config[\\\"confirm\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tconfig[\\\"confirm\\\"] = {};\\r\\n\\t\\t}\\r\\n\\t\\tif(!config[\\\"cancel\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tconfig[\\\"cancel\\\"] = {};\\r\\n\\t\\t}\\r\\n\\t\\tconfig.buttons = [{label:config[\\\"confirm\\\"][\\\"label\\\"] || \\\"OK\\\",cssClass:config[\\\"confirm\\\"][\\\"cssClass\\\"] || \\\"\\\",parentCssClass: config[\\\"confirm\\\"][\\\"parentCssClass\\\"] || \\\"\\\",horizontalAlign: config[\\\"confirm\\\"][\\\"horizontalAlign\\\"],callback:confirmHandler.bind(this)},\\r\\n                \\t\\t  {label:config[\\\"cancel\\\"][\\\"label\\\"] || \\\"Cancel\\\",cssClass:config[\\\"cancel\\\"][\\\"cssClass\\\"] || \\\"\\\",parentCssClass: config[\\\"cancel\\\"][\\\"parentCssClass\\\"] || \\\"\\\",horizontalAlign: config[\\\"cancel\\\"][\\\"horizontalAlign\\\"],callback:cancelHandler.bind(this)}\\r\\n\\t\\t\\t\\t\\t\\t ];\\r\\n\\t\\tthis.__createMessageBox(config);\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSMessageBox;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSMessageBox\\\",NSMessageBox);\";","export const NSPanelCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\nvar svgRef = require('./nsSVG.min.js');\\r\\nvar NSSvg = svgRef.NSSvg;\\r\\nvar NSSvgShapes = svgRef.NSSvgShapes;\\r\\nvar plugginsRef = require('./nsPluggins.min.js');\\r\\nvar nsTextEditor = plugginsRef.nsTextEditor;\\r\\nvar nsTextAreaEditor = plugginsRef.nsTextAreaEditor;\\r\\nvar NSCellSelection = plugginsRef.NSCellSelection;\\r\\nvar NSTableCellNavigator = plugginsRef.NSTableCellNavigator;\\r\\nvar dateutilRef = require('./nsDateUtil.min.js');\\r\\nvar NSDateUtil = dateutilRef.NSDateUtil;\\r\\n\\r\\n\\t\\t}\\r\\n\\\"use strict\\\";\\r\\nvar NSPanel = (function()\\r\\n{\\r\\n\\tfunction NSPanel(component,setting) \\r\\n\\t{\\r\\n\\t\\tthis.__DEFAULT_ANIMATION_STEPS = 10;\\r\\n\\t\\tthis.__DEFAULT_ANIMATION_DELAY = 20;\\r\\n\\t\\t\\r\\n\\t\\t\\r\\n\\t\\tthis.__OUTER_CONTAINER_ID = \\\"panelContainer\\\";\\r\\n\\t\\tthis.__TITLE_CONTAINER_ID = \\\"divTitleBar\\\";\\r\\n\\t\\tthis.__BODY_CONTAINER_ID = \\\"divBody\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__CLASS_OUTER_CONTAINER = \\\"nsPanelContainer\\\";\\r\\n\\t\\tthis.__CLASS_TITLEBAR = \\\"nsPanelTitleBar\\\";\\r\\n\\t\\tthis.__CLASS_BODY_CONTAINER = \\\"nsPanelBody\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\t\\r\\n\\t\\tthis.__header = null;\\r\\n\\t\\tthis.__body = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__context = window;\\r\\n\\t\\tthis.__title = null;\\r\\n\\t\\tthis.__titleHtml = null;\\r\\n\\t\\tthis.__content = null;\\r\\n\\t\\tthis.__parent = document.body;\\r\\n\\t\\tthis.__templateID = null;\\r\\n\\t\\tthis.__templateUrl = null;\\r\\n\\t\\tthis.__contentComponent = null;\\r\\n\\t\\tthis.__contentComponentData = null;\\r\\n\\t\\tthis.__minWidth = null;\\r\\n\\t\\tthis.__minHeight = null;\\r\\n\\t\\tthis.__enablePopUp = false;\\r\\n\\t\\tthis.__enableModal = false;\\r\\n\\t\\tthis.__enableCollapse = false;\\r\\n\\t\\tthis.__enableMinimization = false;\\r\\n\\t\\tthis.__enableFullScreen = false;\\r\\n\\t\\tthis.__enableDrag = false;\\r\\n\\t\\tthis.__enableResize = false;\\r\\n\\t\\tthis.__enableTitleDblClick = false;\\r\\n\\t\\tthis.__enableMoveOnClick = false;\\r\\n\\t\\tthis.__enableModalAnimation = false;\\r\\n\\t\\tthis.__modalAnimationType = \\\"Top\\\";\\r\\n\\t\\tthis.__enableModalCloseOnOutsideClick = false;\\r\\n\\t\\tthis.__enableModalCloseOnEscape = false;\\r\\n\\t\\tthis.__enableCloseIconVisibility = true;\\r\\n\\t\\tthis.__customClass = {};\\r\\n\\t\\tthis.__toolBarDetails = {};\\r\\n\\t\\tthis.__panelSetting = {};\\r\\n\\t\\t\\r\\n\\t\\tthis.__origBaseDimension = {}; \\r\\n\\t\\tthis.__lastHeight = null;\\r\\n\\t\\tthis.__lastBodyHeight = -1;\\r\\n\\t\\tthis.__nsDragResizeElements = null;\\r\\n\\t\\tthis.__divGhost = null;\\r\\n\\t\\tthis.__divModal = null;\\r\\n\\t\\tthis.__isCollapsingExpanding = false;\\r\\n\\t\\tthis.__isCollapsed = false;\\r\\n\\t\\tthis.__isMinimized = false;\\r\\n\\t\\tthis.__isFullScreen = false;\\r\\n\\t\\tthis.__isInternalRemove = false;\\r\\n\\t\\tthis.__divOrignalChildren = null;\\r\\n\\t\\tthis.__dragExcludeElement = [];\\r\\n\\t\\tthis.__disableCollapse = false;\\r\\n\\t\\tthis.__disableMinMax = false;\\r\\n\\t\\tthis.__disableFullScreen = false;\\r\\n\\t\\tthis.__toolBarDivs = {};\\r\\n\\t\\tthis.__lastModalAnimationCss = null;\\r\\n\\t\\tthis.__bodyCompInstance = null;\\r\\n\\t\\t//Minimize Variables\\r\\n\\t\\tthis.__divMinFixedContainer = null;\\r\\n\\t\\tthis.__minimizedDirection = \\\"left\\\";\\r\\n\\t\\tthis.__baseComponentParent = null;\\r\\n\\t\\tthis.__minimizeAddRemoveElementCallback = null;\\r\\n\\t\\t//FullScreen Variables\\r\\n\\t\\tthis.__origFullScreenDimension = {baseComponentRect:null,baseComponentStyle:null};\\r\\n\\t\\t\\r\\n\\t\\tthis.__windowClickRef = null;\\r\\n\\t\\tthis.__documentKeydownRef = null;\\r\\n\\t\\tthis.__modalAnimationEndRef = null;\\r\\n\\t\\tthis.__isComponentNull = false;\\r\\n\\t\\tif(!component)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcomponent = document.createElement(\\\"div\\\");\\r\\n\\t\\t\\tcomponent.style.display = \\\"none\\\";\\r\\n\\t\\t\\tthis.__parent.appendChild(component);\\r\\n\\t\\t\\tthis.__isComponentNull = true;\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(NSContainerBase,NSPanel);\\r\\n\\tNSPanel.prototype.constructor = NSPanel;\\r\\n\\t\\r\\n\\tNSPanel.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t\\tif(this.__isComponentNull)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__baseComponent.setAttribute(\\\"id\\\",this.getID() + \\\"Panel\\\");\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createStructure();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tif(attributeName == \\\"title\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__title = newVal;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName == \\\"titleHtml\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__titleHtml = newVal;\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tif(!this.__isInternalRemove || this.__isComponentNull)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsDragResizeElements)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsDragResizeElements.destroy();\\r\\n\\t\\t\\t\\tthis.__nsDragResizeElements = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__bodyCompInstance)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callEditorFunction(this.__bodyCompInstance,\\\"destroy\\\");\\r\\n\\t\\t\\t\\tthis.__bodyCompInstance = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__windowClickRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__context,\\\"click\\\",this.__windowClickRef);\\r\\n\\t\\t\\t\\tthis.__windowClickRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__documentKeydownRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(document,\\\"keydown\\\",this.__documentKeydownRef);\\r\\n\\t\\t\\t\\tthis.__documentKeydownRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__dragExcludeElement = [];\\r\\n\\t\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__isInternalRemove = false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.base.componentResized.call(this,event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.open = function(animation)\\r\\n\\t{\\r\\n\\t\\tif(this.__isComponentNull)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createStructure();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__divModal)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableModal)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divModal.style.zIndex = this.util.getMaxZIndex() + 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableModalAnimation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__modalAnimationType = animation || this.__modalAnimationType;\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,this.__lastModalAnimationCss);\\r\\n\\t\\t\\t\\tif(animation)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar css = \\\"nsPanelModal\\\" + this.util.toCamelCase(this.__modalAnimationType,true);\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,css);\\r\\n\\t\\t\\t\\t\\tvar cssAnimationHelper = new this.util.nsCSSAnimationHelper();\\r\\n\\t\\t\\t\\t\\tthis.__modalAnimationEndRef = this.__modalAnimationEndHandler.bind(this,css,true,cssAnimationHelper);\\r\\n\\t\\t\\t\\t\\tcssAnimationHelper.addEndEvent(this.__baseComponent,this.__modalAnimationEndRef);\\r\\n\\t\\t\\t\\t\\tthis.__lastModalAnimationCss = css;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__showHideModal(true);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.close = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableModalAnimation)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cssAnimationHelper = new this.util.nsCSSAnimationHelper();\\r\\n\\t\\t\\tthis.__modalAnimationEndRef = this.__modalAnimationEndHandler.bind(this,this.__lastModalAnimationCss,false,cssAnimationHelper);\\r\\n\\t\\t\\tcssAnimationHelper.addEndEvent(this.__baseComponent,this.__modalAnimationEndRef);\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__divModal,\\\"nsPanelModalOpen\\\");\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelOpen\\\");\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__showHideModal(false);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.removeModal = function()\\r\\n\\t{\\r\\n\\t\\tthis.close();\\r\\n\\t\\tthis.removeComponent();\\r\\n\\t\\tif(this.__divModal && this.__divModal.parentNode) {\\r\\n\\t\\t\\tthis.__divModal.parentNode.removeChild(this.__divModal);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.getBaseElement = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__baseComponent;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.minimize = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.isMinimized())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeMinMax();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.maximize = function()\\r\\n\\t{\\r\\n\\t\\tif(this.isMinimized())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeMinMax();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.collapse = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.isCollapsed())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeExpCol();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.expand = function()\\r\\n\\t{\\r\\n\\t\\tif(this.isCollapsed())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeExpCol();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.fullScreen = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.isFullScreen())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeFullScreen();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.restore = function()\\r\\n\\t{\\r\\n\\t\\tif(this.isFullScreen())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeFullScreen();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableResize = function(value)\\r\\n\\t{\\r\\n\\t\\tif(this.__nsDragResizeElements)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsDragResizeElements.disableResize(value);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableDrag = function(value)\\r\\n\\t{\\r\\n\\t\\tif(this.__nsDragResizeElements)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsDragResizeElements.disableDrag(value);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableCollapse = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__disableCollapse = value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableMinMax = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__disableMinMax = value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableFullScreen = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__disableFullScreen = value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.isCollapsed = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__isCollapsed;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.isMinimized = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__isMinimized;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.isFullScreen = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__isFullScreen;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tvar setting = this.__setting;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"context\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__context = setting[\\\"context\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"title\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__title = setting[\\\"title\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"titleHtml\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__titleHtml = setting[\\\"titleHtml\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"content\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__content = setting[\\\"content\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"parent\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__parent = setting[\\\"parent\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"template\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__templateID = setting[\\\"template\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"templateUrl\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__templateUrl = setting[\\\"templateUrl\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"contentComponent\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__contentComponent = setting[\\\"contentComponent\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"contentComponentData\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__contentComponentData = setting[\\\"contentComponentData\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minWidth\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minWidth = this.util.getNumber(setting[\\\"minWidth\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minHeight\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minHeight = this.util.getNumber(setting[\\\"minHeight\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enablePopUp\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enablePopUp = Boolean.parse(setting[\\\"enablePopUp\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableModal\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableModal = Boolean.parse(setting[\\\"enableModal\\\"]);\\r\\n\\t\\t\\t\\tif(this.__enableModal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enablePopUp = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableCollapse\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableCollapse = Boolean.parse(setting[\\\"enableCollapse\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMinimization\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMinimization = Boolean.parse(setting[\\\"enableMinimization\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableFullScreen\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableFullScreen = Boolean.parse(setting[\\\"enableFullScreen\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableDrag\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableDrag = Boolean.parse(setting[\\\"enableDrag\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableResize\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableResize = Boolean.parse(setting[\\\"enableResize\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableTitleDblClick\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableTitleDblClick = Boolean.parse(setting[\\\"enableTitleDblClick\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMoveOnClick\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.__enablePopUp)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enableMoveOnClick = Boolean.parse(setting[\\\"enableMoveOnClick\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableModalAnimation\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableModalAnimation = Boolean.parse(setting[\\\"enableModalAnimation\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"modalAnimationType\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__modalAnimationType = setting[\\\"modalAnimationType\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableModalCloseOnOutsideClick\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__enableModal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enableModalCloseOnOutsideClick = Boolean.parse(setting[\\\"enableModalCloseOnOutsideClick\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableModalCloseOnEscape\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__enableModal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enableModalCloseOnEscape = Boolean.parse(setting[\\\"enableModalCloseOnEscape\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableCloseIconVisibility\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableCloseIconVisibility = this.util.isUndefinedOrNull(setting[\\\"enableCloseIconVisibility\\\"]) ? true : Boolean.parse(setting[\\\"enableCloseIconVisibility\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minimizedDirection\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minimizedDirection = setting[\\\"minimizedDirection\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"theme\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__theme = setting[\\\"theme\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minimizeAddRemoveElementCallback\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minimizeAddRemoveElementCallback = setting[\\\"minimizeAddRemoveElementCallback\\\"];\\r\\n\\t\\t\\t\\tif (typeof this.__minimizeAddRemoveElementCallback === \\\"string\\\" || this.__minimizeAddRemoveElementCallback instanceof String)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.util.isFunction(this.__minimizeAddRemoveElementCallback))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__minimizeAddRemoveElementCallback = this.__config.context[this.__minimizeAddRemoveElementCallback];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar customClass = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"customClass\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcustomClass = setting[\\\"customClass\\\"];\\r\\n\\t\\t\\t\\tif(!customClass)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcustomClass = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__customClass = {container:customClass[\\\"container\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  titleBar:customClass[\\\"titleBar\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  titleBarContent:customClass[\\\"titleBarContent\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  iconContainer:customClass[\\\"iconContainer\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  icon:customClass[\\\"icon\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  body:customClass[\\\"body\\\"] || null};\\r\\n\\t\\t\\tvar toolBarDetails = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"toolBarDetails\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolBarDetails = setting[\\\"toolBarDetails\\\"];\\r\\n\\t\\t\\t\\tif(!toolBarDetails)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttoolBarDetails = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__toolBarDetails = {\\r\\n\\t\\t\\t\\t\\tminimize:toolBarDetails[\\\"minimize\\\"] || {iconHTML:null,title:\\\"Minimize\\\"},\\r\\n\\t\\t\\t\\t\\tmaximize:toolBarDetails[\\\"maximize\\\"] || {iconHTML:null,title:\\\"Maximize\\\"},\\r\\n\\t\\t\\t\\t\\texpand:toolBarDetails[\\\"expand\\\"] || {iconHTML:null,title:\\\"Expand\\\"},\\r\\n\\t\\t\\t\\t\\tcollapse:toolBarDetails[\\\"collapse\\\"] || {iconHTML:null,title:\\\"Collapse\\\"},\\r\\n\\t\\t\\t\\t\\tfullScreen:toolBarDetails[\\\"fullScreen\\\"] || {iconHTML:null,title:\\\"FullScreen\\\"},\\r\\n\\t\\t\\t\\t\\trestore:toolBarDetails[\\\"restore\\\"] || {iconHTML:null,title:\\\"Restore\\\"},\\r\\n\\t\\t\\t\\t\\tclose:toolBarDetails[\\\"close\\\"] || {iconHTML:null,title:\\\"Close\\\"}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar panelSetting = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"panelSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tpanelSetting = setting[\\\"panelSetting\\\"];\\r\\n\\t\\t\\t\\tif(!panelSetting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tpanelSetting = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__panelSetting = {\\r\\n\\t\\t\\t\\ttop:panelSetting[\\\"top\\\"],\\r\\n\\t\\t\\t\\tleft:panelSetting[\\\"left\\\"],\\r\\n\\t\\t\\t\\twidth:panelSetting[\\\"width\\\"],\\r\\n\\t\\t\\t\\theight:panelSetting[\\\"height\\\"],\\r\\n\\t\\t\\t};\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createStructure = function()\\r\\n\\t{\\r\\n\\t\\tthis.__saveRestoreBaseComponentDimension(true);\\r\\n\\t\\tthis.__copyOrignalContent();\\r\\n\\t\\tvar arrKeys = Object.keys(this.__panelSetting);\\r\\n\\t\\tfor(var index = 0;index < arrKeys.length;index++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__panelSetting[arrKeys[index]])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__baseComponent.style[arrKeys[index]] = this.__panelSetting[arrKeys[index]];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanel\\\");\\r\\n\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelExpanded\\\");\\r\\n\\t\\tthis.__applyTheme(this.__baseComponent,\\\"nsPanel\\\");\\r\\n\\t\\tthis.__applyTheme(this.__baseComponent,\\\"nsPanelWidget\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__baseComponent,\\\"container\\\");\\r\\n\\t\\tif(this.__enableDrag)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelModalContentDrag\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enablePopUp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar parentNode = this.__parent;\\r\\n\\t\\t\\tthis.__divModal = this.__createModal();\\r\\n\\t\\t\\tthis.__isInternalRemove = true;\\r\\n\\t\\t\\tthis.__divModal.appendChild(this.__baseComponent);\\r\\n\\t\\t\\tparentNode.appendChild(this.__divModal);\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelModalContent\\\");\\r\\n\\t\\t\\tif(this.__enableModalCloseOnOutsideClick)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//this.__windowClickRef = this.__windowClickHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__divModal,\\\"click\\\",this.__modalClickHandler.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableModalCloseOnEscape)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//To detect escape button\\r\\n\\t\\t\\t\\tthis.__documentKeydownRef = this.__documentKeydownHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(document,\\\"keydown\\\",this.__documentKeydownRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__header = this.__createTitleBar(this.__baseComponent);\\r\\n\\t\\tthis.__body = this.__createBody(this.__baseComponent);\\r\\n\\t\\tthis.__lastHeight = this.util.getStyleValue(this.__baseComponent,\\\"height\\\");\\r\\n\\t\\tvar dragResizeSetting = {element:this.__baseComponent,\\r\\n\\t\\t\\t\\tenableDrag:this.__enableDrag,\\r\\n\\t\\t\\t\\tenableResize:this.__enableResize,\\r\\n\\t\\t\\t\\tenableMoveOnClick:this.__enableMoveOnClick,\\r\\n\\t\\t\\t\\tminWidth:this.__minWidth,\\r\\n\\t\\t\\t\\tminHeight:this.__minHeight,\\r\\n\\t\\t\\t\\tcreateGhostElementCallback:this.__createGhostElement.bind(this),\\r\\n\\t\\t\\t\\tenableDragContainment:true,\\r\\n\\t\\t\\t\\texcludeElement:this.__dragExcludeElement};\\r\\n\\t\\tthis.__nsDragResizeElements = new this.util.nsDragResizeElements(dragResizeSetting);\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,this.__nsDragResizeElements.DRAG_STARTING,this.__dragResizeEventHandler.bind(this));\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,this.__nsDragResizeElements.DRAG_END,this.__dragResizeEventHandler.bind(this));\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,this.__nsDragResizeElements.RESIZE_END,this.__dragResizeEventHandler.bind(this));\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,\\\"click\\\",this.__baseComponentClickHandler.bind(this));\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,NSPanel.__ELEMENT_FOCUS_OUT,this.__baseComponentFocusOutHandler.bind(this));\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__saveRestoreBaseComponentDimension = function(isSave)\\r\\n\\t{\\r\\n\\t\\tif(this.__baseComponent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrAttributeName = [\\\"class\\\",\\\"style\\\"];\\r\\n\\t\\t\\tif(isSave)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__origBaseDimension = {};\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrAttributeName.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__origBaseDimension[arrAttributeName[count]] = this.__baseComponent.getAttribute(arrAttributeName[count]); \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__origBaseDimension[\\\"children\\\"] = this.__baseComponent.children;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrAttributeName.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__baseComponent.setAttribute(arrAttributeName[count],this.__origBaseDimension[arrAttributeName[count]]); \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__origBaseDimension[\\\"children\\\"] && this.__origBaseDimension[\\\"children\\\"].length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeAllChildren(this.__baseComponent);\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < this.__origBaseDimension[\\\"children\\\"].length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__baseComponent.appendChild(this.__origBaseDimension[\\\"children\\\"][count]); \\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__origBaseDimension = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createModal = function()\\r\\n\\t{\\r\\n\\t\\tvar divModal = this.util.createDiv(this.getID() + \\\"modal\\\",\\\"nsPanelModal\\\");\\r\\n\\t\\tif(this.__enableModal)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(divModal,\\\"nsPanelModalProp\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableModalAnimation)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(divModal,\\\"nsPanelModalAnimation\\\");\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.addStyleClass(divModal,\\\"nsPanelModal\\\" + this.__theme);\\r\\n\\t\\treturn divModal;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createTitleBar = function(parentElement)\\r\\n\\t{\\r\\n\\t\\tif(parentElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar divTitleBar = this.util.createDiv(this.getID() + this.__TITLE_CONTAINER_ID,\\\"nsPanelTitleBar\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(divTitleBar,this.__CLASS_TITLEBAR);\\r\\n\\t\\t\\tthis.__applyCustomClass(divTitleBar,\\\"titleBar\\\");\\r\\n\\t\\t\\tvar divTitleBarContent = this.util.createDiv(this.getID() + this.__TITLE_CONTAINER_ID + \\\"Content\\\",\\\"nsPanelTitleBarContent\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(divTitleBarContent,\\\"titleBarContent\\\");\\r\\n\\t\\t\\tdivTitleBar.appendChild(divTitleBarContent);\\r\\n\\t\\t\\tif(this.__titleHtml && this.__titleHtml.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivTitleBarContent.innerHTML = this.__titleHtml;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__title && this.__title.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar titleText = document.createTextNode(this.__title);\\r\\n\\t\\t\\t\\tdivTitleBarContent.appendChild(titleText);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar svgShapes = new NSSvgShapes();\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar divIcon = this.util.createDiv(this.getID() + this.__TITLE_CONTAINER_ID + \\\"IconContainer\\\",\\\"nsPanelControlbar\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(divIcon,\\\"iconContainer\\\");\\r\\n\\t\\t\\tvar divButton = null;\\r\\n\\t\\t\\tif(this.__enableCollapse)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addExpandInPage();\\r\\n\\t\\t\\t\\tsvgShapes.addCollapseInPage();\\r\\n\\t\\t\\t\\tvar expColID = this.getID() + \\\"ExpCol\\\";\\r\\n\\t\\t\\t\\tvar headerDoubleClickRef = this.__headerDoubleClickHandler.bind(this);\\r\\n\\t\\t\\t\\tdivButton = this.__addToolbarIcon(divIcon,objSVG,\\\"collapse\\\",\\\"nsPanelExpColContainer\\\",expColID,\\\"nsPanelExpColIcon\\\",svgShapes.__COLLAPSE_ICON_ID,headerDoubleClickRef);\\r\\n\\t\\t\\t\\tthis.__toolBarDivs[\\\"expand\\\"] = this.__toolBarDivs[\\\"collapse\\\"] = divButton;\\r\\n\\t\\t\\t\\tif(this.__enableTitleDblClick)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(divTitleBar,\\\"dblclick\\\",headerDoubleClickRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableMinimization)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addMinimizeInPage();\\r\\n\\t\\t\\t\\tsvgShapes.addMaximizeInPage();\\r\\n\\t\\t\\t\\tvar minMaxID = this.getID() + \\\"MinMax\\\";\\r\\n\\t\\t\\t\\tdivButton = this.__addToolbarIcon(divIcon,objSVG,\\\"minimize\\\",\\\"nsPanelMinMaxContainer\\\",minMaxID,\\\"nsPanelMinMaxIcon\\\",svgShapes.__MINIMIZE_ICON_ID,this.__minimizeIconClickHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.__toolBarDivs[\\\"maximize\\\"] = this.__toolBarDivs[\\\"minimize\\\"] = divButton;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableFullScreen)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addFullScreenInPage();\\r\\n\\t\\t\\t\\tsvgShapes.addRestoreInPage();\\r\\n\\t\\t\\t\\tvar fullScreenID = this.getID() + \\\"FullScreen\\\";\\r\\n\\t\\t\\t\\tdivButton = this.__addToolbarIcon(divIcon,objSVG,\\\"fullScreen\\\",\\\"nsPanelFullScreenContainer\\\",fullScreenID,\\\"nsPanelFullScreenIcon\\\",svgShapes.__FULLSCREEN_ICON_ID,this.__fullScreenIconClickHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.__toolBarDivs[\\\"fullScreen\\\"] = this.__toolBarDivs[\\\"restore\\\"] = divButton;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enablePopUp && this.__enableCloseIconVisibility)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addCloseIcon();\\r\\n\\t\\t\\t\\tvar closeID = this.getID() + \\\"Close\\\";\\r\\n\\t\\t\\t\\tdivButton = this.__addToolbarIcon(divIcon,objSVG,\\\"close\\\",\\\"nsPanelCloseContainer\\\",closeID,\\\"nsPanelCloseIcon\\\",svgShapes.__CLOSE_ICON_ID,this.__closeIconClickHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.__toolBarDivs[\\\"close\\\"] = divButton;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdivTitleBar.appendChild(divIcon);\\r\\n\\t\\t\\tparentElement.appendChild(divTitleBar);\\r\\n\\t\\t\\treturn divTitleBar;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createBody = function(parentElement)\\r\\n\\t{\\t\\r\\n\\t\\tif(parentElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar divBody = this.util.createDiv(this.getID() + this.__BODY_CONTAINER_ID,this.__CLASS_BODY_CONTAINER);\\r\\n\\t\\t\\tthis.__applyCustomClass(divBody,\\\"body\\\");\\r\\n\\t\\t\\tif(this.__divOrignalChildren)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivBody.appendChild(this.__divOrignalChildren);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__content)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isString(this.__content))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar compSpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\tcompSpan.innerHTML = this.__content;\\r\\n\\t\\t\\t\\t\\tdivBody.appendChild(compSpan);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdivBody.appendChild(this.__content);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__templateID && this.__templateID.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivBody.appendChild(this.util.getTemplate(this.__templateID));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__templateUrl && this.__templateUrl.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tvar templateLoadHandler = function(templateText)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(templateText)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdivBody.innerHTML = templateText;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tconsole.error(self.__templateUrl + \\\" was not loaded.Please check the URL\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tvar templateErrorHandler = function(errorText)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconsole.error(self.__templateUrl + \\\" was not loaded.Please check the URL\\\");\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.util.getTemplateFromURL(this.__templateUrl,templateLoadHandler,templateErrorHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__contentComponent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar callback = function(component)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__bodyCompInstance)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__bodyCompInstance = null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__bodyCompInstance = new component();\\r\\n\\t\\t\\t\\t\\tvar retVal = this.__callEditorFunction(this.__bodyCompInstance,\\\"init\\\",this.__contentComponentData);\\r\\n\\t\\t\\t\\t\\tvar initCallback = function(bodyCompInstance)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(!this.__bodyCompInstance) {\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__bodyCompInstance = bodyCompInstance;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tvar element = this.__bodyCompInstance.getElement();\\r\\n\\t\\t\\t\\t\\t\\tdivBody.appendChild(element);\\r\\n\\t\\t\\t\\t\\t\\tthis.__callEditorFunction(this.__bodyCompInstance,\\\"elementAdded\\\");\\r\\n\\t\\t\\t\\t\\t\\tvar config = {instance: this.__bodyCompInstance,parentComp: this,element: element};\\r\\n\\t\\t\\t\\t\\t\\tthis.__bodyCompInstance[this.__getAttributeKey(\\\"config\\\")] = config;\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\tthis.util.resolveFunctionOrPromise(retVal,initCallback.bind(this));\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.util.resolveFunctionOrPromise(this.__contentComponent,callback.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tparentElement.appendChild(divBody);\\r\\n\\t\\t\\treturn divBody;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createGhostElement = function(element)\\r\\n\\t{\\r\\n\\t\\tthis.__divGhost = element.cloneNode(true);\\r\\n\\t\\tvar divPanelControlbar = this.__divGhost.querySelector(\\\".nsPanelControlbar\\\");\\r\\n\\t\\tif(divPanelControlbar)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdivPanelControlbar.parentNode.removeChild(divPanelControlbar);\\r\\n\\t\\t}\\r\\n\\t\\tvar divBody = this.__divGhost.querySelector(\\\".nsPanelBody\\\");\\r\\n\\t\\tif(divBody)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdivBody.innerHTML = \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__divGhost;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__modalClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\tif(target !== this.__baseComponent && !this.__baseComponent.contains(target))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.close();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__documentKeydownHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tif (event.keyCode === this.util.KEYCODE[\\\"ESC\\\"]) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.close();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__copyOrignalContent = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__baseComponent && this.__baseComponent.childNodes.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divOrignalChildren = this.util.createDiv(this.getID() + \\\"orignalChildren\\\");\\r\\n\\t\\t\\twhile (this.__baseComponent.childNodes.length > 0) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divOrignalChildren.appendChild(this.__baseComponent.childNodes[0]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__headerDoubleClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__initializeExpCol();\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__minimizeIconClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__initializeMinMax();\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__fullScreenIconClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__initializeFullScreen();\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__closeIconClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.close();\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__modalAnimationEndHandler = function(css,show,cssAnimationHelper,event)\\r\\n\\t{\\r\\n\\t\\tcssAnimationHelper.removeEndEvent(this.__baseComponent,this.__modalAnimationEndRef);\\r\\n\\t\\tthis.__modalAnimationEndRef = null;\\r\\n\\t\\tif(show)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//this.util.removeStyleClass(this.__baseComponent,css);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__showHideModal(false);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__dragResizeEventHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(event.eventName === NSPanel.DRAG_STARTING)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar target = event.detail;\\r\\n\\t\\t\\tif(target && (this.util.hasStyleClass(target,\\\"nsPanelMinMaxContainer\\\")))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.preventDefault(event);\\r\\n\\t\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse if(event.eventName === NSPanel.DRAG_END)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t\\t}\\r\\n\\t\\telse if(event.eventName === NSPanel.RESIZE_END)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__lastHeight = this.util.getStyleValue(this.__baseComponent,\\\"height\\\");\\r\\n\\t\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__baseComponentClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tconsole.log(\\\"__baseComponentClickHandler \\\" + this.__baseComponent.id);\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar currentPanel,highlightedPanel;\\r\\n\\t\\tvar arrElement = document.querySelectorAll(\\\".nsPanel:not(.nsDragGhost)\\\");\\r\\n\\t\\tvar currentPanelParent = currentPanel =  this.__baseComponent;\\r\\n\\t\\tvar highlightedPanelParent = highlightedPanel = arrElement[arrElement.length - 1];\\r\\n\\t\\t//if popup then select its parent\\r\\n\\t\\tif(this.__divModal && highlightedPanel)\\r\\n\\t\\t{\\r\\n\\t\\t\\thighlightedPanelParent = highlightedPanel.parentNode;\\r\\n\\t\\t\\tcurrentPanelParent = this.__divModal;\\r\\n\\t\\t\\t//below line stops click handler of button on Panel\\r\\n\\t\\t\\t//event.stopPropagation();\\r\\n\\t\\t}\\r\\n\\t\\tif(highlightedPanelParent != currentPanelParent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.insertAfterElement(highlightedPanelParent,currentPanelParent);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t\\tif(highlightedPanel)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.dispatchEvent(highlightedPanel,NSPanel.__ELEMENT_FOCUS_OUT,null,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__baseComponentFocusOutHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tconsole.log(\\\"__baseComponentFocusOutHandler \\\" + this.__baseComponent.id);\\r\\n\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__addToolbarIcon = function(divIcon,objSVG,toolbarKey,containerClass,iconID,svgClass,svgShapeIconID,clickHandler)\\r\\n\\t{\\r\\n\\t\\tvar divButton = this.util.createDiv(null,\\\"nsPanelControlButton\\\");\\r\\n\\t\\tthis.util.addStyleClass(divButton,containerClass);\\r\\n\\t\\tthis.__applyCustomClass(divButton,\\\"icon\\\");\\r\\n\\t\\tif(!this.__setToolBarButton(toolbarKey,divButton))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar svg = objSVG.addSVG(divButton,iconID,svgClass,null,null,null,null,null,null,true);\\r\\n\\t\\t\\tobjSVG.addUse(svg,iconID + \\\"use\\\",svgClass + \\\"Use\\\",\\\"#\\\" + svgShapeIconID);\\r\\n\\t\\t}\\r\\n\\t\\tdivIcon.appendChild(divButton);\\r\\n\\t\\tthis.util.addEvent(divButton,\\\"click\\\",clickHandler);\\r\\n\\t\\tthis.__dragExcludeElement.push(divButton);\\r\\n\\t\\treturn divButton;\\r\\n\\t};\\r\\n\\t//call this function if svg icons are used and container changes its parent because of IE issue\\r\\n\\tNSPanel.prototype.__refreshToolbarIcon = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__toolBarDivs)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var key in this.__toolBarDivs)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar div = this.__toolBarDivs[key];\\r\\n\\t\\t\\t\\tif(div && div.children.length > 0 && div.children[0].nodeName == \\\"svg\\\" && div.children[0].childNodes.length > 0 && div.children[0].childNodes[0].nodeName == \\\"use\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar use = div.children[0].childNodes[0];\\r\\n\\t\\t\\t\\t\\tuse.setAttribute(\\\"xlink:href\\\",use.getAttribute(\\\"xlink:href\\\"));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__setToolBarButton = function(toolbarKey,divButton)\\r\\n\\t{\\r\\n\\t\\tvar isIconFound = false;\\r\\n\\t\\tif(!divButton)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdivButton = this.__toolBarDivs[toolbarKey];\\r\\n\\t\\t}\\r\\n\\t\\tif(divButton && this.__toolBarDetails[toolbarKey])\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__toolBarDetails[toolbarKey][\\\"iconHTML\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivButton.innerHTML = this.__toolBarDetails[toolbarKey][\\\"iconHTML\\\"];\\r\\n\\t\\t\\t\\tfor(var count = 0;count < divButton.children.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdivButton.children[count].style.pointerEvents = \\\"none\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tisIconFound = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__toolBarDetails[toolbarKey][\\\"title\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivButton.setAttribute(\\\"title\\\",this.__toolBarDetails[toolbarKey][\\\"title\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn isIconFound;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__applyCustomClass = function(element,type)\\r\\n\\t{\\r\\n\\t\\tif(element && type && this.__customClass[type])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(element,this.__customClass[type]);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__showHideModal = function(show)\\r\\n\\t{\\r\\n\\t\\tif(show)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__divModal,\\\"nsPanelModalOpen\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelOpen\\\");\\r\\n\\t\\t\\tthis.__divModal.style.display = \\\"block\\\";\\r\\n\\t\\t\\tthis.__baseComponent.style.display = \\\"block\\\";\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__divModal,\\\"nsPanelModalOpen\\\");\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelOpen\\\");\\r\\n\\t\\t\\tif(this.__isComponentNull)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.removeComponent();\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(this.__baseComponent);\\r\\n\\t\\t\\t\\tif(this.__divModal && this.__divModal.parentNode)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__divModal.parentNode.removeChild(this.__divModal);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__saveRestoreBaseComponentDimension(false);\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\tthis.__parent.appendChild(this.__baseComponent);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__divModal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__divModal.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.CLOSED,this.__setting,{item: this.__setting});\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__context,NSPanel.CLOSED,this.__setting,{item: this.__setting});\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t/******************************Start of Expansion Collapse Function *************************************/\\r\\n\\tNSPanel.prototype.__initializeExpCol = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__body && !this.__isCollapsingExpanding && !this.__disableCollapse)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objBrowser = this.util.getBrowser();\\r\\n\\t\\t\\t//for some weird reason browser other than Chrome moves on click and know how to fix it\\r\\n\\t\\t\\tif(objBrowser && objBrowser.code !== \\\"chrome\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsDragResizeElements.stopMoveOnClick();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__isCollapsingExpanding = true;\\r\\n\\t\\t\\tvar isCollapsed = this.util.hasStyleClass(this.__baseComponent,\\\"nsPanelCollapsed\\\");\\r\\n\\t\\t\\tif(isCollapsed)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t// expanding\\r\\n\\t\\t\\t\\tthis.disableDrag(true);\\r\\n\\t\\t\\t\\tthis.disableResize(true);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t// collapsing\\r\\n\\t\\t\\t\\tthis.disableDrag(false);\\r\\n\\t\\t\\t\\tthis.disableResize(false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tthis.__animateExpCol(isCollapsed);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__animateExpCol = function(isExpanding)\\r\\n\\t{\\r\\n\\t\\tvar eventType = isExpanding ? NSPanel.EXPANSION_STARTING:NSPanel.COLLAPSE_STARTING;\\r\\n\\t\\tthis.util.dispatchEvent(this.getBaseElement(),eventType,null,null);\\r\\n\\t\\tthis.__body.style.display = \\\"block\\\";\\r\\n\\t\\tvar contentHeight = this.__body.offsetHeight;\\r\\n\\t\\tif (isExpanding)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__body.style.height = \\\"0px\\\";\\r\\n\\t\\t\\tcontentHeight = this.__lastBodyHeight;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__lastBodyHeight = this.__body.offsetHeight;\\r\\n\\t\\t}\\r\\n\\t\\tvar stepHeight = contentHeight / this.__DEFAULT_ANIMATION_STEPS;\\r\\n\\t\\tvar direction = (isExpanding ? 1 : -1);\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tsetTimeout(function(){self.__animateExpColStep.bind(self)(1,stepHeight,direction);}, this.__DEFAULT_ANIMATION_DELAY);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__animateExpColStep = function(iteration, stepHeight, direction)\\r\\n\\t{\\r\\n\\t\\tif (iteration < this.__DEFAULT_ANIMATION_STEPS)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__body.style.height = Math.round(((direction > 0) ? iteration : 10 - iteration) * stepHeight) +\\\"px\\\";\\r\\n\\t\\t\\titeration++;\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tsetTimeout(function(){self.__animateExpColStep.bind(self)(iteration,stepHeight,direction);}, this.__DEFAULT_ANIMATION_DELAY);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar eventType = \\\"\\\";\\r\\n\\t\\t\\tif(direction < 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.changeStyleClass(this.__baseComponent,\\\"nsPanelExpanded\\\",\\\"nsPanelCollapsed\\\");\\r\\n\\t\\t\\t\\tthis.__body.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = this.__header.offsetHeight + \\\"px\\\";\\r\\n\\t\\t\\t\\teventType = NSPanel.COLLAPSE_END;\\r\\n\\t\\t\\t\\tif(this.__divGhost)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.changeStyleClass(this.__divGhost,\\\"nsPanelExpanded\\\",\\\"nsPanelCollapsed\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.changeStyleClass(this.__baseComponent,\\\"nsPanelCollapsed\\\",\\\"nsPanelExpanded\\\");\\r\\n\\t\\t\\t\\tthis.__body.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = (this.__lastHeight) ? this.__lastHeight : (this.__lastBodyHeight + this.__header.offsetHeight + \\\"px\\\");\\r\\n\\t\\t\\t\\tthis.__lastBodyHeight = 0;\\r\\n\\t\\t\\t\\teventType = NSPanel.EXPANSION_END;\\r\\n\\t\\t\\t\\tif(this.__divGhost)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.changeStyleClass(this.__divGhost,\\\"nsPanelCollapsed\\\",\\\"nsPanelExpanded\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__divGhost)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar divGhostBody = this.__divGhost.querySelector(\\\".nsPanelBody\\\");\\r\\n\\t\\t\\t\\tdivGhostBody.style.display = this.__body.style.display;\\r\\n\\t\\t\\t\\tthis.__divGhost.style.height = this.__baseComponent.style.height;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__body.style.height = \\\"\\\";\\r\\n\\t\\t\\tthis.__handleExpColIcon(direction < 0);\\r\\n\\t\\t\\tthis.__isCollapsingExpanding = false;\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),eventType,null,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__handleExpColIcon = function(isCollapsed)\\r\\n\\t{\\r\\n\\t\\tvar svgID = \\\"\\\";\\r\\n\\t\\tvar toolBarKey = \\\"\\\";\\r\\n\\t\\tif(isCollapsed)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"expand\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__EXPAND_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"collapse\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__COLLAPSE_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__setToolBarButton(toolBarKey))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = this.getID() + \\\"ExpCol\\\" + \\\"use\\\";\\r\\n\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#\\\" + svgID);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__isCollapsed = isCollapsed;\\r\\n\\t};\\r\\n\\t/******************************End of Expansion Collapse Function *************************************/\\r\\n\\t/******************************Start of Minimize Maximize Function *************************************/\\r\\n\\tNSPanel.prototype.__initializeMinMax = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__body && !this.__disableMinMax)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar fixedContainer = this.__getMinFixedContainer();\\r\\n\\t\\t\\tvar eventType = \\\"\\\";\\r\\n\\t\\t\\tif(this.__isMinimized)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//maximize\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.MAXIMIZE_STARTING,null,null);\\r\\n\\t\\t\\t\\tthis.disableDrag(false);\\r\\n\\t\\t\\t\\tthis.disableResize(false);\\r\\n\\t\\t\\t\\tthis.disableCollapse(false);\\r\\n\\t\\t\\t\\tthis.disableFullScreen(false);\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelMinimized\\\");\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelMinimized\\\" + this.__minimizedDirection);\\r\\n\\t\\t\\t\\tfixedContainer.removeChild(this.__baseComponent);\\r\\n\\t\\t\\t\\tif(this.__minimizeAddRemoveElementCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__minimizeAddRemoveElementCallback(this.__baseComponent,this.__baseComponentParent,true);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__baseComponentParent.appendChild(this.__baseComponent);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__body.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = (this.__lastHeight) ? this.__lastHeight : (this.__lastBodyHeight + this.__header.offsetHeight + \\\"px\\\");\\r\\n\\t\\t\\t\\tthis.__lastBodyHeight = 0;\\r\\n\\t\\t\\t\\teventType = NSPanel.MAXIMIZE_END;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//minimize\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.MINIMIZE_STARTING,null,null);\\r\\n\\t\\t\\t\\tthis.disableDrag(true);\\r\\n\\t\\t\\t\\tthis.disableResize(true);\\r\\n\\t\\t\\t\\tthis.disableCollapse(true);\\r\\n\\t\\t\\t\\tthis.disableFullScreen(true);\\r\\n\\t\\t\\t\\tthis.__lastBodyHeight = this.__body.offsetHeight;\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelMinimized\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelMinimized\\\" + this.__minimizedDirection);\\r\\n\\t\\t\\t\\tthis.__baseComponentParent = this.__baseComponent.parentNode;\\r\\n\\t\\t\\t\\tif(this.__minimizeAddRemoveElementCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__minimizeAddRemoveElementCallback(this.__baseComponent,this.__baseComponentParent,false);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__baseComponentParent.removeChild(this.__baseComponent);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tfixedContainer.appendChild(this.__baseComponent);\\r\\n\\t\\t\\t\\tthis.__body.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = this.__header.offsetHeight + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.__body.style.height = \\\"\\\";\\r\\n\\t\\t\\t\\teventType = NSPanel.MINIMIZE_END;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__handleMinMaxIcon(!this.__isMinimized);\\r\\n\\t\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t\\t\\tthis.__isMinimized = !this.__isMinimized;\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),eventType,null,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__handleMinMaxIcon = function(isMinimized)\\r\\n\\t{\\r\\n\\t\\tvar svgID = \\\"\\\";\\r\\n\\t\\tvar toolBarKey = \\\"\\\";\\r\\n\\t\\tif(isMinimized)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"maximize\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__MAXIMIZE_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"minimize\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__MINIMIZE_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__setToolBarButton(toolBarKey))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = this.getID() + \\\"MinMax\\\" + \\\"use\\\";\\r\\n\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#\\\" + svgID);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__getMinFixedContainer = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divMinFixedContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divMinFixedContainer = document.getElementById(\\\"nsPanelMinimizeContainer\\\");\\r\\n\\t\\t\\tif(!this.__divMinFixedContainer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divMinFixedContainer = this.util.createDiv(\\\"nsPanelMinimizeContainer\\\",\\\"nsPanelMinimizeContainer\\\");\\r\\n\\t\\t\\t\\tdocument.body.appendChild(this.__divMinFixedContainer);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__divMinFixedContainer;\\r\\n\\t};\\r\\n\\t/******************************End of Minimize Maximize Function *************************************/\\r\\n\\t/******************************Start of FullScreen Function *************************************/\\r\\n\\tNSPanel.prototype.__initializeFullScreen = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__body && !this.__disableFullScreen)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar getValue = function(element,property)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar styleProp = self.util.getStyleValue(element,property);\\r\\n\\t\\t\\t\\tif(styleProp == \\\"auto\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar rect = element.getBoundingClientRect();\\r\\n\\t\\t\\t\\t\\tstyleProp = rect[property];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstyleProp = parseInt(styleProp.substring(0,styleProp.length - 2));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn styleProp;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar windowHeight = function() \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar docElemProp = this.__context.document.documentElement.clientHeight;\\r\\n\\t\\t\\t\\tvar body = this.__context.document.body;\\r\\n\\t\\t\\t\\treturn this.__context.document.compatMode === \\\"CSS1Compat\\\" && docElemProp || body && body.clientHeight || docElemProp;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar eventType = \\\"\\\";\\r\\n\\t\\t\\tif(this.__isFullScreen)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//restore\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.RESTORE_STARTING,null,null);\\r\\n\\t\\t\\t\\tthis.disableDrag(false);\\r\\n\\t\\t\\t\\tthis.disableResize(false);\\r\\n\\t\\t\\t\\tthis.disableCollapse(false);\\r\\n\\t\\t\\t\\tthis.disableMinMax(false);\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelFullScreen\\\");\\r\\n\\t\\t\\t\\tthis.__baseComponent.setAttribute(\\\"style\\\",this.__origFullScreenDimension.baseComponentStyle);\\r\\n\\t\\t\\t\\tthis.__origFullScreenDimension.baseComponentStyle = null;\\r\\n\\t\\t\\t\\tthis.__origFullScreenDimension.baseComponentRect = null;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\teventType = NSPanel.RESTORE_END;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//fullscreen\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.FULLSCREEN_STARTING,null,null);\\r\\n\\t\\t\\t\\tthis.disableDrag(true);\\r\\n\\t\\t\\t\\tthis.disableResize(true);\\r\\n\\t\\t\\t\\tthis.disableCollapse(true);\\r\\n\\t\\t\\t\\tthis.disableMinMax(true);\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelFullScreen\\\");\\r\\n\\t\\t\\t\\tvar rect = this.__baseComponent.getBoundingClientRect();\\r\\n\\t\\t\\t\\tthis.__origFullScreenDimension.baseComponentRect = rect;\\r\\n\\t\\t\\t\\tthis.__origFullScreenDimension.baseComponentStyle = this.__baseComponent.getAttribute(\\\"style\\\");\\r\\n\\t\\t\\t\\tvar zIndex = this.__getZIndex();\\r\\n\\t\\t\\t\\tif(!isNaN(zIndex) && zIndex > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__baseComponent.style.zIndex = zIndex;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t/*var offsetWidthDialog = this.util.getOuterWidth(this.__baseComponent) - getValue(this.__baseComponent,\\\"width\\\");\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.width = (window.outerWidth - offsetWidthDialog) + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = windowHeight() + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.top = 0;\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.left = 0;\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.zIndex = zIndex;*/\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\teventType = NSPanel.FULLSCREEN_END;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__handleFullScreenIcon(!this.__isFullScreen);\\r\\n\\t\\t\\tthis.__isFullScreen = !this.__isFullScreen;\\r\\n\\t\\t\\tif(this.__bodyCompInstance)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callEditorFunction(this.__bodyCompInstance,\\\"fullScreenChanged\\\",this.__isFullScreen);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),eventType,null,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__handleFullScreenIcon = function(isFullScreen)\\r\\n\\t{\\r\\n\\t\\tvar svgID = \\\"\\\";\\r\\n\\t\\tvar toolBarKey = \\\"\\\";\\r\\n\\t\\tif(isFullScreen)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"restore\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__RESTORE_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"fullScreen\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__FULLSCREEN_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__setToolBarButton(toolBarKey))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = this.getID() + \\\"FullScreen\\\" + \\\"use\\\";\\r\\n\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#\\\" + svgID);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__callEditorFunction = function(editor,functionRef,param,defaultValue)\\r\\n\\t{\\r\\n\\t\\tif(editor && editor[functionRef] && this.util.isFunction(editor[functionRef]))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = null;\\r\\n\\t\\t\\tif(param && this.util.isArray(param) && param.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = editor[functionRef].apply(null,param);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = editor[functionRef](param);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(retValue))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn defaultValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__getAttributeKey = function(key)\\r\\n\\t{\\r\\n\\t\\treturn \\\"__\\\" + \\\"ns_panel_field\\\" + \\\"_\\\" + key;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__getZIndex = function()\\r\\n\\t{\\r\\n\\t\\t/*var zIndex = parseInt(this.util.getZIndex(this.__baseComponent));\\r\\n\\t\\tvar arrElement = document.querySelectorAll(\\\".nsPanel:not(.nsDragGhost)\\\");\\r\\n\\t\\tfor(var count = 0;count < arrElement.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar eleZIndex = parseInt(this.util.getZIndex(arrElement[count]));\\r\\n\\t\\t\\tif (eleZIndex >= zIndex && arrElement[count] != this.__baseComponent) \\r\\n\\t\\t\\t{\\r\\n\\t            zIndex = eleZIndex + 1;\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t\\treturn zIndex;*/\\r\\n\\t\\tvar maxZIndex = this.util.getMaxZIndex();\\r\\n\\t\\treturn maxZIndex;\\r\\n\\t};\\r\\n\\t/******************************End of FullScreen Function *************************************/\\r\\n\\tNSPanel.__ELEMENT_FOCUS_OUT = \\\"elementFocusOut\\\";\\r\\n\\t\\r\\n\\tNSPanel.DRAG_STARTING = \\\"dragStaring\\\";\\r\\n\\tNSPanel.DRAGGING = \\\"dragging\\\";\\r\\n\\tNSPanel.DRAG_END = \\\"dragEnd\\\";\\r\\n\\tNSPanel.RESIZE_STARTING = \\\"resizeStaring\\\";\\r\\n\\tNSPanel.RESIZING = \\\"resizing\\\";\\r\\n\\tNSPanel.RESIZE_END = \\\"resizeEnd\\\";\\r\\n\\tNSPanel.COLLAPSE_STARTING = \\\"collapseStarting\\\";\\r\\n\\tNSPanel.COLLAPSE_END = \\\"collapseEnd\\\";\\r\\n\\tNSPanel.EXPANSION_STARTING = \\\"expansionStarting\\\";\\r\\n\\tNSPanel.EXPANSION_END = \\\"expansionEnd\\\";\\r\\n\\tNSPanel.MINIMIZE_STARTING = \\\"minimizeStarting\\\";\\r\\n\\tNSPanel.MINIMIZE_END = \\\"minimizeEnd\\\";\\r\\n\\tNSPanel.MAXIMIZE_STARTING = \\\"maximizeStarting\\\";\\r\\n\\tNSPanel.MAXIMIZE_END = \\\"maximizeEnd\\\";\\r\\n\\tNSPanel.FULLSCREEN_STARTING = \\\"fullScreenStarting\\\";\\r\\n\\tNSPanel.FULLSCREEN_END = \\\"fullScreenEnd\\\";\\r\\n\\tNSPanel.RESTORE_STARTING = \\\"restoreStarting\\\";\\r\\n\\tNSPanel.RESTORE_END = \\\"restoreEnd\\\";\\r\\n\\tNSPanel.CLOSED = \\\"closed\\\";\\r\\n\\t\\r\\n\\treturn NSPanel;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSPanel\\\",NSPanel);\";","export const NSDividerBoxCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\n\\r\\n\\t\\t}\\r\\n \\\"use strict\\\";\\r\\n var NSDividerBox = (function()\\r\\n{\\r\\n\\tfunction NSDividerBox(component,setting) \\r\\n\\t{\\r\\n\\t\\tthis.DIRECTION_VERTICAL = \\\"vertical\\\";\\r\\n\\t\\tthis.DIRECTION_HORIZONTAL = \\\"horizontal\\\";\\r\\n\\t\\tthis.DIVIDER_DIMENSION = 6;\\r\\n\\t\\t//should be 5 to avoid overlapping of two dividers but for collapsible it is 0\\r\\n\\t\\tthis.DEFAULT_MIN_DIMENSION = 0;\\r\\n\\t\\t\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__id = null;\\r\\n\\t\\r\\n\\t\\tthis.__component = component;\\r\\n\\t\\tthis.__direction = null;\\r\\n\\t\\tthis.__ghostDivider = null;\\r\\n\\t\\tthis.__beforeOffset = 0;\\r\\n\\t\\tthis.__afterOffset = 0;\\r\\n\\t\\tthis.__enableAutoComponentResize = true;\\r\\n\\t\\tthis.__arrDivider = [];\\r\\n\\t\\tthis.__measuringProperty = null;\\r\\n\\t\\tthis.__isResizing = false;\\r\\n\\t\\tthis.__isCollapsing = false;\\r\\n\\t\\tthis.__isInternalCall = false;\\r\\n\\t\\tthis.__maxZIndex = 0;\\r\\n\\t\\r\\n\\t\\tthis.__currentDivider = null;\\r\\n\\t\\tthis.__currentDividerObject = null;\\r\\n\\t\\tthis.__offsetDimension = 0;\\r\\n\\t\\tthis.__collapsingElement = null;\\r\\n\\t\\tthis.__isFirstTimeRender = true;\\r\\n\\t\\tthis.__objOrignalMeasurement = {};\\r\\n\\t\\tthis.__holdTimeoutInterval = -1;\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentMouseMoveRef = null;\\r\\n\\t\\tthis.__documentMouseUpRef = null;\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(NSContainerBase,NSDividerBox);\\r\\n\\tNSDividerBox.prototype.constructor = NSDividerBox;\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t\\tthis.__maxZIndex = this.util.getMaxZIndex();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.resizeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.__clearHoldTime();\\r\\n\\t\\tif(this.__component && !this.__isCollapsing && !this.__isResizing)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isInternalCall = true;\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.__holdTimeoutInterval = setTimeout(function () {\\r\\n\\t\\t         self.__createComponents.bind(self)();\\r\\n\\t\\t       },200);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tif(this.__enableAutoComponentResize)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.resizeComponent();\\r\\n\\t\\t}\\r\\n\\t\\t//console.log(\\\"In DividerBox componentResized with direction \\\" + this.__direction);\\r\\n\\t\\tthis.base.componentResized.call(this,event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.hasAttribute = function(attributeName)\\r\\n\\t{\\r\\n\\t\\treturn (this.__setting.hasOwnProperty(attributeName) || this.__setting.hasOwnProperty(attributeName.toLowerCase()));\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.getAttribute = function(attributeName)\\r\\n\\t{\\r\\n\\t\\tvar value = this.__setting[attributeName];\\r\\n\\t\\tif(this.util.isUndefined(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvalue = this.__setting[attributeName.toLowerCase()];\\r\\n\\t\\t}\\r\\n\\t\\treturn value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.removeComponent = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__documentMouseMoveRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mousemove\\\",this.__documentMouseMoveRef);\\r\\n\\t\\t\\tthis.__documentMouseMoveRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__documentMouseUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mouseup\\\",this.__documentMouseUpRef);\\r\\n\\t\\t\\tthis.__documentMouseUpRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.removeComponent();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__setSetting = function ()\\r\\n\\t{\\r\\n\\t\\tif(this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"direction\\\")) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__direction = this.getAttribute(\\\"direction\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"beforeOffset\\\")) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__beforeOffset = parseFloat(this.getAttribute(\\\"beforeOffset\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"afterOffset\\\")) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__afterOffset =  parseFloat(this.getAttribute(\\\"afterOffset\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"labelClass\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.label,this.getAttribute(\\\"labelClass\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableAutoComponentResize\\\")) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableAutoComponentResize =  Boolean.parse(this.getAttribute(\\\"enableAutoComponentResize\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__component)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__createComponents();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__createComponents = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__direction == this.DIRECTION_HORIZONTAL)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setVariables(true);\\r\\n\\t\\t\\tthis.__setHorizontalComponents();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setVariables(false);\\r\\n\\t\\t\\tthis.__setVerticalComponents();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__setVariables = function(isHorizontal)\\r\\n\\t{\\r\\n\\t\\tvar arrDivider = this.__component.querySelectorAll(\\\".nsDivider\\\");\\r\\n\\t\\tif(arrDivider && arrDivider.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar element = null;\\r\\n\\t\\t\\tfor(var count = arrDivider.length - 1;count >= 0;count--)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\telement = arrDivider[count];\\r\\n\\t\\t\\t\\tif(element.parentNode === this.__component)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__component.removeChild(element);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar property = \\\"\\\";\\r\\n\\t\\tif(isHorizontal)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__measuringProperty = \\\"top\\\";\\r\\n\\t\\t\\tproperty = \\\"height\\\";\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__measuringProperty = \\\"left\\\";\\r\\n\\t\\t\\tproperty = \\\"width\\\";\\r\\n\\t\\t}\\r\\n\\t\\tvar offset = this.util.getOffSet(this.__component);\\r\\n\\t\\tthis.__offsetDimension = offset[this.__measuringProperty];\\r\\n\\t\\t//console.log(this.__direction + \\\" offset is \\\" + this.__offsetDimension);\\r\\n\\t\\tvar children = this.__component.children;\\r\\n\\t\\tvar child = null;\\r\\n\\t\\tif(this.__isFirstTimeRender)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isFirstTimeRender = false;\\r\\n\\t\\t\\tfor (var count = 0; count < children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tchild = children[count];\\r\\n\\t\\t\\t\\tif(!this.util.hasStyleClass(child,\\\"nsResizeDetector\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(!child.getAttribute(\\\"id\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tchild.setAttribute(\\\"id\\\",\\\"compNS\\\" + this.util.getUniqueId())\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t//console.log(child.getAttribute(\\\"id\\\") + \\\" \\\" + property + \\\" is \\\" + this.util.getStyleValue(child,property,true));\\r\\n\\t\\t\\t\\t\\tthis.__objOrignalMeasurement[child.getAttribute(\\\"id\\\")] = this.util.getStyleValue(child,property,true);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor (var count = 0; count < children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tchild = children[count];\\r\\n\\t\\t\\t\\tif(!this.util.hasStyleClass(child,\\\"nsResizeDetector\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchild.style[property] = this.__objOrignalMeasurement[child.getAttribute(\\\"id\\\")];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__setHorizontalComponents = function() \\r\\n\\t{\\r\\n\\t\\tthis.__setComponent(\\\"height\\\",\\\"minHeight\\\",\\\"nsHorizontal\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__setVerticalComponents = function() \\r\\n\\t{\\r\\n\\t\\tthis.__setComponent(\\\"width\\\",\\\"minWidth\\\",\\\"nsVertical\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\t//dimensionProperty will be height,width\\r\\n\\t//minDimensionProperty will be minHeight,minWidth\\r\\n\\t//cssClassPrefix will be \\\"nsHorizontal\\\" and \\\"nsVertical\\\"\\r\\n\\tNSDividerBox.prototype.__setComponent = function(dimensionProperty,minDimensionProperty,cssClassPrefix) \\r\\n\\t{\\r\\n\\t\\tthis.util.addStyleClass(this.__component,cssClassPrefix + \\\"ResizerContainer\\\");\\r\\n\\t\\tvar children = this.__component.children;\\r\\n\\t\\tvar arrChildElement = [];\\r\\n\\t\\tvar childCount = -1;\\r\\n\\t\\tvar child = null;\\r\\n\\t\\tvar dimension = null;\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tfor (var count = 0; count < children.length; count++) \\r\\n\\t\\t{\\r\\n\\t\\t\\tchild = children[count];\\r\\n\\t\\t\\tif(!this.util.hasStyleClass(child,\\\"nsResizeDetector\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdimension = child.getBoundingClientRect();\\r\\n\\t\\t\\t\\tif((dimension.width === 0 || dimension.height === 0) && (!this.util.isElementVisible(child)))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar clonedElement = child.cloneNode(true);\\r\\n\\t\\t\\t\\t\\tdocument.body.appendChild(clonedElement);\\r\\n\\t\\t\\t\\t\\tdimension = clonedElement.getBoundingClientRect();\\r\\n\\t\\t\\t\\t\\tdocument.body.removeChild(clonedElement);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem = {child:child,dimension:dimension};\\r\\n\\t\\t\\t\\tarrChildElement[++childCount] = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar totalDimensionAllocated = 0;\\r\\n\\t\\tvar expectedChildDimension = 0;\\r\\n\\t\\tvar childDimension = 0;\\r\\n\\t\\tvar offsetDimension = 0;\\r\\n\\t\\tvar minDimension = 0;\\r\\n\\t\\tfor (var count = 0; count < arrChildElement.length; count++) \\r\\n\\t\\t{\\r\\n\\t\\t\\titem = arrChildElement[count];\\r\\n\\t\\t\\tchild = item.child;\\r\\n\\t\\t\\texpectedChildDimension = item.dimension[dimensionProperty];\\r\\n\\t\\t\\tchild.setAttribute(\\\"ns-collapsible\\\",true);\\r\\n\\t\\t\\tchild.setAttribute(\\\"ns-collapsed\\\",false);\\r\\n\\t\\t\\tthis.util.addStyleClass(child,\\\"nsResizerChild\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(child,cssClassPrefix + \\\"ResizerChild\\\");\\r\\n\\t\\t\\t//substracting the dimension of the divider from its calculated dimension \\r\\n\\t\\t\\tif(count < arrChildElement.length - 1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\texpectedChildDimension = expectedChildDimension - this.DIVIDER_DIMENSION;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tchildDimension = expectedChildDimension;\\r\\n\\t\\t\\tchild.style[this.__measuringProperty] = totalDimensionAllocated + \\\"px\\\";\\r\\n\\t\\t\\tchild.style[dimensionProperty] = childDimension + \\\"px\\\";\\r\\n\\t\\t\\tminDimension = this.DEFAULT_MIN_DIMENSION;\\r\\n\\t\\t\\toffsetDimension = 0;\\r\\n\\t\\t\\tif(child.style[minDimensionProperty])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tminDimension = this.util.getDimensionAsNumber(child,child.style[minDimensionProperty]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\toffsetDimension = totalDimensionAllocated;\\r\\n\\t\\t\\tif(count === 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\toffsetDimension -= this.__beforeOffset;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar objDivider = {beforeElement:child, afterElement:null, \\r\\n\\t\\t\\t\\t\\t\\t\\t  beforeElementMinDimension:minDimension, afterElementMinDimension:0,\\r\\n\\t\\t\\t\\t\\t  \\t\\t  beforeElementTopDimension:offsetDimension,afterElementTopDimension:0,\\r\\n\\t\\t\\t\\t\\t  \\t\\t  beforeElementNextSiblingTop:offsetDimension,afterElementNextSiblingTop:0,\\r\\n\\t\\t\\t\\t\\t  \\t\\t  orignalBeforeElementDimension:0,orignalAfterElementDimension:0,\\r\\n\\t\\t\\t\\t\\t  \\t\\t  fromDimension:offsetDimension + minDimension,toDimension:0,\\r\\n\\t\\t\\t\\t\\t  \\t\\t  lastPositiontop:-1,lastPositionleft:-1,collapseElementString:\\\"before\\\"};\\r\\n\\t\\t\\ttotalDimensionAllocated += childDimension;\\r\\n\\t\\t\\tobjDivider.orignalBeforeElementDimension = totalDimensionAllocated;\\r\\n\\t\\t\\tobjDivider.beforeElementNextSiblingTop = totalDimensionAllocated;\\r\\n\\t\\t\\tif(count != 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//setting the next element for previous Divider for global Divider Array\\r\\n\\t\\t\\t\\tvar prevDividerID = this.__getDividerID(count - 1);\\r\\n\\t\\t\\t\\tvar objPrevDivider = this.__arrDivider[prevDividerID];\\r\\n\\t\\t\\t\\tobjPrevDivider.afterElement = child;\\r\\n\\t\\t\\t\\tif(count === arrChildElement.length - 1 && count > 1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjPrevDivider.collapseElementString = \\\"after\\\";\\r\\n\\t\\t\\t\\t\\ttotalDimensionAllocated += this.__afterOffset;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tobjPrevDivider.afterElementMinDimension = minDimension;\\r\\n\\t\\t\\t\\tobjPrevDivider.orignalAfterElementDimension = totalDimensionAllocated;\\r\\n\\t\\t\\t\\tobjPrevDivider.afterElementTopDimension = offsetDimension;\\r\\n\\t\\t\\t\\tobjPrevDivider.toDimension = totalDimensionAllocated;\\r\\n\\t\\t\\t\\tobjPrevDivider.afterElementNextSiblingTop = totalDimensionAllocated;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tthis.__arrDivider[prevDividerID] = objPrevDivider;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(count < arrChildElement.length - 1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar divider = this.__getDivider(count,arrChildElement.length - 2,cssClassPrefix);\\r\\n\\t\\t\\t\\tvar dividerDimension = this.DIVIDER_DIMENSION;\\r\\n\\t\\t\\t\\tdivider.style[dimensionProperty] = dividerDimension + \\\"px\\\";\\r\\n\\t\\t\\t\\tdivider.style[this.__measuringProperty] = totalDimensionAllocated + \\\"px\\\";\\r\\n\\t\\t\\t\\ttotalDimensionAllocated += dividerDimension;\\r\\n\\t\\t\\t\\tthis.util.addEvent(divider,\\\"mousedown\\\",this.__dividerMouseDownHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.__component.insertBefore(divider,objDivider.afterElement);\\r\\n\\t\\t\\t\\t//setting the global Divider Array\\r\\n\\t\\t\\t\\tthis.__arrDivider[divider.id] = objDivider;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__dividerMouseDownHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar divider = this.util.getTarget(event);\\r\\n\\t\\tif(divider)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.hasStyleClass(divider,\\\"nsResizerLines\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.util.hasStyleClass(divider,\\\"nsDivider\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdivider = this.util.findParentBySelector(divider,\\\".nsDivider\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(divider)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__createGhost(divider,event);\\r\\n\\t\\t\\t\\t\\tvar objDivider = this.__arrDivider[divider.id];\\r\\n\\t\\t\\t\\t\\tobjDivider.beforeElement.setAttribute(\\\"ns-collapsed\\\",false);\\r\\n\\t\\t\\t\\t\\tobjDivider.lastPositiontop = -1;\\r\\n\\t\\t\\t\\t\\tobjDivider.lastPositionleft = -1;\\r\\n\\t\\t\\t\\t\\tthis.__currentDivider = divider;\\r\\n\\t\\t\\t\\t\\tthis.__currentDividerObject = objDivider;\\r\\n\\t\\t\\t\\t\\tthis.__documentMouseMoveRef = this.__documentMouseMoveHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.__documentMouseUpRef = this.__documentMouseUpHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document,\\\"mousemove\\\",this.__documentMouseMoveRef);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document,\\\"mouseup\\\",this.__documentMouseUpRef);\\r\\n\\t\\t\\t\\t\\tthis.__isResizing = true;\\r\\n\\t\\t\\t\\t\\tthis.__isInternalCall = true;\\r\\n\\t\\t\\t\\t\\tthis.util.preventDefault(event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__documentMouseMoveHandler = function (event) \\r\\n\\t{\\r\\n\\t\\tif(this.__isResizing)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar posEvent = this.util.getEventPosition(event);\\r\\n\\t\\t\\tthis.__ghostDivider.style[this.__measuringProperty] = posEvent[this.__measuringProperty] + \\\"px\\\";\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__documentMouseUpHandler = function (event) \\r\\n\\t{\\r\\n\\t\\tif(this.__documentMouseMoveRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mousemove\\\",this.__documentMouseMoveRef);\\r\\n\\t\\t\\tthis.__documentMouseMoveRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__documentMouseUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mouseup\\\",this.__documentMouseUpRef);\\r\\n\\t\\t\\tthis.__documentMouseUpRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__isResizing)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__performResize(event);\\r\\n\\t\\t\\tif(this.__ghostDivider)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__ghostDivider.parentNode.removeChild(this.__ghostDivider);\\r\\n\\t\\t\\t\\tthis.__ghostDivider = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__isResizing = false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__collapserClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParentBySelector(target,\\\".nsDivider\\\");\\r\\n\\t\\tif(target)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objDivider = this.__arrDivider[target.id];\\r\\n\\t\\t\\tif(objDivider)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar elementProperty = objDivider.collapseElementString + \\\"Element\\\";\\r\\n\\t\\t\\t\\tvar dimensionProperty = ((objDivider.collapseElementString === \\\"before\\\") ? \\\"fromDimension\\\" : \\\"toDimension\\\");\\r\\n\\t\\t\\t\\tif(Boolean.parse(objDivider[elementProperty].getAttribute(\\\"ns-collapsible\\\")))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__currentDivider = target;\\r\\n\\t\\t\\t\\t\\tthis.__currentDividerObject = objDivider;\\r\\n\\t\\t\\t\\t\\tvar element = objDivider[elementProperty];\\r\\n\\t\\t\\t\\t\\tthis.__collapsingElement = element;\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(target,\\\"nsResizerAnimation\\\");\\r\\n\\t\\t\\t\\t\\tobjDivider.beforeElement ? this.util.addStyleClass(objDivider.beforeElement,\\\"nsResizerAnimation\\\"):null;\\r\\n\\t\\t\\t\\t\\tobjDivider.afterElement ? this.util.addStyleClass(objDivider.afterElement,\\\"nsResizerAnimation\\\") : null;\\r\\n\\t\\t\\t\\t\\tnew this.util.transition(target,this.__animationHandler.bind(this));\\r\\n\\t\\t\\t\\t\\tnew this.util.transition(objDivider.beforeElement,this.__animationHandler.bind(this));\\r\\n\\t\\t\\t\\t\\tnew this.util.transition(objDivider.afterElement,this.__animationHandler.bind(this));\\r\\n\\t\\t\\t\\t\\tvar isCollapsed = Boolean.parse(element.getAttribute(\\\"ns-collapsed\\\"));\\r\\n\\t\\t\\t\\t\\tthis.__isCollapsing = true;\\r\\n\\t\\t\\t\\t\\tif(isCollapsed)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\telement.style.visibility=\\\"inherit\\\";\\r\\n\\t\\t\\t\\t\\t\\tvar lastDimension = objDivider[\\\"lastPosition\\\" + this.__measuringProperty];\\r\\n\\t\\t\\t\\t\\t\\tthis.__performResize(event,lastDimension);\\r\\n\\t\\t\\t\\t\\t\\tobjDivider.lastPositiontop = -1;\\r\\n\\t\\t\\t\\t\\t\\tobjDivider.lastPositionleft = -1;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar position = this.util.getPosition(target);\\r\\n\\t\\t\\t\\t\\t\\tobjDivider.lastPositiontop = position.top;\\r\\n\\t\\t\\t\\t\\t\\tobjDivider.lastPositionleft = position.left;\\r\\n\\t\\t\\t\\t\\t\\tconsole.log(objDivider[dimensionProperty]);\\r\\n\\t\\t\\t\\t\\t\\tthis.__performResize(event,objDivider[dimensionProperty]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telement.setAttribute(\\\"ns-collapsed\\\",!isCollapsed);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.preventDefault(event);\\r\\n\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__animationHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\tif(target)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeStyleClass(target,\\\"nsResizerAnimation\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__collapsingElement && Boolean.parse(this.__collapsingElement.getAttribute(\\\"ns-collapsed\\\")))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__collapsingElement.style.visibility=\\\"hidden\\\";\\r\\n\\t\\t}\\r\\n\\t\\tthis.__isCollapsing = false;\\r\\n\\t\\tthis.__isVisible = !this.__isVisible;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__performResize = function(event,intendedPosition)\\r\\n\\t{\\r\\n\\t\\tvar objDivider = this.__currentDividerObject;\\r\\n\\t\\tif(!this.__isCollapsing)\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjDivider.beforeElement.style.visibility=\\\"inherit\\\";\\r\\n\\t\\t\\tobjDivider.afterElement.style.visibility=\\\"inherit\\\";\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__direction == this.DIRECTION_VERTICAL)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isRelative = true;\\r\\n\\t\\t\\tif(!this.util.isNumber(intendedPosition))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tintendedPosition = event.pageX;\\r\\n\\t\\t\\t\\tisRelative = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar xPos = this.__getValidVerticalPosition(intendedPosition,objDivider,isRelative);\\r\\n\\t\\t\\tif(xPos > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar expectedAfterElementWidth = objDivider.afterElementNextSiblingTop - xPos;\\r\\n\\t\\t\\t\\tthis.__currentDivider.style.left = xPos + \\\"px\\\";\\r\\n\\t\\t\\t\\tobjDivider.beforeElement.style.width = (xPos - objDivider.beforeElementTopDimension) + \\\"px\\\";\\r\\n\\t\\t\\t\\tobjDivider.afterElement.style.width = expectedAfterElementWidth + \\\"px\\\";\\r\\n\\t\\t\\t\\tobjDivider.afterElement.style.left = (xPos + this.DIVIDER_DIMENSION) + \\\"px\\\";\\r\\n\\t\\t\\t\\tconsole.log(this.__direction + \\\",\\\" + intendedPosition + \\\",\\\" + xPos + \\\",\\\" + this.__offsetDimension + \\\",\\\" + this.__currentDivider.style.left);\\r\\n\\t\\t\\t\\t//console.log(intendedPosition + \\\",\\\" + objDivider.afterElementNextSiblingTop);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse if(this.__direction == this.DIRECTION_HORIZONTAL)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isRelative = true;\\r\\n\\t\\t\\tif(!this.util.isNumber(intendedPosition))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tintendedPosition = event.pageY;\\r\\n\\t\\t\\t\\tisRelative = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar yPos = this.__getValidHorizontalPosition(intendedPosition,objDivider,isRelative);\\r\\n\\t\\t\\tif(yPos > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar expectedAfterElementHeight = objDivider.afterElementNextSiblingTop - yPos;\\r\\n\\t\\t\\t\\tthis.__currentDivider.style.top = yPos + \\\"px\\\";\\r\\n\\t\\t\\t\\tobjDivider.beforeElement.style.height = (yPos - objDivider.beforeElementTopDimension) + \\\"px\\\";\\r\\n\\t\\t\\t\\tobjDivider.afterElement.style.height = expectedAfterElementHeight + \\\"px\\\";\\r\\n\\t\\t\\t\\tobjDivider.afterElement.style.top = (yPos + this.DIVIDER_DIMENSION) + \\\"px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__recalculateDividerValues();\\r\\n\\t\\t\\r\\n\\t\\tthis.__currentDivider = null;\\r\\n\\t\\tthis.__currentDividerObject = null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__getValidVerticalPosition = function(proposedXPos,objDivider,isRelative)\\r\\n\\t{\\r\\n\\t\\tvar xPos = -1;\\r\\n\\t\\tif(proposedXPos > -1 && objDivider)\\r\\n\\t\\t{\\r\\n\\t\\t\\txPos = proposedXPos;\\r\\n\\t\\t\\tif(!isRelative)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\txPos -= this.__offsetDimension;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(xPos < objDivider.fromDimension)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\txPos = objDivider.fromDimension;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(xPos > objDivider.toDimension)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\txPos = objDivider.toDimension;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar expectedAfterElementWidth = objDivider.afterElementNextSiblingTop - xPos;\\r\\n\\t\\t\\t//mouse movement is LEFT\\r\\n\\t\\t\\tif(xPos < (objDivider.beforeElementTopDimension + objDivider.beforeElementMinDimension))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\txPos = -1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//mouse movement is RIGHT\\r\\n\\t\\t\\telse if(expectedAfterElementWidth < objDivider.afterElementMinDimension)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\txPos = -1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn xPos;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__getValidHorizontalPosition = function(proposedYPos,objDivider,isRelative)\\r\\n\\t{\\r\\n\\t\\tvar yPos = -1;\\r\\n\\t\\tif(proposedYPos > -1 && objDivider)\\r\\n\\t\\t{\\r\\n\\t\\t\\tyPos = proposedYPos;\\r\\n\\t\\t\\tif(!isRelative)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tyPos -= this.__offsetDimension;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(yPos < objDivider.fromDimension)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tyPos = objDivider.fromDimension;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(yPos > objDivider.toDimension)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tyPos = objDivider.toDimension;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar expectedAfterElementHeight = objDivider.afterElementNextSiblingTop - yPos;\\r\\n\\t\\t\\t//mouse movement is UP || \\r\\n\\t\\t\\tif(yPos < (objDivider.beforeElementTopDimension + objDivider.beforeElementMinDimension))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tyPos = -1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//mouse movement is down\\r\\n\\t\\t\\telse if(expectedAfterElementHeight < objDivider.afterElementMinDimension)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tyPos = -1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn yPos;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__recalculateDividerValues = function()\\r\\n\\t{\\r\\n\\t\\tvar count =  parseInt(this.__currentDivider.getAttribute(\\\"ns-index\\\"));\\r\\n\\t\\tvar beforeDividerID = this.__getDividerID(count - 1);\\r\\n\\t\\tvar objPrevDivider = this.__arrDivider[beforeDividerID];\\r\\n\\t\\tif(objPrevDivider)\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjPrevDivider.afterElementTopDimension = this.util.getDimensionAsNumber(objPrevDivider.afterElement,objPrevDivider.afterElement.style[this.__measuringProperty]);\\r\\n\\t\\t\\tvar dividerDimension = this.util.getDimensionAsNumber(this.__currentDivider,this.__currentDivider.style[this.__measuringProperty]);\\r\\n\\t\\t\\tobjPrevDivider.toDimension = dividerDimension - objPrevDivider.afterElementMinDimension;\\r\\n\\t\\t\\tvar nextSibling = objPrevDivider.afterElement.nextElementSibling;\\r\\n\\t\\t\\tif(nextSibling)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar nextSiblingDimension = this.util.getDimensionAsNumber(nextSibling,nextSibling.style[this.__measuringProperty]);\\r\\n\\t\\t\\t\\t//substracting this as sometimes the dimension calculation has some limitations\\r\\n\\t\\t\\t\\tobjPrevDivider.afterElementNextSiblingTop = nextSiblingDimension - this.DIVIDER_DIMENSION;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar nextDividerID = this.__getDividerID(count + 1);\\r\\n\\t\\tvar objNextDivider = this.__arrDivider[nextDividerID];\\r\\n\\t\\tif(objNextDivider)\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjNextDivider.beforeElementTopDimension = this.util.getDimensionAsNumber(objNextDivider.beforeElement,objNextDivider.beforeElement.style[this.__measuringProperty]);\\r\\n\\t\\t\\tobjNextDivider.fromDimension = objNextDivider.beforeElementTopDimension + objNextDivider.beforeElementMinDimension;\\r\\n\\t\\t\\tvar nextSibling = objNextDivider.beforeElement.nextElementSibling;\\r\\n\\t\\t\\tif(nextSibling)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar nextSiblingDimension = this.util.getDimensionAsNumber(nextSibling,nextSibling.style[this.__measuringProperty]);\\r\\n\\t\\t\\t\\tobjNextDivider.beforeElementNextSiblingTop = nextSiblingDimension;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//cssClassPrefix will be \\\"nsHorizontal\\\" and \\\"nsVertical\\\"\\r\\n\\tNSDividerBox.prototype.__getDivider = function(count,totalChild,cssClassPrefix)\\r\\n\\t{\\r\\n\\t\\tvar dividerID  = this.__getDividerID(count);\\r\\n\\t\\tvar divider = this.util.createDiv(dividerID,\\\"nsDivider\\\");\\r\\n\\t\\tthis.util.addStyleClass(divider,cssClassPrefix + \\\"Resizer\\\");\\r\\n\\t\\tdivider.setAttribute(\\\"ns-index\\\",count);\\r\\n\\t\\tif(count === 0 || count === totalChild)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar dividerLines = this.util.createElement(\\\"span\\\",null,\\\"nsResizerLines\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(dividerLines,cssClassPrefix + \\\"ResizerLines\\\");\\r\\n\\t\\t\\tdivider.appendChild(dividerLines);\\r\\n\\t\\t\\tthis.util.addEvent(dividerLines,\\\"click\\\",this.__collapserClickHandler.bind(this));\\r\\n\\t\\t\\t/*if(this.__maxZIndex > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivider.style.zIndex = this.__maxZIndex;\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t}\\r\\n\\t\\treturn divider;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__createGhost = function(divider,event)\\r\\n\\t{\\r\\n\\t\\tthis.__ghostDivider = divider.cloneNode(true);\\r\\n\\t\\tvar objDivider = this.__arrDivider[divider.id];\\r\\n\\t\\t//this.__ghostDivider.setAttribute(\\\"style\\\",\\\"{position:absolute;}\\\");\\r\\n\\t\\tvar posEvent = this.util.getEventPosition(event);\\r\\n\\t\\tvar offset = this.util.getCumulativeOffset(divider);\\r\\n\\t\\tthis.__ghostDivider.style.top = offset.y + \\\"px\\\";\\r\\n\\t\\tthis.__ghostDivider.style.left = offset.x + \\\"px\\\";\\r\\n\\t\\tvar rectDivider = divider.getBoundingClientRect();\\r\\n\\t\\tthis.__ghostDivider.style.height = rectDivider.height + \\\"px\\\";\\r\\n\\t\\tthis.__ghostDivider.style.width = rectDivider.width + \\\"px\\\";\\r\\n\\t\\tif(this.__maxZIndex > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__ghostDivider.style.zIndex = this.__maxZIndex + 1;\\r\\n\\t\\t}\\r\\n\\t\\tdocument.body.appendChild(this.__ghostDivider);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__clearHoldTime = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__holdTimeoutInterval > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tclearTimeout(this.__holdTimeoutInterval);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__holdTimeoutInterval = -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDividerBox.prototype.__getDividerID = function(count)\\r\\n\\t{\\r\\n\\t\\treturn this.getID() + \\\"#resizer\\\" + count;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSDividerBox;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSDividerBox\\\",NSDividerBox);\";","export const NSExpressionEvaluatorCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\n\\r\\n\\t\\t}\\r\\nvar NSExpressionEvaluator = (function() {\\r\\n    function NSExpressionEvaluator(setting) {\\r\\n        var self = this;\\r\\n        var oldExpression = null;\\r\\n        var nodes = [];\\r\\n        if(!setting) {\\r\\n            setting = {};\\r\\n        }\\r\\n        var config = {\\r\\n            throwErrorForUndefined: setting.throwErrorForUndefined | false\\r\\n        };\\r\\n\\t\\tvar isCustomException = false;\\r\\n\\t\\t\\r\\n\\t\\tvar operatorFunctions = {\\r\\n            '+': function(left, right) { return left + right; },\\r\\n            '-': function(left, right) { return left - right; },\\r\\n            '*': function(left, right) { return left * right; },\\r\\n            '/': function(left, right) { return left / right; },\\r\\n            '%': function(left, right) { return left % right; },\\r\\n            '**': function(left, right) { return Math.pow(left, right); },\\r\\n            '^': function(left, right) { return left ^ right; },\\r\\n            '&': function(left, right) { return left & right; },\\r\\n            '|': function(left, right) { return left | right; },\\r\\n            '<<': function(left, right) { return left << right; },\\r\\n            '>>': function(left, right) { return right >> right; },\\r\\n            '>': function(left, right) { return left > right; },\\r\\n            '<': function(left, right) { return left < right; },\\r\\n            '>=': function(left, right) { return left >= right; },\\r\\n            '<=': function(left, right) { return left <= right; },\\r\\n            '===': function(left, right) { return left === right; },\\r\\n            '!==': function(left, right) { return left !== right; },\\r\\n            '&&': function(left, right) { return left && right; },\\r\\n            '||': function(left, right) { return left || right; }\\r\\n        };\\r\\n\\r\\n        var operatorConfig = {\\r\\n            '.': { precedence: 6, associativity: 'L' },\\r\\n            '[': { precedence: 6, associativity: 'L' },\\r\\n            ']': { precedence: 6, associativity: 'L' },\\r\\n            '+': { precedence: 3, associativity: 'L' },\\r\\n            '-': { precedence: 3, associativity: 'L' },\\r\\n            '*': { precedence: 4, associativity: 'L' },\\r\\n            '/': { precedence: 4, associativity: 'L' },\\r\\n            '%': { precedence: 4, associativity: 'L' },\\r\\n            '**': { precedence: 5, associativity: 'R' },\\r\\n            '^': { precedence: 2, associativity: 'L' },\\r\\n            '&': { precedence: 1, associativity: 'L' },\\r\\n            '|': { precedence: 1, associativity: 'L' },\\r\\n            '<<': { precedence: 2, associativity: 'L' },\\r\\n            '>>': { precedence: 2, associativity: 'L' },\\r\\n            '>': { precedence: 2, associativity: 'L' },\\r\\n            '<': { precedence: 2, associativity: 'L' },\\r\\n            '>=': { precedence: 2, associativity: 'L' },\\r\\n            '<=': { precedence: 2, associativity: 'L' },\\r\\n            '===': { precedence: 1, associativity: 'L' },\\r\\n            '!==': { precedence: 1, associativity: 'L' },\\r\\n            '&&': { precedence: 0, associativity: 'L' },\\r\\n            '||': { precedence: 0, associativity: 'L' }\\r\\n        };\\r\\n\\r\\n\\r\\n        var evaluate = function(expression,model) {\\r\\n\\t\\t\\tisCustomException = false;\\r\\n\\t\\t\\ttry {\\r\\n\\t\\t\\t\\t if(expression !== oldExpression || !nodes || nodes.length === 0) {\\r\\n\\t\\t\\t\\t\\tsetExpression(expression);\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t var val = getValue(model,nodes);\\r\\n\\t\\t\\t\\t return val;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcatch(error) {\\r\\n\\t\\t\\t\\tif(!isCustomException) {\\r\\n\\t\\t\\t\\t\\t//this logic if worst case some scenario is not covered by the logic of NSExpressionEvaluator but for most of the basic scenario the below code is not required\\r\\n\\t\\t\\t\\t\\ttry {\\r\\n\\t\\t\\t\\t\\t\\tvar func = new Function('model', `with (model) { return ${expression}; }`);\\r\\n\\t\\t\\t\\t\\t\\tvar val = func(model);\\r\\n\\t\\t\\t\\t\\t\\treturn val;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tcatch(innerError) {\\r\\n\\t\\t\\t\\t\\t\\tthrow new Error(innerError);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse {\\r\\n\\t\\t\\t\\t\\tisCustomException = true;\\r\\n\\t\\t\\t\\t\\tthrow error;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n        };\\r\\n\\r\\n        var setExpression = function(expression) {\\r\\n            var tokens = getTokens(expression);\\r\\n            //console.log(tokens);\\r\\n            nodes = parseTokens(tokens);\\r\\n            //console.log(nodes);\\r\\n            oldExpression = expression;\\r\\n        };\\r\\n\\r\\n        var getTokens = function(expression) {\\r\\n\\t\\t\\tvar tokens = [];\\r\\n\\t\\t\\tvar current = '';\\r\\n\\t\\t\\tvar addToken = function() {\\r\\n\\t\\t\\t\\tif (current.length > 0) {\\r\\n\\t\\t\\t\\t\\ttokens.push(current);\\r\\n\\t\\t\\t\\t\\tcurrent = '';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar isWithinBrackets = false;\\r\\n\\t\\t\\tfor (var i = 0; i < expression.length; i++) {\\r\\n\\t\\t\\t\\tvar char = expression[i];\\r\\n\\t\\t\\t\\tif (char === ' ' || char === '\\\\t' || char === '\\\\n') {\\r\\n\\t\\t\\t\\t\\tcontinue;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif([','].includes(char) && isWithinBrackets) {\\r\\n\\t\\t\\t\\t\\taddToken();\\r\\n\\t\\t\\t\\t\\t//for now not adding , in tokens\\r\\n\\t\\t\\t\\t\\t/*current = char;\\r\\n\\t\\t\\t\\t\\taddToken();*/\\r\\n\\t\\t\\t\\t} else if (isDigit(char)) {\\r\\n\\t\\t\\t\\t\\tcurrent += char;\\r\\n\\t\\t\\t\\t} else if (isLetter(char) || (current.length > 0 && isLetter(current[0]) && char === '_')) {\\r\\n\\t\\t\\t\\t\\tcurrent += char;\\r\\n\\t\\t\\t\\t} else if (char === '(' || char === ')') {\\r\\n\\t\\t\\t\\t\\tif(char === '(') {\\r\\n\\t\\t\\t\\t\\t\\tisWithinBrackets = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse {\\r\\n\\t\\t\\t\\t\\t\\tisWithinBrackets = false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (current.length > 0) {\\r\\n\\t\\t\\t\\t\\t\\ttokens.push(current);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\ttokens.push(char);\\r\\n\\t\\t\\t\\t\\tcurrent = '';\\r\\n\\t\\t\\t\\t} else if (isOperator(expression, i)) {\\r\\n\\t\\t\\t\\t\\taddToken();\\r\\n\\t\\t\\t\\t\\tvar multiCharOp = '';\\r\\n\\t\\t\\t\\t\\t// Check for multi-character operators\\r\\n\\t\\t\\t\\t\\tif (i + 2 < expression.length) {\\r\\n\\t\\t\\t\\t\\t\\tmultiCharOp = expression.substr(i, 3);\\r\\n\\t\\t\\t\\t\\t\\tif (multiCharOp === '===' || multiCharOp === '!==') {\\r\\n\\t\\t\\t\\t\\t\\t\\ttokens.push(multiCharOp);\\r\\n\\t\\t\\t\\t\\t\\t\\ti += 2;\\r\\n\\t\\t\\t\\t\\t\\t\\tcontinue;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (i + 1 < expression.length) {\\r\\n\\t\\t\\t\\t\\t\\tmultiCharOp = expression.substr(i, 2);\\r\\n\\t\\t\\t\\t\\t\\tif (['==', '!=', '<=', '>=', '&&', '||', '**', '<<', '>>'].includes(multiCharOp)) {\\r\\n\\t\\t\\t\\t\\t\\t\\ttokens.push(multiCharOp);\\r\\n\\t\\t\\t\\t\\t\\t\\ti += 1;\\r\\n\\t\\t\\t\\t\\t\\t\\tcontinue;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\ttokens.push(char);\\r\\n\\t\\t\\t\\t} else if (char === '\\\"' || char === '\\\\'') {\\r\\n\\t\\t\\t\\t\\tvar quoteType = char;\\r\\n\\t\\t\\t\\t\\tcurrent = quoteType;\\r\\n\\t\\t\\t\\t\\ti++;\\r\\n\\t\\t\\t\\t\\twhile (i < expression.length && expression[i] !== quoteType) {\\r\\n\\t\\t\\t\\t\\t\\tcurrent += expression[i++];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tcurrent += quoteType;\\r\\n\\t\\t\\t\\t\\ttokens.push(current);\\r\\n\\t\\t\\t\\t\\tcurrent = '';\\r\\n\\t\\t\\t\\t} else if (char === '[' || char === ']' || char === '(' || char === ')' || char === '.') {\\r\\n\\t\\t\\t\\t\\taddToken();\\r\\n\\t\\t\\t\\t\\ttokens.push(char);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\taddToken();\\r\\n\\t\\t\\treturn tokens;\\r\\n\\t\\t};\\r\\n\\r\\n\\r\\n        var parseTokens = function(tokens) {\\r\\n\\t\\t\\tvar outputQueue = [];\\r\\n\\t\\t\\tvar operatorStack = [];\\r\\n\\r\\n\\t\\t\\tfor (var i = 0; i < tokens.length; i++) {\\r\\n\\t\\t\\t\\tvar token = tokens[i];\\r\\n\\t\\t\\t\\tif (!isNaN(parseFloat(token))) {\\r\\n\\t\\t\\t\\t\\toutputQueue.push(getNode('Number', parseFloat(token)));\\r\\n\\t\\t\\t\\t} else if (isQuotedString(token)) {\\r\\n\\t\\t\\t\\t\\toutputQueue.push(getNode('String', token));\\r\\n\\t\\t\\t\\t} else if (isValidStringIdentifier(token)) {\\r\\n\\t\\t\\t\\t\\t if (tokens[i+1] === '(') {\\r\\n\\t\\t\\t\\t\\t\\t// Handle function call\\r\\n\\t\\t\\t\\t\\t\\tvar funcName = token;\\r\\n\\t\\t\\t\\t\\t\\tvar args = [];\\r\\n\\t\\t\\t\\t\\t\\ti += 2; // skip function name and '('\\r\\n\\t\\t\\t\\t\\t\\twhile (tokens[i] !== ')') {\\r\\n\\t\\t\\t\\t\\t\\t\\targs.push(tokens[i]);\\r\\n\\t\\t\\t\\t\\t\\t\\ti++;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tvar paramQueue = [];\\r\\n\\t\\t\\t\\t\\t\\tif(args.length > 0) {\\r\\n\\t\\t\\t\\t\\t\\t\\tparamQueue = parseTokens(args);\\r\\n\\t\\t\\t\\t\\t\\t\\tconsole.log(args, paramQueue);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\toutputQueue.push(getNode('FunctionCall', funcName, null, null, paramQueue));\\r\\n\\t\\t\\t\\t\\t} else {\\r\\n\\t\\t\\t\\t\\t\\t\\ti = handleVariableAndAccess(i, tokens, outputQueue);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t} else if (operatorConfig[token]) {\\r\\n\\t\\t\\t\\t\\thandleOperators(token, operatorStack, outputQueue);\\r\\n\\t\\t\\t\\t} else if (token === '(') {\\r\\n\\t\\t\\t\\t\\toperatorStack.push(getNode('Operator', token));\\r\\n\\t\\t\\t\\t} else if (token === ')') {\\r\\n\\t\\t\\t\\t\\ti = handleClosingParenthesis(operatorStack, outputQueue, i);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\twhile (operatorStack.length > 0) {\\r\\n\\t\\t\\t\\toutputQueue.push(operatorStack.pop());\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn outputQueue;\\r\\n\\t\\t};\\r\\n\\r\\n\\t\\tvar handleVariableAndAccess = function(i, tokens, outputQueue) {\\r\\n\\t\\t\\tvar variable = tokens[i];\\r\\n\\t\\t\\twhile (i + 1 < tokens.length && (tokens[i + 1] === '.' || tokens[i + 1] === '[')) {\\r\\n\\t\\t\\t\\t//skip the '.' and move to the property name\\r\\n\\t\\t\\t\\tif (tokens[i + 1] === '.') {\\r\\n\\t\\t\\t\\t\\ti += 2; \\r\\n\\t\\t\\t\\t\\tvariable += '.' + tokens[i];\\r\\n\\t\\t\\t\\t//skip the '[' and move to the index\\r\\n\\t\\t\\t\\t} else if (tokens[i + 1] === '[') {\\r\\n\\t\\t\\t\\t\\ti += 2;\\r\\n\\t\\t\\t\\t\\t//skip past the ']'\\r\\n\\t\\t\\t\\t\\tvariable += '[' + tokens[i] + ']';\\r\\n\\t\\t\\t\\t\\ti++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\toutputQueue.push(getNode('Variable', variable));\\r\\n\\t\\t\\treturn i;\\r\\n\\t\\t};\\r\\n\\r\\n\\t\\tvar handleOperators = function(token, operatorStack, outputQueue) {\\r\\n\\t\\t\\tvar precedence = operatorConfig[token].precedence;\\r\\n\\t\\t\\tvar associativity = operatorConfig[token].associativity;\\r\\n\\t\\t\\twhile (operatorStack.length > 0 &&\\r\\n\\t\\t\\t\\t   operatorConfig[operatorStack[operatorStack.length - 1].value].precedence >= precedence &&\\r\\n\\t\\t\\t\\t   associativity === 'L') {\\r\\n\\t\\t\\t\\toutputQueue.push(operatorStack.pop());\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\toperatorStack.push(getNode('Operator', token));\\r\\n\\t\\t};\\r\\n\\r\\n\\t\\tvar handleClosingParenthesis = function(operatorStack, outputQueue, i) {\\r\\n\\t\\t\\twhile (operatorStack.length > 0 && operatorStack[operatorStack.length - 1].value !== '(') {\\r\\n\\t\\t\\t\\toutputQueue.push(operatorStack.pop());\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\toperatorStack.pop();\\r\\n\\t\\t\\treturn i;\\r\\n\\t\\t};\\r\\n\\r\\n        var getValue = function(model,paramNodes) {\\r\\n            var stack = [];\\r\\n\\r\\n            for(var count = 0;count < paramNodes.length;count++) {\\r\\n\\t\\t\\t\\tvar node = paramNodes[count];\\r\\n                if (node.type === 'Number') {\\r\\n                    stack.push(node.value);\\r\\n                } else if (node.type === 'String') {\\r\\n\\t\\t\\t\\t\\t//removing quotes\\r\\n                    stack.push(node.value.slice(1, -1));  \\r\\n                } else if (node.type === 'Variable') {\\r\\n\\t\\t\\t\\t\\tvar value = getVariableValue(model,node);\\r\\n\\t\\t\\t\\t\\t//console.log(value,val);\\r\\n                    stack.push(value);\\r\\n                } else if (node.type === 'FunctionCall') {\\r\\n\\t\\t\\t\\t\\tvar func = node.value;\\r\\n\\t\\t\\t\\t\\tif (!isFunction(func)) {\\r\\n\\t\\t\\t\\t\\t\\tfunc = model[node.value];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (isFunction(func)) {\\r\\n\\t\\t\\t\\t\\t\\tvar args = [];\\r\\n\\t\\t\\t\\t\\t\\tif(node.params && node.params.length > 0) {\\r\\n\\t\\t\\t\\t\\t\\t\\tfor(var paramCount = 0;paramCount < node.params.length;paramCount++) {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar param = node.params[paramCount];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar paramVal = getValue(model,[param]);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\targs.push(paramVal);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tstack.push(func.apply(null, args));\\r\\n\\t\\t\\t\\t\\t} else {\\r\\n\\t\\t\\t\\t\\t\\tthrowException(`Function ${node.value} is not defined`);\\r\\n\\t\\t\\t\\t\\t\\tstack.push(undefined);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t} else if (node.type === 'Operator') {\\r\\n                    var right = stack.pop();\\r\\n                    var left = stack.pop();\\r\\n\\t\\t\\t\\t\\tif(operatorFunctions[node.value]) {\\r\\n                        stack.push(operatorFunctions[node.value](left,right));\\r\\n                    }\\r\\n                }\\r\\n            };\\r\\n\\r\\n            return stack.pop();\\r\\n        };\\r\\n\\t\\t\\r\\n\\t\\tvar getVariableValue = function(model,node) {\\r\\n\\t\\t\\tvar value = model;\\r\\n\\t\\t\\tvar prevValue = null;\\r\\n\\t\\t\\tvar parts = node.value.split(/\\\\.|\\\\[|\\\\]/).filter(Boolean);\\r\\n\\t\\t\\tfor(var count = 0;count < parts.length;count++) {\\r\\n\\t\\t\\t\\tvar part = parts[count];\\r\\n\\t\\t\\t\\tprevValue = value;\\r\\n\\t\\t\\t\\tif (!isNaN(part)) {\\r\\n\\t\\t\\t\\t\\tvalue = value[parseInt(part)];\\r\\n\\t\\t\\t\\t} else {\\r\\n\\t\\t\\t\\t\\tvalue = value[part];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(isUndefined(value)) {\\r\\n\\t\\t\\t\\t\\tthrowException(`Value is undefined for ${part} in ${serializableToJson(prevValue)}`);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\treturn value;\\r\\n\\t\\t};\\r\\n\\r\\n        var getNode = function(type, value, left, right, params) {\\r\\n            return {type, value, left, right, params};\\r\\n        };\\r\\n\\t\\t\\r\\n\\t\\tvar throwException = function(message) {\\r\\n\\t\\t\\tif(config.throwErrorForUndefined) {\\r\\n\\t\\t\\t\\tisCustomException = true;\\r\\n\\t\\t\\t\\tthrow new Error(message);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t}\\r\\n\\r\\n        //utility methods\\r\\n        var isDigit = function(val) {\\r\\n            return val >= '0' && val <= '9';\\r\\n        };\\r\\n        var isLetter = function(val) {\\r\\n            return ((val >= 'a' && val <= 'z') || (val >= 'A' && val <= 'Z') || val === '_');\\r\\n        };\\r\\n        var isOperator = function(expr, index) {\\r\\n\\t\\t\\tvar nextChar = expr[index + 1];\\r\\n\\t\\t\\tvar currentChar = expr[index];\\r\\n\\t\\t\\tvar twoCharOp = currentChar + (nextChar || ''); // create the two-character string\\r\\n\\r\\n\\t\\t\\t// Check for two-character operators\\r\\n\\t\\t\\tif (['**', '<<', '>>', '&&', '||', '==', '!=', '<=', '>='].includes(twoCharOp)) {\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t// Check for single-character operators\\r\\n\\t\\t\\tif (\\\"+-*/%<>=!&|^\\\".includes(currentChar)) {\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\tvar isQuotedString = function(val) {\\r\\n\\t\\t\\tif (val.length >= 2) {\\r\\n\\t\\t\\t\\tvar startChar = val[0];\\r\\n\\t\\t\\t\\tvar endChar = val[val.length - 1];\\r\\n\\r\\n\\t\\t\\t\\tif ((startChar === '\\\"' || startChar === \\\"'\\\") && startChar === endChar) {\\r\\n\\t\\t\\t\\t\\t// Check for the presence of the quote character in the middle of the string\\r\\n\\t\\t\\t\\t\\tfor (let i = 1; i < val.length - 1; i++) {\\r\\n\\t\\t\\t\\t\\t\\tif (val[i] === startChar) {\\r\\n\\t\\t\\t\\t\\t\\t\\t//found the starting quote character in the middle\\r\\n\\t\\t\\t\\t\\t\\t\\treturn false; \\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar isValidStringIdentifier = function(val) {\\r\\n\\t\\t\\tif (val.length > 0) {\\r\\n\\t\\t\\t\\tvar firstChar = val[0];\\r\\n\\t\\t\\t\\tif (!(firstChar >= 'a' && firstChar <= 'z') && !(firstChar >= 'A' && firstChar <= 'Z') && firstChar !== '_') {\\r\\n\\t\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tfor (let i = 1; i < val.length; i++) {\\r\\n\\t\\t\\t\\t\\tvar char = val[i];\\r\\n\\t\\t\\t\\t\\tif (!(char >= 'a' && char <= 'z') && !(char >= 'A' && char <= 'Z') && !(char >= '0' && char <= '9') && char !== '_') {\\r\\n\\t\\t\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\r\\n        var isUndefined = function(val) {\\r\\n            return (typeof val === 'undefined');\\r\\n        };\\r\\n\\t\\tvar isFunction = function(val) {\\r\\n            return (typeof val === 'function');\\r\\n        };\\r\\n        var serializableToJson = function(val) {\\r\\n            try {\\r\\n                var res = JSON.stringify(val);\\r\\n                return res;\\r\\n            } catch (e) {\\r\\n                console.debug(e);\\r\\n            }\\r\\n            return val;\\r\\n        };\\r\\n\\r\\n        self.evaluate = evaluate;\\r\\n        self.setExpression = setExpression;\\r\\n    };\\r\\n    return NSExpressionEvaluator;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSExpressionEvaluator\\\",NSExpressionEvaluator);\";","export const NSMultiSelectDropdownCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\nvar svgRef = require('./nsSVG.min.js');\\r\\nvar NSSvg = svgRef.NSSvg;\\r\\nvar NSSvgShapes = svgRef.NSSvgShapes;\\r\\nvar plugginsRef = require('./nsPluggins.min.js');\\r\\nvar nsTextEditor = plugginsRef.nsTextEditor;\\r\\nvar nsTextAreaEditor = plugginsRef.nsTextAreaEditor;\\r\\nvar NSCellSelection = plugginsRef.NSCellSelection;\\r\\nvar NSTableCellNavigator = plugginsRef.NSTableCellNavigator;\\r\\nvar dateutilRef = require('./nsDateUtil.min.js');\\r\\nvar NSDateUtil = dateutilRef.NSDateUtil;\\r\\n\\r\\n\\t\\t}\\r\\n\\\"use strict\\\";\\r\\nvar NSFilter = (function()\\r\\n{\\r\\n\\tfunction NSFilter(data,filter,setting,recordLimit,isHierarchical,childField,filterFunction,hierarchyFilterChildren,arrIgnoreKeysInCloneDataSource) \\r\\n\\t{\\r\\n\\t\\tthis.EXACT = \\\"exact\\\";\\r\\n\\t\\tthis.STARTS_WITH = \\\"startsWith\\\";\\r\\n\\t\\tthis.ENDS_WITH = \\\"endsWith\\\";\\r\\n\\t\\tthis.CONTAINS = \\\"contains\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.IS_FOUND_FIELD = \\\"__nsFilter__found\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__data = data;\\r\\n\\t\\tthis.__filter = filter;\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__recordLimit = (parseInt(recordLimit) > 0) ? recordLimit : -1;\\r\\n\\t\\tthis.__isHierarchical = this.util.isUndefined(isHierarchical) ? false : Boolean.parse(isHierarchical);\\r\\n\\t\\tthis.__childField = childField ? childField : \\\"children\\\";\\r\\n\\t\\tthis.__filterFunction = filterFunction;\\r\\n\\t\\tthis.__hierarchyFilterChildren = hierarchyFilterChildren;\\r\\n\\t\\tthis.__arrIgnoreKeysInCloneDataSource = arrIgnoreKeysInCloneDataSource;\\r\\n\\t\\tthis.__ignoreSameLevelNode = true;\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSFilter.prototype.execute = function(data,filter,setting,recordLimit,isHierarchical,childField,filterFunction,hierarchyFilterChildren,arrIgnoreKeysInCloneDataSource) \\r\\n\\t{ \\r\\n\\t\\tdata = data ? data : this.__data;\\r\\n\\t\\tfilter = filter ? filter : this.__filter;\\r\\n\\t\\tsetting = setting ? setting : this.__setting;\\r\\n\\t\\trecordLimit = (parseInt(recordLimit) > 0) ? recordLimit : this.__recordLimit;\\r\\n\\t\\tisHierarchical = this.util.isUndefined(isHierarchical) ? Boolean.parse(this.__isHierarchical) : Boolean.parse(isHierarchical);\\r\\n\\t\\tchildField = childField ? childField : this.__childField;\\r\\n\\t\\tfilterFunction = filterFunction ? filterFunction : this.__filterFunction;\\r\\n\\t\\thierarchyFilterChildren = hierarchyFilterChildren ? hierarchyFilterChildren : this.__hierarchyFilterChildren;\\r\\n\\t\\tarrIgnoreKeysInCloneDataSource = this.util.isUndefinedOrNull(arrIgnoreKeysInCloneDataSource) ? this.__arrIgnoreKeysInCloneDataSource : arrIgnoreKeysInCloneDataSource;\\r\\n\\t\\tif(data && filter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar dataSource = data.slice(0);\\r\\n\\t\\t\\tvar arrFilter = [];\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar callFilterFunction = function(source,level,parentItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\t\\tfor (var count = 0; count < source.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\t\\tvar found = false;\\r\\n\\t\\t\\t\\t\\tif(isHierarchical && item[childField] && item[childField].length > 0 )\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrChild = callFilterFunction(item[childField],level + 1,item);\\r\\n\\t\\t\\t\\t\\t\\tif(arrChild && arrChild.length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tfound = true;\\r\\n\\t\\t\\t\\t\\t\\t\\tif(self.__ignoreSameLevelNode)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t            item[childField] = arrChild;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(!found && self.__filterItem(item,filter,setting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(isHierarchical && hierarchyFilterChildren)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar arrChildren = item[childField];\\r\\n\\t\\t\\t\\t\\t\\t\\tif(arrChildren && arrChildren.length > 0)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar childItem = null;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar childLength = arrChildren.length;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tfor(var childCount = childLength - 1;childCount > -1;childCount--)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tchildItem = arrChildren[childCount];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif(childItem)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(!hierarchyFilterChildren(childItem,childCount,childItem[self.IS_FOUND_FIELD],filter,setting,item))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tarrChildren.splice(childCount, 1);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tfound = true;\\r\\n\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t\\tif(!isHierarchical && recordLimit > 0 && arrReturn.length >= recordLimit)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//return false;\\r\\n\\t\\t\\t\\treturn arrReturn;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar callNonHierarchicalFilterFunction = function(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\t\\tfor (var count = 0; count < source.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\t\\tif(self.__filterItemNonHierarchical(item,filter,setting,filterFunction))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn arrReturn;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tdataSource = this.util.cloneObject(dataSource,isHierarchical,[],arrIgnoreKeysInCloneDataSource);\\r\\n\\t\\t\\tif(isHierarchical)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrFilter = callFilterFunction(dataSource,1,null);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrFilter = callNonHierarchicalFilterFunction(dataSource);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrFilter;\\r\\n\\t\\t}\\r\\n\\t\\treturn data;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterItemNonHierarchical = function(item,filter,setting,filterFunction) \\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tif(filterFunction)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = filterFunction(item,filter,setting);\\r\\n\\t\\t\\tthis.__setItem(item,retValue);\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t}\\r\\n\\t\\telse if(filter instanceof Function) \\r\\n\\t    {\\r\\n\\t\\t\\tretValue = filter(item,setting);\\r\\n\\t        this.__setItem(item,retValue);\\r\\n\\t        return retValue;\\r\\n\\t    }\\r\\n\\t    else if(filter instanceof Array) \\r\\n\\t    {\\r\\n\\t        for (var count = 0; count < filter.length; ++count) \\r\\n\\t        {\\r\\n\\t            if (this.__filterItemNonHierarchical(item,filter[count],setting,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\tthis.__setItem(item,true);\\r\\n\\t            \\treturn true;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    }\\r\\n\\t    else if(setting.type === \\\"date\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterDate(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if(typeof(item) === \\\"string\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterString(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if (item === item + 0 && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterNumeric(item,filter);\\r\\n\\t    }\\r\\n\\t    else if(typeof (filter) === \\\"object\\\") \\r\\n\\t    {\\r\\n\\t        for(var key in filter) \\r\\n\\t        {\\r\\n\\t        \\tvar tempSetting = {};\\r\\n\\t        \\tif(setting && setting[key])\\r\\n\\t        \\t{\\r\\n\\t        \\t\\ttempSetting = setting[key];\\r\\n\\t        \\t}\\r\\n\\t            if(!this.__filterItemNonHierarchical(item[key],filter[key],tempSetting,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\treturn false;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        this.__setItem(item,true);\\r\\n\\t        return true;\\r\\n\\t    }\\r\\n\\t\\tretValue = (filter == item);\\r\\n\\t    this.__setItem(item,retValue);\\r\\n\\t    return retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterItem = function(item,filter,setting,isHierarchical,childField,parentItem,filterFunction) \\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tif(filterFunction)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = filterFunction(item,filter,setting,isHierarchical,childField,parentItem);\\r\\n\\t\\t\\tthis.__setItem(item,retValue);\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t}\\r\\n\\t\\telse if(filter instanceof Function) \\r\\n\\t    {\\r\\n\\t\\t\\tretValue = filter(item,setting);\\r\\n\\t        this.__setItem(item,retValue);\\r\\n\\t        return retValue;\\r\\n\\t    }\\r\\n\\t    else if(filter instanceof Array) \\r\\n\\t    {\\r\\n\\t        for (var count = 0; count < filter.length; ++count) \\r\\n\\t        {\\r\\n\\t            if (this.__filterItem(item,filter[count],setting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\tthis.__setItem(item,true);\\r\\n\\t            \\treturn true;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    }\\r\\n\\t    else if(setting.type === \\\"date\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterDate(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if(typeof(item) === \\\"string\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterString(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if (item === item + 0 && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterNumeric(item,filter);\\r\\n\\t    }\\r\\n\\t    else if(typeof (filter) === \\\"object\\\") \\r\\n\\t    {\\r\\n\\t        for(var key in filter) \\r\\n\\t        {\\r\\n\\t        \\tif(isHierarchical && key === childField)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tcontinue;\\r\\n\\t        \\t}\\r\\n\\t        \\tvar tempSetting = {};\\r\\n\\t        \\tif(setting && setting[key])\\r\\n\\t        \\t{\\r\\n\\t        \\t\\ttempSetting = setting[key];\\r\\n\\t        \\t}\\r\\n\\t            if(!this.__filterItem(item[key],filter[key],tempSetting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\treturn false;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        this.__setItem(item,true);\\r\\n\\t        return true;\\r\\n\\t    }\\r\\n\\t\\tretValue = (filter == item);\\r\\n\\t    this.__setItem(item,retValue);\\r\\n\\t    return retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__setItem = function(item,isFound)\\r\\n\\t{\\r\\n\\t\\tif(item && typeof (item) === \\\"object\\\" && isFound)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem[this.IS_FOUND_FIELD] = true;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterNumeric= function(value,searchParam)\\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tvalue = parseFloat(value);\\r\\n\\t\\tif(!isNaN(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(/<=/.test(searchParam)) // first checks if there is an operator (<,>,<=,>=)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value <= parseFloat(searchParam.replace(/<=/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/>=/.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value >= parseFloat(searchParam.replace(/>=/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/</.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value < parseFloat(searchParam.replace(/</,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/>/.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value > parseFloat(searchParam.replace(/>/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value === parseFloat(searchParam));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterDate= function(value,searchParam,setting)\\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar matchValue = function(compareValue,opt)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compValue = false;\\r\\n\\t\\t\\tif(self.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar newVal = self.__getDate(value,setting.cellFormat);\\r\\n\\t\\t\\t\\tif(newVal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tnewVal.setHours(0, 0, 0, 0);\\r\\n\\t\\t\\t\\t\\tcompareValue.setHours(0, 0, 0, 0);\\r\\n\\t\\t\\t\\t\\tswitch(opt)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"equals\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() === newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"greaterThan\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() < newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"lessThan\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() > newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"notEqual\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() != newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.util.warning(\\\"NSFilter\\\",value + \\\" cannot be converted to date Object for given cell format\\\");\\r\\n\\t\\t\\t\\t\\tcompValue = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn compValue;\\r\\n\\t\\t};\\r\\n\\t\\tvar processDate = function(date,type)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compValue = false;\\r\\n\\t\\t\\tif(date && matchType1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!date || !Object.prototype.toString.call(date) === '[object Date]')\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(setting.comparator)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = setting.comparator(value,date,setting);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = matchValue(date,type);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn compValue;\\r\\n\\t\\t};\\r\\n\\t\\tif(setting.matchType1 || setting.matchType2)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar matchType1 = setting.matchType1;\\r\\n\\t\\t\\tvar firstDate = setting.firstDate;\\r\\n\\t\\t\\tvar operation = setting.operation;\\r\\n\\t\\t\\tvar matchType2 = setting.matchType2;\\r\\n\\t\\t\\tvar secondDate = setting.secondDate;\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(firstDate && secondDate && matchType1 && matchType2 && operation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar firstVal = processDate(firstDate,matchType1);\\r\\n\\t\\t\\t\\tvar secondVal = processDate(secondDate,matchType2);\\r\\n\\t\\t\\t\\tswitch(operation)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcase \\\"and\\\":\\r\\n\\t\\t\\t\\t\\t\\tretValue = (firstVal && secondVal);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase \\\"or\\\":\\r\\n\\t\\t\\t\\t\\t\\tretValue = (firstVal || secondVal);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(firstDate && matchType1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = processDate(firstDate,matchType1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(secondDate && matchType2)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = processDate(secondDate,matchType2);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!searchParam || !Object.prototype.toString.call(searchParam) === '[object Date]')\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(setting.comparator)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = setting.comparator(value,searchParam,setting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = matchValue(searchParam,\\\"equals\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterString= function(value,searchParam,setting)\\r\\n\\t{\\r\\n\\t\\tvar regExp = null;\\r\\n\\t\\tvar regExpModifier = \\\"g\\\";\\r\\n\\t\\tvar startWithChar = \\\"(^)\\\";\\r\\n\\t\\tvar endsWithChar = \\\"($)\\\";\\r\\n\\t\\tvar searchString = \\\"\\\";\\r\\n\\t\\tvar isCaseSensitive = false;\\r\\n\\t\\tvar isMultiline = false;\\r\\n\\t\\tvar matchType = this.CONTAINS;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisCaseSensitive = Boolean.parse(setting[\\\"caseSensitive\\\"]);\\r\\n\\t\\t\\tisMultiline = Boolean.parse(setting[\\\"multiline\\\"]);\\r\\n\\t\\t\\tmatchType = setting[\\\"matchType\\\"] ? setting[\\\"matchType\\\"] : matchType;\\r\\n\\t\\t}\\r\\n\\t\\tif(!isCaseSensitive)\\r\\n\\t\\t{\\r\\n\\t\\t\\tregExpModifier += \\\"i\\\";\\r\\n\\t\\t}\\r\\n\\t\\tif(isMultiline)\\r\\n\\t\\t{\\r\\n\\t\\t\\tregExpModifier += \\\"m\\\";\\r\\n\\t\\t}\\r\\n\\t\\tsearchParam = this.__removeSpecialCharacter(searchParam);\\r\\n\\t\\tif(matchType === this.EXACT)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = startWithChar + searchParam + endsWithChar;\\r\\n\\t\\t}\\r\\n\\t\\telse if(matchType === this.STARTS_WITH)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = startWithChar + searchParam;\\r\\n\\t\\t}\\r\\n\\t\\telse if(matchType === this.ENDS_WITH)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = searchParam + endsWithChar;\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = searchParam;\\r\\n\\t\\t}\\r\\n\\t\\tregExp = new RegExp(searchString,regExpModifier);\\r\\n\\t\\treturn regExp.test(value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__removeSpecialCharacter = function(text)\\r\\n\\t{\\r\\n\\t\\tfunction replaceEscape(char)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(text)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar exp = new RegExp(\\\"\\\\\\\\\\\" + char,\\\"g\\\");\\r\\n\\t\\t\\t\\ttext = text.replace(exp,\\\"\\\\\\\\\\\" + char);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar specialChar = ['\\\\\\\\','[','^','$','.','|','?','*','+','(',')'];\\r\\n\\t\\tfor(var count = 0;count < specialChar.length;count++) \\r\\n\\t\\t{\\r\\n\\t\\t\\treplaceEscape(specialChar[count]);\\r\\n\\t\\t}\\r\\n\\t\\treturn text;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//ref from : https://stackoverflow.com/questions/7445328/check-if-a-string-is-a-date-value\\r\\n\\tNSFilter.prototype.__getDate = function(value,arrFormat) \\r\\n\\t{\\r\\n\\t\\tif(value)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar dateFormat;\\r\\n\\t\\t    if (Object.prototype.toString.call(value) === '[object Date]') \\r\\n\\t\\t    {\\r\\n\\t\\t        return value;\\r\\n\\t\\t    }\\r\\n\\t\\t    if(arrFormat)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar dateUtil = new NSDateUtil();\\r\\n\\t\\t    \\tif(!this.util.isArray(arrFormat))\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tarrFormat = [arrFormat];\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tfor(var count = 0;count < arrFormat.length;count++)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tvar format = arrFormat[count];\\r\\n\\t\\t    \\t\\tvar date = dateUtil.parseString(value,format);\\r\\n\\t\\t    \\t\\tif(date)\\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\treturn date;\\r\\n\\t\\t    \\t\\t}\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    }\\r\\n\\t\\t    else\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tif (typeof value.replace === 'function') \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t        value.replace(/^\\\\s+|\\\\s+$/gm, '');\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    dateFormat = /(^\\\\d{1,4}[\\\\.|\\\\\\\\/|-]\\\\d{1,2}[\\\\.|\\\\\\\\/|-]\\\\d{1,4})(\\\\s*(?:0?[1-9]:[0-5]|1(?=[012])\\\\d:[0-5])\\\\d\\\\s*[ap]m)?$/;\\r\\n\\t\\t\\t    if(dateFormat.test(value))\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\treturn new Date(value);//Date.parse(value);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t    return null;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSFilter;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSFilter\\\",NSFilter);var NSMultiSelectDropdown = (function()\\r\\n{\\r\\n\\tfunction NSMultiSelectDropdown(component,setting) \\r\\n\\t{\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__context = window;\\r\\n\\t\\tthis.__config = {};\\r\\n\\t\\tthis.__arrSelectedItems = [];\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentClickRef = null;\\r\\n\\t\\tthis.__documentKeydownRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component);\\r\\n\\t};\\r\\n\\tnsExtendPrototype(NSContainerBase,NSMultiSelectDropdown);\\r\\n\\tNSMultiSelectDropdown.prototype.constructor = NSMultiSelectDropdown;\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__fieldPrefix = this.getID() + \\\"_NS_MultiSelect_Field\\\";\\r\\n\\t\\tthis.__fieldChecked = this.__fieldPrefix + \\\"_Checked\\\";\\r\\n\\t\\tthis.__fieldDisabled = this.__fieldPrefix + \\\"_Disabled\\\";\\r\\n\\t\\tthis.__fieldIndex = this.__fieldPrefix + \\\"_Index\\\";\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t\\tthis.__createComponent();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__documentClickRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"click\\\",this.__documentClickRef);\\r\\n\\t\\t\\tthis.__documentClickRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__documentKeydownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"keydown\\\",this.__documentKeydownRef);\\r\\n\\t\\t\\tthis.__documentKeydownRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.base.componentResized.call(this,event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.dataSource = function(source) \\r\\n\\t{\\r\\n\\t\\tthis.__config.dataSource = this.util.cloneObject(source,true);\\r\\n\\t\\tthis.__updateItems();\\r\\n\\t\\tthis.__applyDataSource(this.__config.dataSource);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.getSelectedIndexes = function() \\r\\n\\t{\\r\\n\\t\\tvar selected = this.__getSelectItems();\\r\\n\\t\\treturn selected.indexes;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.getSelectedItems = function() \\r\\n\\t{\\r\\n\\t\\tvar selected = this.__getSelectItems();\\r\\n\\t\\treturn selected.items;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.setSelectUnselectItemsByValue = function(arrValues,isSelected) \\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(arrValues) && this.__config.dataSource && this.__config.dataSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = this.util.isArray(arrValues) ? arrValues : [arrValues];\\r\\n\\t\\t\\tfor(var count = 0;count < arrValues.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar value = arrValues[count];\\r\\n\\t\\t\\t\\tvar tempItem = this.__getItemByValue(value);\\r\\n\\t\\t\\t\\tthis.__setSelectUnselectInItem(tempItem,isSelected);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__update();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.setSelectUnselectItems = function(arrItems,isSelected) \\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(arrItems) && this.__config.dataSource && this.__config.dataSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = this.util.isArray(arrItems) ? arrItems : [arrItems];\\r\\n\\t\\t\\tfor(var count = 0;count < arrItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrItems[count];\\r\\n\\t\\t\\t\\tvar tempItem = this.util.isNumber(item) ? this.__getItemByIndex(item) : this.__getItemByValue(item[this.__config.valueField]);\\r\\n\\t\\t\\t\\tthis.__setSelectUnselectInItem(tempItem,isSelected);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__update();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setting = {};\\r\\n\\t\\t}\\r\\n\\t\\tvar setting = this.__setting;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"context\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__context = setting[\\\"context\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\tdataSource: setting[\\\"dataSource\\\"],\\r\\n\\t\\t\\t\\tlabelField: setting[\\\"labelField\\\"] || \\\"label\\\",\\r\\n\\t\\t\\t\\tvalueField: setting[\\\"valueField\\\"] || setting[\\\"labelField\\\"] || \\\"label\\\",\\r\\n\\t\\t\\t\\tenableVirtualScroll: Boolean.parse(setting[\\\"enableVirtualScroll\\\"]),\\r\\n\\t\\t\\t\\titemHeight: setting[\\\"itemHeight\\\"] || 30,\\r\\n\\t\\t\\t\\tlabelType: setting[\\\"labelType\\\"] || NSMultiSelectDropdown.LABEL_TYPE_OF_TEXT,\\r\\n\\t\\t\\t\\titemAllowedToBeSelected: this.util.isUndefinedOrNull(setting[\\\"itemAllowedToBeSelected\\\"]) ? -1 : parseInt(setting[\\\"itemAllowedToBeSelected\\\"]),\\r\\n\\t\\t\\t\\t//textSelectedCount will be shown only if more than countAfterShowText items where selected.\\r\\n\\t\\t\\t\\tcountAfterShowText: this.util.isUndefined(setting[\\\"countAfterShowText\\\"]) ? 3 : parseInt(setting[\\\"countAfterShowText\\\"]),\\r\\n\\t\\t\\t\\t//Add \\\"...\\\" at end of text after selected options after countAfterShowText items is selected. Overrides textSelectedCount option.\\r\\n\\t\\t\\t\\ttruncateText: Boolean.parse(setting[\\\"truncateText\\\"]),\\r\\n\\t\\t\\t\\tlistWidth: setting[\\\"listWidth\\\"],\\r\\n\\t\\t\\t\\tlistHeight: setting[\\\"listHeight\\\"],\\r\\n\\t\\t\\t\\tfilterSetting: setting[\\\"filterSetting\\\"],\\r\\n\\t\\t\\t\\tnoDataMessage: setting[\\\"noDataMessage\\\"] || \\\"No matching records found\\\",\\r\\n\\t\\t\\t\\tplaceHolder: setting[\\\"placeHolder\\\"] || \\\"\\\",\\r\\n\\t\\t\\t\\tsearchPlaceHolder: setting[\\\"searchPlaceHolder\\\"] || \\\"Search\\\",\\r\\n\\t\\t\\t\\tselectedCallback: setting[\\\"selectedCallback\\\"],\\r\\n\\t\\t\\t\\tdisabledCallback: setting[\\\"disabledCallback\\\"],\\r\\n\\t\\t\\t\\ttextSelectAll: setting[\\\"textSelectAll\\\"] || \\\"[Select all]\\\",\\r\\n\\t\\t\\t\\ttextAllSelected: setting[\\\"textAllSelected\\\"] || \\\"All Selected\\\",\\r\\n\\t\\t\\t\\t//'#' is replaced with the count of selected items, '%'is replaced with total items so '#' and '%' should be present\\r\\n\\t\\t\\t\\ttextSelectedCount: setting[\\\"textSelectedCount\\\"] || \\\"# of % selected\\\",\\r\\n\\t\\t\\t\\tsetTitle: Boolean.parse(setting[\\\"setTitle\\\"]),\\r\\n\\t\\t\\t\\tdisplayDelimiter: setting[\\\"displayDelimiter\\\"] || ', ',\\r\\n\\t\\t\\t\\tenableDefaultOpen:Boolean.parse(setting[\\\"enableDefaultOpen\\\"]),\\r\\n\\t\\t\\t\\tlabelRenderer:setting[\\\"labelRenderer\\\"],\\r\\n\\t\\t\\t\\tposition:setting[\\\"position\\\"] || \\\"bottom\\\",\\r\\n\\t\\t\\t\\tshowDropDownIcon:this.util.isUndefined(setting[\\\"showDropDownIcon\\\"]) ? true : Boolean.parse(setting[\\\"showDropDownIcon\\\"]),\\r\\n\\t\\t\\t\\tsearchInterval:setting[\\\"searchInterval\\\"] || 500,\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tthis.__config.dataSource = this.util.cloneObject(this.__config.dataSource,true);\\r\\n\\t\\t\\tthis.__updateItems();\\r\\n\\t\\t\\tthis.__config.filteredSource = this.__config.dataSource;\\r\\n\\t\\t\\tthis.__updateTotalRecords();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__createComponent = function()\\r\\n\\t{\\r\\n\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsMultiSelectDropdownContainer\\\");\\r\\n\\t\\tthis.__divLabelContainer = this.util.createDiv(this.getID() + \\\"LabelContainer\\\",\\\"nsLabelContainer\\\");\\r\\n\\t\\tthis.__spanLabel = this.util.createElement(\\\"span\\\",this.getID() + \\\"Label\\\",\\\"nsLabel\\\");\\r\\n\\t\\tthis.__divLabelContainer.appendChild(this.__spanLabel);\\r\\n\\t\\tif(this.__config.showDropDownIcon)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divArrow = this.util.createDiv(null,\\\"nsLabelArrow\\\");\\r\\n\\t\\t\\tthis.__divLabelContainer.appendChild(this.__divArrow);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__spanLabel,\\\"nsLabelNoArrow\\\");\\r\\n\\t\\t}\\r\\n\\t\\tthis.__divDropdownContainer = this.util.createDiv(this.getID() + \\\"DropdownContainer\\\",\\\"nsDropdownContainer\\\");\\r\\n\\t\\tvar style = (this.__config.position == \\\"top\\\") ? \\\"nsDropdownContainerTop\\\" :  \\\"nsDropdownContainerBottom\\\";\\r\\n\\t\\tthis.util.addStyleClass(this.__divDropdownContainer,style);\\r\\n\\t\\tthis.__divSearchContainer = this.util.createDiv(this.getID() + \\\"SearchContainer\\\",\\\"nsDropdownSearchContainer\\\");\\r\\n\\t\\tthis.__txtSearch = this.util.createElement(\\\"input\\\",this.getID() + \\\"DropdownSearch\\\",\\\"nsDropdownSearch\\\");\\r\\n\\t\\t//this.__txtSearch.setAttribute(\\\"type\\\",\\\"search\\\");\\r\\n\\t\\tthis.__txtSearch.setAttribute(\\\"placeholder\\\",this.__config.searchPlaceHolder);\\r\\n\\t\\tthis.__divSearchContainer.appendChild(this.__txtSearch);\\r\\n\\t\\tthis.__divSearchIcon = this.util.createDiv(null,\\\"nsDropdownSearchIcon\\\");\\r\\n\\t\\tthis.__divSearchContainer.appendChild(this.__divSearchIcon);\\r\\n\\t\\tvar svgSearchIcon = \\\"<svg version=\\\\\\\"1.1\\\\\\\" xmlns=\\\\\\\"http://www.w3.org/2000/svg\\\\\\\" xmlns:xlink=\\\\\\\"http://www.w3.org/1999/xlink\\\\\\\" \\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\\"\\t viewBox=\\\\\\\"0 0 56.966 56.966\\\\\\\" width=\\\\\\\"100%\\\\\\\" height=\\\\\\\"100%\\\\\\\" xml:space=\\\\\\\"preserve\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\\"<path d=\\\\\\\"M55.146,51.887L41.588,37.786c3.486-4.144,5.396-9.358,5.396-14.786c0-12.682-10.318-23-23-23s-23,10.318-23,23\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\\"\\ts10.318,23,23,23c4.761,0,9.298-1.436,13.177-4.162l13.661,14.208c0.571,0.593,1.339,0.92,2.162,0.92\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\\"\\tc0.779,0,1.518-0.297,2.079-0.837C56.255,54.982,56.293,53.08,55.146,51.887z M23.984,6c9.374,0,17,7.626,17,17s-7.626,17-17,17\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\\"\\ts-17-7.626-17-17S14.61,6,23.984,6z\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\\"</svg>\\\";\\r\\n\\t\\tif(window.btoa)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar svg64 = window.btoa(svgSearchIcon);\\r\\n\\t\\t\\tthis.__divSearchIcon.style.backgroundImage = \\\"url('data:image/svg+xml;base64,\\\" + svg64 + \\\"')\\\";\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divSearchIcon.innerHTML = svgSearchIcon;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__divDropdownContainer.appendChild(this.__divSearchContainer);\\r\\n\\t\\tthis.__listContainer = this.util.createElement(\\\"div\\\",this.getID() + \\\"ListContainer\\\",\\\"nsListContainer\\\");\\r\\n\\t\\tthis.__divDropdownContainer.appendChild(this.__listContainer);\\r\\n\\t\\tthis.addChild(this.__divLabelContainer);\\r\\n\\t\\tthis.addChild(this.__divDropdownContainer);\\r\\n\\t\\tvar dropDownContainerCSS = {};\\r\\n\\t\\tif(this.__config[\\\"listWidth\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tdropDownContainerCSS.width = this.__config[\\\"listWidth\\\"];\\r\\n\\t\\t}\\r\\n\\t\\t/*if(this.__config[\\\"listHeight\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tdropDownContainerCSS.maxHeight = this.__config[\\\"listHeight\\\"];\\r\\n\\t\\t}*/\\r\\n\\t\\tif(this.__config[\\\"listHeight\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__listContainer.style.maxHeight = this.__config[\\\"listHeight\\\"];\\r\\n\\t\\t\\tif(this.__config.enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__listContainer.style.height = this.__config[\\\"listHeight\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.css(this.__divDropdownContainer,dropDownContainerCSS);\\r\\n\\t\\tif(this.__config.enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initVirtualScrolls();\\r\\n\\t\\t}\\r\\n\\t\\tthis.__applyDataSource(this.__config.dataSource);\\r\\n\\t\\tvar dropDownClickRef = this.__dropDownShowHandler.bind(this);\\r\\n\\t\\tthis.util.addEvent(this.__divLabelContainer,\\\"click\\\",dropDownClickRef);\\r\\n\\t\\tthis.util.addEvent(this.__txtSearch,\\\"input\\\",this.__searchHandler.bind(this));\\r\\n\\t\\tthis.util.addEvent(this.__txtSearch,\\\"click\\\",this.__txtSearchFocusHandler.bind(this));\\r\\n\\t\\tif(this.__config.enableDefaultOpen)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__dropDownShowHandler();\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__documentClickRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__documentClickRef = this.__documentClickHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"click\\\",this.__documentClickRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__documentKeydownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__documentKeydownRef = this.__documentKeydownHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"keydown\\\",this.__documentKeydownRef);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__changePropByLabelType();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__changePropByLabelType = function(source)\\r\\n\\t{\\r\\n\\t\\tswitch(this.__config.labelType)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcase NSMultiSelectDropdown.LABEL_TYPE_HORIZONTAL_LIST:\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//commenting below line as IE does not support unset value\\r\\n\\t\\t\\t\\t/*this.__divLabelContainer.style.overflow = \\\"unset\\\";\\r\\n\\t\\t\\t\\tthis.__divLabelContainer.style.whiteSpace = \\\"unset\\\";\\r\\n\\t\\t\\t\\tthis.__spanLabel.style.overflow = \\\"unset\\\";\\r\\n\\t\\t\\t\\tthis.__spanLabel.style.whiteSpace = \\\"unset\\\";*/\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tthis.__divLabelContainer.style.overflow = \\\"visible\\\";\\r\\n\\t\\t\\t\\tthis.__divLabelContainer.style.whiteSpace = \\\"normal\\\";\\r\\n\\t\\t\\t\\tthis.__spanLabel.style.overflow = \\\"visible\\\";\\r\\n\\t\\t\\t\\tthis.__spanLabel.style.whiteSpace = \\\"normal\\\";\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t//this.__spanLabel.style.position = \\\"unset\\\";\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcase NSMultiSelectDropdown.LABEL_TYPE_VERTICAL_LIST:\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__applyDataSource = function(source)\\r\\n\\t{\\r\\n\\t\\tthis.util.removeAllChildren(this.__listContainer);\\r\\n\\t\\tthis.__config.filteredSource = source;\\r\\n\\t\\tthis.__updateTotalRecords();\\r\\n\\t\\tif(this.__config.enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar length = (source && source.length > 0) ? source.length : 0;\\r\\n\\t\\t\\tthis.__divScroller = this.__createScroller(this.__config.itemHeight * length);\\r\\n\\t\\t\\tthis.__listContainer.appendChild(this.__divScroller);\\r\\n\\t\\t\\tthis.__renderVirtualItems(0);\\r\\n\\t\\t\\tthis.__update();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(source && source.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t for(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t var li = this.__createItem(source[count],count);\\r\\n\\t\\t\\t\\t\\t this.__listContainer.appendChild(li);\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t this.__update();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t var li = this.__createNoItemFound();\\r\\n\\t\\t\\t\\t this.__listContainer.appendChild(li);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__updateItems = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__config.enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar source = this.__config.dataSource;\\r\\n\\t\\t\\tif(source && source.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t for(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t source[count][this.__fieldIndex] = count;\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__createNoItemFound = function()\\r\\n\\t{\\r\\n\\t\\tvar li = this.util.createElement(\\\"li\\\",null,\\\"nsListItem\\\");\\r\\n\\t\\tvar label = this.util.createElement(\\\"label\\\",null,\\\"nsListItemLabelContainer\\\");\\r\\n\\t\\tli.appendChild(label);\\r\\n\\t\\tvar spanLabel = this.util.createElement(\\\"span\\\",null,\\\"nsListLabel\\\");\\r\\n\\t\\tspanLabel.innerHTML = this.__config.noDataMessage;\\r\\n\\t\\tlabel.appendChild(spanLabel);\\r\\n\\t\\treturn li;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__initVirtualScrolls = function()\\r\\n\\t{\\r\\n\\t\\tvar div = this.util.createDiv();\\r\\n\\t\\tdiv.style.height = this.__config[\\\"listHeight\\\"];\\r\\n\\t\\tdocument.body.appendChild(div);\\r\\n\\t\\tvar height = div.offsetHeight;\\r\\n\\t\\tdocument.body.removeChild(div);\\r\\n\\t\\tthis.__screenItemsLen = Math.ceil(height / this.__config.itemHeight);\\r\\n\\t\\tthis.__cachedItemsLen = this.__screenItemsLen * 3;\\r\\n\\t\\tthis.__lastRepaintY = -1;\\r\\n\\t\\tthis.__maxBuffer = this.__screenItemsLen * this.__config.itemHeight;\\r\\n\\t\\tthis.__lastScrolled = 0;\\r\\n\\t\\tthis.__itemHeight = this.__config.itemHeight;\\r\\n\\t\\tthis.util.addStyleClass(this.__listContainer,\\\"nsListContainerVirtual\\\");\\r\\n\\t\\tthis.__listContainerScrollRef = this.__listContainerScrollHandler.bind(this);\\r\\n\\t\\tthis.util.addEvent(this.__listContainer,\\\"scroll\\\",this.__listContainerScrollRef);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__renderVirtualItems = function(from,source)\\r\\n\\t{\\r\\n\\t\\tvar arrLi = this.__listContainer.querySelectorAll(\\\"li\\\");\\r\\n\\t\\tfor(var count = arrLi.length - 1;count > -1;count--)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrLi[count].parentNode.removeChild(arrLi[count]);\\r\\n\\t\\t}\\r\\n\\t\\tsource = source ? source : this.__config.filteredSource;\\r\\n\\t\\tif(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar finalItem = from + this.__cachedItemsLen;\\r\\n\\t\\t\\tif (finalItem > this.__totalRecords)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t finalItem = this.__totalRecords;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar fragment = document.createDocumentFragment();\\r\\n\\t\\t\\tfor(var count = from;count < finalItem;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t var li = this.__createItem(source[count],count);\\r\\n\\t\\t\\t\\t fragment.appendChild(li);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__listContainer.appendChild(fragment);\\r\\n\\t\\t\\t//this.__update();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__createItem = function(item,index)\\r\\n\\t{\\r\\n\\t\\tif(this.util.isUndefined(item[this.__fieldChecked]))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isSelected = false;\\r\\n\\t\\t\\tif(this.__config.selectedCallback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tisSelected = this.__config.selectedCallback(item,index);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__setSelectUnselectInItem(item,isSelected);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isUndefined(item[this.__fieldDisabled]))\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.disabledCallback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldDisabled] = this.__config.disabledCallback(item,index);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldDisabled] = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isUndefined(item[this.__fieldIndex]))\\r\\n\\t\\t{\\r\\n\\t\\t\\titem[this.__fieldIndex] = index;\\r\\n\\t\\t}\\r\\n\\t\\tvar li = this.util.createElement(\\\"li\\\",null,\\\"nsListItem\\\");\\r\\n\\t\\tif(this.__config.enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(li,\\\"nsListItemVirtual\\\");\\r\\n\\t\\t\\tli.style.top = (index * this.__config.itemHeight) + \\\"px\\\";\\r\\n\\t\\t}\\r\\n\\t\\tvar label = this.util.createElement(\\\"label\\\",null,\\\"nsListItemLabelContainer\\\");\\r\\n\\t\\tif(item[this.__fieldDisabled])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(label,\\\"nsListItemDisabled\\\");\\r\\n\\t\\t}\\r\\n\\t\\tli.appendChild(label);\\r\\n\\t\\tvar checkBox = this.util.createElement(\\\"input\\\",null,\\\"nsListCheckbox\\\");\\r\\n\\t\\tcheckBox.setAttribute(\\\"type\\\",\\\"checkbox\\\");\\r\\n\\t\\tcheckBox.setAttribute(\\\"value\\\",item[this.__fieldIndex]);\\r\\n\\t\\tif(item[this.__fieldChecked])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(li,\\\"nsListItemSelected\\\");\\r\\n\\t\\t}\\r\\n\\t\\tcheckBox.checked = item[this.__fieldChecked];\\r\\n\\t\\tlabel.appendChild(checkBox);\\r\\n\\t\\tthis.util.addEvent(li,\\\"click\\\",this.__itemClickHandler.bind(this,item,li));\\r\\n\\t\\tthis.util.addEvent(checkBox,\\\"click\\\",this.__checkBoxClickHandler.bind(this,item,checkBox,li));\\r\\n\\t\\tvar spanLabel = this.util.createElement(\\\"span\\\",null,\\\"nsListLabel\\\");\\r\\n\\t\\tspanLabel.innerHTML = this.__getText(item);\\r\\n\\t\\tlabel.appendChild(spanLabel);\\r\\n\\t\\treturn li;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__listContainerScrollHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(!this.__interval || this.__interval == -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\tvar scrollTop = target.scrollTop;\\r\\n\\t\\t\\tif(this.__lastRepaintY == -1 || Math.abs(scrollTop - this.__lastRepaintY) > this.__maxBuffer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar first = parseInt(scrollTop / this.__config.itemHeight) - this.__screenItemsLen;\\r\\n\\t\\t\\t    this.__renderVirtualItems(first < 0 ? 0 : first);\\r\\n\\t\\t\\t    this.__lastRepaintY = scrollTop;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__lastScrolled = Date.now();\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__documentClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__isFocusOnControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__closeDropdown();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__documentKeydownHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__isFocusOnControl())\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar keyCode = this.util.getKeyUnicode(event);\\r\\n\\t\\t\\tif (keyCode == this.util.KEYCODE.ESC) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__closeDropdown();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__dropDownShowHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tthis.util.toggleStyleClass(this.__divLabelContainer,\\\"nsLabelContainerActive\\\");\\r\\n\\t\\tthis.util.toggleStyleClass(this.__divDropdownContainer,\\\"nsListShow\\\");\\r\\n\\t\\tthis.util.hasStyleClass(this.__divDropdownContainer,\\\"nsListShow\\\")? this.__dispatchEvent(NSMultiSelectDropdown.DROPDOWN_OPEN): this.__dispatchEvent(NSMultiSelectDropdown.DROPDOWN_CLOSE, {selected: this.__getSelectItems()}, {selected: this.__getSelectItems()});\\r\\n\\t\\tif(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent();\\r\\n\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__itemClickHandler = function(item,li,event)\\r\\n\\t{\\r\\n\\t\\tif(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent();\\r\\n\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__checkBoxClickHandler = function(item,checkBox,li,event)\\r\\n\\t{\\r\\n\\t\\t//below line is not working for some reason\\r\\n\\t\\t//item[this.__fieldChecked] = checkBox.checked;\\r\\n\\t\\tvar index =  parseInt(checkBox.getAttribute(\\\"value\\\"));\\r\\n\\t\\tvar tempItem = this.__getItemByIndex(index); \\r\\n\\t\\tif(tempItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setSelectUnselectInItem(tempItem,checkBox.checked);\\r\\n\\t\\t\\tthis.__update();\\r\\n\\t\\t\\tthis.__dispatchEvent(NSMultiSelectDropdown.DROPDOWN_ITEM_CLICK,tempItem,{index:index,item:tempItem});\\r\\n\\t\\t}\\r\\n\\t\\tif(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent();\\r\\n\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__searchHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tclearTimeout(this.__interval);\\r\\n\\t\\tthis.__interval = -1;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tthis.__interval = setTimeout(function(){\\r\\n\\t\\t\\t\\tself.__filterList.bind(self)();\\r\\n\\t\\t}, this.__config.searchInterval);\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__filterList = function()\\r\\n\\t{\\r\\n\\t\\tvar filterSetting = this.__config.filterSetting;\\r\\n\\t\\tvar strData = this.__txtSearch.value;\\r\\n\\t\\tthis.__filter(strData,filterSetting,false,-1);\\r\\n\\t\\tthis.__interval = -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__txtSearchFocusHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__createScroller = function(height)\\r\\n\\t{\\r\\n\\t\\tvar scroller = this.util.createDiv(null,\\\"nsMultiSelectScroller\\\");\\r\\n\\t\\tscroller.style.height = height + \\\"px\\\";\\r\\n\\t\\treturn scroller;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__update = function()\\r\\n\\t{\\r\\n\\t\\tvar selected = this.__getSelectItems();\\r\\n\\t\\tvar length = selected.items.length;\\r\\n\\t\\tvar html = \\\"\\\";\\r\\n\\t\\tvar isPlaceHolder = true;\\r\\n\\t\\tvar setTitle = true;\\r\\n\\t\\tvar setHeight = true;\\r\\n\\t\\tif(length == 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisPlaceHolder = true;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tisPlaceHolder = false;\\r\\n\\t\\t\\tvar labelRenderer = null;\\r\\n\\t\\t\\tif(this.__config.labelRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlabelRenderer = this.__config.labelRenderer;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__config.labelType == NSMultiSelectDropdown.LABEL_TYPE_OF_TEXT)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlabelRenderer = this.__labelFunctionForOfText.bind(this);\\r\\n\\t\\t\\t\\tsetTitle = true;\\r\\n\\t\\t\\t\\tsetHeight = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__config.labelType == NSMultiSelectDropdown.LABEL_TYPE_HORIZONTAL_LIST)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlabelRenderer = this.__labelFunctionForHorizontalList.bind(this);\\r\\n\\t\\t\\t\\tsetTitle = true;\\r\\n\\t\\t\\t\\tsetHeight = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__config.labelType == NSMultiSelectDropdown.LABEL_TYPE_VERTICAL_LIST)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlabelRenderer = this.__labelFunctionForVerticalList.bind(this);\\r\\n\\t\\t\\t\\tsetTitle = true;\\r\\n\\t\\t\\t\\tsetHeight = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(labelRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar html = labelRenderer(selected.items,selected.indexes,selected.texts,this.__config.labelField);\\r\\n\\t\\t\\t\\tif(html)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar height = \\\"\\\";\\r\\n\\t\\t\\t\\t\\tif(this.util.isString(html))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__spanLabel.innerHTML = html;\\r\\n\\t\\t\\t\\t\\t\\tvar span = this.util.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\t\\tspan.innerHTML = html;\\r\\n\\t\\t\\t\\t\\t\\tif(setHeight)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdocument.body.appendChild(span);\\r\\n\\t\\t\\t\\t\\t\\t\\theight = span.offsetHeight;\\r\\n\\t\\t\\t\\t\\t\\t\\tdocument.body.removeChild(span);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__spanLabel.innerHTML = \\\"\\\";\\r\\n\\t\\t\\t\\t\\t\\tthis.__spanLabel.appendChild(html);\\r\\n\\t\\t\\t\\t\\t\\tif(setHeight)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\theight = html.offsetHeight;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(setHeight)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__divLabelContainer.style.height = height + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tisPlaceHolder = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tisPlaceHolder = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(isPlaceHolder)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divLabelContainer.style.height = \\\"\\\";\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__spanLabel,\\\"nsLabelPlaceHolder\\\");\\r\\n\\t\\t\\tthis.__spanLabel.innerHTML = this.__config.placeHolder;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__spanLabel,\\\"nsLabelPlaceHolder\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif (this.__config.setTitle && setTitle) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__spanLabel.setAttribute(\\\"title\\\",selected.texts.join(this.__config.displayDelimiter));\\r\\n        }\\r\\n\\t\\tthis.__updateCheckBoxes();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__labelFunctionForOfText = function(items,indexes,texts,labelField)\\r\\n\\t{\\r\\n\\t\\tvar length = items.length;\\r\\n\\t\\tvar sourceLength = (this.__config.dataSource && this.__config.dataSource.length) ? this.__config.dataSource.length : 0;\\r\\n\\t\\tvar html = \\\"\\\";\\r\\n\\t\\tif(length == sourceLength)\\r\\n\\t\\t{\\r\\n\\t\\t\\thtml = this.__config.textAllSelected;\\r\\n\\t\\t}\\r\\n\\t\\telse if(this.__config.truncateText && length > this.__config.countAfterShowText) \\r\\n\\t\\t{\\r\\n\\t\\t\\thtml = texts.slice(0,this.__config.countAfterShowText) + \\\"...\\\";\\r\\n        }\\r\\n\\t\\telse if(length > this.__config.countAfterShowText) \\r\\n\\t\\t{\\r\\n\\t\\t\\thtml = this.__config.textSelectedCount.replace(\\\"#\\\",length).replace(\\\"%\\\", sourceLength);\\r\\n        } \\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\thtml = texts.join(this.__config.displayDelimiter);\\r\\n        }\\r\\n\\t\\treturn html;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__labelFunctionForHorizontalList = function(items,indexes,texts,labelField)\\r\\n\\t{\\r\\n\\t\\tvar length = items.length;\\r\\n\\t\\tvar divContainer = this.util.createDiv(null,\\\"nsHorizontalListContainer\\\");\\r\\n\\t\\tvar tag = null;\\r\\n\\t\\tfor(var count = 0;count < texts.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttag = this.__createHorizontalListItem(texts[count],items[count],indexes[count]);\\r\\n\\t\\t\\tdivContainer.appendChild(tag);\\r\\n\\t\\t}\\r\\n\\t\\treturn divContainer;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__createHorizontalListItem = function(text,item,index) \\r\\n\\t{\\r\\n\\t\\tvar tag = this.util.createDiv(null,\\\"nsHorizontalListItemTag\\\");\\r\\n\\t    var content = this.util.createDiv(null,\\\"nsHorizontalListItemText\\\");\\r\\n\\t    content.textContent = text;\\r\\n\\t    tag.appendChild(content);\\r\\n\\t    var btnRemove = this.util.createDiv(null,\\\"nsHorizontalListItemClose\\\");\\r\\n\\t    this.util.addEvent(btnRemove,\\\"click\\\",this.__removeHorizontalListItem.bind(this,tag,item,index));\\r\\n\\t    tag.appendChild(btnRemove);\\r\\n\\t    return tag;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__removeHorizontalListItem = function(tag,item,index,event) \\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tif(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t}\\r\\n\\t\\tthis.setSelectUnselectItems(item,false);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__labelFunctionForVerticalList = function(items,indexes,texts,labelField)\\r\\n\\t{\\r\\n\\t\\tvar length = items.length;\\r\\n\\t\\tvar ul = this.util.createElement(\\\"ul\\\",null,\\\"nsVerticalListContainer\\\");\\r\\n\\t\\tvar tag = null;\\r\\n\\t\\tfor(var count = 0;count < texts.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttag = this.__createVerticalListItem(texts[count],items[count],indexes[count]);\\r\\n\\t\\t\\tul.appendChild(tag);\\r\\n\\t\\t}\\r\\n\\t\\treturn ul;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__createVerticalListItem = function(text,item,index) \\r\\n\\t{\\r\\n\\t\\tvar li = this.util.createElement(\\\"li\\\",null,\\\"nsVerticalListItemTag\\\");\\r\\n\\t\\tvar div = this.util.createDiv(null,\\\"nsVerticalListItemText\\\");\\r\\n        div.appendChild(document.createTextNode(text));\\r\\n        li.appendChild(div);\\r\\n        var btnRemove = this.util.createDiv(null,\\\"nsVerticalListItemClose\\\");\\r\\n\\t\\tthis.util.addEvent(btnRemove,\\\"click\\\",this.__removeVerticalListItem.bind(this,li,item,index));\\r\\n\\t\\tli.appendChild(btnRemove);\\r\\n\\t\\treturn li;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__removeVerticalListItem = function(tag,item,index,event) \\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tif(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t}\\r\\n\\t\\tthis.setSelectUnselectItems(item,false);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__updateCheckBoxes = function()\\r\\n\\t{\\r\\n\\t\\tvar arrCheckBoxes = this.__listContainer.querySelectorAll(\\\"input.nsListCheckbox[type=checkbox]\\\");\\r\\n\\t\\tif(arrCheckBoxes && arrCheckBoxes.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrCheckBoxes.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar checkBox = arrCheckBoxes[count];\\r\\n\\t\\t\\t\\tvar index =  parseInt(checkBox.getAttribute(\\\"value\\\"));\\r\\n\\t\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcheckBox.checked = item[this.__fieldChecked];\\r\\n\\t\\t\\t\\t\\tvar li = this.util.findParent(checkBox,\\\"LI\\\");\\r\\n\\t\\t\\t\\t\\tif(li)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldChecked] ? this.util.addStyleClass(li,\\\"nsListItemSelected\\\") : this.util.removeStyleClass(li,\\\"nsListItemSelected\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__getSelectItems = function()\\r\\n\\t{\\r\\n\\t\\tvar retValue = {texts:[],indexes:[],items:[]};\\r\\n\\t\\t/*if(this.__config.dataSource && this.__config.dataSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < this.__config.dataSource.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = this.__config.dataSource[count];\\r\\n\\t\\t\\t\\tif(item[this.__fieldChecked])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.texts.push(this.__getText(item));\\r\\n\\t\\t\\t\\t\\tretValue.indexes.push(count);\\r\\n\\t\\t\\t\\t\\tretValue.items.push(item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}*/\\r\\n\\t\\tif(this.__config.dataSource && this.__config.dataSource.length && this.__arrSelectedItems && this.__arrSelectedItems.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < this.__arrSelectedItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = this.__arrSelectedItems[count];\\r\\n\\t\\t\\t\\tretValue.texts.push(this.__getText(item));\\r\\n\\t\\t\\t\\tretValue.indexes.push(count);\\r\\n\\t\\t\\t\\tretValue.items.push(item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__getText = function(item)\\r\\n\\t{\\r\\n\\t\\treturn (item ? item[this.__config.labelField] : \\\"\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__closeDropdown = function()\\r\\n\\t{\\r\\n\\t\\tthis.util.removeStyleClass(this.__divLabelContainer,\\\"nsLabelContainerActive\\\");\\r\\n\\t\\tthis.util.removeStyleClass(this.__divDropdownContainer,\\\"nsListShow\\\");\\r\\n\\t\\tthis.__txtSearch.value = \\\"\\\";\\r\\n\\t\\tthis.__filterList();\\r\\n\\t\\tthis.__dispatchEvent(NSMultiSelectDropdown.DROPDOWN_CLOSE, {selected: this.__getSelectItems()}, {selected: this.__getSelectItems()});\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__isFocusOnControl = function()\\r\\n\\t{\\r\\n\\t\\t/*if(this.hasFocus())\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;*/\\r\\n\\t\\t/*var focusedElement = document.activeElement;\\r\\n\\t\\tif(this.__baseComponent.contains(focusedElement)) \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;*/\\r\\n\\t\\treturn this.util.hasStyleClass(this.__divDropdownContainer,\\\"nsListShow\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__updateTotalRecords = function(totalCount)\\r\\n\\t{\\r\\n\\t\\tif(this.util.isUndefinedOrNull(totalCount) && this.__config.filteredSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttotalCount = this.__config.filteredSource.length; \\r\\n\\t\\t}\\r\\n\\t\\tthis.__totalRecords = totalCount;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__getIndexByItem = function(itemToFind,source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__config.dataSource;\\r\\n\\t\\t}\\r\\n\\t\\tif(itemToFind && source && source.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldIndex] === itemToFind[this.__fieldIndex])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__getItemByIndex = function(indexToFind,source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__config.dataSource;\\r\\n\\t\\t}\\r\\n\\t\\tif(source && source.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldIndex] === indexToFind)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__getItemByValue = function(value,source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__config.dataSource;\\r\\n\\t\\t}\\r\\n\\t\\tif(value && source && source.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__config.valueField] === value)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__filter = function(strData,filterSetting,enableHighlighting,recordLimit)\\r\\n\\t{\\r\\n\\t\\tif(strData)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfilterSetting = filterSetting ? filterSetting : {};\\r\\n\\t\\t\\tvar config = {\\r\\n\\t\\t\\t\\t\\tcaseSensitive: this.util.isUndefinedOrNull(filterSetting[\\\"caseSensitive\\\"]) ? false : Boolean.parse(filterSetting[\\\"caseSensitive\\\"]),\\r\\n\\t\\t\\t\\t\\tmultiline: this.util.isUndefinedOrNull(filterSetting[\\\"multiline\\\"]) ? false : Boolean.parse(filterSetting[\\\"multiline\\\"]),\\r\\n\\t\\t\\t\\t\\tmatchType: filterSetting[\\\"matchType\\\"] || new NSFilter().CONTAINS\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar filter = {};\\r\\n\\t\\t\\tvar setting = {};\\r\\n\\t\\t\\tvar field = this.__config.labelField;\\r\\n\\t\\t\\tfilter[field] = strData;\\r\\n\\t\\t\\tsetting[field] = {caseSensitive:config[\\\"caseSensitive\\\"],multiline:config[\\\"multiline\\\"],matchType:config[\\\"matchType\\\"]};\\r\\n\\t\\t\\tthis.__handleFiltering(filter,setting,enableHighlighting,recordLimit);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__resetFiltering();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__handleFiltering = function(filter,setting,enableHighlighting,recordLimit)\\r\\n\\t{\\r\\n\\t\\tvar source = this.__config.dataSource;\\r\\n\\t\\tvar nsFilter = new NSFilter(source,filter,setting,recordLimit,false,null);\\r\\n\\t\\tsource = nsFilter.execute();\\r\\n\\t\\tthis.__applyDataSource(source);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__resetFiltering = function()\\r\\n\\t{\\r\\n\\t\\tthis.__applyDataSource(this.__config.dataSource);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__setSelectUnselectInItem = function(item,isSelected)\\r\\n\\t{\\r\\n\\t\\titem[this.__fieldChecked] = isSelected;\\r\\n\\t\\tif(isSelected)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__isItemSelected(item)) {\\r\\n\\t\\t\\t\\tthis.__arrSelectedItems.push(item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar indexFound = -1;\\r\\n\\t\\t\\tfor(var count = 0;count < this.__arrSelectedItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__arrSelectedItems[count][this.__fieldIndex] == item[this.__fieldIndex])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tindexFound = count;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(indexFound > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__arrSelectedItems.splice(indexFound,1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__config.itemAllowedToBeSelected > -1 && this.__config.itemAllowedToBeSelected <  this.__arrSelectedItems.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar itemDel = this.__arrSelectedItems[0];\\r\\n\\t\\t\\tthis.setSelectUnselectItems(itemDel,false);\\r\\n\\t\\t}\\r\\n\\t\\t//console.log(this.__arrSelectedItems);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__isItemSelected = function(item)\\r\\n\\t{\\r\\n\\t\\tfor(var count = 0;count < this.__arrSelectedItems.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__arrSelectedItems[count][this.__fieldIndex] == item[this.__fieldIndex])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.prototype.__dispatchEvent = function(eventType,data,param,bubbles,cancelable)\\r\\n\\t{\\r\\n\\t\\t/*if(this.__eventDispatcher)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__eventDispatcher(eventType,data,param,bubbles,cancelable);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{*/\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,eventType,data,param,bubbles,cancelable);\\r\\n\\t\\t//}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMultiSelectDropdown.DROPDOWN_OPEN = \\\"open\\\";\\r\\n\\tNSMultiSelectDropdown.DROPDOWN_CLOSE = \\\"close\\\";\\r\\n\\tNSMultiSelectDropdown.DROPDOWN_ITEM_CLICK = \\\"itemClick\\\";\\r\\n\\tNSMultiSelectDropdown.LABEL_TYPE_OF_TEXT = \\\"labelTypeOfText\\\";\\r\\n\\tNSMultiSelectDropdown.LABEL_TYPE_HORIZONTAL_LIST = \\\"labelTypeHorizontalList\\\";\\r\\n\\tNSMultiSelectDropdown.LABEL_TYPE_VERTICAL_LIST = \\\"labelTypeVerticalList\\\";\\r\\n\\t\\r\\n\\treturn NSMultiSelectDropdown;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSMultiSelectDropdown\\\",NSMultiSelectDropdown);\";","export const NSScrollerCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\n\\r\\n\\t\\t}\\r\\n\\\"use strict\\\";\\r\\nvar NSScrollAnimator = (function()\\r\\n{\\r\\n\\tfunction NSScrollAnimator(config) \\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar setting = {};\\r\\n\\t\\t\\r\\n\\t\\tvar util = null;\\r\\n\\t\\tvar stopScroll = false;\\r\\n\\t\\tvar start = 0;\\r\\n\\t\\tvar startTime = 0;\\r\\n\\t\\tvar destinationOffsetToScroll = 0;\\r\\n\\t\\tvar animationFunction = {};\\r\\n\\t\\tvar props = {};\\r\\n\\t\\tvar propItem = {};\\r\\n\\t\\tvar interval = null;\\r\\n\\t\\t\\r\\n\\t\\tvar initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!config)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tutil = new NSUtil();\\r\\n\\t\\t\\tinitAnimationFunc();\\r\\n\\t\\t\\tsetting = {\\r\\n\\t\\t\\t\\telement: config[\\\"element\\\"] || window,\\r\\n\\t\\t\\t\\tdirection: config[\\\"direction\\\"] || \\\"vertical\\\",\\r\\n\\t\\t\\t\\tduration: !util.isUndefinedOrNull(config[\\\"duration\\\"]) ? parseInt(config[\\\"duration\\\"]) : 500,\\r\\n\\t\\t\\t\\teasing: config[\\\"easing\\\"] || \\\"easeInOutQuad\\\",\\r\\n\\t\\t\\t\\tcallback: config[\\\"callback\\\"] || null,\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(setting.element === window)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetting.refElement = document.documentElement;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetting.refElement = setting.element;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tprops = { vertical:{scroll: \\\"scrollTop\\\", scrollSize: \\\"scrollHeight\\\",client: \\\"clientHeight\\\",offset: \\\"offsetHeight\\\",inner: \\\"innerHeight\\\",offsetPos: \\\"offsetTop\\\",},\\r\\n\\t\\t\\t\\t\\t  horizontal:{scroll: \\\"scrollLeft\\\", scrollSize: \\\"scrollWidth\\\",client: \\\"clientWidth\\\",offset: \\\"offsetWidth\\\",inner: \\\"innerWidth\\\",offsetPos: \\\"offsetLeft\\\",}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tpropItem = props[setting.direction];\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar scrollTo = function(newPos)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!util.isUndefinedOrNull(newPos))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstart = setting.refElement[propItem.scroll];\\r\\n\\t\\t\\t\\tstartTime = 'now' in window.performance ? performance.now() : new Date().getTime();\\r\\n\\t\\t\\t\\tvar outerSize = Math.max(setting.refElement[propItem.scrollSize], setting.refElement[propItem.offset], setting.refElement[propItem.offset]);\\r\\n\\t\\t\\t\\tvar innerSize = setting.refElement[propItem.inner] || setting.refElement[propItem.offset];\\r\\n\\t\\t\\t\\tvar destinationOffset = typeof newPos === 'number' ? newPos : newPos[propItem.offsetPos];\\r\\n\\t\\t\\t\\tdestinationOffsetToScroll = Math.round(outerSize - destinationOffset < innerSize ? outerSize - innerSize : destinationOffset);\\r\\n\\t\\t\\t\\tanimateScroll();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getMaxScrollPos = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn setting.refElement[propItem.scrollSize] - setting.refElement[propItem.client];\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getScrollPos = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn setting.refElement[propItem.scroll];\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar stop = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tstopScroll = true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar animateScroll = function() \\r\\n\\t\\t{\\r\\n           if (!stopScroll) \\r\\n           {\\r\\n        \\t   var now = 'now' in window.performance ? performance.now() : new Date().getTime();\\r\\n        \\t   var time = Math.min(1, ((now - startTime) / setting.duration));\\r\\n        \\t   var timeFunction = animationFunction[setting.easing](time);\\r\\n        \\t   var val = Math.ceil((timeFunction * (destinationOffsetToScroll - start)) + start);\\r\\n               setting.refElement[propItem.scroll] = val;\\r\\n               if (setting.refElement[propItem.scroll] === destinationOffsetToScroll) \\r\\n               {\\r\\n            \\t   if(setting.callback)\\r\\n                   {\\r\\n                \\t   setting.callback();\\r\\n                   }\\r\\n            \\t   return;\\r\\n               }\\r\\n               interval = util.getRequestAnimationFrame.bind(window)(animateScroll);\\r\\n           }\\r\\n           else\\r\\n           {\\r\\n        \\t   util.getCancelAnimationFrame.bind(window)(interval);\\r\\n        \\t   setting.refElement[propItem.scroll] = destinationOffsetToScroll;\\r\\n        \\t   if(setting.callback)\\r\\n        \\t   {\\r\\n        \\t\\t   setting.callback();\\r\\n        \\t   }\\r\\n           }\\r\\n       };\\r\\n       \\r\\n       var initAnimationFunc = function()\\r\\n       {\\r\\n    \\t   animationFunction = {\\r\\n\\t\\t\\t\\t    linear: function(t) {\\r\\n\\t\\t\\t\\t      return t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInQuad: function(t) {\\r\\n\\t\\t\\t\\t      return t * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeOutQuad: function(t) {\\r\\n\\t\\t\\t\\t      return t * (2 - t);\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInOutQuad: function(t) {\\r\\n\\t\\t\\t\\t      return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInCubic: function(t) {\\r\\n\\t\\t\\t\\t      return t * t * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeOutCubic: function(t) {\\r\\n\\t\\t\\t\\t      return (--t) * t * t + 1;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInOutCubic: function(t) {\\r\\n\\t\\t\\t\\t      return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInQuart: function(t) {\\r\\n\\t\\t\\t\\t      return t * t * t * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeOutQuart: function(t) {\\r\\n\\t\\t\\t\\t      return 1 - (--t) * t * t * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInOutQuart: function(t) {\\r\\n\\t\\t\\t\\t      return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * (--t) * t * t * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInQuint: function(t) {\\r\\n\\t\\t\\t\\t      return t * t * t * t * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeOutQuint: function(t) {\\r\\n\\t\\t\\t\\t      return 1 + (--t) * t * t * t * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInOutQuint: function(t) {\\r\\n\\t\\t\\t\\t      return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * (--t) * t * t * t * t;\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t};\\r\\n\\r\\n       };\\r\\n       \\r\\n       self.scrollTo = scrollTo;\\r\\n       self.getScrollPos = getScrollPos;\\r\\n       self.getMaxScrollPos = getMaxScrollPos;\\r\\n       self.stop = stop;\\r\\n\\t\\t\\r\\n\\t\\tinitialize();\\r\\n\\t};\\r\\n\\treturn NSScrollAnimator;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSScrollAnimator\\\",NSScrollAnimator);var NSScroller = (function()\\r\\n{\\r\\n\\tfunction NSScroller(setting)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar util = null;\\r\\n\\t\\tvar config = {};\\r\\n\\t\\t\\r\\n\\t\\t//var parentNode = null;\\r\\n\\t\\tvar divScrollBarCorner = null;\\r\\n\\t\\t\\r\\n\\t\\tvar props = {};\\r\\n\\t\\t\\r\\n\\t\\tvar operaMaxScrollBarSize = 17;\\r\\n\\t\\tvar macScrollBarSize = 15;\\r\\n\\t\\tvar macFFRegex = /[\\\\s\\\\S]*Macintosh[\\\\s\\\\S]*\\\\) Gecko[\\\\s\\\\S]*/;\\r\\n\\t\\tvar isMacFF = macFFRegex.test(window.navigator && window.navigator.userAgent);\\r\\n\\t\\t\\r\\n\\t\\tvar selectedItem = null;\\r\\n\\t\\tvar interval = null;\\r\\n\\t\\tvar delayInterval = null;\\r\\n\\t\\tvar mouseWheelEndInterval = null;\\r\\n\\t\\tvar mutationObserver = null;\\r\\n\\t\\tvar lastScrollPos = -1;\\r\\n\\t\\tvar setIsInternalWithOutDelay = true;\\r\\n\\t\\tvar isInternalScroll = false;\\r\\n\\t\\tvar itemElementScrollInterval = -1;\\r\\n\\t\\tvar isSameElement = false;\\r\\n\\t\\t\\r\\n\\t\\tvar setScrollWidth = function(width)\\r\\n\\t\\t{\\r\\n\\t\\t\\tconfig.scrollWidth = width;\\r\\n\\t\\t\\tvar item = props.horizontal;\\r\\n\\t\\t\\titem.inputSize = width;\\r\\n\\t\\t\\tsetScrollElementSize(item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar setScrollHeight = function(height)\\r\\n\\t\\t{\\r\\n\\t\\t\\tconfig.scrollHeight = height;\\r\\n\\t\\t\\tvar item = props.vertical;\\r\\n\\t\\t\\titem.inputSize = height;\\r\\n\\t\\t\\tsetScrollElementSize(item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar setScrollTop = function(scrollTop)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = props.vertical;\\r\\n\\t\\t\\tsetScrollPos(item,scrollTop);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getScrollTop = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = props.vertical;\\r\\n\\t\\t\\treturn item.element[item.scroll];\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar setScrollLeft = function(scrollLeft)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = props.horizontal;\\r\\n\\t\\t\\tsetScrollPos(item,scrollLeft);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getScrollLeft = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = props.horizontal;\\r\\n\\t\\t\\treturn item.element[item.scroll];\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getVerticalScrollHeight = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = props.vertical;\\r\\n\\t\\t\\treturn item.element[item.scrollSize];\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getHorizontalScrollWidth = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = props.horizontal;\\r\\n\\t\\t\\treturn item.element[item.scrollSize];\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar hasHorizontalScroller = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn hasScroll(props.horizontal);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar hasVerticalScroller = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn hasScroll(props.vertical);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getHorizontalScroller = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = props.horizontal;\\r\\n\\t\\t\\treturn item.container;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getVerticalScroller = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = props.vertical;\\r\\n\\t\\t\\treturn item.container;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getHorizontalBar = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = props.horizontal;\\r\\n\\t\\t\\treturn item.scroller;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getVertcialBar = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = props.vertical;\\r\\n\\t\\t\\treturn item.scroller;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tutil = new NSUtil();\\r\\n\\t\\t\\tsetConfig();\\r\\n\\t\\t\\tsetProps();\\r\\n\\t\\t\\tcreateComponent();\\r\\n\\t\\t\\tif(isSameElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar element = props[Object.keys(props)[0]].target;\\r\\n\\t\\t\\t\\tutil.addStyleClass(element,\\\"nsScrollerScrollable\\\");\\r\\n\\t\\t\\t\\tutil.addStyleClass(element,\\\"nsScrollerElement\\\");\\r\\n\\t\\t\\t\\t//DOMMouseScroll for Firefox\\r\\n\\t\\t\\t\\tutil.addEvent(element,\\\"mousewheel DOMMouseScroll\\\",mouseWheelHandler);\\r\\n\\t\\t\\t\\tutil.addEvent(element,\\\"scroll\\\",bodyScrollHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(config.otherScrollableElement && config.otherScrollableElement.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < config.otherScrollableElement.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar element = config.otherScrollableElement[count];\\r\\n\\t\\t\\t\\t\\t//DOMMouseScroll for Firefox\\r\\n\\t\\t\\t\\t\\tutil.addEvent(element,\\\"mousewheel DOMMouseScroll\\\",mouseWheelHandler);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tupdateScrollBars();\\r\\n\\t\\t\\tutil.addEvent(window,\\\"resize\\\",updateWithDelay);\\r\\n\\t\\t\\taddObserver();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar setConfig = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!setting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetting = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tconfig = {\\r\\n\\t\\t\\t\\tparentElement : setting[\\\"parentElement\\\"],\\r\\n\\t\\t\\t\\telement : setting[\\\"element\\\"],\\r\\n\\t\\t\\t\\tverticalElement : setting[\\\"verticalElement\\\"] || setting[\\\"element\\\"],\\r\\n\\t\\t\\t\\tverticalParentElement : setting[\\\"verticalParentElement\\\"] || setting[\\\"parentElement\\\"],\\r\\n\\t\\t\\t\\thorizontalElement : setting[\\\"horizontalElement\\\"] || setting[\\\"element\\\"],\\r\\n\\t\\t\\t\\thorizontalParentElement : setting[\\\"horizontalParentElement\\\"] || setting[\\\"parentElement\\\"],\\r\\n\\t\\t\\t\\totherScrollableElement : setting[\\\"otherScrollableElement\\\"],//for Grid if we have left,center and right body\\r\\n\\t\\t\\t\\thorizontalScrollButtons: setting[\\\"horizontalScrollButtons\\\"] || {enable:false,leftHTML:null,rightHTML:null},\\r\\n\\t\\t\\t\\tverticalScrollButtons: setting[\\\"verticalScrollButtons\\\"] || {enable:false,topHTML:null,bottomHTML:null},\\r\\n\\t\\t\\t\\telementPosition: setting[\\\"elementPosition\\\"] || \\\"relative\\\" ,// if content has fixable headers then use static (values: static,relative,absolute)\\r\\n\\t\\t\\t\\tenableCustomHandler: Boolean.parse(setting[\\\"enableCustomHandler\\\"]),\\r\\n\\t\\t\\t\\tscrollWidth: setting[\\\"scrollWidth\\\"],\\r\\n\\t\\t\\t\\tscrollHeight: setting[\\\"scrollHeight\\\"],\\r\\n\\t\\t\\t\\tenableMoveOnClick: Boolean.parse(setting[\\\"enableMoveOnClick\\\"]),\\r\\n\\t\\t\\t\\tenableAnimation: Boolean.parse(setting[\\\"enableAnimation\\\"]),\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(!config.verticalElement && !config.horizontalElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tutil.throwNSError(\\\"NSScroller\\\",\\\"Element in setting is missing\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!config.verticalParentElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig.verticalParentElement = config.verticalElement.parentNode;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!config.horizontalParentElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig.horizontalParentElement = config.horizontalElement.parentNode;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(config.verticalElement && config.horizontalElement && config.verticalElement == config.horizontalElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tisSameElement = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//parentNode = config.element.parentNode;\\r\\n\\t\\t\\tif(config.horizontalScrollButtons.enable)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!config.horizontalScrollButtons.leftHTML)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconfig.horizontalScrollButtons.leftHTML = '<span class=\\\"nsScrollerControlBtnLeft\\\"></span>';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!config.horizontalScrollButtons.rightHTML)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconfig.horizontalScrollButtons.rightHTML = '<span class=\\\"nsScrollerControlBtnRight\\\"></span>';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(config.verticalScrollButtons.enable)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!config.verticalScrollButtons.topHTML)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconfig.verticalScrollButtons.topHTML = '<span class=\\\"nsScrollerControlBtnUp\\\"></span>';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!config.verticalScrollButtons.bottomHTML)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconfig.verticalScrollButtons.bottomHTML = '<span class=\\\"nsScrollerControlBtnDown\\\"></span>';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar setProps = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tprops = {\\r\\n\\t\\t\\t\\t    vertical: {\\r\\n\\t\\t\\t\\t        x: \\\"Y\\\",direction:\\\"v\\\", displayDirection:\\\"vertical\\\", pos: \\\"top\\\", \\r\\n\\t\\t\\t\\t        size: \\\"height\\\",crossSize: \\\"width\\\", crossMinSize: \\\"min-width\\\", crossMaxSize: \\\"max-width\\\",\\r\\n\\t\\t\\t\\t        client: \\\"clientHeight\\\", crossClient: \\\"clientWidth\\\",\\r\\n\\t\\t\\t\\t        scrollEdge: \\\"scrollLeft\\\",offset: \\\"offsetHeight\\\", crossOffset: \\\"offsetWidth\\\", offsetPos: \\\"offsetTop\\\",\\r\\n\\t\\t\\t\\t        scroll: \\\"scrollTop\\\", scrollSize: \\\"scrollHeight\\\",barTopLimit:0,containerCSS:\\\"nsScrollerVerticalContainer\\\",\\r\\n\\t\\t\\t\\t        scrollerCSS:\\\"nsScrollerVerticalBar\\\",buttonProp:\\\"verticalScrollButtons\\\",beforeButtonProp:\\\"topHTML\\\",\\r\\n\\t\\t\\t\\t        afterButtonProp:\\\"bottomHTML\\\",beforeButtonCSS:\\\"nsScrollerButtonUp\\\",afterButtonCSS:\\\"nsScrollerButtonDown\\\",\\r\\n\\t\\t\\t\\t        elementPosition:config.elementPosition,inputSize:config.scrollHeight,decreaseScrollSize:false,\\r\\n\\t\\t\\t\\t        targetProp:\\\"verticalElement\\\",targetParentProp:\\\"verticalParentElement\\\",isMouseWheelReq:true,\\r\\n\\t\\t\\t\\t        eventProp:\\\"clientY\\\",paddingStart:\\\"paddingTop\\\",paddingEnd:\\\"paddingBottom\\\"\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    horizontal: {\\r\\n\\t\\t\\t\\t        x: \\\"X\\\",direction:\\\"h\\\",displayDirection:\\\"horizontal\\\", pos: \\\"left\\\",\\r\\n\\t\\t\\t\\t        size: \\\"width\\\",crossSize: \\\"height\\\", crossMinSize: \\\"min-height\\\", crossMaxSize: \\\"max-height\\\",\\r\\n\\t\\t\\t\\t        client: \\\"clientWidth\\\", crossClient: \\\"clientHeight\\\",\\r\\n\\t\\t\\t\\t        scrollEdge: \\\"scrollTop\\\",offset: \\\"offsetWidth\\\", crossOffset: \\\"offsetHeight\\\", offsetPos: \\\"offsetLeft\\\",\\r\\n\\t\\t\\t\\t        scroll: \\\"scrollLeft\\\", scrollSize: \\\"scrollWidth\\\",barTopLimit:0,containerCSS:\\\"nsScrollerHorizontalContainer\\\",\\r\\n\\t\\t\\t\\t        scrollerCSS:\\\"nsScrollerHorizontalBar\\\",buttonProp:\\\"horizontalScrollButtons\\\",beforeButtonProp:\\\"leftHTML\\\",\\r\\n\\t\\t\\t\\t        afterButtonProp:\\\"rightHTML\\\",beforeButtonCSS:\\\"nsScrollerButtonLeft\\\",afterButtonCSS:\\\"nsScrollerButtonRight\\\",\\r\\n\\t\\t\\t\\t        elementPosition:config.elementPosition,inputSize:config.scrollWidth,decreaseScrollSize:false,\\r\\n\\t\\t\\t\\t        targetProp:\\\"horizontalElement\\\",targetParentProp:\\\"horizontalParentElement\\\",isMouseWheelReq:false,\\r\\n\\t\\t\\t\\t        eventProp:\\\"clientX\\\",paddingStart:\\\"paddingLeft\\\",paddingEnd:\\\"paddingRight\\\"\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar setScrollPos = function(item,scrollPos)\\r\\n\\t\\t{\\r\\n\\t\\t\\tselectedItem = item;\\r\\n\\t\\t\\tif(selectedItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tutil.addEvent(selectedItem.element,\\\"scroll\\\",scrollableElementScrollHandler);\\r\\n\\t\\t\\t\\tsetScrollableItems(selectedItem,scrollPos);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar applyStyle = function(item,on) \\r\\n\\t\\t{\\r\\n\\t        var overflow = on ? 'hidden' : null;\\r\\n\\t        var msOverflowStyle = on ? 'none' : null;\\r\\n\\t\\r\\n\\t        util.css(item.target.parentNode, {\\r\\n\\t            overflow: overflow,\\r\\n\\t            msOverflowStyle: msOverflowStyle,\\r\\n\\t            position: (item.elementPosition == 'static') ? '' : 'relative'\\r\\n\\t        });\\r\\n\\t\\r\\n\\t        var scroll = on ? 'scroll' : null;\\r\\n\\t        var axis = item.direction == 'v' ? 'y' : 'x';\\r\\n\\t        var css = {};\\r\\n\\t\\r\\n\\t        css['overflow-' + axis] = scroll;\\r\\n\\t        css['box-sizing'] = 'border-box';\\r\\n\\t        css.margin = '0';\\r\\n\\t        css.border = '0';\\r\\n\\t\\r\\n\\t        if(item.elementPosition == 'absolute') \\r\\n\\t        {\\r\\n\\t        \\tcss.position = 'absolute';\\r\\n\\t        \\tcss.top = '0';\\r\\n\\t\\r\\n\\t            if (item.direction == 'h') \\r\\n\\t            {\\r\\n\\t            \\tcss.left = '0';\\r\\n\\t            } \\r\\n\\t            else \\r\\n\\t            {\\r\\n\\t            \\tcss.bottom = '0';\\r\\n\\t            \\tcss.right = item.rtl ? '0' : '';\\r\\n\\t            \\tcss.left = item.rtl ? '' : '0';\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        util.css(item.target,css);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t\\tvar onScrollerMouseDown = function(event,scroller) \\r\\n\\t\\t{\\r\\n\\t\\t\\tsetSelectedItem(event,null,true);\\r\\n\\t\\t\\tif(selectedItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    event.preventDefault();\\r\\n\\t\\t\\t    event.stopPropagation();\\r\\n\\t\\t\\t    if(selectedItem.activeCSS)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tutil.addStyleClass(selectedItem.scroller,selectedItem.activeCSS);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    dispatchScrollStartEvent(selectedItem,event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar setSelectedItem = function(event,target,setScrollPos)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttarget = target ? target : event.target;\\r\\n\\t\\t\\tselectedItem = getItemByScroller(target);\\r\\n\\t\\t\\tif(selectedItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tselectedItem.dragging = true;\\r\\n\\t\\t\\t\\tif(setScrollPos)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tselectedItem.scrollerPos = getCursorPosition(selectedItem,event) - selectedItem.barPos;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getItemByScroller = function(scroller)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var key in props)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = props[key];\\r\\n\\t\\t\\t\\tif(item.scroller == scroller)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar createComponent = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var key in props)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = props[key];\\r\\n\\t\\t\\t\\titem.target = config[item.targetProp];\\r\\n\\t\\t\\t\\titem.targetParent = config[item.targetParentProp];\\r\\n\\t\\t\\t\\tif(!isSameElement)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.addStyleClass(item.target,\\\"nsScrollerScrollable\\\");\\r\\n\\t\\t\\t\\t\\tutil.addStyleClass(item.target,\\\"nsScrollerElement\\\");\\r\\n\\t\\t\\t\\t\\tif(item.isMouseWheelReq)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tutil.addEvent(item.target,\\\"mousewheel\\\",mouseWheelHandler);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t//util.addEvent(item.target,\\\"scroll\\\",bodyScrollHandler);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar container = createScroller(null,item.containerCSS,item.scrollerCSS);\\r\\n\\t\\t\\t\\tvar scroller = container.children[0];\\r\\n\\t\\t\\t\\tvar eleBefore = null;\\r\\n\\t\\t\\t\\tvar eleAfter = null;\\r\\n\\t\\t\\t\\tvar scrollerParent = container;\\r\\n\\t\\t\\t\\tif(config[item.buttonProp][\\\"enable\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar eleBefore = createButton(item,item.beforeButtonCSS,config[item.buttonProp][item.beforeButtonProp]);\\r\\n\\t\\t\\t\\t\\tcontainer.appendChild(eleBefore);\\r\\n\\t\\t\\t\\t\\tscrollerParent = util.createDiv(null,\\\"nsScrollerBarParent-\\\" + item.direction);\\r\\n\\t\\t\\t\\t\\tscrollerParent.appendChild(scroller);\\r\\n\\t\\t\\t\\t\\tcontainer.appendChild(scrollerParent);\\r\\n\\t\\t\\t\\t\\tvar eleAfter = createButton(item,item.afterButtonCSS,config[item.buttonProp][item.afterButtonProp]);\\r\\n\\t\\t\\t\\t\\tcontainer.appendChild(eleAfter);\\r\\n\\t\\t\\t\\t\\titem.buttonBefore = eleBefore;\\r\\n\\t\\t\\t\\t\\titem.buttonAfter = eleAfter;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tutil.addStyleClass(scrollerParent,\\\"nsScrollerBarParent\\\");\\r\\n\\t\\t\\t\\titem.targetParent.appendChild(container);\\r\\n\\t\\t\\t\\t//container.style[item.crossSize] = scroller[item.crossOffset] + \\\"px\\\";\\r\\n\\t\\t\\t\\tvar setting = {element:scroller,restriction:\\\"parent\\\",enableXAxis:(item.direction != \\\"v\\\"),enableYAxis:(item.direction == \\\"v\\\"),\\r\\n\\t\\t\\t\\t\\t\\t\\t   dragStartingCallback:onScrollerMouseDown,draggingCallback:docMouseMoveHandler,dragEndCallback:docMouseUpHandler,\\r\\n\\t\\t\\t\\t\\t\\t\\t   enableMoveOnClick:config.enableMoveOnClick,moveOnClickCallback:scrollerClickHandler};\\r\\n\\t\\t\\t\\tvar objDrag = new nsScrollerDraggable(setting);\\r\\n\\t\\t\\t\\tvar divScrollCause = util.createDiv(null);\\r\\n\\t\\t\\t\\tdivScrollCause.innerHTML = \\\"&nbsp;\\\";\\r\\n\\t\\t\\t\\tvar divScroll = util.createDiv(\\\"divTest\\\" + item.x);\\r\\n\\t\\t\\t\\tvar css = {};\\r\\n\\t\\t\\t\\tcss[\\\"position\\\"] = \\\"absolute\\\";\\r\\n\\t\\t        css[\\\"overflow-\\\" + item.x.toLowerCase()] = \\\"scroll\\\";\\r\\n\\t\\t        css[\\\"left\\\"] = \\\"-9999px\\\";\\r\\n\\t\\t        css[\\\"top\\\"] = \\\"-9999px\\\";\\r\\n\\t\\t        util.css(divScroll,css);\\r\\n\\t\\t\\t\\tdivScroll.appendChild(divScrollCause);\\r\\n\\t\\t\\t\\tdocument.body.appendChild(divScroll);\\r\\n\\t\\t\\t\\titem.scrollContainer = container;\\r\\n\\t\\t\\t\\titem.container = scrollerParent;\\r\\n\\t\\t\\t\\titem.scroller = scroller;\\r\\n\\t\\t\\t\\titem.element = divScroll;\\r\\n\\t\\t\\t\\titem.scrollableElementCause = divScrollCause;\\r\\n\\t\\t\\t\\titem.objDrag = objDrag;\\r\\n\\t\\t\\t\\tsetScrollElementSize(item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(isSameElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivScrollBarCorner = util.createDiv(null,\\\"nsScrollBarCorner\\\");\\r\\n\\t\\t\\t\\tprops[Object.keys(props)[0]].targetParent.appendChild(divScrollBarCorner);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar createScroller = function(id,cssContainer,cssScroller)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcssContainer = cssContainer ? cssContainer : \\\"\\\";\\r\\n\\t\\t\\tcssScroller = cssScroller ? cssScroller : \\\"\\\";\\r\\n\\t\\t\\tvar scrollContainer = util.createDiv(null,\\\"nsScrollerContainer \\\" + cssContainer);\\r\\n\\t\\t\\tvar scroller = util.createDiv(null,\\\"nsScrollerBar \\\" + cssScroller);\\r\\n\\t\\t\\tscrollContainer.appendChild(scroller);\\r\\n\\t\\t\\treturn scrollContainer;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar createButton = function(item,css,html)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar div = util.createDiv(null,\\\"nsScrollerControl nsScrollerControl-\\\" + item.direction);\\r\\n\\t\\t\\tdiv.innerHTML = html;\\r\\n\\t\\t\\tutil.addStyleClass(div,css);\\r\\n\\t\\t\\t//util.addEvent(div,\\\"click\\\",btnControlClickHandler);\\r\\n\\t\\t\\tutil.addEvent(div,\\\"mousedown\\\",btnMouseDownHandler);\\r\\n\\t\\t\\tutil.addEvent(div,\\\"dblclick\\\",btnMouseDownHandler);\\r\\n\\t\\t\\tutil.addEvent(div,\\\"mouseup\\\",clearScroll);\\r\\n\\t\\t\\tutil.addEvent(div,\\\"mouseout\\\",clearScroll);\\r\\n\\t\\t\\treturn div;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar btnMouseDownHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//console.log(\\\"btnMouseDownHandler \\\" + event.type);\\r\\n\\t\\t\\tbtnControlClickHandler(event);\\r\\n\\t\\t\\tclearTimeout(interval);\\r\\n\\t\\t\\tinterval = setTimeout(function(){btnMouseDownHandler(event);}, 200);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar clearScroll = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//console.log(\\\"clearScroll \\\" + event.type);\\r\\n\\t\\t\\tclearTimeout(interval);\\r\\n\\t\\t\\tinterval = null;\\r\\n\\t\\t\\tlastScrollPos = -1;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar btnControlClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\tvar target = event.target;\\r\\n\\t\\t\\tvar parent = util.findParent(target,null,\\\".nsScrollerContainer\\\");\\r\\n\\t\\t\\tvar scroller = parent.querySelector(\\\".nsScrollerBar\\\");\\r\\n\\t\\t\\tsetSelectedItem(event,scroller,true);\\r\\n\\t\\t\\tif(selectedItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar btnParent = util.findParent(target,null,\\\".nsScrollerControl\\\");\\r\\n\\t\\t\\t\\tvar isAdd = true;\\r\\n\\t\\t\\t\\tif(util.hasStyleClass(btnParent,selectedItem.beforeButtonCSS))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tisAdd = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar oldPos = scrollableElementPosition(selectedItem);\\r\\n\\t\\t\\t\\tvar newPos = isAdd ? (oldPos + 30) : (oldPos - 30);\\r\\n\\t\\t\\t\\tutil.addEvent(selectedItem.element,\\\"scroll\\\",scrollableElementScrollHandler);\\r\\n\\t\\t\\t\\tscrollableElementPosition(selectedItem,newPos);\\r\\n\\t\\t\\t\\t//selectedItem = null;\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar mouseWheelHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\tvar element = props.vertical.targetParent;\\r\\n\\t\\t\\tvar verticalScroller = element.querySelector(\\\".nsScrollerVerticalBar\\\");\\r\\n\\t\\t\\tsetSelectedItem(event,verticalScroller,true);\\r\\n\\t\\t\\tif(selectedItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tutil.addEvent(selectedItem.element,\\\"scroll\\\",scrollableElementScrollHandler);//selectedItem.objDrag.setElementPos(null,100);\\r\\n\\t\\t\\t\\tvar oldPos = selectedItem.element[selectedItem.scroll];\\r\\n\\t\\t\\t\\tvar newPos = oldPos + event[\\\"delta\\\" + selectedItem.x];\\r\\n\\t\\t\\t\\tselectedItem.element[selectedItem.scroll] = newPos;\\r\\n\\t\\t\\t\\tif(config.enableCustomHandler)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tdispatchScrollingEvent(selectedItem,newPos,oldPos,event);\\r\\n\\t\\t\\t\\tmouseWheelEndEvent(selectedItem,event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar mouseWheelEndEvent = function(item,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(mouseWheelEndInterval)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tclearInterval(mouseWheelEndInterval);\\r\\n\\t\\t\\t\\tmouseWheelEndInterval = null;\\r\\n\\t\\t\\t\\tmouseWheelEndInterval = setInterval(function() {\\r\\n\\t\\t\\t\\t\\tdispatchScrollEndEvent(item,event);\\r\\n\\t\\t        }, 300); \\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar scrollableElementScrollHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\tif(selectedItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\telementScrollHandler(selectedItem.element,selectedItem,event);\\r\\n\\t\\t\\t\\tsetIsInternalWithOutDelay = false;\\r\\n\\t\\t\\t\\tisInternalScroll = true;\\r\\n\\t\\t\\t\\tutil.removeEvent(selectedItem.element,\\\"scroll\\\",scrollableElementScrollHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar bodyScrollHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!isInternalScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconsole.log(\\\"In Element Scroll\\\");\\r\\n\\t\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\t\\tfor(var key in props)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = props[key];\\r\\n\\t\\t\\t\\t\\tvar scroller = item.scroller;\\r\\n\\t\\t\\t\\t\\tsetSelectedItem(event,scroller,true);\\r\\n\\t\\t\\t\\t\\tif(selectedItem)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tselectedItem.element[selectedItem.scroll] = selectedItem.target[selectedItem.scroll];\\r\\n\\t\\t\\t\\t\\t\\telementScrollHandler(selectedItem.target,selectedItem,event);\\r\\n\\t\\t\\t\\t\\t\\tisInternalScroll = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setIsInternalWithOutDelay)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tisInternalScroll = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (itemElementScrollInterval != -1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tclearTimeout(itemElementScrollInterval);\\r\\n\\t\\t\\t\\t\\titemElementScrollInterval = -1;\\r\\n\\t\\t\\t\\t\\tsetIsInternalWithOutDelay = false;\\r\\n\\t\\t\\t\\t\\tisInternalScroll = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titemElementScrollInterval = setTimeout(\\r\\n\\t\\t\\t\\t\\t\\tfunction()\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tsetIsInternalWithOutDelay = true;\\r\\n\\t\\t\\t\\t\\t\\t\\tisInternalScroll = false;\\r\\n\\t\\t\\t\\t\\t\\t},1000);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar docMouseMoveHandler = function(event,scroller)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\tif(!selectedItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetSelectedItem(event,scroller,true);\\r\\n\\t\\t\\t}\\r\\n\\t        if(selectedItem)\\r\\n\\t        {\\r\\n\\t        \\tdragHandler(selectedItem,event);\\r\\n\\t        \\tscrollBody(selectedItem,event);\\r\\n\\t        }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar docMouseUpHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t    if(selectedItem.activeCSS)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tutil.removeStyleClass(selectedItem.scroller,selectedItem.activeCSS);\\r\\n\\t\\t    }\\r\\n\\t\\t    updateScrollBars();\\r\\n\\t\\t    var item = selectedItem;\\r\\n\\t\\t    selectedItem = null;\\r\\n\\t\\t    clearScroll();\\r\\n\\t\\t    dispatchScrollEndEvent(item,event);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar scrollerClickHandler = function(event,target,oldBarBound,newBarBound,oldTrackBound,newTrackBound)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\t//if(!selectedItem)\\r\\n\\t\\t\\t//{\\r\\n\\t\\t\\t\\tsetSelectedItem(event,target,false);\\r\\n\\t\\t\\t//}\\r\\n\\t        if(selectedItem)\\r\\n\\t        {\\r\\n\\t        \\tvar item = selectedItem;\\r\\n\\t        \\tvar perc = (event[item.eventProp] - oldTrackBound[item.pos]) / (oldTrackBound[item.size] - oldTrackBound[item.paddingStart] - oldTrackBound[item.paddingEnd]);\\r\\n\\t        \\tvar scrollSize = item.scrollableElementCause[item.scrollSize];\\r\\n\\t        \\tvar clientSize = item.targetParent[item.client];\\r\\n                var newScrollPos = perc * (scrollSize - clientSize);\\r\\n                if(config.enableAnimation)\\r\\n                {\\r\\n                \\tvar isSmoothScrollSupported = 'scrollBehavior' in document.documentElement.style;\\r\\n                \\tif(isSmoothScrollSupported)\\r\\n                \\t{\\r\\n                \\t\\titem.target.style.scrollBehavior = 'smooth';\\r\\n                        setTimeout(function(){item.target.style.scrollBehavior = null;}, 500);\\r\\n                        setScrollPos(item,newScrollPos);\\r\\n                \\t}\\r\\n                \\telse \\r\\n                \\t{\\r\\n                  \\t\\tvar scrollAnimateSetting = {element: item.target,direction:item.displayDirection,callback:function(){\\r\\n                  \\t\\t\\tsetScrollPos(item,newScrollPos);\\r\\n                  \\t\\t}};\\r\\n                  \\t\\tvar scrollerAnimate = new NSScrollAnimator(scrollAnimateSetting);\\r\\n                  \\t\\tscrollerAnimate.scrollTo(newScrollPos);\\r\\n                \\t}\\r\\n                }\\r\\n                else\\r\\n                {\\r\\n                \\tsetScrollPos(item,newScrollPos);\\r\\n                }\\r\\n\\t        }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar scrollBody = function(item,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tupdateScrollPositions(item,false);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar dragHandler = function(item,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!item.scrollerPos)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem.scrollerPos = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar relPos = barPositionToRelative(item,getCursorPosition(item,event) - item.scrollerPos);\\r\\n\\t\\t\\tvar subPos = item.element[item.scrollSize] - item.element[item.client];\\r\\n\\t\\t\\tvar scrollPos = relPos * subPos;\\r\\n\\t\\t\\t//console.log(relPos + \\\" * \\\" + subPos + \\\" = \\\" + scrollPos);\\r\\n\\t\\t\\tsetScrollableItems(item,scrollPos);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar setScrollableItems = function(item,scrollPos)\\r\\n\\t\\t{\\r\\n\\t\\t\\tscrollPos = Math.round(scrollPos);\\r\\n\\t\\t\\tvar maxValue = item.element[item.scrollSize] - item.element[item.client];\\r\\n\\t\\t\\t//console.log(scrollPos);\\r\\n\\t\\t\\tif(scrollPos < 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tscrollPos = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(scrollPos > maxValue)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tscrollPos = maxValue;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar lastScrollPos = item.element[item.scroll];\\r\\n\\t\\t\\tif(lastScrollPos != scrollPos)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//console.log(scrollPos + \\\" == \\\" + item.element[item.scrollSize]);\\r\\n\\t\\t\\t\\tsetIsInternalWithOutDelay = true;\\r\\n\\t\\t\\t\\tisInternalScroll = true; \\r\\n\\t\\t\\t\\titem.element[item.scroll] = scrollPos;\\r\\n\\t\\t\\t\\tif(!config.enableCustomHandler)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem.target[item.scroll] = scrollPos;\\r\\n\\t\\t\\t\\t\\tif(config.otherScrollableElement && config.otherScrollableElement.length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tfor(var count = 0;count < config.otherScrollableElement.length;count++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar element = config.otherScrollableElement[count];\\r\\n\\t\\t\\t\\t\\t\\t\\telement[item.scroll] = scrollPos;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tdispatchScrollingEvent(item,scrollPos,lastScrollPos);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tlastScrollPos = scrollPos;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getCursorPosition = function(item,event)\\r\\n\\t\\t{\\r\\n\\t    \\treturn event[\\\"client\\\" + item.x] || ((event.touches || {})[0] || {})[\\\"page\\\" + item.x];\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar updateScrollBars =  function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var key in props)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = props[key];\\r\\n\\t\\t\\t\\tapplyStyle(item,true);\\r\\n\\t\\t\\t\\tsetScrollElementSize(item);\\r\\n\\t\\t\\t\\tresizeHandler(item);\\r\\n\\t\\t\\t\\tupdateScrollPositions(item,true);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tupdateScrollControls();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar resizeHandler = function(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar updatePos = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t var offset = item.element[item.crossOffset];\\r\\n\\t             var client = item.element[item.crossClient];\\r\\n\\t             var padding = 0;\\r\\n\\t             var oldPos, newPos;\\r\\n\\t             if (isMacFF) \\r\\n\\t             {\\r\\n\\t             \\tpadding = macScrollBarSize;\\r\\n\\t             }\\r\\n\\t             else if (client > 0 && offset === 0) \\r\\n\\t             {\\r\\n\\t             \\toffset = client + operaMaxScrollBarSize;\\r\\n\\t             }\\r\\n\\t             if (offset) \\r\\n\\t             {\\r\\n\\t            \\t var delta = offset - client + padding;\\r\\n\\t            \\t if (item.elementPosition == 'static') \\r\\n\\t            \\t {\\r\\n\\t                     oldPos = util.css(item.element,item.crossSize);\\r\\n\\t                     newPos = item.target.parentNode[item.crossClient] + delta + \\\"px\\\";\\r\\n\\t                     if (oldPos != newPos) \\r\\n\\t                     {\\r\\n\\t                         setCrossSizes(item,item.element, newPos);\\r\\n\\t                     }\\r\\n\\t                 } \\r\\n\\t            \\t else\\r\\n\\t            \\t {\\r\\n\\t            \\t\\t var styles = {};\\r\\n\\t                     var key = item.rtl ? 'Left' : 'Right';\\r\\n\\t                     if (item.direction == 'h') \\r\\n\\t                     {\\r\\n\\t                         key = 'Bottom';\\r\\n\\t                     }\\r\\n\\t                     util.css(item.element, styles);\\r\\n\\t            \\t }\\r\\n\\t            \\t \\r\\n\\t             }\\r\\n\\t             item.resizeLastFire = getCurrentTime();\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar container = item[\\\"container\\\"];\\r\\n\\t\\t\\tvar scroller = item[\\\"scroller\\\"];\\r\\n\\t\\t\\tvar scrollerSize =  item[\\\"scrollerSize\\\"];\\r\\n\\t\\t\\tvar barPos = item[\\\"barPos\\\"];\\r\\n\\t\\t\\tvar minPeriod = (item.resizeDebounce === undefined) ? 300 : item.resizeDebounce;\\r\\n\\t\\t   \\tvar delay = 0;\\r\\n\\t\\t   \\tif (getCurrentTime() - item.resizeLastFire < minPeriod) \\r\\n\\t\\t   \\t{\\r\\n\\t            clearTimeout(item.resizePauseTimer);\\r\\n\\t            delay = minPeriod;\\r\\n\\t        }\\r\\n\\t\\t   \\tif (delay) \\r\\n\\t\\t   \\t{\\r\\n\\t\\t   \\t\\titem.resizePauseTimer = setTimeout(updatePos, delay);\\r\\n\\t        } \\r\\n\\t\\t   \\telse \\r\\n\\t\\t   \\t{\\r\\n\\t\\t   \\t\\tupdatePos();\\r\\n\\t        }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar elementScrollHandler = function(element,item,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(element && item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar elementOffset = element[item.offset];\\r\\n\\t\\t\\t\\tif(item.buttonBefore)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\telementOffset = elementOffset - item.buttonBefore[item.offset];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(item.buttonAfter)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\telementOffset = elementOffset - item.buttonAfter[item.offset];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem[\\\"barPos\\\"] = Math.round((elementOffset/element[item.scrollSize]) * element[item.scroll]);\\r\\n\\t\\t\\t\\tsetBarPosition(item, item[\\\"barPos\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar setElementScrollPos = function(element,item,newScrollPos)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(config.enableAnimation)\\r\\n            {\\r\\n            \\t/*var isSmoothScrollSupported = 'scrollBehavior' in document.documentElement.style;\\r\\n            \\tif(isSmoothScrollSupported)\\r\\n            \\t{\\r\\n            \\t\\telement.style.scrollBehavior = 'smooth';\\r\\n                    setTimeout(function(){element.style.scrollBehavior = null;}, 500);\\r\\n            \\t}\\r\\n            \\telse \\r\\n            \\t{*/\\r\\n              \\t\\tvar scrollAnimateSetting = {element: element,direction:item.displayDirection,callback:function(){\\r\\n              \\t\\t}};\\r\\n              \\t\\tvar scrollerAnimate = new NSScrollAnimator(scrollAnimateSetting);\\r\\n              \\t\\tscrollerAnimate.scrollTo(newScrollPos);\\r\\n            \\t//}\\r\\n            }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar addObserver = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar mutationProp = { attributes: false, childList: true, subtree: true};\\r\\n\\t\\t\\tvar callback = function(mutationsList, observer) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < mutationsList.length;count++)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tvar mutation = mutationsList[count];\\r\\n\\t\\t\\t        if (mutation.type == 'childList') \\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tupdateWithDelay();\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar mutationObserver = new MutationObserver(callback);\\r\\n\\t\\t\\tif(isSameElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar element = props[Object.keys(props)[0]].target;\\r\\n\\t\\t\\t\\tmutationObserver.observe(element,mutationProp);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(key in props)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = props[key];\\r\\n\\t\\t\\t\\t\\tmutationObserver.observe(item.target,mutationProp);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar updateWithDelay = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tstopDelayInterval();\\r\\n\\t\\t\\tdelayInterval = setInterval(function() {\\r\\n\\t\\t\\t\\tupdateScrollBars();\\r\\n\\t\\t\\t\\tstopDelayInterval();\\r\\n\\t        }, 300); \\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar stopDelayInterval = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(delayInterval)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tclearInterval(delayInterval);\\r\\n\\t\\t\\t\\tdelayInterval = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar setCrossSizes = function(item,element,size) \\r\\n\\t\\t{\\r\\n\\t        var styles = {};\\r\\n\\t        styles[item.crossSize] = size;\\r\\n\\t        styles[item.crossMinSize] = size;\\r\\n\\t        styles[item.crossMaxSize] = size;\\r\\n\\t        util.css(element, styles);\\r\\n\\t    };\\r\\n\\t\\t\\r\\n\\t\\tvar getCurrentTime = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t return new Date().getTime();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar updateScrollPositions = function(item,isReset,isSetBarPos)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcheckScroll(item);\\r\\n\\t\\t\\tvar container = item[\\\"container\\\"];\\r\\n\\t\\t\\tvar scroller = item[\\\"scroller\\\"];\\r\\n\\t\\t\\tvar scrollerSize =  item[\\\"scrollerSize\\\"];\\r\\n\\t\\t\\tvar barPos = item[\\\"barPos\\\"];\\r\\n\\t\\t\\tvar extraOffset = isBothScrollPresent() ? 16 : 0;\\r\\n\\t\\t\\tvar newBarSize = (container[item.client] - item.barTopLimit) * (item.element[item.client] / item.element[item.scrollSize]);\\r\\n\\t\\t\\t/*if(config[item.buttonProp][\\\"enable\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t\\tif((newBarSize - extraOffset) > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tnewBarSize = newBarSize - extraOffset;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//console.log(item.displayDirection + \\\" , \\\" + container[item.client] + \\\" , \\\" + item.barTopLimit  + \\\" , \\\" + item.element[item.client] + \\\" , \\\" + item.element[item.scrollSize]);\\r\\n\\t        // Positioning bar\\r\\n\\t        if (isReset || parseInt(scrollerSize, 10) != parseInt(newBarSize, 10)) \\r\\n\\t        {\\r\\n\\t            setScrollerSize(item,newBarSize);\\r\\n\\t            item[\\\"scrollerSize\\\"] = newBarSize;\\r\\n\\t        }\\r\\n\\t        item[\\\"barPos\\\"] = relativeToBarPosition(item,relativePosition(item));\\r\\n\\t        if(isSetBarPos)\\r\\n\\t        {\\r\\n\\t        \\tsetBarPosition(item, item[\\\"barPos\\\"]);\\r\\n\\t        }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar setBarPosition = function(item,position)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar scroller = item[\\\"scroller\\\"];\\r\\n\\t\\t\\tvar sendItem = {deltaX:null,deltaY:null};\\r\\n\\t\\t\\tsendItem[\\\"delta\\\" + item.x] = position - parseInt(scroller.style[item.pos]);\\r\\n\\t\\t\\titem.objDrag.setPosition(sendItem.deltaX,sendItem.deltaY);\\r\\n\\t\\t\\tvar oldPos = scroller.style[item.pos];\\r\\n\\t        var newPos = position + \\\"px\\\";\\r\\n\\t        if (newPos && newPos != oldPos) \\r\\n\\t        {\\r\\n\\t        \\tscroller.style[item.pos] = newPos;\\r\\n\\t        }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar setScrollerSize = function(item,size) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar scroller = item[\\\"scroller\\\"];\\r\\n\\t    \\tvar barMinSize = item.barMinSize || 20;\\r\\n\\t    \\tvar newSize = size;\\r\\n\\t        if (newSize > 0 && newSize < barMinSize) \\r\\n\\t        {\\r\\n\\t        \\tnewSize = barMinSize;\\r\\n\\t        }\\r\\n\\t        if(scroller) \\r\\n\\t        {\\r\\n\\t        \\tscroller.style[item.size] = parseInt(newSize, 10) + \\\"px\\\";\\r\\n\\t        }\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    var setScrollElementSize = function(item) \\r\\n\\t\\t{\\r\\n\\t    \\tvar scrollCss = {};\\r\\n\\t    \\t//console.log(item.displayDirection + \\\" , \\\" + config.element[item.offset] + \\\" , \\\" + config.element[item.scrollSize]);\\r\\n\\t    \\tvar offset = 0;\\r\\n\\t    \\tvar scrollBarSize = item.decreaseScrollSize ? getScrollBarSize(item) : 0;\\r\\n\\t    \\tscrollCss[item.size] = item.target[item.client] - scrollBarSize + \\\"px\\\";\\r\\n\\t    \\tutil.css(item.element,scrollCss);\\r\\n\\t    \\tvar causeCss = {};\\r\\n\\t    \\tif(util.isUndefinedOrNull(item.inputSize) || parseInt(item.inputSize) <= 0)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tcauseCss[item.size] = (item.target[item.scrollSize]) + \\\"px\\\";\\r\\n\\t    \\t}\\r\\n\\t    \\telse\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tcauseCss[item.size] = parseInt(item.inputSize) + \\\"px\\\";\\r\\n\\t    \\t}\\r\\n\\t    \\tutil.css(item.scrollableElementCause,causeCss);\\r\\n\\t\\t};\\r\\n\\t    \\r\\n\\t    var relativePosition = function(item,position)\\r\\n\\t    {\\r\\n\\t    \\tvar size = item.element[item.scrollSize] - item.element[item.client];\\r\\n\\t        var newPos;\\r\\n\\t        if(position) \\r\\n\\t        {\\r\\n\\t        \\tnewPos = scrollableElementPosition(item,position * size);\\r\\n\\t        } \\r\\n\\t        else \\r\\n\\t        {\\r\\n\\t        \\tnewPos = scrollableElementPosition(item);\\r\\n\\t        }\\r\\n\\t        return newPos / (size || 1);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    var scrollableElementPosition = function(item,x) \\r\\n\\t    { \\r\\n\\t        var ie = \\\"page\\\" + item.x + \\\"Offset\\\";\\r\\n\\t        var key = (item.element[ie]) ? ie : item.scroll;\\r\\n\\t        if (!util.isUndefined(x)) \\r\\n\\t        {\\r\\n\\t        \\tif(key === item.scroll)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tsetScrollableItems(item,x);\\r\\n\\t        \\t}\\r\\n\\t        \\telse\\r\\n\\t        \\t{\\r\\n\\t        \\t\\titem.element[key] = x;\\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t        return item.element[key];\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    var relativeToBarPosition = function(item,pos) \\r\\n\\t    {\\r\\n\\t        return pos * getPos(item) + item.barTopLimit;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    var barPositionToRelative = function(item,pos) \\r\\n\\t    {\\r\\n\\t        return (pos - item.barTopLimit) / getPos(item);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    var getPos = function(item)\\r\\n\\t    {\\r\\n\\t    \\treturn item.container[item.client] - item.barTopLimit - item.scroller[item.offset];\\r\\n\\t    };\\r\\n\\t\\t\\r\\n\\t\\tvar checkScroll = function(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar scrollContainer = item[\\\"scrollContainer\\\"];\\r\\n\\t\\t\\tvar scroller = item[\\\"scroller\\\"];\\r\\n\\t\\t\\tvar isOverflowing = hasScroll(item);\\r\\n\\t\\t\\tif(isOverflowing)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tutil.addStyleClass(item.target,\\\"nsScrollerScrollable-\\\" + item.direction);\\r\\n\\t\\t\\t\\tutil.removeStyleClass(scrollContainer,\\\"nsScrollerHidden\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tutil.removeStyleClass(item.target,\\\"nsScrollerScrollable-\\\" + item.direction);\\r\\n\\t\\t\\t\\tutil.addStyleClass(scrollContainer,\\\"nsScrollerHidden\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar hasScroll = function(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isOverflowing = item.element[item.client] < item.element[item.scrollSize];\\r\\n\\t\\t\\treturn isOverflowing;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar updateScrollControls = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar scrollPresent = isBothScrollPresent();\\r\\n\\t\\t\\tfor(var key in props)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = props[key];\\r\\n\\t\\t\\t\\tvar scrollContainer = item[\\\"scrollContainer\\\"];\\r\\n\\t\\t\\t\\tvar container = item[\\\"container\\\"];\\r\\n\\t\\t\\t\\tvar scroller = item[\\\"scroller\\\"];\\r\\n\\t\\t\\t\\tif(scrollPresent && isSameElement)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.addStyleClass(scrollContainer,item.containerCSS + \\\"-both\\\");\\r\\n\\t\\t\\t\\t\\tutil.addStyleClass(scrollContainer,\\\"nsScrollerBarParent\\\" + \\\"-\\\" + item.direction + \\\"-both\\\");\\r\\n\\t\\t\\t\\t\\tif(item.buttonAfter)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tutil.addStyleClass(item.buttonAfter,item.afterButtonCSS + \\\"-both\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.removeStyleClass(scrollContainer,item.containerCSS + \\\"-both\\\");\\r\\n\\t\\t\\t\\t\\tutil.removeStyleClass(scrollContainer,\\\"nsScrollerBarParent\\\" + \\\"-\\\" + item.direction + \\\"-both\\\");\\r\\n\\t\\t\\t\\t\\tif(item.buttonAfter)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tutil.removeStyleClass(item.buttonAfter,item.afterButtonCSS + \\\"-both\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(scrollPresent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tutil.removeStyleClass(divScrollBarCorner,\\\"nsScrollerHidden\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tutil.addStyleClass(divScrollBarCorner,\\\"nsScrollerHidden\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar isBothScrollPresent = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrScrollContainer = [];\\r\\n\\t\\t\\tfor(key in props)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = props[key];\\r\\n\\t\\t\\t\\tif(item && item.targetParent && item.targetParent.querySelectorAll(\\\".nsScrollerContainer\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrCon = item.targetParent.querySelectorAll(\\\".nsScrollerContainer\\\");\\r\\n\\t\\t\\t\\t\\tfor(var index in arrCon)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrScrollContainer.push(arrCon[index]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar retValue = true;\\r\\n\\t\\t\\tfor(var count = 0;count < arrScrollContainer.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar scrollContainer = arrScrollContainer[count];\\r\\n\\t\\t\\t\\tif(util.hasStyleClass(scrollContainer,\\\"nsScrollerHidden\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getScrollBarSize = function(item,element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!element)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\telement = item.target;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar scrollContainer = item[\\\"scrollContainer\\\"];\\r\\n\\t\\t\\tif(util.hasStyleClass(scrollContainer,\\\"nsScrollerHidden\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//if Chrome then scrollbar size is 0 so the below condition is 0 but we should return the scrollbar size\\r\\n\\t\\t\\tif((element[item.offset] - element[item.client]) == 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn util.getScrollBarWidth();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn 0;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar remove = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var key in props)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = props[key];\\r\\n\\t\\t\\t\\tif(item.objDrag)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem.objDrag.remove();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tutil.removeEvent(window,\\\"resize\\\",updateWithDelay);\\r\\n\\t\\t\\tclearScroll();\\r\\n\\t\\t\\tif(mutationObserver)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tmutationObserver.disconnect();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar dispatchScrollStartEvent = function(item,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar eventItem = getEventItem(item,event);\\r\\n\\t\\t\\tdispatchEvent(NSScroller.SCROLL_START,eventItem,eventItem,item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar dispatchScrollingEvent = function(item,newScrollPos,oldScrollPos,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar eventItem = getEventItem(item,event || window.event,{oldScrollPos:oldScrollPos,scrollPos:newScrollPos}); \\r\\n\\t\\t\\tdispatchEvent(NSScroller.SCROLLING,eventItem,eventItem,item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar dispatchScrollEndEvent = function(item,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar eventItem = getEventItem(item,event); \\r\\n\\t\\t    dispatchEvent(NSScroller.SCROLL_END,eventItem,eventItem,item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getEventItem = function(item,event,objExtraProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar position = getAbsoluteElementPosition(item.scroller);\\r\\n\\t\\t\\tvar eventItem = {scroller:item.container,scrollBar:item.scroller,direction:item.displayDirection,scrollPos:item.element[item.scroll],orignalEvent: event,absoluteScrollBarPos: position};\\r\\n\\t\\t\\tif(objExtraProp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var key in objExtraProp)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\teventItem[key] = objExtraProp[key];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn eventItem;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar dispatchEvent = function(eventType,data,param,item,bubbles,cancelable)\\r\\n\\t\\t{\\r\\n\\t\\t\\tutil.dispatchEvent(item.target,eventType,data,param,bubbles,cancelable);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getAbsoluteElementPosition = function(element) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar position = {x:0,y:0};\\r\\n\\t\\t\\tvar rec = element.getBoundingClientRect();\\r\\n\\t\\t\\tposition = {y: rec.top + window.scrollY, x: rec.left + window.scrollX};\\r\\n\\t\\t\\treturn position;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar nsScrollerDraggable = function(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar util = null;\\r\\n\\t\\t\\tvar config = {};\\r\\n\\t\\t\\tvar objVar = {};\\r\\n\\t\\t\\tvar fromMouseUpHandler = false;\\r\\n\\t\\t\\tvar documentMouseMoveRef = null;\\r\\n\\t\\t\\tvar documentMouseUpRef = null;\\r\\n\\t\\t\\tvar documentTouchMoveRef = null;\\r\\n\\t\\t\\tvar documentTouchEndRef = null;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar initialize = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tutil = new NSUtil();\\r\\n\\t\\t\\t\\tif(!setting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsetting = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tconfig = {\\r\\n\\t\\t\\t\\t\\t\\telement: setting[\\\"element\\\"],\\r\\n\\t\\t\\t\\t\\t\\trestriction: setting[\\\"restriction\\\"],\\r\\n\\t\\t\\t\\t\\t\\tenableXAxis: util.isUndefinedOrNull(setting[\\\"enableXAxis\\\"]) ? true : Boolean.parse(setting[\\\"enableXAxis\\\"]),\\r\\n\\t\\t\\t\\t\\t\\tenableYAxis: util.isUndefinedOrNull(setting[\\\"enableYAxis\\\"]) ? true : Boolean.parse(setting[\\\"enableYAxis\\\"]),\\r\\n\\t\\t\\t\\t\\t\\txBoundaryElement: setting[\\\"xBoundaryElement\\\"],\\r\\n\\t\\t\\t\\t\\t\\tyBoundaryElement: setting[\\\"yBoundaryElement\\\"],\\r\\n\\t\\t\\t\\t\\t\\tenableMoveOnClick: Boolean.parse(setting[\\\"enableMoveOnClick\\\"]),\\r\\n\\t\\t\\t\\t\\t\\tcontext: setting[\\\"context\\\"] || window,\\r\\n\\t\\t\\t\\t\\t\\tdocument: setting[\\\"document\\\"] || document,\\r\\n\\t\\t\\t\\t\\t\\tbody: setting[\\\"body\\\"] || document.body,\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tif(!config.element)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.throwNSError(\\\"NSScrollerDraggable\\\",\\\"Element in setting is missing\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tutil.addStyleClass(config.element,\\\"nsScrollerDraggableElement\\\");\\r\\n\\t\\t\\t\\tconfig.dragStartingCallback = util.getFunction(setting[\\\"dragStartingCallback\\\"],config.context);\\r\\n\\t\\t\\t\\tconfig.draggingCallback = util.getFunction(setting[\\\"draggingCallback\\\"],config.context);\\r\\n\\t\\t\\t\\tconfig.dragEndCallback = util.getFunction(setting[\\\"dragEndCallback\\\"],config.context);\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tif(config.restriction == \\\"parent\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconfig.xBoundaryElement = config.element.parentNode;\\r\\n\\t\\t\\t\\t\\tconfig.yBoundaryElement = config.element.parentNode;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar position = util.getStyleValue(config.element,\\\"position\\\",true);\\r\\n\\t\\t\\t\\tif(position != \\\"relative\\\" && position != \\\"absolute\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconfig.element.style.position = \\\"relative\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tconfig.element.style.top = \\\"0px\\\";\\r\\n\\t\\t\\t\\tconfig.element.style.left = \\\"0px\\\";\\r\\n\\t\\t\\t\\tutil.addEvent(config.element,\\\"mousedown\\\",elementMouseDownHandler);\\r\\n\\t\\t\\t\\tif(config.enableMoveOnClick)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.addEvent(config.xBoundaryElement,\\\"click\\\",boundaryElementClickHandler);\\r\\n\\t\\t\\t\\t\\tutil.addEvent(config.yBoundaryElement,\\\"click\\\",boundaryElementClickHandler);\\r\\n\\t\\t\\t\\t\\tconfig.moveOnClickCallback = util.getFunction(setting[\\\"moveOnClickCallback\\\"],config.context);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar elementMouseDownHandler = function(event)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\t\\tobjVar.dragging = true;\\r\\n\\t\\t\\t\\tvar rect = config.element.getBoundingClientRect();\\r\\n\\t\\t\\t\\tobjVar.initX = event.clientX - rect.left;\\r\\n\\t\\t\\t\\tobjVar.initY = event.clientY - rect.top;\\r\\n\\r\\n\\t\\t\\t\\tobjVar.initLeft = config.element.style.left;\\r\\n\\t\\t\\t\\tobjVar.initTop = config.element.style.top;\\r\\n\\t\\t\\t\\tselection(false);\\r\\n\\t\\t\\t\\taddDocumentHandler();\\r\\n\\t\\t\\t\\tif(config.dragStartingCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconfig.dragStartingCallback(event,config.element);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar windowMouseMoveHandler = function(event)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(objVar.dragging)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\t\\t\\tvar rect = config.element.getBoundingClientRect();\\r\\n\\t\\t\\t\\t\\tvar deltaX = event.clientX - (objVar.initX + rect.left);\\r\\n\\t\\t\\t\\t\\tvar deltaY = event.clientY - (objVar.initY + rect.top);\\r\\n\\t\\t\\t\\t\\tsetElementPos(deltaX,deltaY);\\r\\n\\t\\t\\t\\t\\tif(config.draggingCallback)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tconfig.draggingCallback(event,config.element);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar windowMouseUpHandler = function(event)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (objVar.dragging) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\t\\t\\tcomplete(event);\\r\\n\\t\\t\\t\\t\\trelease();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tremoveDocumentHandler();\\r\\n\\t\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t\\tfromMouseUpHandler = true;\\r\\n\\t\\t\\t\\tsetTimeout(function(){fromMouseUpHandler = false;},1000);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar windowKeyDownHandler = function(event)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\t\\tif (event.key === \\\"Escape\\\" && objVar.dragging) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcancel();\\r\\n\\t\\t\\t\\t\\trelease();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar boundaryElementClickHandler = function(event)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!fromMouseUpHandler)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar shiftTo = function(x, y) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t    if (bar && !isNaN(x) && !isNaN(y)) \\r\\n\\t\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\t        bar.style.left = Math.round(x) + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t        bar.style.top = Math.round(y) + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\t\\t\\tvar target = event.currentTarget;\\r\\n\\t\\t\\t\\t\\tvar currentParentBound = getElementDimensions(target);\\r\\n\\t\\t\\t\\t\\tvar currentElementBound = getElementDimensions(config.element);\\r\\n\\t\\t\\t\\t\\tvar xPosition = event.clientX - currentParentBound.x - (config.element.clientWidth);\\r\\n\\t\\t\\t\\t    var yPosition = event.clientY - currentParentBound.y - (config.element.clientHeight);\\r\\n\\t\\t\\t\\t    setElementPos(xPosition - currentElementBound.styleLeft,yPosition - currentElementBound.styleTop);\\r\\n\\t\\t\\t\\t    var newParentBound = getElementDimensions(target);\\r\\n\\t\\t\\t\\t\\tvar newElementBound = getElementDimensions(config.element);\\r\\n\\t\\t\\t\\t    if(config.moveOnClickCallback)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tconfig.moveOnClickCallback(event,config.element,currentElementBound,newElementBound,currentParentBound,newParentBound);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\trelease();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tfromMouseUpHandler = false;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getElementDimensions = function(element)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(element)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar bounds = element.getBoundingClientRect();\\r\\n\\t                var styles = window.getComputedStyle(element, null);\\r\\n\\t                bounds.paddingTop = parseInt(styles.paddingTop, 10);\\r\\n\\t\\t            bounds.paddingBottom = parseInt(styles.paddingBottom, 10);\\r\\n\\t\\t            bounds.paddingLeft = parseInt(styles.paddingLeft, 10);\\r\\n\\t\\t            bounds.paddingRight = parseInt(styles.paddingRight, 10);\\r\\n\\t\\t            bounds.styleTop = parseInt(styles.top, 10);\\r\\n\\t\\t            bounds.styleBottom = parseInt(styles.bottom, 10);\\r\\n\\t\\t            bounds.styleLeft = parseInt(styles.left, 10);\\r\\n\\t\\t            bounds.styleRight = parseInt(styles.right, 10);\\r\\n\\t\\t            return bounds;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar setElementPos = function(deltaX,deltaY)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar rect = config.element.getBoundingClientRect();\\r\\n\\t\\t\\t\\tif (config.enableXAxis) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar newLeft = parseInt(config.element.style.left) + deltaX;\\r\\n\\t\\t\\t\\t\\tif (config.xBoundaryElement) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar boundaryRect = config.xBoundaryElement.getBoundingClientRect();\\r\\n\\t\\t\\t\\t\\t\\tvar dragDestination = rect.left + deltaX;\\r\\n\\t\\t\\t\\t\\t\\tvar notPastLeft = dragDestination >= boundaryRect.left;\\r\\n\\t\\t\\t\\t\\t\\tvar notPastRight = dragDestination <= (boundaryRect.right - rect.width);\\r\\n\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\tif (notPastLeft && notPastRight) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tconfig.element.style.left = newLeft + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\t\\telse if (!notPastLeft) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tconfig.element.style.left = newLeft - (dragDestination - boundaryRect.left) + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\t\\telse if (!notPastRight) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tconfig.element.style.left = newLeft - (dragDestination - boundaryRect.right + rect.width) + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tconfig.element.style.left = newLeft + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (config.enableYAxis) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar newTop = parseInt(config.element.style.top) + deltaY;\\r\\n\\t\\t\\t\\t\\tif (config.yBoundaryElement) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar boundaryRect = config.yBoundaryElement.getBoundingClientRect();\\r\\n\\t\\t\\t\\t\\t\\tvar dragDestination = rect.top + deltaY;\\r\\n\\t\\t\\t\\t\\t\\tvar notPastTop = dragDestination >= boundaryRect.top;\\r\\n\\t\\t\\t\\t\\t\\tvar notPastBottom = dragDestination <= (boundaryRect.bottom - rect.height);\\r\\n\\r\\n\\t\\t\\t\\t\\t\\tif (notPastTop && notPastBottom) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tconfig.element.style.top = newTop + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\t\\telse if (!notPastTop) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tconfig.element.style.top = newTop - (dragDestination - boundaryRect.top) + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\t\\telse if (!notPastBottom) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tconfig.element.style.top = newTop - (dragDestination - boundaryRect.bottom + rect.height) + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tconfig.element.style.top = newTop + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar selection = function(enable)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar setProp = function(value)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconfig.body.style.userSelect = value;\\r\\n\\t\\t\\t\\t\\tconfig.body.style.webkitUserSelect = value;\\r\\n\\t\\t\\t\\t\\tconfig.body.style.mozUserSelect = value;\\r\\n\\t\\t\\t\\t\\tconfig.body.style.msUserSelect = value;\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tif(enable)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.removeEvent(config.document,\\\"selectpos\\\",disableSelectionHandler);\\r\\n\\t\\t\\t\\t\\tutil.removeEvent(config.document,\\\"selectstart\\\",disableSelectionHandler);\\r\\n\\t\\t\\t\\t\\tsetProp(\\\"\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.addEvent(config.document,\\\"selectpos\\\",disableSelectionHandler);\\r\\n\\t\\t\\t\\t\\tutil.addEvent(config.document,\\\"selectstart\\\",disableSelectionHandler);\\t\\r\\n\\t\\t\\t\\t\\tsetProp(\\\"none\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar disableSelectionHandler = function(event)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getElementPosition = function(element) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar position = {x:0,y:0};\\r\\n\\t\\t\\t\\twhile(element) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t   if(element.tagName === \\\"BODY\\\" || element.tagName === \\\"HTML\\\") \\r\\n\\t\\t\\t\\t   {\\r\\n\\t\\t\\t\\t      var xScroll = element.scrollLeft || document.documentElement.scrollLeft;\\r\\n\\t\\t\\t\\t      var yScroll = element.scrollTop || document.documentElement.scrollTop;\\r\\n\\t\\t\\t\\t      position.x += (element.offsetLeft - xScroll + element.clientLeft);\\r\\n\\t\\t\\t\\t      position.y += (element.offsetTop - yScroll + element.clientTop);\\r\\n\\t\\t\\t\\t   } \\r\\n\\t\\t\\t\\t   else \\r\\n\\t\\t\\t\\t   {\\r\\n\\t\\t\\t\\t\\t  position.x += (element.offsetLeft - element.scrollLeft + element.clientLeft);\\r\\n\\t\\t\\t\\t\\t  position.y += (element.offsetTop - element.scrollTop + element.clientTop);\\r\\n\\t\\t\\t\\t   }\\r\\n\\t\\t\\t\\t   element = element.offsetParent;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn position;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar addDocumentHandler = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!documentMouseMoveRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdocumentMouseMoveRef = windowMouseMoveHandler;\\r\\n\\t\\t\\t\\t\\tutil.addEvent(config.context,\\\"mousemove\\\",documentMouseMoveRef);\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!documentMouseUpRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdocumentMouseUpRef = windowMouseUpHandler;\\r\\n\\t\\t\\t\\t\\tutil.addEvent(config.context,\\\"mouseup\\\",documentMouseUpRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!documentTouchMoveRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdocumentTouchMoveRef = windowMouseMoveHandler;\\r\\n\\t\\t\\t\\t\\tutil.addEvent(config.context,\\\"touchmove\\\",documentTouchMoveRef);\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!documentTouchEndRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdocumentTouchEndRef = windowMouseUpHandler;\\r\\n\\t\\t\\t\\t\\tutil.addEvent(config.context,\\\"touchend\\\",documentTouchEndRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar removeDocumentHandler = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(documentMouseMoveRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.removeEvent(config.context,\\\"mousemove\\\",documentMouseMoveRef);\\r\\n\\t\\t\\t\\t\\tdocumentMouseMoveRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(documentMouseUpRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.removeEvent(config.context,\\\"mouseup\\\",documentMouseUpRef);\\r\\n\\t\\t\\t\\t\\tdocumentMouseUpRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(documentTouchMoveRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.removeEvent(config.context,\\\"touchmove\\\",documentTouchMoveRef);\\r\\n\\t\\t\\t\\t\\tdocumentTouchMoveRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(documentTouchEndRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.removeEvent(config.context,\\\"touchend\\\",documentTouchEndRef);\\r\\n\\t\\t\\t\\t\\tdocumentTouchEndRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar release = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tselection(true);\\r\\n\\t\\t\\t\\tobjVar = {};\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar complete = function(event) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(config.dragEndCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconfig.dragEndCallback(event,config.element);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\r\\n\\t\\t\\tvar cancel = function() \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig.element.style.left = objVar.initLeft;\\r\\n\\t\\t\\t\\tconfig.element.style.top = objVar.initTop;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar remove = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tutil.removeEvent(config.element,\\\"mousedown\\\",elementMouseDownHandler);\\r\\n\\t\\t\\t\\tremoveDocumentHandler();\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar setPosition = function(deltaX,deltaY)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetElementPos(deltaX,deltaY);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.setPosition = setPosition;\\r\\n\\t\\t\\tself.remove = remove;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tinitialize();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.setScrollWidth = setScrollWidth;\\r\\n\\t\\tself.setScrollHeight = setScrollHeight;\\r\\n\\t\\tself.setScrollTop = setScrollTop;\\r\\n\\t\\tself.getScrollTop = getScrollTop;\\r\\n\\t\\tself.setScrollLeft = setScrollLeft;\\r\\n\\t\\tself.getScrollLeft = getScrollLeft;\\r\\n\\t\\tself.getVerticalScrollHeight = getVerticalScrollHeight;\\r\\n\\t\\tself.getHorizontalScrollWidth = getHorizontalScrollWidth;\\r\\n\\t\\tself.hasHorizontalScroller = hasHorizontalScroller;\\r\\n\\t\\tself.hasVerticalScroller = hasVerticalScroller;\\r\\n\\t\\tself.getHorizontalScroller = getHorizontalScroller;\\r\\n\\t\\tself.getVerticalScroller = getVerticalScroller;\\r\\n\\t\\tself.getHorizontalBar = getHorizontalBar;\\r\\n\\t\\tself.getVertcialBar = getVertcialBar;\\r\\n\\t\\tself.remove = remove;\\r\\n\\t\\t\\r\\n\\t\\tNSScroller.SCROLL_START = \\\"scrollStart\\\";\\r\\n\\t\\tNSScroller.SCROLLING = \\\"scrolling\\\";\\r\\n\\t\\tNSScroller.SCROLL_END = \\\"scrollEnd\\\";\\r\\n\\t\\t\\r\\n\\t\\tinitialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSScroller;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSScroller\\\",NSScroller);\";","export const NSDashboardCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\nvar svgRef = require('./nsSVG.min.js');\\r\\nvar NSSvg = svgRef.NSSvg;\\r\\nvar NSSvgShapes = svgRef.NSSvgShapes;\\r\\nvar plugginsRef = require('./nsPluggins.min.js');\\r\\nvar nsTextEditor = plugginsRef.nsTextEditor;\\r\\nvar nsTextAreaEditor = plugginsRef.nsTextAreaEditor;\\r\\nvar NSCellSelection = plugginsRef.NSCellSelection;\\r\\nvar NSTableCellNavigator = plugginsRef.NSTableCellNavigator;\\r\\nvar dateutilRef = require('./nsDateUtil.min.js');\\r\\nvar NSDateUtil = dateutilRef.NSDateUtil;\\r\\n\\r\\n\\t\\t}\\r\\n\\\"use strict\\\";\\r\\nvar NSPanel = (function()\\r\\n{\\r\\n\\tfunction NSPanel(component,setting) \\r\\n\\t{\\r\\n\\t\\tthis.__DEFAULT_ANIMATION_STEPS = 10;\\r\\n\\t\\tthis.__DEFAULT_ANIMATION_DELAY = 20;\\r\\n\\t\\t\\r\\n\\t\\t\\r\\n\\t\\tthis.__OUTER_CONTAINER_ID = \\\"panelContainer\\\";\\r\\n\\t\\tthis.__TITLE_CONTAINER_ID = \\\"divTitleBar\\\";\\r\\n\\t\\tthis.__BODY_CONTAINER_ID = \\\"divBody\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__CLASS_OUTER_CONTAINER = \\\"nsPanelContainer\\\";\\r\\n\\t\\tthis.__CLASS_TITLEBAR = \\\"nsPanelTitleBar\\\";\\r\\n\\t\\tthis.__CLASS_BODY_CONTAINER = \\\"nsPanelBody\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\t\\r\\n\\t\\tthis.__header = null;\\r\\n\\t\\tthis.__body = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__context = window;\\r\\n\\t\\tthis.__title = null;\\r\\n\\t\\tthis.__titleHtml = null;\\r\\n\\t\\tthis.__content = null;\\r\\n\\t\\tthis.__parent = document.body;\\r\\n\\t\\tthis.__templateID = null;\\r\\n\\t\\tthis.__templateUrl = null;\\r\\n\\t\\tthis.__contentComponent = null;\\r\\n\\t\\tthis.__contentComponentData = null;\\r\\n\\t\\tthis.__minWidth = null;\\r\\n\\t\\tthis.__minHeight = null;\\r\\n\\t\\tthis.__enablePopUp = false;\\r\\n\\t\\tthis.__enableModal = false;\\r\\n\\t\\tthis.__enableCollapse = false;\\r\\n\\t\\tthis.__enableMinimization = false;\\r\\n\\t\\tthis.__enableFullScreen = false;\\r\\n\\t\\tthis.__enableDrag = false;\\r\\n\\t\\tthis.__enableResize = false;\\r\\n\\t\\tthis.__enableTitleDblClick = false;\\r\\n\\t\\tthis.__enableMoveOnClick = false;\\r\\n\\t\\tthis.__enableModalAnimation = false;\\r\\n\\t\\tthis.__modalAnimationType = \\\"Top\\\";\\r\\n\\t\\tthis.__enableModalCloseOnOutsideClick = false;\\r\\n\\t\\tthis.__enableModalCloseOnEscape = false;\\r\\n\\t\\tthis.__enableCloseIconVisibility = true;\\r\\n\\t\\tthis.__customClass = {};\\r\\n\\t\\tthis.__toolBarDetails = {};\\r\\n\\t\\tthis.__panelSetting = {};\\r\\n\\t\\t\\r\\n\\t\\tthis.__origBaseDimension = {}; \\r\\n\\t\\tthis.__lastHeight = null;\\r\\n\\t\\tthis.__lastBodyHeight = -1;\\r\\n\\t\\tthis.__nsDragResizeElements = null;\\r\\n\\t\\tthis.__divGhost = null;\\r\\n\\t\\tthis.__divModal = null;\\r\\n\\t\\tthis.__isCollapsingExpanding = false;\\r\\n\\t\\tthis.__isCollapsed = false;\\r\\n\\t\\tthis.__isMinimized = false;\\r\\n\\t\\tthis.__isFullScreen = false;\\r\\n\\t\\tthis.__isInternalRemove = false;\\r\\n\\t\\tthis.__divOrignalChildren = null;\\r\\n\\t\\tthis.__dragExcludeElement = [];\\r\\n\\t\\tthis.__disableCollapse = false;\\r\\n\\t\\tthis.__disableMinMax = false;\\r\\n\\t\\tthis.__disableFullScreen = false;\\r\\n\\t\\tthis.__toolBarDivs = {};\\r\\n\\t\\tthis.__lastModalAnimationCss = null;\\r\\n\\t\\tthis.__bodyCompInstance = null;\\r\\n\\t\\t//Minimize Variables\\r\\n\\t\\tthis.__divMinFixedContainer = null;\\r\\n\\t\\tthis.__minimizedDirection = \\\"left\\\";\\r\\n\\t\\tthis.__baseComponentParent = null;\\r\\n\\t\\tthis.__minimizeAddRemoveElementCallback = null;\\r\\n\\t\\t//FullScreen Variables\\r\\n\\t\\tthis.__origFullScreenDimension = {baseComponentRect:null,baseComponentStyle:null};\\r\\n\\t\\t\\r\\n\\t\\tthis.__windowClickRef = null;\\r\\n\\t\\tthis.__documentKeydownRef = null;\\r\\n\\t\\tthis.__modalAnimationEndRef = null;\\r\\n\\t\\tthis.__isComponentNull = false;\\r\\n\\t\\tif(!component)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcomponent = document.createElement(\\\"div\\\");\\r\\n\\t\\t\\tcomponent.style.display = \\\"none\\\";\\r\\n\\t\\t\\tthis.__parent.appendChild(component);\\r\\n\\t\\t\\tthis.__isComponentNull = true;\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(NSContainerBase,NSPanel);\\r\\n\\tNSPanel.prototype.constructor = NSPanel;\\r\\n\\t\\r\\n\\tNSPanel.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t\\tif(this.__isComponentNull)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__baseComponent.setAttribute(\\\"id\\\",this.getID() + \\\"Panel\\\");\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createStructure();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tif(attributeName == \\\"title\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__title = newVal;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributeName == \\\"titleHtml\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__titleHtml = newVal;\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tif(!this.__isInternalRemove || this.__isComponentNull)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsDragResizeElements)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsDragResizeElements.destroy();\\r\\n\\t\\t\\t\\tthis.__nsDragResizeElements = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__bodyCompInstance)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callEditorFunction(this.__bodyCompInstance,\\\"destroy\\\");\\r\\n\\t\\t\\t\\tthis.__bodyCompInstance = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__windowClickRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__context,\\\"click\\\",this.__windowClickRef);\\r\\n\\t\\t\\t\\tthis.__windowClickRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__documentKeydownRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(document,\\\"keydown\\\",this.__documentKeydownRef);\\r\\n\\t\\t\\t\\tthis.__documentKeydownRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__dragExcludeElement = [];\\r\\n\\t\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__isInternalRemove = false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.base.componentResized.call(this,event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.open = function(animation)\\r\\n\\t{\\r\\n\\t\\tif(this.__isComponentNull)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createStructure();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__divModal)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableModal)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divModal.style.zIndex = this.util.getMaxZIndex() + 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableModalAnimation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__modalAnimationType = animation || this.__modalAnimationType;\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,this.__lastModalAnimationCss);\\r\\n\\t\\t\\t\\tif(animation)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar css = \\\"nsPanelModal\\\" + this.util.toCamelCase(this.__modalAnimationType,true);\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,css);\\r\\n\\t\\t\\t\\t\\tvar cssAnimationHelper = new this.util.nsCSSAnimationHelper();\\r\\n\\t\\t\\t\\t\\tthis.__modalAnimationEndRef = this.__modalAnimationEndHandler.bind(this,css,true,cssAnimationHelper);\\r\\n\\t\\t\\t\\t\\tcssAnimationHelper.addEndEvent(this.__baseComponent,this.__modalAnimationEndRef);\\r\\n\\t\\t\\t\\t\\tthis.__lastModalAnimationCss = css;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__showHideModal(true);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.close = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableModalAnimation)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cssAnimationHelper = new this.util.nsCSSAnimationHelper();\\r\\n\\t\\t\\tthis.__modalAnimationEndRef = this.__modalAnimationEndHandler.bind(this,this.__lastModalAnimationCss,false,cssAnimationHelper);\\r\\n\\t\\t\\tcssAnimationHelper.addEndEvent(this.__baseComponent,this.__modalAnimationEndRef);\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__divModal,\\\"nsPanelModalOpen\\\");\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelOpen\\\");\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__showHideModal(false);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.removeModal = function()\\r\\n\\t{\\r\\n\\t\\tthis.close();\\r\\n\\t\\tthis.removeComponent();\\r\\n\\t\\tif(this.__divModal && this.__divModal.parentNode) {\\r\\n\\t\\t\\tthis.__divModal.parentNode.removeChild(this.__divModal);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.getBaseElement = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__baseComponent;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.minimize = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.isMinimized())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeMinMax();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.maximize = function()\\r\\n\\t{\\r\\n\\t\\tif(this.isMinimized())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeMinMax();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.collapse = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.isCollapsed())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeExpCol();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.expand = function()\\r\\n\\t{\\r\\n\\t\\tif(this.isCollapsed())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeExpCol();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.fullScreen = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.isFullScreen())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeFullScreen();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.restore = function()\\r\\n\\t{\\r\\n\\t\\tif(this.isFullScreen())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeFullScreen();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableResize = function(value)\\r\\n\\t{\\r\\n\\t\\tif(this.__nsDragResizeElements)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsDragResizeElements.disableResize(value);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableDrag = function(value)\\r\\n\\t{\\r\\n\\t\\tif(this.__nsDragResizeElements)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsDragResizeElements.disableDrag(value);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableCollapse = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__disableCollapse = value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableMinMax = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__disableMinMax = value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.disableFullScreen = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__disableFullScreen = value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.isCollapsed = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__isCollapsed;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.isMinimized = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__isMinimized;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.isFullScreen = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__isFullScreen;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tvar setting = this.__setting;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"context\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__context = setting[\\\"context\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"title\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__title = setting[\\\"title\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"titleHtml\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__titleHtml = setting[\\\"titleHtml\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"content\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__content = setting[\\\"content\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"parent\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__parent = setting[\\\"parent\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"template\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__templateID = setting[\\\"template\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"templateUrl\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__templateUrl = setting[\\\"templateUrl\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"contentComponent\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__contentComponent = setting[\\\"contentComponent\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"contentComponentData\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__contentComponentData = setting[\\\"contentComponentData\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minWidth\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minWidth = this.util.getNumber(setting[\\\"minWidth\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minHeight\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minHeight = this.util.getNumber(setting[\\\"minHeight\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enablePopUp\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enablePopUp = Boolean.parse(setting[\\\"enablePopUp\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableModal\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableModal = Boolean.parse(setting[\\\"enableModal\\\"]);\\r\\n\\t\\t\\t\\tif(this.__enableModal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enablePopUp = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableCollapse\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableCollapse = Boolean.parse(setting[\\\"enableCollapse\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMinimization\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMinimization = Boolean.parse(setting[\\\"enableMinimization\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableFullScreen\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableFullScreen = Boolean.parse(setting[\\\"enableFullScreen\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableDrag\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableDrag = Boolean.parse(setting[\\\"enableDrag\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableResize\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableResize = Boolean.parse(setting[\\\"enableResize\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableTitleDblClick\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableTitleDblClick = Boolean.parse(setting[\\\"enableTitleDblClick\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMoveOnClick\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.__enablePopUp)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enableMoveOnClick = Boolean.parse(setting[\\\"enableMoveOnClick\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableModalAnimation\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableModalAnimation = Boolean.parse(setting[\\\"enableModalAnimation\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"modalAnimationType\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__modalAnimationType = setting[\\\"modalAnimationType\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableModalCloseOnOutsideClick\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__enableModal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enableModalCloseOnOutsideClick = Boolean.parse(setting[\\\"enableModalCloseOnOutsideClick\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableModalCloseOnEscape\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__enableModal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enableModalCloseOnEscape = Boolean.parse(setting[\\\"enableModalCloseOnEscape\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableCloseIconVisibility\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableCloseIconVisibility = this.util.isUndefinedOrNull(setting[\\\"enableCloseIconVisibility\\\"]) ? true : Boolean.parse(setting[\\\"enableCloseIconVisibility\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minimizedDirection\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minimizedDirection = setting[\\\"minimizedDirection\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"theme\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__theme = setting[\\\"theme\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minimizeAddRemoveElementCallback\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minimizeAddRemoveElementCallback = setting[\\\"minimizeAddRemoveElementCallback\\\"];\\r\\n\\t\\t\\t\\tif (typeof this.__minimizeAddRemoveElementCallback === \\\"string\\\" || this.__minimizeAddRemoveElementCallback instanceof String)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.util.isFunction(this.__minimizeAddRemoveElementCallback))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__minimizeAddRemoveElementCallback = this.__config.context[this.__minimizeAddRemoveElementCallback];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar customClass = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"customClass\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcustomClass = setting[\\\"customClass\\\"];\\r\\n\\t\\t\\t\\tif(!customClass)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcustomClass = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__customClass = {container:customClass[\\\"container\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  titleBar:customClass[\\\"titleBar\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  titleBarContent:customClass[\\\"titleBarContent\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  iconContainer:customClass[\\\"iconContainer\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  icon:customClass[\\\"icon\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  body:customClass[\\\"body\\\"] || null};\\r\\n\\t\\t\\tvar toolBarDetails = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"toolBarDetails\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolBarDetails = setting[\\\"toolBarDetails\\\"];\\r\\n\\t\\t\\t\\tif(!toolBarDetails)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttoolBarDetails = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__toolBarDetails = {\\r\\n\\t\\t\\t\\t\\tminimize:toolBarDetails[\\\"minimize\\\"] || {iconHTML:null,title:\\\"Minimize\\\"},\\r\\n\\t\\t\\t\\t\\tmaximize:toolBarDetails[\\\"maximize\\\"] || {iconHTML:null,title:\\\"Maximize\\\"},\\r\\n\\t\\t\\t\\t\\texpand:toolBarDetails[\\\"expand\\\"] || {iconHTML:null,title:\\\"Expand\\\"},\\r\\n\\t\\t\\t\\t\\tcollapse:toolBarDetails[\\\"collapse\\\"] || {iconHTML:null,title:\\\"Collapse\\\"},\\r\\n\\t\\t\\t\\t\\tfullScreen:toolBarDetails[\\\"fullScreen\\\"] || {iconHTML:null,title:\\\"FullScreen\\\"},\\r\\n\\t\\t\\t\\t\\trestore:toolBarDetails[\\\"restore\\\"] || {iconHTML:null,title:\\\"Restore\\\"},\\r\\n\\t\\t\\t\\t\\tclose:toolBarDetails[\\\"close\\\"] || {iconHTML:null,title:\\\"Close\\\"}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar panelSetting = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"panelSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tpanelSetting = setting[\\\"panelSetting\\\"];\\r\\n\\t\\t\\t\\tif(!panelSetting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tpanelSetting = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__panelSetting = {\\r\\n\\t\\t\\t\\ttop:panelSetting[\\\"top\\\"],\\r\\n\\t\\t\\t\\tleft:panelSetting[\\\"left\\\"],\\r\\n\\t\\t\\t\\twidth:panelSetting[\\\"width\\\"],\\r\\n\\t\\t\\t\\theight:panelSetting[\\\"height\\\"],\\r\\n\\t\\t\\t};\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createStructure = function()\\r\\n\\t{\\r\\n\\t\\tthis.__saveRestoreBaseComponentDimension(true);\\r\\n\\t\\tthis.__copyOrignalContent();\\r\\n\\t\\tvar arrKeys = Object.keys(this.__panelSetting);\\r\\n\\t\\tfor(var index = 0;index < arrKeys.length;index++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__panelSetting[arrKeys[index]])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__baseComponent.style[arrKeys[index]] = this.__panelSetting[arrKeys[index]];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanel\\\");\\r\\n\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelExpanded\\\");\\r\\n\\t\\tthis.__applyTheme(this.__baseComponent,\\\"nsPanel\\\");\\r\\n\\t\\tthis.__applyTheme(this.__baseComponent,\\\"nsPanelWidget\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__baseComponent,\\\"container\\\");\\r\\n\\t\\tif(this.__enableDrag)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelModalContentDrag\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enablePopUp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar parentNode = this.__parent;\\r\\n\\t\\t\\tthis.__divModal = this.__createModal();\\r\\n\\t\\t\\tthis.__isInternalRemove = true;\\r\\n\\t\\t\\tthis.__divModal.appendChild(this.__baseComponent);\\r\\n\\t\\t\\tparentNode.appendChild(this.__divModal);\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelModalContent\\\");\\r\\n\\t\\t\\tif(this.__enableModalCloseOnOutsideClick)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//this.__windowClickRef = this.__windowClickHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__divModal,\\\"click\\\",this.__modalClickHandler.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableModalCloseOnEscape)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//To detect escape button\\r\\n\\t\\t\\t\\tthis.__documentKeydownRef = this.__documentKeydownHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(document,\\\"keydown\\\",this.__documentKeydownRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__header = this.__createTitleBar(this.__baseComponent);\\r\\n\\t\\tthis.__body = this.__createBody(this.__baseComponent);\\r\\n\\t\\tthis.__lastHeight = this.util.getStyleValue(this.__baseComponent,\\\"height\\\");\\r\\n\\t\\tvar dragResizeSetting = {element:this.__baseComponent,\\r\\n\\t\\t\\t\\tenableDrag:this.__enableDrag,\\r\\n\\t\\t\\t\\tenableResize:this.__enableResize,\\r\\n\\t\\t\\t\\tenableMoveOnClick:this.__enableMoveOnClick,\\r\\n\\t\\t\\t\\tminWidth:this.__minWidth,\\r\\n\\t\\t\\t\\tminHeight:this.__minHeight,\\r\\n\\t\\t\\t\\tcreateGhostElementCallback:this.__createGhostElement.bind(this),\\r\\n\\t\\t\\t\\tenableDragContainment:true,\\r\\n\\t\\t\\t\\texcludeElement:this.__dragExcludeElement};\\r\\n\\t\\tthis.__nsDragResizeElements = new this.util.nsDragResizeElements(dragResizeSetting);\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,this.__nsDragResizeElements.DRAG_STARTING,this.__dragResizeEventHandler.bind(this));\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,this.__nsDragResizeElements.DRAG_END,this.__dragResizeEventHandler.bind(this));\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,this.__nsDragResizeElements.RESIZE_END,this.__dragResizeEventHandler.bind(this));\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,\\\"click\\\",this.__baseComponentClickHandler.bind(this));\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,NSPanel.__ELEMENT_FOCUS_OUT,this.__baseComponentFocusOutHandler.bind(this));\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__saveRestoreBaseComponentDimension = function(isSave)\\r\\n\\t{\\r\\n\\t\\tif(this.__baseComponent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrAttributeName = [\\\"class\\\",\\\"style\\\"];\\r\\n\\t\\t\\tif(isSave)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__origBaseDimension = {};\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrAttributeName.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__origBaseDimension[arrAttributeName[count]] = this.__baseComponent.getAttribute(arrAttributeName[count]); \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__origBaseDimension[\\\"children\\\"] = this.__baseComponent.children;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrAttributeName.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__baseComponent.setAttribute(arrAttributeName[count],this.__origBaseDimension[arrAttributeName[count]]); \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__origBaseDimension[\\\"children\\\"] && this.__origBaseDimension[\\\"children\\\"].length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeAllChildren(this.__baseComponent);\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < this.__origBaseDimension[\\\"children\\\"].length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__baseComponent.appendChild(this.__origBaseDimension[\\\"children\\\"][count]); \\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__origBaseDimension = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createModal = function()\\r\\n\\t{\\r\\n\\t\\tvar divModal = this.util.createDiv(this.getID() + \\\"modal\\\",\\\"nsPanelModal\\\");\\r\\n\\t\\tif(this.__enableModal)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(divModal,\\\"nsPanelModalProp\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableModalAnimation)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(divModal,\\\"nsPanelModalAnimation\\\");\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.addStyleClass(divModal,\\\"nsPanelModal\\\" + this.__theme);\\r\\n\\t\\treturn divModal;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createTitleBar = function(parentElement)\\r\\n\\t{\\r\\n\\t\\tif(parentElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar divTitleBar = this.util.createDiv(this.getID() + this.__TITLE_CONTAINER_ID,\\\"nsPanelTitleBar\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(divTitleBar,this.__CLASS_TITLEBAR);\\r\\n\\t\\t\\tthis.__applyCustomClass(divTitleBar,\\\"titleBar\\\");\\r\\n\\t\\t\\tvar divTitleBarContent = this.util.createDiv(this.getID() + this.__TITLE_CONTAINER_ID + \\\"Content\\\",\\\"nsPanelTitleBarContent\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(divTitleBarContent,\\\"titleBarContent\\\");\\r\\n\\t\\t\\tdivTitleBar.appendChild(divTitleBarContent);\\r\\n\\t\\t\\tif(this.__titleHtml && this.__titleHtml.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivTitleBarContent.innerHTML = this.__titleHtml;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__title && this.__title.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar titleText = document.createTextNode(this.__title);\\r\\n\\t\\t\\t\\tdivTitleBarContent.appendChild(titleText);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar svgShapes = new NSSvgShapes();\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar divIcon = this.util.createDiv(this.getID() + this.__TITLE_CONTAINER_ID + \\\"IconContainer\\\",\\\"nsPanelControlbar\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(divIcon,\\\"iconContainer\\\");\\r\\n\\t\\t\\tvar divButton = null;\\r\\n\\t\\t\\tif(this.__enableCollapse)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addExpandInPage();\\r\\n\\t\\t\\t\\tsvgShapes.addCollapseInPage();\\r\\n\\t\\t\\t\\tvar expColID = this.getID() + \\\"ExpCol\\\";\\r\\n\\t\\t\\t\\tvar headerDoubleClickRef = this.__headerDoubleClickHandler.bind(this);\\r\\n\\t\\t\\t\\tdivButton = this.__addToolbarIcon(divIcon,objSVG,\\\"collapse\\\",\\\"nsPanelExpColContainer\\\",expColID,\\\"nsPanelExpColIcon\\\",svgShapes.__COLLAPSE_ICON_ID,headerDoubleClickRef);\\r\\n\\t\\t\\t\\tthis.__toolBarDivs[\\\"expand\\\"] = this.__toolBarDivs[\\\"collapse\\\"] = divButton;\\r\\n\\t\\t\\t\\tif(this.__enableTitleDblClick)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(divTitleBar,\\\"dblclick\\\",headerDoubleClickRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableMinimization)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addMinimizeInPage();\\r\\n\\t\\t\\t\\tsvgShapes.addMaximizeInPage();\\r\\n\\t\\t\\t\\tvar minMaxID = this.getID() + \\\"MinMax\\\";\\r\\n\\t\\t\\t\\tdivButton = this.__addToolbarIcon(divIcon,objSVG,\\\"minimize\\\",\\\"nsPanelMinMaxContainer\\\",minMaxID,\\\"nsPanelMinMaxIcon\\\",svgShapes.__MINIMIZE_ICON_ID,this.__minimizeIconClickHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.__toolBarDivs[\\\"maximize\\\"] = this.__toolBarDivs[\\\"minimize\\\"] = divButton;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableFullScreen)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addFullScreenInPage();\\r\\n\\t\\t\\t\\tsvgShapes.addRestoreInPage();\\r\\n\\t\\t\\t\\tvar fullScreenID = this.getID() + \\\"FullScreen\\\";\\r\\n\\t\\t\\t\\tdivButton = this.__addToolbarIcon(divIcon,objSVG,\\\"fullScreen\\\",\\\"nsPanelFullScreenContainer\\\",fullScreenID,\\\"nsPanelFullScreenIcon\\\",svgShapes.__FULLSCREEN_ICON_ID,this.__fullScreenIconClickHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.__toolBarDivs[\\\"fullScreen\\\"] = this.__toolBarDivs[\\\"restore\\\"] = divButton;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enablePopUp && this.__enableCloseIconVisibility)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addCloseIcon();\\r\\n\\t\\t\\t\\tvar closeID = this.getID() + \\\"Close\\\";\\r\\n\\t\\t\\t\\tdivButton = this.__addToolbarIcon(divIcon,objSVG,\\\"close\\\",\\\"nsPanelCloseContainer\\\",closeID,\\\"nsPanelCloseIcon\\\",svgShapes.__CLOSE_ICON_ID,this.__closeIconClickHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.__toolBarDivs[\\\"close\\\"] = divButton;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdivTitleBar.appendChild(divIcon);\\r\\n\\t\\t\\tparentElement.appendChild(divTitleBar);\\r\\n\\t\\t\\treturn divTitleBar;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createBody = function(parentElement)\\r\\n\\t{\\t\\r\\n\\t\\tif(parentElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar divBody = this.util.createDiv(this.getID() + this.__BODY_CONTAINER_ID,this.__CLASS_BODY_CONTAINER);\\r\\n\\t\\t\\tthis.__applyCustomClass(divBody,\\\"body\\\");\\r\\n\\t\\t\\tif(this.__divOrignalChildren)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivBody.appendChild(this.__divOrignalChildren);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__content)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isString(this.__content))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar compSpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\tcompSpan.innerHTML = this.__content;\\r\\n\\t\\t\\t\\t\\tdivBody.appendChild(compSpan);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdivBody.appendChild(this.__content);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__templateID && this.__templateID.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivBody.appendChild(this.util.getTemplate(this.__templateID));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__templateUrl && this.__templateUrl.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tvar templateLoadHandler = function(templateText)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(templateText)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdivBody.innerHTML = templateText;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tconsole.error(self.__templateUrl + \\\" was not loaded.Please check the URL\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tvar templateErrorHandler = function(errorText)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconsole.error(self.__templateUrl + \\\" was not loaded.Please check the URL\\\");\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.util.getTemplateFromURL(this.__templateUrl,templateLoadHandler,templateErrorHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__contentComponent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar callback = function(component)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__bodyCompInstance)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__bodyCompInstance = null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__bodyCompInstance = new component();\\r\\n\\t\\t\\t\\t\\tvar retVal = this.__callEditorFunction(this.__bodyCompInstance,\\\"init\\\",this.__contentComponentData);\\r\\n\\t\\t\\t\\t\\tvar initCallback = function(bodyCompInstance)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(!this.__bodyCompInstance) {\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__bodyCompInstance = bodyCompInstance;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tvar element = this.__bodyCompInstance.getElement();\\r\\n\\t\\t\\t\\t\\t\\tdivBody.appendChild(element);\\r\\n\\t\\t\\t\\t\\t\\tthis.__callEditorFunction(this.__bodyCompInstance,\\\"elementAdded\\\");\\r\\n\\t\\t\\t\\t\\t\\tvar config = {instance: this.__bodyCompInstance,parentComp: this,element: element};\\r\\n\\t\\t\\t\\t\\t\\tthis.__bodyCompInstance[this.__getAttributeKey(\\\"config\\\")] = config;\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\tthis.util.resolveFunctionOrPromise(retVal,initCallback.bind(this));\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.util.resolveFunctionOrPromise(this.__contentComponent,callback.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tparentElement.appendChild(divBody);\\r\\n\\t\\t\\treturn divBody;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__createGhostElement = function(element)\\r\\n\\t{\\r\\n\\t\\tthis.__divGhost = element.cloneNode(true);\\r\\n\\t\\tvar divPanelControlbar = this.__divGhost.querySelector(\\\".nsPanelControlbar\\\");\\r\\n\\t\\tif(divPanelControlbar)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdivPanelControlbar.parentNode.removeChild(divPanelControlbar);\\r\\n\\t\\t}\\r\\n\\t\\tvar divBody = this.__divGhost.querySelector(\\\".nsPanelBody\\\");\\r\\n\\t\\tif(divBody)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdivBody.innerHTML = \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__divGhost;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__modalClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\tif(target !== this.__baseComponent && !this.__baseComponent.contains(target))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.close();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__documentKeydownHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tif (event.keyCode === this.util.KEYCODE[\\\"ESC\\\"]) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.close();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__copyOrignalContent = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__baseComponent && this.__baseComponent.childNodes.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divOrignalChildren = this.util.createDiv(this.getID() + \\\"orignalChildren\\\");\\r\\n\\t\\t\\twhile (this.__baseComponent.childNodes.length > 0) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divOrignalChildren.appendChild(this.__baseComponent.childNodes[0]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__headerDoubleClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__initializeExpCol();\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__minimizeIconClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__initializeMinMax();\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__fullScreenIconClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__initializeFullScreen();\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__closeIconClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.close();\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__modalAnimationEndHandler = function(css,show,cssAnimationHelper,event)\\r\\n\\t{\\r\\n\\t\\tcssAnimationHelper.removeEndEvent(this.__baseComponent,this.__modalAnimationEndRef);\\r\\n\\t\\tthis.__modalAnimationEndRef = null;\\r\\n\\t\\tif(show)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//this.util.removeStyleClass(this.__baseComponent,css);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__showHideModal(false);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__dragResizeEventHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(event.eventName === NSPanel.DRAG_STARTING)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar target = event.detail;\\r\\n\\t\\t\\tif(target && (this.util.hasStyleClass(target,\\\"nsPanelMinMaxContainer\\\")))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.preventDefault(event);\\r\\n\\t\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse if(event.eventName === NSPanel.DRAG_END)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t\\t}\\r\\n\\t\\telse if(event.eventName === NSPanel.RESIZE_END)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__lastHeight = this.util.getStyleValue(this.__baseComponent,\\\"height\\\");\\r\\n\\t\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__baseComponentClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tconsole.log(\\\"__baseComponentClickHandler \\\" + this.__baseComponent.id);\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar currentPanel,highlightedPanel;\\r\\n\\t\\tvar arrElement = document.querySelectorAll(\\\".nsPanel:not(.nsDragGhost)\\\");\\r\\n\\t\\tvar currentPanelParent = currentPanel =  this.__baseComponent;\\r\\n\\t\\tvar highlightedPanelParent = highlightedPanel = arrElement[arrElement.length - 1];\\r\\n\\t\\t//if popup then select its parent\\r\\n\\t\\tif(this.__divModal && highlightedPanel)\\r\\n\\t\\t{\\r\\n\\t\\t\\thighlightedPanelParent = highlightedPanel.parentNode;\\r\\n\\t\\t\\tcurrentPanelParent = this.__divModal;\\r\\n\\t\\t\\t//below line stops click handler of button on Panel\\r\\n\\t\\t\\t//event.stopPropagation();\\r\\n\\t\\t}\\r\\n\\t\\tif(highlightedPanelParent != currentPanelParent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.insertAfterElement(highlightedPanelParent,currentPanelParent);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t\\tif(highlightedPanel)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.dispatchEvent(highlightedPanel,NSPanel.__ELEMENT_FOCUS_OUT,null,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__baseComponentFocusOutHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tconsole.log(\\\"__baseComponentFocusOutHandler \\\" + this.__baseComponent.id);\\r\\n\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__addToolbarIcon = function(divIcon,objSVG,toolbarKey,containerClass,iconID,svgClass,svgShapeIconID,clickHandler)\\r\\n\\t{\\r\\n\\t\\tvar divButton = this.util.createDiv(null,\\\"nsPanelControlButton\\\");\\r\\n\\t\\tthis.util.addStyleClass(divButton,containerClass);\\r\\n\\t\\tthis.__applyCustomClass(divButton,\\\"icon\\\");\\r\\n\\t\\tif(!this.__setToolBarButton(toolbarKey,divButton))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar svg = objSVG.addSVG(divButton,iconID,svgClass,null,null,null,null,null,null,true);\\r\\n\\t\\t\\tobjSVG.addUse(svg,iconID + \\\"use\\\",svgClass + \\\"Use\\\",\\\"#\\\" + svgShapeIconID);\\r\\n\\t\\t}\\r\\n\\t\\tdivIcon.appendChild(divButton);\\r\\n\\t\\tthis.util.addEvent(divButton,\\\"click\\\",clickHandler);\\r\\n\\t\\tthis.__dragExcludeElement.push(divButton);\\r\\n\\t\\treturn divButton;\\r\\n\\t};\\r\\n\\t//call this function if svg icons are used and container changes its parent because of IE issue\\r\\n\\tNSPanel.prototype.__refreshToolbarIcon = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__toolBarDivs)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var key in this.__toolBarDivs)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar div = this.__toolBarDivs[key];\\r\\n\\t\\t\\t\\tif(div && div.children.length > 0 && div.children[0].nodeName == \\\"svg\\\" && div.children[0].childNodes.length > 0 && div.children[0].childNodes[0].nodeName == \\\"use\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar use = div.children[0].childNodes[0];\\r\\n\\t\\t\\t\\t\\tuse.setAttribute(\\\"xlink:href\\\",use.getAttribute(\\\"xlink:href\\\"));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__setToolBarButton = function(toolbarKey,divButton)\\r\\n\\t{\\r\\n\\t\\tvar isIconFound = false;\\r\\n\\t\\tif(!divButton)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdivButton = this.__toolBarDivs[toolbarKey];\\r\\n\\t\\t}\\r\\n\\t\\tif(divButton && this.__toolBarDetails[toolbarKey])\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__toolBarDetails[toolbarKey][\\\"iconHTML\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivButton.innerHTML = this.__toolBarDetails[toolbarKey][\\\"iconHTML\\\"];\\r\\n\\t\\t\\t\\tfor(var count = 0;count < divButton.children.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdivButton.children[count].style.pointerEvents = \\\"none\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tisIconFound = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__toolBarDetails[toolbarKey][\\\"title\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivButton.setAttribute(\\\"title\\\",this.__toolBarDetails[toolbarKey][\\\"title\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn isIconFound;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__applyCustomClass = function(element,type)\\r\\n\\t{\\r\\n\\t\\tif(element && type && this.__customClass[type])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(element,this.__customClass[type]);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__showHideModal = function(show)\\r\\n\\t{\\r\\n\\t\\tif(show)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__divModal,\\\"nsPanelModalOpen\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelOpen\\\");\\r\\n\\t\\t\\tthis.__divModal.style.display = \\\"block\\\";\\r\\n\\t\\t\\tthis.__baseComponent.style.display = \\\"block\\\";\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__divModal,\\\"nsPanelModalOpen\\\");\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelOpen\\\");\\r\\n\\t\\t\\tif(this.__isComponentNull)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.removeComponent();\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(this.__baseComponent);\\r\\n\\t\\t\\t\\tif(this.__divModal && this.__divModal.parentNode)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__divModal.parentNode.removeChild(this.__divModal);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__saveRestoreBaseComponentDimension(false);\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\tthis.__parent.appendChild(this.__baseComponent);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__divModal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__divModal.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.CLOSED,this.__setting,{item: this.__setting});\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__context,NSPanel.CLOSED,this.__setting,{item: this.__setting});\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t/******************************Start of Expansion Collapse Function *************************************/\\r\\n\\tNSPanel.prototype.__initializeExpCol = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__body && !this.__isCollapsingExpanding && !this.__disableCollapse)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objBrowser = this.util.getBrowser();\\r\\n\\t\\t\\t//for some weird reason browser other than Chrome moves on click and know how to fix it\\r\\n\\t\\t\\tif(objBrowser && objBrowser.code !== \\\"chrome\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsDragResizeElements.stopMoveOnClick();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__isCollapsingExpanding = true;\\r\\n\\t\\t\\tvar isCollapsed = this.util.hasStyleClass(this.__baseComponent,\\\"nsPanelCollapsed\\\");\\r\\n\\t\\t\\tif(isCollapsed)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t// expanding\\r\\n\\t\\t\\t\\tthis.disableDrag(true);\\r\\n\\t\\t\\t\\tthis.disableResize(true);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t// collapsing\\r\\n\\t\\t\\t\\tthis.disableDrag(false);\\r\\n\\t\\t\\t\\tthis.disableResize(false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tthis.__animateExpCol(isCollapsed);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__animateExpCol = function(isExpanding)\\r\\n\\t{\\r\\n\\t\\tvar eventType = isExpanding ? NSPanel.EXPANSION_STARTING:NSPanel.COLLAPSE_STARTING;\\r\\n\\t\\tthis.util.dispatchEvent(this.getBaseElement(),eventType,null,null);\\r\\n\\t\\tthis.__body.style.display = \\\"block\\\";\\r\\n\\t\\tvar contentHeight = this.__body.offsetHeight;\\r\\n\\t\\tif (isExpanding)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__body.style.height = \\\"0px\\\";\\r\\n\\t\\t\\tcontentHeight = this.__lastBodyHeight;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__lastBodyHeight = this.__body.offsetHeight;\\r\\n\\t\\t}\\r\\n\\t\\tvar stepHeight = contentHeight / this.__DEFAULT_ANIMATION_STEPS;\\r\\n\\t\\tvar direction = (isExpanding ? 1 : -1);\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tsetTimeout(function(){self.__animateExpColStep.bind(self)(1,stepHeight,direction);}, this.__DEFAULT_ANIMATION_DELAY);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__animateExpColStep = function(iteration, stepHeight, direction)\\r\\n\\t{\\r\\n\\t\\tif (iteration < this.__DEFAULT_ANIMATION_STEPS)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__body.style.height = Math.round(((direction > 0) ? iteration : 10 - iteration) * stepHeight) +\\\"px\\\";\\r\\n\\t\\t\\titeration++;\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tsetTimeout(function(){self.__animateExpColStep.bind(self)(iteration,stepHeight,direction);}, this.__DEFAULT_ANIMATION_DELAY);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar eventType = \\\"\\\";\\r\\n\\t\\t\\tif(direction < 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.changeStyleClass(this.__baseComponent,\\\"nsPanelExpanded\\\",\\\"nsPanelCollapsed\\\");\\r\\n\\t\\t\\t\\tthis.__body.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = this.__header.offsetHeight + \\\"px\\\";\\r\\n\\t\\t\\t\\teventType = NSPanel.COLLAPSE_END;\\r\\n\\t\\t\\t\\tif(this.__divGhost)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.changeStyleClass(this.__divGhost,\\\"nsPanelExpanded\\\",\\\"nsPanelCollapsed\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.changeStyleClass(this.__baseComponent,\\\"nsPanelCollapsed\\\",\\\"nsPanelExpanded\\\");\\r\\n\\t\\t\\t\\tthis.__body.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = (this.__lastHeight) ? this.__lastHeight : (this.__lastBodyHeight + this.__header.offsetHeight + \\\"px\\\");\\r\\n\\t\\t\\t\\tthis.__lastBodyHeight = 0;\\r\\n\\t\\t\\t\\teventType = NSPanel.EXPANSION_END;\\r\\n\\t\\t\\t\\tif(this.__divGhost)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.changeStyleClass(this.__divGhost,\\\"nsPanelCollapsed\\\",\\\"nsPanelExpanded\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__divGhost)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar divGhostBody = this.__divGhost.querySelector(\\\".nsPanelBody\\\");\\r\\n\\t\\t\\t\\tdivGhostBody.style.display = this.__body.style.display;\\r\\n\\t\\t\\t\\tthis.__divGhost.style.height = this.__baseComponent.style.height;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__body.style.height = \\\"\\\";\\r\\n\\t\\t\\tthis.__handleExpColIcon(direction < 0);\\r\\n\\t\\t\\tthis.__isCollapsingExpanding = false;\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),eventType,null,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__handleExpColIcon = function(isCollapsed)\\r\\n\\t{\\r\\n\\t\\tvar svgID = \\\"\\\";\\r\\n\\t\\tvar toolBarKey = \\\"\\\";\\r\\n\\t\\tif(isCollapsed)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"expand\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__EXPAND_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"collapse\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__COLLAPSE_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__setToolBarButton(toolBarKey))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = this.getID() + \\\"ExpCol\\\" + \\\"use\\\";\\r\\n\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#\\\" + svgID);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__isCollapsed = isCollapsed;\\r\\n\\t};\\r\\n\\t/******************************End of Expansion Collapse Function *************************************/\\r\\n\\t/******************************Start of Minimize Maximize Function *************************************/\\r\\n\\tNSPanel.prototype.__initializeMinMax = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__body && !this.__disableMinMax)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar fixedContainer = this.__getMinFixedContainer();\\r\\n\\t\\t\\tvar eventType = \\\"\\\";\\r\\n\\t\\t\\tif(this.__isMinimized)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//maximize\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.MAXIMIZE_STARTING,null,null);\\r\\n\\t\\t\\t\\tthis.disableDrag(false);\\r\\n\\t\\t\\t\\tthis.disableResize(false);\\r\\n\\t\\t\\t\\tthis.disableCollapse(false);\\r\\n\\t\\t\\t\\tthis.disableFullScreen(false);\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelMinimized\\\");\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelMinimized\\\" + this.__minimizedDirection);\\r\\n\\t\\t\\t\\tfixedContainer.removeChild(this.__baseComponent);\\r\\n\\t\\t\\t\\tif(this.__minimizeAddRemoveElementCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__minimizeAddRemoveElementCallback(this.__baseComponent,this.__baseComponentParent,true);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__baseComponentParent.appendChild(this.__baseComponent);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__body.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = (this.__lastHeight) ? this.__lastHeight : (this.__lastBodyHeight + this.__header.offsetHeight + \\\"px\\\");\\r\\n\\t\\t\\t\\tthis.__lastBodyHeight = 0;\\r\\n\\t\\t\\t\\teventType = NSPanel.MAXIMIZE_END;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//minimize\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.MINIMIZE_STARTING,null,null);\\r\\n\\t\\t\\t\\tthis.disableDrag(true);\\r\\n\\t\\t\\t\\tthis.disableResize(true);\\r\\n\\t\\t\\t\\tthis.disableCollapse(true);\\r\\n\\t\\t\\t\\tthis.disableFullScreen(true);\\r\\n\\t\\t\\t\\tthis.__lastBodyHeight = this.__body.offsetHeight;\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelMinimized\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelMinimized\\\" + this.__minimizedDirection);\\r\\n\\t\\t\\t\\tthis.__baseComponentParent = this.__baseComponent.parentNode;\\r\\n\\t\\t\\t\\tif(this.__minimizeAddRemoveElementCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__minimizeAddRemoveElementCallback(this.__baseComponent,this.__baseComponentParent,false);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__baseComponentParent.removeChild(this.__baseComponent);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tfixedContainer.appendChild(this.__baseComponent);\\r\\n\\t\\t\\t\\tthis.__body.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = this.__header.offsetHeight + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.__body.style.height = \\\"\\\";\\r\\n\\t\\t\\t\\teventType = NSPanel.MINIMIZE_END;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__handleMinMaxIcon(!this.__isMinimized);\\r\\n\\t\\t\\tthis.__refreshToolbarIcon();\\r\\n\\t\\t\\tthis.__isMinimized = !this.__isMinimized;\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),eventType,null,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__handleMinMaxIcon = function(isMinimized)\\r\\n\\t{\\r\\n\\t\\tvar svgID = \\\"\\\";\\r\\n\\t\\tvar toolBarKey = \\\"\\\";\\r\\n\\t\\tif(isMinimized)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"maximize\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__MAXIMIZE_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"minimize\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__MINIMIZE_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__setToolBarButton(toolBarKey))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = this.getID() + \\\"MinMax\\\" + \\\"use\\\";\\r\\n\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#\\\" + svgID);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\tNSPanel.prototype.__getMinFixedContainer = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divMinFixedContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divMinFixedContainer = document.getElementById(\\\"nsPanelMinimizeContainer\\\");\\r\\n\\t\\t\\tif(!this.__divMinFixedContainer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divMinFixedContainer = this.util.createDiv(\\\"nsPanelMinimizeContainer\\\",\\\"nsPanelMinimizeContainer\\\");\\r\\n\\t\\t\\t\\tdocument.body.appendChild(this.__divMinFixedContainer);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__divMinFixedContainer;\\r\\n\\t};\\r\\n\\t/******************************End of Minimize Maximize Function *************************************/\\r\\n\\t/******************************Start of FullScreen Function *************************************/\\r\\n\\tNSPanel.prototype.__initializeFullScreen = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__body && !this.__disableFullScreen)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar getValue = function(element,property)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar styleProp = self.util.getStyleValue(element,property);\\r\\n\\t\\t\\t\\tif(styleProp == \\\"auto\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar rect = element.getBoundingClientRect();\\r\\n\\t\\t\\t\\t\\tstyleProp = rect[property];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstyleProp = parseInt(styleProp.substring(0,styleProp.length - 2));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn styleProp;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar windowHeight = function() \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar docElemProp = this.__context.document.documentElement.clientHeight;\\r\\n\\t\\t\\t\\tvar body = this.__context.document.body;\\r\\n\\t\\t\\t\\treturn this.__context.document.compatMode === \\\"CSS1Compat\\\" && docElemProp || body && body.clientHeight || docElemProp;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar eventType = \\\"\\\";\\r\\n\\t\\t\\tif(this.__isFullScreen)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//restore\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.RESTORE_STARTING,null,null);\\r\\n\\t\\t\\t\\tthis.disableDrag(false);\\r\\n\\t\\t\\t\\tthis.disableResize(false);\\r\\n\\t\\t\\t\\tthis.disableCollapse(false);\\r\\n\\t\\t\\t\\tthis.disableMinMax(false);\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsPanelFullScreen\\\");\\r\\n\\t\\t\\t\\tthis.__baseComponent.setAttribute(\\\"style\\\",this.__origFullScreenDimension.baseComponentStyle);\\r\\n\\t\\t\\t\\tthis.__origFullScreenDimension.baseComponentStyle = null;\\r\\n\\t\\t\\t\\tthis.__origFullScreenDimension.baseComponentRect = null;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\teventType = NSPanel.RESTORE_END;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//fullscreen\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),NSPanel.FULLSCREEN_STARTING,null,null);\\r\\n\\t\\t\\t\\tthis.disableDrag(true);\\r\\n\\t\\t\\t\\tthis.disableResize(true);\\r\\n\\t\\t\\t\\tthis.disableCollapse(true);\\r\\n\\t\\t\\t\\tthis.disableMinMax(true);\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsPanelFullScreen\\\");\\r\\n\\t\\t\\t\\tvar rect = this.__baseComponent.getBoundingClientRect();\\r\\n\\t\\t\\t\\tthis.__origFullScreenDimension.baseComponentRect = rect;\\r\\n\\t\\t\\t\\tthis.__origFullScreenDimension.baseComponentStyle = this.__baseComponent.getAttribute(\\\"style\\\");\\r\\n\\t\\t\\t\\tvar zIndex = this.__getZIndex();\\r\\n\\t\\t\\t\\tif(!isNaN(zIndex) && zIndex > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__baseComponent.style.zIndex = zIndex;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t/*var offsetWidthDialog = this.util.getOuterWidth(this.__baseComponent) - getValue(this.__baseComponent,\\\"width\\\");\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.width = (window.outerWidth - offsetWidthDialog) + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.height = windowHeight() + \\\"px\\\";\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.top = 0;\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.left = 0;\\r\\n\\t\\t\\t\\tthis.__baseComponent.style.zIndex = zIndex;*/\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\teventType = NSPanel.FULLSCREEN_END;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__handleFullScreenIcon(!this.__isFullScreen);\\r\\n\\t\\t\\tthis.__isFullScreen = !this.__isFullScreen;\\r\\n\\t\\t\\tif(this.__bodyCompInstance)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callEditorFunction(this.__bodyCompInstance,\\\"fullScreenChanged\\\",this.__isFullScreen);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.getBaseElement(),eventType,null,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__handleFullScreenIcon = function(isFullScreen)\\r\\n\\t{\\r\\n\\t\\tvar svgID = \\\"\\\";\\r\\n\\t\\tvar toolBarKey = \\\"\\\";\\r\\n\\t\\tif(isFullScreen)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"restore\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__RESTORE_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\ttoolBarKey = \\\"fullScreen\\\";\\r\\n\\t\\t\\tsvgID = new NSSvgShapes().__FULLSCREEN_ICON_ID;\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__setToolBarButton(toolBarKey))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = this.getID() + \\\"FullScreen\\\" + \\\"use\\\";\\r\\n\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#\\\" + svgID);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__callEditorFunction = function(editor,functionRef,param,defaultValue)\\r\\n\\t{\\r\\n\\t\\tif(editor && editor[functionRef] && this.util.isFunction(editor[functionRef]))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = null;\\r\\n\\t\\t\\tif(param && this.util.isArray(param) && param.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = editor[functionRef].apply(null,param);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = editor[functionRef](param);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(retValue))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn defaultValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__getAttributeKey = function(key)\\r\\n\\t{\\r\\n\\t\\treturn \\\"__\\\" + \\\"ns_panel_field\\\" + \\\"_\\\" + key;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPanel.prototype.__getZIndex = function()\\r\\n\\t{\\r\\n\\t\\t/*var zIndex = parseInt(this.util.getZIndex(this.__baseComponent));\\r\\n\\t\\tvar arrElement = document.querySelectorAll(\\\".nsPanel:not(.nsDragGhost)\\\");\\r\\n\\t\\tfor(var count = 0;count < arrElement.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar eleZIndex = parseInt(this.util.getZIndex(arrElement[count]));\\r\\n\\t\\t\\tif (eleZIndex >= zIndex && arrElement[count] != this.__baseComponent) \\r\\n\\t\\t\\t{\\r\\n\\t            zIndex = eleZIndex + 1;\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t\\treturn zIndex;*/\\r\\n\\t\\tvar maxZIndex = this.util.getMaxZIndex();\\r\\n\\t\\treturn maxZIndex;\\r\\n\\t};\\r\\n\\t/******************************End of FullScreen Function *************************************/\\r\\n\\tNSPanel.__ELEMENT_FOCUS_OUT = \\\"elementFocusOut\\\";\\r\\n\\t\\r\\n\\tNSPanel.DRAG_STARTING = \\\"dragStaring\\\";\\r\\n\\tNSPanel.DRAGGING = \\\"dragging\\\";\\r\\n\\tNSPanel.DRAG_END = \\\"dragEnd\\\";\\r\\n\\tNSPanel.RESIZE_STARTING = \\\"resizeStaring\\\";\\r\\n\\tNSPanel.RESIZING = \\\"resizing\\\";\\r\\n\\tNSPanel.RESIZE_END = \\\"resizeEnd\\\";\\r\\n\\tNSPanel.COLLAPSE_STARTING = \\\"collapseStarting\\\";\\r\\n\\tNSPanel.COLLAPSE_END = \\\"collapseEnd\\\";\\r\\n\\tNSPanel.EXPANSION_STARTING = \\\"expansionStarting\\\";\\r\\n\\tNSPanel.EXPANSION_END = \\\"expansionEnd\\\";\\r\\n\\tNSPanel.MINIMIZE_STARTING = \\\"minimizeStarting\\\";\\r\\n\\tNSPanel.MINIMIZE_END = \\\"minimizeEnd\\\";\\r\\n\\tNSPanel.MAXIMIZE_STARTING = \\\"maximizeStarting\\\";\\r\\n\\tNSPanel.MAXIMIZE_END = \\\"maximizeEnd\\\";\\r\\n\\tNSPanel.FULLSCREEN_STARTING = \\\"fullScreenStarting\\\";\\r\\n\\tNSPanel.FULLSCREEN_END = \\\"fullScreenEnd\\\";\\r\\n\\tNSPanel.RESTORE_STARTING = \\\"restoreStarting\\\";\\r\\n\\tNSPanel.RESTORE_END = \\\"restoreEnd\\\";\\r\\n\\tNSPanel.CLOSED = \\\"closed\\\";\\r\\n\\t\\r\\n\\treturn NSPanel;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSPanel\\\",NSPanel);\\\"use strict\\\"; \\r\\nvar NSDashboard = (function()\\r\\n{\\r\\n\\tfunction NSDashboard(setting) \\r\\n\\t{\\r\\n\\t\\tvar util = new NSUtil();\\r\\n\\t\\tvar config = null;\\r\\n\\t\\t\\r\\n\\t\\tvar id = null;\\r\\n\\t\\tvar arrPanel = [];\\r\\n\\t\\tvar dragElement = null;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\t\\r\\n\\t\\tthis.getAllPanel = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(arrPanel && arrPanel.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrPanel.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrReturn.push(arrPanel[count].panel);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn arrReturn;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getPanel = function(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\t\\tif(this.util.isElement(item))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tindex = parseInt(item.getAttribute(\\\"nsDashboardOrgIndex\\\"));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(this.util.isNumber(item))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tindex = parseInt(item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(index > -1 && arrPanel.length > index)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn arrPanel[index].panel;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.removeComponent = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(arrPanel && arrPanel.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrPanel.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(arrPanel[count].panel)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrPanel[count].panel.removeComponent();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig = {\\r\\n\\t\\t\\t\\t\\t\\tcontainer: setting[\\\"container\\\"] || null,\\r\\n\\t\\t\\t\\t\\t\\tpanelClass: setting[\\\"panelClass\\\"] || null,\\r\\n\\t\\t\\t\\t\\t\\tpanelDragClass: setting[\\\"panelDragClass\\\"] || null,\\r\\n\\t\\t\\t\\t\\t\\tpanelHoverClass: setting[\\\"panelHoverClass\\\"] || null,\\r\\n\\t\\t\\t\\t\\t\\tpanelCount: parseInt(setting[\\\"panelCount\\\"]),\\r\\n\\t\\t\\t\\t\\t\\tpanelPerRow: util.isUndefinedOrNull(setting[\\\"panelPerRow\\\"]) ? parseInt(setting[\\\"panelPerRow\\\"]) : 3,\\r\\n\\t\\t\\t\\t\\t\\tarrPanelSetting: setting[\\\"arrPanelSetting\\\"] || []\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tif(!config.container)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.throwException(2001,\\\"NSDashboard\\\",\\\"Container property is invalid\\\");\\r\\n\\t\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!config.panelCount)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.throwException(2002,\\\"NSDashboard\\\",\\\"Enter a valid value for PanelCount property\\\");\\r\\n\\t\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(config.panelPerRow == 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.throwException(2002,\\\"NSDashboard\\\",\\\"PanelPerRow property has an invalid value\\\");\\r\\n\\t\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!config.arrPanelSetting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.throwException(2002,\\\"NSDashboard\\\",\\\"arrPanelSetting property has an invalid value\\\");\\r\\n\\t\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(12 % config.panelPerRow !== 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.throwException(2001,\\\"NSDashboard\\\",\\\"PanelPerRow property should have a value which is divisible by 12\\\");\\r\\n\\t\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(config.arrPanelSetting.length != config.panelCount)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.throwException(2001,\\\"NSDashboard\\\",\\\"arrPanelSetting property should have same length as PanelCount property\\\");\\r\\n\\t\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tcreateElement();\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tvar createElement = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar classNum = 12 / config.panelPerRow;\\r\\n\\t\\t\\tutil.addStyleClass(config.container,\\\"nsDashboard\\\");\\r\\n\\t\\t\\tutil.removeAllChildren(config.container);\\r\\n\\t\\t\\tfor(var count = 0;count < config.panelCount;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcreatePanel(config.arrPanelSetting[count],classNum,count);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tvar createPanel = function(setting,classNum,index) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar divPanel = util.createDiv(getID() + \\\"NSDashboardPanel\\\" + index,\\\"nsDashboardPanel\\\");\\r\\n\\t\\t\\t//util.addStyleClass(divPanel,\\\"col-sm-\\\" + classNum);\\r\\n\\t\\t\\tif(config.panelClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tutil.addStyleClass(divPanel,config.panelClass);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdivPanel.setAttribute(\\\"draggable\\\",true);\\r\\n\\t\\t\\tdivPanel.setAttribute(\\\"nsDashboardOrgIndex\\\",index);\\r\\n\\t\\t\\tdivPanel.setAttribute(\\\"nsDashboardCurIndex\\\",index);\\r\\n\\t\\t\\tutil.addEvent(divPanel,\\\"dragstart\\\",dragStartHandler);\\r\\n\\t\\t\\tutil.addEvent(divPanel,\\\"dragenter\\\",dragEnterHandler);\\r\\n\\t\\t\\tutil.addEvent(divPanel,\\\"dragover\\\",dragOverHandler);\\r\\n\\t\\t\\tutil.addEvent(divPanel,\\\"dragleave\\\",dragLeaveHandler);\\r\\n\\t\\t\\tutil.addEvent(divPanel,\\\"drop\\\",dropHandler);\\r\\n\\t\\t\\tutil.addEvent(divPanel,\\\"dragend\\\",dragEndHandler);\\r\\n\\t\\t\\tconfig.container.appendChild(divPanel);\\r\\n\\t\\t\\tsetting[\\\"enablePopUp\\\"] = false;\\r\\n\\t\\t\\tsetting[\\\"enableModal\\\"] = false;\\r\\n\\t\\t\\tsetting[\\\"enableDrag\\\"] = false;\\r\\n\\t\\t\\tsetting[\\\"enableTitleDblClick\\\"] = false;\\r\\n\\t\\t\\tsetting[\\\"enableMoveOnClick\\\"] = false;\\r\\n\\t\\t\\t//Resize behaving weirdly so disabling it\\r\\n\\t\\t\\tsetting[\\\"enableResize\\\"] = false;\\r\\n\\t\\t\\tsetting[\\\"minimizeAddRemoveElementCallback\\\"] = minimizeAddRemoveElement;\\r\\n\\t\\t\\tvar nsPanel = new NSPanel(divPanel,setting);\\r\\n\\t\\t\\tutil.addEvent(divPanel,NSPanel.MINIMIZE_END,nsPanelEventHandler);\\r\\n\\t\\t\\tutil.addEvent(divPanel,NSPanel.MAXIMIZE_END,nsPanelEventHandler);\\r\\n\\t\\t\\tutil.addEvent(divPanel,NSPanel.FULLSCREEN_END,nsPanelEventHandler);\\r\\n\\t\\t\\tutil.addEvent(divPanel,NSPanel.RESTORE_END,nsPanelEventHandler);\\r\\n\\t\\t\\tutil.addEvent(divPanel,NSPanel.RESIZE_STARTING,nsPanelEventHandler);\\r\\n\\t\\t\\tutil.addEvent(divPanel,NSPanel.RESIZE_END,nsPanelEventHandler);\\r\\n\\t\\t\\tarrPanel.push({panel:nsPanel,draggable:true});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar nsPanelEventHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\tvar item = arrPanel[parseInt(this.getAttribute(\\\"nsDashboardOrgIndex\\\"))];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar nsPanel = item.panel;\\r\\n\\t\\t\\t\\tswitch(event.type)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcase NSPanel.MINIMIZE_END:\\r\\n\\t\\t\\t\\t\\t\\titem.draggable = false;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase NSPanel.MAXIMIZE_END:\\r\\n\\t\\t\\t\\t\\t\\titem.draggable = true;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase NSPanel.FULLSCREEN_END:\\r\\n\\t\\t\\t\\t\\t\\titem.draggable = false;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase NSPanel.RESTORE_END:\\r\\n\\t\\t\\t\\t\\t\\titem.draggable = true;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase NSPanel.RESIZE_STARTING:\\r\\n\\t\\t\\t\\t\\t\\titem.draggable = false;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase NSPanel.RESIZE_END:\\r\\n\\t\\t\\t\\t\\t\\titem.draggable = true;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar dragStartHandler = function(event) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(arrPanel[parseInt(this.getAttribute(\\\"nsDashboardOrgIndex\\\"))].draggable)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\t\\tdragElement = this;\\r\\n\\t\\t\\t\\tif(config.panelDragClass)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.addStyleClass(dragElement,config.panelDragClass);\\t\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tutil.dispatchEvent(dragElement,NSDashboard.PANEL_DRAG_START,{element:dragElement,index:dragElement.getAttribute(\\\"nsDashboardCurIndex\\\")},{index:dragElement.getAttribute(\\\"nsDashboardCurIndex\\\")});\\r\\n\\t\\t\\t\\tevent.dataTransfer.effectAllowed = \\\"move\\\";\\r\\n\\t\\t\\t\\tevent.dataTransfer.setData(\\\"text\\\",dragElement.getAttribute(\\\"nsDashboardCurIndex\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tvar dragOverHandler = function(event) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(dragElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\t\\tif (event.preventDefault) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tevent.dataTransfer.dropEffect = \\\"move\\\";  \\r\\n\\t\\t\\t\\tvar index = this.getAttribute(\\\"nsDashboardCurIndex\\\");\\r\\n\\t\\t\\t\\tutil.dispatchEvent(this,NSDashboard.PANEL_DRAG_OVER,{element:this,index:index},{index:index});\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\tvar dragEnterHandler = function(event) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(dragElement && config.panelHoverClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tutil.addStyleClass(this,config.panelHoverClass);\\r\\n\\t\\t\\t\\tvar index = this.getAttribute(\\\"nsDashboardCurIndex\\\");\\r\\n\\t\\t\\t\\tutil.dispatchEvent(this,NSDashboard.PANEL_DRAG_ENTER,{element:this,index:index},{index:index});\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tvar dragLeaveHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(dragElement && config.panelHoverClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tutil.removeStyleClass(this,config.panelHoverClass);\\t\\r\\n\\t\\t\\t\\tvar index = this.getAttribute(\\\"nsDashboardCurIndex\\\");\\r\\n\\t\\t\\t\\tutil.dispatchEvent(this,NSDashboard.PANEL_DRAG_LEAVE,{element:this,index:index},{index:index});\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tvar dropHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(dragElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\t\\tif (event.stopPropagation) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tevent.stopPropagation(); \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (dragElement != this) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t  \\tutil.swapElements(dragElement,this);\\r\\n\\t\\t\\t\\t  \\tvar currIndex = dragElement.getAttribute(\\\"nsDashboardCurIndex\\\");\\r\\n\\t\\t\\t\\t  \\tdragElement.setAttribute(\\\"nsDashboardCurIndex\\\",this.getAttribute(\\\"nsDashboardCurIndex\\\"));\\r\\n\\t\\t\\t\\t  \\tthis.setAttribute(\\\"nsDashboardCurIndex\\\",currIndex);\\r\\n\\t\\t\\t\\t  \\tvar nsPanel = arrPanel[parseInt(this.getAttribute(\\\"nsDashboardOrgIndex\\\"))].panel; \\r\\n\\t\\t\\t\\t  \\tif(nsPanel)\\r\\n\\t\\t\\t\\t  \\t{\\r\\n\\t\\t\\t\\t  \\t\\tnsPanel.__refreshToolbarIcon();\\r\\n\\t\\t\\t\\t  \\t}\\r\\n\\t\\t\\t\\t  \\tvar index = this.getAttribute(\\\"nsDashboardCurIndex\\\");\\r\\n\\t\\t\\t\\t\\tutil.dispatchEvent(this,NSDashboard.PANEL_DROP,{element:this,index:index},{index:index});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(config.panelDragClass)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tutil.removeStyleClass(dragElement,config.panelDragClass);\\t\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar nsPanel = arrPanel[parseInt(dragElement.getAttribute(\\\"nsDashboardOrgIndex\\\"))].panel; \\r\\n\\t\\t\\t  \\tif(nsPanel)\\r\\n\\t\\t\\t  \\t{\\r\\n\\t\\t\\t  \\t\\tnsPanel.__refreshToolbarIcon();\\r\\n\\t\\t\\t  \\t}\\r\\n\\t\\t\\t\\tdragElement = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t  \\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\tvar dragEndHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(config.panelHoverClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrPanel.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar divPanel = arrPanel[count].panel.getBaseElement();\\r\\n\\t\\t\\t\\t\\tutil.removeStyleClass(divPanel,config.panelHoverClass);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar index = this.getAttribute(\\\"nsDashboardCurIndex\\\");\\r\\n\\t\\t\\tutil.dispatchEvent(this,NSDashboard.PANEL_DRAG_END,{element:this,index:index},{index:index});\\r\\n\\t\\t};\\r\\n\\t\\tvar minimizeAddRemoveElement = function(element,parent,isAdd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isAdd)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = parseInt(element.getAttribute(\\\"nsDashboardCurIndex\\\"));\\r\\n\\t\\t\\t\\tutil.insertElementAtIndex(parent,element,index);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparent.removeChild(element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tvar getID = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!id)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(config.container.hasAttribute(\\\"id\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tid = config.container.getAttribute(\\\"id\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(config.container.hasAttribute(\\\"name\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tid = config.container.getAttribute(\\\"name\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tid = \\\"comp\\\" + util.getUniqueId();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn id;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tinitialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDashboard.PANEL_DRAG_START = \\\"panelDragStart\\\";\\r\\n\\tNSDashboard.PANEL_DRAG_ENTER = \\\"panelDragenter\\\";\\r\\n\\tNSDashboard.PANEL_DRAG_OVER = \\\"panelDragover\\\";\\r\\n\\tNSDashboard.PANEL_DRAG_LEAVE = \\\"panelDragleave\\\";\\r\\n\\tNSDashboard.PANEL_DROP = \\\"panelDrop\\\";\\r\\n\\tNSDashboard.PANEL_DRAG_END = \\\"panelDragend\\\";\\r\\n\\t\\r\\n\\treturn NSDashboard;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSDashboard\\\",NSDashboard);\";","export const NSHorizontalNavigationCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\n\\r\\n\\t\\t}\\r\\nvar NSHorizontalNavigation = (function()\\r\\n{\\r\\n\\tfunction NSHorizontalNavigation(container,setting) \\r\\n\\t{\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__container = container;\\r\\n\\t\\t\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.util = null;\\r\\n\\t\\tthis.__domVar = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__con = null;\\r\\n\\t\\tthis.__docHandlerRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.initializeComponent();\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.constructor = NSHorizontalNavigation;\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.setTheme = function(theme)\\r\\n\\t{\\r\\n\\t\\tif(this.__con) {\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__con,\\\"nsHorNav\\\" + this.__config.theme);\\r\\n\\t\\t\\tthis.__config.theme = theme;\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__con,\\\"nsHorNav\\\" + this.__config.theme);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tif(!this.__container) {\\r\\n\\t\\t\\tthis.util.throwNSError(\\\"NSHorizontalNavigation\\\",\\\"Container cannot be null\\\");\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__domVar = this.util.getDomVariables();\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__docHandlerRef) {\\r\\n\\t\\t\\tthis.util.removeEvent(this.__domVar.doc,\\\"click\\\",this.__docHandlerRef);\\r\\n\\t\\t\\tthis.__docHandlerRef = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.selectMenu = function(itemOrElement)\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.dataSource = function(source)\\r\\n\\t{\\r\\n\\t\\tthis.__config.dataSource = source;\\r\\n\\t\\tthis.__config.orignalDataSource = this.__config.dataSource ? this.__config.dataSource.slice(0) : [];\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setting = {};\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__setting[\\\"customClass\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setting[\\\"customClass\\\"] = {};\\r\\n\\t\\t}\\r\\n\\t\\tthis.__config = {\\r\\n\\t\\t\\tdataSource: this.__setting[\\\"dataSource\\\"] || null,\\r\\n\\t\\t\\ttitleField: this.__setting[\\\"titleField\\\"] || \\\"title\\\",\\r\\n\\t\\t\\tchildField: this.__setting[\\\"childField\\\"] || \\\"children\\\",\\r\\n\\t\\t\\tenableOpenOnClick: Boolean.parse(this.__setting[\\\"enableOpenOnClick\\\"]),\\r\\n\\t\\t\\tenableAnimation: Boolean.parse(this.__setting[\\\"enableAnimation\\\"]),\\r\\n\\t\\t\\ttheme: this.__setting[\\\"theme\\\"] || \\\"Gray\\\",\\r\\n\\t\\t\\textraAttribute: this.__setting[\\\"extraAttribute\\\"],// to set link for Angular 2 or other framework attributes\\r\\n\\t\\t\\tcustomClass:{navContainer:this.__setting.customClass[\\\"navContainer\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  nonSubMenuItem:this.__setting.customClass[\\\"nonSubMenuItem\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  subMenuItem:this.__setting.customClass[\\\"subMenuItem\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  subMenuCon:this.__setting.customClass[\\\"subMenuCon\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  mouseHover:this.__setting.customClass[\\\"mouseHover\\\"] || null\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tthis.__createStructure();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.__createStructure = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__con) {\\r\\n\\t\\t\\tthis.util.removeAllChildren(this.__con);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__config.dataSource && this.__config.dataSource.length) {\\r\\n\\t\\t\\tvar dataSource = this.__config.dataSource;\\r\\n\\t\\t\\tif(!this.__con) {\\r\\n\\t\\t\\t\\tthis.__con = this.util.createElement(\\\"ul\\\",null,\\\"nsHorNavContentCon nsHorNav nsHorNav\\\" + this.__config.theme);\\r\\n\\t\\t\\t\\tthis.__applyCustomClass(this.__con,\\\"navContainer\\\");\\r\\n\\t\\t\\t\\tthis.__container.appendChild(this.__con);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(var count = 0;count < dataSource.length;count++) {\\r\\n\\t\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t\\tif(item) {\\r\\n\\t\\t\\t\\t\\tif(item[this.__config.childField] && item[this.__config.childField].length) {\\r\\n\\t\\t\\t\\t\\t\\tthis.__createSubNav(this.__con,item,0);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse {\\r\\n\\t\\t\\t\\t\\t\\tthis.__createNav(this.__con,item,0);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__docHandlerRef) {\\r\\n\\t\\t\\t\\tthis.__docHandlerRef = this.__documentClickHandler.bind(this);\\r\\n\\t\\t\\t\\tif(this.__config.enableOpenOnClick) {\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__domVar.doc,\\\"click\\\",this.__docHandlerRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse {\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__con,\\\"mouseleave\\\",this.__docHandlerRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.__createNav = function(con,item,level) {\\r\\n\\t\\tvar navItemCon = this.__createNavItem(item,\\\"nsHorNavItemCon nsHorNavNonSubNavItemCon nsHorNavNonSubNavItemCon-\\\" + level,\\\"nsHorNavItem nsHorNavNonSubNavItem\\\");\\r\\n\\t\\tvar navItem = navItemCon.firstElementChild;\\r\\n\\t\\tthis.__setLink(navItem,item[\\\"link\\\"]);\\r\\n\\t\\tthis.__setExtraAttrubtesForLink(navItem,item);\\r\\n\\t\\tthis.__applyCustomClass(navItem,\\\"nonSubMenuItem\\\");\\r\\n\\t\\tthis.util.addEvent(navItemCon,\\\"click\\\",this.__navClickHandler.bind(this,con,item));\\r\\n\\t\\tcon.appendChild(navItemCon);\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.__createSubNav = function(con,item,level) {\\r\\n\\t\\tvar navItemCon = this.__createNavItem(item,\\\"nsHorNavItemCon nsHorNavSubNavCon nsHorNavSubNavCon-\\\" + level,\\\"nsHorNavItem nsHorNavSubNavItem\\\");\\r\\n\\t\\tvar navItem = navItemCon.firstElementChild;\\r\\n\\t\\tnavItem.setAttribute(\\\"href\\\",\\\"javascript:void(0)\\\");\\r\\n\\t\\tthis.__applyCustomClass(navItem,\\\"subMenuItem\\\");\\r\\n\\t\\tvar conContent = this.util.createElement(\\\"ul\\\",null,\\\"nsHorNavContentCon nsHorNavSubNavContent\\\");\\r\\n\\t\\tthis.__applyCustomClass(conContent,\\\"subMenuCon\\\");\\r\\n\\t\\tfor(var count = 0;count < item[this.__config.childField].length;count++) {\\r\\n\\t\\t\\tvar itemSub = item[this.__config.childField][count];\\r\\n\\t\\t\\tif(itemSub) {\\r\\n\\t\\t\\t\\tif(itemSub[this.__config.childField] && itemSub[this.__config.childField].length) {\\r\\n\\t\\t\\t\\t\\tthis.__createSubNav(conContent,itemSub,level + 1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse {\\r\\n\\t\\t\\t\\t\\tthis.__createNav(conContent,itemSub,level + 1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tnavItemCon.appendChild(conContent);\\r\\n\\t\\tif(this.__config.enableOpenOnClick) {\\r\\n\\t\\t\\tthis.util.addEvent(navItem,\\\"click\\\",this.__subNavClickHandler.bind(this,navItemCon,item));\\r\\n\\t\\t}\\r\\n\\t\\telse {\\r\\n\\t\\t\\tthis.util.addEvent(navItem,\\\"mouseover\\\",this.__showSubNav.bind(this,navItemCon,item));\\r\\n\\t\\t\\t//this.util.addEvent(navItem,\\\"mouseleave\\\",this.__hideSubNav.bind(this,navItemCon,item));\\r\\n\\t\\t}\\r\\n\\t\\tcon.appendChild(navItemCon);\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.__createNavItem = function(item,cssClass,itemCssClass) {\\r\\n\\t\\tvar navItemCon = this.util.createElement(\\\"li\\\",null,cssClass);\\r\\n\\t\\tif(item[\\\"disabled\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(navItemCon,\\\"nsHorNavItemDisabled\\\");\\r\\n\\t\\t}\\r\\n\\t\\tvar navItem = this.util.createElement(\\\"a\\\",null,itemCssClass);\\r\\n\\t\\tif(item[\\\"iconBeforeHtml\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar spanIcon = this.util.createElement(\\\"span\\\",null,\\\"nsHorNavItemIconCon\\\");\\r\\n\\t\\t\\tspanIcon.innerHTML = item[\\\"iconBeforeHtml\\\"];\\r\\n\\t\\t\\tnavItem.appendChild(spanIcon);\\r\\n\\t\\t}\\r\\n\\t\\tvar spanText = this.util.createElement(\\\"span\\\",null,\\\"nsHorNavText\\\");\\r\\n\\t\\tspanText.appendChild(document.createTextNode(item[this.__config.titleField]));\\r\\n\\t\\tnavItem.appendChild(spanText);\\r\\n\\t\\tif(item[\\\"iconAfterHtml\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar spanIcon = this.util.createElement(\\\"span\\\",null,\\\"nsHorNavItemIconCon\\\");\\r\\n\\t\\t\\tspanIcon.innerHTML = item[\\\"iconAfterHtml\\\"];\\r\\n\\t\\t\\tnavItem.appendChild(spanIcon);\\r\\n\\t\\t}\\r\\n\\t\\tnavItemCon.appendChild(navItem);\\r\\n\\t\\treturn navItemCon;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.__documentClickHandler = function(event) {\\r\\n\\t\\tthis.__closeAllSubNavs();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.__navClickHandler = function(con,item,event) {\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tthis.__closeAllSubNavs();\\r\\n\\t\\tif(item.click) {\\r\\n\\t\\t\\titem.click(event,item);\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.dispatchEvent(con,NSHorizontalNavigation.NAVIGATION_MENU_SELECTED,item,{item:item,menu:con});\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.__subNavClickHandler = function(con,item,event) {\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tthis.__closeAllSubNavs(function(conActive) {\\r\\n\\t\\t\\t//in case of outer level navs 1st case is valid and in rest of the case 2nd case is valid\\r\\n\\t\\t\\tif(con.contains(conActive) || conActive.contains(con)) {\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t});\\r\\n\\t\\tthis.__showSubNav(con,item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.__showSubNav = function(con,item) {\\r\\n\\t\\tvar content = con.querySelector(\\\".nsHorNavSubNavContent\\\");\\r\\n\\t\\tif(content) {\\r\\n\\t\\t\\tif(this.__config.enableAnimation) {\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tthis.util.slideDownTransition(content,150,function(elem) {\\r\\n\\t\\t\\t\\t\\tself.util.addStyleClass(elem,\\\"nsHorNavSubNavContentActive\\\");\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse {\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(content,\\\"nsHorNavSubNavContentActive\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.__hideSubNav = function(con,item) {\\r\\n\\t\\tconsole.log(\\\"In __hideSubNav \\\",con);\\r\\n\\t\\tvar content = con;\\r\\n\\t\\tif(!this.util.hasStyleClass(con,\\\"nsHorNavSubNavContentActive\\\")) {\\r\\n\\t\\t\\tcontent = con.querySelector(\\\".nsHorNavSubNavContent\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(content) {\\r\\n\\t\\t\\t/*if(this.__config.enableAnimation) {\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tthis.util.slideUpTransition(content,150,function(elem) {\\r\\n\\t\\t\\t\\t\\tself.util.removeStyleClass(elem,\\\"nsHorNavSubNavContentActive\\\");\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse {\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(content,\\\"nsHorNavSubNavContentActive\\\");\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.__closeAllSubNavs = function(doesCloseCallback) {\\r\\n\\t\\tvar arrContent = this.__con.querySelectorAll(\\\".nsHorNavSubNavContentActive\\\");\\r\\n\\t\\tif(arrContent && arrContent.length) {\\r\\n\\t\\t\\tfor(var count = 0;count < arrContent.length;count++) {\\r\\n\\t\\t\\t\\tvar con = arrContent[count];\\r\\n\\t\\t\\t\\tif(!doesCloseCallback || doesCloseCallback(con)) {\\r\\n\\t\\t\\t\\t\\tif(this.__config.enableAnimation) {\\r\\n\\t\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\t\\tthis.util.slideUpTransition(con,150,function(elem) {\\r\\n\\t\\t\\t\\t\\t\\tself.util.removeStyleClass(elem,\\\"nsHorNavSubNavContentActive\\\");\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse {\\r\\n\\t\\t\\t\\t\\t\\tthis.util.removeStyleClass(con,\\\"nsHorNavSubNavContentActive\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.__setLink = function(anchor,link) {\\r\\n\\t\\tif(link) {\\r\\n\\t\\t\\tanchor.setAttribute(\\\"href\\\",link);\\r\\n\\t\\t\\tif(this.__config[\\\"extraAttribute\\\"]) {\\r\\n\\t\\t\\t\\tanchor.setAttribute(this.__config[\\\"extraAttribute\\\"],link);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse {\\r\\n\\t\\t\\tanchor.setAttribute(\\\"href\\\",\\\"javascript:void(0)\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.__setExtraAttrubtesForLink = function(anchor,item) {\\r\\n\\t\\tif(item.attributes) {\\r\\n\\t\\t\\tfor (var prop in item.attributes) {\\r\\n\\t\\t\\t    if (item.attributes.hasOwnProperty(prop)) {\\r\\n\\t\\t\\t        anchor.setAttribute(prop,item.attributes[prop]);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.prototype.__applyCustomClass = function(element,type) {\\r\\n\\t\\tif(element && type && this.__config.customClass[type])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(element,this.__config.customClass[type]);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHorizontalNavigation.NAVIGATION_MENU_SELECTED = \\\"navigationMenuSelected\\\";\\r\\n\\t\\r\\n\\treturn NSHorizontalNavigation;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSHorizontalNavigation\\\",NSHorizontalNavigation);\\r\\n\\r\\n\";","export const NSNumericTextBoxCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\nvar svgRef = require('./nsSVG.min.js');\\r\\nvar NSSvg = svgRef.NSSvg;\\r\\nvar NSSvgShapes = svgRef.NSSvgShapes;\\r\\nvar plugginsRef = require('./nsPluggins.min.js');\\r\\nvar nsTextEditor = plugginsRef.nsTextEditor;\\r\\nvar nsTextAreaEditor = plugginsRef.nsTextAreaEditor;\\r\\nvar NSCellSelection = plugginsRef.NSCellSelection;\\r\\nvar NSTableCellNavigator = plugginsRef.NSTableCellNavigator;\\r\\nvar dateutilRef = require('./nsDateUtil.min.js');\\r\\nvar NSDateUtil = dateutilRef.NSDateUtil;\\r\\n\\r\\n\\t\\t}\\r\\n \\\"use strict\\\"; \\r\\nvar NSNumericTextBox = (function()\\r\\n{\\r\\n\\tfunction NSNumericTextBox(setting) \\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\t\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__id = null;\\r\\n\\t\\tthis.__parentNode = null;\\r\\n\\t\\tthis.__spanContainer = null;\\r\\n\\t\\tthis.__spanTextBoxParent = null;\\r\\n\\t\\tthis.__currentValue = null;\\r\\n\\t\\tthis.__interval = null;\\r\\n\\t\\tthis.__hasClickedSpin = false;\\r\\n\\t\\tthis.__typing = false;\\r\\n\\t\\tthis.__observer = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.setValue = function(value,fireEvent) \\r\\n\\t{\\r\\n\\t\\tfireEvent = this.util.isUndefined(fireEvent) ? true : Boolean.parse(fireEvent);\\r\\n\\t\\tif(this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar textBox = this.__config.input;\\r\\n\\t\\t\\ttextBox.value = null;\\r\\n\\t\\t\\tthis.__oldValue = this.__currentValue;\\r\\n\\t\\t\\tthis.__currentValue = null;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__updateValue(value,false,fireEvent);\\r\\n\\t\\t\\tthis.__setFormattedValue();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.getValue = function() \\r\\n\\t{\\r\\n\\t\\treturn (this.__currentValue || 0);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.getFormattedValue = function() \\r\\n\\t{\\r\\n\\t\\treturn this.__config.input.value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.setTheme = function(theme) \\r\\n\\t{\\r\\n\\t\\tif(theme)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__spanContainer, \\\"nsNumericTextBoxContainer\\\" + this.__config.theme);\\r\\n\\t\\t\\tthis.__config.theme = theme;\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__spanContainer, \\\"nsNumericTextBoxContainer\\\" + this.__config.theme);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.setDisabled = function(isDisabled) \\r\\n\\t{\\r\\n\\t\\tvar textBox = this.__config.input;\\r\\n\\t\\ttextBox.disabled = isDisabled;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.setReadonly = function(isReadonly) \\r\\n\\t{\\r\\n\\t\\tvar textBox = this.__config.input;\\r\\n\\t\\ttextBox.readOnly = isReadonly;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.remove = function() \\r\\n\\t{ \\r\\n\\t\\tif(this.__spanContainer && this.__spanContainer.parentNode == this.__parentNode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__spanTextBoxParent.removeChild(this.__config.input);\\r\\n\\t\\t\\tthis.__parentNode.insertBefore(this.__config.input,this.__spanContainer);\\r\\n\\t\\t\\tthis.__parentNode.removeChild(this.__spanContainer);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__removeTextBoxEvents();\\r\\n\\t\\tthis.util.removeStyleClass(this.__config.input,\\\"nsNumericTextBox\\\");\\r\\n\\t\\tif(this.__observer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__observer.disconnect();\\r\\n\\t\\t\\tthis.__observer = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__initialize = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objType = {\\\"num\\\":{symbol:\\\"\\\",format:\\\"%v\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t   \\\"per\\\":{symbol:\\\"%\\\",format:\\\"%v%s\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t   \\\"usd\\\":{symbol:\\\"$\\\",format:\\\"%s%v\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t   \\\"pound\\\":{symbol:\\\"£\\\",format:\\\"%s%v\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t   \\\"euro\\\":{symbol:\\\"\\\\u20AC\\\",format:\\\"%v%s\\\"},//https://www.fileformat.info/info/unicode/char/20ac/index.htm\\r\\n\\t\\t\\t\\t\\t\\t\\t   \\\"yen\\\":{symbol:\\\"\\\\u00A5\\\",format:\\\"%s%v\\\"}//https://www.fileformat.info/info/unicode/char/a5/index.htm\\r\\n\\t\\t\\t\\t\\t\\t\\t  };\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\tinput: this.__setting[\\\"input\\\"],\\r\\n\\t\\t\\t\\t\\ttype: this.__setting[\\\"type\\\"] || \\\"num\\\",\\r\\n\\t\\t\\t\\t\\tenableDecimals: this.util.isUndefinedOrNull(this.__setting[\\\"enableDecimals\\\"]) ? true : Boolean.parse(this.__setting[\\\"enableDecimals\\\"]),\\r\\n\\t\\t\\t\\t\\tdecimals: this.__setting[\\\"decimals\\\"] || 2,\\r\\n\\t\\t\\t\\t\\tgrouping: this.__setting[\\\"grouping\\\"] || 3,\\r\\n\\t\\t\\t\\t\\tmin: this.__setting[\\\"min\\\"],\\r\\n\\t\\t\\t\\t\\tmax: this.__setting[\\\"max\\\"],\\r\\n\\t\\t\\t\\t\\tvalue: this.__setting[\\\"value\\\"],\\r\\n\\t\\t\\t\\t\\tenableThousand: this.util.isUndefinedOrNull(this.__setting[\\\"enableThousand\\\"]) ? true : Boolean.parse(this.__setting[\\\"enableThousand\\\"]),\\r\\n\\t\\t\\t\\t\\tdecimalSeparator: this.__setting[\\\"decimalSeparator\\\"] || \\\".\\\",\\r\\n\\t\\t\\t\\t\\tthousandSeparator: this.__setting[\\\"thousandSeparator\\\"] || \\\",\\\",\\r\\n\\t\\t\\t\\t\\tenableHover: this.util.isUndefinedOrNull(this.__setting[\\\"enableHover\\\"]) ? true : Boolean.parse(this.__setting[\\\"enableHover\\\"]),\\r\\n\\t\\t\\t\\t\\ttheme: this.__setting[\\\"theme\\\"] || \\\"White\\\",\\r\\n\\t\\t\\t\\t\\tcustomClass: this.__setting[\\\"customClass\\\"] || {},\\r\\n\\t\\t\\t\\t\\tenableSpinner: this.util.isUndefinedOrNull(this.__setting[\\\"enableSpinner\\\"]) ? true : Boolean.parse(this.__setting[\\\"enableSpinner\\\"]),\\r\\n\\t\\t\\t\\t\\tincrementerProp: this.__setting[\\\"incrementerProp\\\"] || {label:\\\"Increase Value\\\",iconHtml:\\\"\\\"},\\r\\n\\t\\t\\t\\t\\tdecrementerProp: this.__setting[\\\"decrementerProp\\\"] || {label:\\\"Decrease Value\\\",iconHtml:\\\"\\\"},\\r\\n\\t\\t\\t\\t\\tstep: this.__setting[\\\"step\\\"] || 1,\\r\\n\\t\\t\\t\\t\\tformat: this.__setting[\\\"format\\\"],\\r\\n\\t\\t\\t\\t\\tenableRangeRoundOf: this.util.isUndefinedOrNull(this.__setting[\\\"enableRangeRoundOf\\\"]) ? true : Boolean.parse(this.__setting[\\\"enableRangeRoundOf\\\"]),\\r\\n\\t\\t\\t\\t\\tcustomFormatSpecifier:  this.__setting[\\\"customFormatSpecifier\\\"] || \\\"#\\\",\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\tif(!this.__config.input)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSNumericTextBox\\\",\\\"Input property is not valid\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__config.enableThousand)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.thousandSeparator = \\\"\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__config.enableDecimals)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.decimals = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__createElement();\\r\\n\\t\\t\\tvar value = this.__config.value;\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.setValue(value);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__config.type == \\\"custom\\\" && this.util.isUndefinedOrNull(this.__setting[\\\"enableRangeRoundOf\\\"]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.enableRangeRoundOf = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.setTheme(this.__config.theme);\\r\\n\\t\\t\\tthis.__setDisabledOrReadonly();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__createElement = function() \\r\\n\\t{\\r\\n\\t\\tthis.__parentNode = this.__config.input.parentNode;\\r\\n\\t\\tvar id = this.__getID();\\r\\n\\t\\tthis.__spanContainer = this.util.createElement(\\\"span\\\", id + \\\"Container\\\", \\\"nsNumericTextBoxContainer\\\");\\r\\n\\t\\t\\r\\n\\t\\tthis.__applyCustomClass(this.__spanContainer,\\\"outerContainer\\\");\\r\\n\\t\\tthis.__spanTextBoxParent = this.util.createElement(\\\"span\\\", id + \\\"Parent\\\", \\\"nsNumericTextBoxParent\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__spanTextBoxParent,\\\"textBoxContainer\\\");\\r\\n\\t\\tthis.__spanContainer.appendChild(this.__spanTextBoxParent);\\r\\n\\t\\tthis.__parentNode.insertBefore(this.__spanContainer,this.__config.input);\\r\\n\\t\\tthis.__spanTextBoxParent.appendChild(this.__config.input);\\r\\n\\t\\tthis.util.addStyleClass(this.__config.input,\\\"nsNumericTextBox\\\");\\r\\n\\t\\tif(this.__config.enableHover)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addEvent(this.__spanTextBoxParent,\\\"mouseenter\\\",this.__textBoxParentEventHandler.bind(this,true));\\r\\n\\t\\t\\tthis.util.addEvent(this.__spanTextBoxParent,\\\"mouseleave\\\",this.__textBoxParentEventHandler.bind(this,false));\\r\\n\\t\\t}\\r\\n\\t\\tthis.__addTextBoxEvents();\\r\\n\\t\\tif(this.__config.enableSpinner)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__spanTextBoxParent,\\\"nsNumericTextBoxParentWithSpinner\\\");\\r\\n\\t\\t\\tthis.__createSpinner(id);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__createSpinner = function(id) \\r\\n\\t{\\r\\n\\t\\tvar incrementerProp = this.__config.incrementerProp;\\r\\n\\t\\tvar decrementerProp = this.__config.decrementerProp;\\r\\n\\t\\tthis.__spanSpinnerContainer = this.util.createElement(\\\"span\\\", id + \\\"SpinnerContainer\\\", \\\"nsNumericTextBoxSpinnerContainer\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__spanSpinnerContainer,\\\"spinContainer\\\");\\r\\n\\t\\tvar item = this.__createSpecificSpinner(\\\"Inc\\\",incrementerProp.label,\\\"spinIncrement\\\");\\r\\n\\t\\tthis.__spanIncSpinContainer = item.parent;\\r\\n\\t\\tthis.__spanIncSpin = item.child;\\r\\n\\t\\titem = this.__createSpecificSpinner(\\\"Dec\\\",decrementerProp.label,\\\"spinDecrement\\\");\\r\\n\\t\\tthis.__spanDecSpinContainer = item.parent;\\r\\n\\t\\tthis.__spanDecSpin = item.child;\\r\\n\\t\\tthis.__spanTextBoxParent.appendChild(this.__spanSpinnerContainer);\\r\\n\\t\\tthis.util.addEvent(this.__spanSpinnerContainer,\\\"mouseleave\\\",this.__spinnerContainerMouseOutHandler.bind(this));\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__createSpecificSpinner = function(func,title,customClass) \\r\\n\\t{\\r\\n\\t\\tvar spanParent = this.util.createElement(\\\"span\\\", null,\\\"nsNumericTextBoxSpinContainer \\\" + \\\"nsNumericTextBox\\\" + func + \\\"SpinnerContainer\\\");\\r\\n\\t\\tspanParent.setAttribute(\\\"unselectable\\\",\\\"on\\\");\\r\\n\\t\\tspanParent.setAttribute(\\\"title\\\",title);\\r\\n\\t\\tspanParent.setAttribute(\\\"aria-label\\\",title);\\r\\n\\t\\tvar spanSpin = this.util.createElement(\\\"span\\\", null,\\\"nsNumericTextBoxSpinner \\\" + \\\"nsNumericTextBox\\\" + func + \\\"Spinner\\\");\\r\\n\\t\\tspanSpin.setAttribute(\\\"unselectable\\\",\\\"on\\\");\\r\\n\\t\\tthis.__applyCustomClass(spanSpin,customClass);\\r\\n\\t\\tspanParent.appendChild(spanSpin);\\r\\n\\t\\tthis.__spanSpinnerContainer.appendChild(spanParent);\\r\\n\\t\\tvar mouseDownHandler = this.__spinnerMouseDownHandler.bind(this,spanParent,spanSpin,func);\\r\\n\\t\\tvar mouseOutHandler = this.__spinnerMouseOutHandler.bind(this,spanParent,spanSpin,func);\\r\\n\\t\\tthis.util.addEvent(spanParent,\\\"mousedown\\\",mouseDownHandler);\\r\\n\\t\\tthis.util.addEvent(spanParent,\\\"mouseup\\\",mouseOutHandler);\\r\\n\\t\\tthis.util.addEvent(spanParent,\\\"mouseleave\\\",mouseOutHandler);\\r\\n\\t\\treturn {parent: spanParent,child:spanSpin};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__spinnerMouseDownHandler = function(spinParent,spin,func,event) \\r\\n\\t{\\r\\n\\t\\tif(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t}\\r\\n\\t\\tthis.__hasClickedSpin = true;\\r\\n\\t\\tthis.__spinHandler(func);\\r\\n\\t\\tclearTimeout(this.__interval);\\r\\n\\t\\tthis.util.addStyleClass(spinParent,\\\"nsNumericTextBoxSpinnerSelected\\\");\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tthis.__interval = setTimeout(function(){self.__spinnerMouseDownHandler.call(self,spinParent,spin,func,event);}, 200);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__spinnerMouseOutHandler = function(spinParent,spin,func,event) \\r\\n\\t{\\r\\n\\t\\tclearTimeout(this.__interval);\\r\\n\\t\\tthis.__interval = null;\\r\\n\\t\\tthis.util.removeStyleClass(spinParent,\\\"nsNumericTextBoxSpinnerSelected\\\");\\r\\n\\t\\tif(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__spinnerContainerMouseOutHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.__hasClickedSpin = false;\\r\\n\\t\\tvar textBox = this.__config.input;\\r\\n\\t\\ttextBox.blur();\\r\\n\\t\\tthis.__blurHandler(null);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__spinHandler = function(func) \\r\\n\\t{\\r\\n\\t\\tif(this.__config.enableSpinner && !this.__isDisabled())\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar step = Number(this.__config.step);\\r\\n\\t\\t\\tstep = isNaN(step) ? 1 : step;\\r\\n\\t\\t\\tstep = (func == \\\"Inc\\\") ? step : (-1 * step);\\r\\n\\t\\t\\tthis.__spin(step);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__textBoxParentEventHandler = function(isMouseOver,event) \\r\\n\\t{\\r\\n\\t\\tisMouseOver ? this.util.addStyleClass(this.__spanTextBoxParent,\\\"nsNumericTextBoxParentHover\\\") : this.util.removeStyleClass(this.__spanTextBoxParent,\\\"nsNumericTextBoxParentHover\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__keyDownHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar inputCode = (event.which) ? event.which : event.keyCode;\\r\\n\\t\\tvar keyCode = this.util.KEYCODE;\\r\\n\\t\\tswitch(inputCode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcase keyCode.UP:\\r\\n\\t\\t\\t\\tthis.__spinHandler(\\\"Inc\\\");\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase keyCode.DOWN:\\r\\n\\t\\t\\t\\tthis.__spinHandler(\\\"Dec\\\");\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase keyCode.DELETE:\\r\\n\\t\\t\\tcase keyCode.BACKSPACE:\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tsetTimeout(function(){self.__updateValue.call(self,self.__config.input.value,false,true);},500);\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase keyCode.ENTER:\\r\\n\\t\\t\\t\\tthis.__updateValue(this.__config.input.value,false,true);\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\tdefault:\\r\\n\\t\\t\\tif(inputCode != keyCode.TAB)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__typing = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__keyPressHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar inputCode = (event.which) ? event.which : event.keyCode;\\r\\n\\t\\tif (inputCode === 0 || event.metaKey || event.ctrlKey || event.keyCode === 8 || event.keyCode === 13) \\r\\n\\t\\t{\\r\\n            return;\\r\\n        }\\r\\n\\t\\tvar character = String.fromCharCode(inputCode);\\r\\n\\t\\tthis.__updateValue(character,true,false);\\r\\n\\t\\tevent.preventDefault();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__focusHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tvar textBox = this.__config.input;\\r\\n\\t\\ttextBox.value = this.__currentValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__blurHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tvar value = this.__config.input.value;\\r\\n\\t\\tif(!(value == \\\"\\\" && this.util.isUndefinedOrNull(this.__currentValue)))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setFormattedValue(value);\\r\\n\\t\\t\\tif(this.__oldValue != this.__currentValue)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tvar item = {oldValue:this.__oldValue,newValue:this.__currentValue};\\r\\n    \\t\\t\\tthis.__dispatchEvent(NSNumericTextBox.VALUE_CHANGED,item,item);\\r\\n    \\t\\t\\tthis.__oldValue = this.__currentValue;\\r\\n    \\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__pasteHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar content = \\\"\\\";\\r\\n\\t\\tif(event.clipboardData)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcontent = event.clipboardData.getData('text/plain');\\r\\n\\t\\t}\\r\\n\\t\\telse if(window.clipboardData)\\r\\n\\t\\t{\\r\\n\\t\\t    content = window.clipboardData.getData('Text');\\r\\n\\t\\t}\\r\\n\\t\\t//console.log(\\\"Pasted Data :: \\\" + content);\\r\\n\\t\\tthis.__updateValue(content,true,true);\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tevent.preventDefault();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__updateValue = function(newContent,isAdd,fireEvent) \\r\\n\\t{\\r\\n\\t\\tvar textBox = this.__config.input;\\r\\n\\t\\tvar regex = this.__getNumericRegex();\\r\\n\\t\\tvar selection = this.util.caretPosition(textBox);\\r\\n\\t\\tvar selectionStart = selection.start;\\r\\n\\t    var selectionEnd = selection.end;\\r\\n\\t    var value = newContent;\\r\\n\\t    var presentValue = textBox.value;\\r\\n\\t    if(isAdd)\\r\\n\\t    {\\r\\n\\t    \\tvalue = presentValue.substring(0, selectionStart) + newContent + presentValue.substring(selectionEnd);\\r\\n\\t    }\\r\\n\\t\\tvar isValid = regex.test(value);\\r\\n\\t\\tif(isValid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvalue = this.__getRangeValue(value,this.__currentValue);\\r\\n\\t\\t\\tthis.__oldValue = this.__currentValue;\\r\\n\\t\\t\\tthis.__currentValue = value;\\r\\n\\t    \\ttextBox.value = value;\\r\\n\\t    \\tif(isAdd)\\r\\n\\t\\t    {\\r\\n\\t    \\t\\tvar caretPos = selectionStart + newContent.length;\\r\\n\\t    \\t\\tthis.util.caretPosition(textBox,caretPos);\\r\\n\\t\\t    }\\r\\n\\t    \\tif(fireEvent)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tif(this.__oldValue != value)\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tif(!this.__typing)\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tthis.util.triggerEvent(textBox,\\\"change\\\");\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t\\tvar item = {oldValue:this.__oldValue,newValue:value};\\r\\n\\t    \\t\\t\\tthis.__dispatchEvent(NSNumericTextBox.VALUE_CHANGED,item,item);\\r\\n\\t    \\t\\t\\tthis.__oldValue = value;\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tconsole.debug(\\\"Invalid Value\\\");\\r\\n\\t\\t}\\r\\n\\t\\tthis.__typing = false;\\r\\n\\t\\treturn isValid;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__spin = function(steps) \\r\\n\\t{\\r\\n\\t\\tvar textBox = this.__config.input;\\r\\n\\t\\tif(this.__getActiveElement() != textBox)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__textBoxParentEventHandler(true,null);\\r\\n\\t\\t\\tthis.__focusHandler();\\r\\n\\t\\t\\ttextBox.focus();\\r\\n\\t\\t}\\r\\n\\t\\tvar currentValue = Number(this.__currentValue);\\r\\n\\t\\tvar presentValue = currentValue;\\r\\n\\t\\tvar decimals = Math.abs(this.__config.decimals);\\r\\n\\t\\tvar newValue = (currentValue + steps).toFixed(decimals);\\r\\n\\t\\tthis.__updateValue(newValue,false,true);\\r\\n\\t\\tnewValue = currentValue;\\r\\n\\t\\tif(presentValue !== newValue) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = {oldValue:presentValue,newValue:newValue};\\r\\n\\t\\t\\tthis.__dispatchEvent(NSNumericTextBox.SPIN,item,item);\\r\\n        }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__addTextBoxEvents = function()\\r\\n\\t{\\r\\n\\t\\tvar textBox = this.__config.input;\\r\\n\\t\\tif(!this.__keyDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__keyDownRef = this.__keyDownHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(textBox,\\\"keydown\\\",this.__keyDownRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__keyPressRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__keyPressRef = this.__keyPressHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(textBox,\\\"keypress\\\",this.__keyPressRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__focusRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__focusRef = this.__focusHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(textBox,\\\"focus\\\",this.__focusRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__blurRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__blurRef = this.__blurHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(textBox,\\\"blur\\\",this.__blurRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__pasteRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__pasteRef = this.__pasteHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(textBox,\\\"paste\\\",this.__pasteRef);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__removeTextBoxEvents = function()\\r\\n\\t{\\r\\n\\t\\tvar textBox = this.__config.input;\\r\\n\\t\\tif(this.__keyDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(textBox,\\\"keydown\\\",this.__keyDownRef);\\r\\n\\t\\t\\tthis.__keyDownRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__keyPressRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(textBox,\\\"keypress\\\",this.__keyPressRef);\\r\\n\\t\\t\\tthis.__keyPressRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__focusRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(textBox,\\\"focus\\\",this.__focusRef);\\r\\n\\t\\t\\tthis.__focusRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__blurRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(textBox,\\\"blur\\\",this.__blurRef);\\r\\n\\t\\t\\tthis.__blurRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__pasteRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addEvent(textBox,\\\"paste\\\",this.__pasteRef);\\r\\n\\t\\t\\tthis.__pasteRef = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__getNumericRegex = function()\\r\\n\\t{\\r\\n\\t\\tvar decimals = Math.abs(this.__config.decimals);\\r\\n\\t\\tvar decimalSeparator = this.__config.decimalSeparator;\\r\\n\\t\\tvar decimalRegex = '*';\\r\\n\\t\\tif (decimalSeparator === \\\".\\\") \\r\\n\\t\\t{\\r\\n\\t\\t\\tdecimalSeparator = '\\\\\\\\' + decimalSeparator;\\r\\n        }\\r\\n\\t\\tif(decimals == 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn new RegExp(\\\"^(-)?(\\\\\\\\d*)$\\\");\\r\\n\\t\\t}\\r\\n\\t\\tdecimalRegex = '{0,' + decimals + '}';\\r\\n\\t\\t//return new RegExp(\\\"^[0-9]+([\\\" + decimalSeparator + \\\"][0-9]{1,\\\" + decimals + \\\"})?$\\\");\\r\\n\\t\\treturn new RegExp('^(-)?(((\\\\\\\\d+(' + decimalSeparator + '\\\\\\\\d' + decimalRegex + ')?)|(' + decimalSeparator + '\\\\\\\\d' + decimalRegex + ')))?$');\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__setFormattedValue = function(value)\\r\\n\\t{\\r\\n\\t\\tvalue = this.util.isUndefinedOrNull(value) ? this.__currentValue : value;\\r\\n\\t\\tvar textBox = this.__config.input;\\r\\n\\t\\tif(this.util.isUndefinedOrNull(value) || value == \\\"\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tvalue = \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvalue = this.__getFormattedValue(value);\\r\\n\\t\\t}\\r\\n\\t\\ttextBox.value = value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__getFormattedValue = function(value)\\r\\n\\t{\\r\\n\\t\\tvar type = this.__config.type;\\r\\n\\t\\tvar retValue = \\\"\\\";\\r\\n\\t\\tvalue = this.__getUnFormattedNumber(value);\\r\\n\\t\\tif(type == \\\"custom\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar format = this.__config.format;\\r\\n\\t\\t\\tif(format)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = this.__getCustomFormattedNumber(value.toString(),format);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSNumericTextBox\\\",\\\"Format is not valid\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar formattedValue = this.__getFormattedNumber(value);\\r\\n\\t\\t\\tvar objType = this.__objType[type];\\r\\n\\t\\t\\tvar format = this.__checkFormat(objType.format);\\r\\n\\t\\t\\tretValue = format.replace('%s', this.__getRenderedChar(objType.symbol)).replace('%v',formattedValue);\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__getCustomFormattedNumber = function(value,format)\\r\\n\\t{\\r\\n\\t\\tvar retValue = format;\\r\\n\\t\\tvar specifier = this.__config.customFormatSpecifier;\\r\\n\\t\\tfor(var count = 0,index = 0;count <= format.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cha = format.charAt(count);\\r\\n\\t\\t\\tif(value.length > index)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(cha == specifier)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue = this.__replaceCharAt(retValue,count,value[index]);\\r\\n\\t\\t\\t\\t\\tindex++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tretValue = retValue.split(specifier).join(\\\"\\\");\\r\\n\\t\\tvar lastIndex = format.lastIndexOf(specifier);\\r\\n\\t\\tvar lastStr = format.substring(lastIndex + 1,format.length);\\r\\n\\t\\tvar index = retValue.length - 1;\\r\\n\\t\\twhile(!this.__isNumeric(retValue.charAt(index)) && index > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = retValue.substring(0,index);\\r\\n\\t\\t\\tindex--;\\r\\n\\t\\t}\\r\\n\\t\\treturn (retValue + lastStr);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__getFormattedNumber = function(value)\\r\\n\\t{\\r\\n\\t\\tvar retValue = value;\\r\\n\\t\\ttry\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar decimals = Math.abs(this.__config.decimals);\\r\\n\\t\\t\\tvar decimalSeparator = this.__config.decimalSeparator;\\r\\n\\t\\t\\tif(value.toString().indexOf(\\\"e\\\") > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = this.__round(+value,decimals);\\r\\n\\t\\t\\t\\tretValue = retValue.replace(\\\".\\\",decimalSeparator);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar thousandSeparator = this.__config.thousandSeparator;\\r\\n\\t\\t\\t\\tvar grouping = Math.abs(this.__config.grouping);\\r\\n\\t\\t\\t\\tvar negativeSign = \\\"\\\";\\r\\n\\t\\t\\t\\tif(value < 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tnegativeSign = \\\"-\\\";\\r\\n\\t\\t\\t\\t\\tvalue = (-1 * value);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar wholePart = parseInt(value = Math.abs(Number(value) || 0).toFixed(decimals)).toString();\\r\\n\\t\\t\\t    var groupingMod = (wholePart.length > grouping) ? wholePart.length % grouping : 0;\\r\\n\\t\\t\\t    var regex = new RegExp(\\\"(\\\\\\\\d{\\\" + grouping + \\\"})(?=\\\\\\\\d)\\\",\\\"g\\\");\\r\\n\\t\\t\\t    \\r\\n\\t\\t\\t    var firstWholePart = (groupingMod ? wholePart.substr(0, groupingMod) + thousandSeparator : '');\\r\\n\\t\\t\\t\\tvar restWholePart = wholePart.substr(groupingMod).replace(regex, \\\"$1\\\" + thousandSeparator);\\r\\n\\t\\t\\t\\tvar decimalPart = \\\"\\\";\\r\\n\\t\\t\\t\\tif (decimals > 0) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdecimalPart = decimalSeparator + Math.abs(value - wholePart).toFixed(decimals).slice(2);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t    retValue = negativeSign + firstWholePart + restWholePart + decimalPart;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tcatch(error)\\r\\n\\t\\t{\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__getUnFormattedNumber = function(value)\\r\\n\\t{\\r\\n\\t\\tif(typeof value === \\\"number\\\") \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn value;\\r\\n\\t\\t}\\r\\n\\t\\tvar decimalSeparator = this.__config.decimalSeparator;\\r\\n\\t\\tvar regex = new RegExp(\\\"[^0-9-\\\" + decimalSeparator + \\\"]\\\", [\\\"g\\\"]);\\r\\n\\t\\tvar retValue = parseFloat(\\r\\n\\t\\t\\t\\t(\\\"\\\" + value)\\r\\n\\t\\t\\t\\t.replace(/\\\\((?=\\\\d+)(.*)\\\\)/, \\\"-$1\\\") // replace bracketed values with negatives\\r\\n\\t\\t\\t\\t.replace(regex, '')         // strip out any cruft\\r\\n\\t\\t\\t\\t.replace(decimalSeparator, '.')      // make sure decimal point is standard\\r\\n\\t\\t\\t);\\r\\n\\t\\treturn !isNaN(retValue) ? retValue : 0;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__checkFormat = function(format)\\r\\n\\t{\\r\\n\\t\\tvar retItem = {};\\r\\n\\t\\tif(typeof format === \\\"function\\\" ) \\r\\n\\t\\t{\\r\\n\\t\\t\\tformat = format();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isString(format) && format.match(\\\"%v\\\")) \\r\\n\\t\\t{\\r\\n\\t\\t\\tretItem = format;\\r\\n\\t\\t}\\r\\n\\t\\telse if(!format  || !format.match(\\\"%v\\\")) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.throwNSError(\\\"NSNumericTextBox\\\",\\\"Format is not valid\\\");\\r\\n\\t\\t}\\r\\n\\t\\treturn retItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__getRangeValue = function(value,presentValue) \\r\\n\\t{\\r\\n\\t\\tvar decimalSeparator = this.__config.decimalSeparator;\\r\\n\\t\\tvalue = value.toString();\\r\\n\\t\\tif(value.indexOf(decimalSeparator) == value.length - 1)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn value;\\r\\n\\t\\t}\\r\\n\\t\\tvar decimalPart = \\\"\\\";\\r\\n\\t\\tif(value.indexOf(decimalSeparator) > -1 && Number(value).toString().indexOf(decimalSeparator) == -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdecimalPart = decimalSeparator + value.split(decimalSeparator)[1];\\r\\n\\t\\t}\\r\\n\\t\\tvalue = Number(value);\\r\\n\\t\\tthis.__validateMinMax();\\r\\n\\t\\tvar min = this.__config.min;\\r\\n    \\tvar max = this.__config.max;\\r\\n    \\tvar retValue = null;\\r\\n    \\tif(this.__config.enableRangeRoundOf)\\r\\n    \\t{\\r\\n    \\t\\tretValue = value > max ? max : value < min ? min : (value + decimalPart);\\r\\n    \\t}\\r\\n    \\telse\\r\\n    \\t{\\r\\n    \\t\\tretValue = value > max ? presentValue : value < min ? presentValue : (value + decimalPart);\\r\\n    \\t}\\r\\n        return retValue;\\r\\n    };\\r\\n    \\r\\n    NSNumericTextBox.prototype.__validateMinMax = function() \\r\\n\\t{\\r\\n    \\tvar min = this.__config.min;\\r\\n    \\tvar max = this.__config.max;\\r\\n    \\tvar type = this.__config.type;\\r\\n    \\tif(!this.util.isNumber(min) || isNaN(min))\\r\\n    \\t{\\r\\n    \\t\\tmin = -Number.MAX_VALUE;\\r\\n    \\t}\\r\\n    \\tif(!this.util.isNumber(max) || isNaN(max))\\r\\n    \\t{\\r\\n    \\t\\tmax = Number.MAX_VALUE;\\r\\n    \\t}\\r\\n    \\tif(type == \\\"custom\\\")\\r\\n\\t\\t{\\r\\n    \\t\\tvar format = this.__config.format;\\r\\n\\t\\t\\tif(format)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar maxValue = \\\"\\\";\\r\\n\\t\\t\\t\\tvar specifier = this.__config.customFormatSpecifier;\\r\\n\\t\\t\\t\\tvar length = (format.match(new RegExp(specifier,\\\"g\\\")||[])).length;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tmaxValue = maxValue + \\\"9\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tmaxValue = Number(maxValue);\\r\\n\\t\\t\\t\\tconsole.log(maxValue);\\r\\n\\t\\t\\t\\tif(max > maxValue)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tmax = maxValue;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(min < 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tmin = 0;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n    \\tmin = (min > max) ? max : min;\\r\\n    \\tthis.__config.min = min;\\r\\n    \\tthis.__config.max = max;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__applyCustomClass = function(element,type)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.customClass && element && type)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar itemProperty = {\\\"outerContainer\\\":{property:\\\"outerContainer\\\",defaultValue:null},\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\\"textBoxContainer\\\":{property:\\\"textBoxContainer\\\",defaultValue:null},\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\\"spinContainer\\\":{property:\\\"spinContainer\\\",defaultValue:null},\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\\"spinIncrement\\\":{property:\\\"spinIncrement\\\",defaultValue:null},\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\\"spinDecrement\\\":{property:\\\"spinDecrement\\\",defaultValue:null},\\r\\n\\t\\t\\t\\t\\t\\t\\t   };\\r\\n\\t\\t\\tif(itemProperty[type])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__config.customClass[itemProperty[type][\\\"property\\\"]])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(element,this.__config.customClass[itemProperty[type][\\\"property\\\"]]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(itemProperty[type][\\\"defaultValue\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(element,itemProperty[type][\\\"defaultValue\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__getRenderedChar = function(str) \\r\\n\\t{\\r\\n\\t\\t/*var div = document.createElement(\\\"div\\\");\\r\\n\\t\\tdiv.innerHTML = str;\\r\\n\\t\\treturn div.innerHTML;*/\\r\\n\\t\\treturn str;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__round = function(value,precision,negative) \\r\\n\\t{\\r\\n\\t\\t precision = precision || 0;\\r\\n         value = value.toString().split(\\\"e\\\");\\r\\n         value = Math.round(+(value[0] + \\\"e\\\" + (value[1] ? +value[1] + precision : precision)));\\r\\n         if (negative) \\r\\n         {\\r\\n             value = -value;\\r\\n         }\\r\\n         value = value.toString().split(\\\"e\\\");\\r\\n         value = +(value[0] + \\\"e\\\" + (value[1] ? +value[1] - precision : -precision));\\r\\n         return value.toFixed(Math.min(precision, 20));\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__replaceCharAt = function(str,index,replace) \\r\\n\\t{\\r\\n\\t\\treturn str.substring(0,index) + replace + str.substring(index + 1);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__isNumeric = function(str) \\r\\n\\t{\\r\\n\\t\\treturn /^\\\\d+$/.test(str);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__dispatchEvent = function(eventType,data,param,bubbles,cancelable)\\r\\n\\t{\\r\\n\\t\\t/*if(this.__eventDispatcher)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__eventDispatcher(eventType,data,param,bubbles,cancelable);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{*/\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__config.input,eventType,data,param,bubbles,cancelable);\\r\\n\\t\\t//}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__getActiveElement = function() \\r\\n\\t{\\r\\n        try \\r\\n        {\\r\\n            return document.activeElement;\\r\\n        } \\r\\n        catch (error) \\r\\n        {\\r\\n            return document.documentElement.activeElement;\\r\\n        }\\r\\n    };\\r\\n    \\r\\n    NSNumericTextBox.prototype.__setDisabledOrReadonly = function() \\r\\n\\t{\\r\\n    \\tvar textBox = this.__config.input;\\r\\n    \\tvar disabled = this.__isDisabled();\\r\\n    \\tif(disabled)\\r\\n    \\t{\\r\\n    \\t\\tthis.util.addStyleClass(this.__spanContainer,\\\"nsNumericTextBoxContainerDisabled\\\");\\r\\n    \\t}\\r\\n    \\telse\\r\\n    \\t{\\r\\n    \\t\\tthis.util.removeStyleClass(this.__spanContainer,\\\"nsNumericTextBoxContainerDisabled\\\");\\r\\n    \\t}\\r\\n    \\tif(!this.__observer)\\r\\n    \\t{\\r\\n    \\t\\tvar self = this;\\r\\n    \\t\\tvar MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;\\r\\n    \\t\\tthis.__observer = new MutationObserver(function(mutations) \\r\\n    \\t\\t{\\r\\n    \\t\\t    mutations.forEach(function(mutation) \\r\\n    \\t\\t    {\\r\\n    \\t\\t    \\tif(mutation.type == \\\"attributes\\\") \\r\\n    \\t\\t    \\t{\\r\\n    \\t\\t    \\t\\tvar attributeName = mutation.attributeName;\\r\\n    \\t\\t    \\t\\tif(attributeName.toLowerCase() == \\\"disabled\\\" || attributeName.toLowerCase() == \\\"readonly\\\")\\r\\n    \\t\\t    \\t\\t{\\r\\n    \\t\\t    \\t\\t\\tself.__setDisabledOrReadonly();\\r\\n    \\t\\t    \\t\\t}\\r\\n    \\t\\t    \\t}\\r\\n    \\t\\t    });\\r\\n    \\t\\t});\\r\\n    \\t\\tvar config = {attributes: true,childList:false,characterData: false};\\r\\n    \\t\\tthis.__observer.observe(textBox,config);\\r\\n    \\t}\\r\\n\\t};\\r\\n    \\r\\n    NSNumericTextBox.prototype.__isDisabled = function() \\r\\n\\t{\\r\\n    \\tvar textBox = this.__config.input;\\r\\n    \\tif(textBox.disabled || textBox.readOnly)\\r\\n    \\t{\\r\\n    \\t\\treturn true;\\r\\n    \\t}\\r\\n    \\tvar fieldSet = this.util.findParent(textBox,\\\"fieldset\\\");\\r\\n    \\tif(fieldSet && fieldSet.disabled)\\r\\n    \\t{\\r\\n    \\t\\treturn true;\\r\\n    \\t}\\r\\n    \\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.prototype.__getID = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__id)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.input.hasAttribute(\\\"id\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = this.__config.input.getAttribute(\\\"id\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__config.input.hasAttribute(\\\"name\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = this.__config.input.getAttribute(\\\"name\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = \\\"comp\\\" + this.util.getUniqueId();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__id;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNumericTextBox.SPIN = \\\"spin\\\";\\r\\n\\tNSNumericTextBox.VALUE_CHANGED = \\\"valueChanged\\\";\\r\\n\\t\\r\\n\\treturn NSNumericTextBox;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSNumericTextBox\\\",NSNumericTextBox);\";","export const NSPaginationCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\nvar svgRef = require('./nsSVG.min.js');\\r\\nvar NSSvg = svgRef.NSSvg;\\r\\nvar NSSvgShapes = svgRef.NSSvgShapes;\\r\\nvar plugginsRef = require('./nsPluggins.min.js');\\r\\nvar nsTextEditor = plugginsRef.nsTextEditor;\\r\\nvar nsTextAreaEditor = plugginsRef.nsTextAreaEditor;\\r\\nvar NSCellSelection = plugginsRef.NSCellSelection;\\r\\nvar NSTableCellNavigator = plugginsRef.NSTableCellNavigator;\\r\\nvar dateutilRef = require('./nsDateUtil.min.js');\\r\\nvar NSDateUtil = dateutilRef.NSDateUtil;\\r\\n\\r\\n\\t\\t}\\r\\n \\\"use strict\\\";\\r\\nvar NSPagination = (function()\\r\\n{\\r\\n\\tfunction NSPagination(setting) \\r\\n\\t{\\r\\n\\t\\tthis.PAGE_CLICK = \\\"pageClick\\\";\\r\\n\\t\\tthis.PAGE_CHANGE = \\\"pageChange\\\";\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\t\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__id = null;\\r\\n\\t\\tthis.__container = null;\\r\\n\\t\\tthis.__itemFirst = null;\\r\\n\\t\\tthis.__itemLast = null;\\r\\n\\t\\tthis.__itemPrev = null;\\r\\n\\t\\tthis.__itemNext = null;\\r\\n\\t\\tthis.__arrItemPage = [];\\r\\n\\t\\tthis.__pageCount = 0;\\r\\n\\t\\tthis.__selectedPage = -1;\\r\\n\\t\\tthis.__initialize();\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSPagination.prototype.__initialize = function ()\\r\\n\\t{\\r\\n\\t\\tif(this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\tparent: this.__setting[\\\"parent\\\"] || null,\\r\\n\\t\\t\\t\\t\\ttotalRecords: parseInt(this.__setting[\\\"totalRecords\\\"]) || 0,\\r\\n\\t\\t\\t\\t\\tpageSize: parseInt(this.__setting[\\\"pageSize\\\"]) || 0,\\r\\n\\t\\t\\t\\t\\ttotalPageCount: parseInt(this.__setting[\\\"totalPageCount\\\"]) || 0,\\r\\n\\t\\t\\t\\t\\tvisiblePages: parseInt(this.__setting[\\\"visiblePages\\\"]) || 5,\\r\\n\\t\\t\\t\\t\\tcontainerStyle: this.__setting[\\\"containerStyle\\\"] || \\\"nsPaginationContainer\\\",\\r\\n\\t\\t\\t\\t\\tactiveStyle: this.__setting[\\\"activeStyle\\\"] || \\\"nsPageActive\\\",\\r\\n\\t\\t\\t\\t\\tdisabledStyle: this.__setting[\\\"disabledStyle\\\"] || \\\"nsPageDisabled\\\",\\r\\n\\t\\t\\t\\t\\ttextFirst : this.__setting[\\\"textFirst\\\"] || \\\"&laquo;\\\",\\r\\n\\t\\t\\t\\t\\ttextLast : this.__setting[\\\"textLast\\\"] || \\\"&raquo;\\\",\\r\\n\\t\\t\\t\\t\\ttextNext : this.__setting[\\\"textNext\\\"] || \\\"&rsaquo;\\\",\\r\\n\\t\\t\\t\\t\\ttextPrev : this.__setting[\\\"textPrev\\\"] || \\\"&lsaquo;\\\",\\r\\n\\t\\t\\t\\t\\ttextTitlePagePrefix: this.__setting[\\\"textTitlePagePrefix\\\"] || \\\"Page\\\",\\r\\n\\t\\t\\t        textTitleFirst : this.__setting[\\\"textTitleFirst\\\"] || 'First Page', \\r\\n\\t\\t\\t        textTitleLast : this.__setting[\\\"textTitleLast\\\"] || 'Last Page',\\r\\n\\t\\t\\t        textTitleNext : this.__setting[\\\"textTitleNext\\\"] || 'Next Page', \\r\\n\\t\\t\\t        textTitlePrev : this.__setting[\\\"textTitlePrev\\\"] || 'Previous Page', \\r\\n\\t\\t\\t\\t\\tshowPrevNext : (!this.util.isUndefined(this.__setting[\\\"showPrevNext\\\"]) && this.__setting[\\\"showPrevNext\\\"] != null) ? Boolean.parse(this.__setting[\\\"showPrevNext\\\"]) : true,\\r\\n\\t\\t\\t\\t\\tshowFirstLast : (!this.util.isUndefined(this.__setting[\\\"showFirstLast\\\"]) && this.__setting[\\\"showFirstLast\\\"] != null) ? Boolean.parse(this.__setting[\\\"showFirstLast\\\"]) : false\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\tthis.__create();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.changePageSize = function(pageSize)\\r\\n\\t{\\r\\n\\t\\tif(pageSize > 0 && this.__config)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.pageSize = pageSize;\\r\\n\\t\\t\\tthis.__create();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.setSelectedPage = function(pageNumber)\\r\\n\\t{\\r\\n\\t\\tthis.__update(pageNumber);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.getSelectedPage = function(pageNumber)\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedPage;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__create = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__config.parent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__container)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__container.parentNode.removeChild(this.__container);\\r\\n\\t\\t\\t\\tthis.__arrItemPage = [];\\r\\n\\t\\t\\t\\tthis.__selectedPage = -1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__config.totalPageCount > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__pageCount = this.__config.totalPageCount;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__config.pageSize > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__pageCount =  Math.ceil(this.__config.totalRecords / this.__config.pageSize);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__container = this.util.createElement(\\\"ul\\\",this.__getID() + \\\"container\\\",this.__config.containerStyle);\\r\\n\\t\\t\\tthis.__config.parent.appendChild(this.__container);\\r\\n\\t\\t\\tif(this.__config.showFirstLast)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__itemFirst = this.__createItem(\\\"-4\\\",this.__config[\\\"textFirst\\\"],this.__config.textTitleFirst,this.__controlItemClickHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__config.showPrevNext)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__itemPrev = this.__createItem(\\\"-3\\\",this.__config[\\\"textPrev\\\"],this.__config.textTitlePrev,this.__controlItemClickHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar createdNumber = Math.min(this.__pageCount,this.__config.visiblePages);\\r\\n\\t\\t\\tfor(var count = 1;count <= createdNumber;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar pageItem = this.__createItem(count,count,this.__config.textTitlePagePrefix + \\\" \\\" + count,this.__pageItemClickHandler);\\r\\n\\t\\t\\t\\tthis.__arrItemPage.push(pageItem);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__config.showPrevNext)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__itemNext = this.__createItem(\\\"-2\\\",this.__config[\\\"textNext\\\"],this.__config.textTitleNext,this.__controlItemClickHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__config.showFirstLast)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__itemLast = this.__createItem(\\\"-1\\\",this.__config[\\\"textLast\\\"],this.__config.textTitleLast,this.__controlItemClickHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//this.__selectPage(1);\\r\\n\\t\\t\\tthis.__updateControlState(1);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__controlItemClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"li\\\");\\r\\n\\t\\tvar index = parseInt(target.getAttribute(\\\"pageNum\\\"));\\r\\n\\t\\tvar pageSelected = -1;\\r\\n\\t\\tswitch(index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcase -4:\\r\\n\\t\\t\\t\\tpageSelected = 1;\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase -3:\\r\\n\\t\\t\\t\\tpageSelected = this.__selectedPage - 1;\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase -2:\\r\\n\\t\\t\\t\\tpageSelected = this.__selectedPage + 1;\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase -1:\\r\\n\\t\\t\\t\\tpageSelected = this.__pageCount;\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__update(pageSelected);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__pageItemClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"li\\\");\\r\\n\\t\\tvar index = parseInt(target.getAttribute(\\\"pageNum\\\"));\\r\\n\\t\\tthis.__update(index);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__createItem = function(pageNumber,htmlText,titleText,clickHandler)\\r\\n\\t{\\r\\n\\t\\tvar pageItem = this.util.createElement(\\\"li\\\",this.__getID() + \\\"Page\\\" + pageNumber,null);\\r\\n\\t\\tpageItem.setAttribute(\\\"pageNum\\\",pageNumber);\\r\\n\\t\\tpageItem.setAttribute(\\\"title\\\",titleText);\\r\\n\\t\\tthis.util.addEvent(pageItem,\\\"click\\\",clickHandler.bind(this));\\r\\n\\t\\tvar pageText = this.util.createElement(\\\"a\\\",null,null);\\r\\n\\t\\tpageText.setAttribute(\\\"href\\\",\\\"javascript:void(0);\\\");\\r\\n\\t\\tpageText.innerHTML = htmlText;\\r\\n\\t\\tpageItem.appendChild(pageText);\\r\\n\\t\\tthis.__container.appendChild(pageItem);\\r\\n\\t\\treturn pageItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__update = function(pageNumber)\\r\\n\\t{\\r\\n\\t\\tif(pageNumber <= 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tpageNumber = 1;\\r\\n\\t\\t}\\r\\n\\t\\telse if(pageNumber > this.__pageCount)\\r\\n\\t\\t{\\r\\n\\t\\t\\tpageNumber = this.__pageCount;\\r\\n\\t\\t}\\r\\n\\t\\tvar range = this.__calculateRange(this.__pageCount,Math.min(this.__pageCount,this.__config.visiblePages),pageNumber);\\r\\n\\t\\tthis.__updateItem(range[0],range[1]);\\r\\n\\t\\tthis.__selectPage(pageNumber);\\r\\n\\t\\tthis.__updateControlState(pageNumber);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__updateItem = function(fromPage,toPage)\\r\\n\\t{\\r\\n\\t\\tvar firstNumber = parseInt(this.__arrItemPage[0].getAttribute(\\\"pageNum\\\"));\\r\\n\\t\\tvar lastNumber = parseInt(this.__arrItemPage[this.__arrItemPage.length - 1].getAttribute(\\\"pageNum\\\"));\\r\\n\\t\\tif(!(firstNumber === fromPage && lastNumber === toPage))\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < this.__arrItemPage.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar pageItem = this.__arrItemPage[count];\\r\\n\\t\\t\\t\\tvar index = count + fromPage;\\r\\n\\t\\t\\t\\tpageItem.setAttribute(\\\"pageNum\\\",index);\\r\\n\\t\\t\\t\\tpageItem.setAttribute(\\\"title\\\",this.__config.textTitlePagePrefix + \\\" \\\" + index);\\r\\n\\t\\t\\t\\tvar pageText = pageItem.firstChild;\\r\\n\\t\\t\\t\\tpageText.innerHTML = index;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__updateControlState = function(pageNumber)\\r\\n\\t{\\r\\n\\t\\tif(pageNumber === 1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__itemFirst ? this.util.addStyleClass(this.__itemFirst,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t\\tthis.__itemPrev ? this.util.addStyleClass(this.__itemPrev,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__itemFirst ? this.util.removeStyleClass(this.__itemFirst,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t\\tthis.__itemPrev ? this.util.removeStyleClass(this.__itemPrev,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t\\tif(pageNumber === this.__pageCount)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__itemNext ? this.util.addStyleClass(this.__itemNext,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t\\tthis.__itemLast ? this.util.addStyleClass(this.__itemLast,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__itemNext ? this.util.removeStyleClass(this.__itemNext,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t\\tthis.__itemLast ? this.util.removeStyleClass(this.__itemLast,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__calculateRange = function(totalPages,visiblePages,pageToBeSelected)\\r\\n\\t{\\r\\n\\t\\tvar renderPage = [1,totalPages];\\r\\n\\t\\tvar limit = Math.floor(visiblePages/2);\\r\\n\\t\\tif(visiblePages > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\trenderPage[0] = Math.max(pageToBeSelected - limit, 1);\\r\\n\\t\\t\\trenderPage[1] = Math.min(pageToBeSelected + limit, totalPages);\\r\\n\\t\\t\\tvar difference = renderPage[1] - renderPage[0];\\r\\n\\t\\t\\tif(renderPage[0] === 1 && difference < visiblePages)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trenderPage[1] = visiblePages;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(renderPage[1] === totalPages && difference < visiblePages)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trenderPage[0] = renderPage[1] - visiblePages + 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn renderPage;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__selectPage = function(pageIndex)\\r\\n\\t{\\r\\n\\t\\tvar selectedIndex = -1;\\r\\n\\t\\tfor(var count = 0;count < this.__arrItemPage.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar pageItem = this.__arrItemPage[count];\\r\\n\\t\\t\\tthis.util.removeStyleClass(pageItem,this.__config.activeStyle);\\r\\n\\t\\t\\tvar index = parseInt(pageItem.getAttribute(\\\"pageNum\\\"));\\r\\n\\t\\t\\tif(index === pageIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tselectedIndex = count;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(selectedIndex > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar oldPage = this.__selectedPage;\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__arrItemPage[selectedIndex],this.__config.activeStyle);\\r\\n\\t\\t\\tthis.__selectedPage = pageIndex;\\r\\n\\t\\t\\tvar fromRecord =  (pageIndex - 1) * this.__config.pageSize;\\r\\n\\t\\t\\tvar toRecord = fromRecord +  this.__config.pageSize - 1;\\r\\n\\t\\t\\ttoRecord = (toRecord < this.__config.totalRecords) ? toRecord : ((toRecord === this.__config.totalRecords) ? this.__config.totalRecords - 1 : this.__config.totalRecords);\\r\\n\\t\\t\\tvar item = {oldIndex:oldPage,newIndex:this.__selectedPage,fromRecord:fromRecord,toRecord:toRecord};\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__config.parent,this.PAGE_CLICK,item,item);\\r\\n\\t\\t\\tif(oldPage !== this.__selectedPage)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.__config.parent,this.PAGE_CHANGE,item,item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__getID = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__id)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.parent.hasAttribute(\\\"id\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = this.__config.parent.getAttribute(\\\"id\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__config.parent.hasAttribute(\\\"name\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = this.__config.parent.getAttribute(\\\"name\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = \\\"comp\\\" + this.util.getUniqueId();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__id;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSPagination;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSPagination\\\",NSPagination);\\r\\n\";","export const NSProgressBarCode = \"var nsModal = Object.create(nsContainerBase);\\r\\n\\r\\nnsModal.initializeComponent = function() \\r\\n{\\r\\n\\tthis.base.initializeComponent();\\r\\n\\tthis.__isTitleAllowed = true;\\r\\n\\tthis.__isCloseAllowed = true;\\r\\n\\t\\r\\n\\tthis.__divFade = null;\\r\\n\\tthis.__divPopUp = null;\\r\\n\\tthis.__divTitleBar = null;\\r\\n\\tthis.__titleStyle = \\\"nsModalTitleBar\\\";\\r\\n\\tthis.__closeButtonStyle = \\\"nsModalCloseButton\\\";\\r\\n\\tthis.__dragMouseX;\\r\\n    this.__dragMouseY;\\r\\n    this.__dragMove = false;\\r\\n    this.__dragCurrentX = 0;\\r\\n    this.__dragCurrentY = 0;\\r\\n    \\r\\n    this.__titleBarMouseOverRef = null;\\r\\n    this.__titleBarMouseDownRef = null;\\r\\n    this.__overlayMouseUpRef = null;\\r\\n    this.__overlayMouseMoveRef = null;\\r\\n    this.__onkeydownRef = null;\\r\\n};\\r\\n\\r\\nnsModal.setComponentProperties = function() \\r\\n{\\r\\n\\tthis.base.setComponentProperties();\\r\\n};\\r\\n\\r\\nnsModal.propertyChange = function(attrName, oldVal, newVal, setProperty) \\r\\n{\\r\\n\\tthis.base.propertyChange(attrName, oldVal, newVal, setProperty);\\r\\n};\\r\\n\\r\\nnsModal.removeComponent = function() \\r\\n{\\r\\n\\tif(this.__overlayMouseUpRef)\\r\\n\\t{\\r\\n\\t\\tthis.util.removeEvent(document,\\\"mouseup\\\",this.__overlayMouseUpRef);\\r\\n\\t\\tthis.__overlayMouseUpRef = null;\\r\\n\\t}\\r\\n\\tif(this.__overlayMouseMoveRef)\\r\\n\\t{\\r\\n\\t\\tthis.util.removeEvent(document,\\\"mousemove\\\",this.__overlayMouseMoveRef);\\r\\n\\t\\tthis.__overlayMouseMoveRef = null;\\r\\n\\t}\\r\\n\\tif(this.__onkeydownRef)\\r\\n\\t{\\r\\n\\t\\tthis.util.removeEvent(document,\\\"keydown\\\",this.__onkeydownRef);\\r\\n\\t\\tthis.__onkeydownRef = null;\\r\\n\\t}\\r\\n\\tthis.base.removeComponent();\\r\\n};\\r\\n\\r\\n\\r\\n\\r\\nnsModal.showModal = function(childComponent,title,isTitleRequired,isCloseRequired,isFadeCloseRequired,isDragable)\\r\\n{\\r\\n\\tthis.__isTitleAllowed = isTitleRequired;\\r\\n\\tthis.__isCloseAllowed = isCloseRequired;\\r\\n\\tif(!this.__divFade)\\r\\n\\t{\\r\\n\\t\\tthis.__createFade(isFadeCloseRequired);\\r\\n\\t}\\r\\n\\tif(!this.__divPopUp)\\r\\n\\t{\\r\\n\\t\\tthis.__createPopUp(title,childComponent,isDragable);\\r\\n\\t}\\r\\n\\tif(this.__isCloseAllowed)\\r\\n\\t{\\r\\n\\t\\t//To detect escape button\\r\\n\\t\\tthis.__onkeydownRef = this.__onkeydown.bind(this);\\r\\n\\t\\tthis.util.addEvent(document,\\\"keydown\\\",this.__onkeydownRef);\\r\\n\\t}\\r\\n\\t\\r\\n\\tthis.__setModalVisibility(true);\\r\\n};\\r\\n\\r\\nnsModal.hideModal = function ()\\r\\n{\\r\\n\\tthis.__setModalVisibility(false);\\r\\n};\\r\\n\\r\\nnsModal.closeModal = function ()\\r\\n{\\r\\n\\tthis.removeModal();\\r\\n\\tthis.util.dispatchEvent(this,\\\"CLOSE\\\");\\r\\n};\\r\\n\\r\\nnsModal.removeModal = function ()\\r\\n{\\r\\n\\tthis.__removeFade();\\r\\n\\tthis.__removeOverlay();\\r\\n};\\r\\n\\r\\nnsModal.__onkeydown = function (event)\\r\\n{\\r\\n\\tevent = event || window.event;\\r\\n\\tif (event.keyCode == 27) \\r\\n\\t{\\r\\n\\t\\tthis.closeModal();\\r\\n\\t}\\r\\n};\\r\\n\\r\\nnsModal.__setModalVisibility = function (isVisible)\\r\\n{\\r\\n\\tthis.__setFadeVisibility(isVisible);\\r\\n\\tthis.__setOverlayVisibility(isVisible);\\r\\n};\\r\\n\\r\\nnsModal.__createFade = function (isFadeCloseRequired)\\r\\n{\\r\\n\\tthis.__divFade = this.util.createDiv(\\\"divFade\\\");\\r\\n\\tthis.__divFade.style.display = \\\"none\\\";\\r\\n\\tthis.__divFade.style.position = \\\"absolute\\\";\\r\\n\\tthis.__divFade.style.left = \\\"0%\\\";\\r\\n\\tthis.__divFade.style.top = \\\"0%\\\";\\r\\n\\tthis.__divFade.style.backgroundColor = \\\"#000000\\\"; \\r\\n\\tthis.__divFade.style.opacity = \\\"0.7\\\";\\r\\n\\tthis.__divFade.style.filter = \\\"alpha(opacity=70)\\\"; // For Internet Explorer\\r\\n\\tthis.__divFade.style.width = \\\"100%\\\";\\r\\n\\tthis.__divFade.style.height = \\\"100%\\\";\\r\\n\\tthis.__divFade.style.zIndex = \\\"90\\\";\\r\\n\\tif(isFadeCloseRequired)\\r\\n\\t{\\r\\n\\t\\tvar btnFadeClose = this.__createFadeCloseButton();\\r\\n\\t\\tthis.__divFade.appendChild(btnFadeClose);\\r\\n\\t}\\r\\n\\tdocument.body.appendChild(this.__divFade);  \\r\\n};\\r\\n\\r\\nnsModal.__createFadeCloseButton = function ()\\r\\n{\\r\\n\\tvar btnFadeClose = this.__getCloseButton(\\\"bottomleft\\\");\\r\\n\\treturn btnFadeClose;\\r\\n};\\r\\n\\r\\nnsModal.__setFadeVisibility = function (isVisible)\\r\\n{\\r\\n\\tif(this.__divFade)\\r\\n\\t{\\r\\n\\t\\tthis.util.setDivVisibility(\\\"divFade\\\",isVisible);\\r\\n\\t}\\r\\n};\\r\\n\\r\\nnsModal.__removeFade = function ()\\r\\n{\\r\\n\\tthis.util.removeDiv(\\\"divFade\\\");\\r\\n\\tthis.__divFade = null;\\r\\n};\\r\\n\\r\\nnsModal.__createCloseButton = function ()\\r\\n{\\r\\n\\tvar btnClose = this.__getCloseButton(\\\"topleft\\\");\\r\\n\\tvar nsTip = new NSPinTip(btnClose, \\\"topleft\\\");\\r\\n\\treturn btnClose;\\r\\n};\\r\\n\\r\\nnsModal.__createTitleBar = function(title)\\r\\n{\\r\\n\\tthis.__divTitleBar = this.util.createDiv(\\\"divTitleBar\\\",this.__titleStyle);\\r\\n\\tthis.__divTitleBar.style.position = \\\"relative\\\";\\r\\n\\tthis.__divTitleBar.innerHTML = title;\\r\\n\\tif(this.__isCloseAllowed)\\r\\n\\t{\\r\\n\\t\\tvar btnClose = this.__createCloseButton();\\r\\n\\t\\tthis.__divTitleBar.appendChild(btnClose);  \\r\\n\\t}\\r\\n};\\r\\n\\r\\nnsModal.__createPopUp = function (title,childComponent,isDragable)\\r\\n{\\r\\n\\tthis.__divPopUp = this.util.createDiv(\\\"divOverlay\\\",\\\"nsModalPopUp\\\");\\r\\n\\tthis.__divPopUp.style.display = \\\"none\\\";\\r\\n\\tthis.__divPopUp.style.position = \\\"absolute\\\";\\r\\n\\tthis.__divPopUp.style.padding = \\\"0px\\\";\\r\\n\\tthis.__divPopUp.style.zIndex = \\\"99999\\\";\\r\\n\\tif(this.__isTitleAllowed)\\r\\n\\t{\\r\\n\\t\\tthis.__createTitleBar(title);\\r\\n\\t\\tthis.__divPopUp.appendChild(this.__divTitleBar);\\r\\n\\t}\\r\\n\\tif(childComponent)\\r\\n\\t{\\r\\n\\t\\tthis.__divPopUp.appendChild(childComponent);\\r\\n\\t}\\r\\n\\tdocument.body.appendChild(this.__divPopUp); \\r\\n\\tif(isDragable)\\r\\n\\t{\\r\\n\\t\\tthis.__addDragFeature();\\r\\n\\t}\\r\\n};\\r\\n\\r\\nnsModal.__setOverlayVisibility = function(isVisible)\\r\\n{\\r\\n\\tif(this.__divPopUp)\\r\\n\\t{\\r\\n\\t\\tthis.util.setDivVisibility(\\\"divOverlay\\\",isVisible);\\r\\n\\t}\\r\\n};\\r\\n\\r\\nnsModal.__removeOverlay = function ()\\r\\n{\\r\\n\\tthis.util.removeDiv(\\\"divOverlay\\\");\\r\\n\\tthis.__divPopUp = null;\\r\\n};\\r\\n\\r\\nnsModal.__addDragFeature = function ()\\r\\n{\\r\\n\\tif(this.__divTitleBar)\\r\\n\\t{\\r\\n\\t\\tthis.__titleBarMouseOverRef = this.__titleBarMouseOverHandler.bind(this);\\r\\n\\t    this.__titleBarMouseDownRef = this.__titleBarMouseDownHandler.bind(this);\\r\\n\\t    this.__overlayMouseUpRef = this.__overlayMouseUpHandler.bind(this);\\r\\n\\t    this.__overlayMouseMoveRef = this.__overlayMouseMoveHandler.bind(this);\\r\\n\\t\\t\\r\\n\\t\\tthis.util.addEvent(this.__divTitleBar,\\\"mouseover\\\",this.__titleBarMouseOverRef);\\r\\n\\t\\tthis.util.addEvent(this.__divTitleBar,\\\"mousedown\\\",this.__titleBarMouseDownRef);\\r\\n\\t\\tthis.util.addEvent(document,\\\"mouseup\\\",this.__overlayMouseUpRef);\\r\\n\\t\\tthis.util.addEvent(document,\\\"mousemove\\\",this.__overlayMouseMoveRef);\\r\\n\\t}\\r\\n};\\r\\n\\r\\nnsModal.__titleBarMouseOverHandler = function(event)\\r\\n{\\r\\n\\tif(this.__divTitleBar)\\r\\n\\t{\\r\\n\\t\\tthis.__divTitleBar.style.cursor = \\\"move\\\";\\r\\n\\t}\\r\\n};\\r\\n\\r\\nnsModal.__titleBarMouseDownHandler = function(event)\\r\\n{\\r\\n\\tevent = this.util.getEvent(event);\\r\\n\\tvar rect = this.__divPopUp.getBoundingClientRect();\\r\\n\\t//console.log(rect.top, rect.right, rect.bottom, rect.left);\\r\\n    this.__dragCurrentX = rect.left;\\r\\n    this.__dragCurrentY = rect.top;\\r\\n    this.__dragMove = true;\\r\\n    this.__dragMouseX = event.clientX;\\r\\n    this.__dragMouseY = event.clientY;\\r\\n};\\r\\n\\r\\nnsModal.__overlayMouseUpHandler = function (event)\\r\\n{\\r\\n\\tevent = this.util.getEvent(event);\\r\\n    this.__dragMove = false;\\r\\n};\\r\\n\\r\\nnsModal.__overlayMouseMoveHandler = function (event)\\r\\n{\\r\\n\\tif (this.__dragMove) \\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__dragCurrentX = parseInt(this.__dragCurrentX) + parseInt(event.clientX) - parseInt(this.__dragMouseX);\\r\\n        this.__dragCurrentY = parseInt(this.__dragCurrentY) + parseInt(event.clientY) - parseInt(this.__dragMouseY);\\r\\n        \\r\\n        //if(this.__dragCurrentX > -1 && this.__dragCurrentY > -1 && this.__dragCurrentX < window.innerWidth  && this.__dragCurrentY < window.innerHeight)\\r\\n        //{\\r\\n            this.__dragMouseX = event.clientX;\\r\\n            this.__dragMouseY = event.clientY;\\r\\n            \\r\\n            console.log(\\\"x is \\\" + this.__dragCurrentX + \\\" and y is \\\" + this.__dragCurrentY);\\r\\n            this.__divPopUp.style.left = parseInt(this.__dragCurrentX) + 'px';\\r\\n            this.__divPopUp.style.top = parseInt(this.__dragCurrentY) + 'px';\\r\\n//        }\\r\\n//        else\\r\\n//        {\\r\\n//        \\tif(this.__dragCurrentX < 0)\\r\\n//        \\t{\\r\\n//        \\t\\tthis.__dragCurrentX = 0;\\r\\n//        \\t}\\r\\n//        \\telse if(this.__dragCurrentX > window.innerWidth)\\r\\n//        \\t{\\r\\n//        \\t\\tthis.__dragCurrentX = window.innerWidth;\\r\\n//        \\t}\\r\\n//        \\tif(this.__dragCurrentY < 0)\\r\\n//        \\t{\\r\\n//        \\t\\tthis.__dragCurrentY = 0;\\r\\n//        \\t}\\r\\n//        \\telse if(this.__dragCurrentY > window.innerHeight)\\r\\n//        \\t{\\r\\n//        \\t\\tthis.__dragCurrentY = window.innerHeight;\\r\\n//        \\t}\\r\\n//        }\\r\\n \\r\\n\\t}\\r\\n};\\r\\n\\r\\nnsModal.__getCloseButton = function()\\r\\n{\\r\\n\\tvar btnClose = document.createElement(\\\"a\\\");\\r\\n\\tbtnClose.setAttribute(\\\"href\\\",\\\"javascript:void(0)\\\");\\r\\n\\tbtnClose.className = this.__closeButtonStyle;\\r\\n    btnClose.style.textDecoration=\\\"none\\\";\\r\\n    btnClose.style.position = \\\"absolute\\\";\\r\\n    btnClose.style.top = \\\"0px\\\";\\r\\n    btnClose.style.right = \\\"10px\\\";\\r\\n\\tbtnClose.style.clear = \\\"both\\\"; \\r\\n\\tbtnClose.innerHTML = \\\"X\\\";\\r\\n\\tbtnClose.setAttribute(\\\"nsPinTip\\\",\\\"Click here to Close\\\");\\r\\n\\tbtnClose.onclick = this.closeModal.bind(this);\\r\\n\\t\\r\\n\\treturn btnClose;\\r\\n};\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\ndocument.registerElement(\\\"ns-modal\\\", {prototype: nsModal});var nsProgressBar = Object.create(nsContainerBase);\\r\\n\\r\\nnsProgressBar.initializeComponent = function() \\r\\n{\\r\\n\\tthis.base.initializeComponent();\\r\\n\\tthis.__modal = null;\\r\\n\\tthis.__divParentLoader = null;\\r\\n\\tthis.__divMessage = null;\\r\\n\\tthis.__divLoader = null;\\r\\n\\tthis.__divLoaderBar = null;\\r\\n\\tthis.__divLoaderText = null;\\r\\n\\t\\r\\n\\tthis.__modal = document.createElement(\\\"ns-modal\\\");\\r\\n\\tthis.util.addEvent(this.__modal,\\\"CLOSE\\\",this.__modalCloseHandler.bind(this));\\r\\n};\\r\\n\\r\\nnsProgressBar.setComponentProperties = function() \\r\\n{\\r\\n\\tthis.base.setComponentProperties();\\r\\n};\\r\\n\\r\\nnsProgressBar.propertyChange = function(attrName, oldVal, newVal, setProperty) \\r\\n{\\r\\n\\tthis.base.propertyChange(attrName, oldVal, newVal, setProperty);\\r\\n};\\r\\n\\r\\nnsProgressBar.show = function(bodyTemplateID,title,isTitleRequired,isDragable)\\r\\n{\\r\\n\\tthis.__createParentLoader(bodyTemplateID);\\r\\n\\tthis.__modal.showModal(this.__divParentLoader,title,isTitleRequired,true,true,isDragable);\\r\\n};\\r\\n\\r\\nnsProgressBar.remove = function()\\r\\n{\\r\\n\\tthis.__modal.closeModal();\\r\\n};\\r\\n\\r\\nnsProgressBar.progressBarCallBack = function(filesDownloaded,totalFiles)\\r\\n{\\r\\n\\tvar progressBarText = Math.round((filesDownloaded * 100)/totalFiles) + \\\"% downloaded\\\";\\r\\n\\tvar progressBarWidth = Math.round((filesDownloaded * 100)/totalFiles);\\r\\n\\tthis.__divLoaderBar.style.width = progressBarWidth + '%';\\r\\n\\tthis.__divLoaderText.innerHTML = progressBarText;\\r\\n};\\r\\n\\r\\nnsProgressBar.__createParentLoader = function(bodyTemplateID)\\r\\n{\\r\\n\\tthis.__divParentLoader = this.util.createDiv(\\\"divParentLoader\\\");\\r\\n\\tthis.__divParentLoader.style.padding = \\\"25px\\\";\\r\\n\\tthis.__divParentLoader.style.paddingTop = \\\"7%\\\";\\r\\n\\tthis.__divParentLoader.appendChild(this.__createLoader());\\r\\n\\tif(bodyTemplateID)\\r\\n\\t{\\r\\n\\t\\tthis.__divMessage = this.util.createDiv(\\\"divMessage\\\");\\r\\n\\t\\tthis.util.addTemplateInContainer(this.__divMessage,bodyTemplateID);\\r\\n\\t\\tthis.__divParentLoader.appendChild(this.__divMessage);\\r\\n\\t}\\r\\n\\treturn this.__divParentLoader;\\r\\n};\\r\\n\\r\\nnsProgressBar.__createLoader = function()\\r\\n{\\r\\n\\tthis.__divLoader = this.util.createDiv(\\\"divLoader\\\",\\\"nsProgressBarLoader\\\");\\r\\n\\tthis.__divLoader.style.width = \\\"100%\\\";\\r\\n\\tthis.__createLoaderBar();\\r\\n\\tthis.__divLoader.appendChild(this.__divLoaderBar);\\r\\n\\tthis.__createLoaderText();\\r\\n\\tthis.__divLoader.appendChild(this.__divLoaderText);\\r\\n\\t\\r\\n\\treturn this.__divLoader;\\r\\n};\\r\\n\\r\\nnsProgressBar.__createLoaderBar = function()\\r\\n{\\r\\n\\tthis.__divLoaderBar = this.util.createDiv(\\\"divLoaderBar\\\",\\\"nsProgressBarLoaderBar\\\");\\t\\r\\n};\\r\\n\\r\\nnsProgressBar.__createLoaderText = function()\\r\\n{\\r\\n\\tthis.__divLoaderText = this.util.createDiv(\\\"divLoaderText\\\",\\\"nsProgressBarLoaderText\\\");\\t\\r\\n};\\r\\n\\r\\nnsProgressBar.__modalCloseHandler = function(event)\\r\\n{\\r\\n\\tthis.util.dispatchEvent(this,\\\"CLOSE\\\");\\r\\n};\\r\\n\\r\\ndocument.registerElement(\\\"ns-progressbar\\\", {prototype: nsProgressBar});\";","export const NSTabNavigatorCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\n\\r\\n\\t\\t}\\r\\n\\\"use strict\\\";\\r\\nvar NSCarousel = (function()\\r\\n{\\r\\n\\tfunction NSCarousel(setting) \\r\\n\\t{\\r\\n\\t\\tvar config = null;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar util = null;\\r\\n\\t\\t\\r\\n\\t\\tvar win = null;\\r\\n\\t\\tvar doc = null;\\r\\n\\t\\tvar deviceSupport = null;\\r\\n\\t\\tvar objSetUp = {};\\r\\n\\t\\tvar events  = {};\\r\\n\\t\\t\\r\\n\\t\\t\\r\\n        var initialize = function()\\r\\n    \\t{\\r\\n    \\t\\tutil = new NSUtil();\\r\\n    \\t\\tvar obj = util.getDomVariables();\\r\\n    \\t\\twin = obj.win;\\r\\n    \\t\\tdoc = obj.doc;\\r\\n    \\t\\tdeviceSupport = util.getSupportedEvents();\\r\\n    \\t\\tif(!setting)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tsetting = {};\\r\\n    \\t\\t}\\r\\n    \\t\\tconfig = {\\r\\n    \\t\\t\\t\\tcontext: setting[\\\"context\\\"] || win,\\r\\n    \\t\\t\\t\\telement: setting[\\\"element\\\"],\\r\\n    \\t\\t\\t\\tstartSlide: parseInt(setting[\\\"startSlide\\\"], 10) || 0,\\r\\n    \\t\\t\\t\\tvisibleSlides: parseInt(setting[\\\"visibleSlides\\\"], 10) || 1,\\r\\n    \\t\\t\\t\\tenableTouch: util.isUndefinedOrNull(setting[\\\"enableTouch\\\"]) ? true : Boolean.parse(setting[\\\"enableTouch\\\"]),\\r\\n    \\t\\t\\t\\tenableVertical: Boolean.parse(setting[\\\"enableVertical\\\"]),\\r\\n    \\t\\t\\t\\tenableAutoPlay: Boolean.parse(setting[\\\"enableAutoPlay\\\"]),\\r\\n    \\t\\t\\t\\t// values between 0 and 1, where 1 means you have to drag to the center of the slide (a value of 1 equals the ios behaviour)\\r\\n    \\t\\t\\t\\tminDistanceBeforeSlide: setting[\\\"minDistanceBeforeSlide\\\"] || 0.5,               \\r\\n    \\t\\t\\t\\tinterval: setting[\\\"interval\\\"] || 300,\\r\\n    \\t\\t\\t\\tallowedSwipeTime: setting[\\\"allowedSwipeTime\\\"] || 300,// maximum time allowed to travel that distance\\r\\n    \\t\\t\\t\\tthreshold: setting[\\\"threshold\\\"] || 0,//required min distance traveled to be considered swipe\\r\\n    \\t\\t\\t\\tspaceBetween: util.isUndefinedOrNull(setting[\\\"spaceBetween\\\"]) ? 0 : setting[\\\"spaceBetween\\\"],\\r\\n    \\t\\t\\t\\tpostionBuffer: util.isUndefinedOrNull(setting[\\\"postionBuffer\\\"]) ? 0 : setting[\\\"postionBuffer\\\"],\\t\\t\\r\\n    \\t\\t\\t\\tanimationType: setting[\\\"animationType\\\"] || 'ease-out',\\r\\n    \\t\\t\\t\\tenableTouchResistance: util.isUndefinedOrNull(setting[\\\"enableTouchResistance\\\"]) ? true : Boolean.parse(setting[\\\"enableTouchResistance\\\"]),\\r\\n    \\t\\t\\t\\ttouchResistanceRatio:setting[\\\"touchResistanceRatio\\\"] || 0.85,\\r\\n    \\t\\t\\t\\tenablePageNavigation: Boolean.parse(setting[\\\"enablePageNavigation\\\"]),\\r\\n    \\t\\t\\t\\tenableDirectionNavigation: Boolean.parse(setting[\\\"enableDirectionNavigation\\\"]),\\r\\n    \\t\\t\\t\\tdirectionNavigation : setting[\\\"directionNavigation\\\"] || {previous: null,next: null},\\r\\n    \\t\\t\\t\\tenable3DAnimation: Boolean.parse(setting[\\\"enable3DAnimation\\\"]),\\r\\n    \\t\\t\\t\\tbeforeSlideCallback: (setting[\\\"beforeSlideCallback\\\"] ? util.getFunction(setting[\\\"beforeSlideCallback\\\"]) : null),\\r\\n    \\t\\t\\t\\tafterSlideCallback: (setting[\\\"afterSlideCallback\\\"] ? util.getFunction(setting[\\\"afterSlideCallback\\\"]) : null),\\r\\n    \\t\\t\\t\\tpageRendererCallback: (setting[\\\"pageRendererCallback\\\"] ? util.getFunction(setting[\\\"pageRendererCallback\\\"]) : null),\\r\\n    \\t\\t\\t\\tpreviousRendererCallback: (setting[\\\"previousRendererCallback\\\"] ? util.getFunction(setting[\\\"previousRendererCallback\\\"]) : null),\\r\\n    \\t\\t\\t\\tnextRendererCallback: (setting[\\\"nextRendererCallback\\\"] ? util.getFunction(setting[\\\"nextRendererCallback\\\"]) : null)\\r\\n    \\t\\t};\\r\\n    \\t\\tif(!config.element)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tutil.throwNSError(\\\"NSCarousel\\\",\\\"Element in setting is missing\\\");\\r\\n    \\t\\t}\\r\\n    \\t\\tif(!setting.customClass)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tsetting.customClass = {};\\r\\n    \\t\\t}\\r\\n    \\t\\tconfig.customClass = {container:setting.customClass[\\\"container\\\"],previous:setting.customClass[\\\"previous\\\"],next:setting.customClass[\\\"next\\\"],page:setting.customClass[\\\"page\\\"],pageActive:setting.customClass[\\\"pageActive\\\"]};\\r\\n\\r\\n    \\t\\tcreateComp();\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar createComp = function()\\r\\n    \\t{\\r\\n    \\t\\tif(!objSetUp.container)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tobjSetUp.container = util.createDiv(null,\\\"nsCarousel\\\");\\r\\n    \\t\\t\\tapplyCustomClass(objSetUp.container,\\\"container\\\");\\r\\n    \\t\\t\\tvar parentElement = config.element.parentElement;\\r\\n    \\t\\t\\tparentElement.insertBefore(objSetUp.container,config.element);\\r\\n    \\t\\t\\tobjSetUp.container.appendChild(config.element);\\r\\n    \\t\\t\\tutil.addStyleClass(config.element,\\\"nsCarouselSlideContainer\\\");\\r\\n    \\t\\t\\t//container.style.visibility = \\\"hidden\\\";\\r\\n    \\t\\t\\tsetUp();\\r\\n    \\t\\t\\taddEventListeners();\\r\\n    \\t\\t\\tcreatePageNavigation();\\r\\n    \\t\\t\\tcreateDirectionNavigation();\\r\\n    \\t\\t\\tsetActivePage();\\r\\n    \\t\\t\\tstartAutoPlay();\\r\\n    \\t\\t\\t/*if (config.enableContinuous) \\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tmoveSlide(getSlideDesiredIndex(config.startSlide - 1), (-1 * objSetUp.containerWidth), 0);\\r\\n    \\t\\t\\t\\tmoveSlide(getSlideDesiredIndex(config.startSlide + 1), objSetUp.containerWidth, 0);\\r\\n    \\t\\t\\t}*/\\r\\n    \\t\\t\\t//container.style.visibility = \\\"visible\\\";\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar setUp = function()\\r\\n    \\t{\\r\\n    \\t\\tsetUpVars();\\r\\n\\t\\t\\t//config.element.style[objSetUp.dimensionName] = (objSetUp.dimension * objSetUp.numPages) + \\\"px\\\";\\r\\n\\t\\t\\tsetUpSlides();\\r\\n\\t\\t\\tevents  = { start: deviceSupport.touch ? 'touchstart' : deviceSupport.pointerEvents ? 'pointerdown' : 'mousedown',\\r\\n\\t    \\t\\t\\tmove:  deviceSupport.touch ? 'touchmove'  : deviceSupport.pointerEvents ? 'pointermove' : 'mousemove',\\r\\n\\t    \\t\\t\\tend:   deviceSupport.touch ? 'touchend touchcancel touchleave' : deviceSupport.pointerEvents ? 'pointerup pointerout pointerleave pointercancel' : 'mouseup mouseout mouseleave',\\r\\n\\t\\t\\t  \\t  };\\r\\n\\t\\t\\tutil.addStyleClass(objSetUp.container,\\\"nsCarousel\\\" + (objSetUp.isVertical ? \\\"Vertical\\\" : \\\"Horizontal\\\"));\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar setUpVars = function()\\r\\n    \\t{\\r\\n    \\t\\tobjSetUp.isVertical = config.enableVertical;\\r\\n    \\t\\tobjSetUp.slides = config.element.children;\\r\\n    \\t\\tobjSetUp.numPages = Math.ceil(objSetUp.slides.length / config.visibleSlides);\\r\\n    \\t\\tobjSetUp.previousPage = null;\\r\\n    \\t\\tobjSetUp.currentPage = getSlideDesiredIndex(config.startSlide);\\r\\n    \\t\\tobjSetUp.dimensionName = objSetUp.isVertical ? \\\"height\\\" : \\\"width\\\";\\r\\n    \\t\\tobjSetUp.dimension = objSetUp.container.getBoundingClientRect()[objSetUp.dimensionName];\\r\\n    \\t\\tvar padding = 0;\\r\\n    \\t\\tif(objSetUp.isVertical)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tpadding = parseInt(util.getStyleValue(objSetUp.container,'padding-top',true),10) + parseInt(util.getStyleValue(objSetUp.container,'padding-bottom',true),10);\\r\\n    \\t\\t}\\r\\n    \\t\\telse\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tpadding = parseInt(util.getStyleValue(objSetUp.container,'padding-left',true),10) + parseInt(util.getStyleValue(objSetUp.container,'padding-right',true),10);\\r\\n    \\t\\t}\\r\\n    \\t\\tobjSetUp.dimension = objSetUp.dimension - padding;\\r\\n    \\t\\tobjSetUp.padding = padding;\\r\\n    \\t\\tobjSetUp.marginName = objSetUp.isVertical ? \\\"Bottom\\\" : \\\"Right\\\";\\r\\n    \\t\\tobjSetUp.minDistanceBeforeSlide = config.minDistanceBeforeSlide * (objSetUp.dimension / 2);\\r\\n    \\t\\tvar spaceBetween = config.spaceBetween;\\r\\n    \\t\\tif (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) \\r\\n    \\t\\t{\\r\\n    \\t\\t\\tspaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * objSetUp.dimension;\\r\\n    \\t\\t}\\r\\n    \\t\\tobjSetUp.spaceBetween = spaceBetween;\\r\\n    \\t\\tobjSetUp.snapGrid = [];\\r\\n    \\t\\tobjSetUp.slidesGrid = [];\\r\\n    \\t\\tobjSetUp.touch = {};\\r\\n    \\t\\tobjSetUp.isAnimating = false;\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar setUpSlides = function()\\r\\n    \\t{\\r\\n    \\t\\tvar index = 0;\\r\\n    \\t\\tvar slidePosition = 0;\\r\\n    \\t\\tvar length = objSetUp.slides.length;\\r\\n    \\t    while(length--) \\r\\n    \\t    {\\r\\n    \\t    \\tvar slide = objSetUp.slides[length];\\r\\n    \\t    \\tutil.addStyleClass(slide,\\\"nsCarouselSlide\\\");\\r\\n    \\t    \\tvar slideSize = (objSetUp.dimension - ((config.visibleSlides - 1) * objSetUp.spaceBetween)) / config.visibleSlides;\\r\\n    \\t    \\tslide.style[objSetUp.dimensionName] = slideSize + \\\"px\\\";\\r\\n    \\t    \\tobjSetUp.slideSize = slideSize;\\r\\n    \\t    \\tslide.style[\\\"margin\\\" + objSetUp.marginName] = objSetUp.spaceBetween + \\\"px\\\";\\r\\n    \\t    \\tslide.setAttribute(\\\"data-ns-index\\\", length);\\r\\n    \\t    \\tif (index % config.visibleSlides === 0) \\r\\n    \\t    \\t{ \\r\\n    \\t    \\t\\tobjSetUp.snapGrid.push(slidePosition); \\r\\n    \\t    \\t}\\r\\n    \\t    \\tobjSetUp.slidesGrid.push(slidePosition);\\r\\n    \\t        slidePosition = slidePosition + slideSize + objSetUp.spaceBetween;\\r\\n    \\t    \\t//move(0,0);\\r\\n    \\t    \\tindex++;\\r\\n    \\t    }\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar addEventListeners = function()\\r\\n    \\t{\\r\\n    \\t\\tif(config.enableTouch)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tutil.addEvent(config.element,events.start,startHandler);\\r\\n        \\t\\t//util.addEvent(config.element,events.move,moveHandler);\\r\\n        \\t\\t//util.addEvent(config.element,events.end,endHandler);\\r\\n    \\t\\t}\\r\\n    \\t\\tutil.addEvent(config.context,\\\"resize\\\",resize);\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar startHandler = function(event)\\r\\n    \\t{\\r\\n    \\t\\tevent = util.getEvent(event);\\r\\n    \\t\\tobjSetUp.touch.isTouchEvent = (event.type === 'touchstart');\\r\\n    \\t    if ((!objSetUp.touch.isTouchEvent && 'which' in event && event.which === 3) ||\\r\\n    \\t    \\t\\t(objSetUp.touch.isTouchEvent && 'button' in event && event.button > 0)) \\r\\n    \\t    { \\r\\n    \\t    \\treturn; \\r\\n    \\t    }\\r\\n    \\t    util.addEvent(config.element,events.move,moveHandler);\\r\\n    \\t\\tutil.addEvent(config.element,events.end,endHandler);\\r\\n    \\t\\tobjSetUp.touch.start = getCoord(event);\\r\\n    \\t\\tobjSetUp.touch.touchStartTime = new Date().getTime();\\r\\n    \\t\\tdelete objSetUp.isScroll;\\r\\n    \\t\\tif(!deviceSupport.touch)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tevent.preventDefault();\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar moveHandler = function(event)\\r\\n    \\t{\\r\\n    \\t\\tif(objSetUp.touch.start)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tevent = util.getEvent(event);\\r\\n    \\t\\t\\tevent.preventDefault();\\r\\n    \\t\\t\\tobjSetUp.touch.end = getCoord(event);\\r\\n    \\t\\t    var diffX = objSetUp.touch.end.x - objSetUp.touch.start.x;\\r\\n        \\t    var diffY = objSetUp.touch.end.y - objSetUp.touch.start.y;\\r\\n        \\t    var diff = objSetUp.isVertical ? diffY : diffX;\\r\\n        \\t    objSetUp.touch.diff = diff;\\r\\n        \\t    var swipeDirection = diff > 0 ? 'prev' : 'next';\\r\\n        \\t    var prop = objSetUp.isVertical ? \\\"y\\\" : \\\"x\\\";\\r\\n        \\t    objSetUp.touch.startTranslate = getTranslate(config.element,prop);\\r\\n        \\t    objSetUp.touch.currentTranslate = diff + objSetUp.touch.startTranslate;\\r\\n        \\t    console.log( objSetUp.touch.startTranslate + \\\" == \\\" +   objSetUp.touch.currentTranslate);\\r\\n        \\t    var disableParentSwiper = true;\\r\\n        \\t    if ((diff > 0 && objSetUp.touch.currentTranslate > minTranslate())) \\r\\n        \\t    {\\r\\n        \\t        disableParentSwiper = false;\\r\\n        \\t        if (config.enableTouchResistance) \\r\\n        \\t        { \\r\\n        \\t        \\tobjSetUp.touch.currentTranslate = (minTranslate() - 1) + (Math.pow((-1 * minTranslate() + objSetUp.touch.startTranslate + diff), config.touchResistanceRatio)); \\r\\n        \\t        }\\r\\n        \\t    } \\r\\n        \\t    else if (diff < 0 && objSetUp.touch.currentTranslate < maxTranslate()) \\r\\n        \\t    {\\r\\n        \\t        disableParentSwiper = false;\\r\\n        \\t        if (config.enableTouchResistance) \\r\\n        \\t        {\\r\\n        \\t        \\tobjSetUp.touch.currentTranslate = (maxTranslate() + 1) + (Math.pow((maxTranslate() - objSetUp.touch.startTranslate - diff), config.touchResistanceRatio));\\r\\n        \\t        }\\r\\n        \\t    }\\r\\n        \\t    console.log( objSetUp.touch.startTranslate + \\\" == \\\" +   objSetUp.touch.currentTranslate);\\r\\n        \\t    if (disableParentSwiper) \\r\\n        \\t    {\\r\\n        \\t        event.preventedByNestedSwiper = true;\\r\\n        \\t    }\\r\\n        \\t    if (config.threshold > 0) \\r\\n        \\t    {\\r\\n        \\t        if (Math.abs(diff) > config.threshold) \\r\\n        \\t        {\\r\\n        \\t        \\tobjSetUp.touch.start = objSetUp.touch.end;\\r\\n        \\t            objSetUp.touch.currentTranslate = objSetUp.touch.startTranslate;\\r\\n        \\t            diffX = objSetUp.touch.end.x - objSetUp.touch.start.x;\\r\\n                \\t    diffY = objSetUp.touch.end.y - objSetUp.touch.start.y;\\r\\n                \\t    diff = objSetUp.isVertical ? diffY : diffX;\\r\\n                \\t    objSetUp.touch.diff = diff;\\r\\n        \\t            return;\\r\\n        \\t        }\\r\\n        \\t        else \\r\\n            \\t    {\\r\\n        \\t        \\tobjSetUp.touch.currentTranslate = objSetUp.touch.startTranslate;\\r\\n    \\t    \\t        return;\\r\\n            \\t    }\\r\\n        \\t    }\\r\\n        \\t    setTranslate(config.element,objSetUp.touch.currentTranslate,true);\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar endHandler = function(event)\\r\\n    \\t{\\r\\n    \\t\\tevent = util.getEvent(event);\\r\\n    \\t\\tutil.removeEvent(config.element,events.move,moveHandler);\\r\\n    \\t\\tutil.removeEvent(config.element,events.end,endHandler);\\r\\n    \\t\\tif (!objSetUp.isScroll) \\r\\n    \\t\\t{\\r\\n    \\t\\t\\tvar stopIndex = 0;\\r\\n    \\t\\t    var groupSize = objSetUp.slideSize;\\r\\n    \\t\\t    var currentPos = objSetUp.currentPos;\\r\\n    \\t\\t    for (var i = 0; i < objSetUp.slidesGrid.length; i += config.visibleSlides) \\r\\n    \\t\\t    {\\r\\n    \\t\\t    \\tif (typeof objSetUp.slidesGrid[i + config.visibleSlides] !== 'undefined') \\r\\n    \\t\\t    \\t{\\r\\n    \\t\\t    \\t\\tif (currentPos >= objSetUp.slidesGrid[i] && currentPos < objSetUp.slidesGrid[i + config.visibleSlides]) \\r\\n    \\t\\t    \\t\\t{\\r\\n    \\t\\t    \\t\\t\\tstopIndex = i;\\r\\n    \\t\\t    \\t\\t\\tgroupSize = objSetUp.slidesGrid[i + config.visibleSlides] - objSetUp.slidesGrid[i];\\r\\n    \\t\\t    \\t\\t}\\r\\n    \\t\\t    \\t} \\r\\n    \\t\\t    \\telse if (currentPos >= objSetUp.slidesGrid[i]) \\r\\n    \\t\\t    \\t{\\r\\n    \\t\\t    \\t\\tstopIndex = i;\\r\\n    \\t\\t    \\t\\tgroupSize = objSetUp.slidesGrid[objSetUp.slidesGrid.length - 1] - objSetUp.slidesGrid[objSetUp.slidesGrid.length - 2];\\r\\n    \\t\\t    \\t}\\r\\n    \\t\\t    }\\r\\n    \\t\\t    var pageIndex = Math.floor(stopIndex / config.visibleSlides);\\r\\n        \\t    var elapsedTime = new Date().getTime() - objSetUp.touch.touchStartTime;\\r\\n        \\t    if(elapsedTime <= config.allowedSwipeTime)\\r\\n        \\t    {\\r\\n        \\t    \\tif(Math.abs(objSetUp.touch.diff) >= config.threshold)\\r\\n        \\t    \\t{\\r\\n        \\t    \\t\\tobjSetUp.touch.swipeDirection = objSetUp.touch.diff < 0 ? 'next' : (objSetUp.touch.diff > 0 ? 'prev' : 'reset') ;\\r\\n        \\t    \\t\\tif(objSetUp.touch.swipeDirection === 'next') \\r\\n    \\t    \\t\\t    {\\r\\n    \\t    \\t\\t    \\tsetPage(pageIndex + 1);\\r\\n    \\t    \\t\\t    }\\r\\n    \\t    \\t\\t    else if (objSetUp.touch.swipeDirection === 'prev') \\r\\n    \\t    \\t\\t    {\\r\\n    \\t    \\t\\t    \\tsetPage(pageIndex - 1);\\r\\n    \\t    \\t\\t    }\\r\\n    \\t    \\t\\t    else\\r\\n    \\t    \\t\\t    {\\r\\n    \\t    \\t\\t    \\tsetPage(pageIndex);\\r\\n    \\t    \\t\\t    }\\r\\n        \\t    \\t}\\r\\n        \\t    }\\r\\n    \\t\\t    \\r\\n    \\t\\t}\\r\\n    \\t\\tobjSetUp.touch = {};\\r\\n    \\t\\tevent.preventDefault();\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar setTranslate = function(element,translate,isTouch)\\r\\n    \\t{\\r\\n    \\t\\tvar animationStyle = getAnimationStyle(translate,isTouch);\\r\\n     \\t    var transforms = \\\"\\\";\\r\\n     \\t\\tfor (var key in animationStyle)\\r\\n     \\t\\t{\\r\\n     \\t\\t\\ttransforms += key + '(' + animationStyle[key] + ') ';\\r\\n     \\t\\t}\\r\\n     \\t    var elStyle = element.style;\\r\\n     \\t    elStyle.webkitTransform = transforms;\\r\\n     \\t    elStyle.transform = transforms;\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar minTranslate = function() \\r\\n    \\t{\\r\\n    \\t    return (-1 * objSetUp.snapGrid[0]);\\r\\n    \\t};\\r\\n\\r\\n    \\tvar maxTranslate = function() \\r\\n    \\t{\\r\\n    \\t    return (-1 * objSetUp.snapGrid[objSetUp.snapGrid.length - 1]);\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar getCoord = function(event) \\r\\n    \\t{\\r\\n    \\t    var eve = deviceSupport.touch ? (event.targetTouches[0] || event.changedTouches[0]) : event;\\r\\n    \\t    return {x: eve.pageX,y: eve.pageY };\\r\\n    \\t};\\r\\n    \\t  \\r\\n    \\tvar getDistance = function(isVertical) \\r\\n    \\t{\\r\\n    \\t    var prop = isVertical ? \\\"y\\\" : \\\"x\\\";\\r\\n    \\t    var retValue = 0;\\r\\n    \\t    try \\r\\n    \\t    { \\r\\n    \\t    \\tretValue = objSetUp.touch.end[prop] - objSetUp.touch.start[prop];\\r\\n    \\t    } \\r\\n    \\t    catch(error) \\r\\n    \\t    {\\r\\n    \\t    \\treturn 0;\\r\\n    \\t    }\\r\\n    \\t    return retValue;\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar move = function(distance,duration,callback) \\r\\n    \\t{\\r\\n    \\t\\tvar callBackWrapper = function()\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tif(callback)\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tcallback();\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t\\tif(config.afterSlideCallback)\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tconfig.afterSlideCallback(objSetUp.currentPage,objSetUp.previousPage);\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t};\\r\\n    \\t\\tvar isTouch = (objSetUp.touch && objSetUp.touch.isTouchEvent);\\r\\n    \\t\\tvar animationStyle = getAnimationStyle(null,isTouch);\\r\\n    \\t\\t//animate(config.element,animationStyle,{ duration: config.interval, easing:config.animationType,complete: callback });\\r\\n    \\t\\tanimate(config.element,animationStyle,config.interval,config.animationType,callBackWrapper);\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar animate = function(element,properties,duration,ease,callback)\\r\\n    \\t{\\r\\n    \\t\\tvar objTemp = {};\\r\\n    \\t\\tfunction setDuration(duration) \\r\\n    \\t\\t{\\r\\n    \\t\\t    if (typeof duration !== 'string') \\r\\n    \\t\\t    {\\r\\n    \\t\\t    \\tduration = duration + \\\"ms\\\";\\r\\n    \\t\\t    }\\r\\n    \\t\\t    var elStyle = element.style;\\r\\n  \\t\\t      \\telStyle.webkitTransitionDuration = duration;\\r\\n  \\t\\t      \\telStyle.transitionDuration = duration;\\r\\n    \\t\\t};\\r\\n    \\t\\t\\r\\n    \\t\\tfunction setTransform(transform)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\t var elStyle = element.style;\\r\\n    \\t\\t     elStyle.webkitTransform = transform;\\r\\n    \\t\\t     elStyle.transform = transform;\\r\\n    \\t\\t};\\r\\n    \\t\\t\\r\\n    \\t\\tfunction transitionEnd()\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tobjTemp.isAnimating = false;\\r\\n\\t\\t\\t\\tsetDuration(0);\\r\\n\\t\\t\\t\\tif(callback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcallback();\\r\\n\\t\\t\\t\\t}\\r\\n    \\t\\t};\\r\\n    \\t\\t\\r\\n    \\t\\tfunction callLater()\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tif(objTemp.transitionEnd)\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tutil.dispatchEvent(element,\\\"transitionend\\\");\\r\\n    \\t\\t\\t\\tutil.dispatchEvent(element,\\\"webkitTransitionEnd\\\");\\r\\n    \\t\\t\\t\\t/*var event = new Event('transitionend');\\r\\n            \\t    element.dispatchEvent(event);\\r\\n            \\t    event = new Event('webkitTransitionEnd');\\r\\n            \\t    element.dispatchEvent(event);*/\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t};\\r\\n    \\t\\t\\r\\n    \\t\\tsetDuration(duration);\\r\\n\\t    \\tvar transforms = \\\"\\\";\\r\\n    \\t\\tfor (var key in properties)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\ttransforms += key + '(' + properties[key] + ') ';\\r\\n    \\t\\t}\\r\\n    \\t\\tsetTransform(transforms);\\r\\n    \\t\\t//transitionStart(runCallbacks, direction);\\r\\n    \\t\\tif (!objTemp.isAnimating) \\r\\n    \\t\\t{\\r\\n    \\t\\t\\tobjTemp.isAnimating = true;\\r\\n    \\t\\t\\tif(!objTemp.transitionEnd)\\r\\n        \\t\\t{\\r\\n        \\t\\t\\tobjTemp.transitionEnd = function(event)\\r\\n            \\t\\t{\\r\\n        \\t\\t\\t\\tevent = util.getEvent(event);\\r\\n        \\t\\t\\t\\tif (event.target !== element) \\r\\n        \\t\\t\\t\\t{ \\r\\n        \\t\\t\\t\\t\\treturn; \\r\\n        \\t\\t\\t\\t}\\r\\n        \\t\\t\\t\\tutil.removeEvent(element,\\\"transitionend\\\",objTemp.transitionEnd);\\r\\n        \\t\\t\\t\\tutil.removeEvent(element,\\\"webkitTransitionEnd\\\",objTemp.transitionEnd);\\r\\n        \\t\\t\\t\\tobjTemp.transitionEnd = null;\\r\\n        \\t\\t        delete objTemp.transitionEnd;\\r\\n        \\t\\t        transitionEnd();\\r\\n            \\t\\t};\\r\\n        \\t\\t}\\r\\n    \\t\\t\\tutil.addEvent(element,\\\"transitionend\\\",objTemp.transitionEnd);\\r\\n    \\t\\t\\tutil.addEvent(element,\\\"webkitTransitionEnd\\\",objTemp.transitionEnd);\\r\\n    \\t\\t\\tsetTimeout(function(){\\r\\n    \\t\\t\\t\\tcallLater();\\r\\n    \\t\\t\\t},duration + 100);\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\t//from zepto.js\\r\\n    \\t/*var animate = function(element,properties,duration,ease,callback)\\r\\n    \\t{\\r\\n    \\t\\tif(typeof duration == \\\"object\\\")\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tease = duration.easing;\\r\\n    \\t\\t\\tcallback = duration.complete;\\r\\n    \\t\\t\\tduration = duration.duration;\\r\\n    \\t\\t}\\r\\n\\t\\t\\tif (duration === undefined) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tduration = 0.4;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar cssValues = {};\\r\\n\\t\\t\\tif (typeof properties == \\\"string\\\") \\r\\n\\t\\t\\t{\\r\\n//    \\t\\t\\t\\tcssValues[animationName] = properties\\r\\n//    \\t\\t\\t    cssValues[animationDuration] = duration + 's'\\r\\n//    \\t\\t\\t    cssValues[animationTiming] = (ease || 'linear')\\r\\n//    \\t\\t\\t    endEvent = $.fx.animationEnd\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;\\r\\n    \\t    \\tvar transforms = \\\"\\\";\\r\\n    \\t    \\tvar cssProperties = [];\\r\\n        \\t\\tfor (var key in properties)\\r\\n        \\t\\t{\\r\\n        \\t\\t\\tif(supportedTransforms.test(key))\\r\\n        \\t\\t\\t{\\r\\n        \\t\\t\\t\\ttransforms += key + '(' + properties[key] + ') ';\\r\\n        \\t\\t\\t}\\r\\n        \\t\\t    else \\r\\n        \\t\\t    {\\r\\n        \\t\\t    \\tcssValues[key] = properties[key];\\r\\n        \\t\\t    \\tcssProperties.push(dasherize(key));\\r\\n        \\t\\t    }\\r\\n        \\t\\t}\\r\\n        \\t\\tif(transforms)\\r\\n        \\t\\t{\\r\\n        \\t\\t\\t cssValues[\\\"transform\\\"] = transforms;\\r\\n        \\t\\t\\t cssProperties.push(\\\"transform\\\");\\r\\n        \\t\\t}\\r\\n        \\t\\tif (duration > 0 && typeof properties === 'object') \\r\\n        \\t\\t{\\r\\n        \\t        cssValues[\\\"transition-property\\\"] = cssProperties.join(', ');\\r\\n        \\t        cssValues[\\\"transition-duration\\\"] = duration + 's';\\r\\n        \\t        cssValues[\\\"transition-timing-function\\\"] = (ease || 'linear');\\r\\n        \\t    }\\r\\n\\t\\t\\t}\\r\\n    \\t\\t\\t\\r\\n    \\t\\telement.clientLeft;\\r\\n    \\t\\tutil.css(element,cssValues);\\r\\n    \\t};*/\\r\\n    \\t\\r\\n    \\tvar dasherize = function(str) \\r\\n    \\t{\\r\\n    \\t\\treturn str.toLowerCase()(str.replace(/([a-z])([A-Z])/, '$1-$2'));\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar getAnimationStyle = function(position,isTouch) \\r\\n    \\t{\\r\\n    \\t\\tif(util.isUndefinedOrNull(position))\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tvar index = objSetUp.currentPage;\\r\\n        \\t    if (index >= objSetUp.snapGrid.length) \\r\\n        \\t    { \\r\\n        \\t    \\tindex = snapGrid.length - 1; \\r\\n        \\t    }\\r\\n        \\t    //for some reason the currentPos is of by 15px\\r\\n        \\t    objSetUp.currentPos = objSetUp.snapGrid[index] + 15 + config.postionBuffer;\\r\\n        \\t    position = -1 * objSetUp.currentPos;\\r\\n    \\t\\t}\\r\\n    \\t\\telse\\r\\n    \\t\\t{\\r\\n    \\t\\t\\t//objSetUp.currentPos = position;\\r\\n    \\t\\t}\\r\\n    \\t\\tposition = position + \\\"px\\\";\\r\\n    \\t\\t//var position = -1 * objSetUp.currentPage * objSetUp.dimension + distance + \\\"px\\\";\\r\\n    \\t    var props = {};\\r\\n    \\t    if (config.enable3DAnimation) \\r\\n    \\t    {\\r\\n    \\t    \\tprops[\\\"translate3d\\\"] = (objSetUp.isVertical ? \\\"0,\\\" + position : position + \\\",0\\\") + \\\",0\\\";\\r\\n    \\t    } \\r\\n    \\t    else \\r\\n    \\t    {\\r\\n    \\t    \\tprops [objSetUp.isVertical ? \\\"translateY\\\" : \\\"translateX\\\"] = position;\\r\\n    \\t    }\\r\\n    \\t    return props;\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar getTranslate = function(element,axis)\\r\\n    \\t{\\r\\n    \\t\\tif(!axis)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\t axis = \\\"x\\\";\\r\\n    \\t\\t}\\r\\n    \\t\\tvar matrix;\\r\\n    \\t    var curTransform;\\r\\n    \\t    var transformMatrix;\\r\\n\\r\\n    \\t    var curStyle = win.getComputedStyle(element, null);\\r\\n    \\t    if (win.WebKitCSSMatrix) \\r\\n    \\t    {\\r\\n    \\t        curTransform = curStyle.transform || curStyle.webkitTransform;\\r\\n    \\t        if(curTransform.split(',').length > 6) \\r\\n    \\t        {\\r\\n    \\t          curTransform = curTransform.split(', ').map(function (a) { return a.replace(',', '.'); }).join(', ');\\r\\n    \\t        }\\r\\n    \\t        transformMatrix = new win.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\\r\\n    \\t    } \\r\\n    \\t    else \\r\\n    \\t    {\\r\\n    \\t        transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\\r\\n    \\t        matrix = transformMatrix.toString().split(',');\\r\\n    \\t    }\\r\\n    \\t    if (axis === 'x') \\r\\n    \\t    {\\r\\n    \\t        if (win.WebKitCSSMatrix) \\r\\n    \\t        { \\r\\n    \\t        \\tcurTransform = transformMatrix.m41; \\r\\n    \\t        }\\r\\n    \\t        // IE10 Matrix\\r\\n    \\t        else if (matrix.length === 16) \\r\\n    \\t        { \\r\\n    \\t        \\tcurTransform = parseFloat(matrix[12]); \\r\\n    \\t        }\\r\\n    \\t        // Normal Browsers\\r\\n    \\t        else \\r\\n    \\t        { \\r\\n    \\t        \\tcurTransform = parseFloat(matrix[4]); \\r\\n    \\t        }\\r\\n    \\t    }\\r\\n    \\t    else if (axis === 'y') \\r\\n    \\t    {\\r\\n    \\t        if (win.WebKitCSSMatrix) \\r\\n    \\t        { \\r\\n    \\t        \\tcurTransform = transformMatrix.m42; \\r\\n    \\t        }\\r\\n    \\t        // IE10 Matrix\\r\\n    \\t        else if (matrix.length === 16) \\r\\n    \\t        { \\r\\n    \\t        \\tcurTransform = parseFloat(matrix[13]); \\r\\n    \\t        }\\r\\n    \\t        // Normal Browsers\\r\\n    \\t        else \\r\\n    \\t        { \\r\\n    \\t        \\tcurTransform = parseFloat(matrix[5]); \\r\\n    \\t        }\\r\\n    \\t    }\\r\\n    \\t    return curTransform || 0;\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar getSlideDesiredIndex = function(index)\\r\\n    \\t{\\r\\n    \\t\\tvar retIndex = Math.max(Math.min(index,objSetUp.numPages - 1), 0);//(objSetUp.slides.length + (index % objSetUp.slides.length)) % objSetUp.slides.length;\\r\\n    \\t\\treturn retIndex;\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar getResistanceDistance = function(distance)\\r\\n    \\t{\\r\\n    \\t\\tif (isFirst() && distance > 0 || isLast() && distance < 0) \\r\\n    \\t\\t{\\r\\n    \\t\\t\\tdistance /= (1 + Math.abs(distance) / objSetUp.dimension);\\r\\n    \\t\\t}\\r\\n    \\t\\treturn distance;\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar createPageNavigation = function()\\r\\n    \\t{\\r\\n    \\t\\tif(config.enablePageNavigation)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tvar divPagination = util.createDiv(null,\\\"nsCarouselPageCon\\\");\\r\\n    \\t\\t\\tvar length = objSetUp.snapGrid.length;\\r\\n    \\t\\t\\tvar html = \\\"\\\";\\r\\n    \\t\\t\\tfor (var count = 0; count < length; count++) \\r\\n    \\t\\t\\t{\\r\\n\\t\\t\\t          if (config.pageRendererCallback) \\r\\n\\t\\t\\t          {\\r\\n\\t\\t\\t        \\t  html += config.pageRendererCallback(count);\\r\\n\\t\\t\\t          } \\r\\n\\t\\t\\t          else \\r\\n\\t\\t\\t          {\\r\\n\\t\\t\\t        \\t  html += \\\"<span class=\\\\\\\"nsCarouselPage\\\\\\\"></span>\\\";\\r\\n\\t\\t\\t          }\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t\\tdivPagination.innerHTML = html;\\r\\n    \\t\\t\\tvar pages = divPagination.querySelectorAll(\\\"span\\\");\\r\\n    \\t\\t\\tobjSetUp.pages = pages;\\r\\n    \\t\\t\\tvar cssClass= \\\"nsCarouselPage\\\" + (objSetUp.isVertical ? \\\"Vertical\\\" : \\\"Horizontal\\\");\\r\\n    \\t\\t\\tfor (var count = 0; count < pages.length; count++) \\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tvar page = pages[count];\\r\\n    \\t\\t\\t\\tapplyCustomClass(page,\\\"page\\\");\\r\\n    \\t\\t\\t\\tutil.addStyleClass(page,cssClass);\\r\\n    \\t\\t\\t\\tpage.setAttribute(\\\"data-ns-index\\\",count);\\r\\n    \\t\\t\\t\\tutil.addEvent(page,\\\"click\\\",pageClickHandler.bind(null,count));\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t\\tobjSetUp.container.appendChild(divPagination);\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar setActivePage = function()\\r\\n    \\t{\\r\\n    \\t\\tif(objSetUp.pages && objSetUp.pages.length > 0)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tvar pages = objSetUp.pages;\\r\\n    \\t\\t\\tvar cssClass = \\\"nsCarouselPageActive\\\";\\r\\n    \\t\\t\\tif(config.customClass[\\\"pageActive\\\"])\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tcssClass = config.customClass[\\\"pageActive\\\"];\\r\\n    \\t\\t\\t}\\r\\n        \\t\\tfor (var count = 0; count < pages.length; count++) \\r\\n    \\t\\t\\t{\\r\\n        \\t\\t\\tvar page = pages[count];\\r\\n    \\t\\t\\t\\tutil.removeStyleClass(page,cssClass);\\r\\n    \\t\\t\\t};\\r\\n    \\t\\t\\tutil.addStyleClass(pages[objSetUp.currentPage],cssClass);\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar pageClickHandler = function(index,event)\\r\\n    \\t{\\r\\n    \\t\\tevent = util.getEvent(event);\\r\\n    \\t\\tsetPage(index);\\r\\n    \\t\\tevent.stopPropagation();\\r\\n    \\t\\tevent.stopImmediatePropagation();\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar createDirectionNavigation = function()\\r\\n    \\t{\\r\\n    \\t\\tif(config.enableDirectionNavigation)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tif(!config.directionNavigation)\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tconfig.directionNavigation = {};\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t\\tif(!config.directionNavigation.previous)\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tvar divLeftCon = util.createDiv(null,\\\"nsCarouselButtonCon nsCarouselPrevCon\\\");\\r\\n    \\t\\t\\t\\tif(config.previousRendererCallback) \\r\\n\\t\\t\\t        {\\r\\n    \\t\\t\\t\\t\\tvar html = config.previousRendererCallback();\\r\\n    \\t\\t\\t\\t\\tdivLeftCon.innerHTML = html;\\r\\n\\t\\t\\t        }\\r\\n    \\t\\t\\t\\telse\\r\\n    \\t\\t\\t\\t{\\r\\n    \\t\\t\\t\\t\\tvar spanLeft = util.createElement(\\\"span\\\",null,\\\"nsCarouselButtonNav nsCarouselPrev\\\");\\r\\n        \\t\\t\\t\\tdivLeftCon.appendChild(spanLeft);\\r\\n    \\t\\t\\t\\t}\\r\\n    \\t\\t\\t\\tutil.addStyleClass(divLeftCon.children[0],\\\"nsCarouselButton nsCarouselButtonPrev\\\");\\r\\n    \\t\\t\\t\\tobjSetUp.container.appendChild(divLeftCon);\\r\\n    \\t\\t\\t\\tconfig.directionNavigation.previous = divLeftCon;\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t\\tif(!config.directionNavigation.next)\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tvar divRightCon = util.createDiv(null,\\\"nsCarouselButtonCon nsCarouselNextCon\\\");\\r\\n    \\t\\t\\t\\tif(config.nextRendererCallback) \\r\\n\\t\\t\\t        {\\r\\n    \\t\\t\\t\\t\\tvar html = config.nextRendererCallback();\\r\\n    \\t\\t\\t\\t\\tdivRightCon.innerHTML = html;\\r\\n\\t\\t\\t        }\\r\\n    \\t\\t\\t\\telse\\r\\n    \\t\\t\\t\\t{\\r\\n    \\t\\t\\t\\t\\tvar spanRight = util.createElement(\\\"span\\\",null,\\\"nsCarouselButtonNav nsCarouselNext\\\");\\r\\n        \\t\\t\\t\\tdivRightCon.appendChild(spanRight);\\r\\n    \\t\\t\\t\\t}\\r\\n    \\t\\t\\t\\tutil.addStyleClass(divRightCon.children[0],\\\"nsCarouselButton nsCarouselButtonNext\\\");\\r\\n    \\t\\t\\t\\tobjSetUp.container.appendChild(divRightCon);\\r\\n    \\t\\t\\t\\tconfig.directionNavigation.next = divRightCon;\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t\\tapplyCustomClass(config.directionNavigation.previous,\\\"previous\\\");\\r\\n    \\t\\t\\tapplyCustomClass(config.directionNavigation.next,\\\"next\\\");\\r\\n    \\t\\t\\tutil.addEvent(config.directionNavigation.previous,\\\"click\\\",prev);\\r\\n    \\t\\t\\tutil.addEvent(config.directionNavigation.next,\\\"click\\\",next);\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar applyCustomClass = function(element,type)\\r\\n    \\t{\\r\\n    \\t\\tif(element && type && config.customClass[type])\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tutil.addStyleClass(element,config.customClass[type]);\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar startAutoPlay = function()\\r\\n    \\t{\\r\\n    \\t\\tif(config.enableAutoPlay)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tstopAutoPlay();\\r\\n    \\t    \\tvar func = isLast() ? first : next;\\r\\n    \\t    \\tobjSetUp.timeOutInterval = setTimeout(func,config.interval); \\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar stopAutoPlay = function()\\r\\n    \\t{\\r\\n    \\t\\tif(objSetUp.timeOutInterval)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tclearTimeout(objSetUp.timeOutInterval);\\r\\n        \\t    objSetUp.timeOutInterval = null;\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar setPage = function(index)\\r\\n    \\t{\\r\\n    \\t\\tindex = util.isUndefinedOrNull(index) ? 0 : index;\\r\\n    \\t\\tstopAutoPlay();\\r\\n    \\t\\tvar newPage = validPage(index);\\r\\n    \\t\\tif (objSetUp.currentPage != newPage) \\r\\n    \\t\\t{\\r\\n    \\t\\t\\tif(config.beforeSlideCallback)\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tconfig.beforeSlideCallback(objSetUp.currentPage,newPage);\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t\\tobjSetUp.previousPage = objSetUp.currentPage;\\r\\n    \\t\\t\\tobjSetUp.currentPage = newPage;\\r\\n    \\t\\t}\\r\\n    \\t\\tmove(0,config.interval,startAutoPlay);\\r\\n    \\t\\tsetActivePage();\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar first = function()\\r\\n    \\t{ \\r\\n    \\t\\tsetPage(0);\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar next = function()\\r\\n    \\t{ \\r\\n    \\t\\tsetPage(objSetUp.currentPage + 1);\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar prev = function()\\r\\n    \\t{ \\r\\n    \\t\\tsetPage(objSetUp.currentPage - 1);\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar last = function()\\r\\n    \\t{ \\r\\n    \\t\\tsetPage(objSetUp.numPages - 1);\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar isFirst = function()\\r\\n    \\t{ \\r\\n    \\t\\tif(objSetUp.currentPage == 0)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\treturn true;\\r\\n    \\t\\t}\\r\\n    \\t\\treturn false;\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar isLast = function()\\r\\n    \\t{ \\r\\n    \\t\\tif(objSetUp.currentPage == objSetUp.numPages - 1)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\treturn true;\\r\\n    \\t\\t}\\r\\n    \\t\\treturn false;\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar validPage = function(index)\\r\\n    \\t{ \\r\\n    \\t\\treturn Math.max(Math.min(index,objSetUp.numPages - 1), 0);\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar visibleSlides = function()\\r\\n    \\t{\\r\\n    \\t    return objSetUp.slides.slice(objSetUp.currentPage, objSetUp.currentPage + config.visibleSlides);\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar resize = function()\\r\\n    \\t{\\r\\n    \\t\\tsetUp();\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\t\\r\\n    \\tinitialize();\\r\\n    \\t\\r\\n    \\tself.startAutoPlay = startAutoPlay;\\r\\n    \\tself.stopAutoPlay = stopAutoPlay;\\r\\n    \\tself.setPage = setPage;\\r\\n    \\tself.first = first;\\r\\n    \\tself.next = next;\\r\\n    \\tself.prev = prev;\\r\\n    \\tself.last = last;\\r\\n    \\tself.isFirst = isFirst;\\r\\n    \\tself.isLast = isLast;\\r\\n    \\tself.validPage = validPage;\\r\\n    \\tself.visibleSlides = visibleSlides;\\r\\n    \\tself.resize = resize;\\r\\n    \\t\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSCarousel;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSCarousel\\\",NSCarousel);\\\"use strict\\\";\\r\\nvar NSScrollAnimator = (function()\\r\\n{\\r\\n\\tfunction NSScrollAnimator(config) \\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar setting = {};\\r\\n\\t\\t\\r\\n\\t\\tvar util = null;\\r\\n\\t\\tvar stopScroll = false;\\r\\n\\t\\tvar start = 0;\\r\\n\\t\\tvar startTime = 0;\\r\\n\\t\\tvar destinationOffsetToScroll = 0;\\r\\n\\t\\tvar animationFunction = {};\\r\\n\\t\\tvar props = {};\\r\\n\\t\\tvar propItem = {};\\r\\n\\t\\tvar interval = null;\\r\\n\\t\\t\\r\\n\\t\\tvar initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!config)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tutil = new NSUtil();\\r\\n\\t\\t\\tinitAnimationFunc();\\r\\n\\t\\t\\tsetting = {\\r\\n\\t\\t\\t\\telement: config[\\\"element\\\"] || window,\\r\\n\\t\\t\\t\\tdirection: config[\\\"direction\\\"] || \\\"vertical\\\",\\r\\n\\t\\t\\t\\tduration: !util.isUndefinedOrNull(config[\\\"duration\\\"]) ? parseInt(config[\\\"duration\\\"]) : 500,\\r\\n\\t\\t\\t\\teasing: config[\\\"easing\\\"] || \\\"easeInOutQuad\\\",\\r\\n\\t\\t\\t\\tcallback: config[\\\"callback\\\"] || null,\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(setting.element === window)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetting.refElement = document.documentElement;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetting.refElement = setting.element;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tprops = { vertical:{scroll: \\\"scrollTop\\\", scrollSize: \\\"scrollHeight\\\",client: \\\"clientHeight\\\",offset: \\\"offsetHeight\\\",inner: \\\"innerHeight\\\",offsetPos: \\\"offsetTop\\\",},\\r\\n\\t\\t\\t\\t\\t  horizontal:{scroll: \\\"scrollLeft\\\", scrollSize: \\\"scrollWidth\\\",client: \\\"clientWidth\\\",offset: \\\"offsetWidth\\\",inner: \\\"innerWidth\\\",offsetPos: \\\"offsetLeft\\\",}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tpropItem = props[setting.direction];\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar scrollTo = function(newPos)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!util.isUndefinedOrNull(newPos))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstart = setting.refElement[propItem.scroll];\\r\\n\\t\\t\\t\\tstartTime = 'now' in window.performance ? performance.now() : new Date().getTime();\\r\\n\\t\\t\\t\\tvar outerSize = Math.max(setting.refElement[propItem.scrollSize], setting.refElement[propItem.offset], setting.refElement[propItem.offset]);\\r\\n\\t\\t\\t\\tvar innerSize = setting.refElement[propItem.inner] || setting.refElement[propItem.offset];\\r\\n\\t\\t\\t\\tvar destinationOffset = typeof newPos === 'number' ? newPos : newPos[propItem.offsetPos];\\r\\n\\t\\t\\t\\tdestinationOffsetToScroll = Math.round(outerSize - destinationOffset < innerSize ? outerSize - innerSize : destinationOffset);\\r\\n\\t\\t\\t\\tanimateScroll();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getMaxScrollPos = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn setting.refElement[propItem.scrollSize] - setting.refElement[propItem.client];\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getScrollPos = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn setting.refElement[propItem.scroll];\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar stop = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tstopScroll = true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar animateScroll = function() \\r\\n\\t\\t{\\r\\n           if (!stopScroll) \\r\\n           {\\r\\n        \\t   var now = 'now' in window.performance ? performance.now() : new Date().getTime();\\r\\n        \\t   var time = Math.min(1, ((now - startTime) / setting.duration));\\r\\n        \\t   var timeFunction = animationFunction[setting.easing](time);\\r\\n        \\t   var val = Math.ceil((timeFunction * (destinationOffsetToScroll - start)) + start);\\r\\n               setting.refElement[propItem.scroll] = val;\\r\\n               if (setting.refElement[propItem.scroll] === destinationOffsetToScroll) \\r\\n               {\\r\\n            \\t   if(setting.callback)\\r\\n                   {\\r\\n                \\t   setting.callback();\\r\\n                   }\\r\\n            \\t   return;\\r\\n               }\\r\\n               interval = util.getRequestAnimationFrame.bind(window)(animateScroll);\\r\\n           }\\r\\n           else\\r\\n           {\\r\\n        \\t   util.getCancelAnimationFrame.bind(window)(interval);\\r\\n        \\t   setting.refElement[propItem.scroll] = destinationOffsetToScroll;\\r\\n        \\t   if(setting.callback)\\r\\n        \\t   {\\r\\n        \\t\\t   setting.callback();\\r\\n        \\t   }\\r\\n           }\\r\\n       };\\r\\n       \\r\\n       var initAnimationFunc = function()\\r\\n       {\\r\\n    \\t   animationFunction = {\\r\\n\\t\\t\\t\\t    linear: function(t) {\\r\\n\\t\\t\\t\\t      return t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInQuad: function(t) {\\r\\n\\t\\t\\t\\t      return t * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeOutQuad: function(t) {\\r\\n\\t\\t\\t\\t      return t * (2 - t);\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInOutQuad: function(t) {\\r\\n\\t\\t\\t\\t      return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInCubic: function(t) {\\r\\n\\t\\t\\t\\t      return t * t * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeOutCubic: function(t) {\\r\\n\\t\\t\\t\\t      return (--t) * t * t + 1;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInOutCubic: function(t) {\\r\\n\\t\\t\\t\\t      return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInQuart: function(t) {\\r\\n\\t\\t\\t\\t      return t * t * t * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeOutQuart: function(t) {\\r\\n\\t\\t\\t\\t      return 1 - (--t) * t * t * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInOutQuart: function(t) {\\r\\n\\t\\t\\t\\t      return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * (--t) * t * t * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInQuint: function(t) {\\r\\n\\t\\t\\t\\t      return t * t * t * t * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeOutQuint: function(t) {\\r\\n\\t\\t\\t\\t      return 1 + (--t) * t * t * t * t;\\r\\n\\t\\t\\t\\t    },\\r\\n\\t\\t\\t\\t    easeInOutQuint: function(t) {\\r\\n\\t\\t\\t\\t      return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * (--t) * t * t * t * t;\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t};\\r\\n\\r\\n       };\\r\\n       \\r\\n       self.scrollTo = scrollTo;\\r\\n       self.getScrollPos = getScrollPos;\\r\\n       self.getMaxScrollPos = getMaxScrollPos;\\r\\n       self.stop = stop;\\r\\n\\t\\t\\r\\n\\t\\tinitialize();\\r\\n\\t};\\r\\n\\treturn NSScrollAnimator;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSScrollAnimator\\\",NSScrollAnimator);var NSTabNavigator = (function()\\r\\n{\\r\\n\\tfunction NSTabNavigator(component,setting) \\r\\n\\t{\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__animationType = {fade:{css:\\\"nsAnimateOpacity\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tleft:{css:\\\"nsAnimateLeft\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tright:{css:\\\"nsAnimateRight\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\ttop:{css:\\\"nsAnimateTop\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tbottom:{css:\\\"nsAnimateBottom\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tzoom:{css:\\\"nsAnimateZoom\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tslide:{css:\\\"nsAnimateSlide\\\",init:function(tabNav){\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif(!tabNav.carousel)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(tabNav.__config.contentParent != this.__doc)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar setting = {element:tabNav.__config.contentParent,enableTouch: false,enable3DAnimation: false,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tenableDirectionNavigation: false,enablePageNavigation: false,postionBuffer:0};\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar carousel = new NSCarousel(setting);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttabNav.carousel = carousel;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttabNav.util.warning(\\\"NSTabNavigator\\\",\\\"Slide Animation cannot be applied on document.\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t},setIndex: function(tabNav,index,item){\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif(tabNav.carousel)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttabNav.carousel.setPage(index);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\t\\t};\\r\\n\\t\\tthis.__isVertical = false;\\r\\n\\t\\tthis.__navInterval = null;\\r\\n\\t\\tthis.__overflowIsAnimating = false;\\r\\n\\t\\tthis.__overFlowScrollPos = 0;\\r\\n\\t\\tthis.__compIndicator = null;\\r\\n\\t\\tthis.__animationItem = null;\\r\\n\\t\\tthis.__objBrowser = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component,true);\\r\\n\\t};\\r\\n\\tnsExtendPrototype(NSContainerBase,NSTabNavigator);\\r\\n\\tNSTabNavigator.prototype.constructor = NSTabNavigator;\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.reRender = function()\\r\\n\\t{\\r\\n\\t\\tthis.__resizeHandler();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t\\tthis.__objBrowser = this.util.getBrowser();\\r\\n\\t\\tthis.__initTabs();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.base.componentResized(event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.renderAddedComponents = function() \\r\\n\\t{\\r\\n\\t\\t//assuming ContentSelector as Unique key here\\r\\n\\t\\tif(this.__config.arrObjTabs && this.__config.arrObjTabs.length) {\\r\\n\\t\\t\\tvar objTabs = this.__config.arrObjTabs.reduce(function(obj, item, index) {\\r\\n\\t\\t\\t\\t  obj[item.contentSelector] = {item: item, index: index, found: false};\\r\\n\\t\\t\\t\\t  return obj;\\r\\n\\t\\t\\t}, {});\\r\\n\\t\\t\\tvar arrTabs = this.__config.tabContainer.querySelectorAll(this.__config.tabParentElement);\\r\\n\\t\\t\\tfor(var count = 0;count < arrTabs.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objTab = this.__getTabObject(arrTabs[count]);\\r\\n\\t\\t\\t\\tif(objTab)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t//exists\\r\\n\\t\\t\\t\\t\\tif(objTabs[objTab.contentSelector]) {\\r\\n\\t\\t\\t\\t\\t\\tobjTabs[objTab.contentSelector].found = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t//not exists\\r\\n\\t\\t\\t\\t\\telse {\\r\\n\\t\\t\\t\\t\\t\\tthis.__config.arrObjTabs.push(objTab);\\r\\n\\t\\t\\t\\t\\t\\tthis.__initTab(objTab);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar contentSelector = null;\\r\\n\\t\\t\\tfor (contentSelector in objTabs) {\\r\\n\\t\\t\\t    if (objTabs.hasOwnProperty(contentSelector) && !objTabs[contentSelector].found) {\\r\\n\\t\\t\\t    \\tthis.__config.arrObjTabs.splice(objTabs[contentSelector].index,1);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t//this.__setDefault();\\r\\n\\t\\tthis.__resizeHandler();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tvar setting = this.__setting;\\r\\n\\t\\tif(!setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsetting = {};\\r\\n\\t\\t}\\r\\n\\t\\tthis.__config = {\\r\\n\\t\\t\\tcontext: setting[\\\"context\\\"] || this.__win,\\r\\n\\t\\t\\tenableCreateTabs: Boolean.parse(setting[\\\"enableCreateTabs\\\"]),\\r\\n\\t\\t\\tarrTabs: setting[\\\"arrTabs\\\"],\\r\\n\\t\\t\\ttabParentElement: (this.util.isUndefined(setting[\\\"tabParentElement\\\"])) ? \\\"li\\\" : setting[\\\"tabParentElement\\\"],\\r\\n\\t\\t\\ttabElement: setting[\\\"tabElement\\\"] || \\\"a\\\",\\r\\n\\t\\t\\ttabAttribute: setting[\\\"tabAttribute\\\"] || \\\"href\\\",\\r\\n\\t\\t\\tcontentParent: this.util.isUndefinedOrNull(setting[\\\"contentParent\\\"]) ? this.__doc : this.util.getElement(setting[\\\"contentParent\\\"]),\\r\\n\\t\\t\\tevent: setting[\\\"event\\\"] || \\\"click\\\",\\r\\n\\t\\t\\ttabTemplateCallback: setting[\\\"tabTemplateCallback\\\"],\\r\\n\\t\\t\\tenableHashChange: Boolean.parse(setting[\\\"enableHashChange\\\"]),\\r\\n\\t\\t\\tenableClose: Boolean.parse(setting[\\\"enableClose\\\"]),\\r\\n\\t\\t\\tenableAnimation: Boolean.parse(setting[\\\"enableAnimation\\\"]),\\r\\n\\t\\t\\tanimationType: setting[\\\"animationType\\\"] || \\\"Fade\\\",\\r\\n\\t\\t\\tenableOverflow: this.util.isUndefinedOrNull(setting[\\\"enableOverflow\\\"]) ? true : Boolean.parse(setting[\\\"enableOverflow\\\"]),\\r\\n\\t\\t\\textraLeftButtons:setting[\\\"extraLeftButtons\\\"],\\r\\n\\t\\t\\textraRightButtons:setting[\\\"extraRightButtons\\\"],\\r\\n\\t\\t\\toverflowScrollDistance: setting[\\\"overflowScrollDistance\\\"] ||  300,\\r\\n\\t\\t\\toverflowScrollDuration: setting[\\\"overflowScrollDuration\\\"] ||  300,\\r\\n\\t\\t\\tenableIndicator: this.util.isUndefinedOrNull(setting[\\\"enableIndicator\\\"]) ? true : Boolean.parse(setting[\\\"enableIndicator\\\"]),\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__initTabs = function()\\r\\n\\t{\\r\\n\\t\\tthis.__config.arrObjTabs = [];\\r\\n\\t\\tif(this.__config.contentParent != this.__doc)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__config.contentParent,\\\"nsTabContentParent\\\");\\r\\n\\t\\t\\tthis.__applyTheme(this.__config.contentParent,\\\"nsTabContentParent\\\");\\r\\n\\t\\t}\\r\\n\\t\\tthis.__config.tabContainer = this.__baseComponent;\\r\\n\\t\\tif(this.__config.enableCreateTabs)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.arrTabs && this.__config.arrTabs.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__createTabs();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSTabNavigator\\\",\\\"arrTabs property is blank for creating Dynamic Tabs.\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar parentElement = this.__config.tabContainer.parentElement;\\r\\n\\t\\tvar divParentParentParent = this.util.createDiv(this.getID() + \\\"ParentParentParent\\\",\\\"nsTabNavigatorParentParentParent\\\");\\r\\n\\t\\tvar divParentParent = this.util.createDiv(this.getID() + \\\"ParentParent\\\",\\\"nsTabNavigatorParentParent\\\");\\r\\n\\t\\tvar divParent = this.util.createDiv(this.getID() + \\\"Parent\\\",\\\"nsTabNavigatorParent\\\");\\r\\n\\t\\tdivParentParent.appendChild(divParent);\\r\\n\\t\\tdivParentParentParent.appendChild(divParentParent);\\r\\n\\t\\tparentElement.insertBefore(divParentParentParent,this.__config.tabContainer);\\r\\n\\t\\tdivParent.appendChild(this.__config.tabContainer);\\r\\n\\t\\tthis.__config.tabContainerParent = divParent;\\r\\n\\t\\tthis.__config.tabContainerParentParent = divParentParent;\\r\\n\\t\\tthis.__config.tabContainerParentParentParent = divParentParentParent;\\r\\n\\t\\tvar isLeftNavigator = (this.__config.enableOverflow || (this.__config.extraLeftButtons && this.__config.extraLeftButtons.length > 0));\\r\\n\\t\\tvar isRightNavigator = (this.__config.enableOverflow || (this.__config.extraRightButtons && this.__config.extraRightButtons.length > 0));\\r\\n\\t\\tif(isLeftNavigator)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar divLeftNavigator = this.util.createDiv(this.getID() + \\\"Left\\\",\\\"nsTabNavigatorLeft\\\");\\r\\n\\t\\t\\tdivParentParent.insertBefore(divLeftNavigator,divParent);\\r\\n\\t\\t\\tthis.__config.leftNavigator = divLeftNavigator;\\r\\n\\t\\t}\\r\\n\\t\\tif(isRightNavigator)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar divRightNavigator = this.util.createDiv(this.getID() + \\\"Right\\\",\\\"nsTabNavigatorRight\\\");\\r\\n\\t\\t\\tdivParentParent.appendChild(divRightNavigator);\\r\\n\\t\\t\\tthis.__config.rightNavigator = divRightNavigator;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__config.enableOverflow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createOverflowComp();\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.addStyleClass(this.__config.tabContainer,\\\"nsTabNavigator\\\");\\r\\n\\t\\tthis.__applyTheme(this.__config.tabContainer,\\\"nsTabNavigator\\\");\\r\\n\\t\\tvar arrTabs = this.__config.tabContainer.querySelectorAll(this.__config.tabParentElement);\\r\\n\\t\\tfor(var count = 0;count < arrTabs.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objTab = this.__getTabObject(arrTabs[count]);\\r\\n\\t\\t\\tif(objTab)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.arrObjTabs.push(objTab);\\r\\n\\t\\t\\t\\tthis.__initTab(objTab);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__config.enableIndicator)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createIndicator();\\r\\n\\t\\t}\\r\\n\\t\\tthis.__setDefault();\\r\\n\\t\\tthis.__resizeHandler();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__createTabs = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__config.arrTabs && this.__config.arrTabs.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < this.__config.arrTabs.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = this.__config.arrTabs[count];\\r\\n\\t\\t\\t\\tvar tab = this.util.createElement(this.__config.tabElement);\\r\\n\\t\\t\\t\\ttab.appendChild(this.__doc.createTextNode(item.tab));\\r\\n\\t\\t\\t\\tvar tabParent = this.util.createElement(this.__config.tabParentElement);\\r\\n\\t\\t\\t\\ttabParent.appendChild(tab);\\r\\n\\t\\t\\t\\tthis.__config.tabContainer.appendChild(tabParent);\\r\\n\\t\\t\\t\\tvar contentID = item.contentId;\\r\\n\\t\\t\\t\\tif(item.content)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcontentID = this.getID() + \\\"-\\\" + item.tab;\\r\\n\\t\\t\\t\\t\\tvar divContent = this.util.createDiv(contentID);\\r\\n\\t\\t\\t\\t\\tdivContent.innerHTML = item.content;\\r\\n\\t\\t\\t\\t\\tthis.__config.contentParent.appendChild(divContent);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\ttab.setAttribute(this.__config.tabAttribute,\\\"#\\\" + contentID);\\r\\n\\t\\t\\t\\tif(item.isDisabled)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttab.setAttribute(\\\"data-ns-disabled\\\",\\\"true\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(item.isHidden)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttab.setAttribute(\\\"data-ns-hidden\\\",\\\"true\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(item.isDefault)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttab.setAttribute(\\\"data-ns-default\\\",\\\"true\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(item.indicatorColor)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttab.setAttribute(\\\"data-ns-indicatorcolor\\\",item.indicatorColor);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__createIndicator = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__compIndicator)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__compIndicator = this.util.createElement(\\\"span\\\",this.getID() + \\\"Indicator\\\",\\\"nsTabIndicator\\\");\\r\\n\\t\\t\\tthis.__applyTheme(this.__compIndicator,\\\"nsTabIndicator\\\");\\r\\n\\t\\t\\tthis.__config.tabContainer.appendChild(this.__compIndicator);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__moveIndicator = function(item)\\r\\n\\t{\\r\\n\\t\\tif(this.__compIndicator)\\r\\n\\t\\t{\\r\\n\\t\\t\\t var textPosition = item.tabContainer.getBoundingClientRect();\\r\\n\\t         var container = this.__config.tabContainer.getBoundingClientRect().left;\\r\\n\\t         var distance = textPosition.left - container;\\r\\n             var scroll = this.__config.tabContainer.scrollLeft;\\r\\n             this.__compIndicator.style.transform = \\\"translateX(\\\" + (distance + scroll) + \\\"px) scaleX(\\\" + textPosition.width * 0.01 + \\\")\\\";\\r\\n             if (item.indicatorColor) \\r\\n             {\\r\\n            \\t this.__compIndicator.style.backgroundColor = item.indicatorColor;\\r\\n             }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__resizeHandler = function()\\r\\n\\t{\\r\\n\\t\\t//IE Bug not taking the Height\\r\\n\\t\\t//if(this.__objBrowser.isMSIE)\\r\\n\\t\\t//{\\r\\n\\t\\t\\tif(this.__config.tabContainer.offsetHeight > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar height = this.__config.tabContainer.offsetHeight + \\\"px\\\";\\r\\n\\t\\t\\t\\tvar parentID = this.getID() + \\\"ParentParentParent\\\";\\r\\n\\t\\t\\t\\tthis.util.addCSSClassInDOM([\\\"#\\\" + parentID,\\\"#\\\" + parentID + \\\" #\\\" + this.getID() + \\\"Left\\\",\\\"#\\\" + parentID + \\\" #\\\" + this.getID() + \\\"Right\\\"],[\\\"max-height:\\\" + height + \\\";\\\",\\\"max-height:\\\" + height + \\\";\\\",\\\"max-height:\\\" + height + \\\";\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t//}\\r\\n\\t\\tif(this.__config.enableOverflow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar overflowValue = this.__checkOverflow(this.__config.tabContainerParent,this.__config.tabContainer);\\r\\n\\t\\t\\tswitch(overflowValue)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase \\\"none\\\":\\r\\n\\t\\t\\t\\t\\tthis.__setOverflowCompDisplay(false);\\r\\n\\t\\t\\t\\t\\tthis.__setOverflowCompEnabled(true,true);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"both\\\":\\r\\n\\t\\t\\t\\t\\tthis.__setOverflowCompEnabled(true,true);\\r\\n\\t\\t\\t\\t\\tthis.__setOverflowCompDisplay(true);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"left\\\":\\r\\n\\t\\t\\t\\t\\tthis.__setOverflowCompEnabled(true,false);\\r\\n\\t\\t\\t\\t\\tthis.__setOverflowCompDisplay(true);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"right\\\":\\r\\n\\t\\t\\t\\t\\tthis.__setOverflowCompEnabled(false,true);\\r\\n\\t\\t\\t\\t\\tthis.__setOverflowCompDisplay(true);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__createOverflowComp = function()\\r\\n\\t{\\r\\n\\t\\tvar divOverflowLeft = this.util.createDiv(null,\\\"nsTabNav nsTabLeftArrow\\\");\\r\\n\\t\\tthis.__applyTheme(divOverflowLeft,\\\"nsTabNav\\\");\\r\\n\\t\\tdivOverflowLeft.innerHTML = \\\"<svg viewBox=\\\\\\\"0 0 40 40\\\\\\\" fill=\\\\\\\"currentColor\\\\\\\" height=\\\\\\\"100%\\\\\\\" width=\\\\\\\"100%\\\\\\\" style=\\\\\\\"vertical-align: middle;\\\\\\\"><g><path d=\\\\\\\"m25.7 12.3l-7.7 7.7 7.7 7.7-2.3 2.3-10-10 10-10z\\\\\\\"></path></g></svg>\\\";\\r\\n\\t\\tthis.__config.leftNavigator.appendChild(divOverflowLeft);\\r\\n\\t\\tthis.util.addEvent(divOverflowLeft,\\\"mousedown\\\",this.__navMouseDownHandler.bind(this,\\\"left\\\"));\\r\\n\\t\\tthis.util.addEvent(divOverflowLeft,\\\"mouseup mouseleave\\\",this.__navMouseLeaveHandler.bind(this,\\\"left\\\"));\\r\\n\\t\\tthis.__config.leftNav = divOverflowLeft;\\r\\n\\t\\tvar divOverflowRight = this.util.createDiv(null,\\\"nsTabNav nsTabRightArrow\\\");\\r\\n\\t\\tthis.__applyTheme(divOverflowRight,\\\"nsTabNav\\\");\\r\\n\\t\\tdivOverflowRight.innerHTML = \\\"<svg viewBox=\\\\\\\"0 0 40 40\\\\\\\" fill=\\\\\\\"currentColor\\\\\\\" height=\\\\\\\"100%\\\\\\\" width=\\\\\\\"100%\\\\\\\" style=\\\\\\\"vertical-align: middle;\\\\\\\"><g><path d=\\\\\\\"m16.6 10l10 10-10 10-2.3-2.3 7.7-7.7-7.7-7.7z\\\\\\\"></path></g></svg>\\\";\\r\\n\\t\\tthis.__config.rightNavigator.appendChild(divOverflowRight);\\r\\n\\t\\tthis.util.addEvent(divOverflowRight,\\\"mousedown\\\",this.__navMouseDownHandler.bind(this,\\\"right\\\"));\\r\\n\\t\\tthis.util.addEvent(divOverflowRight,\\\"mouseup mouseleave\\\",this.__navMouseLeaveHandler.bind(this,\\\"right\\\"));\\r\\n\\t\\tthis.__config.rightNav = divOverflowRight;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__navMouseDownHandler = function(direction,event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tvar tabContainer = this.__config.tabContainer;\\r\\n\\t\\t//var left = tabContainer.scrollLeft;\\r\\n\\t\\tvar scrollDistance = this.__config.overflowScrollDistance;\\r\\n\\t\\tvar maxScrollLeft = tabContainer.scrollWidth - tabContainer.clientWidth;\\r\\n\\t\\tvar scrollerAnimate = null;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar leftHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar left = tabContainer.scrollLeft;\\r\\n\\t\\t\\tif(left > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__overFlowScrollPos = Math.max(left - scrollDistance,0);\\r\\n\\t\\t\\t\\t//tabContainer.scrollLeft = (left - scrollDistance);\\r\\n\\t\\t\\t\\tanimate(self.__overFlowScrollPos);\\r\\n\\t\\t\\t\\tself.__overflowIsAnimating = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__navMouseLeaveHandler.call(self,\\\"left\\\",event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tvar rightHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar left = tabContainer.scrollLeft;\\r\\n\\t\\t\\tif(maxScrollLeft > left)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar outerWidth = self.util.getOuterWidth(tabContainer);\\r\\n\\t\\t\\t\\tself.__overFlowScrollPos = Math.min(left + tabContainer.scrollWidth - outerWidth);\\r\\n\\t\\t\\t\\t//tabContainer.scrollLeft = (left + scrollDistance);\\r\\n\\t\\t\\t\\tanimate(left + scrollDistance);\\r\\n\\t\\t\\t\\tself.__overflowIsAnimating = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__navMouseLeaveHandler.call(self,\\\"left\\\",event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tvar animate = function(newPos)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar scrollAnimateSetting = {element: tabContainer,direction:\\\"horizontal\\\",callback: callback};\\r\\n      \\t\\tscrollerAnimate = new NSScrollAnimator(scrollAnimateSetting);\\r\\n      \\t\\tscrollerAnimate.scrollTo(newPos);\\r\\n\\t\\t};\\r\\n\\t\\tvar callback = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tscrollerAnimate.stop();\\r\\n\\t\\t\\tself.__overflowIsAnimating = false;\\r\\n\\t\\t};\\r\\n\\t\\tif(this.__navInterval)\\r\\n\\t\\t{\\r\\n\\t\\t\\tclearInterval(this.__navInterval);\\r\\n\\t\\t\\tthis.__navInterval = null;\\r\\n\\t\\t}\\r\\n\\t\\tvar func = (direction == \\\"left\\\") ? leftHandler : rightHandler;\\r\\n\\t\\tfunc();\\r\\n\\t\\tthis.__navInterval = setInterval(function(){\\r\\n\\t\\t\\tif(!self.__overflowIsAnimating)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfunc();\\r\\n\\t\\t\\t}\\r\\n\\t    }, this.__config.overflowScrollDuration);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__navMouseLeaveHandler = function(direction,event)\\r\\n\\t{\\r\\n\\t\\tthis.__overflowIsAnimating = false;\\r\\n\\t\\tif(this.__navInterval)\\r\\n\\t\\t{\\r\\n\\t\\t\\tclearInterval(this.__navInterval);\\r\\n\\t\\t\\tthis.__navInterval = null;\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tsetTimeout(function(){\\r\\n\\t\\t\\t\\tself.__resizeHandler.call(self);\\r\\n\\t\\t\\t}, this.__config.overflowScrollDuration);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__setOverflowCompDisplay = function(isVisible)\\r\\n\\t{\\r\\n\\t\\tvar display = isVisible ? \\\"\\\" : \\\"none\\\";\\r\\n\\t\\tif(this.__config.leftNav)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.leftNav.style.display = display;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__config.rightNav)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.rightNav.style.display = display;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__setOverflowCompEnabled = function(isLeftEnabled,isRightEnabled)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.leftNav)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisLeftEnabled ? this.util.removeStyleClass(this.__config.leftNav,\\\"nsTabNavDisabled\\\") : this.util.addStyleClass(this.__config.leftNav,\\\"nsTabNavDisabled\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__config.rightNav)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisRightEnabled ? this.util.removeStyleClass(this.__config.rightNav,\\\"nsTabNavDisabled\\\") : this.util.addStyleClass(this.__config.rightNav,\\\"nsTabNavDisabled\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__setDefault = function()\\r\\n\\t{\\r\\n\\t\\tfor(var count = 0;count < this.__config.arrObjTabs.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__config.arrObjTabs[count];\\r\\n\\t\\t\\tif(item.isActive)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem.tabContainer[this.__config.event]();\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(!item || !item.isActive)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__config.arrObjTabs[0];\\r\\n\\t\\t\\titem.isActive = true;\\r\\n\\t\\t\\titem.tabContainer[this.__config.event]();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__showTab = function(item)\\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tif(this.__isItemNavigatable(item) && (!this.__config.selectedItem || this.__config.selectedItem.tab != item.tab))\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < this.__config.arrObjTabs.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar itemComp = this.__config.arrObjTabs[count];\\r\\n\\t\\t\\t\\tif(itemComp.tab == item.tab)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar itemDispatch = {tab:itemComp.tab,text:itemComp.tab.textContent,attributeValue:itemComp.contentSelector,content:itemComp.content};\\r\\n\\t\\t\\t\\t\\tvar cancelled = this.util.dispatchEvent(this.__baseComponent,NSTabNavigator.TAB_CHANGE_STARTING,itemDispatch,{selectedTab: itemDispatch},null,true);\\r\\n\\t\\t\\t\\t\\tif(cancelled)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tconsole.debug(\\\"NSTabNavigator: Tab Moved was cancelled\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__config.selectedItem = itemComp;\\r\\n\\t\\t\\t\\t\\t\\titemComp.isActive = true;\\r\\n\\t\\t\\t\\t\\t\\tthis.util.addStyleClass(itemComp.tabContainer,\\\"nsTabContainerActive\\\");\\r\\n\\t\\t\\t\\t\\t\\tthis.__updateContent(itemComp);\\r\\n\\t\\t\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t\\t\\t\\tif(this.__config.enableHashChange) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t                    if(history.pushState) \\r\\n\\t\\t                    {\\r\\n\\t\\t                        if (!this.__win.location.origin) \\r\\n\\t\\t                        {\\r\\n\\t\\t                        \\tthis.__win.location.origin = this.__win.location.protocol + \\\"//\\\" + this.__win.location.hostname + (this.__win.location.port ? ':' + this.__win.location.port: '');\\r\\n\\t\\t                        }\\r\\n\\t\\t                        history.pushState(null, null, this.__win.location.origin + this.__win.location.pathname + this.__win.location.search + itemComp.contentSelector);\\r\\n\\t\\t                    } \\r\\n\\t\\t                    else \\r\\n\\t\\t                    {\\r\\n\\t\\t                    \\tthis.__win.location.hash = itemComp.contentSelector;\\r\\n\\t\\t                    }\\r\\n\\t\\t                }\\r\\n\\t\\t\\t\\t\\t\\tthis.__moveIndicator(itemComp);\\r\\n\\t\\t\\t\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSTabNavigator.TAB_CHANGED,itemDispatch,{selectedTab: itemDispatch});\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSTabNavigator.TAB_CHANGE_END,itemDispatch,{selectedTab: itemDispatch});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titemComp.isActive = false;\\r\\n\\t\\t\\t\\t\\tthis.util.removeStyleClass(itemComp.tabContainer,\\\"nsTabContainerActive\\\");\\r\\n\\t\\t\\t\\t\\tthis.util.removeStyleClass(itemComp.content,\\\"nsTabContentActive\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__updateContent = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(item.content,\\\"nsTabContentActive\\\");\\r\\n\\t\\t\\tif(this.__animationItem && this.__animationItem.setIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = this.__getIndexByItem(item);\\r\\n\\t\\t\\t\\tthis.__animationItem.setIndex(this,index,item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__getTabObject = function(tabContainer)\\r\\n\\t{\\r\\n\\t\\tif(tabContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objReturn = {};\\r\\n\\t\\t\\tobjReturn.tabContainer = tabContainer;\\r\\n\\t\\t\\tobjReturn.tab = tabContainer.querySelector(this.__config.tabElement);\\r\\n\\t\\t\\tobjReturn.contentSelector = objReturn.tab.getAttribute(this.__config.tabAttribute) || objReturn.tabContainer.getAttribute(this.__config.tabAttribute);\\r\\n\\t\\t\\tobjReturn.content = this.__getContent(objReturn.contentSelector);\\r\\n\\t\\t\\tif(objReturn.content)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjReturn.isDisabled = objReturn.tab.hasAttribute(\\\"data-ns-disabled\\\") || objReturn.tabContainer.hasAttribute(\\\"data-ns-disabled\\\");\\r\\n\\t\\t\\t\\tobjReturn.isHidden = objReturn.tab.hasAttribute(\\\"data-ns-hidden\\\") || objReturn.tabContainer.hasAttribute(\\\"data-ns-hidden\\\");\\r\\n\\t\\t\\t\\tobjReturn.isActive = objReturn.tab.hasAttribute(\\\"data-ns-default\\\") || objReturn.tabContainer.hasAttribute(\\\"data-ns-default\\\");\\r\\n\\t\\t\\t\\tobjReturn.indicatorColor = objReturn.tab.hasAttribute(\\\"data-ns-indicatorcolor\\\") ? objReturn.tab.getAttribute(\\\"data-ns-indicatorcolor\\\") : (objReturn.tabContainer.hasAttribute(\\\"data-ns-indicatorcolor\\\") ? objReturn.tabContainer.hasAttribute(\\\"data-ns-indicatorcolor\\\") : null);\\r\\n\\t\\t\\t\\treturn objReturn;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__initTab = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addEvent(item.tabContainer,this.__config.event,this.__tabClickHandler.bind(this,item));\\r\\n\\t\\t\\tthis.util.addStyleClass(item.tabContainer,\\\"nsTabContainer\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(item.tab,\\\"nsTab\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(item.content,\\\"nsTabContent\\\");\\r\\n\\t\\t\\tthis.__applyTheme(item.content,\\\"nsTabContent\\\");\\r\\n\\t\\t\\tif(item.isHidden)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem.tab.setAttribute('aria-selected', 'false');\\r\\n\\t\\t\\t\\titem.tab.setAttribute('tabindex', '-1');\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(item.tabContainer,\\\"nsTabContainerHidden\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(item.isDisabled)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(item.tabContainer,\\\"nsTabContainerDisabled\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__config.enableClose && this.__isItemNavigatable(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar spanClose = this.util.createElement(\\\"span\\\",null,\\\"nsTabClose\\\");\\r\\n\\t\\t\\t\\tspanClose.innerHTML = \\\"&times;\\\";\\r\\n\\t\\t\\t\\titem.tabContainer.appendChild(spanClose);\\r\\n\\t\\t\\t\\titem.close = spanClose;\\r\\n\\t\\t\\t\\tthis.util.addEvent(spanClose,\\\"click\\\",this.__tabCloseHandler.bind(this,item));\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(item.tab,\\\"nsTabWithClose\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__config.enableAnimation && this.__config.animationType)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__animationType[this.__config.animationType.toLowerCase()])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__animationItem = this.__animationType[this.__config.animationType.toLowerCase()];\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(item.content,this.__animationItem.css);\\r\\n\\t\\t\\t\\t\\tif(this.__animationItem.init)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__animationItem.init(this);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.warning(\\\"NSTabNavigator\\\",\\\"Please mention a valid animation Type.\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__tabClickHandler = function(item,event)\\r\\n\\t{\\r\\n\\t\\tvar hasChanged = this.__showTab(item);\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tevent.preventDefault();\\r\\n\\t\\t/*if(this.__config.enableHashChange)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!hasChanged)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t}*/\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__tabCloseHandler = function(item,event)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t\\titem.isHidden = true;\\r\\n\\t\\t\\titem.tab.setAttribute('aria-selected', 'false');\\r\\n\\t\\t\\titem.tab.setAttribute('tabindex', '-1');\\r\\n\\t\\t\\tthis.util.addStyleClass(item.tabContainer,\\\"nsTabContainerHidden\\\");\\r\\n\\t\\t\\tvar prevItem = this.__getPrevActiveItem(item);\\r\\n\\t\\t\\tif(prevItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__showTab(prevItem);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar nextItem = this.__getNextActiveItem(item);\\r\\n\\t\\t\\t\\tif(nextItem)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__showTab(nextItem);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(item.content,\\\"nsTabContentHidden\\\");\\r\\n\\t\\t\\t\\t\\tthis.util.removeStyleClass(item.content,\\\"nsTabContentActive\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__isItemNavigatable = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item.isHidden || item.isDisabled)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__getContent = function(contentSelector)\\r\\n\\t{\\r\\n\\t\\tif(contentSelector)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar content = this.__config.contentParent.querySelector(contentSelector);\\r\\n\\t\\t\\treturn content;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__getPrevActiveItem = function(item)\\r\\n\\t{\\r\\n\\t\\tvar prevItem = null;\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < this.__config.arrObjTabs.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar itemComp = this.__config.arrObjTabs[count];\\r\\n\\t\\t\\t\\tif(itemComp.tab == item.tab)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__isItemNavigatable(itemComp))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tprevItem = itemComp;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn prevItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__getNextActiveItem = function(item)\\r\\n\\t{\\r\\n\\t\\tvar nextItem = null;\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar index = this.__getIndexByItem(item);\\r\\n\\t\\t\\tif(index > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = index + 1;count < this.__config.arrObjTabs.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar itemComp = this.__config.arrObjTabs[count];\\r\\n\\t\\t\\t\\t\\tif(this.__isItemNavigatable(itemComp))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tnextItem = itemComp;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t\\treturn nextItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__getIndexByItem = function(item)\\r\\n\\t{\\r\\n\\t\\tfor(var count = 0;count < this.__config.arrObjTabs.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar itemComp = this.__config.arrObjTabs[count];\\r\\n\\t\\t\\tif(itemComp.tab == item.tab)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn count;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__checkOverflow = function(parentElement,scrollElement)\\r\\n\\t{\\r\\n\\t\\tif(!parentElement || !scrollElement || !this.__isElementVisible(parentElement))\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn \\\"none\\\";\\r\\n\\t\\t}\\r\\n\\t\\t/*var parentElementWidth = this.__isVertical ? parentElement.offsetHeight : parentElement.offsetWidth;\\r\\n        var scrollElementWidth = this.__isVertical ? scrollElement.offsetHeight : scrollElement.offsetWidth;\\r\\n        if (parentElementWidth === scrollElementWidth) \\r\\n        {\\r\\n            itemWidth = this.itemWidthCal(this.scrollModule ? this.getScrollCntEle(innerItem) : innerItem);\\r\\n        }*/\\r\\n\\t\\tvar outerWidth = this.util.getOuterWidth(scrollElement);\\r\\n\\t\\tif(scrollElement.scrollWidth > outerWidth)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif((scrollElement.scrollWidth - outerWidth != scrollElement.scrollLeft) && scrollElement.scrollLeft != 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn \\\"both\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//right disabled\\r\\n\\t\\t\\telse if(scrollElement.scrollWidth - outerWidth == scrollElement.scrollLeft)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn \\\"left\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//left disabled\\r\\n\\t\\t\\telse if(scrollElement.scrollLeft == 0) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn \\\"right\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn \\\"none\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__itemWidthCal = function(element)\\r\\n\\t{\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.prototype.__isElementVisible = function(element)\\r\\n\\t{\\r\\n\\t\\treturn (element.style.visibility === \\\"\\\" && element.offsetWidth > 0);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTabNavigator.TAB_CHANGE_STARTING = \\\"tabChangeStarting\\\";\\r\\n\\tNSTabNavigator.TAB_CHANGED = \\\"tabChanged\\\";\\r\\n\\tNSTabNavigator.TAB_CHANGE_END = \\\"tabChangeEnd\\\";\\r\\n\\t\\r\\n\\treturn NSTabNavigator;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSTabNavigator\\\",NSTabNavigator);\";","export const NSTableRowMoverCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\nvar svgRef = require('./nsSVG.min.js');\\r\\nvar NSSvg = svgRef.NSSvg;\\r\\nvar NSSvgShapes = svgRef.NSSvgShapes;\\r\\nvar plugginsRef = require('./nsPluggins.min.js');\\r\\nvar nsTextEditor = plugginsRef.nsTextEditor;\\r\\nvar nsTextAreaEditor = plugginsRef.nsTextAreaEditor;\\r\\nvar NSCellSelection = plugginsRef.NSCellSelection;\\r\\nvar NSTableCellNavigator = plugginsRef.NSTableCellNavigator;\\r\\nvar dateutilRef = require('./nsDateUtil.min.js');\\r\\nvar NSDateUtil = dateutilRef.NSDateUtil;\\r\\n\\r\\n\\t\\t}\\r\\n\\\"use strict\\\";\\r\\nvar NSTableRowMover = (function()\\r\\n{\\r\\n\\tfunction NSTableRowMover(setting) \\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\t\\r\\n\\t\\tthis.__id = null;\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__currentRow = null;\\r\\n\\t\\tthis.__targetRow = null;\\r\\n\\t\\tthis.__rowMouseOffset = null;\\r\\n\\t\\tthis.__lastYPos = 0;\\r\\n\\t\\tthis.__oldIndex = -1;\\r\\n\\t\\tthis.__touchSupport = false;\\r\\n\\t\\tthis.__touchID = null;\\r\\n\\t\\tthis.__divGhost = null;\\r\\n\\t\\tthis.__verticalOffset = 0;\\r\\n\\t\\tthis.__rowIndex = 0;\\r\\n\\t\\tthis.__mapRowIndex = {};\\r\\n\\t\\t\\r\\n\\t\\tthis.__divMovable = null;\\r\\n\\t\\tthis.__lastVisitedRow = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__mouseMoveRef = null;\\r\\n\\t\\tthis.__documentMouseUpRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.remove = function() \\r\\n\\t{ \\r\\n\\t\\tthis.__removeDocumentEvents();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.processRows = function() \\r\\n\\t{ \\r\\n\\t\\tthis.__processRows();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__initialize = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\ttable: this.__setting[\\\"table\\\"] || null,\\r\\n\\t\\t\\t\\t\\tisSameTableMove: (this.util.isUndefined(this.__setting[\\\"isSameTableMove\\\"]) || this.__setting[\\\"isSameTableMove\\\"] === null) ? true : Boolean.parse(this.__setting[\\\"isSameTableMove\\\"]),\\r\\n\\t\\t\\t\\t\\tdroppableTable: this.__setting[\\\"droppableTable\\\"] || null,\\r\\n\\t\\t\\t\\t\\thandler: this.__setting[\\\"handler\\\"] || null,\\r\\n\\t\\t\\t\\t\\tdragStartHandler: (this.__setting[\\\"dragStartHandler\\\"] ? this.util.getFunction(this.__setting[\\\"dragStartHandler\\\"]) : null),\\r\\n\\t\\t\\t\\t\\tdragHandler: (this.__setting[\\\"dropHandler\\\"] ? this.util.getFunction(this.__setting[\\\"dropHandler\\\"]) : null),\\r\\n\\t\\t\\t\\t\\tdragEndHandler: (this.__setting[\\\"dragEndHandler\\\"] ? this.util.getFunction(this.__setting[\\\"dragEndHandler\\\"]) : null),\\r\\n\\t\\t\\t\\t\\tcustomClass: this.__setting[\\\"customClass\\\"] || {table: null,dragRow: null},\\r\\n\\t\\t\\t\\t\\tenableAnimation: Boolean.parse(this.__setting[\\\"enableAnimation\\\"]),\\r\\n\\t\\t\\t\\t\\tenableMovingText: Boolean.parse(this.__setting[\\\"enableMovingText\\\"]),\\r\\n\\t\\t\\t\\t\\tmovingTextCallback: (this.__setting[\\\"movingTextCallback\\\"] ? this.util.getFunction(this.__setting[\\\"movingTextCallback\\\"]) : null),\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(this.__config.table)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__processTableForAnimation();\\r\\n\\t\\t\\t\\tthis.__touchSupport = !!(\\\"ontouchstart\\\" in document);\\r\\n\\t\\t\\t\\tthis.__processRows();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__processRows = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__config.enableAnimation)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__verticalOffset = 0;\\r\\n\\t\\t\\tthis.__rowIndex = 0;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__config.table.tHead && this.__config.table.tHead.rows)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rows = this.__config.table.tHead.rows;\\r\\n\\t\\t\\tfor (var count = 0; count < rows.length; count++) \\r\\n\\t        {\\r\\n\\t        \\tvar row = rows[count];\\r\\n\\t        \\trow.setAttribute(\\\"nsDropAllowed\\\",false);\\r\\n\\t        \\tthis.__makeRowAbsolute(row);\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t\\tvar rows = this.__config.table.tBodies[0].rows;\\r\\n        for (var count = 0; count < rows.length; count++) \\r\\n        {\\r\\n        \\tvar row = rows[count];\\r\\n        \\tvar dragAllowed = true;\\r\\n    \\t\\tif(this.util.hasAttribute(row,\\\"nsDragAllowed\\\"))\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tdragAllowed = Boolean.parse(this.util.getAttribute(row,\\\"nsDragAllowed\\\"));\\r\\n    \\t\\t}\\r\\n\\t\\t\\tif (dragAllowed) \\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\tthis.__makeRowDraggable(row);\\r\\n\\t\\t\\t}\\r\\n        }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__processTableForAnimation = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__config.enableAnimation)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.table.style.position = \\\"relative\\\";\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__rowMouseDownHandler= function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t    var target = this.util.getTarget(event);\\r\\n\\t    target = this.util.findParent(target,\\\"TR\\\");\\r\\n\\t    var offset = this.util.getMouseOffset(event,target);\\r\\n\\t    var posEvent = this.util.getEventPosition(event);\\r\\n        this.__mouseStartEvent = event;\\r\\n\\t    if(this.__dragStart(target,offset,posEvent))\\r\\n\\t    {\\r\\n\\t    \\tevent.preventDefault();\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__rowTouchStartHandler= function(event)\\r\\n\\t{\\r\\n\\t\\tif(event.touches.length === 1) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar touch = event.touches[0];\\r\\n\\t        this.__touchStart = touch;\\r\\n\\t\\t\\tthis.__touchID = touch.identifier;\\r\\n            target = document.elementFromPoint(touch.clientX, touch.clientY);\\r\\n\\t\\t    target = this.util.findParent(target,\\\"TR\\\");\\r\\n\\t\\t    var offset = this.util.getMouseOffset(touch,target);\\r\\n\\t\\t    var posEvent = this.util.getEventPosition(touch);\\r\\n\\t\\t    if(this.__dragStart(target,offset,posEvent))\\r\\n\\t\\t    {\\r\\n\\t\\t    \\t if(event.preventDefault) \\r\\n\\t\\t    \\t {\\r\\n\\t\\t    \\t\\t event.preventDefault();\\r\\n\\t             } \\r\\n\\t\\t    \\t else \\r\\n\\t\\t    \\t {\\r\\n\\t\\t    \\t\\t event.returnValue = false;\\r\\n\\t             }\\r\\n\\t\\t    \\t return false;\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t\\t return true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__mouseMoveHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__currentRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar mousePosition = this.util.getEventPosition(event);\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\tvar posEvent = this.util.getEventPosition(event);\\r\\n\\t\\t\\tif(this.__dragging(target,mousePosition,posEvent,event,this.__mouseStartEvent))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t event.preventDefault();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__touchMoveHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(event.touches.length === 1 && this.__currentRow) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar touch = event.touches[0];\\r\\n            var target = document.elementFromPoint(touch.clientX, touch.clientY);\\r\\n            var position = this.util.getEventPosition(touch);\\r\\n \\t\\t    var posEvent = this.util.getEventPosition(touch);\\r\\n \\t\\t    if(this.__dragging(target,position,posEvent,touch,this.__touchStart))\\r\\n\\t\\t\\t{\\r\\n \\t\\t    \\t if(event.preventDefault) \\r\\n\\t\\t    \\t {\\r\\n\\t\\t    \\t\\t event.preventDefault();\\r\\n\\t             } \\r\\n\\t\\t    \\t else \\r\\n\\t\\t    \\t {\\r\\n\\t\\t    \\t\\t event.returnValue = false;\\r\\n\\t             }\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__documentMouseUpHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__currentRow) \\r\\n\\t    {\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar mousePosition = this.util.getEventPosition(event);\\r\\n\\t\\t\\tthis.__dragEnd(mousePosition);\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__documentTouchUpHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(event.touches.length === 1 && this.__currentRow) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar touch = event.touches[0];\\r\\n            var position = this.util.getEventPosition(touch);\\r\\n            this.__dragEnd(position);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__dragStart = function(target,offset,posEvent) \\r\\n\\t{\\r\\n\\t\\tthis.__currentRow = target;\\r\\n\\t    this.__rowMouseOffset = offset;\\r\\n\\t    this.util.makeBodyUnselectable();\\r\\n\\t    if(this.__currentRow)\\r\\n\\t    {\\r\\n\\t    \\tthis.__oldIndex = this.__currentRow.rowIndex;\\r\\n\\t    \\tif(this.__config.dragStartHandler)\\r\\n            {\\r\\n            \\tthis.__config.dragStartHandler(this.__currentRow,{targetTable: this.__config.table,targetRow: this.__currentRow,oldIndex:this.__oldIndex});\\r\\n            }\\r\\n\\t    \\tthis.__applyCustomClass(this.__config.table,\\\"table\\\",null);\\r\\n\\t    \\tthis.__applyCustomClass(this.__currentRow,\\\"dragRow\\\",\\\"nsDraggingRow\\\");\\r\\n\\t\\t\\tif(!this.__config.isSameTableMove)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divMovable = this.util.createDiv(this.__getID() + \\\"clonedRow\\\", \\\"nsDraggableCloneRow\\\");\\r\\n\\t\\t\\t\\tvar table = document.createElement(\\\"table\\\");\\r\\n\\t\\t\\t\\tvar body = document.createElement(\\\"tbody\\\");\\r\\n\\t\\t\\t\\tvar row = this.__currentRow.cloneNode(true);\\r\\n\\t\\t\\t\\tbody.appendChild(row);\\r\\n\\t\\t\\t\\ttable.appendChild(body);\\r\\n\\t\\t\\t\\tthis.__divMovable.appendChild(table);\\r\\n\\t\\t\\t\\tdocument.body.appendChild(this.__divMovable);\\r\\n\\t\\t\\t\\tthis.__setDivMovablePosition(posEvent);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__addDocumentEvents();\\r\\n\\t\\t\\tthis.__createGhost(this.__currentRow);\\r\\n\\t\\t\\treturn true;\\r\\n\\t    }\\r\\n\\t    return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__dragging = function(target,position,posEvent,event,startEvent) \\r\\n\\t{\\r\\n\\t\\tif(this.__currentRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar yPos = position.top - this.__rowMouseOffset.y;\\r\\n\\t        if(yPos != this.__lastYPos) \\r\\n\\t        {\\r\\n\\t            var movingDown = yPos > this.__lastYPos;\\r\\n\\t            this.__lastYPos = yPos;\\r\\n\\t            if(this.__config.isSameTableMove) \\r\\n\\t            {\\r\\n\\t            \\tthis.__targetRow = this.util.findParent(target,\\\"TR\\\");\\r\\n\\t            \\tvar isAppendChild = false;\\r\\n\\t            \\tvar moveRow = null;\\r\\n\\t\\t            if(this.__targetRow && this.__currentRow != this.__targetRow) \\r\\n\\t\\t            {\\r\\n\\t\\t            \\tthis.__positionGhost(event);\\r\\n\\t\\t            \\tmoveRow = this.__targetRow;\\r\\n\\t\\t            \\tif(this.__config.enableAnimation)\\r\\n\\t                \\t{\\r\\n\\t\\t                \\tif(this.__isRowDropable(moveRow,this.__currentRow))\\r\\n\\t\\t                \\t{\\r\\n\\t\\t\\t\\t            \\tvar currentProp = this.__currentRow.getAttribute(\\\"data-rowMover-id\\\");\\r\\n\\t\\t\\t\\t            \\tvar targetProp = this.__targetRow.getAttribute(\\\"data-rowMover-id\\\");\\r\\n\\t\\t\\t\\t                var currentValue = this.__mapRowIndex[currentProp].top;\\r\\n\\t\\t\\t\\t                var targetValue = this.__mapRowIndex[targetProp].top;\\r\\n\\t\\t\\t\\t                this.__currentRow.style.transform = \\\"translateY(\\\" + targetValue + \\\"px)\\\";\\r\\n\\t\\t\\t\\t                this.__targetRow.style.transform = \\\"translateY(\\\" + currentValue + \\\"px)\\\";\\r\\n\\t\\t\\t\\t                this.__mapRowIndex[currentProp].top = targetValue;\\r\\n\\t\\t\\t\\t                this.__mapRowIndex[targetProp].top = currentValue;\\r\\n\\t\\t                \\t}\\r\\n\\t                \\t}\\r\\n\\t\\t            \\telse\\r\\n\\t\\t            \\t{\\r\\n\\t\\t\\t                if (movingDown) \\r\\n\\t\\t\\t                {\\r\\n\\t\\t\\t                \\tif(this.__targetRow.nextSibling)\\r\\n\\t\\t\\t                \\t{\\r\\n\\t\\t\\t                \\t\\tmoveRow = this.__targetRow.nextSibling;\\r\\n\\t\\t\\t                \\t}\\r\\n\\t\\t\\t                \\telse\\r\\n\\t\\t\\t                \\t{\\r\\n\\t\\t\\t                \\t\\tmoveRow = this.__currentRow;\\r\\n\\t\\t\\t                \\t\\tisAppendChild = true;\\r\\n\\t\\t\\t                \\t}\\r\\n\\t\\t\\t                } \\r\\n\\t\\t\\t                else if (!movingDown) \\r\\n\\t\\t\\t                {\\r\\n\\t\\t\\t                \\tmoveRow = this.__targetRow;\\r\\n\\t\\t\\t                }\\r\\n\\t\\t\\t                if(moveRow)\\r\\n\\t\\t\\t                {\\r\\n\\t\\t\\t                \\tif(this.__isRowDropable(moveRow,this.__currentRow))\\r\\n\\t\\t\\t                \\t{\\r\\n\\t\\t\\t\\t                \\tif(this.__config.enableAnimation)\\r\\n\\t\\t\\t\\t                \\t{\\r\\n\\t\\t\\t\\t\\t\\t            \\tvar currentProp = this.__currentRow.getAttribute(\\\"data-rowMover-id\\\");\\r\\n\\t\\t\\t\\t\\t\\t            \\tvar targetProp = this.__targetRow.getAttribute(\\\"data-rowMover-id\\\");\\r\\n\\t\\t\\t\\t\\t\\t                var currentValue = this.__mapRowIndex[currentProp].top;\\r\\n\\t\\t\\t\\t\\t\\t                var targetValue = this.__mapRowIndex[targetProp].top;\\r\\n\\t\\t\\t\\t\\t\\t                this.__currentRow.style.transform = \\\"translateY(\\\" + targetValue + \\\"px)\\\";\\r\\n\\t\\t\\t\\t\\t\\t                this.__targetRow.style.transform = \\\"translateY(\\\" + currentValue + \\\"px)\\\";\\r\\n\\t\\t\\t\\t\\t\\t                this.__mapRowIndex[currentProp].top = targetValue;\\r\\n\\t\\t\\t\\t\\t\\t                this.__mapRowIndex[targetProp].top = currentValue;\\r\\n\\t\\t\\t\\t                \\t}\\r\\n\\t\\t\\t\\t                \\telse\\r\\n\\t\\t\\t\\t                \\t{\\r\\n\\t\\t\\t\\t                \\t\\tvar parent = this.__targetRow.parentNode;\\r\\n\\t\\t\\t\\t                \\t\\tif(isAppendChild)\\r\\n\\t\\t\\t\\t                \\t\\t{\\r\\n\\t\\t\\t\\t                \\t\\t\\tparent.appendChild(moveRow);\\r\\n\\t\\t\\t\\t                \\t\\t}\\r\\n\\t\\t\\t\\t                \\t\\telse\\r\\n\\t\\t\\t\\t                \\t\\t{\\r\\n\\t\\t\\t\\t                \\t\\t\\tparent.insertBefore(this.__currentRow,moveRow);\\r\\n\\t\\t\\t\\t                \\t\\t}\\r\\n\\t\\t\\t\\t\\t                }\\r\\n\\t\\t\\t\\t                }\\r\\n\\t\\t\\t                }\\r\\n\\t\\t            \\t}\\r\\n\\t\\t            \\tif(moveRow && this.__config.dragHandler)\\r\\n\\t    \\t            {\\r\\n\\t    \\t            \\tthis.__config.dragHandler(this.__currentRow,{targetTable: this.__config.table,targetRow: moveRow,oldIndex:this.__oldIndex,newIndex:moveRow.rowIndex});\\r\\n\\t    \\t            }\\r\\n\\t\\t            }\\r\\n\\t            }\\r\\n\\t            else if(this.__divMovable)\\r\\n\\t            {\\r\\n\\t            \\tif(this.__lastVisitedRow)\\r\\n\\t            \\t{\\r\\n\\t            \\t\\tthis.util.removeStyleClass(this.__lastVisitedRow,\\\"nsDottedRow\\\");\\r\\n\\t            \\t\\tthis.__lastVisitedRow = null;\\r\\n\\t            \\t}\\r\\n\\t            \\tthis.__setDivMovablePosition(posEvent);\\r\\n\\t            \\tthis.__divMovable.style.display = \\\"none\\\";\\r\\n\\t        \\t\\tvar target = document.elementFromPoint(position.left,position.top);\\r\\n\\t        \\t\\t//for Opera\\r\\n\\t        \\t\\tif (target.nodeType === 3) \\r\\n\\t        \\t\\t{ \\r\\n\\t        \\t\\t\\ttarget = target.parentNode;\\r\\n\\t        \\t\\t}\\r\\n\\t        \\t\\tvar targetTable = this.util.findChild(target,\\\"TABLE\\\");\\r\\n\\t        \\t\\tif(!targetTable)\\r\\n\\t        \\t\\t{\\r\\n\\t        \\t\\t\\ttargetTable = this.util.findParent(target,\\\"TABLE\\\");\\r\\n\\t        \\t\\t}\\r\\n\\t        \\t\\tif(targetTable && targetTable.id != this.__config.table.id)\\r\\n\\t        \\t\\t{\\r\\n\\t        \\t\\t\\tvar targetRow = this.__findDroppableRow(targetTable,mousePosition.top);\\r\\n\\t        \\t\\t\\tif(targetRow)\\r\\n\\t        \\t\\t\\t{\\r\\n\\t        \\t\\t\\t\\tif(this.__config.dragHandler)\\r\\n\\t\\t    \\t            {\\r\\n\\t\\t    \\t            \\tthis.__config.dragHandler(this.__currentRow,{targetTable: targetTable,targetRow: targetRow,oldIndex:this.__oldIndex,newIndex:targetRow.rowIndex});\\r\\n\\t\\t    \\t            }\\r\\n\\t\\t            \\t\\tthis.util.addStyleClass(targetRow,\\\"nsDottedRow\\\");\\r\\n\\t\\t            \\t\\tthis.__lastVisitedRow = targetRow;\\r\\n\\t        \\t\\t\\t}\\r\\n\\t        \\t\\t}\\r\\n\\t        \\t\\tthis.__divMovable.style.display = \\\"\\\";\\r\\n\\t            }\\r\\n\\t            return true;\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__dragEnd = function(position) \\r\\n\\t{\\r\\n\\t\\tthis.__removeDocumentEvents();\\r\\n\\t    if(this.__currentRow) \\r\\n\\t    {\\r\\n\\t    \\tvar droppedRow = this.__currentRow;\\r\\n\\t    \\tthis.__removeCustomClass(this.__config.table,\\\"table\\\",null);\\r\\n\\t    \\tthis.__removeCustomClass(this.__currentRow,\\\"dragRow\\\",\\\"nsDraggingRow\\\");\\r\\n\\t    \\tif(this.__config.isSameTableMove)\\r\\n\\t    \\t{\\r\\n\\t            if(this.__config.dragEndHandler)\\r\\n\\t            {\\r\\n\\t            \\tthis.__config.dragEndHandler(this.__currentRow,{targetTable: this.__config.table,targetRow: this.__targetRow,oldIndex:this.__oldIndex,newIndex:this.__currentRow.rowIndex});\\r\\n\\t            }\\r\\n\\t    \\t}\\r\\n\\t    \\telse if(this.__divMovable)\\r\\n\\t        {\\r\\n\\t    \\t\\tthis.__divMovable.style.display = \\\"none\\\";\\r\\n\\t    \\t\\tvar target = document.elementFromPoint(position.left,position.top);\\r\\n\\t    \\t\\t//for Opera\\r\\n\\t    \\t\\tif (target.nodeType === 3) \\r\\n\\t    \\t\\t{ \\r\\n\\t    \\t\\t\\ttarget = target.parentNode;\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t\\tvar targetTable = this.util.findChild(target,\\\"TABLE\\\");\\r\\n\\t    \\t\\tif(!targetTable)\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\ttargetTable = this.util.findParent(target,\\\"TABLE\\\");\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t\\tvar targetRow = this.__findDroppableRow(targetTable,position.top);\\r\\n\\t    \\t\\tif(this.__lastVisitedRow)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tthis.util.removeStyleClass(this.__lastVisitedRow,\\\"nsDottedRow\\\");\\r\\n\\t        \\t\\tthis.__lastVisitedRow = null;\\r\\n\\t        \\t}\\r\\n\\t    \\t\\tthis.__divMovable.parentNode.removeChild(this.__divMovable);\\r\\n\\t    \\t\\tthis.__divMovable = null;\\r\\n\\t    \\t\\tif(this.__config.dragEndHandler)\\r\\n\\t            {\\r\\n\\t            \\tthis.__config.dragEndHandler(this.__currentRow,{targetTable: targetTable,targetRow: targetRow,oldIndex:this.__oldIndex,newIndex:this.__currentRow.rowIndex});\\r\\n\\t            }\\r\\n\\t    \\t}\\r\\n\\t        this.__currentRow = null;\\r\\n\\t        this.__oldIndex = -1;\\r\\n\\t        this.__removeGhost();\\r\\n\\t        this.util.makeBodySelectable();\\r\\n\\t        return true;\\r\\n\\t    }\\r\\n\\t    return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__getComputedTranslateXY = function(obj)\\r\\n\\t{\\r\\n\\t\\tconst transArr = [];\\r\\n\\t    if(!window.getComputedStyle) return;\\r\\n\\t    const style = window.getComputedStyle(obj),\\r\\n\\t        transform = style.transform || style.webkitTransform || style.mozTransform;\\r\\n\\t    let mat = transform.match(/^matrix3d\\\\((.+)\\\\)$/);    \\r\\n\\t    if(mat) return parseFloat(mat[1].split(', ')[13]);\\r\\n\\t    mat = transform.match(/^matrix\\\\((.+)\\\\)$/);\\r\\n\\t    mat ? transArr.push(parseFloat(mat[1].split(', ')[4])) : 0;\\r\\n\\t    mat ? transArr.push(parseFloat(mat[1].split(', ')[5])) : 0;\\r\\n\\t    console.log(transArr);\\r\\n\\t    return transArr;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__makeRowDraggable = function(row) \\r\\n\\t{\\r\\n\\t    if(row)\\r\\n\\t    {\\r\\n\\t    \\tthis.__makeRowAbsolute(row);\\r\\n\\t    \\tif(!this.util.hasStyleClass(row,\\\"nsDraggableRow\\\"))\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tthis.util.addStyleClass(row,\\\"nsDraggableRow\\\");\\r\\n\\t    \\t\\tif(this.__config.handler)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tvar handler = row.querySelector(this.__config.handler);\\r\\n\\t\\t    \\t\\tif(handler)\\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\tif(this.__touchSupport)\\r\\n\\t\\t\\t\\t    \\t{\\r\\n\\t\\t\\t\\t    \\t\\tthis.util.addEvent(handler,\\\"touchstart\\\",this.__rowTouchStartHandler.bind(this));\\r\\n\\t\\t\\t\\t    \\t}\\r\\n\\t\\t\\t\\t    \\telse\\r\\n\\t\\t\\t\\t    \\t{\\r\\n\\t\\t\\t\\t    \\t\\tthis.util.addEvent(handler,\\\"mousedown\\\",this.__rowMouseDownHandler.bind(this));\\r\\n\\t\\t\\t\\t    \\t}\\r\\n\\t\\t    \\t\\t}\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\telse\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.util.addStyleClass(row,\\\"nsDraggableRowDrag\\\");\\r\\n\\t\\t    \\t\\tif(this.__touchSupport)\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tthis.util.addEvent(row,\\\"touchstart\\\",this.__rowTouchStartHandler.bind(this));\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    \\telse\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tthis.util.addEvent(row,\\\"mousedown\\\",this.__rowMouseDownHandler.bind(this));\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t    \\t}\\r\\n\\t    \\t}\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__makeRowAbsolute = function(row) \\r\\n\\t{\\r\\n\\t\\tvar rect = row.getBoundingClientRect();\\r\\n        console.log(row.clientHeight + \\\" == \\\" + rect.height);\\r\\n\\t\\tif(this.__config.enableAnimation)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rowID = \\\"row-\\\" + (this.__rowIndex++);\\r\\n\\t\\t\\tthis.util.addStyleClass(row,\\\"nsTableRowMoverAnimation\\\");\\r\\n\\t\\t\\trow.setAttribute(\\\"data-rowMover-id\\\",rowID);\\r\\n\\t\\t\\trow.style.transform = \\\"translateY(\\\" + this.__verticalOffset + \\\"px)\\\";\\r\\n\\t\\t\\tthis.__mapRowIndex[rowID] = {top: this.__verticalOffset};\\r\\n\\t\\t\\tthis.__verticalOffset += this.util.getOuterHeight(row);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__isRowDropable = function(row,movingRow) \\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tif(row && this.util.isElement(row) && this.util.isElementOfType(row,\\\"TR\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = true;\\r\\n\\t\\t\\tif(this.util.hasAttribute(row,\\\"nsDropAllowed\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = Boolean.parse(this.util.getAttribute(row,\\\"nsDropAllowed\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__findDroppableRow = function(table,yPos) \\r\\n\\t{\\r\\n\\t\\tif(table && table.tBodies && table.tBodies.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rows = table.tBodies[0].rows;\\r\\n\\t\\t\\tfor (var count = 0; count < rows.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar row = rows[count];\\r\\n\\t\\t\\t\\tvar dropAllowed = true;\\r\\n\\t\\t\\t\\tif(row.getAttribute(\\\"nsDropAllowed\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdropAllowed = Boolean.parse(row.getAttribute(\\\"nsDropAllowed\\\"));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(dropAllowed) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar offset = this.util.getCumulativeOffset(row);\\r\\n\\t\\t\\t\\t\\tvar rowHeight = parseInt(row.offsetHeight)/2;\\r\\n\\t\\t\\t\\t\\tif (row.offsetHeight === 0) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\toffset = this.util.getCumulativeOffset(row.firstChild);\\r\\n\\t\\t\\t\\t\\t\\trowHeight = parseInt(row.firstChild.offsetHeight)/2;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t//console.log(\\\"yPos::\\\" + yPos + \\\",offset.y::\\\" + offset.y + \\\",rowHeight::\\\" + rowHeight);\\r\\n\\t\\t\\t\\t\\t// Because we always have to insert before, we need to offset the height a bit\\r\\n\\t\\t\\t\\t\\tif ((yPos > offset.y - rowHeight) && (yPos < (offset.y + rowHeight))) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn row;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tconsole.log(row.innerText);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__setDivMovablePosition = function(posEvent)\\r\\n\\t{\\r\\n\\t\\tif(this.__divMovable)\\r\\n\\t    {\\r\\n\\t    \\tthis.__divMovable.style.left = posEvent.left + \\\"px\\\";\\r\\n\\t    \\tthis.__divMovable.style.top = posEvent.top + \\\"px\\\";\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__addDocumentEvents = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__touchSupport)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__mouseMoveRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__mouseMoveRef = this.__touchMoveHandler.bind(this);\\r\\n\\t\\t\\t\\tif(this.__config.isSameTableMove)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__config.table,\\\"touchmove\\\",this.__mouseMoveRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document,\\\"touchmove\\\",this.__mouseMoveRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__documentMouseUpRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__documentMouseUpRef = this.__documentTouchUpHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(document,\\\"touchend\\\",this.__documentMouseUpRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__mouseMoveRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__mouseMoveRef = this.__mouseMoveHandler.bind(this);\\r\\n\\t\\t\\t\\tif(this.__config.isSameTableMove)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__config.table,\\\"mousemove\\\",this.__mouseMoveRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document,\\\"mousemove\\\",this.__mouseMoveRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__documentMouseUpRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__documentMouseUpRef = this.__documentMouseUpHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(document,\\\"mouseup\\\",this.__documentMouseUpRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__removeDocumentEvents = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__mouseMoveRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(this.__config.table,\\\"mousemove\\\",this.__mouseMoveRef);\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mousemove\\\",this.__mouseMoveRef);\\r\\n\\t\\t\\tthis.__mouseMoveRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__documentMouseUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mouseup\\\",this.__documentMouseUpRef);\\r\\n\\t\\t\\tthis.__documentMouseUpRef = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__createGhost = function(row)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.enableMovingText && !this.__divGhost)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar html = this.__config.movingTextCallback ? this.__config.movingTextCallback(row) : row.cells[0].innerText;\\r\\n\\t\\t\\tthis.__divGhost = this.util.createDiv(null,\\\"nsTableRowMoverGhost\\\");\\r\\n\\t\\t\\tthis.__divGhost.innerHTML = html;\\r\\n\\t        this.__divGhost.style.height = '25px';\\r\\n\\t        this.__divGhost.style.top = '20px';\\r\\n\\t        this.__divGhost.style.left = '20px';\\r\\n\\t        document.body.appendChild(this.__divGhost);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__removeGhost = function() \\r\\n\\t{\\r\\n        if (this.__divGhost && this.__divGhost.parentNode) \\r\\n        {\\r\\n        \\tthis.__divGhost.parentNode.removeChild(this.__divGhost);\\r\\n        }\\r\\n        this.__divGhost = null;\\r\\n    };\\r\\n    \\r\\n    NSTableRowMover.prototype.__positionGhost = function(event) \\r\\n\\t{\\r\\n    \\tif(this.__divGhost)\\r\\n    \\t{\\r\\n    \\t\\tevent = this.util.getEvent(event);\\r\\n        \\tvar ghostRect = this.__divGhost.getBoundingClientRect();\\r\\n            var ghostHeight = ghostRect.height;\\r\\n            var bodyDimension = this.util.getBodyDimension(); \\r\\n            var browserWidth = bodyDimension.width - 2;\\r\\n            var browserHeight = bodyDimension.height - 2;\\r\\n            var top = event.pageY - (ghostHeight / 2);\\r\\n            var left = event.pageX - 30;\\r\\n            var windowScrollY = window.pageYOffset || document.documentElement.scrollTop;\\r\\n            var windowScrollX = window.pageXOffset || document.documentElement.scrollLeft;\\r\\n            if (browserWidth > 0) \\r\\n            {\\r\\n                if ((left + this.__divGhost.clientWidth) > (browserWidth + windowScrollX)) \\r\\n                {\\r\\n                    left = browserWidth + windowScrollX - this.__divGhost.clientWidth;\\r\\n                }\\r\\n            }\\r\\n            if (left < 0) \\r\\n            {\\r\\n                left = 0;\\r\\n            }\\r\\n            if (browserHeight > 0) \\r\\n            {\\r\\n                if ((top + this.__divGhost.clientHeight) > (browserHeight + windowScrollY)) \\r\\n                {\\r\\n                    top = browserHeight + windowScrollY - this.__divGhost.clientHeight;\\r\\n                }\\r\\n            }\\r\\n            if (top < 0) \\r\\n            {\\r\\n                top = 0;\\r\\n            }\\r\\n            this.__divGhost.style.left = left + 'px';\\r\\n            this.__divGhost.style.top = top + 'px';\\r\\n    \\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__applyCustomClass = function(element,type,defaultValue)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(type && this.__config.customClass[type])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(element,this.__config.customClass[type]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(defaultValue)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(element,defaultValue);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__removeCustomClass = function(element,type,defaultValue)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(type && this.__config.customClass[type])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(element,this.__config.customClass[type]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(defaultValue)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(element,defaultValue);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTableRowMover.prototype.__getID = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__id)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.table.hasAttribute(\\\"id\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = this.__config.table.getAttribute(\\\"id\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__config.table.hasAttribute(\\\"name\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = this.__config.table.getAttribute(\\\"name\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = \\\"comp\\\" + this.util.getUniqueId();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__id;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSTableRowMover;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSTableRowMover\\\",NSTableRowMover);\";","export const NSVirtualScrollCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\n\\r\\n\\t\\t}\\r\\n \\\"use strict\\\";\\r\\nvar NSVirtualScroll = (function()\\r\\n{\\r\\n\\tfunction NSVirtualScroll(setting) \\r\\n\\t{\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.util = null;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\tthis.__internal = {};\\r\\n\\t\\tthis.__objProp = {};\\r\\n\\t\\tthis.__objSelectedProp = {};\\r\\n\\t\\tthis.__domVariables = null;\\r\\n\\t\\tthis.__doc = null;\\r\\n\\t\\tthis.__win = null;\\r\\n\\t\\tthis.__scrollHandlerRef = null;\\r\\n\\t\\tthis.__resizeHandlerRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.dataSource = function(paramItems)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(paramItems))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar reInit = false;\\r\\n\\t\\t\\tif(!this.__internal.itemDimension)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treInit = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.util.isNumber(paramItems))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.totalLength = parseInt(paramItems);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isArray(paramItems))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.items = paramItems;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.totalLength = null;\\r\\n\\t\\t\\t\\tthis.__config.items = [paramItems];\\r\\n\\t\\t\\t}\\r\\n            this.__internal.objItemComp = {};\\r\\n            this.__internal.arrItem = [];\\r\\n\\t\\t\\tif(reInit)\\r\\n\\t\\t\\t{\\r\\n                var item = this.__getItemAt(0);\\r\\n\\t\\t\\t\\tthis.__internal.isItemHtml = this.util.isString(item);\\r\\n\\t\\t\\t\\tthis.__setSize();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar scrollElement = this.__config.scrollElement;\\r\\n\\t\\t\\tvar scrollPos = scrollElement[this.__objSelectedProp.scroll];\\r\\n\\t\\t\\tif(this.__internal.items && (this.__internal.items.length * this.__internal.itemDimension < scrollPos)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tscrollElement[this.__objSelectedProp.scroll] = 0;\\r\\n\\t\\t\\t\\tthis.__internal.lastPageNum = 0;\\r\\n\\t\\t    }\\r\\n\\t\\t\\tthis.__addItems();\\r\\n\\t\\t\\tscrollElement[this.__objSelectedProp.scroll] = scrollPos;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.refresh = function(isReset)\\r\\n\\t{\\r\\n\\t\\tvar currItemSize = this.__internal.itemDimension;\\r\\n\\t\\tthis.__setSize();\\r\\n\\t\\tvar newItemSize = this.__internal.itemDimension;\\r\\n\\t\\tif((currItemSize != newItemSize) || isReset)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar criteria = null;\\r\\n\\t\\t\\tif(this.__config.totalLength)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcriteria = this.__config.totalLength;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isArray(this.__config.items) && this.__config.items && this.__config.items.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcriteria = this.__config.items;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcriteria = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.dataSource(criteria);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.getScrollProgress = function()\\r\\n\\t{\\r\\n\\t\\tvar scrollPos = this.__internal.scrollPos;\\r\\n\\t\\tvar itemSize = this.__internal.itemDimension;\\r\\n\\t\\tvar totalSize = this.__internal.arrItem.length * itemSize;\\r\\n\\t\\tvar progress = ((scrollPos / totalSize) * 100) || 0;\\r\\n\\t\\treturn progress;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.appendItems = function(arrItem)\\r\\n\\t{\\r\\n\\t\\tthis.__addNewItems(arrItem,false);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.prependItems = function(arrItem)\\r\\n\\t{\\r\\n\\t\\tthis.__addNewItems(arrItem,true);\\r\\n\\t};\\r\\n\\t\\r\\n\\t//assuming that size of all rows are same\\r\\n\\t//if not same add offset\\r\\n\\t//if variable Row size and utility user has original scroll Position then set scrollPosition and pass index as null\\r\\n\\tNSVirtualScroll.prototype.scrollToIndex = function(index,animationRequired,offset,scrollPosition)\\r\\n\\t{\\r\\n\\t\\tvar arrItem = this.__internal.arrItem;\\r\\n\\t\\tif(arrItem && arrItem.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar scrollPos = null;\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(index) && index > -1 && index < arrItem.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\toffset = this.util.isUndefinedOrNull(offset) ? 0 : parseInt(offset);\\r\\n\\t\\t\\t\\tscrollPos = (this.__internal.itemDimension * index) + offset;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(!this.util.isUndefinedOrNull(scrollPosition))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\toffset = 0;\\r\\n\\t\\t\\t\\tscrollPos = scrollPosition;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(scrollPos))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar scrollElement = this.__config.scrollElement;\\r\\n\\t\\t\\t\\tif(animationRequired)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar animation = new this.util.animation(scrollElement,[\\r\\n\\t\\t       \\t  \\t    {\\r\\n\\t\\t       \\t  \\t      time: 500,\\r\\n\\t\\t       \\t  \\t      property:this.__objSelectedProp.scroll,\\r\\n\\t\\t       \\t  \\t      target: scrollPos,\\r\\n\\t\\t       \\t  \\t    }\\r\\n\\t\\t       \\t  \\t]);\\r\\n\\t\\t   \\t  \\t  \\tanimation.animate();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tscrollElement[this.__objSelectedProp.scroll] = scrollPos;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//this function is used for updating items(dom elements) already generated \\r\\n\\tNSVirtualScroll.prototype.updateItems = function(updateCallback) \\r\\n\\t{\\r\\n\\t\\tif(this.__internal.arrItem && this.__internal.arrItem.length && updateCallback) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItem = this.__internal.arrItem;\\r\\n\\t\\t\\tfor(var count = 0;count < arrItem.length;count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrItem[count]; \\r\\n\\t\\t\\t\\titem = updateCallback(item);\\r\\n\\t\\t\\t\\tarrItem[count] = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__internal.arrItem = arrItem;\\r\\n\\t\\t\\tthis.__internal.origArrItem = this.__internal.arrItem;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.destroy = function()\\r\\n\\t{\\r\\n\\t\\tvar scrollElement = this.__config.scrollElement;\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tif(this.__internal.contentTabIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcontentElement.setAttribute(\\\"tabindex\\\",this.__internal.contentTabIndex);\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.removeStyleClass(scrollElement,\\\"nsVirtualScrollElement nsVirtualScrollElement\\\" + this.util.toCamelCase(this.__config.direction,true));\\r\\n\\t\\tthis.util.removeStyleClass(contentElement,\\\"nsVirtualScrollContent nsVirtualScrollContent\\\" + this.util.toCamelCase(this.__config.direction,true));\\r\\n\\t\\tif(this.__scrollHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(scrollElement,\\\"scroll\\\",this.__scrollHandlerRef);\\r\\n\\t\\t\\tthis.__scrollHandlerRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__resizeHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(this.__win,\\\"resize\\\",this.__resizeHandlerRef);\\r\\n\\t\\t\\tthis.__resizeHandlerRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__internal.divLoader)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__internal.divLoader.parentNode.removeChild(this.__internal.divLoader);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__initialize = function()\\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tif(this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\tscrollElement: this.util.getElement(this.__setting[\\\"scrollElement\\\"]),\\r\\n\\t\\t\\t\\t\\tcontentElement: this.util.getElement(this.__setting[\\\"contentElement\\\"]),\\r\\n\\t\\t\\t\\t\\tdirection: this.__setting[\\\"direction\\\"] || NSVirtualScroll.DIRECTION_VERTICAL,\\r\\n\\t\\t\\t\\t\\titemTag: this.__setting[\\\"itemTag\\\"],\\r\\n\\t\\t\\t\\t\\tpageSize: parseInt(this.__setting[\\\"pageSize\\\"]) || 30,//number of items after the cache will be refreshed\\r\\n\\t\\t\\t\\t\\tpagesRendered: parseInt(this.__setting[\\\"pagesRendered\\\"]) || 3,//number of items(pageSize * pagesRendered) to be rendered\\r\\n\\t\\t\\t\\t\\titems: this.__setting[\\\"items\\\"],//array of items, can be html or nodes\\r\\n\\t\\t\\t\\t\\ttotalLength: parseInt(this.__setting[\\\"totalLength\\\"]) || 0,//either mention items or totalLength and itemCreateCallback\\r\\n\\t\\t\\t\\t\\tgetItemComponent: this.__setting[\\\"getItemComponent\\\"],\\r\\n\\t\\t\\t\\t\\tgetEmptyItemComponent: this.__setting[\\\"getEmptyItemComponent\\\"],\\r\\n\\t\\t\\t\\t\\tenableScrollDelay: Boolean.parse(this.__setting[\\\"enableScrollDelay\\\"]),//for Mobile device which are slow in rendering\\r\\n\\t\\t\\t\\t\\tscrollInterval: this.__setting[\\\"scrollInterval\\\"],\\r\\n\\t\\t\\t\\t\\tenableLoader: Boolean.parse(this.__setting[\\\"enableLoader\\\"]),\\r\\n\\t\\t\\t\\t\\tgetLoaderComponent: this.__setting[\\\"getLoaderComponent\\\"],\\r\\n\\t\\t\\t\\t\\tresizeInterval: parseInt(this.__setting[\\\"resizeInterval\\\"]) || 150,\\r\\n\\t\\t\\t\\t\\tscrollingProgress: this.__setting[\\\"scrollingProgress\\\"], //scrollingProgress callback while scrolling like  scrollingProgress(progress)\\r\\n\\t\\t\\t\\t\\tpageWillChange: this.__setting[\\\"pageWillChange\\\"], //pageWillChange callback before page change like  pageWillChange(oldPage,newPage)\\r\\n\\t\\t\\t\\t\\tpageChanged: this.__setting[\\\"pageChanged\\\"], //pageChanged callback before page change like  pageChanged(page)\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\tif(!this.__config.scrollElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSVirtualScroll\\\",\\\"scrollElement is not valid\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__config.contentElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSVirtualScroll\\\",\\\"contentElement is not valid\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__domVariables = this.util.getDomVariables();\\r\\n\\t\\t\\tthis.__doc = this.__domVariables.doc;\\r\\n\\t\\t\\tthis.__win = this.__domVariables.win;\\r\\n\\t\\t\\tif((!this.__config.items || this.__config.items.length == 0) && !this.__config.totalLength)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.items = this.__fetchChildren(contentElement);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__setProps();\\r\\n\\t\\t\\tthis.__setInternalVars();\\r\\n\\t\\t\\tthis.__create();\\r\\n\\t\\t\\tthis.__addListeners();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__setProps = function()\\r\\n\\t{\\r\\n\\t\\tthis.__objProp = {\\r\\n\\t\\t\\t    vertical: {\\r\\n\\t\\t\\t        direction:NSVirtualScroll.DIRECTION_VERTICAL,size: \\\"height\\\",offset: \\\"offsetHeight\\\",\\r\\n\\t\\t\\t        scroll: \\\"scrollTop\\\", scrollSize: \\\"scrollHeight\\\",paddingStart:\\\"paddingTop\\\",\\r\\n\\t\\t\\t        paddingEnd:\\\"paddingBottom\\\",marginStart:\\\"marginTop\\\",marginEnd:\\\"marginBottom\\\"\\r\\n\\t\\t\\t    },\\r\\n\\t\\t\\t    horizontal: {\\r\\n\\t\\t\\t        direction:NSVirtualScroll.DIRECTION_HORIZONTAL,size: \\\"width\\\",offset: \\\"offsetWidth\\\",\\r\\n\\t\\t\\t        scroll: \\\"scrollLeft\\\", scrollSize: \\\"scrollWidth\\\",paddingStart:\\\"paddingLeft\\\",\\r\\n\\t\\t\\t        paddingEnd:\\\"paddingRight\\\",marginStart:\\\"marginLeft\\\",marginEnd:\\\"marginRight\\\"\\r\\n\\t\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\tthis.__objSelectedProp = this.__objProp[\\\"vertical\\\"];\\r\\n\\t\\tif(this.__config.direction == NSVirtualScroll.DIRECTION_HORIZONTAL)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objSelectedProp = this.__objProp[\\\"horizontal\\\"];\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//call this function only with init is needed\\r\\n\\tNSVirtualScroll.prototype.__setInternalVars = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__internal.itemDimension)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.contentElement.hasAttribute(\\\"tabindex\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__internal.contentTabIndex = this.__config.contentElement.getAttribute(\\\"tabindex\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__internal.scrollIntervalID = -1;\\r\\n\\t\\t\\tthis.__internal.resizeIntervalID = -1;\\r\\n\\t\\t\\tthis.__internal.scrollPos = -1;\\r\\n\\t\\t\\tthis.__internal.lastPageNum = -1;\\r\\n\\t\\t\\tthis.__internal.objItemComp = {};\\r\\n\\t\\t\\tthis.__internal.objCache = {};\\r\\n\\t\\t\\tthis.__internal.cssExtraItem = \\\"nsVirtualExtraItem\\\" + this.util.toCamelCase(this.__objSelectedProp.direction,true);\\r\\n\\t\\t\\tthis.__internal.isMobile = this.util.isMobile().any;\\r\\n\\t\\t\\tif(this.__config.enableScrollDelay && this.util.isUndefinedOrNull(this.__config.scrollInterval))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.scrollInterval = this.__internal.isMobile ? 300 : 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__internal.divLoader = null;\\r\\n\\t\\t\\tthis.__addLoader();\\r\\n\\t\\t\\tthis.__internal.pageSize = this.__config.pageSize;\\r\\n\\t\\t\\tthis.__internal.pagesRendered = this.__config.pagesRendered;\\r\\n\\t\\t\\tvar item = this.__getItemAt(0);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__internal.isItemHtml = this.util.isString(item);\\r\\n\\t\\t\\t\\tthis.__setSize();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__internal.itemDimension = 0;\\r\\n\\t\\t\\t\\tthis.__internal.pageDimension = 0;\\r\\n\\t\\t\\t\\tthis.__internal.itemsRendered = 0;\\r\\n\\t\\t\\t\\tthis.__internal.renderedSize = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__setSize = function()\\r\\n\\t{\\r\\n\\t\\tthis.__internal.itemDimension = this.__getItemSize();\\r\\n\\t\\tthis.__internal.pageDimension = this.__internal.itemDimension * this.__internal.pageSize;\\r\\n\\t\\tthis.__internal.itemsRendered = this.__internal.pageSize * this.__internal.pagesRendered;\\r\\n\\t\\tthis.__internal.renderedSize = this.__internal.pagesRendered * this.__internal.pageDimension;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__create = function()\\r\\n\\t{\\r\\n\\t\\tvar scrollElement = this.__config.scrollElement;\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tthis.util.addStyleClass(scrollElement,\\\"nsVirtualScrollElement nsVirtualScrollElement\\\" + this.util.toCamelCase(this.__config.direction,true));\\r\\n\\t\\tthis.util.addStyleClass(contentElement,\\\"nsVirtualScrollContent nsVirtualScrollContent\\\" + this.util.toCamelCase(this.__config.direction,true));\\r\\n\\t\\tcontentElement.setAttribute(\\\"tabindex\\\",0);\\r\\n\\t\\tif((this.__config.items && this.__config.items.length) || this.__config.totalLength)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar scrollPos = scrollElement[this.__objSelectedProp.scroll];\\r\\n\\t\\t\\tthis.__addItems();\\r\\n\\t\\t\\tscrollElement[this.__objSelectedProp.scroll] = scrollPos;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__addListeners = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__scrollHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__scrollHandlerRef = this.__config.enableScrollDelay ? this.__scrollHandlerWithDelay.bind(this) : this.__scrollHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(this.__config.scrollElement,\\\"scroll\\\",this.__scrollHandlerRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__resizeHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__resizeHandlerRef = this.__resizeHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(this.__win,\\\"resize\\\",this.__resizeHandlerRef);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__scrollHandlerWithDelay = function(event)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tclearTimeout(this.__internal.scrollIntervalID);\\r\\n\\t\\tthis.__internal.scrollIntervalID = setTimeout(function(){\\r\\n\\t\\t\\tself.__scrollHandler.call(self,event);\\r\\n\\t\\t},this.__config.scrollInterval);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__scrollHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tthis.__internal.scrollIntervalID = -1;\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar pageNumber = this.__getCurrentPageNum();\\r\\n\\t\\tvar lastPageNum = this.__internal.lastPageNum;\\r\\n\\t\\tthis.__internal.lastPageNum = pageNumber;\\r\\n\\t\\t/*console.log(\\\"lastPageNum::\\\" + lastPageNum + \\\" pageNumber::\\\" + pageNumber);*/\\r\\n\\t\\tif(lastPageNum != pageNumber)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//console.log(\\\"In Scroll\\\");\\r\\n\\t\\t\\tthis.__addItems();\\r\\n\\t\\t\\tthis.__fireCallback(\\\"scrollingProgress\\\",this.getScrollProgress());\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//not used for now\\r\\n\\tNSVirtualScroll.prototype.__isScrollingDown = function() {\\r\\n\\t\\t  var isScrollingDown = false;\\r\\n\\t\\t  var currentScrollPos = this.__config.scrollElement[this.__objSelectedProp.scroll];\\r\\n\\r\\n\\t\\t  if (currentScrollPos > this.__internal.prevScrollPos) {\\r\\n\\t\\t    isScrollingDown = true;\\r\\n\\t\\t  } else {\\r\\n\\t\\t    isScrollingDown = false;\\r\\n\\t\\t  }\\r\\n\\r\\n\\t\\t  this.__internal.prevScrollPos = currentScrollPos;\\r\\n\\t\\t  return isScrollingDown;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__resizeHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tclearTimeout(this.__internal.resizeIntervalID);\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tthis.__internal.resizeIntervalID = setTimeout(self.refresh.bind(self), this.__config.resizeInterval);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getItemSize = function()\\r\\n\\t{\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tvar isAdded = false;\\r\\n\\t\\tvar size = null;\\r\\n\\t\\tif(!contentElement.children.length)\\r\\n\\t\\t{\\r\\n            var itemHtml = this.__getItemAt(0);\\r\\n\\t\\t\\tthis.__setItemsInDom(itemHtml);\\r\\n\\t\\t\\tisAdded = true;\\r\\n\\t\\t}\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar length = contentElement.children.length;\\r\\n\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = contentElement.children[count];\\r\\n\\t\\t\\tif(!this.util.hasStyleClass(item,this.__internal.cssExtraItem))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__config.itemTag)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.itemTag = item.tagName.toLowerCase();\\r\\n\\t\\t}\\r\\n\\t\\tsize = item[this.__objSelectedProp.offset];\\r\\n\\t\\tif(this.__config.itemTag == \\\"tr\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar border = this.util.getStyleValue(contentElement,\\\"borderCollapse\\\");\\r\\n\\t\\t\\tif(border != \\\"collapse\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar borderSpacing = this.util.getStyleValue(contentElement,\\\"borderSpacing\\\");\\r\\n\\t\\t\\t\\tsize += this.__getInt(borderSpacing);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar marginStart = this.util.getStyleValue(item,this.__objSelectedProp.marginStart);\\r\\n\\t        var marginEnd = this.util.getStyleValue(item,this.__objSelectedProp.marginEnd);\\r\\n\\t        marginStart = this.__getInt(marginStart);\\r\\n\\t        marginEnd = this.__getInt(marginEnd);\\r\\n\\t        size += Math.max(marginStart, marginEnd);\\r\\n\\t\\t}\\r\\n\\t\\tif(isAdded)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setItemsInDom(null);\\r\\n\\t\\t}\\r\\n\\t\\treturn size;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__addItems = function()\\r\\n\\t{\\r\\n\\t\\tvar arrItem = this.__internal.arrItem || [];\\r\\n\\t\\tvar itemPage = this.__getPageData(arrItem,this.__getCurrentPageNum());\\r\\n\\t\\tvar hasPageContentChanged = this.__hasCacheChanged(\\\"data\\\",itemPage.arrItem);\\r\\n        var hasStartOffsetChanged = this.__hasCacheChanged(\\\"top\\\",itemPage.startOffset);\\r\\n        var hasEndOffsetChanged = this.__hasCacheChanged(\\\"bottom\\\",itemPage.endOffset);\\r\\n        var contentElement = this.__config.contentElement;\\r\\n        var arrSource = [];\\r\\n        if(hasPageContentChanged || hasStartOffsetChanged) \\r\\n        {\\r\\n            if(itemPage.startOffset) \\r\\n            {\\r\\n            \\tarrSource.push(this.__getExtraItem(\\\"nsVirtualTopItem\\\",itemPage.startOffset));\\r\\n            }\\r\\n            arrSource.push.apply(arrSource,itemPage.arrItem);\\r\\n            if(itemPage.endOffset) \\r\\n            {\\r\\n            \\tarrSource.push(this.__getExtraItem(\\\"nsVirtualBottomItem\\\",itemPage.endOffset));\\r\\n            }\\r\\n            this.__fireCallback(\\\"pageWillChange\\\",[this.__internal.currentItemPage,itemPage]);\\r\\n            this.__setItemsInDom(arrSource);\\r\\n            this.__handleTagAfterRender(itemPage);\\r\\n            this.__fireCallback(\\\"pageChanged\\\",[itemPage]);\\r\\n            this.__internal.currentItemPage = itemPage;\\r\\n        } \\r\\n        else if(hasEndOffsetChanged) \\r\\n        {\\r\\n        \\tcontentElement.lastChild.style[this.__objSelectedProp.size] = itemPage.endOffset + \\\"px\\\";\\r\\n        }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__setItemsInDom = function(arrItem,isAdd)\\r\\n\\t{\\r\\n\\t\\tthis.__setLoaderVisibility(true);\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tif(this.__internal.isItemHtml)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(arrItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar html = this.__convertArrayToString(arrItem);\\r\\n\\t\\t\\t\\tisAdd ? contentElement.innerHTML += html : contentElement.innerHTML = html;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tisAdd ? null : contentElement.innerHTML = \\\"\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!isAdd)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//IE Bug that when Html elements are added(i.e. when this.__internal.isItemHtml is false) you do contentElement.innerHTML = \\\"\\\" \\r\\n\\t\\t\\t\\t//then the items being rendered in this.__internal.arrItem also becomes empty\\r\\n\\t\\t\\t\\tif(this.__internal.isItemHtml)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcontentElement.innerHTML = \\\"\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\twhile(contentElement.firstChild) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcontentElement.removeChild(contentElement.lastChild);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(arrItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrItem = this.util.isArray(arrItem) ? arrItem : [arrItem];\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar length = arrItem.length;\\r\\n\\t\\t\\t\\tfor(var count =0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(arrItem[count]) {\\r\\n\\t\\t\\t\\t\\t\\titem = arrItem[count];\\r\\n\\t\\t\\t\\t\\t\\tthis.util.isString(item) ? contentElement.innerHTML += item : contentElement.appendChild(item);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__setLoaderVisibility(false);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getAllItems = function(fromIndex,toIndex)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.items && this.__config.items.length && this.__config.items.length > fromIndex)\\r\\n\\t\\t{\\r\\n            toIndex = this.__config.items.length > toIndex ? toIndex : this.__config.items.length - 1;\\r\\n            var arrCloned = this.__config.items.slice();\\r\\n\\t\\t\\tvar arrItem = arrCloned.splice(fromIndex,toIndex - fromIndex);\\r\\n\\t\\t\\treturn arrItem;\\r\\n\\t\\t}\\r\\n\\t\\telse if(this.__config.totalLength && this.__config.getItemComponent)\\r\\n\\t\\t{\\r\\n            fromIndex = this.__config.totalLength > fromIndex ? fromIndex : this.__config.totalLength - 1;\\r\\n            toIndex = this.__config.totalLength > toIndex ? toIndex : this.__config.totalLength - 1;\\r\\n            if(!this.__internal.arrItem) {\\r\\n\\t\\t\\t\\tthis.__internal.arrItem = [];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar arrItem = this.__internal.arrItem;\\r\\n            var arrRet = [];\\r\\n\\t\\t\\tfor(var count = fromIndex;count < toIndex + 1;count++)\\r\\n\\t\\t\\t{\\r\\n                if(arrItem.length > count && arrItem[count]) {\\r\\n                    arrRet.push(arrItem[count]);\\r\\n                }\\r\\n                else {\\r\\n                    var item = this.__getItemFromComponent(count);\\r\\n                    arrItem[count] = item;\\r\\n                    arrRet.push(item);\\r\\n                }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrRet;\\r\\n\\t\\t}\\r\\n\\t\\treturn [];\\r\\n\\t};\\r\\n\\r\\n    NSVirtualScroll.prototype.__getItemAt = function(index) \\r\\n    {\\r\\n        if(this.__config.items && this.__config.items.length && this.__config.items.length > index)\\r\\n\\t\\t{\\r\\n           return this.__config.items[index];\\r\\n\\t\\t}\\r\\n        else if(this.__config.arrItem && this.__config.arrItem.length && this.__config.arrItem.length > index && this.__config.arrItem[index])\\r\\n\\t\\t{\\r\\n           return this.__config.arrItem[index];\\r\\n\\t\\t}\\r\\n        else if(this.__config.totalLength > index && this.__config.getItemComponent) {\\r\\n           return this.__getItemFromComponent(index);\\r\\n        }\\r\\n        return null;\\r\\n    };\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getItemFromComponent = function(index)\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tif(this.__config.totalLength > index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar comp = new this.__config.getItemComponent(index);\\r\\n\\t\\t\\titem = comp.getElement();\\r\\n\\t\\t\\tthis.__internal.objItemComp[index.toString()] = comp;\\r\\n\\t\\t}\\r\\n\\t\\treturn item;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getPageData = function(arrItem,pageNum)\\r\\n\\t{\\r\\n\\t\\tvar internal = this.__internal;\\r\\n\\t\\tvar retItem = null;\\r\\n        if(this.__config.totalLength === 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretItem = {startOffset: 0,endOffset: 0,itemsBefore: 0,arrItem:[this.__getEmptyItem()]};\\r\\n\\t\\t}\\r\\n\\t\\t/*else if(arrItem.length < internal.pageSize)\\r\\n\\t\\t{\\r\\n            var startIndex = 0;\\r\\n\\t        var endIndex = internal.pageSize;\\r\\n            var arrRet = this.__getAllItems(startIndex,endIndex);\\r\\n\\t\\t\\tretItem = {startOffset: 0,endOffset: 0,itemsBefore: 0,arrItem:arrRet};\\r\\n\\t\\t}*/\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar startIndex = Math.max((internal.itemsRendered - internal.pageSize) * pageNum, 0);\\r\\n\\t        var endIndex = startIndex + internal.itemsRendered;\\r\\n            var totalLength = this.__getTotalLength();\\r\\n\\t        var startOffset = Math.max(startIndex * internal.itemDimension, 0);\\r\\n\\t        var endOffset = Math.max((totalLength - endIndex) * internal.itemDimension, 0);\\r\\n\\t        var itemsBefore = startIndex;\\r\\n\\t        if(startOffset < 1) \\r\\n\\t        {\\r\\n\\t        \\titemsBefore++;\\r\\n\\t        }\\r\\n\\t        var arrRet = this.__getAllItems(startIndex,endIndex);//arrItem.slice(startIndex,endIndex);\\r\\n\\t        retItem = {startOffset: startOffset,endOffset: endOffset,itemsBefore: itemsBefore,arrItem:arrRet};\\r\\n\\t\\t}\\r\\n\\t\\tconsole.log(retItem);\\r\\n\\t\\treturn retItem;\\r\\n\\t};\\r\\n\\r\\n    NSVirtualScroll.prototype.__getTotalLength = function() \\r\\n    {\\r\\n        if(this.__config.items && this.__config.items.length)\\r\\n\\t\\t{\\r\\n           return this.__config.items.length;\\r\\n\\t\\t}\\r\\n        else if(this.__config.totalLength && this.__config.getItemComponent) {\\r\\n           return this.__config.totalLength;\\r\\n        }\\r\\n        return 0;\\r\\n    };\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__addNewItems = function(arrNewItem,isPrepend)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(arrNewItem))\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrNewItem = this.util.isArray(arrNewItem) ? arrNewItem : [arrNewItem];\\r\\n\\t\\t\\tif(arrNewItem && arrNewItem.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrItem = [];\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrNewItem.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrItem.push(arrNewItem.items[count]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar arrExisting = this.__internal.arrItem;\\r\\n\\t\\t\\t\\tthis.__internal.arrItem = isPrepend ? arrItem.concat(arrExisting) : arrExisting.concat(arrItem);\\r\\n\\t\\t\\t\\tthis.__addItems();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__handleTagAfterRender = function(itemPage)\\r\\n\\t{\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tif(this.__config.itemTag == \\\"ol\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tcontentElement.setAttribute(\\\"start\\\", itemPage.itemsBefore);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__fetchChildren = function(element)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChildren = element.children;\\r\\n\\t\\t\\tvar arrRet = [];\\r\\n\\t\\t\\tvar length = arrChildren.length;\\r\\n\\t\\t\\tvar child = null;\\r\\n\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tchild = arrChildren[count];\\r\\n\\t\\t\\t\\tarrRet.push(this.__getItemHtml(child));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrRet;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__fireCallback = function(callbackName,args)\\r\\n\\t{\\r\\n\\t\\tif(this.__config[callbackName]) {\\r\\n\\t\\t\\tthis.__config[callbackName](args);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__hasCacheChanged = function(key,value)\\r\\n\\t{\\r\\n\\t\\tvar changed = (value != this.__internal.objCache[key]);\\r\\n\\t\\tthis.__internal.objCache[key] = value;\\r\\n\\t    return changed;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getCurrentPageNum = function()\\r\\n\\t{\\r\\n\\t\\tthis.__internal.scrollPos = this.__config.scrollElement[this.__objSelectedProp.scroll];\\r\\n\\t\\tvar pageNum = Math.floor(this.__internal.scrollPos / (this.__internal.renderedSize - this.__internal.pageDimension)) || 0;\\r\\n\\t\\t//console.log(this.__internal.scrollPos + \\\",\\\" + this.__internal.renderedSize + \\\",\\\" + this.__internal.pageDimension + \\\",\\\" + pageNum);\\r\\n\\t\\treturn pageNum;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getExtraItem = function(cssClass,size)\\r\\n\\t{\\r\\n\\t\\tvar item = this.util.createElement(this.__config.itemTag,null,this.__internal.cssExtraItem,this.__doc);\\r\\n\\t\\tcssClass && this.util.addStyleClass(item,cssClass);\\r\\n\\t\\tsize && (item.style[this.__objSelectedProp.size] = size + \\\"px\\\");\\r\\n\\t\\treturn (this.__internal.isItemHtml ? this.__getItemHtml(item) : item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getEmptyItem = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__config.getEmptyItemComponent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar comp = new this.__config.getEmptyItemComponent();\\r\\n\\t\\t\\treturn (this.__internal.isItemHtml ? this.__getItemHtml(comp.getElement()) : comp.getElement());\\r\\n\\t\\t}\\r\\n\\t\\tvar item = this.util.createElement(this.__config.itemTag,null,null,this.__doc);\\r\\n\\t\\tif(this.__config.itemTag == \\\"tr\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\titem.innerHTML = \\\"<td colSpan='1000'></td>\\\";\\r\\n\\t\\t}\\r\\n\\t\\treturn (this.__internal.isItemHtml ? this.__getItemHtml(item) : item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getItemHtml = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.util.isString(item) ? item : item.outerHTML;\\r\\n\\t\\t}\\r\\n\\t\\treturn \\\"\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__addLoader = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__config.enableLoader)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__internal.divLoader = this.util.createDiv(null,\\\"nsVirtualScrollLoader\\\");\\r\\n\\t\\t\\tvar divText = null;\\r\\n\\t\\t\\tif(this.__config.getLoaderComponent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar comp = new this.__config.getLoaderComponent();\\r\\n\\t\\t\\t\\tdivText = comp.getElement();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivText = this.util.createDiv(null,\\\"nsVirtualScrollLoaderTextCon\\\");\\r\\n\\t\\t\\t\\tdivText.innerHTML = \\\"<b class=\\\\\\\"nsVirtualScrollLoaderText\\\\\\\">Rendering...</b>\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__internal.divLoader.appendChild(divText);\\r\\n\\t\\t\\tthis.__setLoaderVisibility(false);\\r\\n\\t\\t\\tthis.__config.scrollElement.appendChild(this.__internal.divLoader);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__setLoaderVisibility = function(isShow)\\r\\n\\t{\\r\\n\\t\\tif(this.__internal.divLoader)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__internal.divLoader.style.display = isShow ? \\\"\\\" : \\\"none\\\";\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__convertArrayToString = function(arrItem,separator)\\r\\n\\t{\\r\\n\\t\\tif(arrItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tseparator = separator ? separator : \\\"\\\";\\r\\n\\t\\t\\treturn this.util.isArray(arrItem) ? arrItem.join(separator) : arrItem;\\r\\n\\t\\t}\\r\\n\\t\\treturn \\\"\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getInt = function(value)\\r\\n\\t{\\r\\n\\t\\treturn parseInt(value,10) || 0;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.DIRECTION_VERTICAL = \\\"vertical\\\";\\r\\n\\tNSVirtualScroll.DIRECTION_HORIZONTAL = \\\"horizontal\\\";\\r\\n\\t\\r\\n\\treturn NSVirtualScroll;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSVirtualScroll\\\",NSVirtualScroll);\\r\\n\";","export const NSEventCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\n\\r\\n\\t\\t}\\r\\n\\\"use strict\\\";\\r\\nvar NSEvent = (function()\\r\\n{\\r\\n\\tfunction NSEvent() \\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar objEvents = {};\\r\\n\\t\\t\\r\\n\\t\\tvar addListener  = function(event, callback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (typeof callback !== 'function') \\r\\n\\t\\t\\t{\\r\\n\\t\\t        console.error(\\\"The listener callback must be a function\\\");\\r\\n\\t\\t        return false;\\r\\n\\t\\t    }\\r\\n\\t\\t\\tif (typeof event !== 'string') \\r\\n\\t\\t\\t{\\r\\n\\t\\t        console.error(\\\"The event name must be a string\\\");\\r\\n\\t\\t        return false;\\r\\n\\t\\t    }\\r\\n\\t\\t\\tif (!objEvents[event]) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjEvents[event] = {listeners: []};\\r\\n\\t\\t    }\\r\\n\\t\\t\\tobjEvents[event].listeners.push(callback);\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar removeListener = function(event, callback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (!objEvents[event]) \\r\\n\\t\\t\\t{\\r\\n\\t\\t        console.error(\\\"The event: \\\" + event + \\\" does not exist\\\");\\r\\n\\t\\t        return false;\\r\\n\\t\\t    }\\r\\n\\t\\t\\tvar filter = function(listener)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn listener.toString() !== callback.toString(); \\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tobjEvents[event].listeners = objEvents[event].listeners.filter(filter);\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar hasListener = function(event, callback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (!objEvents[event]) \\r\\n\\t\\t\\t{\\r\\n\\t\\t        return false;\\r\\n\\t\\t    }\\r\\n\\t\\t\\tvar filter = function(listener)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn listener.toString() == callback.toString(); \\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar tempListener = objEvents[event].listeners.filter(filter);\\r\\n\\t\\t\\treturn !(!tempListener); \\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar dispatch = function(event, details)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = true;\\r\\n\\t\\t\\tif (objEvents[event]) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var index = 0;index < objEvents[event].listeners.length;index++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar listener = objEvents[event].listeners[index];\\r\\n\\t\\t\\t\\t\\tretValue = listener({type: event,details: details},details);\\r\\n\\t\\t\\t\\t\\tif(retValue !== undefined && retValue !== null && retValue == false)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconsole.log(\\\"The event: \\\" + event + \\\" does not exist\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.addListener = addListener;\\r\\n\\t\\tself.removeListener = removeListener;\\r\\n\\t\\tself.hasListener = hasListener;\\r\\n\\t\\tself.dispatch = dispatch;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSEvent;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSEvent\\\",NSEvent);\";","export const NSSVGCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\n\\r\\n\\t\\t}\\r\\nvar NSSvg = (function()\\r\\n{\\r\\n\\tfunction NSSvg()\\r\\n\\t{\\r\\n\\t\\tthis.namespace = \\\"http://www.w3.org/2000/svg\\\";\\r\\n\\t\\tthis.xmlns = \\\"http://www.w3.org/2000/xmlns/\\\";\\r\\n\\t\\tthis.xlink = \\\"http://www.w3.org/1999/xlink\\\";\\r\\n\\t\\tthis.version = \\\"1.2\\\";\\r\\n\\t\\tthis.__mainSVGID = \\\"nsMainSVG\\\";\\r\\n\\t\\tthis.__defaultViewPort = \\\"0 0 100 100\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.getMainSVG = function()\\r\\n\\t{\\r\\n\\t\\tvar mainSVGElement = document.getElementById(this.__mainSVGID);\\r\\n\\t\\tif(!mainSVGElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar body = document.body || document.getElementsByTagName('body')[0];\\r\\n\\t\\t\\tmainSVGElement = this.addSVG(body,this.__mainSVGID,null,0,0);\\r\\n\\t\\t\\tmainSVGElement.setAttribute(\\\"display\\\",\\\"none\\\");\\r\\n\\t\\t}\\r\\n\\t\\treturn mainSVGElement;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.addSVG = function(parent,id,className,width,height,fromX,fromY,toX,toY,disableEvents) \\r\\n\\t{\\r\\n\\t\\tvar svg = this.createSVG(id,className,width,height,fromX,fromY,toX,toY,disableEvents);\\r\\n\\t\\tif(parent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tparent.appendChild(svg);\\r\\n\\t\\t}\\r\\n\\t\\treturn svg;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.symbolExists = function(id)\\r\\n\\t{\\r\\n\\t\\tvar svg = this.getMainSVG();\\r\\n\\t\\tvar retValue = (svg.getElementById(id)) ? true : false;\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.addSymbol = function(id,viewBox,preserveAspectRatio)\\r\\n\\t{\\r\\n\\t\\tvar svg = this.getMainSVG();\\r\\n\\t\\tvar symbol = this.createSymbol(id,viewBox,preserveAspectRatio);\\r\\n\\t\\tsvg.appendChild(symbol);\\r\\n\\t\\treturn symbol;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.addUse = function(parent,id,className,href,width,height,x,y,transform)\\r\\n\\t{\\r\\n\\t\\tvar use = this.createUse(id,className,href,width,height,x,y,transform);\\r\\n\\t\\tif(parent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tparent.appendChild(use);\\r\\n\\t\\t\\t//parent.innerHTML = use.outerHTML;\\r\\n\\t\\t}\\r\\n\\t\\treturn use;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.addPath = function(id,pathString,viewPort,fill) \\r\\n\\t{\\r\\n\\t\\tvar path = this.createPath(id + \\\"path\\\",pathString,null,fill);\\r\\n\\t\\tthis.addElementInSymbol(id,viewPort,path);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.addCircle = function(id,centerX,centerY,radius,className,viewPort) \\r\\n\\t{\\r\\n\\t\\tvar circle = this.createCircle(id,centerX,centerY,radius,className);\\r\\n\\t\\tthis.addElementInSymbol(id,viewPort,circle);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.addPolygon = function(id,points,className,viewPort) \\r\\n\\t{\\r\\n\\t\\t var polygon = this.createPolygon(id,points,className);\\r\\n\\t\\t this.addElementInSymbol(id,viewPort,polygon);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.addLine = function(parent,id,xFrom,yFrom,xTo,yTo,className,viewPort) \\r\\n\\t{\\r\\n\\t\\t var line = this.createLine(id,xFrom,yFrom,xTo,yTo,className);\\r\\n\\t\\t this.addElementInSymbol(id,viewPort,line);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.createSVG = function(id,className,width,height,fromX,fromY,toX,toY,disableEvents)\\r\\n\\t{\\r\\n\\t\\tvar svg = document.createElementNS(this.namespace, \\\"svg\\\");\\r\\n\\t\\tsvg.setAttribute(\\\"xmlns\\\", this.namespace);\\r\\n\\t\\tsvg.setAttributeNS(this.xmlns, \\\"xmlns:xlink\\\", this.xlink);\\r\\n\\t\\tsvg.setAttribute(\\\"version\\\", this.version);\\r\\n\\t\\tif(id)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsvg.setAttribute(\\\"id\\\",id);\\r\\n\\t\\t}\\r\\n\\t\\tif(className)\\r\\n\\t\\t{\\r\\n\\t\\t\\t this.util.addStyleClass(svg,className);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isNumber(width))\\r\\n\\t\\t{\\r\\n\\t\\t\\tsvg.setAttribute(\\\"width\\\", width);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isNumber(height))\\r\\n\\t\\t{\\r\\n\\t\\t\\tsvg.setAttribute(\\\"height\\\", height);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isNumber(fromX) && this.util.isNumber(fromY) && this.util.isNumber(toX) && this.util.isNumber(toY) && toX > 0 && toY > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar viewBox = fromX + \\\" \\\" + fromY + \\\" \\\" + toX + \\\" \\\" + toY;\\r\\n\\t\\t\\tsvg.setAttribute(\\\"viewBox\\\", viewBox);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isUndefined(disableEvents) || disableEvents === null)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdisableEvents = false;\\r\\n\\t\\t}\\r\\n\\t\\tif(disableEvents)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsvg.style.pointerEvents = \\\"none\\\";\\r\\n\\t\\t}\\r\\n\\t\\treturn svg;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.createSymbol = function(id,viewBox,preserveAspectRatio) \\r\\n\\t{\\r\\n\\t\\t var symbol = document.createElementNS(this.namespace,\\\"symbol\\\");\\r\\n\\t\\t if(id)\\r\\n\\t\\t {\\r\\n\\t\\t\\t symbol.setAttributeNS(null,\\\"id\\\",id);\\r\\n\\t\\t }\\r\\n\\t\\t if(viewBox)\\r\\n\\t\\t {\\r\\n\\t\\t\\t symbol.setAttribute(\\\"viewBox\\\", viewBox);\\r\\n\\t\\t }\\r\\n\\t\\t if(preserveAspectRatio)\\r\\n\\t\\t {\\r\\n\\t\\t\\t symbol.setAttribute(\\\"preserveAspectRatio\\\", preserveAspectRatio);\\r\\n\\t\\t }\\r\\n\\t\\t return symbol;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.createUse = function(id,className,href,width,height,x,y,transform)\\r\\n\\t{\\r\\n\\t\\tvar use = document.createElementNS(this.namespace, \\\"use\\\");\\r\\n\\t\\tif(id)\\r\\n\\t\\t{\\r\\n\\t\\t\\tuse.setAttributeNS(null,\\\"id\\\",id);\\r\\n\\t\\t}\\r\\n\\t\\tif(className)\\r\\n\\t\\t{\\r\\n\\t\\t\\t this.util.addStyleClass(use,className);\\r\\n\\t\\t}\\r\\n\\t\\tif(href)\\r\\n\\t\\t{\\r\\n\\t\\t\\tuse.setAttributeNS(this.xlink,\\\"href\\\",href);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isNumber(width))\\r\\n\\t\\t{\\r\\n\\t\\t\\tuse.setAttribute(\\\"width\\\", width);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isNumber(height))\\r\\n\\t\\t{\\r\\n\\t\\t\\tuse.setAttribute(\\\"height\\\", height);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isNumber(x))\\r\\n\\t\\t{\\r\\n\\t\\t\\tuse.setAttribute(\\\"x\\\", x);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isNumber(y))\\r\\n\\t\\t{\\r\\n\\t\\t\\tuse.setAttribute(\\\"y\\\", y);\\r\\n\\t\\t}\\r\\n\\t\\tif(transform)\\r\\n\\t\\t{\\r\\n\\t\\t\\tuse.setAttribute(\\\"transform\\\",transform);\\r\\n\\t\\t}\\r\\n\\t\\treturn use;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.createLine = function(id,xFrom,yFrom,xTo,yTo,className) \\r\\n\\t{\\r\\n\\t\\t var line = document.createElementNS(this.namespace,\\\"line\\\");\\r\\n\\t\\t if(id)\\r\\n\\t\\t {\\r\\n\\t\\t\\t line.setAttributeNS(null,\\\"id\\\",id);\\r\\n\\t\\t }\\r\\n\\t\\t line.setAttributeNS(null,\\\"x1\\\",xFrom);\\r\\n\\t\\t line.setAttributeNS(null,\\\"y1\\\",yFrom);\\r\\n\\t\\t line.setAttributeNS(null,\\\"x2\\\",xTo);\\r\\n\\t\\t line.setAttributeNS(null,\\\"y2\\\",yTo);\\r\\n\\t\\t if(className)\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.util.addStyleClass(line,className);\\r\\n\\t\\t }\\r\\n\\t\\t return line;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.createCircle = function(id,centerX,centerY,radius,className) \\r\\n\\t{\\r\\n\\t\\t var circle = document.createElementNS(this.namespace,\\\"circle\\\");\\r\\n\\t\\t if(id)\\r\\n\\t\\t {\\r\\n\\t\\t\\t circle.setAttributeNS(null,\\\"id\\\",id);\\r\\n\\t\\t }\\r\\n\\t\\t circle.setAttributeNS(null,\\\"cx\\\",centerX);\\r\\n\\t\\t circle.setAttributeNS(null,\\\"cy\\\",centerY);\\r\\n\\t\\t circle.setAttributeNS(null,\\\"r\\\",radius);\\r\\n\\t\\t if(className)\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.util.addStyleClass(circle,className);\\r\\n\\t\\t }\\r\\n\\t\\t return circle;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.createRect = function(id,x,y,width,height,className) \\r\\n\\t{\\r\\n\\t\\t var rect = document.createElementNS(this.namespace,\\\"rect\\\");\\r\\n\\t\\t if(id)\\r\\n\\t\\t {\\r\\n\\t\\t\\t rect.setAttributeNS(null,\\\"id\\\",id);\\r\\n\\t\\t }\\r\\n\\t\\t if(!this.util.isUndefinedOrNull(x))\\r\\n\\t\\t {\\r\\n\\t\\t\\t rect.setAttributeNS(null,\\\"x\\\", x);\\r\\n\\t\\t }\\r\\n\\t\\t if(!this.util.isUndefinedOrNull(y))\\r\\n\\t\\t {\\r\\n\\t\\t\\t rect.setAttributeNS(null,\\\"y\\\", y);\\r\\n\\t\\t }\\r\\n\\t\\t if(!this.util.isUndefinedOrNull(width))\\r\\n\\t\\t {\\r\\n\\t\\t\\t rect.setAttributeNS(null,\\\"width\\\",width);\\r\\n\\t\\t }\\r\\n\\t\\t if(!this.util.isUndefinedOrNull(height))\\r\\n\\t\\t {\\r\\n\\t\\t\\t rect.setAttributeNS(null,\\\"height\\\", height);\\r\\n\\t\\t }\\r\\n\\t\\t if(className)\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.util.addStyleClass(rect,className);\\r\\n\\t\\t }\\r\\n\\t\\t return rect;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.createPolygon = function(id,points,className) \\r\\n\\t{\\r\\n\\t\\t var polygon = document.createElementNS(this.namespace,\\\"polygon\\\");\\r\\n\\t\\t if(id)\\r\\n\\t\\t {\\r\\n\\t\\t\\t polygon.setAttributeNS(null,\\\"id\\\",id);\\r\\n\\t\\t }\\r\\n\\t\\t polygon.setAttribute(\\\"points\\\",points);\\r\\n\\t\\t if(className)\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.util.addStyleClass(polygon,className);\\r\\n\\t\\t }\\r\\n\\t\\t return polygon;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.createPath = function(id,pathString,className,fill) \\r\\n\\t{\\r\\n\\t\\t var path = document.createElementNS (this.namespace, \\\"path\\\");\\r\\n\\t\\t if(id)\\r\\n\\t\\t {\\r\\n\\t\\t\\t path.setAttribute(\\\"id\\\", id);\\r\\n\\t\\t }\\r\\n\\t\\t path.setAttribute(\\\"d\\\", pathString);\\r\\n\\t\\t if(className)\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.util.addStyleClass(path,className);\\r\\n\\t\\t }\\r\\n\\t\\t if(fill)\\r\\n\\t\\t {\\r\\n\\t\\t\\t path.setAttribute(\\\"fill\\\", fill);\\r\\n\\t\\t }\\r\\n\\t\\t return path;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.createGroup = function(id) \\r\\n\\t{\\r\\n\\t\\t var group = document.createElementNS (this.namespace, \\\"g\\\");\\r\\n\\t\\t if(id)\\r\\n\\t\\t {\\r\\n\\t\\t\\t group.setAttribute(\\\"id\\\", id);\\r\\n\\t\\t }\\r\\n\\t\\t return group;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.changeUseHref = function(use,href) \\r\\n\\t{\\r\\n\\t\\t use = this.util.getElement(use);\\r\\n\\t\\t if(use)\\r\\n\\t\\t {\\r\\n\\t\\t\\tuse.setAttributeNS(this.xlink,\\\"href\\\",href);\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t }\\r\\n\\t\\t return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.changePathValue = function (objPath,pathString) \\r\\n\\t{\\r\\n\\t\\t var path = this.util.getElement(objPath);\\r\\n\\t\\t if(path)\\r\\n\\t\\t {\\r\\n\\t\\t\\t path.setAttribute(\\\"d\\\", pathString);\\r\\n\\t\\t\\t return true;\\r\\n\\t\\t }\\r\\n\\t\\t return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.getPathValue = function (objPath) \\r\\n\\t{\\r\\n\\t\\t var path = this.util.getElement(objPath);\\r\\n\\t\\t if(path)\\r\\n\\t\\t {\\r\\n\\t\\t\\t return path.getAttribute(\\\"d\\\");\\r\\n\\t\\t }\\r\\n\\t\\t return null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvg.prototype.addElementInSymbol = function(id,viewPort,element)\\r\\n\\t{\\r\\n\\t\\tif(!this.symbolExists(id) && element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!viewPort)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tviewPort = this.__defaultViewPort;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar symbol = this.addSymbol(id,viewPort);\\r\\n\\t\\t\\tsymbol.appendChild(element);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSSvg;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSSvg\\\",NSSvg);\\r\\n\\t\\r\\nvar NSSvgShapes = (function()\\r\\n{\\t\\r\\n\\tfunction NSSvgShapes()\\r\\n\\t{\\r\\n\\t\\tthis.__EXPORT_ICON_ID = \\\"nsSvgExport\\\";\\r\\n\\t\\tthis.__MINIMIZE_ICON_ID = \\\"nsSvgMinimize\\\";\\r\\n\\t\\tthis.__MAXIMIZE_ICON_ID = \\\"nsSvgMaximize\\\";\\r\\n\\t\\tthis.__EXPAND_ICON_ID = \\\"nsSvgExpand\\\";\\r\\n\\t\\tthis.__COLLAPSE_ICON_ID = \\\"nsSvgCollapse\\\";\\r\\n\\t\\tthis.__FULLSCREEN_ICON_ID = \\\"nsSvgFullScreen\\\";\\r\\n\\t\\tthis.__RESTORE_ICON_ID = \\\"nsSvgRestore\\\";\\r\\n\\t\\tthis.__FILTER_ICON_ID = \\\"nsSvgFilter\\\";\\r\\n\\t\\tthis.__SEARCH_ICON_ID = \\\"nsSvgSearch\\\";\\r\\n\\t\\tthis.__CLOSE_ICON_ID = \\\"nsSvgClose\\\";\\r\\n\\t\\tthis.__TREE_ICON_ID = \\\"nsSvgTree\\\";\\r\\n\\t\\tthis.__EXPORT_ICON_ID = \\\"nsSvgExport\\\";\\r\\n\\t\\tthis.__MOVE_ICON_ID = \\\"nsSvgMove\\\";\\r\\n\\t\\tthis.__HISTORY_ICON_ID = \\\"nsSvgHistory\\\";\\r\\n\\t\\tthis.__PENDING_ICON_ID = \\\"nsSvgPending\\\";\\r\\n\\t\\tthis.__SUPERVISOR_ICON_ID = \\\"nsSvgSupervisor\\\";\\r\\n\\t\\tthis.__ENTITY_ICON_ID = \\\"nsSvgEntity\\\";\\r\\n\\t\\tthis.__DIVISION_ICON_ID = \\\"nsSvgDivision\\\";\\r\\n\\t\\tthis.__GROUP_ICON_ID = \\\"nsSvgGroup\\\";\\r\\n\\t\\tthis.__LEFT_ICON_ID = \\\"nsSvgLeft\\\";\\r\\n\\t\\tthis.__RIGHT_ICON_ID = \\\"nsSvgRight\\\";\\r\\n\\t\\tthis.__HIERARCHY_ICON_ID = \\\"nsSvgHierarchy\\\";\\r\\n\\t\\tthis.__EQUAL_ICON_ID = \\\"nsSvgEqual\\\";\\r\\n\\t\\tthis.__GREAT_ICON_ID = \\\"nsSvgGreat\\\";\\r\\n\\t\\tthis.__GREATEQUAL_ICON_ID = \\\"nsSvgGreatEqual\\\";\\r\\n\\t\\tthis.__LESS_ICON_ID = \\\"nsSvgLess\\\";\\r\\n\\t\\tthis.__LESSEQUAL_ICON_ID = \\\"nsSvgLessEqual\\\";\\r\\n\\t\\tthis.__FOCUSVIEW_ICON_ID = \\\"nsSvgFocusView\\\";\\r\\n\\t\\tthis.__HOLISTICVIEW_ICON_ID = \\\"nsSvgHolisticView\\\";\\r\\n\\t\\tthis.__COLUMNSETTING_ICON_ID = \\\"nsSvgColumnSetting\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__objSVG = new NSSvg();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addExportInPage = function() \\r\\n\\t{\\r\\n\\t\\tvar EXPORT_ICON_VIEWPORT = \\\"-0.329 0 512 427.534\\\";\\r\\n\\t\\tvar EXPORT_ICON_PATH_1 = \\\"M383.552,350.474c-10.595,0-19.187,8.581-19.187,19.186v19.519H38.043V155.719H89.82c10.595,0,19.187-8.592,19.187-19.186   c0-10.598-8.592-19.187-19.187-19.187H18.857c-10.594,0-19.186,8.589-19.186,19.187v271.814c0,10.6,8.592,19.187,19.186,19.187   h364.694c10.594,0,19.186-8.587,19.186-19.187v-38.699C402.737,359.055,394.145,350.474,383.552,350.474z\\\";\\r\\n\\t\\tvar EXPORT_ICON_PATH_2 = \\\"M506.051,146.306L365.355,5.621c-5.476-5.481-13.72-7.136-20.898-4.154c-7.179,2.971-11.842,9.965-11.842,17.722v63.27   c-73.23,3.333-131.281,26.065-172.753,67.695C96.71,213.54,96.298,297.112,96.308,300.629c0.032,8.684,5.899,16.269,14.299,18.479   c1.622,0.429,3.266,0.632,4.888,0.632c6.761,0,13.185-3.587,16.659-9.673c36.729-64.271,131.506-73.875,184.733-73.875   c5.889,0,11.183,0.117,15.717,0.3v64.067c0,7.763,4.674,14.754,11.842,17.72c7.189,2.986,15.423,1.327,20.898-4.154   l140.706-140.684c3.597-3.604,5.62-8.482,5.62-13.568C511.671,154.785,509.647,149.902,506.051,146.306z M370.976,254.238v-35.707   c0-9.788-7.366-18.011-17.093-19.068c-0.604-0.066-15.075-1.624-36.996-1.624c-45.166,0-116.522,6.525-169.616,42.047   c7.655-20.278,19.979-42.78,39.775-62.652c37.569-37.708,93.005-56.835,164.755-56.835c10.594,0,19.186-8.59,19.186-19.187V65.506   l94.362,94.367L370.976,254.238z\\\";\\r\\n\\t\\t\\r\\n\\t\\tvar groupExport = this.__objSVG.createGroup(this.__EXPORT_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path1 = this.__objSVG.createPath(this.__EXPORT_ICON_ID + \\\"path1\\\",EXPORT_ICON_PATH_1,null);\\r\\n\\t\\tgroupExport.appendChild(path1);\\r\\n\\t\\tvar path2 = this.__objSVG.createPath(this.__EXPORT_ICON_ID + \\\"path2\\\",EXPORT_ICON_PATH_2,null);\\r\\n\\t\\tgroupExport.appendChild(path2);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__EXPORT_ICON_ID,EXPORT_ICON_VIEWPORT,groupExport);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addMinimizeInPage = function() \\r\\n\\t{\\r\\n\\t\\tvar MINIMIZE_ICON_VIEWPORT = \\\"0 0 24 24\\\";\\r\\n\\t\\tvar MINIMIZE_ICON_PATH_1 = \\\"M 0.00 0.00 L 1.83 0.00 C 1.86 1.25 1.24 1.86 -0.00 1.84 L 0.00 0.00 Z\\\";\\r\\n\\t\\tvar MINIMIZE_ICON_PATH_2 = \\\"M 1.83 0.00 L 22.16 0.00 C 22.14 1.24 22.75 1.86 24.00 1.83 L 24.00 22.16 C 22.75 22.14 22.14 22.75 22.17 24.00 L 1.84 24.00 C 1.86 22.75 1.25 22.14 0.00 22.17 L 0.00 1.84 C 1.24 1.86 1.86 1.25 1.83 0.00 Z\\\";\\r\\n\\t\\tvar MINIMIZE_ICON_PATH_3 = \\\"M 22.16 0.00 L 24.00 0.00 L 24.00 1.83 C 22.75 1.86 22.14 1.24 22.16 0.00 Z\\\";\\r\\n\\t\\tvar MINIMIZE_ICON_PATH_4 = \\\"M 4.51 18.36 C 4.46 16.82 4.65 14.43 6.84 14.80 C 10.28 14.69 13.72 14.69 17.16 14.80 C 19.32 14.44 19.53 16.82 19.50 18.35 C 14.51 18.52 9.50 18.51 4.51 18.36 Z\\\";\\r\\n\\t\\tvar MINIMIZE_ICON_PATH_5 = \\\"M 0.00 22.17 C 1.25 22.14 1.86 22.75 1.84 24.00 L 0.00 24.00 L 0.00 22.17 Z\\\";\\r\\n\\t\\tvar MINIMIZE_ICON_PATH_6 = \\\"M 22.17 24.00 C 22.14 22.75 22.75 22.14 24.00 22.16 L 24.00 24.00 L 22.17 24.00 Z\\\";\\r\\n\\t\\t\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__MINIMIZE_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path1 = this.__objSVG.createPath(this.__MINIMIZE_ICON_ID + \\\"path1\\\",MINIMIZE_ICON_PATH_1,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path1);\\r\\n\\t\\tvar path2 = this.__objSVG.createPath(this.__MINIMIZE_ICON_ID + \\\"path2\\\",MINIMIZE_ICON_PATH_2,null);\\r\\n\\t\\tgroup.appendChild(path2);\\r\\n\\t\\tvar path3 = this.__objSVG.createPath(this.__MINIMIZE_ICON_ID + \\\"path3\\\",MINIMIZE_ICON_PATH_3,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path3);\\r\\n\\t\\tvar path4 = this.__objSVG.createPath(this.__MINIMIZE_ICON_ID + \\\"path4\\\",MINIMIZE_ICON_PATH_4,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path4);\\r\\n\\t\\tvar path5 = this.__objSVG.createPath(this.__MINIMIZE_ICON_ID + \\\"path5\\\",MINIMIZE_ICON_PATH_5,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path5);\\r\\n\\t\\tvar path6 = this.__objSVG.createPath(this.__MINIMIZE_ICON_ID + \\\"path6\\\",MINIMIZE_ICON_PATH_6,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path6);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__MINIMIZE_ICON_ID,MINIMIZE_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addMaximizeInPage = function() \\r\\n\\t{\\r\\n\\t\\tvar MAXIMIZE_ICON_VIEWPORT = \\\"0 0 24 24\\\";\\r\\n\\t\\tvar MAXIMIZE_ICON_PATH_1 = \\\"M 0.00 0.00 L 3.24 0.00 C 2.36 1.26 1.28 2.36 0.00 3.22 L 0.00 0.00 Z\\\";\\r\\n\\t\\tvar MAXIMIZE_ICON_PATH_2 = \\\"M 3.24 0.00 L 20.80 0.00 C 21.64 1.28 22.73 2.37 24.00 3.24 L 24.00 20.78 C 22.73 21.65 21.63 22.72 20.77 24.00 L 3.21 24.00 C 2.36 22.72 1.26 21.64 0.00 20.75 L 0.00 3.22 C 1.28 2.36 2.36 1.26 3.24 0.00 Z\\\";\\r\\n\\t\\tvar MAXIMIZE_ICON_PATH_3 = \\\"M 20.80 0.00 L 24.00 0.00 L 24.00 3.24 C 22.73 2.37 21.64 1.28 20.80 0.00 Z\\\";\\r\\n\\t\\tvar MAXIMIZE_ICON_PATH_4 = \\\"M 4.62 6.53 C 9.54 6.41 14.46 6.41 19.38 6.53 C 19.42 10.49 19.42 14.45 19.37 18.42 C 14.46 18.51 9.55 18.51 4.63 18.42 C 4.57 14.45 4.58 10.50 4.62 6.53 Z\\\";\\r\\n\\t\\tvar MAXIMIZE_ICON_PATH_5 = \\\"M 6.48 10.21 C 10.16 10.23 13.84 10.22 17.52 10.21 C 17.51 12.34 17.52 14.47 17.53 16.60 C 13.84 16.59 10.16 16.59 6.48 16.60 C 6.48 14.47 6.48 12.34 6.48 10.21 Z\\\";\\r\\n\\t\\tvar MAXIMIZE_ICON_PATH_6 = \\\"M 0.00 20.75 C 1.26 21.64 2.36 22.72 3.21 24.00 L 0.00 24.00 L 0.00 20.75 Z\\\";\\r\\n\\t\\tvar MAXIMIZE_ICON_PATH_7 = \\\"M 20.77 24.00 C 21.63 22.72 22.73 21.65 24.00 20.78 L 24.00 24.00 L 20.77 24.00 Z\\\";\\r\\n\\t\\t\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__MAXIMIZE_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path1 = this.__objSVG.createPath(this.__MAXIMIZE_ICON_ID + \\\"path1\\\",MAXIMIZE_ICON_PATH_1,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path1);\\r\\n\\t\\tvar path2 = this.__objSVG.createPath(this.__MAXIMIZE_ICON_ID + \\\"path2\\\",MAXIMIZE_ICON_PATH_2,null);\\r\\n\\t\\tgroup.appendChild(path2);\\r\\n\\t\\tvar path3 = this.__objSVG.createPath(this.__MAXIMIZE_ICON_ID + \\\"path3\\\",MAXIMIZE_ICON_PATH_3,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path3);\\r\\n\\t\\tvar path4 = this.__objSVG.createPath(this.__MAXIMIZE_ICON_ID + \\\"path4\\\",MAXIMIZE_ICON_PATH_4,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path4);\\r\\n\\t\\tvar path5 = this.__objSVG.createPath(this.__MAXIMIZE_ICON_ID + \\\"path5\\\",MAXIMIZE_ICON_PATH_5,null);\\r\\n\\t\\tgroup.appendChild(path5);\\r\\n\\t\\tvar path6 = this.__objSVG.createPath(this.__MAXIMIZE_ICON_ID + \\\"path6\\\",MAXIMIZE_ICON_PATH_6,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path6);\\r\\n\\t\\tvar path7 = this.__objSVG.createPath(this.__MAXIMIZE_ICON_ID + \\\"path7\\\",MAXIMIZE_ICON_PATH_7,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path7);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__MAXIMIZE_ICON_ID,MAXIMIZE_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addExpandInPage = function() \\r\\n\\t{\\r\\n\\t\\tvar EXPAND_ICON_VIEWPORT = \\\"0 0 48 48\\\";\\r\\n\\t\\tvar EXPAND_ICON_PATH_1 = \\\"M 0 0 L 0 48 L 48 48 L 48 0 Z\\\";\\r\\n\\t\\tvar EXPAND_ICON_PATH_2 = \\\"M33.17 17.17l-9.17 9.17-9.17-9.17-2.83 2.83 12 12 12-12z\\\";\\r\\n\\t\\tvar EXPAND_ICON_PATH_3 = \\\"M0 0h48v48h-48z\\\";\\r\\n\\t\\t\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__EXPAND_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path1 = this.__objSVG.createPath(this.__EXPAND_ICON_ID + \\\"path1\\\",EXPAND_ICON_PATH_1,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path1);\\r\\n\\t\\tvar path2 = this.__objSVG.createPath(this.__EXPAND_ICON_ID + \\\"path2\\\",EXPAND_ICON_PATH_2,null,null);\\r\\n\\t\\tgroup.appendChild(path2);\\r\\n\\t\\tvar path3 = this.__objSVG.createPath(this.__EXPAND_ICON_ID + \\\"path3\\\",EXPAND_ICON_PATH_3,null,\\\"none\\\");\\r\\n\\t\\tgroup.appendChild(path3);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__EXPAND_ICON_ID,EXPAND_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addCollapseInPage = function() \\r\\n\\t{\\r\\n\\t\\tvar COLLAPSE_ICON_VIEWPORT = \\\"0 0 48 48\\\";\\r\\n\\t\\tvar COLLAPSE_ICON_PATH_1 = \\\"M 0 0 L 0 48 L 48 48 L 48 0 Z\\\";\\r\\n\\t\\tvar COLLAPSE_ICON_PATH_2 = \\\"M24 16l-12 12 2.83 2.83 9.17-9.17 9.17 9.17 2.83-2.83z\\\";\\r\\n\\t\\tvar COLLAPSE_ICON_PATH_3 = \\\"M0 0h48v48h-48z\\\";\\r\\n\\t\\t\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__COLLAPSE_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path1 = this.__objSVG.createPath(this.__COLLAPSE_ICON_ID + \\\"path1\\\",COLLAPSE_ICON_PATH_1,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path1);\\r\\n\\t\\tvar path2 = this.__objSVG.createPath(this.__COLLAPSE_ICON_ID + \\\"path2\\\",COLLAPSE_ICON_PATH_2,null,null);\\r\\n\\t\\tgroup.appendChild(path2);\\r\\n\\t\\tvar path3 = this.__objSVG.createPath(this.__COLLAPSE_ICON_ID + \\\"path3\\\",COLLAPSE_ICON_PATH_3,null,\\\"none\\\");\\r\\n\\t\\tgroup.appendChild(path3);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__COLLAPSE_ICON_ID,COLLAPSE_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addFullScreenInPage = function() \\r\\n\\t{\\r\\n\\t\\tvar VIEWPORT = \\\"0 0 23.65 23.65\\\";\\r\\n\\t\\tvar FULLSCREEN_ICON_PATH_1 = \\\"M 0 0 L 0 23.65 L 23.65 23.65 L 23.65 0 Z\\\";\\r\\n\\t\\tvar FULLSCREEN_ICON_PATH_2 = \\\"M0.587,0.057l6.529,0.621c0,0,0.869-0.027,0.383,0.457C7.011,1.624,5.833,2.801,5.833,2.801\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"S6.12,3.09,6.563,3.526c1.254,1.258,3.539,3.543,4.469,4.473c0,0,0.318,0.189-0.064,0.57c-0.383,0.387-2.072,2.068-2.346,2.344\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"c-0.268,0.273-0.475,0.057-0.475,0.057c-0.904-0.904-3.27-3.266-4.484-4.482C3.271,6.092,3.015,5.835,3.015,5.835\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"S2.067,6.78,1.474,7.374c-0.59,0.592-0.588-0.299-0.588-0.299S0.062,1.225,0.062,0.52C0.062,0.016,0.587,0.057,0.587,0.057z\\\";\\r\\n\\t\\tvar FULLSCREEN_ICON_PATH_3 = \\\"M23.122,23.608l-6.523-0.621c0,0-0.871,0.025-0.387-0.461c0.486-0.484,1.666-1.666,1.666-1.666\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"s-0.287-0.285-0.727-0.723c-1.256-1.26-3.541-3.543-4.471-4.479c0,0-0.322-0.18,0.062-0.564s2.07-2.07,2.346-2.344\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"c0.271-0.275,0.477-0.059,0.477-0.059c0.902,0.906,3.27,3.27,4.482,4.482c0.393,0.395,0.65,0.654,0.65,0.654\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"s0.949-0.947,1.541-1.541c0.59-0.592,0.59,0.301,0.59,0.301s0.822,5.854,0.822,6.549C23.651,23.647,23.122,23.608,23.122,23.608z\\\";\\r\\n\\t\\tvar FULLSCREEN_ICON_PATH_4 = \\\"M0.001,23.094l0.615-6.531c0,0-0.023-0.869,0.465-0.383c0.484,0.486,1.664,1.668,1.664,1.668\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"S3.03,17.561,3.47,17.12c1.256-1.256,3.541-3.541,4.475-4.475c0,0,0.184-0.316,0.568,0.066c0.383,0.387,2.07,2.072,2.344,2.346\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"c0.273,0.271,0.055,0.477,0.055,0.477c-0.906,0.904-3.266,3.27-4.48,4.486c-0.395,0.393-0.652,0.648-0.652,0.648\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"s0.945,0.947,1.537,1.537c0.592,0.594-0.297,0.59-0.297,0.59s-5.85,0.824-6.551,0.824C-0.042,23.62,0.001,23.094,0.001,23.094z\\\";\\r\\n\\t\\tvar FULLSCREEN_ICON_PATH_5 = \\\"M23.552,0.557l-0.615,6.529c0,0,0.023,0.869-0.461,0.383c-0.49-0.49-1.668-1.664-1.668-1.664\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"s-0.286,0.286-0.725,0.725c-1.256,1.256-3.543,3.541-4.475,4.473c0,0-0.184,0.318-0.568-0.066s-2.068-2.066-2.346-2.34\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"c-0.27-0.279-0.057-0.482-0.057-0.482c0.906-0.904,3.27-3.268,4.484-4.48c0.396-0.395,0.65-0.652,0.65-0.652\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"s-0.943-0.945-1.537-1.539c-0.592-0.592,0.299-0.586,0.299-0.586s5.849-0.828,6.552-0.828C23.595,0.03,23.552,0.557,23.552,0.557z\\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__FULLSCREEN_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path1 = this.__objSVG.createPath(this.__FULLSCREEN_ICON_ID + \\\"path1\\\",FULLSCREEN_ICON_PATH_1,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path1);\\r\\n\\t\\tvar path2 = this.__objSVG.createPath(this.__FULLSCREEN_ICON_ID + \\\"path2\\\",FULLSCREEN_ICON_PATH_2,null,null);\\r\\n\\t\\tgroup.appendChild(path2);\\r\\n\\t\\tvar path3 = this.__objSVG.createPath(this.__FULLSCREEN_ICON_ID + \\\"path3\\\",FULLSCREEN_ICON_PATH_3,null,null);\\r\\n\\t\\tgroup.appendChild(path3);\\r\\n\\t\\tvar path4 = this.__objSVG.createPath(this.__FULLSCREEN_ICON_ID + \\\"path4\\\",FULLSCREEN_ICON_PATH_4,null,null);\\r\\n\\t\\tgroup.appendChild(path4);\\r\\n\\t\\tvar path5 = this.__objSVG.createPath(this.__FULLSCREEN_ICON_ID + \\\"path5\\\",FULLSCREEN_ICON_PATH_5,null,null);\\r\\n\\t\\tgroup.appendChild(path5);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__FULLSCREEN_ICON_ID,VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addRestoreInPage = function() \\r\\n\\t{\\r\\n\\t\\tvar VIEWPORT = \\\"0 0 32 32\\\";\\r\\n\\t\\tvar RESTORE_ICON_PATH_1 = \\\"M 0 0 L 0 32 L 32 32 L 32 0 Z\\\";\\r\\n\\t\\tvar RESTORE_ICON_PATH_2 = \\\"22.586,25.414 29.172,32 32,29.172 25.414,22.586 28,20 20,20 20,28\\\";\\r\\n\\t\\tvar RESTORE_ICON_PATH_3 = \\\"6.547,9.371 4,12 11.961,11.957 12,4 9.375,6.543 2.828,0 0,2.828\\\";\\r\\n\\t\\tvar RESTORE_ICON_PATH_4 = \\\"0,29.172 2.828,32 9.414,25.414 12,28 12,20 4,20 6.586,22.586\\\";\\r\\n\\t\\tvar RESTORE_ICON_PATH_5 = \\\"28.031,12 25.438,9.404 32,2.838 29.164,0 22.598,6.566 20,3.971 20,12\\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__RESTORE_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path1 = this.__objSVG.createPath(this.__RESTORE_ICON_ID + \\\"path1\\\",RESTORE_ICON_PATH_1,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path1);\\r\\n\\t\\tvar path2 = this.__objSVG.createPolygon(this.__RESTORE_ICON_ID + \\\"path2\\\",RESTORE_ICON_PATH_2,null);\\r\\n\\t\\tgroup.appendChild(path2);\\r\\n\\t\\tvar path3 = this.__objSVG.createPolygon(this.__RESTORE_ICON_ID + \\\"path3\\\",RESTORE_ICON_PATH_3,null);\\r\\n\\t\\tgroup.appendChild(path3);\\r\\n\\t\\tvar path4 = this.__objSVG.createPolygon(this.__RESTORE_ICON_ID + \\\"path4\\\",RESTORE_ICON_PATH_4,null);\\r\\n\\t\\tgroup.appendChild(path4);\\r\\n\\t\\tvar path5 = this.__objSVG.createPolygon(this.__RESTORE_ICON_ID + \\\"path5\\\",RESTORE_ICON_PATH_5,null);\\r\\n\\t\\tgroup.appendChild(path5);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__RESTORE_ICON_ID,VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addFilterIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar FILTER_ICON_VIEWPORT = \\\"0 0 14.00 16.80\\\";\\r\\n\\t\\tvar FILTER_ICON_PATH = \\\"M 1.39999,0L 0,1.40002L 5.60001,8.40002L 5.60001,14L 8.39999,\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t   \\\"16.8L 8.39999,8.40002L 14,1.40002L 12.6,\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t   \\\"0L 1.39999,0 Z M 2.79999,2.80005L 11.2,2.80005L 6.99997,7L 2.79999,2.80005 Z\\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__FILTER_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__FILTER_ICON_ID + \\\"path\\\",FILTER_ICON_PATH,null,null);\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__FILTER_ICON_ID,FILTER_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addSearchIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar SEARCH_ICON_VIEWPORT = \\\"0 0 250.313 250.313\\\";\\r\\n\\t\\tvar SEARCH_ICON_PATH = \\\"M244.186,214.604l-54.379-54.378c-0.289-0.289-0.628-0.491-0.93-0.76\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t   \\\"c10.7-16.231,16.945-35.66,16.945-56.554C205.822,46.075,159.747,0,102.911,0S0,46.075,0,102.911\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t   \\\"c0,56.835,46.074,102.911,102.91,102.911c20.895,0,40.323-6.245,56.554-16.945c0.269,0.301,0.47,0.64,0.759,0.929l54.38,54.38\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t   \\\"c8.169,8.168,21.413,8.168,29.583,0C252.354,236.017,252.354,222.773,244.186,214.604z M102.911,170.146\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t   \\\"c-37.134,0-67.236-30.102-67.236-67.235c0-37.134,30.103-67.236,67.236-67.236c37.132,0,67.235,30.103,67.235,67.236\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t   \\\"C170.146,140.044,140.043,170.146,102.911,170.146z\\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__SEARCH_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__SEARCH_ICON_ID + \\\"path\\\",SEARCH_ICON_PATH,null,null);\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__SEARCH_ICON_ID,SEARCH_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addCloseIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar CLOSE_ICON_VIEWPORT = \\\"0 0 24 24\\\";\\r\\n\\t\\tvar CLOSE_ICON_PATH_1 = \\\"M 0 0 L 0 24 L 24 24 L 24 0 Z\\\";\\r\\n\\t\\tvar CLOSE_ICON_PATH_2 = \\\"M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272  \\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"0  l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269  \\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73  \\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z\\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__CLOSE_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path1 = this.__objSVG.createPath(this.__CLOSE_ICON_ID + \\\"path1\\\",CLOSE_ICON_PATH_1,null,\\\"currentColor\\\");\\r\\n\\t\\tgroup.appendChild(path1);\\r\\n\\t\\tvar path2 = this.__objSVG.createPath(this.__CLOSE_ICON_ID + \\\"path2\\\",CLOSE_ICON_PATH_2,null);\\r\\n\\t\\tgroup.appendChild(path2);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__CLOSE_ICON_ID,CLOSE_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addTreeIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar TREE_ICON_VIEWPORT = \\\"0 0 16.58 15.80\\\";\\r\\n\\t\\tvar TREE_ICON_PATH = \\\"M 11.7581,6.66565C 11.7581,6.66565 11.3116,6.38879 10.6755,7.20532C 10.0394,7.85571 9.99429,\\\" +\\r\\n\\t\\t\\t\\t\\\"8.29395 9.99429,8.29395C 9.99429,8.29395 9.90411,7.28833 10.256,6.58264C 10.6078,5.87683 11.3116,5.76611 11.7041,\\\" +\\r\\n\\t\\t\\t\\t\\\"5.72461C 11.5417,5.55847 11.4785,5.44775 10.7071,5.48938C 9.9357,5.53088 9.57938,5.95056 9.57938,5.95056C 9.57938,\\\" +\\r\\n\\t\\t\\t\\t\\\"5.95056 9.78674,5.48938 9.92218,5.35095C 10.7206,4.68665 12.1778,5.34167 12.1778,5.34167C 12.1778,5.34167 12.1778,\\\" +\\r\\n\\t\\t\\t\\t\\\"5.06506 11.9117,4.83887C 11.6455,4.61292 10.7206,4.65906 10.7206,4.65906C 10.7206,4.65906 11.6274,4.17932 12.1778,\\\" +\\r\\n\\t\\t\\t\\t\\\"4.49304C 12.7281,4.80664 12.6138,5.12036 12.8318,5.43396C 13.0439,5.06506 13.5222,4.58984 14.2393,4.63147C 14.9565,\\\" +\\r\\n\\t\\t\\t\\t\\\"4.67297 15.3492,4.81128 16.0574,5.6554C 15.6423,5.42004 15.3355,5.32336 14.7762,5.37854C 14.2167,5.43396 13.9101,5.53088 13.9101,\\\" +\\r\\n\\t\\t\\t\\t\\\"5.77991C 14.4018,5.6969 15.3762,5.95056 15.8769,6.66565C 16.3776,7.38062 16.1054,8.19397 16.2197,8.95813C 15.6423,7.88342 15.2588\\\" +\\r\\n\\t\\t\\t\\t\\\",7.15918 14.7762,6.8363C 14.2936,6.51343 13.9101,6.51343 13.5085,6.62415C 13.7251,6.8363 14.1176,7.27454 14.0904,8.18774C 14.0634\\\" +\\r\\n\\t\\t\\t\\t\\\",9.10107 13.0439,10.3789 12.7371,10.3789C 12.8395,9.88074 12.8453,10.1252 13.0439,8.88428C 13.1724,8.08081 13.0512,7.63123 12.8518\\\" +\\r\\n\\t\\t\\t\\t\\\",7.30273L 12.0176,9.84802L 11.5801,12.4558L 9.57986,12.4559L 8.89246,9.43005L 6.63654,4.65344L 6.25824,3.77332L 6.85547\\\" +\\r\\n\\t\\t\\t\\t\\\",3.75793L 8.36816,6.34778L 10.5798,10.8745L 11.9063,7.61487L 12.3238,6.79846L 11.7581,6.66565 Z M 5.74124,3.65503C 5.18652\\\" +\\r\\n\\t\\t\\t\\t\\\",4.28601 4.57645,4.89587 4.88147,6.8031C 5.18652,8.71033 5.1958,8.33459 5.35303,9.10034C 4.88147,9.10034 3.31439,7.13635 3.27274\\\" +\\r\\n\\t\\t\\t\\t\\\",5.73254C 3.23123,4.32861 3.8345,3.65503 4.16736,3.32886C 3.55011,3.15881 2.96072,3.15881 2.21878,3.65503C 1.47684,4.15137 0.887573\\\" +\\r\\n\\t\\t\\t\\t\\\",5.26453 -6.10352e-005,6.9165C 0.175598,5.74194 -0.242737,4.4917 0.527008,3.3927C 1.29663,2.29382 2.79434,1.90381 3.55011\\\" +\\r\\n\\t\\t\\t\\t\\\",2.03149C 3.55011,1.64856 3.07874,1.49963 2.21878,1.41455C 1.35901,1.32947 0.887573,1.47839 0.249664,1.83997C 1.33829,\\\" +\\r\\n\\t\\t\\t\\t\\\"0.54248 1.94156,0.329834 3.04407,0.265991C 4.14651,0.202148 4.88147,0.932495 5.20734,1.49963C 5.54251,1.01758 5.36685\\\" +\\r\\n\\t\\t\\t\\t\\\",0.5354 6.21283,0.0532227C 7.05878,-0.428833 8.45245,0.308594 8.45245,0.308594C 8.45245,0.308594 7.03113,0.237671 6.62189\\\" +\\r\\n\\t\\t\\t\\t\\\",0.585083C 6.21283,0.932495 6.21283,1.35779 6.21283,1.35779C 6.21283,1.35779 8.45245,0.351074 9.67981,1.37207C 9.88785\\\" +\\r\\n\\t\\t\\t\\t\\\",1.58472 10.2067,2.29382 10.2067,2.29382C 10.2067,2.29382 9.65897,1.64856 8.4733,1.58472C 7.28763,1.52087 7.19046,1.69104 6.94092\\\" +\\r\\n\\t\\t\\t\\t\\\",1.94641C 7.54419,2.01013 8.62585,2.1803 9.16675,3.26501C 9.70746,4.34985 9.56879,5.89551 9.56879,5.89551C 9.56879,5.89551 9.49945\\\" +\\r\\n\\t\\t\\t\\t\\\",5.22192 8.52179,4.22229C 7.54419,2.96729 6.85773,3.3927 6.85773,3.3927L 5.74124,3.65503 Z M 2.57837,13.8029L 6.05347,13.1345L 9.57922,\\\" +\\r\\n\\t\\t\\t\\t\\\"12.8025L 11.5793,12.8025L 15.5798,13.8029L 16.5799,14.8031L 13.5796,14.8031L 12.5795,15.8036L 8.5791,15.8036L 6.57889,14.8031L 1.57855,\\\" +\\r\\n\\t\\t\\t\\t\\\"14.98L 2.57837,13.8029 Z \\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__TREE_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__TREE_ICON_ID + \\\"path\\\",TREE_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#2B2B2B\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__TREE_ICON_ID,TREE_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addExportIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar EXPORT_ICON_VIEWPORT = \\\"0 0 18.00 14.40\\\";\\r\\n\\t\\tvar EXPORT_ICON_PATH = \\\"M 0.000244141,6.10352e-005L 4.80011,6.10352e-005L 8.39996,3.59991L 11.9998,0L 16.7999,0L 16.7999,\\\" +\\r\\n\\t\\t\\t\\t\\\"2.39996L 12.0001,7.20001L 12,8.39996L 16.7999,8.39996L 16.7999,9.59998L 15.6001,10.8L 18,13.2L 18,14.4L 14.4,\\\" +\\r\\n\\t\\t\\t\\t\\\"14.4L 14.4,13.1999L 6.10352e-005,13.1999L 6.10352e-005,11.9999L 4.79999,7.19995L 0,2.39996L 0.000244141,\\\" +\\r\\n\\t\\t\\t\\t\\\"6.10352e-005 Z M 1.19989,1.20007L 3.60028,1.19995L 14.4001,11.9999L 12.0001,11.9999L 1.19989,1.20007 Z\\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__EXPORT_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__EXPORT_ICON_ID + \\\"path\\\",EXPORT_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#3F3F3F\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__EXPORT_ICON_ID,EXPORT_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addMoveIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar MOVE_ICON_VIEWPORT = \\\"0 0 18.00 22.00\\\";\\r\\n\\t\\tvar MOVE_ICON_PATH = \\\"M 8.00006,2L 10.0001,2L 10.0001,4L 8.00006,4L 8.00006,2 Z M 8,6L 10,6L 10,8L 8,\\\" +\\r\\n\\t\\t\\t\\t\\\"8L 8,6 Z M 8,10L 10,10L 10,12L 8,12L 8,10 Z M 8,14L 10,14L 10,16L 8,16L 8,14 Z M 8,18L 10,18L 10,20L 8,20L 8,18 Z\\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__MOVE_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__MOVE_ICON_ID + \\\"path\\\",MOVE_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#909090\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__MOVE_ICON_ID,MOVE_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addLeftIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar LEFT_ICON_VIEWPORT = \\\"0 0 11.00 8.00\\\";\\r\\n\\t\\tvar LEFT_ICON_PATH = \\\"M 11,5.99921L 5.00073,5.99921L 5.00073,7.99896L 0,4.00006L 5.00073,6.10352e-005L 5.00073,1.99969L 11,1.99969L 11,5.99921 Z\\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__LEFT_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__LEFT_ICON_ID + \\\"path\\\",LEFT_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#282828\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__LEFT_ICON_ID,LEFT_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addRightIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar RIGHT_ICON_VIEWPORT = \\\"0 0 11.00 8.00\\\";\\r\\n\\t\\tvar RIGHT_ICON_PATH = \\\"M 0,1.99976L 5.99927,1.99976L 5.99927,0L 11,3.9989L 5.99927,7.9989L 5.99927,5.99927L 0,5.99927L 0,1.99976 Z \\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__RIGHT_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__RIGHT_ICON_ID + \\\"path\\\",RIGHT_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#282828\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__RIGHT_ICON_ID,RIGHT_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addHistoryIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar HISTORY_ICON_VIEWPORT = \\\"0 0 15.00 15.00\\\";\\r\\n\\t\\tvar HISTORY_ICON_PATH = \\\"M 7.5,-1.52588e-005C 11.6422,-1.52588e-005 15,3.35789 15,7.49998C 15,11.6422 11.6421,15 7.5,15C 3.35787,15 0,11.6422 0,\\\" +\\r\\n\\t\\t\\t\\t\\\"7.49998C 0,3.35789 3.35785,-1.52588e-005 7.5,-1.52588e-005 Z M 7.49998,1.99998C 4.46234,1.99998 1.99987,4.46239 1.99987,7.50005C 1.99987,\\\" +\\r\\n\\t\\t\\t\\t\\\"10.5377 4.46235,13.0002 7.49998,13.0002C 10.5376,13.0002 13.0001,10.5377 13.0001,7.50005C 13.0001,4.46239 10.5376,1.99998 7.49998,\\\" +\\r\\n\\t\\t\\t\\t\\\"1.99998 Z M 6.00001,3.99998L 8,3.99998L 8,6.99998L 11,6.99998L 11,8.99998L 6,8.99998L 6.00001,7.99998L 6,6.99998L 6.00001,3.99998 Z \\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__HISTORY_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__HISTORY_ICON_ID + \\\"path\\\",HISTORY_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#3F3F3F\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__HISTORY_ICON_ID,HISTORY_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t \\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addPendingIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar PENDING_ICON_VIEWPORT = \\\"0 0 12.00 14.00\\\";\\r\\n\\t\\tvar PENDING_ICON_PATH = \\\"M 1,2.00016L 11,2.00004L 11.0001,3.99986L 8.00012,6.99967L 7.99927,6.99986L 8.00004,6.99986L 11.0002,9.99937L 11.0001,11L 11.0001,12L 1.00016,12L 1.00016,11L 1.00041,9.99955L 4.00008,6.99986L 1.00004,4.00004L 1,2.00016 Z M 0,0.000160217L 12,3.8147e-005L 12,\\\" +\\r\\n\\t\\t\\t\\t\\\"1.00004L 0,1.00016L 0,0.000160217 Z M 0,13.0002L 12,13L 12,14L 0,14.0002L 0,13.0002 Z M 3.00004,5.00004L 9.00008,4.99986L 7.00008,\\\" +\\r\\n\\t\\t\\t\\t\\\"6.99986L 5.00004,7.00004L 3.00004,5.00004 Z M 2.00008,10.9999L 10.0001,10.9997L 10.0001,9.99967L 7.00012,7.99967L 5.00008,\\\" +\\r\\n\\t\\t\\t\\t\\\"7.99986L 2.00008,9.99986L 2.00008,10.9999 Z \\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__PENDING_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__PENDING_ICON_ID + \\\"path\\\",PENDING_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#3F3F3F\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__PENDING_ICON_ID,PENDING_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t \\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addSupervisorIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar SUPERVISOR_ICON_VIEWPORT = \\\"0 0 14.00 14.01\\\";\\r\\n\\t\\tvar SUPERVISOR_ICON_PATH = \\\"M 10.2679,7.15833L 11.388,9.45691L 14.0016,9.77368L 12.0803,11.511L 12.5755,14.0054L 10.2679,\\\" +\\r\\n\\t\\t\\t\\t\\\"12.7805L 7.96036,14.0054L 8.45554,11.511L 6.53418,9.77368L 9.14783,9.45691L 10.2679,7.15833 Z M 3.05176e-005,\\\" +\\r\\n\\t\\t\\t\\t\\\"11.2043C 3.05176e-005,7.64325 1.7113,8.45258 4.04489,7.15759C 4.19977,7.07166 4.02631,5.94464 3.88931,\\\" +\\r\\n\\t\\t\\t\\t\\\"5.86267C 3.37726,5.55652 3.54456,5.15356 3.42261,4.56775C 3.1698,3.35376 2.98596,2.25751 3.42261,1.49231C 4.5174,\\\" +\\r\\n\\t\\t\\t\\t\\\"-0.426392 6.68039,-0.568359 7.9342,1.49231C 8.42841,2.30457 8.08359,3.50476 7.9342,4.56775C 7.84033,5.23511 8.03143,\\\" +\\r\\n\\t\\t\\t\\t\\\"5.50861 7.46747,5.86267C 7.31366,5.95923 7.13449,7.10297 7.31183,7.15765C 8.01917,7.37561 8.62146,7.49121 9.12555,\\\" +\\r\\n\\t\\t\\t\\t\\\"7.61108L 8.71188,8.71448L 4.97815,9.33698L 6.84497,11.2043L 3.05176e-005,11.2043 Z  \\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__SUPERVISOR_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__SUPERVISOR_ICON_ID + \\\"path\\\",SUPERVISOR_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#3F3F3F\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__SUPERVISOR_ICON_ID,SUPERVISOR_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addEntityIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar ENTITY_ICON_VIEWPORT = \\\"0 0 12.00 12.00\\\";\\r\\n\\t\\tvar ENTITY_ICON_PATH = \\\"M 0,1.52588e-005L 12,1.52588e-005L 12,12L 0,12L 0,1.52588e-005 Z M 8.31001,9.84993L 3.69,9.84993L 3.69,\\\" +\\r\\n\\t\\t\\t\\t\\\"2.14992L 8.09,2.14992L 8.09,3.57991L 5.45,3.57991L 5.45,5.22987L 7.98,5.22987L 7.98,6.65993L 5.45,6.65993L 5.45,8.41994L 8.31001,\\\" +\\r\\n\\t\\t\\t\\t\\\"8.41994L 8.31001,9.84993 Z\\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__ENTITY_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__ENTITY_ICON_ID + \\\"path\\\",ENTITY_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#707070\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__ENTITY_ICON_ID,ENTITY_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addDivisionIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar DIVISION_ICON_VIEWPORT = \\\"0 0 12.00 12.00\\\";\\r\\n\\t\\tvar DIVISION_ICON_PATH = \\\"M 0,4.57764e-005L 12,4.57764e-005L 12,12L 0,12L 0,4.57764e-005 Z M 2.53501,9.84996L 2.53501,2.15001L 5.30219,\\\" +\\r\\n\\t\\t\\t\\t\\\"2.15001C 8.0774,2.15001 9.46501,3.40123 9.46501,5.90373C 9.46501,7.10228 9.08631,8.05962 8.32892,8.77574C 7.57151,9.49193 6.5626,\\\" +\\r\\n\\t\\t\\t\\t\\\"9.84996 5.30219,9.84996L 2.53501,9.84996 Z M 4.295,3.57994L 4.295,8.41997L 5.16125,8.41997C 5.92094,8.41997 6.51648,8.19627 6.9479,\\\" +\\r\\n\\t\\t\\t\\t\\\"7.74883C 7.37931,7.30138 7.59501,6.69261 7.59501,5.92265C 7.59501,5.19505 7.38102,4.62267 6.95305,4.20561C 6.52509,3.78856 5.92438,\\\" +\\r\\n\\t\\t\\t\\t\\\"3.57994 5.15094,3.57994L 4.295,3.57994 Z\\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__DIVISION_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__DIVISION_ICON_ID + \\\"path\\\",DIVISION_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#707070\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__DIVISION_ICON_ID,DIVISION_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addGroupIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar GROUP_ICON_VIEWPORT = \\\"0 0 13.00 10.00\\\";\\r\\n\\t\\tvar GROUP_ICON_PATH = \\\"M 11.9985,4.00386L 1.99975,4.00392L 0,9.0005L 0,0.00672913L 2.99981,1.52588e-005L 4.99954,1.99867L 11.9985,\\\" +\\r\\n\\t\\t\\t\\t\\\"2.00533L 11.9985,4.00386 Z M 12.9985,4.99684L 10.9988,9.99342L 0.999805,10L 2.9996,5.00343L 12.9985,4.99684 Z\\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__GROUP_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__GROUP_ICON_ID + \\\"path\\\",GROUP_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#707070\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__GROUP_ICON_ID,GROUP_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addHierarchyIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar HIERARCHY_ICON_VIEWPORT = \\\"0 0 12.00 12.00\\\";\\r\\n\\t\\tvar HIERARCHY_ICON_PATH = \\\"M 0,3.05176e-005L 12,3.05176e-005L 12,12L 0,12L 0,\\\" +\\r\\n\\t\\t\\t\\t\\\"3.05176e-005 Z M 2.69484,2.30722L 3.90313,2.30722L 3.90313,5.2858L 8.09688,\\\" +\\r\\n\\t\\t\\t\\t\\\"5.2858L 8.09688,2.30722L 9.30516,2.30722L 9.30516,9.69266L 8.09688,\\\" +\\r\\n\\t\\t\\t\\t\\\"9.69266L 8.09688,6.38406L 3.90313,6.38406L 3.90313,9.69266L 2.69484,\\\" +\\r\\n\\t\\t\\t\\t\\\"9.69266L 2.69484,2.30722 Z \\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__HIERARCHY_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__HIERARCHY_ICON_ID + \\\"path\\\",HIERARCHY_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#707070\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__HIERARCHY_ICON_ID,HIERARCHY_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addEqualIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar EQUAL_ICON_VIEWPORT = \\\"0 0 7.63 5.76\\\";\\r\\n\\t\\tvar EQUAL_ICON_PATH = \\\"M 0,0L 7.62986,0L 7.62986,2.30396L 0,2.30396L 0,\\\" +\\r\\n\\t\\t\\t\\t\\\"0 Z M 0,3.45599L 7.62986,3.45599L 7.62986,5.75995L 0,5.75995L 0,3.45599 Z\\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__EQUAL_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__EQUAL_ICON_ID + \\\"path\\\",EQUAL_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#7AC08F\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__EQUAL_ICON_ID,EQUAL_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addGreaterIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar GREATER_ICON_VIEWPORT = \\\"0 0 8.06 8.78\\\";\\r\\n\\t\\tvar GREATER_ICON_PATH = \\\"M 0,8.78406L 8.06175,5.48553L 8.06175,3.29852L 0,\\\" +\\r\\n\\t\\t\\t\\t\\\"6.10352e-005L 0,2.48181L 4.89913,4.39203L 0,6.30231L 0,8.78406 Z \\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__GREATER_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__GREATER_ICON_ID + \\\"path\\\",GREATER_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#7AC08F\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__GREATER_ICON_ID,GREATER_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addGreaterEqualIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar GREATEREQUAL_ICON_VIEWPORT = \\\"0 0 8.06 8.78\\\";\\r\\n\\t\\tvar GREATEREQUAL_ICON_PATH = \\\"M 0,8.78406L 8.06175,5.48553L 8.06175,3.29852L 0,\\\" +\\r\\n\\t\\t\\t\\t\\\"6.10352e-005L 0,2.48181L 4.89913,4.39203L 0,6.30231L 0,8.78406 Z \\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__GREATEREQUAL_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__GREATEREQUAL_ICON_ID + \\\"path\\\",GREATEROPEN_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#7AC08F\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__GREATEREQUAL_ICON_ID,GREATEREQUAL_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addLessIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar LESS_ICON_VIEWPORT = \\\"0 0 8.06 8.78\\\";\\r\\n\\t\\tvar LESS_ICON_PATH = \\\"M 8.06175,8.78406L 0,5.48553L 0,3.29852L 8.06175,6.10352e-005L 8.06175,2.48181L 3.16262,\\\" +\\r\\n\\t\\t\\t\\t\\\"4.39203L 8.06175,6.30231L 8.06175,8.78406 Z\\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__LESS_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__LESS_ICON_ID + \\\"path\\\",LESS_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#7AC08F\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__LESS_ICON_ID,LESS_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addLessEqualIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar LESSEQUAL_ICON_VIEWPORT = \\\"0 0 8.06 11.66\\\";\\r\\n\\t\\tvar LESSEQUAL_ICON_PATH = \\\"M 8.06177,8.78395L 0,5.50795L 0,3.2737L 8.06177,-4.57764e-005L 8.06177,\\\" +\\r\\n\\t\\t\\t\\t\\\"2.4839L 3.12888,4.39198L 8.06177,6.3022L 8.06177,8.78395 Z M 0,9.36L 8.06177,\\\" +\\r\\n\\t\\t\\t\\t\\\"9.36L 8.06177,11.664L 0,11.664L 0,9.36 Z \\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__LESSEQUAL_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__LESSEQUAL_ICON_ID + \\\"path\\\",LESSEQUAL_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#7AC08F\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__LESSEQUAL_ICON_ID,LESSEQUAL_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addFocusViewIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar FOCUSVIEW_ICON_VIEWPORT = \\\"0 0 21.77 14.00\\\";\\r\\n\\t\\tvar FOCUSVIEW_ICON_PATH = \\\"M 0,9.91821e-005L 3.11017,9.91821e-005L 3.11017,14L 0,14L 0,9.91821e-005 Z M 4.66608,\\\" +\\r\\n\\t\\t\\t\\t\\\"-2.28882e-005L 21.772,-2.28882e-005L 21.772,13.9999L 4.66608,13.9999L 4.66608,-2.28882e-005 Z M 7.77557,\\\" +\\r\\n\\t\\t\\t\\t\\\"3.11118L 18.6613,3.11118L 18.6613,4.66679L 7.77557,4.66679L 7.77557,3.11118 Z M 7.77557,6.22233L 18.6613,6.22233L 18.6613,\\\" +\\r\\n\\t\\t\\t\\t\\\"7.77787L 7.77557,7.77787L 7.77557,6.22233 Z M 7.77557,9.33341L 18.6613,9.33341L 18.6613,10.889L 7.77557,10.889L 7.77557,9.33341 Z \\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__FOCUSVIEW_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__FOCUSVIEW_ICON_ID + \\\"path\\\",FOCUSVIEW_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#494949\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__FOCUSVIEW_ICON_ID,FOCUSVIEW_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addHolisticViewIcon = function()\\r\\n\\t{\\r\\n\\t\\tvar HOLISTICVIEW_ICON_VIEWPORT = \\\"0 0 20.22 14.00\\\";\\r\\n\\t\\tvar HOLISTICVIEW_ICON_PATH = \\\"M 0.00012207,0L 20.2158,0L 20.2158,14L 0.00012207,14L 0.00012207,0 Z M 1.55432,1.5556L 6.21985,\\\" +\\r\\n\\t\\t\\t\\t\\\"1.5556L 6.21985,3.11121L 1.55432,3.11115L 1.55432,1.5556 Z M 1.55432,4.66669L 6.21985,4.66681L 6.21985,\\\" +\\r\\n\\t\\t\\t\\t\\\"6.22229L 1.55432,6.22223L 1.55432,4.66669 Z M 1.55432,7.77783L 6.21985,7.77789L 6.21985,9.33344L 1.55432,\\\" +\\r\\n\\t\\t\\t\\t\\\"9.33331L 1.55432,7.77783 Z M 1.55432,10.889L 6.2196,10.889L 6.2196,12.4445L 1.55432,12.4445L 1.55432,\\\" +\\r\\n\\t\\t\\t\\t\\\"10.889 Z M 7.77454,1.5556L 12.4403,1.5556L 12.4403,3.11121L 7.77454,3.11115L 7.77454,1.5556 Z M 7.77454\\\" +\\r\\n\\t\\t\\t\\t\\\",4.66669L 12.4403,4.66681L 12.4403,6.22229L 7.77454,6.22223L 7.77454,4.66669 Z M 7.77454,7.77783L 12.4403,\\\" +\\r\\n\\t\\t\\t\\t\\\"7.77789L 12.4403,9.33344L 7.77454,9.33331L 7.77454,7.77783 Z M 7.77502,10.889L 12.4403,10.889L 12.4403,\\\" +\\r\\n\\t\\t\\t\\t\\\"12.4445L 7.77502,12.4445L 7.77502,10.889 Z M 13.9952,1.5556L 18.6606,1.5556L 18.6606,3.11121L 13.9952,\\\" +\\r\\n\\t\\t\\t\\t\\\"3.11115L 13.9952,1.5556 Z M 13.9952,4.66669L 18.6606,4.66681L 18.6606,6.22229L 13.9952,6.22223L 13.9952,\\\" +\\r\\n\\t\\t\\t\\t\\\"4.66669 Z M 13.9952,7.77783L 18.6606,7.77789L 18.6606,9.33344L 13.9952,9.33331L 13.9952,7.77783 Z M 13.9952,\\\" +\\r\\n\\t\\t\\t\\t\\\"10.889L 18.6609,10.889L 18.6609,12.4445L 13.9952,12.4445L 13.9952,10.889 Z\\\";\\r\\n\\t\\tvar group = this.__objSVG.createGroup(this.__HOLISTICVIEW_ICON_ID + \\\"group\\\");\\r\\n\\t\\tvar path = this.__objSVG.createPath(this.__HOLISTICVIEW_ICON_ID + \\\"path\\\",HOLISTICVIEW_ICON_PATH,null,null);\\r\\n\\t\\tpath.setAttribute(\\\"fill\\\",\\\"#494949\\\");\\r\\n\\t\\tpath.setAttribute(\\\"fill-rule\\\",\\\"evenodd\\\");\\r\\n\\t\\tgroup.appendChild(path);\\r\\n\\t\\tthis.__objSVG.addElementInSymbol(this.__HOLISTICVIEW_ICON_ID,HOLISTICVIEW_ICON_VIEWPORT,group);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSSvgShapes.prototype.addColumnSettingIcon = function() \\r\\n\\t{\\r\\n        var COLUMNSETTING_ICON_VIEWPORT = \\\"0 0 1000 1000\\\";\\r\\n        var COLUMNSETTING_ICON_PATH = \\\"M898.1,10H668.4h-30.6H362.2h-30.6H101.9C51.1,10,10,51.1,10,101.9v229.7v566.6c0,50.7,41.1,91.9,91.9,91.9h229.7h30.6h275.6h30.6h229.7c50.7,0,91.9-41.1,91.9-91.9V331.6V101.9C990,51.1,948.9,10,898.1,10z M331.6,959.4H117.2c-42.3,0-76.6-34.3-76.6-76.6V362.2h290.9V959.4z M637.8,959.4H362.2V362.2h275.6V959.4z M959.4,882.8c0,42.3-34.3,76.6-76.6,76.6H668.4V362.2h290.9V882.8z M959.4,331.6H40.6V117.2c0-42.3,34.3-76.6,76.6-76.6h214.4h30.6h275.6h30.6h214.4c42.3,0,76.6,34.3,76.6,76.6V331.6 Z\\\";\\r\\n        var group = this.__objSVG.createGroup(this.__COLUMNSETTING_ICON_ID + \\\"group\\\");\\r\\n        var path = this.__objSVG.createPath(this.__COLUMNSETTING_ICON_ID + \\\"path\\\", COLUMNSETTING_ICON_PATH, null);\\r\\n        group.appendChild(path);\\r\\n        this.__objSVG.addElementInSymbol(this.__COLUMNSETTING_ICON_ID, COLUMNSETTING_ICON_VIEWPORT, group);\\r\\n    };\\r\\n\\t\\r\\n\\treturn NSSvgShapes;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSSvgShapes\\\",NSSvgShapes);\";","export const NSConsoleCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\n\\r\\n\\t\\t}\\r\\n\\\"use strict\\\";\\r\\nvar NSConsole = (function()\\r\\n{\\r\\n\\tfunction NSConsole(setting)\\r\\n\\t{\\r\\n\\t\\tthis.CONSOLE_FUNCTION = [\\\"log\\\",\\\"info\\\",\\\"debug\\\",\\\"warn\\\",\\\"error\\\"];\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__config = {};\\r\\n\\t\\t\\r\\n\\t    this.__id = null;\\r\\n\\t    this.__divContainer = null;\\r\\n\\t    this.__divHeaderCon = null;\\r\\n\\t    this.__divConsoleBodyCon = null;\\r\\n\\t    \\r\\n\\t    this.__height = 215;    \\r\\n\\t    this.__headerHeight = 28; \\r\\n\\t    this.__nsTransition = null;\\r\\n\\t    this.__objDefaultFunction = {};\\r\\n\\t    this.__objResize = {};\\r\\n\\t    \\r\\n\\t    this.__svgExpandCollpse = \\\"<svg viewBox=\\\\\\\"0 0 40 40\\\\\\\" style=\\\\\\\"transform: rotateZ(0deg);\\\\\\\"><g><path d=\\\\\\\"m31 26.4q0 0.3-0.2 0.5l-1.1 1.2q-0.3 0.2-0.6 0.2t-0.5-0.2l-8.7-8.8-8.8 8.8q-0.2 0.2-0.5 0.2t-0.5-0.2l-1.2-1.2q-0.2-0.2-0.2-0.5t0.2-0.5l10.4-10.4q0.3-0.2 0.6-0.2t0.5 0.2l10.4 10.4q0.2 0.2 0.2 0.5z\\\\\\\"></path></g></svg>\\\"\\r\\n\\t    \\r\\n\\t    this.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__initialize = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setting = {};\\r\\n\\t\\t}\\r\\n\\t\\tthis.__config = {\\r\\n\\t\\t\\tcontainer: this.__setting.container || document.body,\\r\\n\\t\\t\\theaderText: this.__setting.headerText || \\\"Console\\\",\\r\\n\\t\\t\\tenableResize:(this.util.isUndefinedOrNull(this.__setting[\\\"enableResize\\\"]) ? true : Boolean.parse(this.__setting[\\\"enableResize\\\"])),\\r\\n\\t\\t\\toverrideConsole:(this.util.isUndefinedOrNull(this.__setting[\\\"overrideConsole\\\"]) ? true : Boolean.parse(this.__setting[\\\"overrideConsole\\\"])),\\r\\n\\t\\t\\tisExpanded: Boolean.parse(this.__setting[\\\"isExpanded\\\"]),\\r\\n\\t\\t\\tisEnabled:(this.util.isUndefinedOrNull(this.__setting[\\\"isEnabled\\\"]) ? true : Boolean.parse(this.__setting[\\\"isEnabled\\\"])),\\r\\n\\t\\t\\tdefaultHeight: (this.util.isUndefinedOrNull(this.__setting[\\\"defaultHeight\\\"]) ? 215 : parseInt(this.__setting[\\\"defaultHeight\\\"])),\\r\\n\\t\\t\\tminHeight: (this.util.isUndefinedOrNull(this.__setting[\\\"minHeight\\\"]) ? (this.__headerHeight + 20) : parseInt(this.__setting[\\\"minHeight\\\"])),\\r\\n\\t\\t};\\r\\n\\t\\tthis.__height = this.__config.defaultHeight;\\r\\n\\t\\tif(this.__config.minHeight < this.__headerHeight)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.warning(\\\"NSConsole\\\",\\\"Min Height in setting is less than Header height so defaulting to Header Height + 20.\\\");\\r\\n\\t\\t\\tthis.__config.minHeight = (this.__headerHeight + 20);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__createElements();\\r\\n\\t\\tif(this.__config.overrideConsole)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < this.CONSOLE_FUNCTION.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar key = this.CONSOLE_FUNCTION[count];\\r\\n\\t\\t\\t\\tthis.__objDefaultFunction[key] = console[key];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__setEventToDefault(false);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__config.isExpanded)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__height = this.__divContainer.getBoundingClientRect().height;\\r\\n\\t\\t\\tthis.__divContainer.style.height = this.__headerHeight + \\\"px\\\";\\r\\n\\t\\t\\tthis.__divConsoleBodyCon.style.visibility = \\\"hidden\\\";\\r\\n\\t\\t\\tthis.__setExpandCollapseIcon();\\r\\n\\t\\t\\tthis.__setResizerAfterAnimation();\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__config.isEnabled)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.disable();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.expand = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__divContainer && !this.__config.isExpanded)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divConsoleBodyCon.style.visibility = \\\"visible\\\";\\r\\n\\t\\t\\tvar cssAnimationHelper = new this.util.nsCSSAnimationHelper();\\r\\n\\t\\t\\tcssAnimationHelper.addEndEvent(this.__divContainer,this.__animationEndHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__divContainer,\\\"nsConsoleExpanding\\\");\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tsetTimeout(function(){\\r\\n\\t\\t\\t\\tself.__divContainer.style.height = self.__height + \\\"px\\\";\\r\\n\\t\\t\\t},0);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.collapse = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__divContainer && this.__config.isExpanded)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cssAnimationHelper = new this.util.nsCSSAnimationHelper();\\r\\n\\t\\t\\tcssAnimationHelper.addEndEvent(this.__divContainer,this.__animationEndHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__divContainer,\\\"nsConsoleCollapsing\\\");\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tsetTimeout(function(){\\r\\n\\t\\t\\t\\tself.__height = self.__divContainer.getBoundingClientRect().height;\\r\\n\\t\\t\\t\\tself.__divContainer.style.height = self.__headerHeight + \\\"px\\\";\\r\\n\\t\\t\\t},0);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.enable = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__divContainer && !this.__config.isEnabled)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__divContainer,\\\"nsConsoleDisable\\\");\\r\\n\\t\\t\\tthis.__setEventToDefault(false);\\r\\n\\t\\t\\tthis.__config.isEnabled = true;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.disable = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__divContainer && this.__config.isEnabled)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__divContainer,\\\"nsConsoleDisable\\\");\\r\\n\\t\\t\\tthis.__setEventToDefault(true);\\r\\n\\t\\t\\tthis.__config.isEnabled = false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.clear = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__divConsoleBodyTextBody)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divConsoleBodyTextBody.innerHTML = \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.log = function(message)\\r\\n\\t{\\r\\n\\t\\tthis.__addMessage(message,\\\"Log\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.info = function(message)\\r\\n\\t{\\r\\n\\t\\tthis.__addMessage(message,\\\"Info\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.debug = function(message)\\r\\n\\t{\\r\\n\\t\\tthis.__addMessage(message,\\\"Debug\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.warn = function(message)\\r\\n\\t{\\r\\n\\t\\tthis.__addMessage(message,\\\"Warn\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.error = function(message)\\r\\n\\t{\\r\\n\\t\\tthis.__addMessage(message,\\\"Error\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__createElements = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar id = this.__getID();\\r\\n\\t\\t\\tthis.__divContainer = this.util.createDiv(id + \\\"Container\\\",\\\"nsConsoleContainer\\\");\\r\\n\\t\\t\\tthis.__divContainer.style.height = this.__height + \\\"px\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tthis.__createResizer();\\r\\n\\t\\t\\tthis.__divHeaderCon = this.util.createDiv(id + \\\"Header\\\",\\\"nsConsoleHeaderCon\\\");\\r\\n\\t\\t\\tthis.__createHeader();\\r\\n\\t\\t\\tthis.__divContainer.appendChild(this.__divHeaderCon);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tthis.__divConsoleBodyCon = this.util.createDiv(id + \\\"Body\\\",\\\"nsConsoleBodyCon\\\");\\r\\n\\t\\t\\t//this.__divConsoleBodyCon.style.height = (this.__height - 11) + \\\"px\\\";\\r\\n\\t\\t\\tthis.__createBody();\\r\\n\\t\\t\\tthis.__divContainer.appendChild(this.__divConsoleBodyCon);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tthis.__config.container.appendChild(this.__divContainer);\\r\\n\\t\\t\\tthis.__nsTransition = new this.util.transition(this.__divContainer,this.__animationEndHandler.bind(this));\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__createHeader = function()\\r\\n\\t{\\r\\n\\t\\tvar id = this.__getID();\\r\\n\\t\\tthis.__divHeaderTextCon = this.util.createDiv(id + \\\"HeaderTextCon\\\",\\\"nsConsoleHeaderTextCon\\\");\\r\\n\\t\\tthis.__divHeaderTextParent = this.util.createDiv(id + \\\"HeaderTextParent\\\",\\\"nsConsoleHeaderTextParent\\\");\\r\\n\\t\\tthis.__divHeaderText1 = this.util.createDiv(id + \\\"HeaderText1\\\",\\\"nsConsoleHeaderText nsConsoleHeaderText1\\\");\\r\\n\\t\\tthis.__divHeaderText1.appendChild(document.createTextNode(this.__config.headerText));\\r\\n\\t\\tthis.__divHeaderCon.style.height = (this.__headerHeight - 6) + \\\"px\\\";\\r\\n\\t\\t//this.__divHeaderCon.style.top = (-1 * this.__headerHeight) + \\\"px\\\";\\r\\n\\t\\tthis.util.addEvent(this.__divHeaderCon,\\\"click\\\",this.__expandCollapseClickHandler.bind(this));\\r\\n\\t\\tthis.__divHeaderTextParent.appendChild(this.__divHeaderText1);\\r\\n\\t\\tthis.__divHeaderTextCon.appendChild(this.__divHeaderTextParent);\\r\\n\\t\\tthis.__divHeaderFilterCon = this.util.createDiv(id + \\\"HeaderFilterCon\\\",\\\"nsConsoleHeaderFilterCon\\\");\\r\\n\\t\\tthis.__divHeaderTextCon.appendChild(this.__divHeaderFilterCon);\\r\\n\\t\\tthis.__divHeaderCon.appendChild(this.__divHeaderTextCon);\\r\\n\\t\\tthis.__divHeaderExpandCollapseCon = this.util.createDiv(id + \\\"HeaderExpandCollapseCon\\\",\\\"nsConsoleHeaderExpandCollapseCon\\\");\\r\\n\\t\\tthis.__divHeaderExpandCollapseCon.innerHTML = this.__svgExpandCollpse;\\r\\n\\t\\tthis.__iconExpandCollapse = this.__divHeaderExpandCollapseCon.firstChild;\\r\\n\\t\\tthis.util.addStyleClass(this.__iconExpandCollapse,\\\"nsConsoleHeaderIcon nsConsoleHeaderExpandCollapseIcon\\\");\\r\\n\\t\\tthis.util.addEvent(this.__iconExpandCollapse,\\\"click\\\",this.__expandCollapseClickHandler.bind(this));\\r\\n\\t\\tthis.__divHeaderCon.appendChild(this.__divHeaderExpandCollapseCon);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__createBody = function()\\r\\n\\t{\\r\\n\\t\\tvar id = this.__getID();\\r\\n\\t\\tthis.__divConsoleBodyParent = this.util.createDiv(id + \\\"ConsoleBodyParent\\\",\\\"nsConsoleBodyParent\\\");\\r\\n\\t\\tthis.__divConsoleBodyTextCon = this.util.createDiv(id + \\\"ConsoleBodyTextCon\\\",\\\"nsConsoleBodyTextCon\\\");\\r\\n\\t\\tthis.__divConsoleBodyTextBody = this.util.createDiv(id + \\\"ConsoleBodyTextBody\\\",\\\"nsConsoleBodyTextBody\\\");\\r\\n\\t\\t\\r\\n\\t\\tthis.__divConsoleBodyTextCon.appendChild(this.__divConsoleBodyTextBody);\\r\\n\\t\\tthis.__divConsoleBodyParent.appendChild(this.__divConsoleBodyTextCon);\\r\\n\\t\\tthis.__divConsoleBodyCon.appendChild(this.__divConsoleBodyParent);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__createMessageComp = function(type,inputMessage,count)\\r\\n\\t{\\r\\n\\t\\ttype = this.util.toCamelCase(type);\\r\\n\\t\\tvar divConsoleBodyTextBody = this.util.createDiv(null,\\\"nsConsoleBodyMsg\\\" + type);\\r\\n\\t\\t//if(count)\\r\\n\\t\\t//{\\r\\n\\t\\t\\tvar divConsoleBodyLogCount = this.util.createDiv(null,\\\"nsConsoleBodyMsgCount\\\");\\r\\n\\t\\t\\tdivConsoleBodyLogCount.innerHTML = count;\\r\\n\\t\\t\\tdivConsoleBodyTextBody.appendChild(divConsoleBodyLogCount);\\r\\n\\t\\t//}\\r\\n\\t\\tvar divConsoleBodyLogTextCon = this.util.createDiv(null,\\\"nsConsoleBodyMsgTextCon\\\");\\r\\n\\t\\tvar divConsoleBodyLogTextDetail = this.util.createDiv(null,\\\"nsConsoleBodyMsgTextText\\\");\\r\\n\\t\\tvar spanText = this.util.createElement(\\\"span\\\",null,\\\"nsConsoleBodyMsgTextSpan\\\");\\r\\n\\t\\tspanText.innerHTML = inputMessage;\\r\\n\\t\\tdivConsoleBodyLogTextDetail.appendChild(spanText);\\r\\n\\t\\tdivConsoleBodyLogTextCon.appendChild(divConsoleBodyLogTextDetail);\\r\\n\\t\\tdivConsoleBodyTextBody.appendChild(divConsoleBodyLogTextCon);\\r\\n\\t\\tthis.__divConsoleBodyTextBody.appendChild(divConsoleBodyTextBody);\\r\\n\\t\\treturn divConsoleBodyTextBody;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__expandCollapseClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tif(this.__config.isExpanded)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.collapse();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.expand();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__addMessage = function(inputMessage,type)\\r\\n\\t{\\r\\n\\t    if(this.__config.isEnabled && inputMessage)\\r\\n\\t    {\\r\\n\\t    \\t//this.__setBodyToDefault();\\r\\n\\t    \\t//this.util.addStyleClass(this.__divContainer,cssClass);\\r\\n\\t    \\tvar arrInputMessage = null;\\r\\n\\t    \\tif(this.util.isArray(inputMessage))\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tarrInputMessage = inputMessage;\\r\\n\\t    \\t}\\r\\n\\t    \\telse\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tarrInputMessage = [inputMessage];\\r\\n\\t    \\t}\\r\\n\\t    \\tvar count = 0;\\r\\n\\t    \\tvar message = null;\\r\\n\\t    \\tvar arrMessage = null;\\r\\n\\t    \\tvar length = null;\\r\\n\\t    \\tfor(var outerCount = 0;outerCount < arrInputMessage.length;outerCount++)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tmessage = arrInputMessage[outerCount];\\r\\n\\t    \\t\\tif(!this.util.isString(message))\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\t//In try catch as IE sometimes throw exceptions like Circular Exception while JSON.stringify\\r\\n\\t    \\t\\t\\ttry\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tmessage = JSON.stringify(message);\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t\\tcatch(error)\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tmessage = message + \\\"\\\";\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t}\\r\\n\\t        \\tarrMessage = message.split(/\\\\r\\\\n|\\\\r|\\\\n/);\\r\\n\\t        \\tlength = arrMessage.length;\\r\\n\\t            for(var count = 0;count < length;count++)\\r\\n\\t            {\\r\\n\\t            \\tvar msg = arrMessage[count];\\r\\n\\t            \\tthis.__createMessageComp(type,msg,null);\\r\\n\\t            }\\r\\n\\t    \\t}\\r\\n\\t    \\tthis.__divConsoleBodyCon.scrollTop = this.__divConsoleBodyCon.scrollHeight;\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__setBodyToDefault = function(inputMessage,cssClass)\\r\\n\\t{\\r\\n\\t\\tthis.__divContainer.className = \\\"nsConsoleContainer\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__animationEndHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.isExpanded)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divConsoleBodyCon.style.visibility = \\\"hidden\\\";\\r\\n\\t\\t}\\r\\n\\t\\tthis.__config.isExpanded = !this.__config.isExpanded;\\r\\n\\t\\tthis.__setExpandCollapseIcon();\\r\\n\\t\\tthis.util.removeStyleClass(this.__divContainer,\\\"nsConsoleCollapsing\\\");\\r\\n\\t\\tthis.util.removeStyleClass(this.__divContainer,\\\"nsConsoleExpanding\\\");\\r\\n\\t\\tthis.__setResizerAfterAnimation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__setExpandCollapseIcon = function()\\r\\n\\t{\\r\\n\\t\\tthis.__iconExpandCollapse.style.transform =  this.__config.isExpanded ? \\\"rotateZ(180deg)\\\" : \\\"rotateZ(0deg)\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__setEventToDefault = function(isSetDefault)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.overrideConsole)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isSetDefault)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < this.CONSOLE_FUNCTION.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar key = this.CONSOLE_FUNCTION[count];\\r\\n\\t\\t\\t\\t\\tconsole[key] = this.__objDefaultFunction[key];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < this.CONSOLE_FUNCTION.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar key = this.CONSOLE_FUNCTION[count];\\r\\n\\t\\t\\t\\t\\tconsole[key] = this.__overrideConsoleFunc.bind(this,key,this.__objDefaultFunction[key]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__overrideConsoleFunc = function(key,defaultFunc,message)\\r\\n\\t{\\r\\n\\t\\tthis[key](message);\\r\\n\\t\\treturn defaultFunc(message);\\r\\n\\t};\\r\\n\\t\\r\\n\\t/*********************************Start of Resizer Function*******************************/\\r\\n\\tNSConsole.prototype.__createResizer = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__config.enableResize)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar id = this.__getID();\\r\\n\\t\\t\\tthis.__divResizer = this.util.createDiv(id + \\\"Resize\\\",\\\"nsConsoleResizer nsConsoleResizerCursor\\\");\\r\\n\\t\\t\\tthis.__divContainer.appendChild(this.__divResizer);\\r\\n\\t\\t\\tthis.util.addEvent(this.__divResizer,'mousedown',this.__resizerMouseDown.bind(this));\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__resizerMouseDown = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.isExpanded)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\tvar element = this.__divContainer;\\r\\n\\t\\t\\tthis.__objResize.origWidth = parseFloat(getComputedStyle(element, null).getPropertyValue('width').replace('px', ''));\\r\\n\\t\\t\\tthis.__objResize.origHeight = parseFloat(getComputedStyle(element, null).getPropertyValue('height').replace('px', ''));\\r\\n\\t\\t\\tthis.__objResize.origX = element.getBoundingClientRect().left;\\r\\n\\t\\t\\tthis.__objResize.origY = element.getBoundingClientRect().top;\\r\\n\\t\\t\\tthis.__objResize.origMouseX = event.pageX;\\r\\n\\t\\t\\tthis.__objResize.origMouseY = event.pageY;\\r\\n\\t\\t\\tthis.__objResize.mousemove = this.__resizerMouseMove.bind(this);\\r\\n\\t\\t\\tthis.__objResize.mouseup = this.__resizerMouseUp.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(window,'mousemove',this.__objResize.mousemove);\\r\\n\\t\\t\\tthis.util.addEvent(window,'mouseup',this.__objResize.mouseup);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__resizerMouseMove = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar element = this.__divContainer;\\r\\n        var height = this.__objResize.origHeight - (event.pageY - this.__objResize.origMouseY)\\r\\n        if (height > (this.__config.minHeight)) \\r\\n        {\\r\\n        \\telement.style.height = height + 'px';\\r\\n        \\t//element.style.top = original_y + (e.pageY - original_mouse_y) + 'px'\\r\\n        }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__resizerMouseUp = function(event)\\r\\n\\t{\\r\\n\\t\\tthis.util.removeEvent(window,'mousemove',this.__objResize.mousemove);\\r\\n\\t\\tthis.util.removeEvent(window,'mouseup',this.__objResize.mousemove);\\r\\n\\t\\tthis.__objResize = {};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__setResizerAfterAnimation = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__divResizer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.isExpanded ? this.util.addStyleClass(this.__divResizer,\\\"nsConsoleResizerCursor\\\") : this.util.removeStyleClass(this.__divResizer,\\\"nsConsoleResizerCursor\\\")\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t/*********************************End of Resizer Function*******************************/\\r\\n\\t/*********************************Start of Util Function*******************************/\\r\\n\\tNSConsole.prototype.__getID = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__id)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__id = \\\"compConsole\\\" + this.util.getUniqueId();\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__id;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__getTime = function()\\r\\n\\t{\\r\\n\\t    var now = new Date();\\r\\n\\t    var hour = \\\"0\\\" + now.getHours();\\r\\n\\t    hour = hour.substring(hour.length-2);\\r\\n\\t    var minute = \\\"0\\\" + now.getMinutes();\\r\\n\\t    minute = minute.substring(minute.length-2);\\r\\n\\t    var second = \\\"0\\\" + now.getSeconds();\\r\\n\\t    second = second.substring(second.length-2);\\r\\n\\t    return hour + \\\":\\\" + minute + \\\":\\\" + second;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSConsole.prototype.__getDate = function()\\r\\n\\t{\\r\\n\\t    var now = new Date();\\r\\n\\t    var year = \\\"\\\" + now.getFullYear();\\r\\n\\t    var month = \\\"0\\\" + (now.getMonth()+1);\\r\\n\\t    month = month.substring(month.length-2);\\r\\n\\t    var date = \\\"0\\\" + now.getDate();\\r\\n\\t    date = date.substring(date.length-2);\\r\\n\\t    return year + \\\"-\\\" + month + \\\"-\\\" + date;\\r\\n\\t};\\r\\n\\t/*********************************End of Util Function*******************************/\\r\\n\\t\\r\\n\\treturn NSConsole;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSConsole\\\",NSConsole);\";","export const NSTouchToMouseCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\n\\r\\n\\t\\t}\\r\\n\\\"use strict\\\";\\r\\nvar NSTouchToMouse = (function()\\r\\n{\\r\\n\\tfunction NSTouchToMouse(element,setting,doc,win) \\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.doc = this.util.getDoc(doc);\\r\\n\\t\\tthis.win = this.util.getWin(win);\\r\\n\\t\\tthis.__element = this.util.getElement(element);\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\tthis.__touchEventRef = null;\\r\\n\\t\\tthis.__gestureChangeRef = null;\\r\\n\\t\\tthis.__gestureEndRef = null;\\r\\n\\t\\tthis.__objLocal = {documentClick: false,doubleTapWaiting: false,preTouchStart: false,gestureChanged: false};\\r\\n\\t\\tthis.__objEvents = null;\\r\\n\\t\\tthis.__useConstructor = false;\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTouchToMouse.prototype.isTouchSupported = function()\\r\\n\\t{\\r\\n\\t\\tvar isTouchSupported = ((\\\"ontouchstart\\\" in this.win) || (this.win.navigator.msMaxTouchPoints > 0));\\r\\n\\t\\treturn isTouchSupported;\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.isGestureSupported = function()\\r\\n\\t{\\r\\n\\t\\tvar isGestureSupported = (\\\"ongesturestart\\\" in this.win);\\r\\n\\t\\treturn isGestureSupported;\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.destroy = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__touchEventRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(this.__element,\\\"touchstart\\\",this.__touchEventRef);\\r\\n\\t\\t\\tthis.util.removeEvent(this.__element,\\\"touchmove\\\",this.__touchEventRef,true);\\r\\n\\t\\t\\tthis.util.removeEvent(this.__element,\\\"touchend\\\",this.__touchEventRef,true);\\r\\n\\t\\t\\tthis.util.removeEvent(this.__element,\\\"touchcancel\\\",this.__touchEventRef,true);\\r\\n\\t\\t\\tthis.__touchEventRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__gestureChangeRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(this.__element,\\\"gesturechange\\\",this.__gestureChangeRef);\\r\\n\\t\\t\\tthis.__gestureChangeRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__gestureEndRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(this.__element,\\\"gestureend\\\",this.__gestureEndRef);\\r\\n\\t\\t\\tthis.__gestureEndRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__objLocal = {documentClick: false,doubleTapWaiting: false,preTouchStart: false,gestureChanged: false};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTouchToMouse.prototype.__initialize = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.throwNSError(\\\"NSTouchToMouse\\\",\\\"Element is not valid\\\");\\r\\n\\t\\t}\\r\\n\\t\\tvar setting = this.__setting || {};\\r\\n\\t\\tthis.__config = {\\r\\n\\t\\t\\tdoubleTapInterval: this.util.isUndefinedOrNull(setting[\\\"doubleTapInterval\\\"]) ? 500 : parseInt(setting[\\\"doubleTapInterval\\\"]),\\r\\n\\t\\t\\tsuppressMouseEvent: Boolean.parse(setting[\\\"suppressMouseEvent\\\"]),\\r\\n\\t\\t\\ttouchStartHandler: setting[\\\"touchStartHandler\\\"],//format function(screenXPos,screenYPos,event)\\r\\n\\t\\t\\ttouchMoveHandler: setting[\\\"touchMoveHandler\\\"],//format function(screenXPos,screenYPos,event)\\r\\n\\t\\t\\ttouchEndHandler: setting[\\\"touchEndHandler\\\"],//format function(screenXPos,screenYPos,event)\\r\\n\\t\\t\\tdoubleTapHandler: setting[\\\"doubleTapHandler\\\"],//format function(screenXPos,screenYPos,event)\\r\\n\\t\\t\\tpinchHandler: setting[\\\"pinchHandler\\\"],//format function(scale,event)\\r\\n\\t\\t};\\r\\n\\t\\tthis.__initObjEvents();\\r\\n\\t\\tthis.__addListeners();\\r\\n\\t\\tthis.__useConstructor = this.__isMouseEventConstructorExists();\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__initObjEvents = function()\\r\\n\\t{\\r\\n\\t\\tthis.__objEvents = {\\r\\n\\t\\t\\t\\\"touchstart\\\":{mouseEventType: \\\"mousedown\\\",callback:this.__touchStartHandler.bind(this)},\\r\\n\\t\\t\\t\\\"touchmove\\\":{mouseEventType: \\\"mousemove\\\",callback:this.__touchMoveHandler.bind(this)},\\r\\n\\t\\t\\t\\\"touchend\\\":{mouseEventType: \\\"mouseup\\\",callback:this.__touchEndHandler.bind(this),fireExtraEvent:this.__fireClickEvent.bind(this)},\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__addListeners = function()\\r\\n\\t{\\r\\n\\t\\tvar isTouchSupported = this.isTouchSupported();\\r\\n\\t\\tvar isGestureSupported = this.isGestureSupported();\\r\\n\\t\\tif (isTouchSupported) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__touchEventRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__touchEventRef = this.__touchEventHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__element,\\\"touchstart\\\",this.__touchEventRef);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__element,\\\"touchmove\\\",this.__touchEventRef,true);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__element,\\\"touchend\\\",this.__touchEventRef,true);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__element,\\\"touchcancel\\\",this.__touchEventRef,true);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.debug(\\\"NSTouchToMouse\\\",\\\"Touch is not supported\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(isGestureSupported)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__gestureChangeRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__gestureChangeRef = this.__gestureChangeHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__element,\\\"gesturechange\\\",this.__gestureChangeRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__gestureEndRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__gestureEndRef = this.__gestureEndHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__element,\\\"gestureend\\\",this.__gestureEndRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.debug(\\\"NSTouchToMouse\\\",\\\"Gesture is not supported\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__touchEventHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(!this.__objLocal.gestureChanged)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar touch = event.touchEvent;\\r\\n\\t\\t\\tvar item = this.__objEvents[event.type];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar mouseEventType = item.mouseEventType;\\r\\n\\t\\t\\t\\titem.callback(event,touch);\\r\\n\\t\\t\\t\\tthis.__fireMouseEvent(mouseEventType,event,touch);\\r\\n\\t\\t\\t\\tif(item.fireExtraEvent)\\r\\n                {\\r\\n                \\titem.fireExtraEvent(event,touch);\\r\\n                }\\r\\n                event.preventDefault();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.debug(\\\"NSTouchToMouse\\\",event.type + \\\" is not supported\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__gestureChangeHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__objLocal.gestureChanged = true;\\r\\n\\t\\tif(this.__config.pinchHandler)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.pinchHandler(event.scale,event);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__objLocal.preTouchStart = true;\\r\\n        event.preventDefault();\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__gestureEndHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__objLocal.gestureChanged = false;\\r\\n\\t\\tevent.preventDefault();\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__touchStartHandler = function(event,touch)\\r\\n\\t{\\r\\n\\t\\tthis.__fireCallback(\\\"touchStartHandler\\\",event,touch);\\r\\n\\t\\tthis.__objLocal.preTouchStart = true;\\r\\n\\t\\tthis.__objLocal.documentClick = true;\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__touchMoveHandler = function(event,touch)\\r\\n\\t{\\r\\n\\t\\tthis.__fireCallback(\\\"touchMoveHandler\\\",event,touch);\\r\\n\\t\\tthis.__objLocal.preTouchStart = false;\\r\\n\\t\\tthis.__objLocal.documentClick = false;\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__touchEndHandler = function(event,touch)\\r\\n\\t{\\r\\n\\t\\tif (this.__objLocal.doubleTapWaiting && this.__objLocal.preTouchStart) \\r\\n\\t\\t{\\t\\r\\n\\t\\t\\tthis.__fireCallback(\\\"doubleTapHandler\\\",event,touch);\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objLocal.doubleTapWaiting = true;\\r\\n\\t\\t\\tthis.__fireCallback(\\\"touchEndHandler\\\",event,touch);\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\twindow.setTimeout(function () \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__objLocal.doubleTapWaiting = false;\\r\\n\\t\\t\\t}, this.__config.doubleTapInterval);\\t\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t\\tthis.__objLocal.preTouchStart = false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTouchToMouse.prototype.__fireClickEvent = function(event,touch)\\r\\n\\t{\\r\\n\\t\\tif(this.__objLocal.documentClick)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__fireMouseEvent(\\\"click\\\",event,touch);\\r\\n            this.__objLocal.documentClick = false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTouchToMouse.prototype.__fireMouseEvent = function(mouseEventType,event,touch)\\r\\n\\t{\\r\\n\\t\\tif(!this.__config.suppressMouseEvent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar mouseEvent = null;\\r\\n\\t\\t\\tvar option = {bubbles: true,cancelable: true,view:this.win,detail:1,screenX:touch.screenX,screenY:touch.screenY,clientX:touch.clientX,clientY:touch.clientY,ctrlKey:false,\\r\\n\\t\\t\\t\\t\\t\\t  altKey:false,shiftKey:false,metaKey:false,button:0,relatedTarget:null};\\r\\n\\t\\t\\tif(this.__useConstructor)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tmouseEvent = new MouseEvent(mouseEventType,option);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tmouseEvent = this.doc.createEvent(\\\"MouseEvent\\\");\\r\\n\\t\\t\\t\\tmouseEvent.initMouseEvent(mouseEventType,option.bubbles,option.cancelable,option.view,option.detail,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  option.screenX,option.screenY,option.clientX,option.clientY,option.ctrlKey,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  option.altKey,option.shiftKey,option.metaKey,option.button,option.relatedTarget);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\ttouch.target.dispatchEvent(mouseEvent);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTouchToMouse.prototype.__isMouseEventConstructorExists = function()\\r\\n\\t{\\r\\n\\t\\ttry \\r\\n\\t\\t{\\r\\n\\t\\t    new MouseEvent(\\\"test\\\");\\r\\n\\t\\t    return true;\\r\\n\\t\\t} \\r\\n\\t\\tcatch(error) \\r\\n\\t\\t{\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__fireCallback = function(callbackKey,event,touch)\\r\\n\\t{\\r\\n\\t\\tif(this.__config[callbackKey])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config[callbackKey](touch.screenX,touch.screenY,event);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\r\\n\\treturn NSTouchToMouse;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSTouchToMouse\\\",NSTouchToMouse);\";","export const NSDatePickerCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\nvar svgRef = require('./nsSVG.min.js');\\r\\nvar NSSvg = svgRef.NSSvg;\\r\\nvar NSSvgShapes = svgRef.NSSvgShapes;\\r\\nvar plugginsRef = require('./nsPluggins.min.js');\\r\\nvar nsTextEditor = plugginsRef.nsTextEditor;\\r\\nvar nsTextAreaEditor = plugginsRef.nsTextAreaEditor;\\r\\nvar NSCellSelection = plugginsRef.NSCellSelection;\\r\\nvar NSTableCellNavigator = plugginsRef.NSTableCellNavigator;\\r\\nvar dateutilRef = require('./nsDateUtil.min.js');\\r\\nvar NSDateUtil = dateutilRef.NSDateUtil;\\r\\n\\r\\n\\t\\t}\\r\\nvar NSCalendar = (function()\\r\\n{\\r\\n\\tfunction NSCalendar(component,setting) \\r\\n\\t{\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\t\\r\\n\\t\\tthis.__context = window;\\r\\n\\t\\tthis.__inputDateFormat = \\\"MM/dd/yyyy\\\";\\r\\n\\t\\tthis.__minDate = null;\\r\\n\\t\\tthis.__maxDate = null;\\r\\n\\t\\tthis.__selectedDate = null;\\r\\n\\t\\tthis.__buttonSetting = {prev:{html:null,cssClass:null},next:{html:null,cssClass:null}, savetime: {html:null,cssClass:null}, canceltime: {html:null,cssClass:null}};\\r\\n\\t\\tthis.__customClass = {container:null,headerContainer:null,prevButton:null,nextButton:null,monthDropdown:null,yearDropdown:null,weekContainer:null,week:null,dayContainer:null,day:null,footerContainer:null};\\r\\n\\t\\tthis.__monthValueName = null;\\r\\n\\t\\tthis.__monthTextName = null;\\r\\n\\t\\tthis.__weekName = null;\\r\\n\\t\\tthis.__markDayDisabled = null;\\r\\n\\t\\tthis.__showFooter = false;\\r\\n\\t\\tthis.__footerContent = null;\\r\\n\\t\\tthis.__width = null;\\r\\n\\t\\tthis.__cellWidth = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__divContainer = null;\\r\\n\\t\\tthis.__divHeaderContainer = null;\\r\\n\\t\\tthis.__cmbMonth = null;\\r\\n\\t\\tthis.__cmbYear = null;\\r\\n\\t\\tthis.__divWeekContainer = null;\\r\\n\\t\\tthis.__divDayContainer = null;\\r\\n\\t\\tthis.__divDayBody = null;\\r\\n\\t\\tthis.__divTimeContainer = null;\\r\\n\\t\\tthis.__divFooterContainer = null;\\r\\n\\t\\tthis.__arrYear = [];\\r\\n\\t\\tthis.__lastSelectedCell = null;\\r\\n\\t\\tthis.__arrDayCells = []; \\r\\n\\t\\tthis.__minWidth = 240;\\r\\n\\t\\tthis.__minCellWidth = 32;\\r\\n\\t\\tthis.__showTime = false;\\r\\n\\t\\tthis.__timeSetting = {minHour: 0, maxHour: 23, minMinute: 0, maxMinute: 59, showSeconds: false, minSecond: 0, maxSecond: 59};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dayClickHandlerRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component);\\r\\n\\t};\\r\\n\\tnsExtendPrototype(NSContainerBase,NSCalendar);\\r\\n\\tNSCalendar.prototype.varructor = NSCalendar;\\r\\n\\t\\r\\n\\tNSCalendar.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t\\tthis.__initDefault();\\r\\n\\t\\tthis.__injectClass();\\r\\n\\t\\tthis.__createComponent();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.base.componentResized.call(this,event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.getSelectedDate = function() \\r\\n\\t{\\r\\n\\t\\treturn this.__selectedDate;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.getSelectedDateAsString = function(format) \\r\\n\\t{\\r\\n\\t\\tif(this.__selectedDate)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar nsDateUtil = new NSDateUtil();\\r\\n\\t\\t\\treturn nsDateUtil.format(this.__selectedDate,format);\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.setSelectedDate = function(date,format,fireEvent) \\r\\n\\t{\\r\\n\\t\\tthis.__selectedDate = this.__formatInputDate(date,format);\\r\\n\\t\\tthis.__updateDaysInControl(this.__selectedDate);\\r\\n\\t\\tif(this.util.isUndefinedOrNull(fireEvent) || fireEvent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSCalendar.DATE_SELECTED,this.__selectedDate,{date:this.__selectedDate});\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.setYear = function(year) \\r\\n\\t{\\r\\n\\t\\tthis.__setYearDropdown(year);\\r\\n\\t\\tthis.__dropDownChangeHandler();\\r\\n\\t\\tthis.__cmbMonth.selectedIndex = monthDate.getMonth();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.setMonth = function(month) \\r\\n\\t{\\r\\n\\t\\tthis.__cmbMonth.selectedIndex = month;\\r\\n\\t\\tthis.__dropDownChangeHandler();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.reset = function() \\r\\n\\t{\\r\\n\\t\\tthis.__selectedDate = null;\\r\\n\\t\\tvar todayDate = new Date();\\r\\n\\t\\tvar date = this.__maxDate < todayDate ? this.__maxDate : todayDate;\\r\\n\\t\\tthis.__updateDaysInControl(date);\\r\\n\\t\\tthis.__resetTimeInControl();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.setTodayDate = function(fireEvent) \\r\\n\\t{\\r\\n\\t\\tthis.__selectedDate = new Date();\\r\\n\\t\\tthis.__updateDaysInControl(this.__selectedDate);\\r\\n\\t\\tif(this.util.isUndefinedOrNull(fireEvent) || fireEvent)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//for some reason __selectedDate time part is getting reset mostly in this.__updateDayCell function that is why resetting the date back\\r\\n\\t\\t\\tif(this.__showTime) {\\r\\n\\t\\t\\t\\tthis.__selectedDate = this.__setTimePartInDate(this.__selectedDate);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSCalendar.DATE_SELECTED,this.__selectedDate,{date:this.__selectedDate});\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__initDefault = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__minDate)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__minDate = new Date();\\r\\n\\t\\t\\tthis.__minDate = this.__getDateObject(this.__minDate.getFullYear() - 15,0,1);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__maxDate)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__maxDate = new Date();\\r\\n\\t\\t\\tthis.__maxDate = this.__getDateObject(this.__maxDate.getFullYear() + 15,0,1);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__monthValueName || this.__monthValueName.length === 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__monthValueName = [\\\"January\\\",\\\"Febuary\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"];\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__monthTextName || this.__monthTextName.length === 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__monthTextName = [\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"];\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__weekName || this.__weekName.length === 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__weekName = [\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\",\\\"Sun\\\"];\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__injectClass = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__width && this.__width > this.__minWidth)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addCSSClassInDOM([\\\"#\\\" + this.getID() + \\\".nsCalendar\\\"],[\\\"width:\\\" + this.__width + \\\"px;\\\"]);\\r\\n\\t\\t\\tif(!this.__cellWidth)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__cellWidth = Math.floor(this.__width / 7);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__cellWidth && this.__cellWidth > this.__minCellWidth)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addCSSClassInDOM([\\\"#\\\" + this.getID() + \\\".nsCalendar .nsCalendarWeek\\\"],[\\\"width:\\\" + this.__cellWidth + \\\"px;\\\"]);\\r\\n\\t\\t\\tthis.util.addCSSClassInDOM([\\\"#\\\" + this.getID() + \\\".nsCalendar .nsCalendarDayContainerCell\\\"],[\\\"width:\\\" + this.__cellWidth + \\\"px;\\\"]);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setting = {};\\r\\n\\t\\t}\\r\\n\\t\\tvar setting = this.__setting;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"context\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__context = setting[\\\"context\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"inputDateFormat\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__inputDateFormat = setting[\\\"inputDateFormat\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minDate\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minDate = this.__formatInputDate(setting[\\\"minDate\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"maxDate\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__maxDate = this.__formatInputDate(setting[\\\"maxDate\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"selectedDate\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__selectedDate = this.__formatInputDate(setting[\\\"selectedDate\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"monthValueName\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__monthValueName = setting[\\\"monthValueName\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"monthTextName\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__monthTextName = setting[\\\"monthTextName\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"weekName\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__weekName = setting[\\\"weekName\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"markDayDisabled\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__markDayDisabled =  setting[\\\"markDayDisabled\\\"];\\r\\n\\t\\t\\t\\tthis.__markDayDisabled = this.util.getFunction(this.__markDayDisabled,this.__context);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"width\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__width = Number(setting[\\\"width\\\"]);\\r\\n\\t\\t\\t\\tif(isNaN(this.__width))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__width = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"cellWidth\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__cellWidth = Number(setting[\\\"cellWidth\\\"]);\\r\\n\\t\\t\\t\\tif(isNaN(this.__cellWidth))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__cellWidth = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"showFooter\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__showFooter = Boolean.parse(setting[\\\"showFooter\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"showTime\\\")) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__showTime = Boolean.parse(setting[\\\"showTime\\\"]); \\r\\n\\t\\t\\t\\t// or simply: this.__showTime = !!setting[\\\"showTime\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"timeSetting\\\") && setting[\\\"timeSetting\\\"]) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__timeSetting = {...this.__timeSetting, ...setting[\\\"timeSetting\\\"]}; \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"footerContent\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__footerContent = setting[\\\"footerContent\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__showFooter)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__createFooter();\\r\\n\\t\\t\\t\\tthis.__baseComponent.appendChild(this.__divFooterContainer);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"theme\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__theme = setting[\\\"theme\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar buttonSetting = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"buttonSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting = setting[\\\"buttonSetting\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.prev)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.prev = {html:null,cssClass:null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.prev.html)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.prev.html = \\\"<svg height=\\\\\\\"24\\\\\\\" version=\\\\\\\"1.1\\\\\\\" viewbox=\\\\\\\"0 0 24 24\\\\\\\" width=\\\\\\\"24\\\\\\\" xmlns=\\\\\\\"http://www.w3.org/2000/svg\\\\\\\" class=\\\\\\\"nsCalendarIcon nsCalendarHeaderButtonSvg\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"<path d=\\\\\\\"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z\\\\\\\"></path>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  \\\"</svg>\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.next)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.next = {html:null,cssClass:null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.next.html)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.next.html = \\\"<svg height=\\\\\\\"24\\\\\\\" version=\\\\\\\"1.1\\\\\\\" viewbox=\\\\\\\"0 0 24 24\\\\\\\" width=\\\\\\\"24\\\\\\\" xmlns=\\\\\\\"http://www.w3.org/2000/svg\\\\\\\" class=\\\\\\\"nsCalendarIcon nsCalendarHeaderButtonSvg\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"<path d=\\\\\\\"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z\\\\\\\"></path>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  \\\"</svg>\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.savetime)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.savetime = {html:null,cssClass:null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.savetime.html)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.savetime.html = `<svg \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tviewBox=\\\"0 0 24 24\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tfill=\\\"none\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke=\\\"currentColor\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke-width=\\\"2\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke-linecap=\\\"round\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke-linejoin=\\\"round\\\"\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tclass=\\\"nsCalendarIcon nsCalendarIconTime nsCalendarIconTimeSave\\\"\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<!-- Circle -->\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"10\\\"></circle>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<!-- Checkmark -->\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<path d=\\\"M9 12l2 2 4-4\\\"></path>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</svg>`;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.canceltime)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.canceltime = {html:null,cssClass:null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.canceltime.html)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.canceltime.html = `<svg \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tviewBox=\\\"0 0 24 24\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tfill=\\\"none\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke=\\\"currentColor\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke-width=\\\"2\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke-linecap=\\\"round\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke-linejoin=\\\"round\\\"\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tclass=\\\"nsCalendarIcon nsCalendarIconTime nsCalendarIconTimeCancel\\\"\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<!-- Circle -->\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"10\\\"></circle>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<!-- Cross (X) -->\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<line x1=\\\"9\\\" y1=\\\"9\\\" x2=\\\"15\\\" y2=\\\"15\\\"></line>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<line x1=\\\"15\\\" y1=\\\"9\\\" x2=\\\"9\\\" y2=\\\"15\\\"></line>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</svg>`;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__buttonSetting = {prev:{html:buttonSetting.prev.html,cssClass:buttonSetting.prev.cssClass},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t  \\tnext:{html:buttonSetting.next.html,cssClass:buttonSetting.next.cssClass},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tsavetime: {html:buttonSetting.savetime.html,cssClass:buttonSetting.savetime.cssClass},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tcanceltime: {html:buttonSetting.canceltime.html,cssClass:buttonSetting.canceltime.cssClass}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t    };\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar customClass = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"customClass\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcustomClass = setting[\\\"customClass\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!customClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcustomClass = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(var prop in this.__customClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__customClass[prop] = (customClass[prop] || null);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__createComponent = function()\\r\\n\\t{\\r\\n\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsCalendar\\\");\\r\\n\\t\\tthis.__applyTheme(this.__baseComponent,\\\"nsCalendar\\\");\\r\\n\\t\\tthis.__divContainer = this.util.createDiv(this.getID() + \\\"container\\\",\\\"nsCalendarContainer\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__divContainer,\\\"container\\\");\\r\\n\\t\\t\\r\\n\\t\\tthis.__createHeader();\\r\\n\\t\\tthis.__divContainer.appendChild(this.__divHeaderContainer);\\r\\n\\t\\tthis.__createWeek();\\r\\n\\t\\tthis.__divContainer.appendChild(this.__divWeekContainer);\\r\\n\\t\\tthis.__createDays();\\r\\n\\t\\tthis.__divContainer.appendChild(this.__divDayContainer);\\r\\n\\t\\tif(this.__showTime) {\\r\\n\\t\\t\\tthis.__createTimePart();\\r\\n\\t\\t\\tthis.__divContainer.appendChild(this.__divTimeContainer);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__baseComponent.appendChild(this.__divContainer);\\r\\n\\t\\tif(this.__showFooter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createFooter();\\r\\n\\t\\t\\tthis.__baseComponent.appendChild(this.__divFooterContainer);\\r\\n\\t\\t}\\r\\n\\t\\tvar todayDate = new Date();\\r\\n\\t\\tvar date = this.__maxDate < todayDate ? this.__maxDate : todayDate;\\r\\n\\t\\tthis.__updateDaysInControl(date);\\r\\n\\t};\\t\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__createHeader = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divHeaderContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar initButton = function(strID,cssClass,buttonSettingKey,customClassKey,handler)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar btn = self.util.createElement(\\\"button\\\",self.getID() + \\\"btn\\\" + strID,cssClass);\\r\\n\\t\\t\\t\\tbtn.innerHTML = self.__buttonSetting[buttonSettingKey].html;\\r\\n\\t\\t\\t\\tself.util.addStyleClass(btn,self.__buttonSetting[buttonSettingKey].cssClass);\\r\\n\\t\\t\\t\\tself.__applyCustomClass(btn,customClassKey);\\r\\n\\t\\t\\t\\tself.util.addEvent(btn,\\\"click\\\",handler);\\r\\n\\t\\t\\t\\tself.__divHeaderContainer.appendChild(btn);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar createSelect = function(parent,id,cssClass,customClassKey,arrText,arrValue)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar select = self.util.createElement(\\\"select\\\",self.getID() + \\\"select\\\" + id,cssClass);\\r\\n\\t\\t\\t\\tself.__applyCustomClass(select,customClassKey);\\r\\n\\t\\t\\t\\tself.util.addEvent(select,\\\"change\\\",self.__dropDownChangeHandler.bind(self));\\r\\n\\t\\t\\t\\tself.util.addEvent(select,\\\"click\\\",self.__dropDownClickHandler.bind(self));\\r\\n\\t\\t\\t\\tfor (var count = 0; count < arrValue.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t    var option = document.createElement(\\\"option\\\");\\r\\n\\t\\t\\t\\t    option.text = arrText[count];\\r\\n\\t\\t\\t\\t    option.value = arrValue[count];\\r\\n\\t\\t\\t\\t    select.appendChild(option);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tparent.appendChild(select);\\r\\n\\t\\t\\t\\treturn select;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tthis.__divHeaderContainer = this.util.createDiv(this.getID() + \\\"header\\\",\\\"nsCalendarHeader\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(this.__divHeaderContainer,\\\"headerContainer\\\");\\r\\n\\t\\t\\tinitButton(\\\"previous\\\",\\\"nsCalendarButton\\\",\\\"prev\\\",\\\"prevButton\\\",this.__prevClickHandler.bind(this));\\r\\n\\t\\t\\tvar divNavigation = this.util.createDiv(this.getID() + \\\"headerNavigation\\\",\\\"nsCalendarHeaderNav\\\");\\r\\n\\t\\t\\tif(this.__monthValueName.length !== this.__monthTextName.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__monthValueName = this.__monthTextName;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__cmbMonth = createSelect(divNavigation,\\\"month\\\",\\\"nsCalendarSelect\\\",\\\"monthDropdown\\\",this.__monthTextName,this.__monthValueName);\\r\\n\\t\\t\\tvar minYear = this.__minDate.getFullYear();\\r\\n\\t\\t\\tvar maxYear = this.__maxDate.getFullYear();\\r\\n\\t\\t\\tthis.__arrYear = [];\\r\\n\\t\\t\\tfor(var count = minYear;count <= maxYear;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__arrYear.push(count);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__cmbYear = createSelect(divNavigation,\\\"year\\\",\\\"nsCalendarSelect\\\",\\\"yearDropdown\\\",this.__arrYear,this.__arrYear);\\r\\n\\t\\t\\tthis.__divHeaderContainer.appendChild(divNavigation);\\r\\n\\t\\t\\tinitButton(\\\"next\\\",\\\"nsCalendarButton\\\",\\\"next\\\",\\\"nextButton\\\",this.__nextClickHandler.bind(this));\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__createWeek = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divWeekContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divWeekContainer = this.util.createDiv(this.getID() + \\\"week\\\",\\\"nsCalendarWeekContainer\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(this.__divWeekContainer,\\\"weekContainer\\\");\\r\\n\\t\\t\\tfor(var count = 0;count < this.__weekName.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar divWeek = this.util.createDiv(null,\\\"nsCalendarWeek\\\");\\r\\n\\t\\t\\t\\tthis.__applyCustomClass(divWeek,\\\"week\\\");\\r\\n\\t\\t\\t\\tdivWeek.appendChild(document.createTextNode(this.__weekName[count]));\\r\\n\\t\\t\\t\\tthis.__divWeekContainer.appendChild(divWeek);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__createDays = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divDayContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divDayContainer = this.util.createDiv(this.getID() + \\\"day\\\",\\\"nsCalendarDayContainer\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(this.__divDayContainer,\\\"dayContainer\\\");\\r\\n\\t\\t\\tthis.__divDayBody = this.util.createDiv(this.getID() + \\\"dayBody\\\",\\\"nsCalendarDayContainerBody\\\");\\r\\n\\t\\t\\tvar handler = this.__dayClickHandler.bind(this);\\r\\n\\t\\t\\tfor (var rowCount = 0;rowCount < 6;rowCount++) \\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t    var row = this.__createDayRow(this.__divDayBody);\\r\\n\\t\\t\\t    for (var count = 0;count < 7;count++) \\r\\n\\t\\t\\t    { \\r\\n\\t\\t\\t    \\tvar cell = this.__createDayCell(row,handler);\\r\\n\\t\\t\\t    \\tvar item = {row:row,cell:cell};\\r\\n\\t\\t\\t    \\tthis.__arrDayCells.push(item);\\r\\n\\t\\t\\t    }\\t\\t\\t    \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__divDayContainer.appendChild(this.__divDayBody);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__createDayRow = function(parent)\\r\\n\\t{\\r\\n\\t\\tvar divDayRow = this.util.createDiv(null,\\\"nsCalendarDayContainerRow\\\");\\r\\n\\t\\tparent.appendChild(divDayRow);\\r\\n\\t\\treturn divDayRow;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__createDayCell = function(parent,handler)\\r\\n\\t{\\r\\n\\t\\tvar divDay = this.util.createDiv(null,\\\"nsCalendarDayContainerCell\\\");\\r\\n\\t\\tthis.util.addEvent(divDay,\\\"click\\\",handler);\\r\\n\\t\\tparent.appendChild(divDay);\\r\\n\\t\\treturn divDay;\\r\\n\\t};\\r\\n\\r\\n\\tNSCalendar.prototype.__createTimePart = function() {\\r\\n\\t\\tif (this.__showTime) {\\r\\n\\t\\t\\tthis.__divTimeContainer = this.util.createDiv(this.getID() + \\\"Time\\\",\\\"nsCalendarTimeContainer\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(this.__divTimeContainer,\\\"timeContainer\\\");\\r\\n\\r\\n\\t\\t\\tvar timePartContainer = this.util.createDiv(this.getID() + \\\"TimePartCon\\\",\\\"nsCalendarTimePartContainer\\\");\\r\\n\\r\\n\\t\\t\\tvar timeLabelSpan = this.util.createElement(\\\"span\\\", null, \\\"nsCalendarTimeLabel\\\");\\r\\n\\t\\t\\ttimeLabelSpan.appendChild(document.createTextNode(\\\"Time: \\\"));\\r\\n\\t\\t\\ttimePartContainer.appendChild(timeLabelSpan);\\r\\n\\r\\n\\t\\t\\tvar timeSetting = this.__timeSetting;\\r\\n\\r\\n            var hourInput = this.__createTimeInput(\\\"hour\\\", \\\"nsCalendarHourInput\\\", timeSetting.minHour, timeSetting.maxHour);\\r\\n            timePartContainer.appendChild(hourInput);\\r\\n\\r\\n\\t\\t\\ttimePartContainer.appendChild(this.__createTimeSeparator());\\r\\n\\r\\n            var minuteInput = this.__createTimeInput(\\\"minute\\\", \\\"nsCalendarMinuteInput\\\", timeSetting.minMinute, timeSetting.maxMinute);\\r\\n            timePartContainer.appendChild(minuteInput);\\r\\n\\r\\n\\t\\t\\tif(timeSetting.showSeconds) {\\r\\n\\t\\t\\t\\ttimePartContainer.appendChild(this.__createTimeSeparator());\\r\\n\\r\\n\\t\\t\\t\\tvar secondInput = this.__createTimeInput(\\\"second\\\", \\\"nsCalendarSecondInput\\\", timeSetting.minSecond, timeSetting.maxSecond);\\r\\n\\t\\t\\t\\ttimePartContainer.appendChild(secondInput);\\r\\n\\t\\t\\t}\\t\\t\\t\\r\\n\\r\\n\\t\\t\\tthis.__divTimeContainer.appendChild(timePartContainer);\\r\\n\\r\\n\\t\\t\\tvar timeSaveContainer = this.util.createDiv(this.getID() + \\\"TimePartSave\\\",\\\"nsCalendarTimeSaveContainer\\\");\\r\\n\\t\\t\\ttimeSaveContainer.appendChild(this.__createTimeButton(\\\"Save\\\", null, \\\"savetime\\\", \\\"savetimebutton\\\", this.__savetimeClickHandler.bind(this)));\\r\\n\\t\\t\\ttimeSaveContainer.appendChild(this.__createTimeButton(\\\"Cancel\\\", null, \\\"canceltime\\\", \\\"canceltimebutton\\\", this.__canceltimeClickHandler.bind(this)));\\r\\n\\r\\n\\t\\t\\tthis.__divTimeContainer.appendChild(timeSaveContainer);\\r\\n        }\\r\\n\\t}\\r\\n\\r\\n\\tNSCalendar.prototype.__savetimeClickHandler = function(event) {\\r\\n\\t\\tthis.__selectedDate = this.__setTimePartInDate(this.__selectedDate);\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSCalendar.DATE_SELECTED,this.__selectedDate,{date:this.__selectedDate});\\r\\n\\t};\\r\\n\\r\\n\\tNSCalendar.prototype.__canceltimeClickHandler = function(event) {\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSCalendar.DATE_SELECTION_CANCELLED);\\r\\n\\t};\\r\\n\\r\\n\\tNSCalendar.prototype.__createTimeInput = function(timePart,cssClass, minVal, maxVal) {\\r\\n\\t\\tvar timeInput = this.util.createElement(\\\"input\\\",this.getID() + \\\"_input_\\\" + timePart, \\\"nsCalendarTimeInput \\\" + cssClass);\\r\\n\\t\\ttimeInput.type = \\\"number\\\";\\r\\n\\t\\ttimeInput.min = minVal;\\r\\n\\t\\ttimeInput.max = maxVal;\\r\\n\\t\\ttimeInput.value = \\\"0\\\";\\r\\n\\t\\ttimeInput.size = 2;     // Keep it small\\r\\n\\t\\ttimeInput.addEventListener(\\\"change\\\", this.__timeInputChangeHandler.bind(this));\\r\\n\\t\\ttimeInput.addEventListener(\\\"input\\\", this.__timeInputEnterInputHandler.bind(this));\\r\\n\\t\\treturn timeInput;\\r\\n\\t}\\r\\n\\r\\n\\tNSCalendar.prototype.__createTimeButton = function(strID, cssClass, buttonSettingKey, customClassKey, handler) {\\r\\n\\t\\tvar btn = this.util.createElement(\\\"button\\\",this.getID() + \\\"btn\\\" + strID,\\\"nsCalendarIconButton\\\" + (cssClass ? \\\" \\\" + cssClass : \\\"\\\"));\\r\\n\\t\\tbtn.innerHTML = this.__buttonSetting[buttonSettingKey].html;\\r\\n\\t\\tif(this.__timeSetting && this.__timeSetting.showSeconds) {\\r\\n\\t\\t\\tvar child = btn.children[0];\\r\\n\\t\\t\\tif(child) {\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(child,\\\"nsCalendarIconTimeSmall\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.addStyleClass(btn,this.__buttonSetting[buttonSettingKey].cssClass);\\r\\n\\t\\tthis.__applyCustomClass(btn,customClassKey);\\r\\n\\t\\tthis.util.addEvent(btn,\\\"click\\\",handler);\\r\\n\\t\\treturn btn;\\r\\n\\t}\\r\\n\\r\\n\\tNSCalendar.prototype.__createTimeSeparator = function() {\\r\\n\\t\\tvar timeSeparatorSpan = this.util.createElement(\\\"span\\\", null, \\\"nsCalendarTimeSeparator\\\");\\r\\n\\t\\ttimeSeparatorSpan.appendChild(document.createTextNode(\\\" : \\\"));\\r\\n\\t\\treturn timeSeparatorSpan;\\r\\n\\t}\\r\\n\\r\\n\\tNSCalendar.prototype.__timeInputEnterInputHandler = function(event) {\\r\\n\\t\\tvar input = event.target;\\r\\n\\t\\tvar min = parseInt(input.min, 10);\\r\\n\\t\\tvar max = parseInt(input.max, 10);\\r\\n\\t\\tvar value = parseInt(input.value, 10);\\r\\n\\t\\tif (isNaN(value)) {\\r\\n\\t\\t\\tvalue = 0;\\r\\n\\t\\t}\\r\\n\\t\\tif (value > max) {\\r\\n\\t\\t\\tvalue = max;\\r\\n\\t\\t} else if (value < min) {\\r\\n\\t\\t\\tvalue = min;\\r\\n\\t\\t}\\r\\n\\t\\tinput.value = this.__padTimeValue(value);\\r\\n\\t}\\r\\n\\r\\n\\tNSCalendar.prototype.__timeInputChangeHandler = function(event) {\\r\\n\\t\\tif (!this.__selectedDate) {\\r\\n\\t\\t\\tthis.__selectedDate = new Date();\\r\\n\\t\\t}\\r\\n\\t\\t//this.__timeInputEnterInputHandler(event);\\r\\n\\t\\tthis.__selectedDate = this.__setTimePartInDate(this.__selectedDate);\\r\\n\\t\\t// Optionally fire an event or update the UI\\r\\n\\t\\t// This is up to you.  E.g., if you want dateSelected to fire whenever time changes:\\r\\n\\t\\t// this.util.dispatchEvent(this.__baseComponent, NSCalendar.DATE_SELECTED, this.__selectedDate, { date: this.__selectedDate });\\r\\n\\t};\\r\\n\\r\\n\\tNSCalendar.prototype.__updateTimeInControl = function(date) {\\r\\n\\t\\tif (!this.__divTimeContainer) return;\\r\\n\\t\\tvar hourInput   = this.__divTimeContainer.querySelector(\\\".nsCalendarHourInput\\\");\\r\\n\\t\\tvar minuteInput = this.__divTimeContainer.querySelector(\\\".nsCalendarMinuteInput\\\");\\r\\n\\t\\tvar secondInput = this.__divTimeContainer.querySelector(\\\".nsCalendarSecondInput\\\");\\r\\n\\r\\n\\t\\tif(hourInput) {\\r\\n\\t\\t\\thourInput.value = this.__padTimeValue(date.getHours());\\r\\n\\t\\t}\\r\\n\\t\\tif(minuteInput) {\\r\\n\\t\\t\\tminuteInput.value = this.__padTimeValue(date.getMinutes());\\r\\n\\t\\t}\\r\\n\\t\\tif(secondInput) {\\r\\n\\t\\t\\tsecondInput.value = this.__padTimeValue(date.getSeconds());\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\r\\n\\tNSCalendar.prototype.__resetTimeInControl  = function() {\\r\\n\\t\\tvar date = new Date();\\r\\n\\t\\tdate.setHours(0, 0, 0, 0);\\r\\n\\t\\tthis.__updateTimeInControl(date);\\r\\n\\t}\\r\\n\\r\\n\\tNSCalendar.prototype.__padTimeValue = function(value) {\\r\\n\\t\\tvar retVal = String(value).padStart(2, '0');\\r\\n\\t\\treturn retVal;\\r\\n\\t}\\r\\n\\r\\n\\tNSCalendar.prototype.__setTimePartInDate  = function(date) {\\r\\n\\t\\tvar timeContainer = this.__divTimeContainer;\\r\\n\\t\\tif (!timeContainer || !date) {\\r\\n\\t\\t\\treturn date;\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\tvar hourInput   = timeContainer.querySelector(\\\".nsCalendarHourInput\\\");\\r\\n\\t\\tvar minuteInput = timeContainer.querySelector(\\\".nsCalendarMinuteInput\\\");\\r\\n\\t\\tvar secondInput = timeContainer.querySelector(\\\".nsCalendarSecondInput\\\");\\r\\n\\t\\r\\n\\t\\tvar newHour   = parseInt(hourInput.value, 10)   || 0;\\r\\n\\t\\tvar newMinute = minuteInput ? (parseInt(minuteInput.value, 10) || 0) : 0;\\r\\n\\t\\tvar newSecond = secondInput ? (parseInt(secondInput.value, 10) || 0) : 0;\\r\\n\\t\\tnewHour   = Math.max(0, Math.min(this.__timeSetting.maxHour, newHour));\\r\\n\\t\\tnewMinute = Math.max(0, Math.min(this.__timeSetting.maxMinute, newMinute));\\r\\n\\t\\tnewSecond = Math.max(0, Math.min(this.__timeSetting.maxSecond, newSecond));\\r\\n\\t\\r\\n\\t\\tdate.setHours(newHour, newMinute, newSecond, 0);\\r\\n\\t\\treturn date;\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__createFooter = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divFooterContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divFooterContainer = this.util.createDiv(this.getID() + \\\"footer\\\",\\\"nsCalendarFooterContainer\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(this.__divFooterContainer,\\\"footerContainer\\\");\\r\\n\\t\\t\\tif(this.__footerContent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isString(this.__footerContent))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar compSpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\tcompSpan.innerHTML = this.__footerContent;\\r\\n\\t\\t\\t\\t\\tthis.__divFooterContainer.appendChild(compSpan);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__divFooterContainer.appendChild(this.__footerContent);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__updateDaysInControl = function(monthDate)\\r\\n\\t{\\r\\n\\t\\tif(this.__isDateValidForNavigation(monthDate))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setYearDropdown(monthDate.getFullYear());\\r\\n\\t\\t\\tthis.__cmbMonth.selectedIndex = monthDate.getMonth();\\r\\n\\t\\t\\tvar today = new Date();\\r\\n\\t\\t\\tvar date = new Date(monthDate.getFullYear(),monthDate.getMonth(),1,0,0,0,0); // Starting at the 1st of the month\\r\\n\\t\\t\\tvar extras = (date.getDay() + 6) % 7; // How many days of the last month do we need to include?\\r\\n\\t\\t\\tdate.setDate(date.getDate() - extras);\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0;count < this.__arrDayCells.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = this.__arrDayCells[count];\\r\\n\\t\\t\\t\\tthis.__updateDayCell(item.cell,date,monthDate,today,count);\\r\\n\\t\\t\\t\\titem.date = new Date(date.getTime());\\r\\n\\t\\t\\t\\titem.index = count;\\r\\n\\t\\t\\t    date.setDate(date.getDate() + 1); \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (this.__showTime) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__updateTimeInControl(monthDate);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__resetDayCell = function(cell)\\r\\n\\t{\\r\\n\\t\\tif(cell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcell.setAttribute(\\\"class\\\",\\\"\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsCalendarDayContainerCell\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(cell,\\\"day\\\");\\r\\n\\t\\t\\tcell.innerHTML = \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__updateDayCell = function(cell,dateToSet,currentMonthDate,todayDate,index)\\r\\n\\t{\\r\\n\\t\\tif(cell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__resetDayCell(cell);\\r\\n\\t\\t\\tcell.appendChild(document.createTextNode(dateToSet.getDate()));\\r\\n\\t\\t\\tcell.setAttribute(\\\"data-ns-cal-index\\\",index);\\r\\n\\t\\t\\tif(this.__isDateSelectable(dateToSet))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (dateToSet.getMonth() != currentMonthDate.getMonth()) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tthis.util.addStyleClass(cell,\\\"nsCalendarOtherMonth\\\");\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\tif (this.__dateCompare(dateToSet,todayDate) === 0) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tthis.util.addStyleClass(cell,\\\"nsCalendarToday\\\");\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\tif (this.__dateCompare(dateToSet,this.__selectedDate) === 0) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\t//dont fire event as it is just to update the cell\\r\\n\\t\\t\\t\\t\\tthis.__setCellSelection(dateToSet,cell,false);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsCalendarDayDisabled\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__prevClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tvar month = this.__cmbMonth.selectedIndex; \\r\\n\\t\\tvar year = this.__cmbYear.options[this.__cmbYear.selectedIndex].value;\\r\\n\\t\\tvar date = this.__getDateObject(year,month,1);\\r\\n\\t\\tdate.setMonth(date.getMonth() - 1);\\r\\n\\t\\tthis.__updateDaysInControl(date);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__nextClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tvar month = this.__cmbMonth.selectedIndex; \\r\\n\\t\\tvar year = this.__cmbYear.options[this.__cmbYear.selectedIndex].value;\\r\\n\\t\\tvar date = this.__getDateObject(year,month,1);\\r\\n\\t\\tdate.setMonth(date.getMonth() + 1);\\r\\n\\t\\tthis.__updateDaysInControl(date);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__dayClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\tif(!this.util.hasStyleClass(target,\\\"nsCalendarDayContainerCell\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\ttarget = this.util.findParentBySelector(target,\\\".nsCalendarDayContainerCell\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(target)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__lastSelectedCell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__lastSelectedCell,\\\"nsCalendarSelected\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar index = parseInt(target.getAttribute(\\\"data-ns-cal-index\\\"));\\r\\n\\t\\t\\tif(this.util.hasStyleClass(target,\\\"nsCalendarOtherMonth\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__lastSelectedCell = null;\\r\\n\\t\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\tif(item && this.__isDateSelectable(item.date))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__selectedDate = item.date;\\r\\n\\t\\t\\t\\t\\tthis.__setTimePartInDate(this.__selectedDate);\\r\\n\\t\\t\\t\\t\\tthis.__updateDaysInControl(this.__selectedDate);\\r\\n\\t\\t\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSCalendar.DATE_SELECTED,this.__selectedDate,{date:this.__selectedDate});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__selectCellForIndex(index);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__dropDownChangeHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar month = this.__cmbMonth.selectedIndex; \\r\\n\\t\\tvar year = this.__cmbYear.options[this.__cmbYear.selectedIndex].value;\\r\\n\\t\\tvar date = this.__getDateObject(year,month,1);\\r\\n\\t\\tthis.__updateDaysInControl(date);\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__dropDownClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__selectCellForIndex = function(index)\\r\\n\\t{\\r\\n\\t\\tthis.__selectedDate = null;\\r\\n\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem.date = this.__setTimePartInDate(item.date);\\r\\n\\t\\t\\tthis.__setCellSelection(item.date,item.cell,true);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__setCellSelection = function(date,cell,fireEvent)\\r\\n\\t{\\r\\n\\t\\tif(this.__isDateSelectable(date))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__selectedDate = this.__cloneDateObject(date);\\r\\n\\t\\t\\tif(fireEvent && !this.__showTime)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSCalendar.DATE_SELECTED,this.__selectedDate,{date:this.__selectedDate});\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(cell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsCalendarSelected\\\");\\r\\n\\t\\t\\t\\tthis.__lastSelectedCell = cell;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__clearCellSelectionExceptSelected = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__arrDayCells && this.__arrDayCells.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < this.__arrDayCells.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = this.__arrDayCells[count];\\r\\n\\t\\t\\t\\tif(this.__lastSelectedCell != item.cell)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeStyleClass(item.cell,\\\"nsCalendarSelected\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__getItemByIndex = function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = {};\\r\\n\\t\\t\\tfor(var count = 0;count < this.__arrDayCells.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = this.__arrDayCells[count];\\r\\n\\t\\t\\t\\tif(item.index === index)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__dateCompare = function(date1,date2)\\r\\n\\t{\\r\\n\\t\\tif(!date1 && !date2)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn 0;\\r\\n\\t\\t}\\r\\n\\t\\tif(!date1)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn -1;\\r\\n\\t\\t}\\r\\n\\t\\tif(!date2)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn 1;\\r\\n\\t\\t}\\r\\n\\t\\tif (date1.getDate() == date2.getDate() && date1.getMonth() == date2.getMonth() && date1.getFullYear() == date2.getFullYear())\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn 0;\\r\\n\\t\\t}\\r\\n\\t\\tvar tempDate1 = this.__dateWithoutTime(this.__cloneDateObject(date1));\\r\\n\\t\\tvar tempDate2 = this.__dateWithoutTime(this.__cloneDateObject(date2));\\r\\n\\t\\treturn (tempDate1.getTime() > tempDate2.getTime());\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__cloneDateObject = function(date)\\r\\n\\t{\\r\\n\\t\\treturn this.__getDateObject(date.getFullYear(),date.getMonth(),date.getDate());\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__getDateObject = function(year,month,day)\\r\\n\\t{\\r\\n\\t\\tvar date = new Date(year,month,day);\\r\\n\\t\\treturn date;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__isDateSelectable = function(date)\\r\\n\\t{\\r\\n\\t\\tif(date)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar tempDate = this.__dateWithoutTime(date);\\r\\n\\t\\t\\tvar tempMinDate = this.__dateWithoutTime(this.__minDate);\\r\\n\\t\\t\\tvar tempMaxDate = this.__dateWithoutTime(this.__maxDate);\\r\\n\\t\\t\\tvar isMinCond = tempDate >= tempMinDate;\\r\\n\\t\\t\\tvar isMaxCond = tempDate <= tempMaxDate;\\r\\n\\t\\t\\tif(isMinCond && isMaxCond)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__markDayDisabled)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn this.__markDayDisabled(date);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__dateWithoutTime = function(date)\\r\\n\\t{\\r\\n\\t\\tvar tempDate = new Date(date);\\r\\n\\t\\ttempDate.setHours(0, 0, 0, 0);\\r\\n\\t    return tempDate;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__isDateValidForNavigation = function(date)\\r\\n\\t{\\r\\n\\t\\tif(date && date.getFullYear() >= this.__minDate.getFullYear() && date.getFullYear() <= this.__maxDate.getFullYear())\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__applyCustomClass = function(element,type)\\r\\n\\t{\\r\\n\\t\\tif(element && type && this.__customClass[type])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(element,this.__customClass[type]);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__formatInputDate = function(inputValue,format)\\r\\n\\t{\\r\\n\\t\\tformat = format ? format : this.__inputDateFormat;\\r\\n\\t\\tif(inputValue)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(Object.prototype.toString.call(inputValue) === '[object Date]')\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn inputValue;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar nsDateUtil = new NSDateUtil();\\r\\n\\t\\t\\t\\treturn nsDateUtil.parseString(inputValue,format);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//IE issue \\r\\n\\tNSCalendar.prototype.__setYearDropdown = function(year)\\r\\n\\t{\\r\\n\\t\\t//this.__cmbYear.selectedIndex = this.__cmbYear.querySelector('option[value=\\\"'+ monthDate.getFullYear() +'\\\"]').index;\\r\\n\\t\\tthis.__cmbYear.querySelector('option[value=\\\"'+ year +'\\\"]').selected = \\\"selected\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.DATE_SELECTED = \\\"dateSelected\\\";\\r\\n\\tNSCalendar.DATE_SELECTION_CANCELLED = \\\"dateSelectionCancelled\\\";\\r\\n\\t\\r\\n\\treturn NSCalendar;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSCalendar\\\",NSCalendar);var NSDatePicker = (function()\\r\\n{\\r\\n\\tfunction NSDatePicker(component,setting) \\r\\n\\t{\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\t\\r\\n\\t\\tthis.__context = window;\\r\\n\\t\\tthis.__dateOutputFormat = \\\"MM/dd/yyyy\\\";\\r\\n\\t\\tthis.__placeHolder = null;\\r\\n\\t\\tthis.__buttonHtml = null;\\r\\n\\t\\tthis.__enableTextBoxDisabled = false;\\r\\n\\t\\tthis.__customClass = {container:null,textInput:null,button:null,calContainer:null,calHeaderContainer:null,calPrevButton:null,calNextButton:null,calMonthDropdown:null,calYearDropdown:null,calWeekContainer:null,calWeek:null,calDayContainer:null,calDay:null,calFooterContainer:null};\\r\\n\\t\\tthis.__calendarPos = null;\\r\\n\\t\\tthis.__calendarWidth = null;\\r\\n\\t\\tthis.__calendarCellWidth = null;\\r\\n\\t\\tthis.__isAbsolutePosition = true;\\r\\n\\t\\t\\r\\n\\t\\tthis.__divContainer = null;\\r\\n\\t\\tthis.__txtBox = null;\\r\\n\\t\\tthis.__btnActivate = null;\\r\\n\\t\\tthis.__divCalContainer = null;\\r\\n\\t\\tthis.__nsPopUp = null;\\r\\n\\t\\tthis.__maxZIndex = 0;\\r\\n\\t\\t\\r\\n\\t\\tthis.__nsCalendar = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentMouseDownRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component);\\r\\n\\t};\\r\\n\\tnsExtendPrototype(NSContainerBase,NSDatePicker);\\r\\n\\tNSDatePicker.prototype.constructor = NSDatePicker;\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t\\tthis.__initDefault();\\r\\n\\t\\tthis.__createComponent();\\r\\n\\t\\tthis.__maxZIndex = this.util.getMaxZIndex();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.__removeDocumentMosueHandler();\\r\\n\\t\\tthis.__removePopUp();\\r\\n\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.__hideCalendar();\\r\\n\\t\\tthis.base.componentResized.call(this,event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.getSelectedDate = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__nsCalendar)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__nsCalendar.getSelectedDate();\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.getSelectedDateAsString = function(format) \\r\\n\\t{\\r\\n\\t\\tif(this.__nsCalendar)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__nsCalendar.getSelectedDateAsString(format);\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.setSelectedDate = function(date,format,fireEvent) \\r\\n\\t{\\r\\n\\t\\tif(this.__nsCalendar)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsCalendar.setSelectedDate(date,format,fireEvent);\\r\\n\\t\\t}\\r\\n\\t\\tif(date)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setTextInput(this.getSelectedDate());\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__txtBox.value = \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.setYear = function(year) \\r\\n\\t{\\r\\n\\t\\tif(this.__nsCalendar)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsCalendar.setYear(year);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.setMonth = function(month) \\r\\n\\t{\\r\\n\\t\\tif(this.__nsCalendar)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsCalendar.setMonth(month);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.reset = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__nsCalendar)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsCalendar.reset();\\r\\n\\t\\t}\\r\\n\\t\\tthis.__setTextInput();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.setTodayDate = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__nsCalendar)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsCalendar.setTodayDate();\\r\\n\\t\\t}\\r\\n\\t\\t//this.__setTextInput(new Date());\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.showCalendar = function(isAbsolutePosition) \\r\\n\\t{\\r\\n\\t\\tthis.__showCalendar(null, isAbsolutePosition);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.closeCalendar = function() \\r\\n\\t{\\r\\n\\t\\tthis.__hideCalendar();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.toggleCalendarVisibility = function() \\r\\n\\t{\\r\\n\\t\\tthis.__toggleCalendarVisibility();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.getCalendar = function() \\r\\n\\t{\\r\\n\\t\\treturn this.__nsCalendar;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.getTextBox = function() \\r\\n\\t{\\r\\n\\t\\treturn this.__txtBox;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.getText = function() \\r\\n\\t{\\r\\n\\t\\treturn this.__txtBox.value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setting = {};\\r\\n\\t\\t}\\r\\n\\t\\tvar setting = this.__setting;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"context\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__context = setting[\\\"context\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"dateOutputFormat\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dateOutputFormat = setting[\\\"dateOutputFormat\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(setting.hasOwnProperty(\\\"showTime\\\") && Boolean.parse(setting[\\\"showTime\\\"])) {\\r\\n\\t\\t\\t\\tthis.__dateOutputFormat += \\\" HH:mm\\\";\\r\\n\\t\\t\\t\\tif(setting.hasOwnProperty(\\\"timeSetting\\\") && setting[\\\"timeSetting\\\"].showSeconds) {\\r\\n\\t\\t\\t\\t\\tthis.__dateOutputFormat += \\\":ss\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"placeHolder\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__placeHolder = setting[\\\"placeHolder\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"buttonHtml\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__buttonHtml = setting[\\\"buttonHtml\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableTextBoxDisabled\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableTextBoxDisabled = Boolean.parse(setting[\\\"enableTextBoxDisabled\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"calendarPos\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__calendarPos = setting[\\\"calendarPos\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__calendarPos = this.util.POS_BOTTOMRIGHT;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"calendarWidth\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__calendarWidth = setting[\\\"calendarWidth\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"calendarCellWidth\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__calendarCellWidth = setting[\\\"calendarCellWidth\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"isAbsolutePosition\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__isAbsolutePosition = Boolean.parse(setting[\\\"isAbsolutePosition\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse {\\r\\n\\t\\t\\t\\tthis.__isAbsolutePosition = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"theme\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__theme = setting[\\\"theme\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar customClass = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"customClass\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcustomClass = setting[\\\"customClass\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!customClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcustomClass = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(var prop in this.__customClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__customClass[prop] = (customClass[prop] || null);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__initDefault = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__buttonHtml)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__buttonHtml = \\\"<svg version=\\\\\\\"1.1\\\\\\\" xmlns=\\\\\\\"http://www.w3.org/2000/svg\\\\\\\" \\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t width=\\\\\\\"16px\\\\\\\" height=\\\\\\\"16px\\\\\\\" viewBox=\\\\\\\"0 0 36.447 36.447\\\\\\\" >\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"<g>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t<g>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t<path d=\\\\\\\"M30.224,3.948h-1.098V2.75c0-1.517-1.197-2.75-2.67-2.75c-1.474,0-2.67,1.233-2.67,2.75v1.197h-2.74V2.75\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t\\tc0-1.517-1.197-2.75-2.67-2.75c-1.473,0-2.67,1.233-2.67,2.75v1.197h-2.74V2.75c0-1.517-1.197-2.75-2.67-2.75\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t\\tc-1.473,0-2.67,1.233-2.67,2.75v1.197H6.224c-2.343,0-4.25,1.907-4.25,4.25v24c0,2.343,1.907,4.25,4.25,4.25h24\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t\\tc2.344,0,4.25-1.907,4.25-4.25v-24C34.474,5.855,32.567,3.948,30.224,3.948z M25.286,2.75c0-0.689,0.525-1.25,1.17-1.25\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t\\tc0.646,0,1.17,0.561,1.17,1.25v4.896c0,0.689-0.524,1.25-1.17,1.25c-0.645,0-1.17-0.561-1.17-1.25V2.75z M17.206,2.75\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t\\tc0-0.689,0.525-1.25,1.17-1.25s1.17,0.561,1.17,1.25v4.896c0,0.689-0.525,1.25-1.17,1.25s-1.17-0.561-1.17-1.25V2.75z M9.125,2.75\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t\\tc0-0.689,0.525-1.25,1.17-1.25s1.17,0.561,1.17,1.25v4.896c0,0.689-0.525,1.25-1.17,1.25s-1.17-0.561-1.17-1.25V2.75z\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t\\t M31.974,32.198c0,0.965-0.785,1.75-1.75,1.75h-24c-0.965,0-1.75-0.785-1.75-1.75v-22h27.5V32.198z\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t<rect x=\\\\\\\"6.724\\\\\\\" y=\\\\\\\"14.626\\\\\\\" width=\\\\\\\"4.595\\\\\\\" height=\\\\\\\"4.089\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t<rect x=\\\\\\\"12.857\\\\\\\" y=\\\\\\\"14.626\\\\\\\" width=\\\\\\\"4.596\\\\\\\" height=\\\\\\\"4.089\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t<rect x=\\\\\\\"18.995\\\\\\\" y=\\\\\\\"14.626\\\\\\\" width=\\\\\\\"4.595\\\\\\\" height=\\\\\\\"4.089\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t<rect x=\\\\\\\"25.128\\\\\\\" y=\\\\\\\"14.626\\\\\\\" width=\\\\\\\"4.596\\\\\\\" height=\\\\\\\"4.089\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t<rect x=\\\\\\\"6.724\\\\\\\" y=\\\\\\\"20.084\\\\\\\" width=\\\\\\\"4.595\\\\\\\" height=\\\\\\\"4.086\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t<rect x=\\\\\\\"12.857\\\\\\\" y=\\\\\\\"20.084\\\\\\\" width=\\\\\\\"4.596\\\\\\\" height=\\\\\\\"4.086\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t<rect x=\\\\\\\"18.995\\\\\\\" y=\\\\\\\"20.084\\\\\\\" width=\\\\\\\"4.595\\\\\\\" height=\\\\\\\"4.086\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t<rect x=\\\\\\\"25.128\\\\\\\" y=\\\\\\\"20.084\\\\\\\" width=\\\\\\\"4.596\\\\\\\" height=\\\\\\\"4.086\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t<rect x=\\\\\\\"6.724\\\\\\\" y=\\\\\\\"25.54\\\\\\\" width=\\\\\\\"4.595\\\\\\\" height=\\\\\\\"4.086\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t<rect x=\\\\\\\"12.857\\\\\\\" y=\\\\\\\"25.54\\\\\\\" width=\\\\\\\"4.596\\\\\\\" height=\\\\\\\"4.086\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t<rect x=\\\\\\\"18.995\\\\\\\" y=\\\\\\\"25.54\\\\\\\" width=\\\\\\\"4.595\\\\\\\" height=\\\\\\\"4.086\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t\\t<rect x=\\\\\\\"25.128\\\\\\\" y=\\\\\\\"25.54\\\\\\\" width=\\\\\\\"4.596\\\\\\\" height=\\\\\\\"4.086\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\t</g>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"</g>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"</svg>\\\";\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__createComponent = function()\\r\\n\\t{\\r\\n\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsDatePicker\\\");\\r\\n\\t\\tthis.__applyTheme(this.__baseComponent,\\\"nsDatePicker\\\");\\r\\n\\t\\tthis.__divContainer = this.util.createDiv(this.getID() + \\\"container\\\",\\\"nsDatePickerContainer\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__divContainer,\\\"container\\\");\\r\\n\\t\\tthis.__baseComponent.appendChild(this.__divContainer);\\r\\n\\t\\tthis.__txtBox = this.util.createElement(\\\"input\\\",this.getID() + \\\"input\\\",\\\"nsDatePickerTextBox\\\");\\r\\n\\t\\tthis.__txtBox.setAttribute(\\\"type\\\",\\\"search\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__txtBox,\\\"textInput\\\");\\r\\n\\t\\tif(this.__placeHolder)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__txtBox.setAttribute(\\\"placeholder\\\",this.__placeHolder);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableTextBoxDisabled)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__txtBox.setAttribute(\\\"readOnly\\\",true);\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__txtBox,\\\"nsDatePickerTextBoxDisabled\\\");\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addEvent(this.__txtBox,\\\"input\\\",this.__txtBoxKeyHandler.bind(this));\\r\\n\\t\\t}\\r\\n\\t\\tthis.__divContainer.appendChild(this.__txtBox);\\r\\n\\t\\tthis.__btnActivate = this.util.createElement(\\\"button\\\",this.getID() + \\\"button\\\",\\\"nsDatePickerButton\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__txtBox,\\\"button\\\");\\r\\n\\t\\tthis.__btnActivate.innerHTML = this.__buttonHtml;\\r\\n\\t\\tthis.util.addEvent(this.__btnActivate,\\\"click\\\",this.__btnActivateClickHandler.bind(this));\\r\\n\\t\\tthis.__divContainer.appendChild(this.__btnActivate);\\r\\n\\t\\tvar popUpSetting = {type:\\\"div\\\",width:null,position:this.__calendarPos,closeOnOutsideClick:false};\\r\\n\\t\\tthis.__nsPopUp = new this.util.nsPopUp(popUpSetting);\\r\\n\\t\\tthis.__nsPopUp.create();\\r\\n\\t\\tthis.__divCalContainer = this.__nsPopUp.getPopUp();\\r\\n\\t\\t/*this.__divCalContainer = this.util.createDiv(this.getID() + \\\"calContainer\\\",\\\"nsDatePickerCalContainer\\\");\\r\\n\\t\\tthis.__divContainer.appendChild(this.__divCalContainer);*/\\r\\n\\t\\tthis.__createCalendar(this.__divCalContainer);\\r\\n\\t\\tif(this.getSelectedDate())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setTextInput(this.getSelectedDate());\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__createCalendar = function(parent)\\r\\n\\t{\\r\\n\\t\\tif(!this.__nsCalendar)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting =  this.util.cloneObject(this.__setting);\\r\\n\\t\\t\\tsetting.customClass = {};\\r\\n\\t\\t\\tfor(var prop in this.__customClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(prop.startsWith(\\\"cal\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar tempProp = prop.substring(3);\\r\\n\\t\\t\\t\\t\\ttempProp = tempProp.charAt(0).toLowerCase() + tempProp.slice(1);\\r\\n\\t\\t\\t\\t\\tsetting.customClass[tempProp] = this.__customClass[prop];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tsetting[\\\"width\\\"] = this.__calendarWidth;\\r\\n\\t\\t\\tsetting[\\\"cellWidth\\\"] = this.__calendarCellWidth;\\r\\n\\t\\t\\tthis.__nsCalendar = new NSCalendar(parent,setting);\\r\\n\\t\\t\\tthis.util.addEvent(parent,NSCalendar.DATE_SELECTED,this.__dateSelectedHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(parent,NSCalendar.DATE_SELECTION_CANCELLED,this.__dateCancelSelectedHandler.bind(this));\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__btnActivateClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\t//to stop refresh of page\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tevent.preventDefault();\\r\\n        event.stopPropagation();\\r\\n\\t\\tthis.__toggleCalendarVisibility(event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__txtBoxKeyHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar strDate = this.__txtBox.value;\\r\\n\\t\\tvar nsDateUtil = new NSDateUtil(); \\r\\n\\t\\tvar date = nsDateUtil.parseString(strDate,this.__dateOutputFormat);\\r\\n\\t\\tif(date)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsCalendar.setSelectedDate(date);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsCalendar.setSelectedDate(null,null,false);\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSDatePicker.INPUT_CHANGE,strDate,{date:date,value:strDate});\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__documentMouseDownHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\tvar parent = this.util.findParentBySelector(target,\\\".nsDatePickerContainer\\\") || this.util.findParentBySelector(target,\\\".nsCalendar\\\");\\r\\n\\t\\tif(!parent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__hideCalendar();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__dateSelectedHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tvar selectedDate = event.detail;\\r\\n\\t\\tthis.__setTextInput(selectedDate);\\r\\n\\t\\tthis.__hideCalendar();\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSDatePicker.DATE_SELECTED,selectedDate,{date:selectedDate});\\r\\n\\t};\\r\\n\\r\\n\\tNSDatePicker.prototype.__dateCancelSelectedHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tthis.__hideCalendar();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__setTextInput = function(date)\\r\\n\\t{\\r\\n\\t\\tif(date)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar nsDateUtil = new NSDateUtil(); \\r\\n\\t\\t\\tthis.__txtBox.value = nsDateUtil.format(date,this.__dateOutputFormat);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__txtBox.value = \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__toggleCalendarVisibility = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__isCalendarVisible())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__hideCalendar(event);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__showCalendar(event);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__showCalendar = function(event,isAbsolutePosition)\\r\\n\\t{\\r\\n\\t\\tif(this.util.isUndefinedOrNull(isAbsolutePosition)) {\\r\\n\\t\\t\\tisAbsolutePosition = this.__isAbsolutePosition;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__nsCalendar.__clearCellSelectionExceptSelected();\\r\\n\\t\\t//this.util.addStyleClass(this.__divCalContainer,\\\"nsDatePickerCalContainerVisible\\\");\\r\\n\\t\\tthis.__nsPopUp.show();\\r\\n\\t\\tthis.__nsPopUp.placePopUp(this.__divContainer,isAbsolutePosition);\\r\\n\\t\\tthis.__addDocumentMosueHandler();\\r\\n\\t\\tthis.__divCalContainer.style.zIndex = (this.__maxZIndex > 0) ? (this.__maxZIndex + 1) : 9999;\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSDatePicker.CALENDAR_OPENED);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__hideCalendar = function(event)\\r\\n\\t{\\r\\n\\t\\t//this.util.removeStyleClass(this.__divCalContainer,\\\"nsDatePickerCalContainerVisible\\\");\\r\\n\\t\\tthis.__nsPopUp.hide();\\r\\n\\t\\tthis.__removeDocumentMosueHandler();\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSDatePicker.CALENDAR_CLOSED);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__addDocumentMosueHandler = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__documentMouseDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__documentMouseDownRef = this.__documentMouseDownHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"mousedown\\\",this.__documentMouseDownRef);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__removeDocumentMosueHandler = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__documentMouseDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mousedown\\\",this.__documentMouseDownRef);\\r\\n\\t\\t\\tthis.__documentMouseDownRef = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__isCalendarVisible = function()\\r\\n\\t{\\r\\n\\t\\treturn this.util.hasStyleClass(this.__divCalContainer,\\\"nsDatePickerCalContainerVisible\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__applyCustomClass = function(element,type)\\r\\n\\t{\\r\\n\\t\\tif(element && type && this.__customClass[type])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(element,this.__customClass[type]);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.prototype.__removePopUp = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__nsPopUp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsPopUp.remove();\\r\\n\\t\\t\\tthis.__nsPopUp = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDatePicker.CALENDAR_OPENED = \\\"calendarOpened\\\";\\r\\n\\tNSDatePicker.CALENDAR_CLOSED = \\\"calendarClosed\\\";\\r\\n\\tNSDatePicker.DATE_SELECTED = \\\"dateSelected\\\";\\r\\n\\tNSDatePicker.INPUT_CHANGE = \\\"inputChange\\\";\\r\\n\\t\\r\\n\\treturn NSDatePicker;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSDatePicker\\\",NSDatePicker);\";","export const NSDocxExportCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\n\\r\\n\\t\\t}\\r\\nvar NSZip = (function()\\r\\n{\\r\\n\\tvar NSZip = function(config)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar setting = {};\\r\\n\\t    \\r\\n\\t    var objFiles = {};\\r\\n\\t    var util = null;\\r\\n\\t\\t\\r\\n\\t\\tvar initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!config)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t/*setting = {\\r\\n\\t\\t\\t\\tfileName: config[\\\"fileName\\\"] || \\\"download\\\",\\r\\n\\t\\t\\t\\tmimeType: config[\\\"mimeType\\\"] || \\\"application/zip\\\"\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif (setting.fileName.indexOf(\\\".\\\") === -1) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetting.fileName = setting.fileName + \\\".zip\\\";\\r\\n\\t        }*/\\r\\n\\t\\t\\tutil = new ZipUtil();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getFile = function(type,mimeType)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objRet = null;\\r\\n\\t\\t\\ttype = type ? type : \\\"blob\\\";\\r\\n\\t\\t\\tswitch(type) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase \\\"blob\\\":\\r\\n\\t\\t\\t\\t\\tobjRet = getBlob(mimeType);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn objRet;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar addFolders = function(arrPath)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrReturn = null;\\r\\n\\t\\t\\tif(arrPath && arrPath.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrReturn = [];\\r\\n\\t\\t\\t\\tfor(var index = 0;index < arrPath.length;index++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrReturn.push(addFolder(arrPath[index]));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrReturn;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar addFolder = function(path)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn createFolder(path);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar addFile = function(path,content,prop)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn createFile(path,content,prop,false);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar createFolder = function(path)\\r\\n\\t\\t{\\r\\n\\t\\t\\tpath = util.addSlashAtEnd(path);\\r\\n\\t\\t\\tif(objFiles[path])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn objFiles[path].zipFile;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn createFile(path,null,null,true);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar createFile = function(path,content,prop,isDir)\\r\\n\\t\\t{\\r\\n\\t\\t\\tprop = prop ? prop : {};\\r\\n\\t\\t\\tvar item = {path: path,content: content,origContent: content};\\r\\n\\t\\t\\titem.created = new Date();\\r\\n\\t\\t\\titem.dataType = util.getDataType(content);\\r\\n\\t\\t\\titem.isDir = isDir ? true : false;\\r\\n\\t\\t\\tvar parent = util.getParentFolder(path);\\r\\n\\t\\t\\tif(parent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcreateFolder(parent);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem.isBase64 = (item.type == \\\"base64\\\");\\r\\n\\t\\t\\titem.isBinary = (item.type == \\\"binary\\\");\\r\\n\\t\\t\\tvar isUnicodeString = (item.dataType === \\\"string\\\") && item.isBase64 && item.isBinary;\\r\\n\\t\\t\\tif (item.type != \\\"binary\\\") \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem.isBinary = !isUnicodeString;\\r\\n\\t\\t    }\\r\\n\\t\\t\\tif(item.isDir || !path || !path.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem.dataType = \\\"string\\\";\\r\\n\\t\\t\\t\\titem.isBase64 = false;\\r\\n\\t\\t\\t\\titem.isBinary = true;\\r\\n\\t\\t\\t\\titem.content = \\\"\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem.content = getContent(item);\\r\\n\\t\\t\\tvar zipFile = new ZipFile(util,item,self);\\r\\n\\t\\t\\tobjFiles[path] = {item: item,zipFile: zipFile};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn zipFile;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getContent = function(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar refine = function(data)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar dataType = item.dataType;\\r\\n\\t\\t\\t\\tif(dataType)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(dataType === \\\"string\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(item.isBase64)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdata = util.base64Decode(data);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(item.isBinary)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t/*var arrData = new Uint8Array(data.length);\\r\\n\\t\\t\\t\\t\\t\\t\\tdata = util.fillArrayWithString(data,arrData);*/\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if (dataType === \\\"arraybuffer\\\") \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t            data = new Uint8Array(item);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconsole.warn(\\\"DataType cannot be detected for file \\\" + item.path);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn data;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar content = item.content;\\r\\n\\t\\t\\tvar isBlob = (content instanceof Blob || ['[object File]', '[object Blob]'].indexOf(Object.prototype.toString.call(content)) !== -1);\\r\\n\\t        if(isBlob && typeof FileReader !== \\\"undefined\\\") \\r\\n\\t        {\\r\\n\\t        \\treturn new Promise(function (resolve, reject) \\r\\n\\t        \\t{\\r\\n\\t                var reader = new FileReader();\\r\\n\\t                reader.onload = function(event) \\r\\n\\t                {\\r\\n\\t                \\titem.content = refine(event.target.result);\\r\\n\\t                \\tresolve(event.target.result);\\r\\n\\t                };\\r\\n\\t                reader.onerror = function(event) \\r\\n\\t                {\\r\\n\\t                \\tconsole.error(event.target.error);\\r\\n\\t                    reject(event.target.error);\\r\\n\\t                };\\r\\n\\t                reader.readAsArrayBuffer(content);\\r\\n\\t        \\t});\\r\\n\\t        }\\r\\n\\t        return refine(content);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar clear = function()\\r\\n\\t\\t{\\r\\n\\t\\t     objFiles = {};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getBlob = function(mimeType)\\r\\n\\t\\t{\\r\\n\\t\\t\\tmimeType = mimeType ? mimeType : \\\"application/zip\\\";\\r\\n\\t\\t\\tvar textOutput = buildFileStream();\\r\\n\\t\\t\\tvar uInt8Output  = util.buildUint8Array(textOutput);\\r\\n\\t\\t\\tclear();\\r\\n\\t\\t\\treturn new Blob([uInt8Output], { type: setting.mimeType });\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar buildFileStream = function(initContent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tinitContent = initContent ? initContent : \\\"\\\";\\r\\n\\t\\t\\tvar len = Object.keys(objFiles).length;\\r\\n\\t\\t\\tvar middleContent = \\\"\\\";\\r\\n\\t\\t\\tvar lL = 0;\\r\\n\\t        var cL = 0;\\r\\n\\t        for(var path in objFiles)\\r\\n\\t\\t\\t{\\r\\n\\t        \\tvar file = objFiles[path].item;\\r\\n\\t\\t\\t\\tvar objHeader = getHeader(file, lL);\\r\\n\\t\\t\\t\\tvar fileHeader = objHeader.fileHeader;\\r\\n\\t\\t\\t\\tvar folderHeader = objHeader.folderHeader;\\r\\n\\t\\t\\t\\tvar content = objHeader.content;\\r\\n\\t\\t\\t\\tlL += fileHeader.length + content.length;\\r\\n\\t            cL += folderHeader.length;\\r\\n\\t            initContent +=  fileHeader + content;\\r\\n\\t            middleContent += folderHeader;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar endContent = buildFolderEnd(len, cL, lL);\\r\\n\\t        return initContent + middleContent + endContent;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getHeader = function(file,offset)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar content = util.utf8_encode(file.content);\\r\\n\\t\\t\\tvar path = file.path;\\r\\n\\t\\t\\tvar created = file.created;\\r\\n\\t\\t\\tvar utfPath = util.utf8_encode(path);\\r\\n\\t\\t\\tvar isUTF8 = (utfPath !== path);\\r\\n\\t\\t\\tvar time = util.convertTime(created);\\r\\n\\t\\t    var dt = util.convertDate(created);\\r\\n\\t\\t    var extraFields = \\\"\\\";\\r\\n\\t\\t    if (isUTF8) \\r\\n\\t\\t    {\\r\\n\\t            var uExtraFieldPath = util.decToHex(1, 1) + util.decToHex(util.getFromCrc32Table(utfPath), 4) + utfPath;\\r\\n\\t            extraFields = \\\"\\\\x75\\\\x70\\\" + util.decToHex(uExtraFieldPath.length, 2) + uExtraFieldPath;\\r\\n\\t        }\\r\\n\\t\\t    var header = '\\\\x0A\\\\x00' +\\r\\n\\t        (isUTF8 ? '\\\\x00\\\\x08' : '\\\\x00\\\\x00') + // general purpose bit flag\\r\\n\\t        '\\\\x00\\\\x00' +\\r\\n\\t        util.decToHex(time, 2) + // last modified time\\r\\n\\t        util.decToHex(dt, 2) + // last modified date\\r\\n\\t        util.decToHex(content ? util.getFromCrc32Table(content) : 0, 4) +\\r\\n\\t        util.decToHex(content ? content.length : 0, 4) + // compressed size\\r\\n\\t        util.decToHex(content ? content.length : 0, 4) + // uncompressed size\\r\\n\\t        util.decToHex(utfPath.length, 2) + // file name length\\r\\n\\t        util.decToHex(extraFields.length, 2); // extra field length\\r\\n\\t        \\r\\n\\t\\t    var fileHeader = 'PK\\\\x03\\\\x04' + header + utfPath + extraFields;\\r\\n\\t        var folderHeader = 'PK\\\\x01\\\\x02' + // central header\\r\\n\\t            '\\\\x14\\\\x00' +\\r\\n\\t            header + // file header\\r\\n\\t            '\\\\x00\\\\x00' +\\r\\n\\t            '\\\\x00\\\\x00' +\\r\\n\\t            '\\\\x00\\\\x00' +\\r\\n\\t            (content ? '\\\\x00\\\\x00\\\\x00\\\\x00' : '\\\\x10\\\\x00\\\\x00\\\\x00') + // external file attributes\\r\\n\\t            util.decToHex(offset, 4) + // relative offset of local header\\r\\n\\t            utfPath + // file name\\r\\n\\t            extraFields; // extra field\\r\\n\\t        return { fileHeader: fileHeader, folderHeader: folderHeader, content: content || '' };\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar buildFolderEnd = function(totalEntries,size,startOffset)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = \\\"PK\\\\x05\\\\x06\\\" + \\\"\\\\x00\\\\x00\\\" + \\\"\\\\x00\\\\x00\\\";\\r\\n\\t\\t\\tretValue += util.decToHex(totalEntries, 2);\\r\\n\\t\\t\\tretValue += util.decToHex(totalEntries, 2);\\r\\n\\t\\t\\tretValue += util.decToHex(size, 4);\\r\\n\\t\\t\\tretValue += util.decToHex(startOffset, 4);\\r\\n\\t\\t\\tretValue += \\\"\\\\x00\\\\x00\\\";\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t    var downloadFile = function(fileName,mimeType,type,content)\\r\\n\\t    {\\r\\n\\t    \\tfileName = fileName ? fileName : \\\"download\\\";\\r\\n\\t    \\tif (fileName.indexOf(\\\".\\\") === -1) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfileName = fileName + \\\".zip\\\";\\r\\n\\t        }\\r\\n\\t    \\tcontent = content ? content : getFile(type,mimeType);\\r\\n\\t    \\tutil.downloadFile(fileName,content);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    var ZipFile = function(util,item,objRoot)\\r\\n\\t    {\\r\\n\\t    \\tvar self = this;\\r\\n\\t    \\t\\r\\n\\t    \\tvar addFolder = function(path)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn objRoot.addFolder(getPath(path));\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tvar addFile = function(path,content)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn objRoot.addFile(getPath(path),content);\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tvar getPath = function(path)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn item.path + path;\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tif(item.isDir)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tself.addFolder = addFolder;\\r\\n\\t    \\t\\tself.addFile = addFile;\\r\\n\\t    \\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    var ZipUtil = function()\\r\\n\\t    {\\r\\n\\t    \\tvar self = this;\\r\\n\\t    \\tvar crcTable = [];\\r\\n\\t    \\tvar base64Key = \\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\\";\\r\\n\\t    \\t\\r\\n\\t    \\tvar initialize = function()\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tcrcTable = makeCRCTable();\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\t//https://stackoverflow.com/questions/18638900/javascript-crc32\\r\\n\\t    \\tvar makeCRCTable = function()\\r\\n\\t    \\t{\\r\\n\\t    \\t    var c;\\r\\n\\t    \\t    var crcTable = [];\\r\\n\\t    \\t    for(var n =0; n < 256; n++)\\r\\n\\t    \\t    {\\r\\n\\t    \\t        c = n;\\r\\n\\t    \\t        for(var k =0; k < 8; k++)\\r\\n\\t    \\t        {\\r\\n\\t    \\t            c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\\r\\n\\t    \\t        }\\r\\n\\t    \\t        crcTable[n] = c;\\r\\n\\t    \\t    }\\r\\n\\t    \\t    return crcTable;\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tvar getFromCrc32Table = function(content, crc)\\r\\n\\t        {\\r\\n\\t    \\t\\tif(typeof content === \\\"undefined\\\" || !content.length) \\r\\n\\t    \\t\\t{\\r\\n\\t    \\t        return 0;\\r\\n\\t    \\t    }\\r\\n\\t    \\t\\tif(!crc)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tcrc = 0;\\r\\n\\t        \\t}\\r\\n\\t        \\tcrc ^= (-1);\\r\\n\\t    \\t\\tvar dataType = util.getDataType(content);\\r\\n\\t    \\t\\tif(dataType === \\\"string\\\")\\r\\n\\t    \\t\\t{\\r\\n\\t\\t            var ch = 0;\\r\\n\\t\\t            var k = 0;\\r\\n\\t\\t            var l = 0;\\r\\n\\t\\t            var len = content.length;\\r\\n\\t\\t            for (var count = 0;count < len;count++) \\r\\n\\t\\t            {\\r\\n\\t\\t            \\tch = content.charCodeAt(count);\\r\\n\\t\\t                k = (crc ^ ch) & 0xFF;\\r\\n\\t\\t                l = crcTable[k];\\r\\n\\t\\t                crc = (crc >>> 8) ^ l;\\r\\n\\t\\t            }\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t\\telse\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tvar ch = 0;\\r\\n\\t\\t            var k = 0;\\r\\n\\t\\t            var l = 0;\\r\\n\\t    \\t\\t\\tvar len = content.length;\\r\\n\\t    \\t\\t\\tfor (var count = 0;count < len;count++) \\r\\n\\t\\t            {\\r\\n\\t    \\t\\t\\t\\tch = content[count];\\r\\n\\t    \\t\\t\\t\\tk = (crc ^ ch) & 0xFF;\\r\\n\\t    \\t\\t\\t\\tl = crcTable[k];\\r\\n\\t    \\t\\t\\t\\tcrc = (crc >>> 8) ^ l;\\r\\n\\t\\t            }\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t\\treturn crc ^ (-1);\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        var buildUint8Array = function(content)\\r\\n\\t        {\\r\\n\\t        \\tvar retValue = new Uint8Array(content.length);\\r\\n\\t            for (var count = 0; count < content.length; count++) \\r\\n\\t            {\\r\\n\\t            \\tretValue[count] = content.charCodeAt(count);\\r\\n\\t            }\\r\\n\\t            return retValue;\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        //http://www.navioo.com/javascript/tutorials/Javascript_utf8_encode_1529.html\\r\\n\\t        // Encodes an ISO-8859-1 string to UTF-8    \\r\\n\\t        var utf8_encode = function(str) \\r\\n\\t    \\t{\\r\\n\\t        \\tvar retValue = \\\"\\\";\\r\\n\\t    \\t\\tvar str = str.replace(/\\\\r\\\\n/g, \\\"\\\\n\\\");\\r\\n\\t    \\t\\tvar len = str.length;\\r\\n\\t    \\t\\tvar start = 0;\\r\\n\\t    \\t\\tvar end = 0;\\r\\n\\t    \\t\\tvar enc = null;\\r\\n\\t    \\t\\tvar ch = null;\\r\\n\\t    \\t\\tfor(var count = 0;count < len;count++)\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tch = str.charCodeAt(count);\\r\\n\\t    \\t\\t\\tenc = null;\\r\\n\\t    \\t\\t\\tif(ch < 128)\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tend++;\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t\\telse if(ch > 127 && ch < 2048)\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tenc = String.fromCharCode(ch >> 6 | 192);\\r\\n\\t    \\t\\t\\t\\tenc += String.fromCharCode((ch & 63) | 128);\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t\\telse\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tenc = String.fromCharCode((ch >> 12) | 224);\\r\\n\\t    \\t\\t\\t\\tenc += String.fromCharCode(((ch >> 6) & 63) | 128);\\r\\n\\t    \\t\\t\\t\\tenc += String.fromCharCode((ch & 63) | 128);\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t\\tif (enc != null) \\r\\n\\t    \\t\\t\\t{  \\r\\n    \\t\\t            if (end > start) \\r\\n    \\t\\t            {  \\r\\n    \\t\\t            \\tretValue += str.substring(start, end);  \\r\\n    \\t\\t            }  \\r\\n    \\t\\t            retValue += enc;  \\r\\n    \\t\\t            start = end = count + 1;  \\r\\n    \\t\\t        }  \\r\\n\\t    \\t\\t}\\r\\n\\t    \\t\\tif (end > start) \\r\\n\\t    \\t\\t{  \\r\\n\\t    \\t\\t\\tretValue += str.substring(start,str.length);  \\r\\n\\t    \\t    } \\r\\n\\t    \\t\\treturn retValue;\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        //http://www.navioo.com/javascript/tutorials/Javascript_utf8_decode_1528.html\\r\\n\\t        // Converts a UTF-8 encoded string to ISO-8859-1    \\r\\n\\t        var utf8_decode = function(str) \\r\\n\\t    \\t{\\r\\n\\t        \\tvar arrReturn = [];\\r\\n\\t        \\tvar count = 0;\\r\\n\\t        \\tvar retCount = 0;\\r\\n\\t        \\tvar char1 = 0;\\r\\n\\t        \\tvar char2 = 0;\\r\\n\\t        \\tvar char3 = 0;  \\r\\n\\t            str += \\\"\\\";  \\r\\n\\t            while (count < str.length) \\r\\n\\t            {  \\r\\n\\t                char1 = str.charCodeAt(count);  \\r\\n\\t                if (char1 < 128) \\r\\n\\t                {  \\r\\n\\t                    arrReturn[retCount++] = String.fromCharCode(char1);  \\r\\n\\t                    count++;  \\r\\n\\t                } \\r\\n\\t                else if ((char1 > 191) && (char1 < 224)) \\r\\n\\t                {  \\r\\n\\t                    char2 = str.charCodeAt(count+1);  \\r\\n\\t                    arrReturn[retCount++] = String.fromCharCode(((char1 & 31) << 6) | (char2 & 63));  \\r\\n\\t                    count += 2;  \\r\\n\\t                } \\r\\n\\t                else \\r\\n\\t                {  \\r\\n\\t                    char2 = str.charCodeAt(count+1);  \\r\\n\\t                    char3 = str.charCodeAt(count+2);  \\r\\n\\t                    arrReturn[retCount++] = String.fromCharCode(((char1 & 15) << 12) | ((char2 & 63) << 6) | (char3 & 63));  \\r\\n\\t                    count += 3;  \\r\\n\\t                }  \\r\\n\\t            }  \\r\\n\\t            return arrReturn.join('');  \\r\\n\\t    \\t};\\r\\n\\t        \\r\\n\\t        var decToHex = function(number, bytes) \\r\\n\\t        {\\r\\n\\t        \\tvar retValue = \\\"\\\";\\r\\n\\t        \\tfor(var count = 0;count < bytes;count++)\\r\\n\\t    \\t\\t{\\r\\n\\t        \\t\\tretValue += String.fromCharCode(number & 0xFF);\\r\\n\\t        \\t\\tnumber = number >>> 8;\\r\\n\\t    \\t\\t}\\r\\n\\t        \\treturn retValue;\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        var fillArrayWithString = function(str,arrData) \\r\\n\\t        {\\r\\n\\t        \\tfor (var count = 0;count < str.length;count++) \\r\\n\\t        \\t{\\r\\n\\t        \\t\\tarrData[count] = str.charCodeAt(count) & 0xFF;\\r\\n\\t            }\\r\\n\\t            return arrData;\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        var convertTime = function(date)\\r\\n\\t        {\\r\\n\\t        \\t var hour = date.getUTCHours();\\r\\n\\t        \\t hour = hour << 6;\\r\\n\\t        \\t hour = hour | date.getUTCMinutes();\\r\\n\\t        \\t hour = hour << 5;\\r\\n\\t        \\t hour = hour | date.getUTCSeconds() / 2;\\r\\n\\t        \\t return hour;\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        var convertDate = function(date)\\r\\n\\t        {\\r\\n\\t        \\tvar retDate = date.getUTCFullYear() - 1980;\\r\\n\\t        \\tretDate = retDate << 4;\\r\\n\\t        \\tretDate = retDate | (date.getUTCMonth() + 1);\\r\\n\\t        \\tretDate = retDate << 5;\\r\\n\\t        \\tretDate = retDate | date.getUTCDate();\\r\\n\\t        \\treturn retDate;\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        var addSlashAtEnd = function(path) \\r\\n\\t    \\t{\\r\\n\\t    \\t    if (path.slice(-1) !== \\\"/\\\") \\r\\n\\t    \\t    {\\r\\n\\t    \\t        path += \\\"/\\\";\\r\\n\\t    \\t    }\\r\\n\\t    \\t    return path;\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tvar getParentFolder = function(path) \\r\\n\\t    \\t{\\r\\n\\t    \\t    if (path.slice(-1) === '/') \\r\\n\\t    \\t    {\\r\\n\\t    \\t        path = path.substring(0, path.length - 1);\\r\\n\\t    \\t    }\\r\\n\\t    \\t    var lastSlash = path.lastIndexOf('/');\\r\\n\\t    \\t    return (lastSlash > 0) ? path.substring(0, lastSlash) : \\\"\\\";\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tvar getDataType = function(data) \\r\\n\\t    \\t{\\r\\n\\t    \\t    if (typeof data === \\\"string\\\") \\r\\n\\t    \\t    {\\r\\n\\t    \\t        return \\\"string\\\";\\r\\n\\t    \\t    }\\r\\n\\t    \\t    if (Object.prototype.toString.call(data) === \\\"[object Array]\\\") \\r\\n\\t    \\t    {\\r\\n\\t    \\t        return \\\"array\\\";\\r\\n\\t    \\t    }\\r\\n\\t    \\t    if (typeof Buffer !== \\\"undefined\\\" && data instanceof Buffer) \\r\\n\\t    \\t    {\\r\\n\\t    \\t        return \\\"nodebuffer\\\";\\r\\n\\t    \\t    }\\r\\n\\t    \\t    if (data instanceof Uint8Array) \\r\\n\\t    \\t    {\\r\\n\\t    \\t        return \\\"uint8array\\\";\\r\\n\\t    \\t    }\\r\\n\\t    \\t    if (data instanceof ArrayBuffer) \\r\\n\\t    \\t    {\\r\\n\\t    \\t        return \\\"arraybuffer\\\";\\r\\n\\t    \\t    }\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tvar base64Decode = function(data) \\r\\n\\t    \\t{\\r\\n\\t    \\t\\tvar chr1, chr2, chr3;\\r\\n\\t    \\t    var enc1, enc2, enc3, enc4;\\r\\n\\t    \\t    var i = 0, resultIndex = 0;\\r\\n\\t    \\t    \\r\\n\\t    \\t    if(data.indexOf('base64,') > -1)\\r\\n\\t    \\t    {\\r\\n\\t    \\t    \\tvar index = data.indexOf('base64,') + 'base64,'.length;\\r\\n\\t\\t    \\t    data = data.substring(index);\\r\\n\\t    \\t    }\\r\\n\\t    \\t    data = data.replace(/[^A-Za-z0-9\\\\+\\\\/\\\\=]/g, \\\"\\\");\\r\\n\\t    \\t    var totalLength = data.length * 3 / 4;\\r\\n\\t    \\t    if(data.charAt(data.length - 1) === base64Key.charAt(64)) \\r\\n\\t    \\t    {\\r\\n\\t    \\t        totalLength--;\\r\\n\\t    \\t    }\\r\\n\\t    \\t    if(data.charAt(data.length - 2) === base64Key.charAt(64)) \\r\\n\\t    \\t    {\\r\\n\\t    \\t        totalLength--;\\r\\n\\t    \\t    }\\r\\n\\t    \\t    //totalLength is base64 expected length\\r\\n\\t    \\t    if (totalLength % 1 !== 0) \\r\\n\\t    \\t    {\\r\\n\\t    \\t        throw new Error(\\\"Invalid base64 data\\\");\\r\\n\\t    \\t    }\\r\\n\\t    \\t    var retValue = new Uint8Array(totalLength|0);\\r\\n\\t    \\t    while (i < data.length) \\r\\n\\t    \\t    {\\r\\n\\t    \\t        enc1 = base64Key.indexOf(data.charAt(i++));\\r\\n\\t    \\t        enc2 = base64Key.indexOf(data.charAt(i++));\\r\\n\\t    \\t        enc3 = base64Key.indexOf(data.charAt(i++));\\r\\n\\t    \\t        enc4 = base64Key.indexOf(data.charAt(i++));\\r\\n\\r\\n\\t    \\t        chr1 = (enc1 << 2) | (enc2 >> 4);\\r\\n\\t    \\t        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\\r\\n\\t    \\t        chr3 = ((enc3 & 3) << 6) | enc4;\\r\\n\\r\\n\\t    \\t        retValue[resultIndex++] = chr1;\\r\\n\\r\\n\\t    \\t        if (enc3 !== 64) \\r\\n\\t    \\t        {\\r\\n\\t    \\t            retValue[resultIndex++] = chr2;\\r\\n\\t    \\t        }\\r\\n\\t    \\t        if (enc4 !== 64) \\r\\n\\t    \\t        {\\r\\n\\t    \\t            retValue[resultIndex++] = chr3;\\r\\n\\t    \\t        }\\r\\n\\t    \\t    }\\r\\n\\r\\n\\t    \\t    return retValue;\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tvar downloadFile = function(fileName,content)\\r\\n\\t        {\\r\\n\\t        \\tif (\\\"msSaveOrOpenBlob\\\" in window.navigator) \\r\\n\\t        \\t{\\r\\n\\t                window.navigator.msSaveOrOpenBlob(content, fileName);\\r\\n\\t            }\\r\\n\\t            else \\r\\n\\t            {\\r\\n\\t                var element = document.createElement(\\\"a\\\");\\r\\n\\t                var url = window.URL.createObjectURL(content);\\r\\n\\t                element.setAttribute(\\\"href\\\", url);\\r\\n\\t                element.setAttribute(\\\"download\\\", fileName);\\r\\n\\t                element.style.display = \\\"none\\\";\\r\\n\\t                document.body.appendChild(element);\\r\\n\\t                element.click();\\r\\n\\t                window.URL.revokeObjectURL(url);\\r\\n\\t                document.body.removeChild(element);\\r\\n\\t            }\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        initialize();\\r\\n\\t        \\r\\n\\t        self.getFromCrc32Table = getFromCrc32Table;\\r\\n\\t        self.buildUint8Array = buildUint8Array;\\r\\n\\t        self.utf8_encode = utf8_encode;\\r\\n\\t        self.utf8_decode = utf8_decode;\\r\\n\\t        self.decToHex = decToHex;\\r\\n\\t        self.fillArrayWithString = fillArrayWithString;\\r\\n\\t        self.convertTime = convertTime;\\r\\n\\t        self.convertDate = convertDate;\\r\\n\\t        self.addSlashAtEnd = addSlashAtEnd;\\r\\n\\t        self.getParentFolder = getParentFolder;\\r\\n\\t        self.getDataType = getDataType;\\r\\n\\t        self.base64Decode = base64Decode;\\r\\n\\t        self.downloadFile = downloadFile;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t\\tinitialize();\\r\\n\\t\\t\\r\\n\\t\\tself.addFolder = addFolder;\\r\\n\\t\\tself.addFolders = addFolders;\\r\\n\\t\\tself.addFile = addFile;\\r\\n\\t\\tself.getBlob = getBlob;\\r\\n\\t\\tself.getFile = getFile;\\r\\n\\t\\tself.downloadFile = downloadFile;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSZip;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSZip\\\",NSZip);var nsExtendPrototype = (function()\\r\\n{\\r\\n\\tvar nsExtendPrototype = function(source,destination) \\r\\n\\t{\\r\\n\\t\\tif(source && destination)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdestination.prototype = Object.create(source.prototype);\\r\\n\\t\\t\\tdestination.prototype.constructor = destination;\\r\\n\\t\\t\\tdestination.prototype.base = source.prototype;\\r\\n\\t\\t\\treturn source.prototype;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\treturn nsExtendPrototype;\\r\\n})();\\r\\n\\r\\nvar NSDocxExport = (function()\\r\\n{\\r\\n\\tvar NSDocxExport = function(config)\\r\\n\\t{\\r\\n\\t\\tthis.__config = config;\\r\\n\\t\\tthis.util = null;\\r\\n\\t\\tthis.__exportUtil = null;\\r\\n\\t\\tthis.__setting = {};\\r\\n\\t\\tthis.__objOrientation = {};\\r\\n\\t\\tthis.__arrDefault = [];\\r\\n\\t\\tthis.__arrOverride = [];\\r\\n\\t\\tthis.__arrRelationship = [];\\r\\n\\t\\tthis.__relationshipID = 0;\\r\\n\\t\\tthis.__extraFiles = {};\\r\\n\\t\\tthis.__arrChildren = [];\\r\\n\\t\\tthis.__pageSection = null;\\r\\n\\t\\tthis.__styles = null;\\r\\n\\t\\tthis.__enableChunk = true;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.process = function()\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar objPromise = new Promise(function(resolve,reject)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar mimeType = \\\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\\\";\\r\\n\\t\\t\\tvar zip = new NSZip();\\r\\n\\t\\t\\tself.__save(zip).then(function(){\\r\\n\\t\\t\\t\\tzip.downloadFile(self.__setting.fileName,mimeType);\\r\\n\\t\\t\\t\\tresolve(true);\\r\\n\\t\\t\\t}).catch(function(error){\\r\\n\\t\\t\\t\\treject(error);\\r\\n\\t\\t\\t});\\r\\n\\t\\t});\\r\\n\\t\\treturn objPromise;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.addSection = function()\\r\\n\\t{\\r\\n\\t\\tthis.__enableChunk = false;\\r\\n\\t\\tvar section = new Section(this);\\r\\n\\t    this.__arrChildren.push(section)\\r\\n\\t    return section;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.addParagraph = function(option)\\r\\n\\t{\\r\\n\\t\\tthis.__enableChunk = false;\\r\\n\\t\\tvar paragraph = new Paragraph(this,option);\\r\\n\\t    this.__arrChildren.push(paragraph)\\r\\n\\t    return paragraph;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.addTable = function(option)\\r\\n\\t{\\r\\n\\t\\tthis.__enableChunk = false;\\r\\n\\t\\tvar table = new Table(this,option);\\r\\n\\t    this.__arrChildren.push(table)\\r\\n\\t    return table;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.addHeader = function(type)\\r\\n\\t{\\r\\n\\t\\t//this.__enableChunk = false;\\r\\n\\t\\tvar header = this.__pageSection.addHeader(type);\\r\\n\\t    return header;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.addFooter = function(type)\\r\\n\\t{\\r\\n\\t\\t//this.__enableChunk = false;\\r\\n\\t\\tvar footer = this.__pageSection.addFooter(type);\\r\\n\\t    return footer;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.styles = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof Styles)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__styles = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__styles && (this.__styles = new Styles(this,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__styles;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.getPageSection = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__pageSection;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__initialize = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__config)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config = {};\\r\\n\\t\\t}\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__exportUtil = new ExportUtil(this.util);\\r\\n\\t\\tthis.__setting = {\\r\\n\\t\\t\\tfileName: this.__config[\\\"fileName\\\"] || \\\"download\\\",\\r\\n\\t\\t\\thtmlSetting: this.__config[\\\"htmlSetting\\\"],\\r\\n\\t\\t\\tprintSetting: this.__config[\\\"printSetting\\\"],\\r\\n\\t\\t\\tstyles: this.__config[\\\"styles\\\"],\\r\\n\\t\\t};\\r\\n\\t\\tthis.__setHtmlSetting();\\r\\n\\t\\tthis.__setPrintSetting();\\r\\n\\t\\tthis.__initMargins();\\r\\n\\t\\tthis.__initOrientation();\\r\\n\\t\\tthis.__pageSection = new Section(this);\\r\\n\\t\\tif(this.__setting.fileName.indexOf(\\\".\\\") === -1) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setting.fileName = this.__setting.fileName + \\\".docx\\\";\\r\\n        }\\r\\n\\t\\tvar arrStyles = this.__getDefaultStyle();\\r\\n\\t\\tvar styles = this.__setting.styles || {};\\r\\n\\t\\tif(styles.styles && styles.styles.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrStyles = arrStyles.concat(styles.styles);\\r\\n\\t\\t}\\r\\n\\t\\tstyles.styles = arrStyles;\\r\\n\\t\\tthis.styles(styles);\\r\\n\\t};\\r\\n\\t\\r\\n\\t//by default TableNormal and TableGrid are available for table\\r\\n\\tNSDocxExport.prototype.__getDefaultStyle = function()\\r\\n\\t{\\r\\n\\t\\tvar arrDefault = [];\\r\\n\\t\\tvar tblNormal = {\\r\\n\\t            id: \\\"TableNormal\\\",\\r\\n\\t            type: \\\"table\\\",\\r\\n\\t            name: \\\"Normal Table\\\",\\r\\n\\t            basedOn: \\\"Normal\\\",\\r\\n\\t            uiPriority: \\\"99\\\",\\r\\n\\t            semiHidden: true,\\r\\n\\t            unhideWhenUsed: true,\\r\\n\\t            quickFormat: true,\\r\\n\\t            table: {\\r\\n\\t            \\tcellMargin: { top: {width: 0,type: \\\"dxa\\\"}, \\r\\n\\t            \\t\\t\\t\\t  left: {width: 108,type: \\\"dxa\\\"},\\r\\n\\t            \\t\\t\\t\\t  bottom: {width: 0,type: \\\"dxa\\\"}, \\r\\n\\t            \\t\\t\\t\\t  right: {width: 108,type: \\\"dxa\\\"}, \\r\\n\\t            \\t\\t\\t\\t},\\r\\n\\t            },\\r\\n\\t        };\\r\\n\\t\\tarrDefault.push(tblNormal);\\r\\n\\t\\tvar tblGrid = {\\r\\n\\t            id: \\\"TableGrid\\\",\\r\\n\\t            type: \\\"table\\\",\\r\\n\\t            name: \\\"Table Grid\\\",\\r\\n\\t            basedOn: \\\"TableNormal\\\",\\r\\n\\t            uiPriority: \\\"59\\\",\\r\\n\\t            paragraph:{spacing: { after: 0 },},\\r\\n\\t            table: {\\r\\n\\t            \\tborders: {top: {color: \\\"auto\\\",space: 0,size: 4,value: \\\"single\\\"},\\r\\n\\t            \\t\\t\\t  left: {color: \\\"auto\\\",space: 0,size: 4,value: \\\"single\\\"},\\r\\n\\t            \\t\\t\\t  bottom: {color: \\\"auto\\\",space: 0,size: 4,value: \\\"single\\\"},\\r\\n\\t            \\t\\t\\t  right: {color: \\\"auto\\\",space: 0,size: 4,value: \\\"single\\\"},\\r\\n\\t            \\t\\t\\t  insideH: {color: \\\"auto\\\",space: 0,size: 4,value: \\\"single\\\"},\\r\\n\\t            \\t\\t\\t  insideV: {color: \\\"auto\\\",space: 0,size: 4,value: \\\"single\\\"},\\r\\n\\t            \\t\\t\\t },\\r\\n\\t            \\tcellMargin: { top: {width: 0,type: \\\"dxa\\\"}, \\r\\n\\t            \\t\\t\\t\\t  left: {width: 108,type: \\\"dxa\\\"},\\r\\n\\t            \\t\\t\\t\\t  bottom: {width: 0,type: \\\"dxa\\\"}, \\r\\n\\t            \\t\\t\\t\\t  right: {width: 108,type: \\\"dxa\\\"}, \\r\\n\\t            \\t\\t\\t\\t},\\r\\n\\t            },\\r\\n\\t        };\\r\\n\\t\\tarrDefault.push(tblGrid);\\r\\n\\t\\treturn arrDefault;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__setPrintSetting  = function()\\r\\n\\t{\\r\\n\\t\\tvar printSetting = this.__setting.printSetting || {};\\r\\n\\t\\tthis.__setting.printSetting = {\\r\\n\\t\\t\\t\\torientation: printSetting[\\\"orientation\\\"] || \\\"portrait\\\",\\r\\n\\t\\t\\t\\tmargins: printSetting[\\\"margins\\\"]\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__initOrientation = function()\\r\\n\\t{\\r\\n\\t\\tthis.__objOrientation = {landscape:{width: 16838,height: 11906,orientation: \\\"landscape\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  portrait:{width: 11906,height: 16838,orientation: \\\"portrait\\\"},\\r\\n\\t\\t\\t\\t\\t\\t };\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__initMargins = function()\\r\\n\\t{\\r\\n\\t\\t/*var margins = this.__setting.printSetting.margins;\\r\\n\\t\\tif(margins)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setting.printSetting.margins = {\\r\\n\\t\\t\\t\\t\\t top: this.util.isUndefinedOrNull(margins[\\\"top\\\"]) ? null : parseInt(margins[\\\"top\\\"]),\\r\\n\\t\\t\\t\\t     right: this.util.isUndefinedOrNull(margins[\\\"right\\\"]) ? null : parseInt(margins[\\\"right\\\"]),\\r\\n\\t\\t\\t\\t     bottom: this.util.isUndefinedOrNull(margins[\\\"bottom\\\"]) ? null : parseInt(margins[\\\"bottom\\\"]),\\r\\n\\t\\t\\t\\t     left: this.util.isUndefinedOrNull(margins[\\\"left\\\"]) ? null : parseInt(margins[\\\"left\\\"]),\\r\\n\\t\\t\\t\\t     header: this.util.isUndefinedOrNull(margins[\\\"header\\\"]) ? null : parseInt(margins[\\\"header\\\"]),\\r\\n\\t\\t\\t\\t     footer: this.util.isUndefinedOrNull(margins[\\\"footer\\\"]) ? null : parseInt(margins[\\\"footer\\\"]),\\r\\n\\t\\t\\t\\t     gutter: this.util.isUndefinedOrNull(margins[\\\"gutter\\\"]) ? null: parseInt(margins[\\\"gutter\\\"]),\\t\\r\\n\\t\\t\\t};\\r\\n\\t\\t}*/\\r\\n\\t\\tvar margins = this.__setting.printSetting.margins || {};\\r\\n\\t\\tthis.__setting.printSetting.margins = {\\r\\n\\t\\t\\t top: this.util.isUndefinedOrNull(margins[\\\"top\\\"]) ? 1440 : parseInt(margins[\\\"top\\\"]),\\r\\n\\t\\t     right: this.util.isUndefinedOrNull(margins[\\\"right\\\"]) ? 1440 : parseInt(margins[\\\"right\\\"]),\\r\\n\\t\\t     bottom: this.util.isUndefinedOrNull(margins[\\\"bottom\\\"]) ? 1440 : parseInt(margins[\\\"bottom\\\"]),\\r\\n\\t\\t     left: this.util.isUndefinedOrNull(margins[\\\"left\\\"]) ? 1440 : parseInt(margins[\\\"left\\\"]),\\r\\n\\t\\t     header: this.util.isUndefinedOrNull(margins[\\\"header\\\"]) ? 708 : parseInt(margins[\\\"header\\\"]),\\r\\n\\t\\t     footer: this.util.isUndefinedOrNull(margins[\\\"footer\\\"]) ? 708 : parseInt(margins[\\\"footer\\\"]),\\r\\n\\t\\t     gutter: this.util.isUndefinedOrNull(margins[\\\"gutter\\\"]) ? 0: parseInt(margins[\\\"gutter\\\"]),\\t\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__save = function(zip)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar resolveOtherFiles = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tword.addFile(\\\"document.xml\\\",self.__getDocumentFile());\\r\\n\\t\\t\\tif(self.__styles)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar styleXml = self.__styles.toXml();\\r\\n\\t\\t\\t\\tif(styleXml)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.__addFile(null,\\\"styles.xml\\\",\\\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles\\\",\\\"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml\\\")\\r\\n\\t\\t\\t\\t\\tconsole.log(styleXml);\\r\\n\\t\\t\\t\\t\\tword.addFile(\\\"styles.xml\\\",styleXml);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tword.addFile(\\\"numbering.xml\\\",);\\r\\n\\t\\t\\tvar wordRels = word.addFolder(\\\"_rels\\\");\\r\\n\\t\\t\\twordRels.addFile(\\\"document.xml.rels\\\",self.__getWordRels());\\r\\n\\t\\t\\tzip.addFile(\\\"_rels/.rels\\\", self.__getRels());\\r\\n\\t\\t\\tzip.addFile(\\\"[Content_Types].xml\\\", self.__getContentTypesXml());\\r\\n\\t\\t\\tself.__addExtraFiles.call(self,zip,word);\\r\\n\\t\\t};\\r\\n\\t\\tvar objPromise = null;\\r\\n\\t\\tvar word = zip.addFolder(\\\"word\\\");\\r\\n\\t\\tif(this.__isChunk())\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjPromise = new Promise(function(resolve,reject)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tself.__getHtmlContent(word).then(function(data){\\r\\n\\t\\t\\t\\t\\tif(data)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tself.__addFile(null,\\\"afchunk.mht\\\",\\\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk\\\",\\\"message/rfc822\\\")\\r\\n\\t\\t\\t\\t\\t\\t//self.__arrOverride.push({partName:\\\"/word/afchunk.mht\\\",contentType:\\\"message/rfc822\\\"});\\r\\n\\t\\t\\t\\t\\t\\t//self.__arrRelationship.push({id:\\\"htmlChunk\\\",type:\\\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk\\\",target:\\\"/word/afchunk.mht\\\"});\\r\\n\\t\\t\\t\\t\\t\\tword.addFile(\\\"afchunk.mht\\\",data);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tresolveOtherFiles();\\r\\n\\t\\t\\t\\t\\tresolve(true);\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tobjPromise = new Promise(function(resolve,reject)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tresolveOtherFiles();\\r\\n\\t\\t\\t\\tresolve(true);\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t\\treturn objPromise;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__getContentTypesXml = function()\\r\\n\\t{\\r\\n\\t\\tvar isChunk = this.__isChunk();\\r\\n\\t\\tvar objDefault = {rels:{extension:\\\"rels\\\",contentType:\\\"application/vnd.openxmlformats-package.relationships+xml\\\",isDefault:true},\\r\\n\\t\\t\\t\\t\\t\\t  xml:{extension:\\\"xml\\\",contentType:\\\"application/xml\\\",isDefault:true},\\r\\n\\t\\t\\t\\t\\t\\t  png:{extension:\\\"png\\\",contentType:\\\"image/png\\\",isDefault:!isChunk},\\r\\n\\t\\t\\t\\t\\t\\t  jpeg:{extension:\\\"jpeg\\\",contentType:\\\"image/jpeg\\\",isDefault:!isChunk},\\r\\n\\t\\t\\t\\t\\t\\t  jpg:{extension:\\\"jpg\\\",contentType:\\\"image/jpeg\\\",isDefault:!isChunk},\\r\\n\\t\\t\\t\\t\\t\\t  bmp:{extension:\\\"bmp\\\",contentType:\\\"image/bmp\\\",isDefault:!isChunk},\\r\\n\\t\\t\\t\\t\\t\\t  gif:{extension:\\\"gif\\\",contentType:\\\"image/gif\\\",isDefault:!isChunk}\\r\\n\\t\\t};\\r\\n\\t\\tvar objOverride = {document:{partName:\\\"/word/document.xml\\\",contentType:\\\"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  };\\r\\n\\t\\t\\r\\n\\t\\tvar arrChild = [];\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar key = null;\\r\\n\\t\\tvar count = 0;\\r\\n\\t\\tfor(key in objDefault)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = objDefault[key];\\r\\n\\t\\t\\tif(item.isDefault)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrChild.push(this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\t\\tname: \\\"Default\\\",\\r\\n\\t\\t\\t\\t\\tattributes: {\\\"Extension\\\": item.extension,\\\"ContentType\\\": item.contentType}\\r\\n\\t\\t\\t\\t}));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tfor(count = 0;count < this.__arrDefault.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = objDefault[this.__arrDefault[count]];\\r\\n\\t\\t\\tif(item && !item.isDefault)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrChild.push(this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\t\\tname: \\\"Default\\\",\\r\\n\\t\\t\\t\\t\\tattributes: {\\\"Extension\\\": item.extension,\\\"ContentType\\\": item.contentType}\\r\\n\\t\\t\\t\\t}));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tfor(key in objOverride)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = objOverride[key];\\r\\n\\t\\t\\tarrChild.push(this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\tname: \\\"Override\\\",\\r\\n\\t\\t\\t\\tattributes: {\\\"PartName\\\": item.partName,\\\"ContentType\\\": item.contentType}\\r\\n\\t\\t\\t}));\\r\\n\\t\\t}\\r\\n\\t\\tfor(count = 0;count < this.__arrOverride.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__arrOverride[count];\\r\\n\\t\\t\\tif(item && !item.isDefault)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrChild.push(this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\t\\tname: \\\"Override\\\",\\r\\n\\t\\t\\t\\t\\tattributes: {\\\"PartName\\\": item.partName,\\\"ContentType\\\": item.contentType}\\r\\n\\t\\t\\t\\t}));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__exportUtil.getXML({\\r\\n\\t\\t\\tname: \\\"Types\\\",\\r\\n\\t\\t\\tns: \\\"contentTypes\\\",\\r\\n\\t\\t\\tchildren: arrChild\\r\\n\\t\\t});\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__getRels = function()\\r\\n\\t{\\r\\n\\t\\tvar rels = '<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\\\n ' +\\r\\n\\t\\t'<Relationships xmlns=\\\"http://schemas.openxmlformats.org/package/2006/relationships\\\">\\\\n ' +\\r\\n\\t\\t'<Relationship Id=\\\"Id1\\\" Type=\\\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\\\" Target=\\\"/word/document.xml\\\"/>\\\\n ' +\\r\\n\\t\\t'</Relationships>';\\r\\n\\t\\t\\r\\n\\t\\treturn rels;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__getDocumentFile = function()\\r\\n\\t{\\r\\n\\t\\tvar printSetting = this.__setting.printSetting;\\r\\n\\t\\tvar orientation = printSetting.orientation;\\r\\n\\t\\tif(orientation)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar itemOrient = this.__objOrientation[orientation.toLowerCase()];\\r\\n\\t\\t\\tif(itemOrient)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar pageSize = this.__pageSection.pgSz();\\r\\n\\t\\t\\t\\tpageSize.width(itemOrient.width);\\r\\n\\t\\t\\t\\tpageSize.height(itemOrient.height);\\r\\n\\t\\t\\t\\tpageSize.orientation(itemOrient.orientation);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSDocxExport\\\",\\\"Orientation entered is not valid\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar margins = this.__setting.printSetting.margins;\\r\\n\\t\\tif(margins)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar pageMargins = this.__pageSection.pgMar();\\r\\n\\t\\t\\tpageMargins.top(margins.top);\\r\\n\\t\\t\\tpageMargins.right(margins.right);\\r\\n\\t\\t\\tpageMargins.bottom(margins.bottom);\\r\\n\\t\\t\\tpageMargins.left(margins.left);\\r\\n\\t\\t\\tpageMargins.header(margins.header);\\r\\n\\t\\t\\tpageMargins.footer(margins.footer);\\r\\n\\t\\t\\tpageMargins.gutter(margins.gutter);\\r\\n\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\tvar objDocAttr =  {\\\"xmlns:w\\\":\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\",\\r\\n\\t\\t\\t\\t  \\t\\t   \\\"xmlns:m\\\":\\\"http://schemas.openxmlformats.org/officeDocument/2006/math\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:r\\\":\\\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:wp\\\":\\\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:a\\\":\\\"http://schemas.openxmlformats.org/drawingml/2006/main\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:ns6\\\":\\\"http://schemas.openxmlformats.org/schemaLibrary/2006/main\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:c\\\":\\\"http://schemas.openxmlformats.org/drawingml/2006/chart\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:ns8\\\":\\\"http://schemas.openxmlformats.org/drawingml/2006/chartDrawing\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:dgm\\\":\\\"http://schemas.openxmlformats.org/drawingml/2006/diagram\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:pic\\\":\\\"http://schemas.openxmlformats.org/drawingml/2006/picture\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:ns11\\\":\\\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:dsp\\\":\\\"http://schemas.microsoft.com/office/drawing/2008/diagram\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:ns13\\\":\\\"urn:schemas-microsoft-com:office:excel\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:o\\\":\\\"urn:schemas-microsoft-com:office:office\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:v\\\":\\\"urn:schemas-microsoft-com:vml\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:w10\\\":\\\"urn:schemas-microsoft-com:office:word\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:ns17\\\":\\\"urn:schemas-microsoft-com:office:powerpoint\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:odx\\\":\\\"http://opendope.org/xpaths\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:odc\\\":\\\"http://opendope.org/conditions\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:odq\\\":\\\"http://opendope.org/questions\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:odi\\\":\\\"http://opendope.org/components\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:odgm\\\":\\\"http://opendope.org/SmartArt/DataHierarchy\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:ns24\\\":\\\"http://schemas.openxmlformats.org/officeDocument/2006/bibliography\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:ns25\\\":\\\"http://schemas.openxmlformats.org/drawingml/2006/compatibility\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\\"xmlns:ns26\\\":\\\"http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas\\\"\\r\\n\\t\\t};\\r\\n\\t\\tvar arrBody = [];\\r\\n\\t\\tif(this.__isChunk())\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar id = null;\\r\\n\\t\\t\\tfor(var count = 0;count < this.__arrRelationship.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__arrRelationship[count].target == \\\"afchunk.mht\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tid = this.__arrRelationship[count].id;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(id)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrBody.push(\\\"<w:altChunk r:id=\\\\\\\"\\\" + id + \\\"\\\\\\\" />\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChildren = this.__getWordChildren();\\r\\n\\t\\t\\tarrBody = arrBody.concat(arrChildren);\\r\\n\\t\\t}\\r\\n\\t\\tarrBody.push(this.__pageSection.toXml());\\r\\n\\t\\tvar body = this.__exportUtil.getXML({\\r\\n\\t\\t\\tname: 'w:body',\\r\\n\\t\\t\\tchildren: arrBody\\r\\n\\t\\t});\\r\\n\\t\\tconsole.log(body);\\r\\n\\t\\treturn this.__exportUtil.getXML({\\r\\n\\t\\t\\tname: 'w:document',\\r\\n\\t\\t\\taddXmlPrefix: true,\\r\\n\\t\\t\\tattributes: objDocAttr,\\r\\n\\t\\t\\tchildren: [body]\\r\\n\\t\\t});\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__getWordRels = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar arrChild = [];\\r\\n\\t\\tfor(var count = 0;count < this.__arrRelationship.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__arrRelationship[count];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrChild.push(this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'Relationship',\\r\\n\\t\\t\\t\\t\\tattributes: {'Id': item.id,'Type': item.type,'Target': item.target}\\r\\n\\t\\t\\t\\t}));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar relationships = this.__exportUtil.getXML({\\r\\n\\t\\t\\tname: 'Relationships',\\r\\n\\t\\t\\taddXmlPrefix: true,\\r\\n\\t\\t\\tattributes: {xmlns:\\\"http://schemas.openxmlformats.org/package/2006/relationships\\\"},\\r\\n\\t\\t\\tchildren: arrChild\\r\\n\\t\\t});\\r\\n\\t\\treturn relationships;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__addExtraFiles = function(zip,word)\\r\\n\\t{\\r\\n\\t\\tif(this.__extraFiles && Object.keys(this.__extraFiles).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrFile = [];\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar xml = null;\\r\\n\\t\\t\\tvar file = null;\\r\\n\\t\\t\\tfor(var key in this.__extraFiles)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrFile = this.__extraFiles[key];\\r\\n\\t\\t\\t\\tif(arrFile && arrFile.length)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < arrFile.length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem = arrFile[count];\\r\\n\\t\\t\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tfile = item.file;\\r\\n\\t\\t\\t\\t\\t\\t\\tif(file)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tif(this.util.isString(file))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\txml = file;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\txml = file.toXml();\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tif(xml)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tconsole.log(xml);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tzip.addFile(item.path + item.fileName, xml);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__addFile = function(file,fileType,relationType,overrideType)\\r\\n\\t{\\r\\n\\t\\tvar fileName = fileType;\\r\\n\\t\\tvar rId = null;\\r\\n\\t\\tif(file)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfileName = this.__addExtraFile(fileType,file)\\r\\n\\t\\t}\\r\\n\\t\\tif(fileName)\\r\\n\\t\\t{\\r\\n\\t\\t\\trId = this.__addRelationship(file,relationType,fileName);\\r\\n\\t\\t\\tthis.__addOverride(overrideType,\\\"/word/\\\" + fileName);\\r\\n\\t\\t\\treturn {fileName: fileName,id: rId};\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__addExtraFile = function(fileType,file,path,ext)\\r\\n\\t{\\r\\n\\t\\tif(fileType && file)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfileType = fileType.toLowerCase();\\r\\n\\t\\t\\tif(!this.__extraFiles[fileType])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__extraFiles[fileType] = [];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\text = ext || \\\"xml\\\";\\r\\n\\t\\t\\tpath = path || \\\"word/\\\"\\r\\n\\t\\t\\tvar fileName = fileType + (this.__extraFiles[fileType].length + 1) + \\\".\\\" + ext;\\r\\n\\t\\t\\tthis.__extraFiles[fileType].push({file: file,fileName: fileName,path: path});\\r\\n\\t\\t\\treturn fileName;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__addRelationship = function(file,type,target)\\r\\n\\t{\\r\\n\\t\\tif(type && target)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar id = \\\"rId\\\" + (++this.__relationshipID);\\r\\n\\t\\t\\tthis.__arrRelationship.push({id:id,type:type,target:target});\\r\\n\\t\\t\\treturn id;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__addOverride = function(contentType,partName)\\r\\n\\t{\\r\\n\\t\\tif(contentType && partName)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__arrOverride.push({contentType:contentType,partName:partName});\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__isChunk = function()\\r\\n\\t{\\r\\n\\t\\t//return !(this.__arrChildren && this.__arrChildren.length)\\r\\n\\t\\treturn this.__enableChunk;\\r\\n\\t};\\r\\n\\t\\r\\n\\t/* word related functions */\\r\\n\\tNSDocxExport.prototype.__getWordChildren = function()\\r\\n\\t{\\r\\n\\t\\tvar arrChildren = [];\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar xml = null;\\r\\n\\t\\tvar length = this.__arrChildren.length;\\r\\n\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__arrChildren[count];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isString(item))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrChildren.push(item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\txml = item.toXml();\\r\\n\\t\\t\\t\\t\\tif(xml)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrChildren.push(xml);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn arrChildren;\\r\\n\\t};\\r\\n\\t\\r\\n\\t/* end of word related functions */\\r\\n\\t\\r\\n\\t/* html related functions */\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__setHtmlSetting  = function()\\r\\n\\t{\\r\\n\\t\\tvar htmlSetting = this.__setting.htmlSetting || {};\\r\\n\\t\\tthis.__setting.htmlSetting = {\\r\\n\\t\\t\\t\\telement: htmlSetting[\\\"element\\\"],\\r\\n\\t\\t\\t\\thtml: htmlSetting[\\\"html\\\"],\\r\\n\\t\\t\\t\\thtmlStyle: htmlSetting[\\\"htmlStyle\\\"],\\r\\n\\t\\t\\t\\tpageBreakTag: htmlSetting[\\\"pageBreakTag\\\"],\\r\\n\\t\\t\\t\\tenablePageNumber: Boolean.parse(htmlSetting[\\\"enablePageNumber\\\"]),\\r\\n\\t\\t\\t\\tloopNodesCallback: htmlSetting[\\\"loopNodesCallback\\\"]// should be discouraged as it can be costly operation for large docs \\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__getHtmlContent = function(wordFolder)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar objPromise = new Promise(function(resolve,reject)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar htmlSetting = self.__setting.htmlSetting;\\r\\n\\t\\t\\tif(htmlSetting.element || htmlSetting.html)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar html = htmlSetting.html;\\r\\n\\t\\t\\t\\tif(!html)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar element = self.util.getElement(htmlSetting.element);\\r\\n\\t\\t\\t\\t\\tif(element)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\thtml = element.innerHTML;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tself.util.throwNSError(\\\"NSDocxExport\\\",\\\"Element does not exists as defined in config\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(html)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.__parseImages(html).then(function(objData){\\r\\n\\t\\t\\t\\t\\t\\tif(objData)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\thtml = objData.html;\\r\\n\\t\\t\\t\\t\\t\\t\\tvar arrImages = objData.arrImages;\\r\\n\\t\\t\\t\\t\\t\\t\\tvar styles = htmlSetting.htmlStyle || \\\"\\\";\\r\\n\\t\\t\\t\\t\\t\\t\\tvar startHtml = \\\"\\\";\\r\\n\\t\\t\\t\\t\\t\\t\\tvar endHtml = \\\"\\\";\\r\\n\\t\\t\\t\\t\\t\\t\\tvar extraCSS = \\\"\\\";\\r\\n\\t\\t\\t\\t\\t\\t\\tif(htmlSetting.enablePageNumber)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tstartHtml = \\\"<div class=\\\\\\\"Section1\\\\\\\">\\\";\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tendHtml = \\\"<table id=\\\\\\\"hrdftrtbl\\\\\\\" border=\\\\\\\"1\\\\\\\" cellspacing=\\\\\\\"0\\\\\\\" cellpadding=\\\\\\\"0\\\\\\\"> <tr> <td> <div style=\\\\\\\"mso-element:footer\\\\\\\" id=\\\\\\\"f1\\\\\\\"> <p class=\\\\\\\"MsoFooter\\\\\\\"> <table width=\\\\\\\"100%\\\\\\\" border=\\\\\\\"0\\\\\\\" cellspacing=\\\\\\\"0\\\\\\\" cellpadding=\\\\\\\"0\\\\\\\"> <tr> <td align=\\\\\\\"center\\\\\\\" class=\\\\\\\"footer\\\\\\\"> <g:message code=\\\\\\\"offer.letter.page.label\\\\\\\"/> <span style=\\\\\\\"mso-field-code: PAGE \\\\\\\"></span> of <span style=\\\\\\\"mso-field-code: NUMPAGES \\\\\\\"></span> </td> </tr> </table> </p> </div> </td> </tr> </table> </div>\\\";\\r\\n\\t\\t\\t\\t\\t\\t\\t\\textraCSS = \\\"p.MsoHeader, li.MsoHeader, div.MsoHeader{     margin:0in;     margin-top:.0001pt;     mso-pagination:widow-orphan;     tab-stops:center 3.0in right 6.0in; } p.MsoFooter, li.MsoFooter, div.MsoFooter{     margin:0in 0in 1in 0in;     margin-bottom:.0001pt;     mso-pagination:widow-orphan;     tab-stops:center 3.0in right 6.0in; } .footer {     font-size: 9pt; } @page Section1{     size:8.5in 11.0in;     margin:0.5in 0.5in 0.5in 0.5in;     mso-header-margin:0.5in;     mso-header:h1;     mso-footer:f1;     mso-footer-margin:0.5in;     mso-paper-source:0; } div.Section1{     page:Section1; } table#hrdftrtbl{     margin:0in 0in 0in 9in; }\\\";\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\thtml = startHtml + html + endHtml;\\r\\n\\t\\t\\t\\t\\t\\t\\tif(htmlSetting[\\\"pageBreakTag\\\"])\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\thtml = html.replaceAll(htmlSetting[\\\"pageBreakTag\\\"],\\\"<br clear=all style='mso-special-character:line-break;page-break-before:always'>\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tstyles = styles + extraCSS;\\r\\n\\t\\t\\t\\t\\t\\t\\thtml = self.__getDocHtml(html,arrImages,styles);\\r\\n\\t\\t\\t\\t\\t\\t\\tvar strData = self.__convertHtmlToMht(html);\\r\\n\\t\\t\\t\\t\\t\\t\\tresolve(strData);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tresolve(null);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tresolve(null);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.util.debug(\\\"NSDocxExport\\\",\\\"Element and HTML are not defined in config\\\");\\r\\n\\t\\t\\t\\tresolve(null);\\r\\n\\t\\t\\t}\\r\\n\\t\\t});\\r\\n\\t\\treturn objPromise;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__parseImages = function(html)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar replacerCallback = function(match,contentType,contentEncoding,encodedContent) \\r\\n\\t\\t{\\r\\n\\t\\t      var index = arrImages.length;\\r\\n\\t\\t      var extension = contentType.split('/')[1];\\r\\n\\t\\t      var contentLocation = \\\"file:///C:/fake/image\\\" + index + \\\".\\\" + extension;\\r\\n\\t\\t      arrImages.push(getImageString(contentType,contentEncoding,contentLocation,encodedContent));\\r\\n\\t\\t      return \\\"\\\\\\\"\\\" + contentLocation + \\\"\\\\\\\"\\\";\\r\\n\\t\\t};\\r\\n\\t\\tvar getImageString = function(contentType,contentEncoding,contentLocation,encodedContent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar str = \\\"Content-Type:\\\" + self.__exportUtil.getNonNullString(contentType);\\r\\n\\t\\t\\tstr += self.__exportUtil.newLine + \\\"Content-Transfer-Encoding: \\\" + self.__exportUtil.getNonNullString(contentEncoding);\\r\\n\\t\\t\\tstr += self.__exportUtil.newLine + \\\"Content-Location: \\\" + self.__exportUtil.getNonNullString(contentLocation);\\r\\n\\t\\t\\tstr += self.__exportUtil.newLine + self.__exportUtil.newLine + self.__exportUtil.getNonNullString(encodedContent);\\r\\n\\t\\t\\tstr = \\\"------=mhtDocumentPart\\\" + self.__exportUtil.newLine + str + self.__exportUtil.newLine;\\r\\n\\t\\t\\treturn str;\\r\\n\\t\\t};\\r\\n\\t\\tvar arrImages = [];\\r\\n\\t\\tvar regex = /\\\"data:(\\\\w+\\\\/\\\\w+);(\\\\w+),(\\\\S+)\\\"/g;\\r\\n\\t\\tvar objPromise = new Promise(function(resolve,reject)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(html) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__replaceImagesByBase64(html).then(function(paramHtml){\\r\\n\\t\\t\\t\\t\\thtml = paramHtml;\\r\\n\\t\\t\\t\\t\\tif (!/<img/g.test(html)) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tresolve({html: html,arrImages: arrImages});\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\thtml = html.replace(regex,replacerCallback);\\r\\n\\t\\t\\t\\t\\t\\tresolve({html: html,arrImages: arrImages});\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tresolve(null);\\r\\n\\t\\t\\t}\\r\\n\\t\\t});\\r\\n\\t\\treturn objPromise;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__replaceImagesByBase64 = function(html)\\r\\n\\t{\\r\\n\\t\\tvar parser = new DOMParser();\\r\\n\\t\\tvar tempDoc = parser.parseFromString(html,\\\"text/html\\\");\\r\\n\\t\\tvar arrImages = tempDoc.querySelectorAll(\\\"img\\\");\\r\\n\\t\\tvar length = arrImages.length;\\r\\n\\t\\tvar resolved = 0;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar objPromise = new Promise(function(resolve,reject)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar increaseResolved = function()\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tresolved++;\\r\\n\\t\\t\\t\\t\\tif(resolved == length)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tresolve(tempDoc.getElementsByTagName(\\\"html\\\")[0].outerHTML);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar img = arrImages[count];\\r\\n\\t\\t\\t\\t\\tvar src = img.getAttribute(\\\"src\\\");\\r\\n\\t\\t\\t\\t\\tif(!self.util.isBase64String(src))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar callback = function(paramImg,base64,orignalSrc,hasError,errorDetails)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t//orignalSrc can be src or image itself\\r\\n\\t\\t\\t\\t\\t\\t\\t//paramImg is always giving last image in the outer loop so that is why looping orignalSrc to find the image\\r\\n\\t\\t\\t\\t\\t\\t\\tif(base64)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar tempImg = null;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tfor(var tempCount = 0;tempCount < length;tempCount++)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\ttempImg = arrImages[tempCount];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif(tempImg == orignalSrc || tempImg.getAttribute(\\\"src\\\") == orignalSrc)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(hasError)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tself.util.warning(\\\"NSDocxExport\\\",\\\"The image with source \\\" + tempImg.getAttribute(\\\"src\\\") + \\\" has issues.So it is getting deleted.The error detials are :: \\\" + errorDetails);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(tempImg.parentNode)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttempImg.parentNode.removeChild(tempImg);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttempImg.setAttribute(\\\"src\\\",base64);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tincreaseResolved();\\r\\n\\t\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\t\\tif(self.util.isSVGString(src))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tself.util.convertSvgToBase64(src,callback);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t//sending img and not src as we have to also pass the width\\r\\n\\t\\t\\t\\t\\t\\t\\t//this.util.convertImageToBase64(src,callback);\\r\\n\\t\\t\\t\\t\\t\\t\\tself.util.convertImageToBase64(img,true).then(function(item){\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tcallback(img,item.base64,item.param,item.hasError,item.errorDetails);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tincreaseResolved();\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tincreaseResolved();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tresolve(tempDoc.getElementsByTagName(\\\"html\\\")[0].outerHTML);\\r\\n\\t\\t\\t}\\r\\n\\t\\t});\\r\\n\\t\\treturn objPromise;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__getDocHtml = function(html,arrImages,styles)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tfunction addStyle(paramStyle) \\r\\n\\t\\t{ \\r\\n            var css = doc.createElement(\\\"style\\\"); \\r\\n            css.setAttribute(\\\"id\\\",\\\"styleNSDocxExport\\\"); \\r\\n            css.setAttribute(\\\"type\\\",\\\"text/css\\\"); \\r\\n            if(css.styleSheet)\\r\\n            {\\r\\n            \\tcss.styleSheet.cssText = styles; \\r\\n            }\\r\\n            else\\r\\n            {\\r\\n            \\tcss.appendChild(doc.createTextNode(styles));\\r\\n            }\\r\\n            doc.getElementsByTagName(\\\"head\\\")[0].appendChild(css); \\r\\n        };\\r\\n        function loopElements()\\r\\n        {\\r\\n        \\tif(self.__setting.htmlSetting.loopNodesCallback)\\r\\n        \\t{\\r\\n        \\t\\tvar callback = self.__setting.htmlSetting.loopNodesCallback;\\r\\n        \\t\\tvar arrElement = doc.querySelectorAll(\\\"body *\\\");\\r\\n        \\t\\tvar length = arrElement.length;\\r\\n        \\t\\tfor(var count = 0;count < length;count++)\\r\\n        \\t\\t{\\r\\n        \\t\\t\\tcallback(arrElement[count]);\\r\\n        \\t\\t}\\r\\n        \\t}\\r\\n        };\\r\\n        var parser = new DOMParser();\\r\\n    \\tvar doc = parser.parseFromString(html, \\\"text/html\\\");\\r\\n    \\tloopElements();\\r\\n    \\tif(styles)\\r\\n    \\t{\\r\\n    \\t\\taddStyle(styles);\\r\\n    \\t}\\r\\n\\t\\tvar content = doc.getElementsByTagName(\\\"html\\\")[0].outerHTML;\\r\\n\\t\\tcontent = content.replace(/\\\\=/g, '=3D');\\r\\n\\t\\tvar strImages = (arrImages && arrImages.length) ? arrImages.join(\\\"\\\") : \\\"\\\";\\r\\n\\t\\tcontent += this.__exportUtil.newLine + this.__exportUtil.newLine + this.__exportUtil.getNonNullString(strImages);\\r\\n\\t\\treturn content;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDocxExport.prototype.__convertHtmlToMht = function(html)\\r\\n\\t{\\r\\n\\t\\tvar mimeTypeToAdd = 'MIME-Version: 1.0\\\\nContent-Type: multipart/related;\\\\n    type=\\\"text/html\\\";\\\\n    boundary=\\\"----=mhtDocumentPart\\\"\\\\nX-MimeOLE: Produced By Microsoft MimeOLE V6.1.7601.17609\\\\n\\\\nThis is a multi-part message in MIME format.\\\\n\\\\n------=mhtDocumentPart\\\\nContent-Type: text/html;\\\\n    charset=\\\"utf-8\\\"\\\\nContent-Transfer-Encoding: quoted-printable\\\\nContent-Location: file://\\\\\\\\\\\\\\\\fake\\\\\\\\document.html\\\\n\\\\n';\\r\\n\\t    var endHtml = this.__exportUtil.newLine + this.__exportUtil.newLine + \\\"------=mhtDocumentPart--\\\" + this.__exportUtil.newLine;\\r\\n\\t    return mimeTypeToAdd + html + endHtml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t/* end of html related functions */\\r\\n\\t\\r\\n\\tvar BaseElement = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tBaseElement.prototype.init = function(docxRef)\\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__docxRef = docxRef;\\r\\n\\t\\tthis.__exportUtil = new ExportUtil(this.util);\\r\\n\\t\\tthis.__children = [];\\r\\n\\t};\\r\\n\\t\\r\\n\\tBaseElement.prototype.getChildrenForXml = function()\\r\\n\\t{\\r\\n\\t\\tvar arrChildren = [];\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar xml = null;\\r\\n\\t\\tvar length = this.__children.length;\\r\\n\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__children[count];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isString(item))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrChildren.push(item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\txml = item.toXml.call(item);\\r\\n\\t\\t\\t\\t\\tif(xml)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrChildren.push(xml);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn arrChildren;\\r\\n\\t};\\r\\n\\t\\r\\n\\tBaseElement.prototype.toXml = function(xmlTag,attributes)\\r\\n\\t{\\r\\n\\t\\tvar arrChildren = this.getChildrenForXml();\\r\\n\\t\\tvar item = {name: xmlTag};\\r\\n\\t\\tif(arrChildren && arrChildren.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem.children = arrChildren;\\r\\n\\t\\t}\\r\\n\\t\\tif(attributes && Object.keys(attributes).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem.attributes = attributes;\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = this.__exportUtil.getXML(item);\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPstyles.php\\r\\n\\tvar Styles = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__docDefaults = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,Styles);\\r\\n\\tStyles.prototype.constructor = Styles;\\r\\n\\tNSDocxExport.prototype.Styles = Styles;\\r\\n\\t\\r\\n\\tStyles.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(option.default)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.setDefaultStyle(option.default);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.styles)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrStyle = option.styles;\\r\\n\\t\\t\\t\\tif(!this.util.isArray(arrStyle) && this.util.isObject(arrStyle))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrStyle = [arrStyle];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar style = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrStyle.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstyle = arrStyle[count];\\r\\n\\t\\t\\t\\t\\tif(style)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.addStyle(style);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tStyles.prototype.setDefaultStyle = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof DefaultStyle)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__docDefaults = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__docDefaults && (this.__docDefaults = new DefaultStyle(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__docDefaults;\\r\\n\\t};\\r\\n\\t\\r\\n\\tStyles.prototype.addStyle = function(option)\\r\\n\\t{\\r\\n\\t\\tvar style = new Style(this.__docxRef,option);\\r\\n\\t\\tthis.__children.push(style);\\r\\n\\t\\treturn style;\\r\\n\\t};\\r\\n\\t\\r\\n\\tStyles.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__docDefaults)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__children.push(this.__docDefaults);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar attributes = {\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:mc\\\": \\\"http://schemas.openxmlformats.org/markup-compatibility/2006\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:r\\\": \\\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\\\",\\r\\n\\t\\t            \\\"xmlns:w\\\": \\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\",\\r\\n\\t\\t            \\\"xmlns:w14\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordml\\\",\\r\\n\\t\\t            \\\"xmlns:w15\\\": \\\"http://schemas.microsoft.com/office/word/2012/wordml\\\",\\r\\n\\t\\t            \\\"xmlns:Ignorable\\\": \\\"w14 w15\\\"\\r\\n\\t            };\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:styles\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPstyleDefaults.php\\r\\n\\tvar DefaultStyle = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__paraDefault = null;\\r\\n\\t\\tthis.__textDefault = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,DefaultStyle);\\r\\n\\tDefaultStyle.prototype.constructor = DefaultStyle;\\r\\n\\tNSDocxExport.prototype.DefaultStyle = DefaultStyle;\\r\\n\\t\\r\\n\\tDefaultStyle.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(option.paragraph)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.setParaStyle(option.paragraph);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.text)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.setTextStyle(option.text);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tDefaultStyle.prototype.setParaStyle = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof ParagraphFormat)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__paraDefault = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__paraDefault && (this.__paraDefault = new ParagraphFormat(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__paraDefault;\\r\\n\\t};\\r\\n\\t\\r\\n\\tDefaultStyle.prototype.setTextStyle = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof RunFormat)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__textDefault = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__textDefault && (this.__textDefault = new RunFormat(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__textDefault;\\r\\n\\t};\\r\\n\\t\\r\\n\\tDefaultStyle.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar childXml = null;\\r\\n\\t\\tif(this.__paraDefault)\\r\\n\\t\\t{\\r\\n\\t\\t\\tchildXml = this.__paraDefault.toXml();\\r\\n\\t\\t\\tchildXml = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\t\\tname: \\\"w:pPrDefault\\\",\\r\\n\\t\\t\\t\\t\\tchildren: [childXml],\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\tthis.__children.push(childXml);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__textDefault)\\r\\n\\t\\t{\\r\\n\\t\\t\\tchildXml = this.__textDefault.toXml();\\r\\n\\t\\t\\tchildXml = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\t\\tname: \\\"w:rPrDefault\\\",\\r\\n\\t\\t\\t\\t\\tchildren: [childXml],\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\tthis.__children.push(childXml);\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:docDefaults\\\");\\r\\n\\t\\t\\tconsole.log(xml);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPstyle.php\\r\\n\\t//http://officeopenxml.com/WPstyleGenProps.php\\r\\n\\tvar Style = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__objAttr = {type: {value:null, method:\\\"type\\\" },\\r\\n\\t\\t\\t\\t\\t\\t  styleId: {value:null, method:\\\"styleId\\\" },\\r\\n\\t\\t\\t\\t\\t\\t  default: {value:null, method:\\\"default\\\" },\\r\\n\\t\\t\\t\\t\\t\\t  customStyle: {value:null, method:\\\"customStyle\\\" }\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\tthis.__objProp = {name: {value:null, method:\\\"name\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  basedOn: {value:null, method:\\\"basedOn\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  next: {value:null, method:\\\"next\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  link: {value:null, method:\\\"link\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  uiPriority: {value:null, method:\\\"uiPriority\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  hidden: {value:null, method:\\\"hidden\\\",isEmpty: true},\\r\\n\\t\\t\\t\\t\\t\\t  locked: {value:null, method:\\\"locked\\\",isEmpty: true},\\r\\n\\t\\t\\t\\t\\t\\t  semiHidden: {value:null, method:\\\"semiHidden\\\",isEmpty: true},\\r\\n\\t\\t\\t\\t\\t\\t  unhideWhenUsed: {value:null, method:\\\"unhideWhenUsed\\\",isEmpty: true},\\r\\n\\t\\t\\t\\t\\t\\t  qFormat: {value:null, method:\\\"quickFormat\\\",isEmpty: true},\\r\\n\\t\\t\\t\\t\\t\\t  autoRedefine: {value:null, method:\\\"autoRedefine\\\",isEmpty: true},\\r\\n\\t\\t\\t\\t\\t\\t  pPr: {value:null, method:\\\"paragraphFormat\\\", className: \\\"ParagraphFormat\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  rPr: {value:null, method:\\\"runFormat\\\", className: \\\"RunFormat\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  tblPr: {value:null, method:\\\"tableFormat\\\", className: \\\"TableFormat\\\"},\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.__exportUtil.addSingleValueFunctions(this,this.__objAttr,null,docxRef);\\r\\n\\t\\tvar propCallback = function(value,paramItem,key,paramInstance)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(paramItem.className)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(value && value instanceof NSDocxExport.prototype[paramItem.className])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tparamItem.value = value;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t!paramItem.value && (paramItem.value = new NSDocxExport.prototype[paramItem.className](docxRef,value));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparamItem.value = value;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn paramItem.value;\\r\\n\\t\\t};\\r\\n\\t\\tthis.__exportUtil.addFunctions(this,this.__objProp,null,propCallback,docxRef);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,Style);\\r\\n\\tStyle.prototype.constructor = Style;\\r\\n\\tNSDocxExport.prototype.Style = Style;\\r\\n\\t\\r\\n\\tStyle.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(option.id)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.styleId(option.id);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.type)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.type(option.type);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.isDefault)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.default(option.isDefault);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.customStyle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.customStyle(option.customStyle);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.name)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.name(option.name);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.basedOn)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.basedOn(option.basedOn);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.next)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.next(option.next);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.link)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.link(option.link);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.uiPriority)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.uiPriority(option.uiPriority);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.hidden)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.hidden(option.hidden);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.locked)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.locked(option.locked);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.semiHidden)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.semiHidden(option.semiHidden);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.unhideWhenUsed)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.unhideWhenUsed(option.unhideWhenUsed);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.quickFormat)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.quickFormat(option.quickFormat);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.autoRedefine)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.autoRedefine(option.autoRedefine);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.paragraph)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.paragraphFormat(option.paragraph);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.run)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.runFormat(option.run);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.table)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.tableFormat(option.table);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tStyle.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar key = null;\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(key in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objProp[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item.value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(item.className)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__children.push(item.value);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(item.isEmpty)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__children.push(\\\"<w:\\\" + key + \\\"/>\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__children.push(this.__exportUtil.getValXml(item.value,\\\"w:\\\" + key));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tfor(key in this.__objAttr)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objAttr[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item.value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + key] = item.value;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:style\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPheaders.php\\r\\n\\tvar Header = function(docxRef)\\r\\n\\t{\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.__fileName = null;\\r\\n\\t\\tthis.__idRef = null;\\r\\n\\t\\tvar item = this.__docxRef.__addFile(this,\\\"header\\\",\\\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header\\\",\\\"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml\\\");\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__fileName = item.fileName;\\r\\n\\t\\t\\tthis.__idRef = item.id;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,Header);\\r\\n\\tHeader.prototype.constructor = Header;\\r\\n\\tNSDocxExport.prototype.Header = Header;\\r\\n\\t\\r\\n\\tHeader.prototype.getRefID = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__idRef;\\r\\n\\t};\\r\\n\\t\\r\\n\\tHeader.prototype.getFileName = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__fileName;\\r\\n\\t};\\r\\n\\t\\r\\n\\tHeader.prototype.addParagraph = function(option)\\r\\n\\t{\\r\\n\\t\\t var para = new Paragraph(this.__docxRef,option);\\r\\n\\t\\t this.__children.push(para);\\r\\n\\t\\t return para;\\r\\n\\t};\\r\\n\\t\\r\\n\\tHeader.prototype.addTable = function(option)\\r\\n\\t{\\r\\n\\t\\t var table = new Table(this.__docxRef,option);\\r\\n\\t\\t this.__children.push(table);\\r\\n\\t\\t return table;\\r\\n\\t};\\r\\n\\t\\r\\n\\tHeader.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar attributes = {\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:wpc\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:mc\\\": \\\"http://schemas.openxmlformats.org/markup-compatibility/2006\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:o\\\": \\\"urn:schemas-microsoft-com:office:office\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:r\\\": \\\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:m\\\": \\\"http://schemas.openxmlformats.org/officeDocument/2006/math\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:v\\\": \\\"urn:schemas-microsoft-com:vml\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:wp14\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:wp\\\": \\\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:w10\\\": \\\"urn:schemas-microsoft-com:office:word\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:w\\\": \\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:w14\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordml\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:w15\\\": \\\"http://schemas.microsoft.com/office/word/2012/wordml\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:wpg\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:wpi\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:wne\\\": \\\"http://schemas.microsoft.com/office/word/2006/wordml\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:wps\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:cx\\\": \\\"http://schemas.microsoft.com/office/drawing/2014/chartex\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:cx1\\\": \\\"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:cx2\\\": \\\"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex\\\",\\r\\n\\t                \\\"xmlns:cx3\\\": \\\"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex\\\",\\r\\n\\t                \\\"xmlns:cx4\\\": \\\"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex\\\",\\r\\n\\t                \\\"xmlns:cx5\\\": \\\"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex\\\",\\r\\n\\t                \\\"xmlns:cx6\\\": \\\"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex\\\",\\r\\n\\t                \\\"xmlns:cx7\\\": \\\"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex\\\",\\r\\n\\t                \\\"xmlns:cx8\\\": \\\"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex\\\",\\r\\n\\t                \\\"xmlns:w16cid\\\": \\\"http://schemas.microsoft.com/office/word/2016/wordml/cid\\\",\\r\\n\\t                \\\"xmlns:w16se\\\": \\\"http://schemas.microsoft.com/office/word/2015/wordml/symex\\\",\\r\\n\\t            };\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:hdr\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPfooters.php\\r\\n\\tvar Footer = function(docxRef)\\r\\n\\t{\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.__fileName = null;\\r\\n\\t\\tthis.__idRef = null;\\r\\n\\t\\tvar item = this.__docxRef.__addFile(this,\\\"footer\\\",\\\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer\\\",\\\"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml\\\");\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__fileName = item.fileName;\\r\\n\\t\\t\\tthis.__idRef = item.id;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,Footer);\\r\\n\\tFooter.prototype.constructor = Footer;\\r\\n\\tNSDocxExport.prototype.Footer = Footer;\\r\\n\\t\\r\\n\\tFooter.prototype.getRefID = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__idRef;\\r\\n\\t};\\r\\n\\t\\r\\n\\tFooter.prototype.getFileName = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__fileName;\\r\\n\\t};\\r\\n\\t\\r\\n\\tFooter.prototype.addParagraph = function(option)\\r\\n\\t{\\r\\n\\t\\t var para = new Paragraph(this.__docxRef,option);\\r\\n\\t\\t this.__children.push(para);\\r\\n\\t\\t return para;\\r\\n\\t};\\r\\n\\t\\r\\n\\tFooter.prototype.addTable = function(option)\\r\\n\\t{\\r\\n\\t\\t var table = new Table(this.__docxRef,option);\\r\\n\\t\\t this.__children.push(table);\\r\\n\\t\\t return table;\\r\\n\\t};\\r\\n\\t\\r\\n\\tFooter.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar attributes = {\\r\\n\\t\\t\\t\\t\\\"xmlns:wpc\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\\\",\\r\\n                \\\"xmlns:mc\\\": \\\"http://schemas.openxmlformats.org/markup-compatibility/2006\\\",\\r\\n                \\\"xmlns:o\\\": \\\"urn:schemas-microsoft-com:office:office\\\",\\r\\n                \\\"xmlns:r\\\": \\\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\\\",\\r\\n                \\\"xmlns:m\\\": \\\"http://schemas.openxmlformats.org/officeDocument/2006/math\\\",\\r\\n                \\\"xmlns:v\\\": \\\"urn:schemas-microsoft-com:vml\\\",\\r\\n                \\\"xmlns:wp14\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\\\",\\r\\n                \\\"xmlns:wp\\\": \\\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\\\",\\r\\n                \\\"xmlns:w10\\\": \\\"urn:schemas-microsoft-com:office:word\\\",\\r\\n                \\\"xmlns:w\\\": \\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\",\\r\\n                \\\"xmlns:w14\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordml\\\",\\r\\n                \\\"xmlns:w15\\\": \\\"http://schemas.microsoft.com/office/word/2012/wordml\\\",\\r\\n                \\\"xmlns:wpg\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\\\",\\r\\n                \\\"xmlns:wpi\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\\\",\\r\\n                \\\"xmlns:wne\\\": \\\"http://schemas.microsoft.com/office/word/2006/wordml\\\",\\r\\n                \\\"xmlns:wps\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\\\",\\r\\n            }\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:ftr\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPnumbering.php\\r\\n\\tvar Numbering = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__abstractNumID = 0;\\r\\n\\t\\tthis.__numID = 0;\\r\\n\\t\\tthis.__arrAbstractNum = [];\\r\\n\\t\\tthis.__arrNum = [];\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,Numbering);\\r\\n\\tNumbering.prototype.constructor = Numbering;\\r\\n\\tNSDocxExport.prototype.Numbering = Numbering;\\r\\n\\t\\r\\n\\tNumbering.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.levelOverride(option);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNumbering.prototype.__getAbstractNumID = function(fileRef)\\r\\n\\t{\\r\\n\\t\\tvar retID = this.__abstractNumID;\\r\\n\\t\\tthis.__abstractNumID++;\\r\\n\\t\\treturn retID;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNumbering.prototype.__getNumID = function(fileRef)\\r\\n\\t{\\r\\n\\t\\treturn ++this.__numID; \\r\\n\\t};\\r\\n\\t\\r\\n\\tNumbering.prototype.addAbstractNumber = function(value)\\r\\n\\t{\\r\\n\\t\\tvar abstractNumber = null;\\r\\n\\t\\tif(value && value instanceof AbstractNumbering) \\r\\n\\t\\t{\\r\\n\\t\\t\\tabstractNumber = value\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tabstractNumber = new AbstractNumbering(this.__docxRef,this,value);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__arrAbstractNum.push(abstractNumber);\\r\\n\\t\\tvar number = this.addNumber(null,abstractNumber);\\r\\n\\t\\treturn {abstractNumber: abstractNumber,number: number};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNumbering.prototype.addNumber = function(value,abstractNumber)\\r\\n\\t{\\r\\n\\t\\tvar retValue = null;\\r\\n\\t\\tif(value && value instanceof ConcreteNumbering) \\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = value\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = new ConcreteNumbering(this.__docxRef,this,abstractNumber,value);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__arrNum.push(retValue);\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNumbering.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar attributes = {\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:wpc\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\\\",\\r\\n\\t\\t\\t\\t\\t\\\"xmlns:mc\\\": \\\"http://schemas.openxmlformats.org/markup-compatibility/2006\\\",\\r\\n\\t\\t            \\\"xmlns:o\\\": \\\"urn:schemas-microsoft-com:office:office\\\",\\r\\n\\t\\t            \\\"xmlns:r\\\": \\\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\\\",\\r\\n\\t\\t            \\\"xmlns:m\\\": \\\"http://schemas.openxmlformats.org/officeDocument/2006/math\\\",\\r\\n\\t\\t            \\\"xmlns:v\\\": \\\"urn:schemas-microsoft-com:vml\\\",\\r\\n\\t\\t            \\\"xmlns:wp14\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\\\",\\r\\n\\t\\t            \\\"xmlns:wp\\\": \\\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\\\",\\r\\n\\t\\t            \\\"xmlns:w10\\\": \\\"urn:schemas-microsoft-com:office:word\\\",\\r\\n\\t\\t            \\\"xmlns:w\\\": \\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\",\\r\\n\\t\\t            \\\"xmlns:w14\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordml\\\",\\r\\n\\t\\t            \\\"xmlns:w15\\\": \\\"http://schemas.microsoft.com/office/word/2012/wordml\\\",\\r\\n\\t\\t            \\\"xmlns:wpg\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\\\",\\r\\n\\t\\t            \\\"xmlns:wpi\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingInk\\\",\\r\\n\\t\\t            \\\"xmlns:wne\\\": \\\"http://schemas.microsoft.com/office/word/2006/wordml\\\",\\r\\n\\t\\t            \\\"xmlns:wps\\\": \\\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\\\",\\r\\n\\t\\t            \\\"xmlns:Ignorable\\\": \\\"w14 w15 wp14\\\",\\r\\n            }\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:numbering\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPnumbering.php\\r\\n\\tvar ConcreteNumbering = function(docxRef,parent,abstractNum,option)\\r\\n\\t{\\r\\n\\t\\tthis.__lvlOverride = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.__parent = parent;\\r\\n\\t\\tthis.__abstractNum = abstractNum;\\r\\n\\t\\tthis.__id = this.__parent.__getNumID(this);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,ConcreteNumbering);\\r\\n\\tConcreteNumbering.prototype.constructor = ConcreteNumbering;\\r\\n\\tNSDocxExport.prototype.ConcreteNumbering = ConcreteNumbering;\\r\\n\\t\\r\\n\\tConcreteNumbering.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.levelOverride(option);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tConcreteNumbering.prototype.levelOverride = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof NumberingLevel) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__lvlOverride = value\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__lvlOverride && (this.__lvlOverride = new LevelOverride(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__lvlOverride;\\r\\n\\t};\\r\\n\\t\\r\\n\\tConcreteNumbering.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tattributes[\\\"w:numId\\\"] = this.__id;\\r\\n\\t\\tif(this.__abstractNum)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__children.push(\\\"<w:abstractNumId w:val=\\\\\\\"\\\" + this.__abstractNum.getID() + \\\"\\\\\\\"/>\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__lvlOverride)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__children.push(this.__lvlOverride);\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = this.base.toXml.call(this,\\\"w:num\\\",attributes);\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPnumberingOverride.php\\r\\n\\tvar LevelOverride = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__ilvl = null;\\r\\n\\t\\tthis.__lvl = null;\\r\\n\\t\\tthis.__startOverride = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,LevelOverride);\\r\\n\\tLevelOverride.prototype.constructor = LevelOverride;\\r\\n\\tNSDocxExport.prototype.LevelOverride = LevelOverride;\\r\\n\\t\\r\\n\\tLevelOverride.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(option.numberingLevel))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.numberingLevel(option.numberingLevel);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(option.level))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.level(option.level);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(option.startOverride))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.startOverride(option.startOverride);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tLevelOverride.prototype.numberingLevel = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__ilvl = value;\\r\\n\\t\\treturn this.__ilvl;\\r\\n\\t};\\r\\n\\t\\r\\n\\tLevelOverride.prototype.level = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof AbstractNumbering) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__lvl = value\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__lvl && (this.__lvl = new AbstractNumbering(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__lvl;\\r\\n\\t};\\r\\n\\t\\r\\n\\tLevelOverride.prototype.startOverride = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__startOverride = value;\\r\\n\\t\\treturn this.__startOverride;\\r\\n\\t};\\r\\n\\t\\r\\n\\tLevelOverride.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tif(this.util.isUndefinedOrNull(this.__ilvl))\\r\\n\\t\\t{\\r\\n\\t\\t\\tattributes[\\\"w:ilvl\\\"] = this.__ilvl;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__lvl)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__children.push(this.__lvl);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__startOverride)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__children.push(\\\"<w:startOverride w:val=\\\\\\\"\\\" + this.__startOverride + \\\"\\\\\\\"/>\\\");\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = this.base.toXml.call(this,\\\"w:lvlOverride\\\",attributes);\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\t\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPnumberingAbstractNum.php\\r\\n\\tvar AbstractNumbering = function(docxRef,parent,option)\\r\\n\\t{\\r\\n\\t\\tthis.__objAttr = {abstractNumId: {value:null, method:\\\"id\\\",tag:\\\"w:abstractNumId\\\" },\\r\\n\\t\\t\\t\\t  \\t\\t  restartNumberingAfterBreak: {value:null, method:\\\"restartNumberingAfterBreak\\\", tag:\\\"w15:restartNumberingAfterBreak\\\"},\\r\\n\\t\\t};\\r\\n\\t\\tthis.__objProp = {multiLevelType: {value:null, method:\\\"multiLevelType\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  name: {value:null, method:\\\"name\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  numStyleLink: {value:null, method:\\\"numStyleLink\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  styleLink: {value:null, method:\\\"styleLink\\\"},\\r\\n\\t\\t};\\r\\n\\t\\tthis.__arrLevel = [];\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.__exportUtil.addSingleValueFunctions(this,this.__objAttr,null,docxRef);\\r\\n\\t\\tthis.__parent = parent;\\r\\n\\t\\tthis.__id = this.__parent.__getAbstractNumID(this);\\r\\n\\t\\tvar propCallback = function(value,paramItem,key,paramInstance)\\r\\n\\t\\t{\\r\\n\\t\\t\\tparamItem.value = value;\\r\\n\\t\\t\\treturn paramItem.value;\\r\\n\\t\\t};\\r\\n\\t\\tthis.__exportUtil.addFunctions(this,this.__objProp,null,propCallback,docxRef);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,AbstractNumbering);\\r\\n\\tAbstractNumbering.prototype.constructor = AbstractNumbering;\\r\\n\\tNSDocxExport.prototype.AbstractNumbering = AbstractNumbering;\\r\\n\\t\\r\\n\\tAbstractNumbering.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\tthis.abstractNumId(this.__id);\\r\\n\\t\\toption = option || {};\\r\\n\\t\\t!this.util.isUndefinedOrNull(option.restartNumberingAfterBreak) ? this.restartNumberingAfterBreak(option.restartNumberingAfterBreak) : this.restartNumberingAfterBreak(0);\\r\\n\\t\\t!this.util.isUndefinedOrNull(option.multiLevelType) ? this.multiLevelType(option.multiLevelType) : this.multiLevelType(\\\"hybridMultilevel\\\");\\r\\n\\t\\tif(option.name)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.name(option.name);\\r\\n\\t\\t}\\r\\n\\t\\tif(option.numStyleLink)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.numStyleLink(option.numStyleLink);\\r\\n\\t\\t}\\r\\n\\t\\tif(option.styleLink)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.styleLink(option.styleLink);\\r\\n\\t\\t}\\r\\n\\t\\tif(option.levels && option.levels.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < option.levels.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.addLevel(option.levels[count]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tAbstractNumbering.prototype.getID = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__id;\\r\\n\\t};\\r\\n\\t\\r\\n\\tAbstractNumbering.prototype.addLevel = function(value)\\r\\n\\t{\\r\\n\\t\\tvar level = null;\\r\\n\\t\\tif(value && value instanceof NumberingLevel) \\r\\n\\t\\t{\\r\\n\\t\\t\\tlevel = value\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tlevel = new NumberingLevel(this.__docxRef,value);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__arrLevel.push(level);\\r\\n\\t\\treturn level;\\r\\n\\t};\\r\\n\\t\\r\\n\\tAbstractNumbering.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar key = null;\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(key in this.__objAttr)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objAttr[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item.value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(item.tag)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tattributes[item.tag] = item.value;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tattributes[\\\"w:\\\" + key] = item.value;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tfor(key in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objProp[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item.value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__children.push(this.__exportUtil.getValXml(item.value,\\\"w:\\\" + key));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__arrLevel && this.__arrLevel.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < this.__arrLevel.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__children.push(this.__arrLevel[count]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:lvl\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPnumberingLvl.php\\r\\n\\tvar NumberingLevel = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__objAttr = {ilvl: {value:null, method:\\\"level\\\",tag:\\\"w:ilvl\\\" },\\r\\n\\t\\t\\t\\t\\t\\t  tentative: {value:null, method:\\\"tentative\\\", tag:\\\"w15:tentative\\\", isBoolean: true },\\r\\n\\t\\t};\\r\\n\\t\\tthis.__objProp = {start: {value:null, method:\\\"start\\\",attr:\\\"w:val\\\" },\\r\\n\\t\\t\\t\\t\\t\\t  numFmt: {value:null, method:\\\"numberFormat\\\",attr:\\\"w:val\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  lvlText: {value:null, method:\\\"levelText\\\",attr:\\\"w:val\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  lvlJc: {value:null, method:\\\"levelJc\\\",attr:\\\"w:val\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  pPr: {value:null, method:\\\"paragraphFormat\\\", className: \\\"ParagraphFormat\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  rPr: {value:null, method:\\\"runFormat\\\", className: \\\"RunFormat\\\"},\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.__exportUtil.addSingleValueFunctions(this,this.__objAttr,null,docxRef);\\r\\n\\t\\tvar propCallback = function(value,paramItem,key,paramInstance)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(paramItem.className)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(value && value instanceof NSDocxExport.prototype[paramItem.className])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tparamItem.value = value;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t!paramItem.value && (paramItem.value = new NSDocxExport.prototype[paramItem.className](docxRef,value));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparamItem.value = value;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn paramItem.value;\\r\\n\\t\\t};\\r\\n\\t\\tthis.__exportUtil.addFunctions(this,this.__objProp,null,propCallback,docxRef);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,NumberingLevel);\\r\\n\\tNumberingLevel.prototype.constructor = NumberingLevel;\\r\\n\\tNSDocxExport.prototype.NumberingLevel = NumberingLevel;\\r\\n\\t\\r\\n\\tNumberingLevel.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.level(option.level);\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.tentative) ? this.tentative(option.tentative) : this.tentative(true);\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.start) ? this.start(option.start) : this.start(1);\\r\\n\\t\\t\\tif(option.format) \\r\\n\\t\\t\\t{\\r\\n\\t            this.numberFormat(option.format);\\r\\n\\t        }\\r\\n\\t        if(option.text) \\r\\n\\t        {\\r\\n\\t            this.levelText(option.text);\\r\\n\\t        }\\r\\n\\t        !this.util.isUndefinedOrNull(option.alignment) ? this.levelJc(option.alignment) : this.levelJc(\\\"start\\\");\\r\\n\\t        if(option.style)\\r\\n\\t        {\\r\\n\\t        \\tif(option.style.paragraph)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.paragraphFormat(option.paragraph);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(option.run)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.runFormat(option.run);\\r\\n\\t\\t\\t\\t}\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNumberingLevel.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar key = null;\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(key in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objProp[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item.value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(item.className)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__children.push(item.value);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__children.push(this.__exportUtil.getValXml(item.value,\\\"w:\\\" + key));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tfor(key in this.__objAttr)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objAttr[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item.value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(item.tag)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tattributes[item.tag] = (item.isBoolean) ? (Boolean.parse(item.value) ? 1 : 0) : item.value;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tattributes[\\\"w:\\\" + key] = item.value;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:lvl\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtable.php\\r\\n\\tvar Table = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__format = null;\\r\\n\\t\\tthis.__tblGrid = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,Table);\\r\\n\\tTable.prototype.constructor = Table;\\r\\n\\tNSDocxExport.prototype.Table = Table;\\r\\n\\t\\r\\n\\tTable.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\toption = option || {};\\r\\n\\t\\tthis.format(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tTable.prototype.format = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof TableFormat) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__format = value\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__format && (this.__format = new TableFormat(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__format;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTable.prototype.grid = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof TableGrid) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__tblGrid = value\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__tblGrid && (this.__tblGrid = new TableGrid(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__tblGrid;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTable.prototype.addRow = function()\\r\\n\\t{\\r\\n\\t\\tvar row = new TableRow(this.__docxRef);\\r\\n\\t    this.__children.push(row);\\r\\n\\t    return row;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTable.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__tblGrid)\\r\\n\\t    {\\t\\r\\n\\t    \\tthis.__children.unshift(this.__tblGrid);\\r\\n\\t    }\\r\\n\\t    if(this.__format)\\r\\n\\t    {\\t\\r\\n\\t    \\tthis.__children.unshift(this.__format);\\r\\n\\t    }\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:tbl\\\");\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtableCell.php\\r\\n\\tvar TableCell = function(docxRef)\\r\\n\\t{\\r\\n\\t\\tthis.__format = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,TableCell);\\r\\n\\tTableCell.prototype.constructor = TableCell;\\r\\n\\tNSDocxExport.prototype.TableCell = TableCell;\\r\\n\\t\\r\\n\\tTableCell.prototype.format = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof TableCellFormat) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__format = value\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__format && (this.__format = new TableCellFormat(this.__docxRef));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__format;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCell.prototype.addParagraph = function(option)\\r\\n\\t{\\r\\n\\t\\t var para = new Paragraph(this.__docxRef,option);\\r\\n\\t\\t this.__children.push(para);\\r\\n\\t\\t return para;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCell.prototype.addTable = function(option)\\r\\n\\t{\\r\\n\\t\\t var table = new Table(this.__docxRef,option);\\r\\n\\t\\t this.__children.push(table);\\r\\n\\t\\t return table;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCell.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__format)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__children.unshift(this.__format);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:tc\\\");\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtableCellProperties.php\\r\\n\\tvar TableCellFormat = function(docxRef)\\r\\n\\t{\\r\\n\\t\\tthis.__noWrap = false;\\r\\n\\t\\tthis.__objProp = {gridSpan: null,shading: null,tcBorders: null,tcFitText: null,tcMar: null,tcW: null,vAlign: null,vMerge: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,TableCellFormat);\\r\\n\\tTableCellFormat.prototype.constructor = TableCellFormat;\\r\\n\\tNSDocxExport.prototype.TableCellFormat = TableCellFormat;\\r\\n\\t\\r\\n\\tTableCellFormat.prototype.gridSpan = function(value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objProp.gridSpan = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\tname: \\\"w:gridSpan\\\",\\r\\n\\t\\t\\t\\tattributes: {\\\"w:val\\\": value},\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCellFormat.prototype.noWrap = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__noWrap = value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCellFormat.prototype.shading = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof Shading)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objProp.shading = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__objProp.shading && (this.__objProp.shading = new Shading(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp.shading;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCellFormat.prototype.fitText = function(value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objProp.tcFitText = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\tname: \\\"w:tcFitText\\\",\\r\\n\\t\\t\\t\\tattributes: {\\\"w:val\\\": value},\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp.tcFitText;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCellFormat.prototype.margins = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof TableCellMargins)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objProp.tcMar = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__objProp.tcMar && (this.__objProp.tcMar = new TableCellMargins(this.__docxRef));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp.tcMar;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCellFormat.prototype.width = function(width,unitType)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(width))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objProp.tcW = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\tname: \\\"w:tcW\\\",\\r\\n\\t\\t\\t\\tattributes: {\\\"w:type\\\": unitType || \\\"\\\",\\\"w:w\\\": width}\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp.tcW;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCellFormat.prototype.verticalAlign = function(value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objProp.vAlign = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\tname: \\\"w:vAlign\\\",\\r\\n\\t\\t\\t\\tattributes: {\\\"w:val\\\": value}\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp.vAlign;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//value can be continue,restart \\r\\n\\tTableCellFormat.prototype.verticalMerge = function(value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objProp.vMerge = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\tname: \\\"w:vMerge\\\",\\r\\n\\t\\t\\t\\tattributes: {\\\"w:val\\\": value}\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp.vMerge;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCellFormat.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tfor(var key in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(this.__objProp[key]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__children.push(this.__objProp[key]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__noWrap)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__children.push(\\\"<w:noWrap/>\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:tcPr\\\");\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtableCellProperties-Margins.php\\r\\n\\tvar TableCellMargins = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\t//{val: null,sz: null,space: null,color: null}\\r\\n\\t\\t//this.__objProp = {top: null,start: null,bottom: null,end: null};\\r\\n\\t\\t//old doc version uses left and right rather than start and end\\r\\n\\t\\tthis.__objProp = {top: null,left: null,bottom: null,right: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tif(!this.top)\\r\\n\\t\\t{\\r\\n\\t\\t\\toption = option || {};\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tfor(var key in this.__objProp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = this.__objProp[key];\\r\\n\\t\\t\\t\\t(function(item,key)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself[key] = function(width,type)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn self.__setProp(key,width,type);\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\tif(option[key])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar paramItem = option[key];\\r\\n\\t\\t\\t\\t\\t\\tself[key](paramItem.width,paramItem.type);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t})(item,key)\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,TableCellMargins);\\r\\n\\tTableCellMargins.prototype.constructor = TableCellMargins;\\r\\n\\tNSDocxExport.prototype.TableCellMargins = TableCellMargins;\\r\\n\\t\\r\\n\\tTableCellMargins.prototype.setAll = function(color,width,type) \\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tfor(var key in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objProp[key];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis[key](width,type);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCellMargins.prototype.__setProp = function(key,width,type)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(width))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = {w: width,type: type || \\\"dxa\\\"};\\r\\n\\t\\t\\tthis.__objProp[key] = item;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCellMargins.prototype.__xmlProp = function(key,item)\\r\\n\\t{\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(var paramKey in item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item[paramKey]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + paramKey] = item[paramKey];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = this.__exportUtil.getXML({\\r\\n\\t\\t\\tname: \\\"w:\\\" + key,\\r\\n\\t\\t\\tattributes: attributes,\\r\\n\\t\\t});\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCellMargins.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tfor(var key in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objProp[key];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__children.push(this.__xmlProp(key,item));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:tcMar\\\");\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtableRow.php\\r\\n\\tvar TableRow = function(docxRef)\\r\\n\\t{\\r\\n\\t\\tthis.__rowProp = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,TableRow);\\r\\n\\tTableRow.prototype.constructor = TableRow;\\r\\n\\tNSDocxExport.prototype.TableRow = TableRow;\\r\\n\\t\\r\\n\\tTableRow.prototype.format = function(value)\\r\\n\\t{\\r\\n\\t\\t/*if(value && value instanceof TableRowFormat) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__rowProp = value\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__rowProp && (this.__rowProp = new TableRowFormat(this.__docxRef));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__rowProp;*/\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableRow.prototype.addCell = function()\\r\\n\\t{\\r\\n\\t\\t var cell = new TableCell(this.__docxRef);\\r\\n\\t\\t this.__children.push(cell);\\r\\n\\t\\t return cell;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableRow.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__rowProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__children.unshift(this.__rowProp);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:tr\\\");\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtableGrid.php\\r\\n\\tvar TableGrid = function(docxRef)\\r\\n\\t{\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,TableGrid);\\r\\n\\tTableGrid.prototype.constructor = TableGrid;\\r\\n\\tNSDocxExport.prototype.TableGrid = TableGrid;\\r\\n\\t\\r\\n\\tTableGrid.prototype.addColumn = function(value)\\r\\n\\t{\\r\\n\\t\\t var column = new TableGridColumn(this.__docxRef);\\r\\n\\t\\t this.__children.push(column);\\r\\n\\t\\t return column;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableGrid.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:tblGrid\\\");\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtableGrid.php\\r\\n\\tvar TableGridColumn = function(docxRef,width)\\r\\n\\t{\\r\\n\\t\\tthis.__objAttr = {w: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\t!this.util.isUndefinedOrNull(width) && this.width(width);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,TableGridColumn);\\r\\n\\tTableGridColumn.prototype.constructor = TableGridColumn;\\r\\n\\tNSDocxExport.prototype.TableGridColumn = TableGridColumn;\\r\\n\\t\\r\\n\\tTableGridColumn.prototype.width = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"w\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableGridColumn.prototype.__setAttr = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objAttr[key] = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objAttr[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableGridColumn.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar key = null;\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(key in this.__objAttr)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objAttr[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + key] = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(attributes && Object.keys(attributes).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:gridCol\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtableProperties.php\\r\\n\\tvar TableFormat = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__objProp = {jc:{value: null,method:\\\"alignment\\\",className: \\\"TableAlignment\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  shd:{value: null,method:\\\"shading\\\",className: \\\"Shading\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  tblBorders:{value: null,method:\\\"borders\\\",className: \\\"TableBorders\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  //tblCaption:{value: null,method:\\\"caption\\\",className: \\\"TableCaption\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  tblCellMar:{value: null,method:\\\"cellMargin\\\",className: \\\"TableCellMarginsDefault\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  //tblCellSpacing:{value: null,method:\\\"cellSpacing\\\",className: \\\"TableCellSpacing\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  //tblInd:{value: null,method:\\\"indent\\\",className: \\\"TableIndent\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  tblLayout:{value: null,method:\\\"layout\\\",className: \\\"TableLayout\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  //tblLook:{value: null,method:\\\"look\\\",className: \\\"TableLook\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  //tblOverlap:{value: null,method:\\\"overlap\\\",className: \\\"TableOverlap\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  //tblpPr:{value: null,method:\\\"ppr\\\",className: \\\"TablePPr\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  //tblStyle:{value: null,method:\\\"style\\\",className: \\\"TableStyle\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  //tblStyleColBandSize:{value: null,method:\\\"styleColBandSize\\\",className: \\\"TableStyleColBandSize\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  //tblStyleRowBandSize:{value: null,method:\\\"styleRowBandSize\\\",className: \\\"TableStyleRowBandSize\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  tblW:{value: null,method:\\\"width\\\",className: \\\"TableWidth\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  tblStyle:{value: null, method: \\\"styleID\\\"},\\r\\n\\t\\t\\t\\t\\t\\t };\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.__exportUtil.addFunctions(this,\\\"__objProp\\\",option,null,docxRef);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,TableFormat);\\r\\n\\tTableFormat.prototype.constructor = TableFormat;\\r\\n\\tNSDocxExport.prototype.TableFormat = TableFormat;\\r\\n\\t\\r\\n\\tTableFormat.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\toption = option || {};\\r\\n\\t\\tif(option.alignment) \\r\\n\\t\\t{\\r\\n            this.alignment(option.alignment);\\r\\n        }\\r\\n\\t\\tif(option.shading) \\r\\n\\t\\t{\\r\\n            this.shading(option.shading);\\r\\n        }\\r\\n\\t\\tif(option.borders) \\r\\n\\t\\t{\\r\\n            this.borders(option.borders);\\r\\n        }\\r\\n\\t\\tif(option.cellMargin)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.cellMargin(option.cellMargin);\\r\\n\\t\\t}\\r\\n        if(option.layout) \\r\\n        {\\r\\n            this.layout(option.layout);\\r\\n        }\\r\\n        if(option.width) \\r\\n        {\\r\\n        \\tthis.width(option.width);\\r\\n        }\\r\\n        else \\r\\n        {\\r\\n            this.width(100);\\r\\n        }\\r\\n        if (option.styleID) \\r\\n        {\\r\\n            this.styleID(option.styleID);\\r\\n        }\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableFormat.prototype.styleID = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objProp.tblStyle.value = \\\"<w:tblStyle w:val=\\\\\\\"\\\" + value + \\\"\\\\\\\"/>\\\"\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp.tblStyle.value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableFormat.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tfor(var paramKey in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objProp[paramKey]\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item.value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\tthis.__children.push(item.value);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:tblPr\\\");\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtableAlignment.php\\r\\n\\tvar TableAlignment = function(docxRef,value)\\r\\n\\t{\\r\\n\\t\\tthis.__value = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.value(value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,TableAlignment);\\r\\n\\tTableAlignment.prototype.constructor = TableAlignment;\\r\\n\\tNSDocxExport.prototype.TableAlignment = TableAlignment;\\r\\n\\t\\r\\n\\tTableAlignment.prototype.value = function(value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__value = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableAlignment.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(this.__value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:tblPr\\\",{\\\"w:val\\\": this.__value});\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtableBorders.php\\r\\n\\tvar TableBorders = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\t//some older versions of word still uses left and right rather than start and end \\r\\n\\t\\t//this.__objProp = {top: null,start: null,bottom: null,end: null,insideH: null,insideV: null};\\r\\n\\t\\tthis.__objProp = {top: null,left: null,bottom: null,right: null,insideH: null,insideV: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tif(!this.top)\\r\\n\\t\\t{\\r\\n\\t\\t\\toption = option || {};\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tfor(var key in this.__objProp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = this.__objProp[key];\\r\\n\\t\\t\\t\\t(function(item,key)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself[key] = function(color,shadow,space,size,value)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn self.__setProp(key,color,shadow,space,size,value);\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\tif(option[key])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar paramItem = option[key];\\r\\n\\t\\t\\t\\t\\t\\tself[key](paramItem.color,paramItem.shadow,paramItem.space,paramItem.size,paramItem.value);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t})(item,key)\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.setDefault();\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,TableBorders);\\r\\n\\tTableBorders.prototype.constructor = TableBorders;\\r\\n\\tNSDocxExport.prototype.TableBorders = TableBorders;\\r\\n\\t\\r\\n\\tTableBorders.prototype.setDefault = function(color,shadow,space,size,value) \\r\\n\\t{\\r\\n\\t\\tthis.setAll();\\r\\n\\t\\tfor(var key in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__objProp[key])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis[key](\\\"auto\\\",null,0,4,\\\"single\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableBorders.prototype.setOutside = function(color,shadow,space,size,value) \\r\\n\\t{\\r\\n\\t    this.top(color,shadow,space,size,value);\\r\\n\\t    this.left(color,shadow,space,size,value);\\r\\n\\t    //this.start(color,shadow,space,size,value);\\r\\n\\t    //this.end(color,shadow,space,size,value);\\r\\n\\t    this.right(color,shadow,space,size,value);\\r\\n\\t    this.bottom(color,shadow,space,size,value);\\r\\n\\t};\\r\\n\\r\\n\\tTableBorders.prototype.setInside = function(color,shadow,space,size,value) \\r\\n\\t{\\r\\n\\t    this.insideH(color,shadow,space,size,value);\\r\\n\\t    this.insideV(color,shadow,space,size,value);\\r\\n\\t};\\r\\n\\r\\n\\tTableBorders.prototype.setAll = function(color,shadow,space,size,value) \\r\\n\\t{\\r\\n\\t\\tthis.setInside(color,shadow,space,size,value);\\r\\n\\t    this.setOutside(color,shadow,space,size,value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableBorders.prototype.__setProp = function(key,color,shadow,space,size,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(color) || !this.util.isUndefinedOrNull(shadow) || !this.util.isUndefinedOrNull(space) || !this.util.isUndefinedOrNull(size) || !this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = {color: color,shadow: shadow,space: space,sz: size,val: value};\\r\\n\\t\\t\\tthis.__objProp[key] = item;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableBorders.prototype.__xmlProp = function(key,item)\\r\\n\\t{\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(var paramKey in item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item[paramKey]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + paramKey] = item[paramKey];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = this.__exportUtil.getXML({\\r\\n\\t\\t\\tname: \\\"w:\\\" + key,\\r\\n\\t\\t\\tattributes: attributes,\\r\\n\\t\\t});\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableBorders.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tfor(var key in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objProp[key];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__children.push(this.__xmlProp(key,item));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:tblBorders\\\");\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtableCellMargins.php\\r\\n\\tvar TableCellMarginsDefault = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\t//this.__objProp = {top: null,start: null,bottom: null,end: null};\\r\\n\\t\\t//old doc version uses left and right rather than start and end\\r\\n\\t\\tthis.__objProp = {top: null,left: null,bottom: null,right: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tif(!this.top)\\r\\n\\t\\t{\\r\\n\\t\\t\\toption = option || {};\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tfor(var key in this.__objProp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = this.__objProp[key];\\r\\n\\t\\t\\t\\t(function(item,key)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself[key] = function(width,type)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn self.__setProp(key,width,type);\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\tif(option[key])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar paramItem = option[key];\\r\\n\\t\\t\\t\\t\\t\\tself[key](paramItem.width,paramItem.type);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t})(item,key)\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,TableCellMarginsDefault);\\r\\n\\tTableCellMarginsDefault.prototype.constructor = TableCellMarginsDefault;\\r\\n\\tNSDocxExport.prototype.TableCellMarginsDefault = TableCellMarginsDefault;\\r\\n\\t\\r\\n\\tTableCellMarginsDefault.prototype.setAll = function(color,width,type) \\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tfor(var key in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objProp[key];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis[key](width,type);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCellMarginsDefault.prototype.__setProp = function(key,width,type)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(width))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = {w: width,type: type || \\\"dxa\\\"};\\r\\n\\t\\t\\tthis.__objProp[key] = item;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCellMarginsDefault.prototype.__xmlProp = function(key,item)\\r\\n\\t{\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(var paramKey in item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item[paramKey]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + paramKey] = item[paramKey];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = this.__exportUtil.getXML({\\r\\n\\t\\t\\tname: \\\"w:\\\" + key,\\r\\n\\t\\t\\tattributes: attributes,\\r\\n\\t\\t});\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableCellMarginsDefault.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tfor(var key in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objProp[key];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__children.push(this.__xmlProp(key,item));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:tblCellMar\\\");\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtableCellMargins.php\\r\\n\\tvar TableLayout = function(docxRef,type)\\r\\n\\t{\\r\\n\\t\\tthis.__type = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,TableLayout);\\r\\n\\tTableLayout.prototype.constructor = TableLayout;\\r\\n\\tNSDocxExport.prototype.TableLayout = TableLayout;\\r\\n\\t\\r\\n\\tTableLayout.prototype.type = function(type)\\r\\n\\t{\\r\\n\\t\\tthis.__type = type;\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableLayout.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__type && this.__type.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:tblLayout\\\",{\\\"w:type\\\": this.__type});\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtableWidth.php\\r\\n\\tvar TableWidth = function(docxRef,width,type)\\r\\n\\t{\\r\\n\\t\\tthis.__objAttr = {type: null,w: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tvar option = this.util.isObject(width) ? width : {type: type,width: width};\\r\\n\\t\\tthis.type(option.type || \\\"auto\\\");\\r\\n\\t\\t!this.util.isUndefinedOrNull(option.width) && this.width(option.width);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,TableWidth);\\r\\n\\tTableWidth.prototype.constructor = TableWidth;\\r\\n\\tNSDocxExport.prototype.TableWidth = TableWidth;\\r\\n\\t\\r\\n\\tTableWidth.prototype.type = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"type\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableWidth.prototype.width = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"w\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableWidth.prototype.__setAttr = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objAttr[key] = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objAttr[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tTableWidth.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar key = null;\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(key in this.__objAttr)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objAttr[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + key] = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(attributes && Object.keys(attributes).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:tblW\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPsection.php\\r\\n\\tvar Section = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\t//cols,lnNumType,pgBorders,pgMar,pgNumType,pgSz,type\\r\\n\\t\\tthis.__objProp = {cols:{value: null,method:\\\"cols\\\",className: \\\"SectionColumns\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  lnNumType:{value: null,method:\\\"lnNumType\\\",className: \\\"LineNumbers\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  pgBorders:{value: null,method:\\\"pgBorders\\\",className: \\\"SectionBorder\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  pgMar:{value: null,method:\\\"pgMar\\\",className: \\\"PageMargins\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  pgNumType:{value: null,method:\\\"pgNumType\\\",className: \\\"PageNumbers\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  pgSz:{value: null,method:\\\"pgSz\\\",className: \\\"PageSize\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  type:{value: null,method:\\\"type\\\",className: \\\"SectionType\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  vAlign:{value: null,method:\\\"type\\\",className: \\\"SectionVAlign\\\"},\\r\\n\\t\\t\\t\\t\\t\\t };\\r\\n\\t\\tthis.__default = {header: null,footer: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.__exportUtil.addFunctions(this,\\\"__objProp\\\",option,null,docxRef);\\r\\n\\t\\tthis.__setDefaultValues();\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,Section);\\r\\n\\tSection.prototype.constructor = Section;\\r\\n\\tNSDocxExport.prototype.Section = Section;\\r\\n\\t\\r\\n\\tSection.prototype.__setDefaultValues = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__objProp.cols.value)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cols = this.cols();\\r\\n\\t\\t\\tcols.num(1);\\r\\n\\t\\t\\tcols.space(708);\\r\\n\\t\\t}\\r\\n\\t\\t/*if(!this.__objProp.pgNumType.value)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar pgNumType = this.pgNumType();\\r\\n\\t\\t\\tpgNumType.fmt(\\\"decimal\\\");\\r\\n\\t\\t\\tpgNumType.start(1);\\r\\n\\t\\t}*/\\r\\n\\t};\\r\\n\\t\\r\\n\\tSection.prototype.addHeader = function(type)\\r\\n\\t{\\r\\n\\t\\tvar header = new Header(this.__docxRef);\\r\\n\\t\\tvar refID = header.getRefID();\\r\\n\\t    if((!type || type.toLowerCase() == \\\"default\\\") && this.__setDefault(\\\"header\\\",header))\\r\\n\\t    {\\r\\n\\t    \\ttype = \\\"default\\\";\\r\\n\\t    }\\r\\n\\t    this.__children.push(\\\"<w:headerReference w:type=\\\\\\\"\\\" + type + \\\"\\\\\\\" r:id=\\\\\\\"\\\" + refID + \\\"\\\\\\\"/>\\\");\\r\\n\\t    return header;\\r\\n\\t};\\r\\n\\t\\r\\n\\tSection.prototype.addFooter = function(type)\\r\\n\\t{\\r\\n\\t\\tvar footer = new Footer(this.__docxRef);\\r\\n\\t    var refID = footer.getRefID();\\r\\n\\t    if((!type || type.toLowerCase() == \\\"default\\\") && this.__setDefault(\\\"footer\\\",footer))\\r\\n\\t    {\\r\\n\\t    \\ttype = \\\"default\\\";\\r\\n\\t    }\\r\\n\\t    this.__children.push(\\\"<w:footerReference w:type=\\\\\\\"\\\" + type + \\\"\\\\\\\" r:id=\\\\\\\"\\\" + refID + \\\"\\\\\\\"/>\\\");\\r\\n\\t    return footer;\\r\\n\\t};\\r\\n\\t\\r\\n\\tSection.prototype.addParagraph = function(option)\\r\\n\\t{\\r\\n\\t\\tvar paragraph = new Paragraph(this.__docxRef,option);\\r\\n\\t    this.__children.push(paragraph);\\r\\n\\t    return paragraph;\\r\\n\\t};\\r\\n\\t\\r\\n\\tSection.prototype.addTable = function(option)\\r\\n\\t{\\r\\n\\t\\tvar table = new Table(this.__docxRef,option);\\r\\n\\t    this.__children.push(table);\\r\\n\\t    return table;\\r\\n\\t};\\r\\n\\t\\r\\n\\tSection.prototype.__setDefault = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(key && value && !this.__default[key])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__default[key] = value;\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tSection.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tfor(var paramKey in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objProp[paramKey]\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item.value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__children.push(item.value);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:sectPr\\\");\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPsection.php (in Elements section)\\r\\n\\tvar SectionType = function(docxRef,value)\\r\\n\\t{\\r\\n\\t\\tthis.__objAttr = {val: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\t!this.util.isUndefinedOrNull(value) && this.value(value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,SectionType);\\r\\n\\tSectionType.prototype.constructor = SectionType;\\r\\n\\tNSDocxExport.prototype.SectionType = SectionType;\\r\\n\\t\\r\\n\\tSectionType.prototype.value = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"val\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionType.prototype.__setAttr = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objAttr[key] = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objAttr[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionType.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar key = null;\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(key in this.__objAttr)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objAttr[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + key] = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(attributes && Object.keys(attributes).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:type\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPsection.php (in Elements section)\\r\\n\\tvar SectionVAlign = function(docxRef,value)\\r\\n\\t{\\r\\n\\t\\tthis.__objAttr = {val: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\t!this.util.isUndefinedOrNull(value) && this.value(value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,SectionVAlign);\\r\\n\\tSectionVAlign.prototype.constructor = SectionVAlign;\\r\\n\\tNSDocxExport.prototype.SectionVAlign = SectionVAlign;\\r\\n\\t\\r\\n\\tSectionVAlign.prototype.value = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"val\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionVAlign.prototype.__setAttr = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objAttr[key] = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objAttr[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionVAlign.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar key = null;\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(key in this.__objAttr)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objAttr[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + key] = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(attributes && Object.keys(attributes).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:vAlign\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPsectionCols.php\\r\\n\\tvar SectionColumns = function(docxRef,equalWidth,num,sep,space)\\r\\n\\t{\\r\\n\\t\\tthis.__objProp = {equalWidth: null,num: null,sep: null,space: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\t!this.util.isUndefinedOrNull(equalWidth) && this.equalWidth(equalWidth);\\r\\n\\t\\t!this.util.isUndefinedOrNull(num) && this.num(num);\\r\\n\\t\\t!this.util.isUndefinedOrNull(sep) && this.sep(sep);\\r\\n\\t\\t!this.util.isUndefinedOrNull(space) && this.space(space);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,SectionColumns);\\r\\n\\tSectionColumns.prototype.constructor = SectionColumns;\\r\\n\\tNSDocxExport.prototype.SectionColumns = SectionColumns;\\r\\n\\t\\r\\n\\tSectionColumns.prototype.equalWidth = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"equalWidth\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionColumns.prototype.num = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"num\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionColumns.prototype.sep = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"sep\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionColumns.prototype.space = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"space\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionColumns.prototype.addColumn = function(width,space)\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(width))\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = {width: width,space: space};\\r\\n\\t\\t\\tthis.__children.push(item);\\r\\n\\t\\t}\\r\\n\\t\\treturn item;\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionColumns.prototype.__setProp = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objProp[key] = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionColumns.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(var paramKey in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(this.__objProp[paramKey]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + paramKey] = this.__objProp[paramKey];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar arrChildren = [];\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar attributesChild = {}\\r\\n\\t\\tvar xmlChild = null;\\r\\n\\t\\tfor(var count = 0;count < this.__children.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__children[count];\\r\\n\\t\\t\\tif(item && !this.util.isUndefinedOrNull(item.width))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributesChild = {\\\"w:w\\\": item.width};\\r\\n\\t\\t\\t\\tif(!this.util.isUndefinedOrNull(item.space))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tattributesChild[\\\"w:space\\\"] = item.space;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\txmlChild = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\t\\tname: \\\"w:col\\\",\\r\\n\\t\\t\\t\\t\\tattributes: attributesChild,\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\tarrChildren.push(xmlChild);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = null;\\r\\n\\t\\tif(Object.keys(attributes).length || arrChildren.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = {name: \\\"w:cols\\\"};\\r\\n\\t\\t\\tif(Object.keys(attributes).length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[\\\"attributes\\\"] = attributes;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(arrChildren.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[\\\"children\\\"] = arrChildren;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\txml = this.__exportUtil.getXML(item);\\r\\n\\t\\t}\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPsectionBorders.php\\r\\n\\tvar SectionBorder = function(docxRef)\\r\\n\\t{\\r\\n\\t\\t//{val: null,sz: null,space: null,color: null}\\r\\n\\t\\tthis.__objProp = {top: null,bottom: null,left: null,right: null};\\r\\n\\t\\tthis.__objAttr = {display: null,offsetFrom: null,zOrder: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,SectionBorder);\\r\\n\\tSectionBorder.prototype.constructor = SectionBorder;\\r\\n\\tNSDocxExport.prototype.SectionBorder = SectionBorder;\\r\\n\\t\\r\\n\\tSectionBorder.prototype.display = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"display\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionBorder.prototype.offsetFrom = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"offsetFrom\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionBorder.prototype.zOrder = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"zOrder\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionBorder.prototype.top = function(option)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"top\\\",option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionBorder.prototype.bottom = function(option)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"bottom\\\",option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionBorder.prototype.left = function(option)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"left\\\",option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionBorder.prototype.right = function(option)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"right\\\",option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionBorder.prototype.__setAttr = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objAttr[key] = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objAttr[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionBorder.prototype.__setProp = function(key,option)\\r\\n\\t{\\r\\n\\t\\toption = option || {};\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(option.value) || !this.util.isUndefinedOrNull(option.size) || !this.util.isUndefinedOrNull(option.space) || !this.util.isUndefinedOrNull(option.color))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = {val: option.value,sz: option.size,space: option.space,color: option.color};\\r\\n\\t\\t\\tthis.__objProp[key] = item;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionBorder.prototype.__xmlProp = function(key,item)\\r\\n\\t{\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(var paramKey in item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item[paramKey]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + paramKey] = item[paramKey];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = this.__exportUtil.getXML({\\r\\n\\t\\t\\tname: \\\"w:\\\" + key,\\r\\n\\t\\t\\tattributes: attributes,\\r\\n\\t\\t});\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\tSectionBorder.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar key = null;\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(key in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objProp[key];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__children.push(this.__xmlProp(key,item));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tfor(key in this.__objAttr)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objAttr[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + key] = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:pgBorders\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPSectionPgMar.php\\r\\n\\tvar PageMargins = function(docxRef,header,bottom,top,right,left,footer,gutter)\\r\\n\\t{\\r\\n\\t\\tthis.__objAttr = {header: null,bottom: null,top: null,right: null,left: null,footer: null,gutter: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\t!this.util.isUndefinedOrNull(header) && this.header(header);\\r\\n\\t\\t!this.util.isUndefinedOrNull(bottom) && this.bottom(bottom);\\r\\n\\t\\t!this.util.isUndefinedOrNull(top) && this.top(top);\\r\\n\\t\\t!this.util.isUndefinedOrNull(right) && this.right(right);\\r\\n\\t\\t!this.util.isUndefinedOrNull(left) && this.left(left);\\r\\n\\t\\t!this.util.isUndefinedOrNull(footer) && this.footer(footer);\\r\\n\\t\\t!this.util.isUndefinedOrNull(gutter) && this.gutter(gutter);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,PageMargins);\\r\\n\\tPageMargins.prototype.constructor = PageMargins;\\r\\n\\tNSDocxExport.prototype.PageMargins = PageMargins;\\r\\n\\t\\r\\n\\tPageMargins.prototype.header = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"header\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageMargins.prototype.bottom = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"bottom\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageMargins.prototype.top = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"top\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageMargins.prototype.right = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"right\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageMargins.prototype.left = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"left\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageMargins.prototype.footer = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"footer\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageMargins.prototype.gutter = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"gutter\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageMargins.prototype.__setAttr = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objAttr[key] = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objAttr[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageMargins.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar key = null;\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(key in this.__objAttr)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objAttr[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + key] = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(attributes && Object.keys(attributes).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:pgMar\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPsection.php (in Elements section)\\r\\n\\tvar PageSize = function(docxRef,height,width,orientation)\\r\\n\\t{\\r\\n\\t\\tthis.__objAttr = {h: null,w: null,orient: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\t!this.util.isUndefinedOrNull(height) && this.height(height);\\r\\n\\t\\t!this.util.isUndefinedOrNull(width) && this.width(width);\\r\\n\\t\\t!this.util.isUndefinedOrNull(orientation) && this.orientation(orientation);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,PageSize);\\r\\n\\tPageSize.prototype.constructor = PageSize;\\r\\n\\tNSDocxExport.prototype.PageSize = PageSize;\\r\\n\\t\\r\\n\\tPageSize.prototype.height = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"h\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageSize.prototype.width = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"w\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageSize.prototype.orientation = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"orient\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageSize.prototype.__setAttr = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objAttr[key] = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objAttr[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageSize.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar key = null;\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(key in this.__objAttr)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objAttr[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + key] = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(attributes && Object.keys(attributes).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:pgSz\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPSectionPgNumType.php\\r\\n\\tvar PageNumbers = function(docxRef,chapSep,chapStyle,fmt,start)\\r\\n\\t{\\r\\n\\t\\tthis.__objAttr = {chapSep: null,chapStyle: null,fmt: null,start: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\t!this.util.isUndefinedOrNull(chapSep) && this.chapSep(chapSep);\\r\\n\\t\\t!this.util.isUndefinedOrNull(chapStyle) && this.chapStyle(chapStyle);\\r\\n\\t\\t!this.util.isUndefinedOrNull(fmt) && this.fmt(fmt);\\r\\n\\t\\t!this.util.isUndefinedOrNull(start) && this.start(start);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,PageNumbers);\\r\\n\\tPageNumbers.prototype.constructor = PageNumbers;\\r\\n\\tNSDocxExport.prototype.PageNumbers = PageNumbers;\\r\\n\\t\\r\\n\\tPageNumbers.prototype.chapSep = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"chapSep\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageNumbers.prototype.chapStyle = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"chapStyle\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageNumbers.prototype.fmt = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"fmt\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageNumbers.prototype.start = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"start\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageNumbers.prototype.__setAttr = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objAttr[key] = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objAttr[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tPageNumbers.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar key = null;\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(key in this.__objAttr)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objAttr[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + key] = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(attributes && Object.keys(attributes).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:pgNumType\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPsectionLineNumbering.php\\r\\n\\tvar LineNumbers = function(docxRef,countBy,distance,restart,start)\\r\\n\\t{\\r\\n\\t\\tthis.__objAttr = {countBy: null,distance: null,restart: null,start: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\t!this.util.isUndefinedOrNull(countBy) && this.countBy(countBy);\\r\\n\\t\\t!this.util.isUndefinedOrNull(distance) && this.distance(distance);\\r\\n\\t\\t!this.util.isUndefinedOrNull(restart) && this.restart(restart);\\r\\n\\t\\t!this.util.isUndefinedOrNull(start) && this.start(start);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,LineNumbers);\\r\\n\\tLineNumbers.prototype.constructor = LineNumbers;\\r\\n\\tNSDocxExport.prototype.LineNumbers = LineNumbers;\\r\\n\\t\\r\\n\\tLineNumbers.prototype.countBy = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"countBy\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tLineNumbers.prototype.distance = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"distance\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tLineNumbers.prototype.restart = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"restart\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tLineNumbers.prototype.start = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setAttr(\\\"start\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tLineNumbers.prototype.__setAttr = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objAttr[key] = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objAttr[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tLineNumbers.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar key = null;\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(key in this.__objAttr)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objAttr[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + key] = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(attributes && Object.keys(attributes).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:lnNumType\\\",attributes);\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPcontentOverview.php\\r\\n\\tvar Paragraph = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__format = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,Paragraph);\\r\\n\\tParagraph.prototype.constructor = Paragraph;\\r\\n\\tNSDocxExport.prototype.Paragraph = Paragraph;\\r\\n\\t\\r\\n\\tParagraph.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(option.text)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar run = this.addText(option.text);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(option.pageBreak)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.addPageBreak();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.format(option);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraph.prototype.format = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof ParagraphFormat)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__format = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__format && (this.__format = new ParagraphFormat(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__format;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraph.prototype.addRun = function(value)\\r\\n\\t{\\r\\n\\t\\tvar run = new Run(this.__docxRef,value);\\r\\n\\t    this.__children.push(run);\\r\\n\\t    return run;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraph.prototype.addText = function(text)\\r\\n\\t{\\r\\n\\t\\tvar run = this.addRun();\\r\\n\\t\\trun.addText(text);\\r\\n\\t    return run;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraph.prototype.addCurrentPageNumber = function()\\r\\n\\t{\\r\\n\\t\\tvar format = this.format();\\r\\n\\t\\tif(!format.horizontalAlignment().value())\\r\\n\\t\\t{\\r\\n\\t\\t\\tformat.horizontalAlignment().value(\\\"center\\\");\\r\\n\\t\\t}\\r\\n\\t\\tvar run = this.__addSpecialString(\\\"PAGE\\\");\\r\\n\\t\\treturn run;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraph.prototype.addTotalPageNumber = function()\\r\\n\\t{\\r\\n\\t\\tvar format = this.format();\\r\\n\\t\\tif(!format.horizontalAlignment().value())\\r\\n\\t\\t{\\r\\n\\t\\t\\tformat.horizontalAlignment().value(\\\"center\\\");\\r\\n\\t\\t}\\r\\n\\t\\tvar run = this.__addSpecialString(\\\"NUMPAGES\\\");\\r\\n\\t\\treturn run;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraph.prototype.addTotalPageNumberInSection = function()\\r\\n\\t{\\r\\n\\t\\tvar format = this.format();\\r\\n\\t\\tif(!format.horizontalAlignment().value())\\r\\n\\t\\t{\\r\\n\\t\\t\\tformat.horizontalAlignment().value(\\\"center\\\");\\r\\n\\t\\t}\\r\\n\\t\\tvar run = this.__addSpecialString(\\\"SECTIONPAGES\\\");\\r\\n\\t\\treturn run;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraph.prototype.addPageBreak = function()\\r\\n\\t{\\r\\n\\t\\tvar run = this.addRun();\\r\\n\\t\\trun.addBreak(\\\"page\\\");\\r\\n\\t    return run;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraph.prototype.__addSpecialString = function(str)\\r\\n\\t{\\r\\n\\t\\tvar run = this.addRun();\\r\\n\\t\\trun.addFldChar(\\\"begin\\\");\\r\\n\\t\\trun.addInstrText(str);\\r\\n\\t\\trun.addFldChar(\\\"separate\\\");\\r\\n\\t\\trun.addFldChar(\\\"end\\\");\\r\\n\\t\\treturn run;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraph.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\t//format should be at start\\r\\n\\t\\tif(this.__format)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__children.unshift(this.__format);\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = this.base.toXml.call(this,\\\"w:p\\\");\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPparagraphProperties.php\\r\\n\\t//option value can have horizontalAlignment,borders,indentation,shading,spacing,tabs,verticalAlignment,keepNext,keepLines\\r\\n\\tvar ParagraphFormat = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__objProp = {horizontalAlignment:{variable: \\\"__hAlignment\\\", method: \\\"horizontalAlignment\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  borders:{variable: \\\"__borders\\\", method: \\\"borders\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  indentation:{variable: \\\"__indentation\\\", method: \\\"indentation\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  shading:{variable: \\\"__shading\\\", method: \\\"shading\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  spacing:{variable: \\\"__spacing\\\", method: \\\"spacing\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  contextualSpacing:{variable: \\\"__contextualSpacing\\\", method: \\\"contextualSpacing\\\",tag:\\\"w:contextualSpacing\\\",attr:\\\"w:val\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  tabs:{variable: \\\"__tabs\\\", method: \\\"tabs\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  verticalAlignment:{variable: \\\"__vAlignment\\\", method: \\\"verticalAlignment\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  keepNext:{variable: \\\"__keepNext\\\", method: \\\"keepNext\\\", tag: \\\"w:keepNext\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  keepLines:{variable: \\\"__keepLines\\\", method: \\\"keepLines\\\", tag: \\\"w:keepLines\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  outlineLevel:{variable: \\\"__outlineLevel\\\", method: \\\"outlineLevel\\\",tag:\\\"w:outlineLvl\\\",attr:\\\"w:val\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  styleID:{variable: \\\"__styleID\\\", method: \\\"styleID\\\",tag:\\\"w:pStyle\\\",attr:\\\"w:val\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  numberingProperties:{variable: \\\"__numberingProperties\\\", method: \\\"numberingProperties\\\"}\\r\\n\\t\\t\\t\\t\\t\\t };\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,ParagraphFormat);\\r\\n\\tParagraphFormat.prototype.constructor = ParagraphFormat;\\r\\n\\tNSDocxExport.prototype.ParagraphFormat = ParagraphFormat;\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (option.horizontalAlign) \\r\\n\\t\\t\\t{\\r\\n                this.horizontalAlignment(option.horizontalAlign);\\r\\n            }\\r\\n\\t\\t\\tif(option.borders) \\r\\n            {\\r\\n\\t\\t\\t\\tthis.borders(option.borders)\\r\\n            }\\r\\n\\t\\t\\telse if (option.horizontalLine) \\r\\n            {\\r\\n                this.horizontalLine();\\r\\n            }\\r\\n            if (option.contextualSpacing) \\r\\n            {\\r\\n                this.contextualSpacing(option.contextualSpacing);\\r\\n            }\\r\\n            if (option.rightTab) \\r\\n            {\\r\\n            \\tvar tabs = this.tabs();\\r\\n            \\ttabs.addTab({val: \\\"right\\\",pos: option.rightTab});\\r\\n            }\\r\\n            if (option.leftTab) \\r\\n            {\\r\\n            \\tvar tabs = this.tabs();\\r\\n            \\ttabs.addTab({val: \\\"left\\\",pos: option.leftTab});\\r\\n            }\\r\\n            if (option.indent) \\r\\n            {\\r\\n                this.indentation(option.indent);\\r\\n            }\\r\\n            if (option.spacing) \\r\\n            {\\r\\n                this.spacing(option.spacing);\\r\\n            }\\r\\n            if (option.keepNext) \\r\\n            {\\r\\n                this.keepNext(true);\\r\\n            }\\r\\n            if (option.keepLines) \\r\\n            {\\r\\n            \\tthis.keepLines(true);\\r\\n            }\\r\\n            if (option.outlineLevel) \\r\\n            {\\r\\n                this.outlineLevel(option.outlineLevel);\\r\\n            }\\r\\n            if (option.styleID) \\r\\n            {\\r\\n                this.styleID(option.styleID);\\r\\n            }\\r\\n            if (option.numberingProperties) \\r\\n            {\\r\\n            \\tthis.numberingProperties(option.numberingProperties);\\r\\n            }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.horizontalAlignment = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof ParagraphHAlignment)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__hAlignment = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__hAlignment && (this.__hAlignment = new ParagraphHAlignment(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__hAlignment;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.horizontalLine = function()\\r\\n\\t{\\r\\n\\t\\tvar border = this.borders({bottom: {color: \\\"auto\\\",space: 1,value: \\\"single\\\",size: 6}});\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.borders = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof ParagraphBorder)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__borders = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__borders && (this.__borders = new ParagraphBorder(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__borders;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.indentation = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof ParagraphIndentation)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__indentation = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__indentation && (this.__indentation = new ParagraphIndentation(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__indentation;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.shading = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof Shading)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__shading = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__shading && (this.__shading = new Shading(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__shading;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.spacing = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof ParagraphSpacing)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__spacing = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__spacing && (this.__spacing = new ParagraphSpacing(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__spacing;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.contextualSpacing = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__contextualSpacing = (value === false) ? 0 : 1;\\r\\n\\t\\treturn this.__contextualSpacing;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.tabs = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof ParagraphTabs)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__tabs = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__tabs && (this.__tabs = new ParagraphTabs(this.__docxRef));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__tabs;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.verticalAlignment = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof ParagraphVAlignment)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__vAlignment = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__vAlignment = new ParagraphVAlignment(this.__docxRef);\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__vAlignment;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.keepNext = function(value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__keepNext = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__keepNext;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.keepLines = function(value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__keepLines = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__keepLines;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.outlineLevel = function(value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__outlineLevel = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__outlineLevel;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.styleID = function(value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__styleID = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__styleID;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.numberingProperties = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof NumberingProperties)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__numberingProperties = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__numberingProperties && (this.__numberingProperties = new NumberingProperties(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__numberingProperties;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphFormat.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar attr = null;\\r\\n\\t\\tfor(var key in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objProp[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(this[item.variable]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(item.tag && !item.attr && this[item.variable])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__children.push(\\\"<\\\" + item.tag + \\\"/>\\\");  \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(item.tag && item.attr)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tattr = {};\\r\\n\\t\\t\\t\\t\\tattr[item.attr] = this[item.variable];\\r\\n\\t\\t\\t\\t\\tthis.__children.push(this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\t\\t\\tname: item.tag,\\r\\n\\t\\t\\t\\t\\t\\tattributes: attr,\\r\\n\\t\\t\\t\\t\\t}));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__children.push(this[item.variable]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = this.base.toXml.call(this,\\\"w:pPr\\\");\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar NumberingProperties = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__objProp = {level: {value:null, method:\\\"level\\\",tag:\\\"w:ilvl\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  numberID: {value:null, method:\\\"numberID\\\",tag:\\\"w:numId\\\"},\\r\\n\\t\\t};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.__exportUtil.addSingleValueFunctions(this,this.__objProp,null,docxRef);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,NumberingProperties);\\r\\n\\tNumberingProperties.prototype.constructor = NumberingProperties;\\r\\n\\tNSDocxExport.prototype.NumberingProperties = NumberingProperties;\\r\\n\\t\\r\\n\\tNumberingProperties.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(option.level))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.level(option.level);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(option.numberID))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.numberID(option.numberID);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNumberingProperties.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tfor(var key in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__objProp[key];\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item.value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__children.push(this.__exportUtil.getValXml(item.value,item.tag));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__children && this.__children.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:numPr\\\");\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPalignment.php\\r\\n\\tvar ParagraphHAlignment = function(docxRef,value)\\r\\n\\t{\\r\\n\\t\\tthis.__value = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.value(value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,ParagraphHAlignment);\\r\\n\\tParagraphHAlignment.prototype.constructor = ParagraphHAlignment;\\r\\n\\tNSDocxExport.prototype.ParagraphHAlignment = ParagraphHAlignment;\\r\\n\\t\\r\\n\\tParagraphHAlignment.prototype.value = function(value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__value = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphHAlignment.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(this.__value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\tname: \\\"w:jc\\\",\\r\\n\\t\\t\\t\\tattributes: {\\\"w:val\\\": this.__value},\\r\\n\\t\\t\\t});\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\r\\n\\t//http://officeopenxml.com/WPborders.php\\r\\n\\tvar ParagraphBorder = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\t//{val: null,sz: null,space: null,color: null}\\r\\n\\t\\tthis.__objProp = {top: null,bottom: null,left: null,right: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var key in option)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__objProp.hasOwnProperty(key))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = option[key];\\r\\n\\t\\t\\t\\t\\tthis[this.__objProp[key]](item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,ParagraphBorder);\\r\\n\\tParagraphBorder.prototype.constructor = ParagraphBorder;\\r\\n\\tNSDocxExport.prototype.ParagraphBorder = ParagraphBorder;\\r\\n\\t\\r\\n\\t//value,size,space,color\\r\\n\\tParagraphBorder.prototype.top = function(option)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"top\\\",option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphBorder.prototype.bottom = function(option)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"bottom\\\",option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphBorder.prototype.left = function(option)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"left\\\",option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphBorder.prototype.right = function(option)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"right\\\",option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphBorder.prototype.__setProp = function(key,option)\\r\\n\\t{\\r\\n\\t\\toption = option || {};\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(option.value) || !this.util.isUndefinedOrNull(option.size) || !this.util.isUndefinedOrNull(option.space) || !this.util.isUndefinedOrNull(option.color))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = {val: option.value,sz: option.size,space: option.space,color: option.color};\\r\\n\\t\\t\\tthis.__objProp[key] = item;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphBorder.prototype.__xmlProp = function(key,item)\\r\\n\\t{\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(var paramKey in item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(item[paramKey]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + paramKey] = item[paramKey];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = this.__exportUtil.getXML({\\r\\n\\t\\t\\tname: \\\"w:\\\" + key,\\r\\n\\t\\t\\tattributes: attributes,\\r\\n\\t\\t});\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphBorder.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tfor(var key in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__objProp[key];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__children.push(this.__xmlProp(key,item));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__children && this.__children.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.base.toXml.call(this,\\\"w:pBdr\\\");\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPindentation.php\\r\\n\\tvar ParagraphIndentation = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__objProp = {left: null,right: null,hanging: null,firstLine: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.left) && this.left(option.left);\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.right) && this.right(option.right);\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.hanging) && this.hanging(option.hanging);\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.firstLine) && this.firstLine(option.firstLine);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,ParagraphIndentation);\\r\\n\\tParagraphIndentation.prototype.constructor = ParagraphIndentation;\\r\\n\\tNSDocxExport.prototype.ParagraphIndentation = ParagraphIndentation;\\r\\n\\t\\r\\n\\tParagraphIndentation.prototype.left = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"left\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphIndentation.prototype.right = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"right\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphIndentation.prototype.hanging = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"hanging\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphIndentation.prototype.firstLine = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"firstLine\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphIndentation.prototype.__setProp = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objProp[key] = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphIndentation.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(var paramKey in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(this.__objProp[paramKey]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + paramKey] = this.__objProp[paramKey];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = null;\\r\\n\\t\\tif(Object.keys(attributes).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\txml = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\tname: \\\"w:ind\\\",\\r\\n\\t\\t\\t\\tattributes: attributes,\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPshading.php\\r\\n\\tvar Shading = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__objProp = {fill: null,color: null,val: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.fill) && this.fill(option.fill);\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.color) && this.color(option.color);\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.value) && this.val(option.value);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,Shading);\\r\\n\\tShading.prototype.constructor = Shading;\\r\\n\\tNSDocxExport.prototype.Shading = Shading;\\r\\n\\t\\r\\n\\tShading.prototype.fill = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"fill\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tShading.prototype.color = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"color\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tShading.prototype.val = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"val\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tShading.prototype.__setProp = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objProp[key] = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tShading.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(var paramKey in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(this.__objProp[paramKey]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + paramKey] = this.__objProp[paramKey];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = null;\\r\\n\\t\\tif(Object.keys(attributes).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\txml = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\tname: \\\"w:shd\\\",\\r\\n\\t\\t\\t\\tattributes: attributes,\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPspacing.php\\r\\n\\tvar ParagraphSpacing = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__objProp = {after: null,before: null,line: null,lineRule: null,beforeAutospacing: null,afterAutospacing: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.after) && this.after(option.after);\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.before) && this.before(option.before);\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.line) && this.line(option.line);\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.lineRule) && this.lineRule(option.lineRule);\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.beforeAutospacing) && this.beforeAutospacing(option.beforeAutospacing);\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.afterAutospacing) && this.afterAutospacing(option.afterAutospacing);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,ParagraphSpacing);\\r\\n\\tParagraphSpacing.prototype.constructor = ParagraphSpacing;\\r\\n\\tNSDocxExport.prototype.ParagraphSpacing = ParagraphSpacing;\\r\\n\\t\\r\\n\\tParagraphSpacing.prototype.after = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"after\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphSpacing.prototype.before = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"before\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphSpacing.prototype.after = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"after\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphSpacing.prototype.line = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"line\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphSpacing.prototype.beforeAutospacing = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"beforeAutospacing\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphSpacing.prototype.afterAutospacing = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"afterAutospacing\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphSpacing.prototype.__setProp = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objProp[key] = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphSpacing.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(var paramKey in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(this.__objProp[paramKey]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + paramKey] = this.__objProp[paramKey];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = null;\\r\\n\\t\\tif(Object.keys(attributes).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\txml = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\tname: \\\"w:spacing\\\",\\r\\n\\t\\t\\t\\tattributes: attributes,\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtab.php\\r\\n\\tvar ParagraphTabs = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,ParagraphTabs);\\r\\n\\tParagraphTabs.prototype.constructor = ParagraphTabs;\\r\\n\\tNSDocxExport.prototype.ParagraphTabs = ParagraphTabs;\\r\\n\\t\\r\\n\\tParagraphTabs.prototype.addTab = function(option)\\r\\n\\t{\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar tab = new ParagraphTab(this.__docxRef,option);\\r\\n\\t\\t    this.__children.push(tab);\\r\\n\\t\\t    return tab;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphTabs.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar xml = this.base.toXml.call(this,\\\"w:tabs\\\");\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtab.php\\r\\n\\tvar ParagraphTab = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__objProp = {leader: null,pos: null,val: null};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.leader) && this.leader(option.leader);\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.pos) && this.pos(option.pos);\\r\\n\\t\\t\\t!this.util.isUndefinedOrNull(option.val) && this.val(option.val);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,ParagraphTab);\\r\\n\\tParagraphTab.prototype.constructor = ParagraphTab;\\r\\n\\tNSDocxExport.prototype.ParagraphTab = ParagraphTab;\\r\\n\\t\\r\\n\\tParagraphTab.prototype.leader = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"leader\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphTab.prototype.pos = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"pos\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphTab.prototype.val = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"val\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphTab.prototype.__setProp = function(key,value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objProp[key] = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__objProp[key];\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphTab.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar attributes = {};\\r\\n\\t\\tfor(var paramKey in this.__objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(this.__objProp[paramKey]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tattributes[\\\"w:\\\" + paramKey] = this.__objProp[paramKey];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = null;\\r\\n\\t\\tif(Object.keys(attributes).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\txml = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\tname: \\\"w:tab\\\",\\r\\n\\t\\t\\t\\tattributes: attributes,\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtextAlignment.php\\r\\n\\tvar ParagraphVAlignment = function(docxRef,value)\\r\\n\\t{\\r\\n\\t\\tthis.__value = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.value(value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,ParagraphVAlignment);\\r\\n\\tParagraphVAlignment.prototype.constructor = ParagraphVAlignment;\\r\\n\\tNSDocxExport.prototype.ParagraphVAlignment = ParagraphVAlignment;\\r\\n\\t\\r\\n\\tParagraphVAlignment.prototype.value = function(value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__value = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tParagraphVAlignment.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(this.__value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar xml = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\tname: \\\"w:textAlignment\\\",\\r\\n\\t\\t\\t\\tattributes: {\\\"w:val\\\": this.__value},\\r\\n\\t\\t\\t});\\r\\n\\t\\t\\treturn xml;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtext.php\\r\\n\\tvar Run = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__format = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,Run);\\r\\n\\tRun.prototype.constructor = Run;\\r\\n\\tNSDocxExport.prototype.Run = Run;\\r\\n\\t\\r\\n\\tRun.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(option.text)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar text = this.addText(option.text);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.format(option);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tRun.prototype.format = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof RunFormat)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__format = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__format && (this.__format = new RunFormat(this.__docxRef,value));\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__format;\\r\\n\\t};\\r\\n\\t\\r\\n\\tRun.prototype.addText = function(str,spaceAttr)\\r\\n\\t{\\r\\n\\t\\tvar text = new Text(this.__docxRef,str,spaceAttr);\\r\\n\\t    this.__children.push(text);\\r\\n\\t    return text;\\r\\n\\t};\\r\\n\\t\\r\\n\\tRun.prototype.addBreak = function(type,clear)\\r\\n\\t{\\r\\n\\t\\tvar runBreak = new RunBreak(this.__docxRef,type,clear);\\r\\n\\t    this.__children.push(runBreak);\\r\\n\\t    return runBreak;\\r\\n\\t};\\r\\n\\t\\r\\n\\tRun.prototype.addInstrText = function(str,spaceType)\\r\\n\\t{\\r\\n\\t\\tvar instr = this.__exportUtil.getInstrText(str,spaceType);\\r\\n\\t\\tthis.__children.push(instr);\\r\\n\\t\\treturn instr;\\r\\n\\t};\\r\\n\\t\\r\\n\\tRun.prototype.addFldChar = function(charType)\\r\\n\\t{\\r\\n\\t\\tvar fldChar = this.__exportUtil.getFldChar(charType);\\r\\n\\t\\tthis.__children.push(fldChar);\\r\\n\\t\\treturn fldChar;\\r\\n\\t};\\r\\n\\t\\r\\n\\tRun.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\t//format should be at start\\r\\n\\t\\tif(this.__format)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__children.unshift(this.__format);\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = this.base.toXml.call(this,\\\"w:r\\\");\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPstyleCharStyles.php\\r\\n\\tvar RunFormat = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__style = {bold:{value:false,tag: \\\"w:b\\\",attr:\\\"w:val\\\"},italic:{value:false,tag: \\\"w:i\\\",attr:\\\"w:val\\\"},color:{value:null,tag:\\\"w:color\\\",attr:\\\"w:val\\\"},\\r\\n\\t\\t\\t\\t\\t\\tunderline:{value: null},size:{value:null,tag:\\\"w:sz\\\",attr:\\\"w:val\\\"},sizeCs:{value:null,tag:\\\"w:szCs\\\",attr:\\\"w:val\\\"},\\r\\n\\t\\t\\t\\t\\t\\trightToLeft:{value:null,tag:\\\"w:rtl\\\",attr:\\\"w:val\\\"},smallCaps:{value:false,tag: \\\"w:smallCaps\\\"},caps:{value:false,tag: \\\"w:caps\\\"},\\r\\n\\t\\t\\t\\t\\t\\tstrike:{value:false,tag:\\\"w:strike\\\",attr:\\\"w:val\\\"},doubleStrike:{value:false,tag:\\\"w:dstrike\\\",attr:\\\"w:val\\\"},\\r\\n\\t\\t\\t\\t\\t\\tsubScript:{value:false,tag: \\\"w:subscript\\\"},superScript:{value:false,tag: \\\"w:superscript\\\"},\\r\\n\\t\\t\\t\\t\\t\\tstyleID:{value:null,tag:\\\"w:rStyle\\\",attr:\\\"w:val\\\"},highlight:{value:null,tag:\\\"w:highlight\\\",attr:\\\"w:val\\\"},highlightCs:{value:null,tag:\\\"w:highlightCs\\\",attr:\\\"w:val\\\"},\\r\\n\\t\\t\\t\\t\\t\\tshadow:{value: null},shadowCs:{value: null},\\r\\n\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\tthis.__fonts = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tthis.setProperties(option);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,RunFormat);\\r\\n\\tRunFormat.prototype.constructor = RunFormat;\\r\\n\\tNSDocxExport.prototype.RunFormat = RunFormat;\\r\\n\\t\\r\\n\\tRunFormat.prototype.setProperties = function(option)\\r\\n\\t{\\r\\n\\t\\tif(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (option.bold) \\r\\n\\t\\t\\t{\\r\\n\\t            this.bold(true);\\r\\n\\t        }\\r\\n\\t\\t\\tif (option.italic) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.italic(true);\\r\\n\\t        }\\r\\n\\t        if (option.underline) \\r\\n\\t        {\\r\\n\\t        \\tthis.underline(option.underline.type, option.underline.color);\\r\\n\\t        }\\r\\n\\t        if (option.color) \\r\\n\\t        {\\r\\n\\t        \\tthis.color(option.color);\\r\\n\\t        }\\r\\n\\t        if (option.size) \\r\\n\\t        {\\r\\n\\t            this.size(option.size);\\r\\n\\t        }\\r\\n\\t        if (option.rightToLeft) \\r\\n\\t        {\\r\\n\\t        \\tthis.rightToLeft(option.rightToLeft);\\r\\n\\t        }\\r\\n\\t        if (option.smallCaps) \\r\\n\\t        {\\r\\n\\t        \\tthis.smallCaps(option.smallCaps);\\r\\n\\t        }\\r\\n\\t        if (option.caps) \\r\\n\\t        {\\r\\n\\t        \\tthis.caps(option.caps);\\r\\n\\t        }\\r\\n\\t        if (option.strike) \\r\\n\\t        {\\r\\n\\t        \\tthis.strike(option.strike);\\r\\n\\t        }\\r\\n\\t        if (option.doubleStrike) \\r\\n\\t        {\\r\\n\\t        \\tthis.doubleStrike(option.doubleStrike);\\r\\n\\t        }\\r\\n\\t        if (option.subScript) \\r\\n\\t        {\\r\\n\\t        \\tthis.subScript(option.subScript);\\r\\n\\t        }\\r\\n\\t        if (option.superScript) \\r\\n\\t        {\\r\\n\\t        \\tthis.superScript(option.superScript);\\r\\n\\t        }\\r\\n\\t        if (option.highlight) \\r\\n\\t        {\\r\\n\\t            this.highlight.push(option.highlight);\\r\\n\\t        }\\r\\n\\t        if (option.shadow) \\r\\n\\t        {\\r\\n\\t            this.shadow(option.shadow.type,option.shadow.fill,option.shadow.color);\\r\\n\\t        }\\r\\n\\t        if (option.styleID) \\r\\n\\t        {\\r\\n\\t        \\tthis.styleID(option.styleID);\\r\\n\\t        }\\r\\n\\t        if (option.font) \\r\\n\\t        {\\r\\n\\t            this.fonts(option.font);\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.bold = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setStyle(\\\"bold\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.italic = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setStyle(\\\"italic\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.color = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setStyle(\\\"color\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.underline = function(type,color)\\r\\n\\t{\\r\\n\\t\\ttype = type || \\\"single\\\";\\r\\n\\t\\tvar attr = {\\\"w:val\\\": type};\\r\\n\\t\\tif(color)\\r\\n\\t\\t{\\r\\n\\t\\t\\tattr[\\\"w:color\\\"] = color;\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = this.__exportUtil.getXML({\\r\\n\\t\\t\\tname: \\\"w:u\\\",\\r\\n\\t\\t\\tattributes: attr\\r\\n\\t\\t});\\r\\n\\t\\treturn this.__setStyle(\\\"underline\\\",xml);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.size = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__setStyle(\\\"sizeCs\\\",value);\\r\\n\\t\\treturn this.__setStyle(\\\"size\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.rightToLeft = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setStyle(\\\"rightToLeft\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.smallCaps = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setStyle(\\\"smallCaps\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.caps = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setStyle(\\\"caps\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.strike = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setStyle(\\\"strike\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.doubleStrike = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setStyle(\\\"doubleStrike\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.subScript = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setStyle(\\\"subScript\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.superScript = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setStyle(\\\"superScript\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.styleID = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setStyle(\\\"styleID\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.highlight = function(value)\\r\\n\\t{\\r\\n\\t\\tthis.__setStyle(\\\"highlightCs\\\",value);\\r\\n\\t\\treturn this.__setStyle(\\\"highlight\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.shadow = function(value, fill, color)\\r\\n\\t{\\r\\n\\t\\ttype = type || \\\"single\\\";\\r\\n\\t\\tvar attr = {\\\"w:val\\\": value,\\\"w:fill\\\": fill,\\\"w:color\\\" : color};\\r\\n\\t\\tvar xml = this.__exportUtil.getXML({\\r\\n\\t\\t\\tname: \\\"w:shdCs\\\",\\r\\n\\t\\t\\tattributes: attr\\r\\n\\t\\t});\\r\\n\\t\\tthis.__setStyle(\\\"shadowCs\\\",xml);\\r\\n\\t\\txml = this.__exportUtil.getXML({\\r\\n\\t\\t\\tname: \\\"w:shd\\\",\\r\\n\\t\\t\\tattributes: attr\\r\\n\\t\\t});\\r\\n\\t\\treturn this.__setStyle(\\\"shadow\\\",xml);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.fonts = function(value)\\r\\n\\t{\\r\\n\\t\\tif(value && value instanceof RunFonts)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__fonts = value;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__fonts = new RunFonts(this.__docxRef,value);\\r\\n\\t\\t}\\r\\n\\t    return this.__fonts;\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.__setStyle = function(key,value)\\r\\n\\t{\\r\\n\\t\\t//key = key.toLowerCase();\\r\\n\\t\\tif(this.__style[key])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__style[key].value = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__style[key].value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFormat.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar objItem = null;\\r\\n\\t\\tfor(var key in this.__style)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__style[key];\\r\\n\\t\\t\\tif(item.value)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(item.tag)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjItem = {name: item.tag};\\r\\n\\t\\t\\t\\t\\tif(item.attr)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tobjItem.attributes = {};\\r\\n\\t\\t\\t\\t\\t\\tobjItem.attributes[item.attr] = item.value;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__children.push(this.__exportUtil.getXML(objItem));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__children.push(item.value);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__fonts)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar fontXml = this.__fonts.toXml();\\r\\n\\t\\t\\tif(fontXml)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__children.push(fontXml);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = this.base.toXml.call(this,\\\"w:rPr\\\");\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtextSpecialContent-break.php\\r\\n\\tvar RunBreak = function(docxRef,type,clear)\\r\\n\\t{\\r\\n\\t\\t//value can be column,page,textWrapping \\r\\n\\t\\tthis.__type = null;\\r\\n\\t\\t//value can be all,left,none,right \\r\\n\\t\\tthis.__clear = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\ttype && this.type(type);\\r\\n\\t\\tclear && this.clear(clear);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,RunBreak);\\r\\n\\tRunFormat.prototype.constructor = RunBreak;\\r\\n\\tNSDocxExport.prototype.RunBreak = RunBreak;\\r\\n\\t\\r\\n\\tRunBreak.prototype.type = function(value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__type = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__type;\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunBreak.prototype.clear = function(value)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__clear = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__clear;\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunBreak.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar itemAttr = {};\\r\\n\\t\\t//default value\\r\\n\\t\\t!this.__type && (this.__type = \\\"textWrapping\\\");\\r\\n\\t\\titemAttr[\\\"w:type\\\"] = this.__type\\r\\n\\t\\tthis.__clear && (itemAttr[\\\"w:clear\\\"] = this.__clear);\\r\\n\\t\\tvar xml = null;\\r\\n\\t\\tif(Object.keys(itemAttr).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\txml = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\tname: \\\"w:br\\\",\\r\\n\\t\\t\\t\\tattributes: itemAttr,\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtextFonts.php\\r\\n\\tvar RunFonts = function(docxRef,option)\\r\\n\\t{\\r\\n\\t\\tthis.__prop = {ascii:{value:null,tag: \\\"w:ascii\\\"},cs:{value:null,tag: \\\"w:cs\\\"},eastasia:{value:null,tag:\\\"w:eastAsia\\\"},hansi:{value:null,tag:\\\"w:hAnsi\\\"},hint:{value:null,tag:\\\"w:hint\\\"}};\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\toption = option || {};\\r\\n\\t\\t(option.ascii || option.name) && this.ascii(option.ascii || option.name);\\r\\n\\t\\t(option.cs || option.ascii || option.name) && this.cs(option.cs || option.ascii || option.name);\\r\\n\\t\\t(option.eastasia || option.ascii || option.name) && this.eastAsia(option.eastasia || option.ascii || option.name);\\r\\n\\t\\t(option.hansi || option.ascii || option.name) && this.hansi(option.hansi || option.ascii || option.name);\\r\\n\\t\\toption.hint && this.hint(option.hint);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,RunFonts);\\r\\n\\tRunFonts.prototype.constructor = RunFonts;\\r\\n\\tNSDocxExport.prototype.RunFonts = RunFonts;\\r\\n\\t\\r\\n\\tRunFonts.prototype.ascii = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"ascii\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFonts.prototype.cs = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"cs\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFonts.prototype.eastAsia = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"eastasia\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFonts.prototype.hansi = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"hansi\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFonts.prototype.hint = function(value)\\r\\n\\t{\\r\\n\\t\\treturn this.__setProp(\\\"hint\\\",value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFonts.prototype.__setProp = function(key,value)\\r\\n\\t{\\r\\n\\t\\tkey = key.toLowerCase();\\r\\n\\t\\tif(this.__prop[key])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__prop[key].value = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__prop[key].value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tRunFonts.prototype.toXml = function()\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar itemAttr = {};\\r\\n\\t\\tfor(var key in this.__prop)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__prop[key];\\r\\n\\t\\t\\tif(item.value)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titemAttr[item.tag] = item.value;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar xml = null;\\r\\n\\t\\tif(Object.keys(itemAttr).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\txml = this.__exportUtil.getXML({\\r\\n\\t\\t\\t\\tname: \\\"w:rFonts\\\",\\r\\n\\t\\t\\t\\tattributes: itemAttr,\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//http://officeopenxml.com/WPtext.php\\r\\n\\tvar Text = function(docxRef,str,spaceAttr)\\r\\n\\t{\\r\\n\\t\\tthis.__str = null;\\r\\n\\t\\tthis.__spaceAttr = null;\\r\\n\\t\\tthis.base.init.call(this,docxRef);\\r\\n\\t\\tstr && this.string(str);\\r\\n\\t\\tspaceAttr && this.spaceAttr(spaceAttr);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(BaseElement,Text);\\r\\n\\tText.prototype.constructor = Text;\\r\\n\\tNSDocxExport.prototype.Text = Text;\\r\\n\\t\\r\\n\\tText.prototype.string = function(value)\\r\\n\\t{\\r\\n\\t\\tif (!this.util.isUndefinedOrNull(value)) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__str = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__str;\\r\\n\\t};\\r\\n\\t\\r\\n\\tText.prototype.spaceAttr = function(value)\\r\\n\\t{\\r\\n\\t\\tif (!this.util.isUndefinedOrNull(value)) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__spaceAttr = value;\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__spaceAttr;\\r\\n\\t};\\r\\n\\t\\r\\n\\tText.prototype.toXml = function(value)\\r\\n\\t{\\r\\n\\t\\tvar xml = this.__exportUtil.getXML({\\r\\n\\t\\t\\tname: \\\"w:t\\\",\\r\\n\\t\\t\\tattributes: {\\\"xml:space\\\": this.__spaceAttr || \\\"preserve\\\"},\\r\\n\\t\\t\\tchildren: [this.__str || \\\"\\\"]\\r\\n\\t\\t});\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar ExportUtil = function(util)\\r\\n\\t{\\r\\n\\t\\tthis.util = util;\\r\\n\\t\\tthis.xmlPrefix = '<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\\\n';\\r\\n\\t\\tthis.schemas = {\\r\\n\\t\\t\\t\\t'r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',\\r\\n\\t\\t\\t\\t'mx': 'http://schemas.microsoft.com/office/mac/excel/2008/main',\\r\\n\\t\\t\\t\\t'mc': 'http://schemas.openxmlformats.org/markup-compatibility/2006',\\r\\n\\t\\t\\t\\t'mv': 'urn:schemas-microsoft-com:mac:vml',\\r\\n\\t\\t\\t\\t'x14': 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/main',\\r\\n\\t\\t\\t\\t'x14ac': 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac',\\r\\n\\t\\t\\t\\t'xm': 'http://schemas.microsoft.com/office/excel/2006/main',\\r\\n\\t\\t\\t\\t'spreadsheetml': 'http://schemas.openxmlformats.org/spreadsheetml/2006/main',\\r\\n\\t\\t\\t\\t'relationshipPackage': 'http://schemas.openxmlformats.org/package/2006/relationships',\\r\\n\\t\\t\\t\\t'worksheet': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet',\\r\\n\\t\\t\\t\\t'stylesheet': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles',\\r\\n\\t\\t\\t\\t'sharedStrings': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings',\\r\\n\\t\\t\\t\\t'contentTypes': 'http://schemas.openxmlformats.org/package/2006/content-types',\\r\\n\\t\\t\\t\\t'officeDocument': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument',\\r\\n\\t\\t\\t\\t'package': 'http://schemas.openxmlformats.org/package/2006/relationships',\\r\\n\\t\\t\\t\\t'table': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/table',\\r\\n\\t\\t\\t\\t'spreadsheetDrawing': 'http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing',\\r\\n\\t\\t\\t\\t'drawing': 'http://schemas.openxmlformats.org/drawingml/2006/main',\\r\\n\\t\\t\\t\\t'drawingRelationship': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing',\\r\\n\\t\\t\\t\\t'image': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image',\\r\\n\\t\\t\\t\\t'chart': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart',\\r\\n\\t\\t\\t\\t'hyperlink': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink'\\r\\n\\t\\t};\\r\\n\\t\\tthis.newLine = \\\"\\\\n\\\";\\r\\n\\t\\tthis.defaultFormat = true;\\r\\n\\t};\\r\\n\\t\\t\\r\\n\\tExportUtil.prototype.getXML = function(config) \\r\\n\\t{\\r\\n\\t\\tvar retValue = '<' + config.name;\\r\\n\\t\\tvar content = '';\\r\\n\\t\\tvar xmlPrefixAdded = false;\\r\\n\\t\\tif(config.addXmlPrefix)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = this.xmlPrefix + retValue;\\r\\n\\t\\t\\txmlPrefixAdded = true;\\r\\n\\t\\t}\\r\\n\\t\\tif (config.ns) \\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = (xmlPrefixAdded ? \\\"\\\" : this.xmlPrefix) + retValue + ' xmlns=\\\"' + this.schemas[config.ns] + '\\\"';\\r\\n\\t\\t}\\r\\n\\t\\tif (config.attributes) \\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var key in config.attributes)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue += ' ' + key + '=\\\"' + this.escapeString(config.attributes[key]) + '\\\"';\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif (!this.util.isUndefinedOrNull(config.value)) \\r\\n\\t\\t{\\r\\n\\t\\t\\tcontent += this.escapeString(config.value);\\r\\n\\t\\t}\\r\\n\\t\\tif (config.children) \\r\\n\\t\\t{\\r\\n\\t\\t\\tcontent += config.children.join('');\\r\\n\\t\\t}\\r\\n\\t\\tif (content) \\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue += '>' + content + '</' + config.name + '>';\\r\\n\\t\\t} \\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue += '/>';\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isUndefinedOrNull(config.format))\\r\\n\\t\\t{\\r\\n\\t\\t\\tconfig.format = this.defaultFormat;\\r\\n\\t\\t}\\r\\n\\t\\treturn (config.format ? this.formatXml(retValue) : retValue);\\r\\n\\t\\t//return this.formatXml(retValue);\\r\\n\\t};\\r\\n\\t\\r\\n\\tExportUtil.prototype.escapeString = function(str)\\r\\n\\t{\\r\\n\\t\\treturn str;\\r\\n\\t};\\r\\n\\t\\r\\n\\tExportUtil.prototype.formatXml = function(xml,space)\\r\\n\\t{\\r\\n\\t\\tvar retValue = \\\"\\\";\\r\\n\\t\\tvar indent= \\\"\\\";\\r\\n\\t\\tspace = space || \\\"\\\\t\\\";\\r\\n\\t\\tvar arrXml = xml.split(/>\\\\s*</);\\r\\n\\t\\tvar tag = \\\"\\\";\\r\\n\\t\\tfor(var count = 0;count < arrXml.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttag = arrXml[count];\\r\\n\\t\\t\\t//decrease space\\r\\n\\t\\t\\tif(tag.match(/^\\\\/\\\\w/)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tindent = indent.substring(space.length);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tretValue += indent + \\\"<\\\" + tag + \\\">\\\\r\\\\n\\\";\\r\\n\\t\\t\\t//increase space\\r\\n\\t\\t\\tif(tag.match(/^<?\\\\w[^>]*[^\\\\/]$/)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tindent += space;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tretValue = retValue.substring(1, retValue.length - 3);\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tExportUtil.prototype.cloneObject = function(objSrc)\\r\\n\\t{\\r\\n\\t\\treturn JSON.parse(JSON.stringify(objSrc));\\r\\n\\t};\\r\\n\\t\\r\\n\\tExportUtil.prototype.getNonNullString = function(str)\\r\\n\\t{\\r\\n\\t\\treturn str = str || \\\"\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tExportUtil.prototype.getInstrText = function(str,spaceType)\\r\\n\\t{\\r\\n\\t\\treturn \\\"<w:instrText xml:space=\\\\\\\"\\\" + (spaceType || \\\"preserve\\\") + \\\"\\\\\\\">\\\" + str + \\\"</w:instrText>\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tExportUtil.prototype.getFldChar = function(charType)\\r\\n\\t{\\r\\n\\t\\treturn \\\"<w:fldChar w:fldCharType=\\\\\\\"\\\" + charType + \\\"\\\\\\\"/>\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tExportUtil.prototype.addFunctions = function(instance,objItemsName,option,callback,docxRef)\\r\\n\\t{\\r\\n\\t\\tvar objProp = this.util.isString(objItemsName) ? instance[objItemsName] : objItemsName;\\r\\n\\t\\tif(objProp && Object.keys(objProp).length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar defaultCallback = function(value,paramItem,key,paramInstance)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(value && value instanceof NSDocxExport.prototype[paramItem.className])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tparamItem.value = value;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t!paramItem.value && (paramItem.value = new NSDocxExport.prototype[paramItem.className](docxRef,value));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn paramItem.value;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tcallback = callback || defaultCallback;\\r\\n\\t\\t\\tvar item = objProp[Object.keys(objProp)[0]];\\r\\n\\t\\t\\tif(!instance[item.method])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\toption = option || {};\\r\\n\\t\\t\\t\\tfor(var key in objProp)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = objProp[key];\\r\\n\\t\\t\\t\\t\\t(function(item,key)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(!instance[item.method])\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tinstance[item.method] = function(value)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\treturn callback(value,item,key,instance);\\r\\n\\t\\t\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(option[key])\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tinstance[item.method](option[key]);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t})(item,key)\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tExportUtil.prototype.addSingleValueFunctions = function(instance,objItemsName,option,docxRef)\\r\\n\\t{\\r\\n\\t\\tvar callback = function(value,paramItem,key,paramInstance)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!paramInstance.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparamItem.value = value;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn paramItem.value;\\r\\n\\t\\t};\\r\\n\\t\\tthis.addFunctions(instance,objItemsName,option,callback,docxRef);\\r\\n\\t};\\r\\n\\t\\r\\n\\tExportUtil.prototype.getValXml = function(value,xmlTag)\\r\\n\\t{\\r\\n\\t\\tvar xml = null;\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\txml = this.getXML({\\r\\n\\t\\t\\t\\tname: xmlTag,\\r\\n\\t\\t\\t\\tattributes: {\\\"w:val\\\": value},\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t\\treturn xml;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSDocxExport;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSDocxExport\\\",NSDocxExport);\";","export const NSEditorCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\n\\r\\n\\t\\t}\\r\\nvar NSEditor = (function()\\r\\n{\\r\\n\\tfunction NSEditor(component,setting) \\r\\n\\t{\\r\\n\\t\\tthis.__orignalTextArea = component;\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\t\\r\\n\\t\\tthis.__context = window;\\r\\n\\t\\t\\r\\n\\t\\tthis.editorUtil = null;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\tthis.__selection = null;\\r\\n\\t\\tthis.__toolBar = null;\\r\\n\\t\\tthis.__execCommand = null;\\r\\n\\t\\tthis.__stack = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__divOuterContainer = null;\\r\\n\\t\\tthis.__divTabContainer = null;\\r\\n\\t\\tthis.__divBodyContainer = null;\\r\\n\\t\\tthis.__divFooterContainer = null;\\r\\n\\t\\tthis.__divFooterLeftContainer = null;\\r\\n\\t\\tthis.__divFooterRightContainer = null;\\r\\n\\t\\tthis.__divLineNumberContainer = null;\\r\\n\\t\\tthis.__divTextAreaContainer = null;\\r\\n\\t\\tthis.__compTextArea = null;\\r\\n\\t\\tthis.__divLineNumberWrapper = null;\\r\\n\\t\\tthis.__frameContentWindow = null;\\r\\n\\t\\tthis.__frameContentDoc = null;\\r\\n\\t\\tthis.__frameBody = null;\\r\\n\\t\\tthis.__txtSourceCode = null;\\r\\n\\t\\tthis.__iframePrint = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__textAreaScrollRef = null;\\r\\n\\t\\tthis.__textAreaResizeRef = null;\\r\\n\\t\\tthis.__textAreaKeyUpRef = null;\\r\\n\\t\\tthis.__textAreaKeyDownRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__textAreaObserver = null; \\r\\n\\t\\tthis.__orignalTextAreaObserver = null; \\r\\n\\t\\tthis.__timeOutInterval = null;\\r\\n\\t\\tthis.__lastTextAreaHeight = 0; \\r\\n\\t\\tthis.__lastTextAreaWidth = 0;\\r\\n\\t\\tthis.__paddingHorizontal = 0;\\r\\n\\t\\tthis.__browserDetail = null;\\r\\n\\t\\tthis.__dom = null;\\r\\n\\t\\tthis.__accessibleKeys = null;\\r\\n\\t\\tthis.__toolBarButton = null;\\r\\n\\t\\tthis.__objShortKey = {};\\r\\n\\t\\tthis.__isDisabled = false;\\r\\n\\t\\tthis.__isFrameDesignModeEnabled = false;\\r\\n\\t\\tthis.__isSourceMode = false;\\r\\n\\t\\tthis.__isInternalHTMLChange = false;\\r\\n\\t\\tthis.__hasRendered = false;\\r\\n\\t\\tthis.__renderedInterval = null;\\r\\n\\t\\tthis.__resizeInterval = null;\\r\\n\\t\\t//this.__defaultContent = \\\"<p class='nsEditorLineElement'><br></p>\\\";\\r\\n\\t\\tthis.__defaultContent = null;\\r\\n\\t\\t //queue up the functions not called as Creation Complete called later\\r\\n\\t\\tthis.__queueFunc = [];\\r\\n\\t\\t\\r\\n\\t\\tthis.__pluginsInstances = {};\\r\\n\\t\\tthis.__utilInstance = {};\\r\\n\\t\\t\\r\\n\\t\\tthis.__init();\\r\\n\\t\\t\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,this.__divOuterContainer);\\r\\n\\t};\\r\\n\\tnsExtendPrototype(NSContainerBase,NSEditor);\\r\\n\\tNSEditor.prototype.constructor = NSEditor;\\r\\n\\t\\r\\n\\tNSEditor.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__browserDetail = this.util.getBrowser();\\r\\n\\t\\tthis.__dom = this.util.getDomVariables();\\r\\n\\t\\tthis.__accessibleKeys = {ctrl:{str:\\\"ctrl\\\",isPressed:function(event,keyCode){\\r\\n\\t\\t\\treturn (event.ctrlKey || event.metaKey || keyCode === 91 || keyCode === 92 || keyCode === 224);\\r\\n\\t\\t}},\\r\\n\\t\\tshift:{str:\\\"shift\\\",isPressed:function(event,keyCode){\\r\\n\\t\\t\\treturn event.shiftKey;\\r\\n\\t\\t}},\\r\\n\\t\\talt:{str:\\\"alt\\\",isPressed:function(event,keyCode){\\r\\n\\t\\t\\treturn event.altKey;\\r\\n\\t\\t}},\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tthis.__toolBarButton = {\\\"bold\\\":{html:\\\"<i class='ns-icon ns-editor-bold' aria-hidden='true'></i>\\\",tooltip:\\\"Bold\\\",tags: [\\\"b\\\", \\\"strong\\\"],css: {fontWeight: \\\"bold\\\"},shortKey:[\\\"ctrl+b\\\"],command:\\\"bold\\\",showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"italic\\\":{html:\\\"<i class='ns-icon ns-editor-italics' aria-hidden='true'></i>\\\",tooltip:\\\"Italic\\\",tags: [\\\"i\\\", \\\"em\\\"],css: {fontStyle: \\\"italic\\\"},shortKey: [\\\"ctrl+i\\\"],command:\\\"italic\\\",showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"underline\\\":{html:\\\"<i class='ns-icon ns-editor-underline' aria-hidden='true'></i>\\\",tooltip:\\\"Underline\\\",tags: [\\\"u\\\"],css: {textDecoration: \\\"underline\\\"},shortKey: [\\\"ctrl+u\\\"],command:\\\"underline\\\",showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"strikeThrough\\\":{html:\\\"<i class='ns-icon ns-editor-strikethrough' aria-hidden='true'></i>\\\",tooltip:\\\"Strikethrough\\\",tags: [\\\"s\\\", \\\"strike\\\"],css: {textDecoration: \\\"line-through\\\"},shortKey: [\\\"ctrl+shift+s\\\"],command:\\\"strikeThrough\\\",showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"justifyCenter\\\":{html:\\\"<i class='ns-icon ns-editor-align-center' aria-hidden='true'></i>\\\",tooltip:\\\"Justify Center\\\",css: {textAlign: \\\"center\\\"},command:\\\"justifyCenter\\\"},\\r\\n\\t\\t\\t\\t   \\\"justifyLeft\\\":{html:\\\"<i class='ns-icon ns-editor-align-left' aria-hidden='true'></i>\\\",tooltip:\\\"Justify Left\\\",css: {textAlign: \\\"left\\\"},command:\\\"justifyLeft\\\"},\\r\\n\\t\\t\\t\\t   \\\"justifyRight\\\":{html:\\\"<i class='ns-icon ns-editor-align-right' aria-hidden='true'></i>\\\",tooltip:\\\"Justify Right\\\",css: {textAlign: \\\"right\\\"},command:\\\"justifyRight\\\"},\\r\\n\\t\\t\\t\\t   \\\"justifyFull\\\":{html:\\\"<i class='ns-icon ns-editor-align-justify' aria-hidden='true'></i>\\\",tooltip:\\\"Justify Full\\\",tags: [\\\"s\\\", \\\"strike\\\"],css: {textAlign: \\\"justify\\\"},command:\\\"justifyFull\\\"},\\r\\n\\t\\t\\t\\t   \\\"subscript\\\":{html:\\\"<i class='ns-icon ns-editor-subscript' aria-hidden='true'></i>\\\",tooltip:\\\"Subscript\\\",tags: [\\\"sub\\\"],command:\\\"subscript\\\",showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"superscript\\\":{html:\\\"<i class='ns-icon ns-editor-superscript' aria-hidden='true'></i>\\\",tooltip:\\\"Superscript\\\",tags: [\\\"sup\\\"],command:\\\"superscript\\\",showAsMenu: true},\\r\\n\\t\\t\\t\\t  \\r\\n\\t\\t\\t\\t   \\\"paragraph\\\":{html:\\\"<p>Normal</p>\\\",tooltip:\\\"Paragraph\\\",command: \\\"FormatBlock\\\",\\r\\n\\t\\t\\t\\t\\t\\t   \\t\\t    \\\"arguments\\\": (this.__browserDetail.isMSIE || this.__browserDetail.isSafari) ? \\\"<p>\\\" : \\\"p\\\",tags:[\\\"p\\\"]},\\r\\n\\t\\t\\t\\t   \\\"header1\\\":{html:\\\"<h1>Heading 1</h1>\\\",tooltip:\\\"Header 1\\\",\\r\\n\\t\\t\\t\\t\\t   \\t\\t\\t\\t command: \\\"FormatBlock\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t   \\t\\t \\\"arguments\\\": \\\"<h1>\\\",tags: [\\\"h1\\\"]},\\r\\n\\t\\t\\t   \\t   \\\"header2\\\":{html:\\\"<h2>Heading 2</h2>\\\",tooltip:\\\"Header 2\\\",\\r\\n\\t\\t\\t   \\t\\t   \\t\\t  command: \\\"FormatBlock\\\",\\r\\n\\t\\t   \\t\\t\\t\\t \\t  \\\"arguments\\\": \\\"<h2>\\\",tags: [\\\"h2\\\"]},\\r\\n\\t\\t\\t\\t   \\\"header3\\\":{html:\\\"<h3>Heading 3</h3>\\\",tooltip:\\\"Header 3\\\",\\r\\n\\t\\t\\t\\t\\t   \\t\\t  command: \\\"FormatBlock\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t  \\\"arguments\\\": \\\"<h3>\\\",tags: [\\\"h3\\\"]},\\r\\n\\t\\t\\t\\t   \\\"header4\\\":{html:\\\"<h4>Heading 4</h4>\\\",tooltip:\\\"Header 4\\\",\\r\\n\\t\\t\\t\\t\\t   \\t\\t  command: \\\"FormatBlock\\\",\\r\\n\\t\\t\\t   \\t\\t  \\t\\t \\\"arguments\\\": \\\"<h4>\\\",tags: [\\\"h4\\\"]},\\r\\n\\t\\t\\t\\t   \\\"orderedList\\\":{html:\\\"<i class='ns-icon ns-editor-ordered-list' aria-hidden='true'></i>\\\",tooltip:\\\"Ordered List\\\",command:\\\"insertorderedlist\\\",afterCommand:this.__orderedListHandler.bind(this),showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"unorderedList\\\":{html:\\\"<i class='ns-icon ns-editor-unordered-list' aria-hidden='true'></i>\\\",tooltip:\\\"Unordered List\\\",command:\\\"insertunorderedlist\\\",afterCommand:this.__orderedListHandler.bind(this),showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"undo\\\":{html:\\\"<i class='ns-icon ns-editor-undo' aria-hidden='true'></i>\\\",tooltip:\\\"Undo\\\",shortKey:[\\\"ctrl+z\\\"],command:\\\"undo\\\",showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"redo\\\":{html:\\\"<i class='ns-icon ns-editor-redo' aria-hidden='true'></i>\\\",tooltip:\\\"Redo\\\",shortKey:[\\\"ctrl+y\\\"],command:\\\"redo\\\",showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"outdent\\\":{html:\\\"<i class='ns-icon ns-editor-decrease-indent' aria-hidden='true'></i>\\\",tooltip:\\\"Decrease Indent\\\",command:\\\"outdent\\\",showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"indent\\\":{html:\\\"<i class='ns-icon ns-editor-increase-indent' aria-hidden='true'></i>\\\",tooltip:\\\"Increase Indent\\\",command:\\\"indent\\\",showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"viewSourceCode\\\":{html:\\\"<i class='ns-icon ns-editor-source' aria-hidden='true'></i>\\\",tooltip:\\\"View Source Code\\\",click: this.__viewSourceCodeHandler.bind(this),showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"clear\\\":{html:\\\"<i class='ns-icon ns-editor-new-doc' aria-hidden='true'></i>\\\",tooltip:\\\"Empty Document\\\",click: this.__emptyDocHandler.bind(this),showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"print\\\":{html:\\\"<i class='ns-icon ns-editor-print' aria-hidden='true'></i>\\\",tooltip:\\\"Print\\\",click: this.__printHandler.bind(this),showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"preview\\\":{html:\\\"<i class='ns-icon ns-editor-preview' aria-hidden='true'></i>\\\",tooltip:\\\"Preview\\\",click: this.__previewHandler.bind(this),showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"pageBreakForPrinting\\\":{html:\\\"<i class='ns-icon ns-editor-bookmark' aria-hidden='true'></i>\\\",tooltip:\\\"Insert Page Break for Printing\\\",click: this.__pageBreakForPrintingHandler.bind(this),showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"horizontalRule\\\":{html:\\\"<i class='ns-icon ns-editor-minus' aria-hidden='true'></i>\\\",tooltip:\\\"Insert Horizontal Line\\\",command:\\\"insertHorizontalRule\\\",tags:[\\\"hr\\\"],showAsMenu: true},\\r\\n\\t\\t\\t\\t   \\\"fontFamily\\\":{html:\\\"<i class='ns-icon ns-editor-font' aria-hidden='true'></i>\\\",tooltip:\\\"Font Family\\\",showAsMenu: true,\\r\\n\\t\\t\\t   \\t\\t\\tisDropdown:true,\\r\\n\\t\\t\\t   \\t\\t\\tdataSource:[{value:\\\"Arial\\\",html:\\\"<span style=\\\\\\\"font-family: Arial\\\\\\\">Arial</span>\\\",tooltip:\\\"Arial\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Arial\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Arial Black\\\",html:\\\"<span style=\\\\\\\"font-family: Arial Black\\\\\\\">Arial Black</span>\\\",tooltip:\\\"Arial Black\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Arial Black\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Courier\\\",html:\\\"<span style=\\\\\\\"font-family: Courier\\\\\\\">Courier</span>\\\",tooltip:\\\"Courier\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Courier\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Courier New\\\",html:\\\"<span style=\\\\\\\"font-family: Courier New\\\\\\\">Courier New</span>\\\",tooltip:\\\"Courier New\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Courier New\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Comic Sans MS\\\",html:\\\"<span style=\\\\\\\"font-family: Comic Sans MS\\\\\\\">Comic Sans MS</span>\\\",tooltip:\\\"Comic Sans MS\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Comic Sans MS\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Courier\\\",html:\\\"<span style=\\\\\\\"font-family: Courier\\\\\\\">Courier</span>\\\",tooltip:\\\"Courier\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Courier\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Georgia\\\",html:\\\"<span style=\\\\\\\"font-family: Georgia\\\\\\\">Georgia</span>\\\",tooltip:\\\"Georgia\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Georgia\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Impact\\\",html:\\\"<span style=\\\\\\\"font-family: Impact\\\\\\\">Impact</span>\\\",tooltip:\\\"Impact\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Impact\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Lucida Grande\\\",html:\\\"<span style=\\\\\\\"font-family: Lucida Grande\\\\\\\">Lucida Grande</span>\\\",tooltip:\\\"Lucida Grande\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Lucida Grande\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Lucida Sans\\\",html:\\\"<span style=\\\\\\\"font-family: Lucida Sans\\\\\\\">Lucida Sans</span>\\\",tooltip:\\\"Lucida Sans\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Lucida Sans\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Serif\\\",html:\\\"<span style=\\\\\\\"font-family: Serif\\\\\\\">Serif</span>\\\",tooltip:\\\"Serif\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Serif\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Sans\\\",html:\\\"<span style=\\\\\\\"font-family: Sans\\\\\\\">Sans</span>\\\",tooltip:\\\"Sans\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Sans\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Tahoma\\\",html:\\\"<span style=\\\\\\\"font-family: Tahoma\\\\\\\">Tahoma</span>\\\",tooltip:\\\"Tahoma\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Tahoma\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Times\\\",html:\\\"<span style=\\\\\\\"font-family: Times\\\\\\\">Times</span>\\\",tooltip:\\\"Times\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Times\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Times New Roman\\\",html:\\\"<span style=\\\\\\\"font-family: Times New Roman\\\\\\\">Times New Roman</span>\\\",tooltip:\\\"Times New Roman\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Times New Roman\\\"},\\r\\n\\t\\t\\t   \\t\\t\\t            {value:\\\"Verdana\\\",html:\\\"<span style=\\\\\\\"font-family: Verdana\\\\\\\">Verdana</span>\\\",tooltip:\\\"Verdana\\\",command:\\\"fontName\\\",\\\"arguments\\\":\\\"Verdana\\\"}]},\\r\\n\\t\\t\\t\\t   \\\"fontSize\\\":{html:\\\"<i class='ns-icon ns-editor-font-size' aria-hidden='true'></i>\\\",tooltip:\\\"Font Size\\\",showAsMenu: true,\\r\\n\\t\\t\\t\\t\\t   \\t\\t    isDropdown:true,dataSource:[]},\\r\\n\\t\\t\\t\\t   \\\"paragraphFormat\\\":{html:\\\"<i class='ns-icon ns-editor-paragraph' aria-hidden='true'></i>\\\",tooltip:\\\"Paragraph Format\\\",showAsMenu: true,\\r\\n\\t\\t\\t\\t\\t   \\t\\t\\tisDropdown:true,\\r\\n\\t\\t\\t\\t\\t   \\t\\t\\tdataSource:[{value:\\\"paragraph\\\",htmlKey:\\\"paragraph\\\"},\\r\\n\\t\\t\\t\\t\\t   \\t\\t\\t            {value:\\\"header1\\\",htmlKey:\\\"header1\\\"},\\r\\n\\t\\t\\t\\t\\t   \\t\\t\\t            {value:\\\"header2\\\",htmlKey:\\\"header2\\\"},\\r\\n\\t\\t\\t\\t\\t   \\t\\t\\t            {value:\\\"header3\\\",htmlKey:\\\"header3\\\"},\\r\\n\\t\\t\\t\\t\\t   \\t\\t\\t            {value:\\\"header4\\\",htmlKey:\\\"header4\\\"}]},\\r\\n \\t\\t\\t       \\\"align\\\":{html:\\\"<i class='ns-icon ns-editor-align-left' aria-hidden='true'></i>\\\",tooltip:\\\"Align\\\",showAsMenu: true,\\r\\n\\t \\t\\t\\t    \\t  \\t\\tisDropdown:true,\\r\\n\\t \\t\\t\\t    \\t  \\t\\tdataSource:[{value:\\\"justifyCenter\\\",htmlKey:\\\"justifyCenter\\\"},\\r\\n\\t \\t\\t\\t    \\t  \\t\\t            {value:\\\"justifyLeft\\\",htmlKey:\\\"justifyLeft\\\"},\\r\\n\\t \\t\\t\\t    \\t  \\t\\t            {value:\\\"justifyRight\\\",htmlKey:\\\"justifyRight\\\"},\\r\\n\\t \\t\\t\\t    \\t  \\t\\t            {value:\\\"justifyFull\\\",htmlKey:\\\"justifyFull\\\"}]},\\r\\n\\t \\t\\t       \\\"color\\\":{html:\\\"<i class='ns-icon ns-editor-font-color' aria-hidden='true'></i>\\\",tooltip:\\\"Font Color\\\",showAsMenu: true,\\r\\n\\t \\t\\t\\t\\t\\t\\t   isDropdown:true,dataSource:[]},\\r\\n\\t \\t\\t\\t   \\\"backgroundColor\\\":{html:\\\"<i class='ns-icon ns-editor-background-color' aria-hidden='true'></i>\\\",tooltip:\\\"Background Color\\\",showAsMenu: true,\\r\\n\\t\\t \\t\\t\\t\\t\\t   isDropdown:true,dataSource:[]},\\r\\n\\t\\t\\t\\t };\\r\\n\\t\\t//the browser doesnot allow font size > 7\\r\\n\\t\\tvar arrFontSize = [{label:\\\"xx-large\\\",style:\\\"xx-large\\\",value:7},\\r\\n\\t\\t                   {label:\\\"x-large\\\",style:\\\"x-large\\\",value:6},\\r\\n\\t\\t                   {label:\\\"large\\\",style:\\\"large\\\",value:5},\\r\\n\\t\\t                   {label:\\\"medium\\\",style:\\\"medium\\\",value:4},\\r\\n\\t\\t                   {label:\\\"small\\\",style:\\\"small\\\",value:3},\\r\\n\\t\\t                   {label:\\\"x-small\\\",style:\\\"x-small\\\",value:2},\\r\\n\\t\\t                   {label:\\\"xx-small\\\",style:\\\"xx-small\\\",value:1}];\\r\\n\\t\\tvar fontDataSource = [];\\r\\n\\t\\tfor(var count = 0;count < arrFontSize.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = arrFontSize[count];\\r\\n\\t\\t\\tfontDataSource.push({value:item.label,html:\\\"<span style=\\\\\\\"font-size: \\\" + item.style + \\\"\\\\\\\">\\\" + item.label + \\\"</span>\\\",command:\\\"fontsize\\\",\\\"arguments\\\":item.value});\\r\\n\\t\\t}\\r\\n\\t\\tthis.__toolBarButton[\\\"fontSize\\\"].dataSource = fontDataSource;\\r\\n\\t\\tvar arrForeColor = [{label:\\\"#000000\\\",style:\\\"#000000\\\",value:\\\"#000000\\\"},\\r\\n\\t\\t                    {label:\\\"#0000FF\\\",style:\\\"#0000FF\\\",value:\\\"#0000FF\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t{label:\\\"#30AD23\\\",style:\\\"#30AD23\\\",value:\\\"#30AD23\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t{label:\\\"#FF7F00\\\",style:\\\"#FF7F00\\\",value:\\\"#FF7F00\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t{label:\\\"#FF0000\\\",style:\\\"#FF0000\\\",value:\\\"#FF0000\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t{label:\\\"#FFFF00\\\",style:\\\"#FFFF00\\\",value:\\\"#FFFF00\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t{label:\\\"#FFFFFF\\\",style:\\\"#FFFFFF\\\",value:\\\"#FFFFFF\\\"}];\\r\\n\\t\\tvar foreColorDataSource = [];\\r\\n\\t\\tfor(var count = 0;count < arrForeColor.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = arrForeColor[count];\\r\\n\\t\\t\\tforeColorDataSource.push({value:item.label,html:\\\"<span style=\\\\\\\"color: \\\" + item.style + \\\"\\\\\\\">\\\" + item.label + \\\"</span>\\\",command:\\\"forecolor\\\",\\\"arguments\\\":item.value});\\r\\n\\t\\t}\\r\\n\\t\\tthis.__toolBarButton[\\\"color\\\"].dataSource = foreColorDataSource;\\r\\n\\t\\tvar arrBackColor = [{label:\\\"#000000\\\",style:\\\"#000000\\\",value:\\\"#000000\\\"},\\r\\n\\t\\t                    {label:\\\"#0000FF\\\",style:\\\"#0000FF\\\",value:\\\"#0000FF\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t{label:\\\"#30AD23\\\",style:\\\"#30AD23\\\",value:\\\"#30AD23\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t{label:\\\"#FF7F00\\\",style:\\\"#FF7F00\\\",value:\\\"#FF7F00\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t{label:\\\"#FF0000\\\",style:\\\"#FF0000\\\",value:\\\"#FF0000\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t{label:\\\"#FFFF00\\\",style:\\\"#FFFF00\\\",value:\\\"#FFFF00\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t{label:\\\"#FFFFFF\\\",style:\\\"#FFFFFF\\\",value:\\\"#FFFFFF\\\"}];\\r\\n\\t\\tvar backColorDataSource = [];\\r\\n\\t\\tfor(var count = 0;count < arrBackColor.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = arrBackColor[count];\\r\\n\\t\\t\\tbackColorDataSource.push({value:item.label,html:\\\"<span style=\\\\\\\"color: \\\" + item.style + \\\"\\\\\\\">\\\" + item.label + \\\"</span>\\\",command:\\\"backcolor\\\",\\\"arguments\\\":item.value});\\r\\n\\t\\t}\\r\\n\\t\\tthis.__toolBarButton[\\\"backgroundColor\\\"].dataSource = backColorDataSource;\\r\\n\\t\\tthis.__initializeModules();\\r\\n\\t\\tthis.__initializePlugins();\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t\\tthis.__initDefault();\\r\\n\\t\\tthis.__initializeTools();\\r\\n\\t\\tthis.__callInitializeInPluggin();\\r\\n\\t\\tthis.__createComponent();\\r\\n\\t\\tthis.attachResizeListener();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t\\tthis.util.removeStyleClass(this.__dom.doc.body,\\\"nsEditorPresent\\\");\\r\\n\\t\\tthis.__callDestroyInPluggin();\\r\\n\\t\\tclearTimeout(this.__resizeInterval);\\r\\n\\t\\tvar listenerComponent = this.__getListenerComponent();\\r\\n\\t\\tif(this.__textAreaScrollRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar element = this.__getScrollableComponent();\\r\\n\\t\\t\\tthis.util.removeEvent(element,\\\"scroll\\\",this.__textAreaScrollRef);\\r\\n\\t\\t\\tthis.__textAreaScrollRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__textAreaResizeRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(listenerComponent,\\\"resize\\\",this.__textAreaResizeRef);\\r\\n\\t\\t\\tthis.__textAreaResizeRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__textAreaKeyUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(listenerComponent,\\\"keyup\\\",this.__textAreaKeyUpRef);\\r\\n\\t\\t\\tthis.__textAreaKeyUpRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__textAreaKeyDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(listenerComponent,\\\"keydown\\\",this.__textAreaKeyDownRef);\\r\\n\\t\\t\\tthis.__textAreaKeyDownRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__toolBar.destroy();\\r\\n\\t\\tif(this.__orignalTextAreaObserver)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__orignalTextAreaObserver.disconnect();\\r\\n\\t\\t\\tthis.__orignalTextAreaObserver = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__textAreaObserver)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__textAreaObserver.disconnect();\\r\\n\\t\\t\\tthis.__textAreaObserver = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__divOuterContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__divOuterContainer.parentNode)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divOuterContainer.parentNode.removeChild(this.__divOuterContainer);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__divOuterContainer = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__orignalTextArea)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__orignalTextArea,\\\"nsEditorTextAreaHidden\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__iframePrint)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__iframePrint.parentNode)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__iframePrint.parentNode.removeChild(this.__iframePrint);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__iframePrint = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tvar baseMeasurement = this.__baseComponent.getBoundingClientRect();\\r\\n\\t\\tif(!this.__lastBaseMeasurement || this.__lastBaseMeasurement.height !== baseMeasurement.height || this.__lastBaseMeasurement.width !== baseMeasurement.width)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tclearTimeout(this.__resizeInterval);\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.__resizeInterval = setTimeout(function(){\\r\\n\\t\\t\\t\\tself.__dispatchInternalEvent(\\\"resize\\\",{orignalEvent:event},{orignalEvent:event});\\r\\n\\t\\t\\t\\tself.__callResizedInPluggin([event]);\\r\\n\\t\\t\\t\\tself.base.componentResized.call(self,event);\\r\\n\\t\\t\\t}, 250);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.registerPlugin = function(name,pluggin) \\r\\n\\t{\\r\\n\\t\\tif(name && pluggin)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!NSEditor.__plugins)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tNSEditor.__plugins = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!NSEditor.__plugins[name])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tNSEditor.__plugins[name] = pluggin;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.registerUtil = function(name,util) \\r\\n\\t{\\r\\n\\t\\tif(name && util)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!NSEditor.__util)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tNSEditor.__util = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!NSEditor.__util[name])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tNSEditor.__util[name] = util;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//if setting[\\\"enableLineNumber\\\"] is true then the components for line Number is created and then \\r\\n\\t// with toggleLineNumber function the Line Number visibility can be toggled\\r\\n\\tNSEditor.prototype.toggleLineNumber = function() \\r\\n\\t{\\r\\n\\t\\tthis.__config[\\\"enableLineNumber\\\"] = !this.__config[\\\"enableLineNumber\\\"];\\r\\n\\t\\tthis.__setLineNumberVisibility(this.__config[\\\"enableLineNumber\\\"]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.setDisabled = function(isDisabled) \\r\\n\\t{\\r\\n\\t\\tthis.__isDisabled = isDisabled;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.getDisabled = function() \\r\\n\\t{\\r\\n\\t\\treturn this.__isDisabled;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.getText = function() \\r\\n\\t{\\r\\n\\t\\tvar text = this.__getTextFromTextArea();\\r\\n\\t\\treturn (text ? text.replace(/(\\\\r\\\\n|\\\\n|\\\\r)/gm, \\\"\\\") : \\\"\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.setText = function(text) \\r\\n\\t{\\r\\n\\t\\tthis.__setTextIntoTextArea(text);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.getHtml = function() \\r\\n\\t{\\r\\n\\t\\treturn this.__getHtmlFromTextArea();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.setHtml = function(html) \\r\\n\\t{\\r\\n\\t\\tthis.__setHtmlIntoTextArea(html);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__initDefault = function()\\r\\n\\t{\\r\\n\\t\\t//item in autoSuggestTriggers will be {keyCode: 32, ctrlKey: true,shiftKey: false, preventDefault: true}\\r\\n\\t\\tif(!this.__config[\\\"autoSuggestTriggers\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config[\\\"autoSuggestTriggers\\\"] = [];\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__config[\\\"mode\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config[\\\"mode\\\"] = NSEditor.MODE_TEXTAREA;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__setDefaultContent();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__setDefaultContent = function()\\r\\n\\t{\\r\\n\\t\\tthis.__defaultContent = this.__getDefaultContent();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getDefaultContent = function(asHtml)\\r\\n\\t{\\r\\n\\t\\tasHtml = this.util.isUndefinedOrNull(asHtml) ? true : Boolean.parse(asHtml);\\r\\n\\t\\tvar defaultElement = this.util.createElement(this.__config[\\\"enterElement\\\"],null,\\\"nsEditorLineElement\\\");\\r\\n\\t\\tif(defaultElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefaultElement.innerHTML = \\\"<br>\\\"; \\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.throwNSError(\\\"NSEditor\\\",\\\"Enter a valid enterElement property\\\");\\r\\n\\t\\t}\\r\\n\\t\\treturn asHtml ? (defaultElement ? defaultElement.outerHTML : null) : defaultElement;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setting = {};\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__config)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config = {};\\r\\n\\t\\t}\\r\\n\\t\\tvar setting = this.__setting;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"context\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__context = setting[\\\"context\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\tenableToolBar: this.util.isUndefinedOrNull(this.__setting[\\\"enableToolBar\\\"]) ? true : Boolean.parse(this.__setting[\\\"enableToolBar\\\"]),\\r\\n\\t\\t\\t\\t\\ttoolBarButton: this.__setting[\\\"toolBarButton\\\"],\\r\\n\\t\\t\\t\\t\\tenableReadOnly: Boolean.parse(this.__setting[\\\"enableReadOnly\\\"]),\\r\\n\\t\\t\\t\\t\\twidth: this.__setting[\\\"width\\\"] || \\\"auto\\\",\\r\\n\\t\\t\\t\\t    height: this.__setting[\\\"height\\\"] || \\\"auto\\\",\\r\\n\\t\\t\\t\\t    minWidth: this.__setting[\\\"minWidth\\\"] || 200,\\r\\n\\t\\t\\t\\t\\tminHeight: this.__setting[\\\"minHeight\\\"] || 200,\\r\\n\\t\\t\\t\\t\\tmaxWidth: this.__setting[\\\"maxWidth\\\"] || \\\"100%\\\",\\r\\n\\t\\t\\t\\t\\tmaxHeight: this.__setting[\\\"maxHeight\\\"] || \\\"100%\\\",\\r\\n\\t\\t\\t\\t    theme: this.__setting[\\\"theme\\\"] || \\\"White\\\",\\r\\n\\t\\t\\t\\t    //if this property is true then if bold is selected then in dom we use <b> or <strong> tag etc\\r\\n\\t\\t\\t\\t    //else we use style to do the same\\r\\n\\t\\t\\t\\t    enableTagsForProps: Boolean.parse(this.__setting[\\\"enableTagsForProps\\\"]),\\r\\n\\t\\t\\t\\t\\tenableSpellCheck: this.util.isUndefinedOrNull(this.__setting[\\\"enableSpellCheck\\\"]) ? true : Boolean.parse(this.__setting[\\\"enableSpellCheck\\\"]),\\r\\n\\t\\t\\t\\t\\tenableTabBar: Boolean.parse(this.__setting[\\\"enableTabBar\\\"]),\\r\\n\\t\\t\\t\\t\\tenableLineNumber: Boolean.parse(this.__setting[\\\"enableLineNumber\\\"]),\\r\\n\\t\\t\\t\\t\\tenableToolBarActive: Boolean.parse(this.__setting[\\\"enableToolBarActive\\\"]),\\r\\n\\t\\t\\t\\t\\tenableAutoSuggest: Boolean.parse(this.__setting[\\\"enableAutoSuggest\\\"]),\\r\\n\\t\\t\\t\\t\\tautoSuggestTriggers: this.__setting[\\\"autoSuggestTriggers\\\"],\\r\\n\\t\\t\\t\\t\\tmode: this.__setting[\\\"mode\\\"],\\r\\n\\t\\t\\t\\t\\tplaceholder: this.__setting[\\\"placeholder\\\"],\\r\\n\\t\\t\\t\\t\\tenterElement: this.__setting[\\\"enterElement\\\"] || \\\"p\\\",// should ideally be <p> or <div> as others can create problems\\r\\n\\t\\t\\t\\t\\tmaxCharCount: this.util.isUndefinedOrNull(this.__setting[\\\"maxCharCount\\\"]) ? null : parseInt(this.__setting[\\\"maxCharCount\\\"]),\\r\\n\\t\\t\\t\\t\\tcharCounterType: this.__setting[\\\"charCounterType\\\"] || \\\"char\\\", //char, byte, byte-html\\r\\n\\t\\t\\t\\t\\tenableStickyToolbar: this.util.isUndefinedOrNull(this.__setting[\\\"enableStickyToolbar\\\"]) ? true : Boolean.parse(this.__setting[\\\"enableStickyToolbar\\\"]),\\r\\n\\t\\t\\t\\t\\tenableStickyToolbarForMobile: this.util.isUndefinedOrNull(this.__setting[\\\"enableStickyToolbarForMobile\\\"]) ? true : Boolean.parse(this.__setting[\\\"enableStickyToolbarForMobile\\\"]),\\r\\n\\t\\t\\t\\t\\tpromptBoxCallback: this.__setting[\\\"promptBoxCallback\\\"] ? this.util.getFunction(this.__setting[\\\"promptBoxCallback\\\"]) : null,\\r\\n\\t\\t\\t};\\r\\n\\t\\t}\\r\\n\\t\\tthis.__callSetSettingsInPluggin();\\r\\n\\t\\tif(this.__config.enableToolBar && (!this.__config.toolBarButton || this.__config.toolBarButton.length == 0))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.toolBarButton = [];\\r\\n\\t\\t\\tfor(var key in this.__toolBarButton)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__toolBarButton[key].showAsMenu)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__config.toolBarButton.push(key);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__init = function()\\r\\n\\t{\\r\\n\\t\\tthis.__divOuterContainer = document.createElement(\\\"div\\\");\\r\\n\\t\\tthis.__divOuterContainer.setAttribute(\\\"class\\\",\\\"nsEditor nsEditorOuterContainer\\\");\\r\\n\\t\\tif(this.__orignalTextArea && this.__orignalTextArea.parentNode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__orignalTextArea.nextSibling)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__orignalTextArea.parentNode.insertBefore(this.__divOuterContainer, this.__orignalTextArea.nextSibling);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__orignalTextArea.parentNode.appendChild(this.__divOuterContainer);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tdocument.body.appendChild(this.__divOuterContainer);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__initializeTools = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__createComponent = function()\\r\\n\\t{\\r\\n\\t\\tthis.util.addStyleClass(this.__dom.doc.body,\\\"nsEditorPresent\\\");\\r\\n\\t\\tthis.__createFixedComp();\\r\\n\\t\\tthis.__toolBar.createToolBar();\\r\\n\\t\\tthis.__createTabBar();\\r\\n\\t\\tthis.__createBody();\\r\\n\\t\\tthis.__createFooter();\\r\\n\\t\\tthis.__createPlaceHolder();\\r\\n\\t\\tif(this.__isModeTextArea())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initTextArea();\\r\\n\\t\\t}\\r\\n\\t\\t/*if(this.__isModeTextArea())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__callTextAreaFunc();\\r\\n\\t\\t}*/\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__renderComplete = function()\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar callback = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(self.__hasRendered)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(self.__renderedInterval)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tclearInterval(self.__renderedInterval);\\r\\n\\t\\t\\t\\t\\tself.__renderedInterval = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(self.__queueFunc && self.__queueFunc.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var count = self.__queueFunc.length - 1;count > -1;count--)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tself.__queueFunc[count]();\\r\\n\\t\\t\\t\\t\\t\\tself.__queueFunc.splice(count, 1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tthis.__renderedInterval = setInterval(callback, 300);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__callTextAreaFunc = function()\\r\\n\\t{\\r\\n\\t\\tthis.__callComponentsInitializedInPluggin();\\r\\n\\t\\tthis.__setStyles();\\r\\n\\t\\tthis.__renderComplete();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__resizeCallback = function(forciblyCalc,delayPeriod)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar callback = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__setBodyStyle(forciblyCalc);\\r\\n\\t\\t\\tself.__resizeIframe();\\r\\n\\t\\t\\tself.__drawLineNumbers(1);\\r\\n\\t\\t};\\r\\n\\t\\tif(!delayPeriod)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdelayPeriod = 0;\\r\\n\\t\\t}\\r\\n\\t\\tsetTimeout(callback,delayPeriod);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__setStyles = function(delayPeriod)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar callback = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar css = {};\\r\\n\\t\\t\\tcss.minWidth = self.__config.minWidth;\\r\\n\\t\\t\\tcss.minHeight = self.__config.minHeight;\\r\\n\\t\\t\\tvar maxWidth = self.__config.maxWidth;\\r\\n\\t\\t\\tcss.maxWidth = maxWidth;\\r\\n\\t\\t\\tself.util.css(self.__divOuterContainer,css);\\r\\n\\t\\t\\tself.__width(self.__config.width);\\r\\n\\t\\t\\tself.__height(self.__config.height);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t//delay while rendering as the toolBox is taking time to get its height\\r\\n\\t\\t\\tself.__setBodyStyle(false,false);\\r\\n\\t\\t};\\r\\n\\t\\tif(!delayPeriod)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdelayPeriod = 0;\\r\\n\\t\\t}\\r\\n\\t\\tsetTimeout(callback,delayPeriod);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__setBodyStyle = function(forciblyCalc,isDelay)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar callback = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setHeight = function(value)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrCon = [self.__divLineNumberContainer,self.__divTextAreaContainer,self.__compTextArea];//self.__getIFrameBody()\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrCon.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar con = arrCon[count];\\r\\n\\t\\t\\t\\t\\tif(con)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tself.util.css(con,\\\"height\\\",value);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tforciblyCalc = Boolean.parse(forciblyCalc);\\r\\n\\t\\t\\tvar height = \\\"auto\\\";\\r\\n\\t\\t\\tif(self.__config.height == \\\"auto\\\" && !forciblyCalc)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetHeight(\\\"auto\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar totalHeight = self.__divOuterContainer.offsetHeight;\\r\\n\\t\\t\\t\\tvar nonEditorHeight = self.__getNonEditorHeight();\\r\\n\\t\\t\\t\\theight = totalHeight - nonEditorHeight;\\r\\n\\t\\t\\t\\tif(forciblyCalc)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsetHeight(\\\"\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tself.__heightBody(height);\\r\\n\\t\\t\\tself.__setBodyMinHeight();\\r\\n\\t\\t};\\r\\n\\t\\tif(isDelay)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsetTimeout(callback,100);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tcallback();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__setBodyMinHeight = function()\\r\\n\\t{\\r\\n\\t\\tvar nonEditorHeight = this.__getNonEditorHeight();\\r\\n\\t\\tvar minHeight = this.__config.minHeight - nonEditorHeight;\\r\\n\\t\\tthis.util.css(this.__divBodyContainer,\\\"minHeight\\\",minHeight);\\r\\n\\t\\tvar arrCon = [this.__divLineNumberContainer,this.__divTextAreaContainer,this.__compTextArea,this.__getIFrameBody()];//\\r\\n\\t\\tfor(var count = 0;count < arrCon.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar con = arrCon[count];\\r\\n\\t\\t\\tif(con)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.css(con,\\\"minHeight\\\",minHeight - 2);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__hasRendered = true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getNonEditorHeight = function()\\r\\n\\t{\\r\\n\\t\\tvar totalHeight = 0;\\r\\n\\t\\tif(this.__toolBar.__divToolBarContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttotalHeight += this.__toolBar.__divToolBarContainer.offsetHeight;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__divTabContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttotalHeight += this.__divTabContainer.offsetHeight;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__divFooterContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttotalHeight += this.__divFooterContainer.offsetHeight;\\r\\n\\t\\t}\\r\\n\\t\\treturn totalHeight;\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\t\\r\\n\\tNSEditor.prototype.__createTabBar = function()\\r\\n\\t{\\r\\n\\t\\tthis.__divTabContainer = this.util.createDiv(this.getID() + \\\"tabcontainer\\\",\\\"nsEditorTabContainer\\\");\\r\\n\\t\\tthis.__divOuterContainer.appendChild(this.__divTabContainer);\\r\\n\\t\\tif(this.__config[\\\"enableTabBar\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\t//this.__createToolBarComponents();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__handleVisibilityOfComponent(this.__divTabContainer,\\\"enableTabBar\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__createBody = function()\\r\\n\\t{\\r\\n\\t\\tthis.__divBodyContainer = this.util.createDiv(this.getID() + \\\"bodycontainer\\\",\\\"nsEditorBodyContainer\\\");\\r\\n\\t\\tthis.__divLineNumberContainer = this.util.createDiv(this.getID() + \\\"linenumbercontainer\\\",\\\"nsEditorLineNumberContainer\\\");\\r\\n\\t\\tthis.__divTextAreaContainer = this.util.createDiv(this.getID() + \\\"textareacontainer\\\",\\\"nsEditorTextAreaContainer\\\");\\r\\n\\t\\tthis.__divBodyContainer.appendChild(this.__divLineNumberContainer);\\r\\n\\t\\tthis.__divBodyContainer.appendChild(this.__divTextAreaContainer);\\r\\n\\t\\tthis.__divOuterContainer.appendChild(this.__divBodyContainer);\\r\\n\\t\\tthis.__compTextArea = this.__createTextArea();\\r\\n\\t\\tthis.__divTextAreaContainer.appendChild(this.__compTextArea);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__createTextArea = function()\\r\\n\\t{\\r\\n\\t\\tvar divTextArea = null;\\r\\n\\t\\tvar content = \\\"\\\";\\r\\n\\t\\tif(this.__isModeTextArea())\\r\\n\\t\\t{\\r\\n\\t\\t\\t//do not add class here as it will get overriden from if orignalTextArea has class\\r\\n\\t\\t\\tdivTextArea = this.util.createDiv(this.getID() + \\\"textArea\\\",null);\\r\\n\\t\\t\\tif(!this.__config.enableReadOnly)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivTextArea.setAttribute(\\\"contenteditable\\\",true);\\r\\n\\t\\t\\t\\tdivTextArea.setAttribute(\\\"spellcheck\\\",this.__config.enableSpellCheck);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__orignalTextArea)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__orignalTextArea.value.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcontent = this.__orignalTextArea.value;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar arrAttributes = [\\\"tabIndex\\\"];\\r\\n\\t\\t\\t\\tvar arrNewAttributes = [\\\"tabIndex\\\"];\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrAttributes.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__orignalTextArea.getAttribute(arrAttributes[count]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdivTextArea.setAttribute(arrNewAttributes[count],this.__orignalTextArea.getAttribute(arrAttributes[count]));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__config.defaultValue && this.__config.defaultValue.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivTextArea.appendChild(this.__dom.doc.createTextNode(this.__config.defaultValue));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.addStyleClass(divTextArea,\\\"nsEditorTextArea\\\");\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tdivTextArea = this.util.createElement(\\\"iframe\\\",this.getID() + \\\"textArea\\\",\\\"nsEditorTextAreaIFrame\\\");\\r\\n\\t\\t\\tif(this.__context.location.protocol === \\\"https:\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivTextArea.setAttribute(\\\"src\\\",\\\"about:blank\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdivTextArea.setAttribute(\\\"frameborder\\\",\\\"0\\\");\\r\\n\\t\\t\\tdivTextArea.setAttribute(\\\"allowtransparency\\\",\\\"true\\\");\\r\\n\\t\\t\\tdivTextArea.setAttribute(\\\"tabindex\\\",\\\"-1\\\");\\r\\n\\t\\t\\tif(this.__orignalTextArea)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t/*if(this.__orignalTextArea.getAttribute(\\\"tabindex\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdivTextArea.setAttribute(\\\"tabindex\\\",this.__orignalTextArea.getAttribute(\\\"tabindex\\\"));\\r\\n\\t\\t\\t\\t}*/\\r\\n\\t\\t\\t\\tif(this.__orignalTextArea.value.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcontent = this.__orignalTextArea.value;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar styleHtml = \\\"html\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t{\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tmargin:0px;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\theight:auto;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t}\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t.nsEditorBody\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t{\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\theight:auto;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tbackground:transparent;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tcolor:#000000;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tposition:relative;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tz-index: 2;\\\\r\\\\n\\\" +\\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t-webkit-user-select:auto;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tmargin:0px;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tmin-height:50px;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tpadding: 5px;\\\\r\\\\n\\\" +\\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\toverflow: auto;\\\\r\\\\n\\\" +\\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t}\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t.nsEditorBody:after\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t{\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tcontent:\\\\'\\\\';\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tdisplay:block;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tclear:both;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t}\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t.nsEditorBody::-moz-selection\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t{\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tbackground:#b5d6fd;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tcolor:#000;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t}\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t.nsEditorBody::selection\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t{\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tbackground:#b5d6fd;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tcolor:#000;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t}\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t.nsEditorBody.nsEditorBodyWithLineNumber\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t{\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tpadding: 0px;\\\\r\\\\n\\\" +\\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tpadding-top: 5px;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tpadding-right: 5px;\\\\r\\\\n\\\" + \\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t}\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t.nsEditorBody.nsEditorBodyWithLineNumber .nsEditorLineElement\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t{\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tmargin:0;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tfont-size: 12px;\\\\r\\\\n\\\" +\\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tline-height: 15px !important;\\\\r\\\\n\\\" +\\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t}\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t.nsEditorPageBreak\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t{\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\tclear: both !important;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    \\t\\twidth: 100% !important;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    \\t\\tborder-top: #999 1px dotted !important;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    \\t\\tborder-bottom: #999 1px dotted !important;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    \\t\\tpadding: 0 !important;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    \\t\\theight: 7px !important;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    \\t\\tcursor: default !important;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t}\\\";\\r\\n\\t\\t\\tvar arrStyle = this.__callAddStyleIFrameInPluggin(style);\\r\\n\\t\\t\\tif(arrStyle && arrStyle.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrStyle.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstyleHtml += arrStyle[count].value;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar arrStyle = this.__dom.doc.querySelectorAll(\\\"style\\\");\\r\\n\\t\\t\\tif(arrStyle && arrStyle.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count= 0;count < arrStyle.length; count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar style = arrStyle[count].cloneNode(true);\\r\\n\\t\\t\\t\\t\\tstyleHtml += \\\"\\\\n\\\" + style.outerHTML;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar arrLink = this.__dom.doc.querySelectorAll(\\\"link\\\");\\r\\n\\t\\t\\tif(arrLink && arrLink.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count= 0;count < arrLink.length; count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar link = this.__dom.doc.createElement(\\\"link\\\");\\r\\n\\t\\t\\t\\t\\tlink.rel = arrLink[count].rel;\\r\\n\\t\\t\\t\\t\\tlink.href = arrLink[count].href;\\r\\n\\t\\t\\t\\t\\tlink.type = \\\"text/css\\\";\\r\\n\\t\\t\\t\\t\\tlink.media = \\\"all\\\";\\r\\n\\t\\t\\t\\t\\tstyleHtml += \\\"\\\\n\\\" + link.outerHTML;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar html = \\\"<html><head><style>\\\" + styleHtml + \\\"</style></head><body class=\\\\\\\"nsEditorBody\\\" + (this.__config[\\\"enableLineNumber\\\"] ? \\\" nsEditorBodyWithLineNumber\\\" : \\\"\\\") + \\\"\\\\\\\" contenteditable=\\\\\\\" \\\" + !this.__config.enableReadOnly + \\\"\\\\\\\" aria-disabled=\\\\\\\"false\\\\\\\" spellcheck=\\\\\\\"\\\" + this.__config.enableSpellCheck +\\\"\\\\\\\" dir=\\\\\\\"auto\\\\\\\">\\\" + content + \\\"</body></html>\\\";\\r\\n\\t\\t\\tthis.__enableIFrameDesignMode(divTextArea,html);\\r\\n\\t\\t}\\r\\n\\t\\tif(!content && this.__config.defaultValue && this.__config.defaultValue.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcontent = this.__config.defaultValue;\\r\\n\\t\\t}\\r\\n\\t\\t//for Mozilla showing cursor\\r\\n\\t\\tif(content)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcontent = this.__getWrappedContent(content);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tcontent = this.__defaultContent;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__config.defaultValue = content;\\r\\n\\t\\tif(this.__orignalTextArea)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__orignalTextArea,\\\"nsEditorTextAreaHidden\\\");\\r\\n\\t\\t\\tif(!this.__config[\\\"placeholder\\\"] && this.__orignalTextArea.getAttribute(\\\"placeholder\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config[\\\"placeholder\\\"] = this.__orignalTextArea.getAttribute(\\\"placeholder\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.addStyleClass(divTextArea,\\\"nsEditorTextAreaGeneric\\\");\\r\\n\\t\\t\\r\\n\\t\\treturn divTextArea;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__initTextArea = function()\\r\\n\\t{\\r\\n\\t\\tvar listenerComponent = this.__getListenerComponent();\\r\\n\\t\\tvar clickListener = this.__isModeTextArea() ? this.__compTextArea : this.__frameContentDoc;\\r\\n\\t\\tvar body = this.__isModeTextArea() ? this.__compTextArea : this.__getIFrameBody();\\r\\n\\t\\tvar self = this;\\r\\n\\t\\t\\r\\n\\t\\tvar genericListerener = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = self.util.getEvent(event);\\r\\n\\t\\t\\tif(event.type == \\\"blur\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!self.getDisabled())\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.__selection.saveSelection();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar element = event.target;\\r\\n\\t\\t\\tvar parentElement = element.parentNode;\\r\\n\\t\\t\\tvar item = {orignalEvent:event,element: element,parentElement: parentElement};\\r\\n\\t\\t\\tself.__dispatchInternalEvent(event.type,item,item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar eventListener = function(event){\\r\\n\\t\\t\\tevent = self.util.getEvent(event);\\r\\n\\t\\t\\t//var target = self.util.getTarget(event);\\r\\n\\t\\t\\tself.__selection.saveSelection();\\r\\n\\t\\t\\t//self.__updateToolbar(target);\\r\\n\\t\\t};\\r\\n\\t\\tvar pasteListener = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = self.util.getEvent(event);\\r\\n\\t\\t\\tswitch(event.type)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase \\\"beforepaste\\\":\\r\\n\\t\\t\\t\\t\\tself.__dispatchInternalEvent(\\\"beforepaste\\\",{orignalEvent:event},{orignalEvent:event});\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"paste\\\":\\r\\n\\t\\t\\t\\t\\tvar content = self.__getPastedHTML(event);\\r\\n\\t\\t\\t\\t\\tif(!content)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcontent = {};\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tcontent.orignalEvent = event;\\r\\n\\t\\t\\t\\t\\tself.__dispatchInternalEvent(\\\"paste\\\",content,content);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tif(this.__config.defaultValue)\\r\\n\\t\\t{\\r\\n\\t\\t\\tbody.innerHTML = this.__config.defaultValue;\\r\\n\\t\\t}\\r\\n\\t\\tvar nonClickEvents = \\\"keydown keyup keypress mousedown mouseup mousemove copy cut dragstart drop dragover touchstart touchend touchmove focus blur\\\";\\r\\n\\t\\tvar clickEvents = \\\"selectionchange selectionstart dblclick click paste\\\";\\r\\n\\t\\tthis.util.addEvent(listenerComponent,nonClickEvents,genericListerener);\\r\\n\\t\\tthis.util.addEvent(clickListener,clickEvents,genericListerener);\\r\\n\\t\\t//this.util.addEvent(listenerComponent,\\\"keydown\\\",this.__textAreaKeyDownHandler.bind(this));\\r\\n\\t\\t//this.util.addEvent(listenerComponent,\\\"keyup mouseup mouseout focusout\\\",eventListener);\\r\\n\\t\\tthis.util.addEvent(clickListener,\\\"beforepaste paste\\\",pasteListener);\\r\\n\\t\\tthis.util.addEvent(clickListener,\\\"click\\\",this.__textAreaClickHandler.bind(this));\\r\\n\\t\\t/*if(!this.__isModeTextArea())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__callTextAreaFunc();\\r\\n\\t\\t}*/\\r\\n\\t\\tthis.__createLineNumberComponents();\\r\\n\\t\\tthis.__callTextAreaFunc();\\r\\n\\t\\tthis.__dispatchInternalEvent(\\\"textAreaInitialized\\\");\\r\\n\\t\\tthis.__textAreaObserver = new MutationObserver(this.__textAreaChangeHandler.bind(this));\\r\\n\\t\\tvar observerConfig = {attributes:false,childList:true,characterData:true,subtree:true};\\r\\n\\t\\tthis.__textAreaObserver.observe(body, observerConfig);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__enableIFrameDesignMode = function(iframe,html)\\r\\n\\t{\\r\\n\\t\\tif(iframe && !this.__isFrameDesignModeEnabled)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__frameContentWindow = this.__getIFrameContentWindow(iframe);\\r\\n\\t\\t\\ttry \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__frameContentDoc = this.__frameContentWindow.document;\\r\\n\\t\\t\\t\\tthis.__frameContentDoc.open();\\r\\n\\t\\t\\t\\tthis.__frameContentDoc.write(html);\\r\\n\\t\\t\\t\\tthis.__frameContentDoc.close();\\r\\n            } \\r\\n\\t\\t\\tcatch (error) \\r\\n\\t\\t\\t{\\r\\n                //console.debug(error);\\r\\n            }\\r\\n            if (this.__dom.doc.contentEditable) \\r\\n\\t\\t\\t{\\r\\n            \\tthis.__frameContentDoc.designMode = \\\"On\\\";\\r\\n            \\tthis.__isFrameDesignModeEnabled = true;\\r\\n            } \\r\\n\\t\\t\\telse if (this.__dom.doc.designMode !== null) \\r\\n\\t\\t\\t{\\r\\n                try \\r\\n\\t\\t\\t\\t{\\r\\n                \\tthis.__frameContentDoc.designMode = \\\"on\\\";\\r\\n                \\tthis.__isFrameDesignModeEnabled = true;\\r\\n                } \\r\\n\\t\\t\\t\\tcatch (error) \\r\\n\\t\\t\\t\\t{\\r\\n                    //console.debug(error);\\r\\n                }\\r\\n            }\\r\\n            if(this.__isFrameDesignModeEnabled)\\r\\n            {\\r\\n            \\tthis.__setIframeStyle();\\r\\n            \\tthis.__initTextArea();\\r\\n            \\tthis.__dispatchInternalEvent(\\\"iframeInitialized\\\");\\r\\n            }\\r\\n            var self = this;\\r\\n            this.__timeOutInterval = setTimeout(function () \\r\\n\\t\\t    {\\r\\n            \\tself.__timeOutInterval = null;\\r\\n            \\tself.__enableIFrameDesignMode.call(self,iframe,html);\\r\\n\\t\\t    }, 500);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tclearTimeout(this.__timeOutInterval);\\r\\n\\t\\t\\tthis.__timeOutInterval = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__setIframeStyle = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__config.height == \\\"auto\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar doc = this.__getDocument();\\r\\n\\t\\t\\tif(doc.documentElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdoc.documentElement.style.overflowY = \\\"hidden\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//this.util.addEvent(doc,\\\"readystatechange DOMContentLoaded\\\",this.__resizeIframe.bind(this));\\r\\n\\t\\t\\tthis.__listenInternalEvent(\\\"change\\\", this.__resizeIframe.bind(this));\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__resizeIframe = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__isModeTextArea() && this.__config.height == \\\"auto\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar iframe = this.__compTextArea;\\r\\n\\t\\t\\tvar body = this.__getIFrameBody();\\r\\n\\t\\t\\tif(iframe && body)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.css(iframe,\\\"height\\\",body.offsetHeight);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__createLineNumberComponents = function()\\r\\n\\t{\\r\\n\\t\\tvar listenerComponent = this.__getListenerComponent();\\r\\n\\t\\tif(this.__config[\\\"enableLineNumber\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__divOuterContainer,\\\"nsEditorWithLineNumber\\\");\\r\\n\\t\\t\\t//var textWidth = this.__width();\\r\\n\\t\\t\\t//var baseMeasurement = this.__compTextArea.getBoundingClientRect();\\r\\n\\t\\t\\tthis.__divLineNumberWrapper = this.util.createDiv(this.getID() + \\\"linenumberwrapper\\\",\\\"nsEditorLineNumberWrapper\\\");\\r\\n\\t\\t\\tthis.__divLineNumberContainer.appendChild(this.__divLineNumberWrapper);\\r\\n\\t\\t\\tthis.__queueFunc.splice(0, 0, this.__drawLineNumbers.bind(this,1));\\r\\n\\t\\t\\tthis.__paddingHorizontal = parseInt(this.util.getStyleValue(this.__divOuterContainer,\\\"border-left-width\\\",false)) +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tparseInt(this.util.getStyleValue(this.__divOuterContainer,\\\"border-right-width\\\",false)) + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tparseInt(this.util.getStyleValue(this.__divOuterContainer,\\\"padding-left\\\",false)) + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tparseInt(this.util.getStyleValue(this.__divOuterContainer,\\\"padding-right\\\",false));\\r\\n\\t\\t\\t//this.__setWidth(textWidth - this.__paddingHorizontal);\\r\\n\\t\\t\\t//this.__lastTextAreaHeight = this.__compTextArea.offsetHeight; \\r\\n\\t\\t\\t//this.__lastTextAreaWidth = this.__compTextArea.offsetWidth;\\r\\n\\t\\t\\tif(!this.__textAreaScrollRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__textAreaScrollRef = this.__textAreaScrollHandler.bind(this);\\r\\n\\t\\t\\t\\tvar element = this.__getScrollableComponent();\\r\\n\\t\\t\\t\\tthis.util.addEvent(element,\\\"scroll\\\",this.__textAreaScrollRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__textAreaResizeRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__textAreaResizeRef = this.__textAreaResizeHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(listenerComponent,\\\"resize\\\",this.__textAreaResizeRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__divLineNumberContainer && this.__divLineNumberContainer.parentElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divLineNumberContainer.parentElement.removeChild(this.__divLineNumberContainer);\\r\\n\\t\\t\\t\\tthis.__divLineNumberContainer = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__divOuterContainer,\\\"nsEditorWithLineNumber\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__config[\\\"enableAutoSuggest\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__textAreaKeyUpRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__textAreaKeyUpRef = this.__textAreaKeyUpHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(listenerComponent,\\\"keyup\\\",this.__textAreaKeyUpRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__textAreaKeyDownRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__textAreaKeyDownRef = this.__textAreaKeyDownHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(listenerComponent,\\\"keydown\\\",this.__textAreaKeyDownRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t//observer to watch if orignalTextArea has some style changed\\r\\n\\t\\tif(!this.__orignalTextAreaObserver && this.__orignalTextArea)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__orignalTextAreaObserver = new MutationObserver(this.__orignalTextAreaStyleChangeHandler.bind(this));\\r\\n\\t\\t\\tthis.__orignalTextAreaObserver.observe(this.__orignalTextArea, {attributes:true,attributeFilter:[\\\"style\\\"]});\\r\\n\\t\\t}\\r\\n\\t\\tthis.__setLineNumberVisibility(this.__config[\\\"enableLineNumber\\\"]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__createFooter = function()\\r\\n\\t{\\r\\n\\t\\tthis.__divFooterContainer = this.util.createDiv(this.getID() + \\\"footercontainer\\\",\\\"nsEditorFooterContainer\\\");\\r\\n\\t\\tthis.__divFooterLeftContainer = this.util.createDiv(this.getID() + \\\"footerleftcontainer\\\",\\\"nsEditorFooterLeftContainer\\\");\\r\\n\\t\\tthis.__divFooterContainer.appendChild(this.__divFooterLeftContainer);\\r\\n\\t\\tthis.__divFooterRightContainer = this.util.createDiv(this.getID() + \\\"footerrightcontainer\\\",\\\"nsEditorFooterRightContainer\\\");\\r\\n\\t\\tthis.__divFooterContainer.appendChild(this.__divFooterRightContainer);\\r\\n\\t\\tthis.__divOuterContainer.appendChild(this.__divFooterContainer);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__textAreaKeyDownHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tif(!this.getDisabled())\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (event.keyCode === this.util.KEYCODE.BACKSPACE) \\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\tif (this.__isTextAreaBlank()) \\r\\n\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\tevent.stopPropagation(); // prevent remove single empty tag\\r\\n\\t\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar keyCode = event.keyCode;\\r\\n\\t\\t\\t\\tvar arrAccessKey = [];\\r\\n\\t\\t\\t\\tvar strKey = \\\"\\\";\\r\\n\\t\\t\\t\\tfor(var key in this.__accessibleKeys) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__accessibleKeys[key].isPressed(event,keyCode))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrAccessKey.push(this.__accessibleKeys[key]);\\r\\n\\t\\t\\t\\t\\t\\tstrKey += \\\"+\\\" + this.__accessibleKeys[key].str;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(arrAccessKey.length)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(strKey && strKey.length > 1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tstrKey = strKey.substring(1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tstrKey += \\\"+\\\" + String.fromCharCode(keyCode);\\r\\n\\t\\t\\t\\t\\tvar keyItem = this.__objShortKey[strKey.toLowerCase()];\\r\\n\\t\\t\\t\\t\\tif(keyItem)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__toolBar.__toolBarButtonClickHandler(keyItem.item,keyItem.key,event);\\r\\n\\t\\t\\t\\t\\t\\tthis.editorUtil.stopEvent(event);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__textAreaKeyUpHandler = function(event)\\r\\n\\t{\\r\\n\\t\\t /*if (decls.isVisible())\\r\\n         {\\r\\n             decls.setFilter(getFilterText());\\r\\n         }*/\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__textAreaClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\tthis.__toolBar.updateToolbar(target);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__textAreaScrollHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(!this.__timeOutInterval)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar lineNumberHeight = 15;\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.__timeOutInterval = setTimeout( function() \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar listenerComponent = self.__getScrollComponent();\\r\\n\\t\\t\\t\\tvar scrollTop = listenerComponent.scrollTop;\\r\\n\\t\\t\\t\\tvar firstLine = Math.floor((scrollTop / lineNumberHeight) + 1);\\r\\n\\t\\t\\t\\tvar remainingScroll = (scrollTop / lineNumberHeight) % 1;\\r\\n\\r\\n\\t\\t\\t\\tself.__drawLineNumbers(firstLine);\\r\\n\\t\\t\\t\\tself.__divLineNumberWrapper.style.marginTop = (-1 * (remainingScroll * lineNumberHeight)) + \\\"px\\\";\\r\\n\\t\\t\\t\\tself.__timeOutInterval = null;\\r\\n\\t\\t\\t}, 150);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__textAreaResizeHandler = function(event)\\r\\n\\t{\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__orignalTextAreaStyleChangeHandler = function(arrMutation)\\r\\n\\t{\\r\\n\\t\\tfor(var count = 0;count < arrMutation.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar mutation = arrMutation[count];\\r\\n\\t\\t\\tif (mutation.type == \\\"attributes\\\") \\r\\n\\t        {\\r\\n\\t        \\t\\r\\n\\t        }\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__textAreaChangeHandler= function(arrMutation)\\r\\n\\t{\\r\\n\\t\\tif(!this.__isInternalHTMLChange)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//this.__setDefaultTag();\\r\\n\\t\\t\\tthis.__dispatchInternalEvent(\\\"change\\\");\\r\\n\\t\\t\\t//this.__resizeIframe();\\r\\n\\t\\t}\\r\\n\\t\\tfor(var count = 0;count < arrMutation.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar mutation = arrMutation[count];\\r\\n\\t\\t\\t//if child is added\\r\\n\\t\\t\\tif (mutation.type === 'childList') \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//if height is auto\\r\\n\\t\\t\\t\\tif(this.__config.height == \\\"auto\\\" && this.__divLineNumberContainer)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__drawLineNumbers(1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__drawLineNumbers = function(fromLine)\\r\\n\\t{\\r\\n\\t\\tif(this.__divLineNumberWrapper)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeAllChildren(this.__divLineNumberWrapper);\\r\\n\\t\\t\\tthis.arrLinesElement = [];\\r\\n\\t\\t\\tvar comp = this.__getScrollComponent();\\r\\n\\t\\t\\tvar measurement = comp.getBoundingClientRect();\\r\\n\\t\\t\\tvar containerHeight = measurement.height;\\r\\n\\t\\t\\twhile((this.__divLineNumberWrapper.offsetHeight - containerHeight) <= 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar divLineNumber = this.util.createDiv(this.getID() + \\\"linenumber\\\",\\\"nsEditorLineNumber\\\");\\r\\n\\t\\t\\t\\tdivLineNumber.appendChild(this.__dom.doc.createTextNode(fromLine));\\r\\n\\t\\t\\t\\tthis.__divLineNumberWrapper.appendChild(divLineNumber);\\r\\n\\t\\t\\t\\tthis.arrLinesElement.push(divLineNumber);\\r\\n\\t\\t\\t\\tfromLine++;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn fromLine;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__setLineNumberVisibility = function(isVisible) \\r\\n\\t{\\r\\n\\t\\tif(this.__setting[\\\"enableLineNumber\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config[\\\"enableLineNumber\\\"] = isVisible;\\r\\n\\t\\t\\tthis.__handleVisibilityOfComponent(this.__divLineNumberContainer,\\\"enableLineNumber\\\");\\r\\n\\t\\t\\tthis.__dispatchInternalEvent(\\\"lineNumberVisibilityChanged\\\",{isVisible: isVisible},{isVisible: isVisible});\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__handleVisibilityOfComponent = function(component,property) \\r\\n\\t{\\r\\n\\t\\tthis.__setting[property] ? this.util.removeStyleClass(component,\\\"nsEditorComponentHidden\\\") : this.util.addStyleClass(component,\\\"nsEditorComponentHidden\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__handleKeySpecialKeys = function(event) \\r\\n\\t{\\r\\n\\t\\t// escape, left, right\\r\\n        if (event.keyCode === 27 || event.keyCode === 37 || event.keyCode === 39)\\r\\n        {\\r\\n            setVisible(false);\\r\\n        }\\r\\n        // up\\r\\n        else if (event.keyCode === 38)\\r\\n        {\\r\\n            moveSelected(-1);\\r\\n            event.preventDefault();\\r\\n            event.stopPropagation();\\r\\n        }\\r\\n        // down\\r\\n        else if (event.keyCode === 40)\\r\\n        {\\r\\n            moveSelected(1);\\r\\n            event.preventDefault();\\r\\n            event.stopPropagation();\\r\\n        }\\r\\n        // page up \\r\\n        else if (event.keyCode === 33)\\r\\n        {\\r\\n            moveSelected(-5);\\r\\n            event.preventDefault();\\r\\n        }\\r\\n        // page down\\r\\n        else if (event.keyCode === 34)\\r\\n        {\\r\\n            moveSelected(5);\\r\\n            event.preventDefault();\\r\\n        }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getTextFromTextArea = function() \\r\\n\\t{\\r\\n\\t\\tvar text = null;\\r\\n\\t\\tif(this.__isModeTextArea())\\r\\n\\t\\t{\\r\\n\\t\\t\\ttext  = this.__compTextArea.textContent || this.__compTextArea.innerText;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\ttext = this.__getIFrameText();\\r\\n\\t\\t}\\r\\n\\t\\treturn text;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getHtmlFromTextArea = function() \\r\\n\\t{\\r\\n\\t\\tvar text = null;\\r\\n\\t\\tif(this.__isModeTextArea())\\r\\n\\t\\t{\\r\\n\\t\\t\\ttext  = this.__compTextArea.innerHTML;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\ttext = this.__getIFrameContent();\\r\\n\\t\\t}\\r\\n\\t\\tif(text)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttext = text.replace(/^(<p[^>]*>(&nbsp;|&#160;|\\\\s|\\\\u00a0|<br \\\\/>|)<\\\\/p>[\\\\r\\\\n]*|<br \\\\/>[\\\\r\\\\n]*)$/, \\\"\\\");\\r\\n\\t\\t}\\r\\n\\t\\treturn text;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__setTextIntoTextArea = function(text) \\r\\n\\t{\\r\\n\\t\\tif(this.__isModeTextArea())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__compTextArea.innerText = text;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setIFrameText(text);\\r\\n\\t\\t}\\r\\n\\t\\t//this.__dispatchInternalEvent(\\\"change\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__setHtmlIntoTextArea = function(html) \\r\\n\\t{\\r\\n\\t\\tif(this.__isModeTextArea())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__compTextArea.innerHTML = html;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setIFrameContent(html);\\r\\n\\t\\t}\\r\\n\\t\\t//this.__dispatchInternalEvent(\\\"change\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\t//functions related to IFrame\\r\\n\\tNSEditor.prototype.__getIFrameText = function() \\r\\n\\t{\\r\\n\\t\\tvar iframeBody = this.__getIFrameBody();\\r\\n\\t    return (iframeBody ? (iframeBody.textContent || iframeBody.innerText) : null);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getIFrameContent = function() \\r\\n\\t{\\r\\n\\t\\tvar iframeBody = this.__getIFrameBody();\\r\\n\\t    return (iframeBody ? iframeBody.innerHTML : null);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__setIFrameText = function(text) \\r\\n\\t{\\r\\n\\t\\tvar iframeBody = this.__getIFrameBody();\\r\\n\\t    iframeBody ? iframeBody.innerText = text : null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__setIFrameContent = function(html) \\r\\n\\t{\\r\\n\\t\\tvar iframeBody = this.__getIFrameBody();\\r\\n\\t    iframeBody ? iframeBody.innerHTML = html : null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getIFrameContentWindow = function(iframe) \\r\\n\\t{\\r\\n\\t\\tif(this.__isModeTextArea())\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t}\\r\\n\\t\\tvar contentWindow = null;\\r\\n\\t\\tif (iframe.contentWindow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcontentWindow = iframe.contentWindow;\\r\\n\\t\\t}\\r\\n\\t\\telse if(iframe.contentDocument)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(iframe.contentDocument.defaultView)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcontentWindow = iframe.contentDocument.defaultView;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if (iframe.contentDocument.document)\\r\\n\\t        {\\r\\n\\t        \\tcontentWindow = iframe.contentDocument.document;\\r\\n\\t        }\\r\\n\\t        else\\r\\n\\t        {\\r\\n\\t        \\tcontentWindow = iframe.contentDocument;\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t\\treturn contentWindow;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getIFrameBody = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__isModeTextArea())\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t}\\r\\n\\t\\t//if(!this.__frameBody)\\r\\n\\t\\t//{\\r\\n\\t\\t\\tthis.__frameBody = this.__getIFrameDocument().getElementsByTagName(\\\"body\\\")[0];\\r\\n\\t\\t//}\\r\\n\\t    return this.__frameBody;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getIFrameDocument = function()  \\r\\n\\t{\\r\\n\\t    return this.__isModeTextArea() ? null : (this.__compTextArea.contentDocument || this.__compTextArea.contentWindow.document);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__disableStyleWithCSS = function() \\r\\n\\t{\\r\\n\\t\\tif (this.__browserDetail.isFirefox) \\r\\n\\t\\t{\\r\\n\\t\\t\\t//disable style while inserting in firefox design Mode\\r\\n\\t\\t\\ttry \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__frameContentDoc.execCommand(\\\"styleWithCSS\\\", false, false);\\r\\n\\t\\t\\t} \\r\\n\\t\\t\\tcatch (error) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttry \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__frameContentDoc.execCommand(\\\"useCSS\\\", false, true);\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\tcatch (error2) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t//end of functions related to IFrame\\r\\n\\tNSEditor.prototype.__executeCommand = function(commandName,config,key) \\r\\n\\t{\\r\\n\\t\\tif(!config)\\r\\n\\t\\t{\\r\\n\\t\\t\\tconfig = {};\\r\\n\\t\\t}\\r\\n\\t\\tvar command = config.command || commandName;\\r\\n\\t\\tvar arguments = config[\\\"arguments\\\"];\\r\\n\\t\\tif(config.execCommand)\\r\\n\\t\\t{\\r\\n\\t\\t\\tconfig.execCommand.apply(this);\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar doc = this.__dom.doc;\\r\\n\\t\\t\\tif(!this.__isModeTextArea())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdoc = this.__frameContentDoc;\\r\\n\\t\\t\\t\\tthis.__disableStyleWithCSS();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t// in Firefox untrusted JavaScript is not allowed to access the clipboard\\r\\n\\t\\t\\ttry \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dispatchInternalEvent(\\\"beforeExecCommand\\\",config,config);\\r\\n\\t\\t\\t\\tif(config.beforeCommand)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconfig.beforeCommand(config,key);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__selection.restoreSelection();\\r\\n\\t\\t\\t\\tthis.__selection.setFocus();\\r\\n\\t\\t\\t\\tthis.__execCommand.execute(command, false, arguments);\\r\\n\\t\\t\\t\\t//doc.execCommand(command, false, arguments);\\r\\n\\t\\t\\t\\tthis.__selection.saveSelection();\\r\\n\\t\\t\\t\\tif(config.afterCommand)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconfig.afterCommand(config,key);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__dispatchInternalEvent(\\\"afterExecCommand\\\",config,config);\\r\\n\\t\\t\\t} \\r\\n\\t\\t\\tcatch (error) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconsole.error(error);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t//this.__dispatchInternalEvent(\\\"change\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__orderedListHandler = function(item,key,event)\\r\\n\\t{\\r\\n\\t\\t/*var element = this.__selection.getElementUnderCursor();\\r\\n\\t\\tvar textArea = this.__getTextArea();\\r\\n\\t\\tvar parent = this.util.findParentByCallback(element, function(node) \\r\\n\\t\\t{ \\r\\n\\t\\t\\treturn node && /^UL|OL$/i.test(node.nodeName);\\r\\n\\t\\t}, textArea);\\r\\n        if (parent && this.util.isElementOfType(parent.parentNode,\\\"p\\\")) \\r\\n        {\\r\\n            var selection = this.__selection.saveSelection();\\r\\n            this.util.insertElementParentsParent(parent.parentNode);\\r\\n            for(var count = 0;count < parent.childNodes.length;count++)\\r\\n            {\\r\\n            \\tvar li = parent.childNodes[count];\\r\\n            \\tif (this.util.isElementOfType(li.lastChild,\\\"br\\\")) \\r\\n            \\t{\\r\\n            \\t\\tthis.editorUtil.removeNode(li.lastChild);\\r\\n                }\\r\\n            }\\r\\n            this.__selection.restoreSelection(selection);\\r\\n        }*/\\r\\n        //editor.setEditorValue();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__viewSourceCodeHandler = function(item,key,event)\\r\\n\\t{\\r\\n\\t\\tif(!this.__txtSourceCode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__txtSourceCode = this.util.createElement(\\\"textarea\\\",this.getID() + \\\"sourcetextArea\\\",\\\"nsEditorSourceTextArea\\\");\\r\\n\\t\\t\\t//this.__txtSourceCode.setAttribute(\\\"disabled\\\",true);\\r\\n\\t\\t\\tthis.__divTextAreaContainer.appendChild(this.__txtSourceCode);\\r\\n\\t\\t}\\r\\n\\t\\t//view source is shown then show editor\\r\\n\\t\\tif (this.__isSourceMode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__txtSourceCode,\\\"nsEditorTextAreaHidden\\\");\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__compTextArea,\\\"nsEditorTextAreaHidden\\\");\\r\\n\\t\\t\\tthis.setHtml(this.__txtSourceCode.value);\\r\\n\\t\\t\\t//processItems(false);\\r\\n\\t\\t}\\r\\n\\t\\t//view source is not shown then show viewsource text area\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar html = this.__getHtmlFromTextArea();\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__txtSourceCode,\\\"nsEditorTextAreaHidden\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__compTextArea,\\\"nsEditorTextAreaHidden\\\");\\r\\n\\t\\t\\tthis.__txtSourceCode.value = html;\\r\\n\\t\\t\\t//processItems(true);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__isSourceMode = !this.__isSourceMode;\\r\\n\\t\\tthis.__placeHolderToggleRef();\\r\\n\\t\\tthis.__dispatchInternalEvent(\\\"viewSourceChanged\\\",{isSourceMode: this.__isSourceMode,item: item,key: key}, {isSourceMode: this.__isSourceMode,item: item,key: key});\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__emptyDocHandler = function(item,key,event)\\r\\n\\t{\\r\\n\\t\\tvar body = this.__getTextArea();\\r\\n\\t\\tbody.innerHTML = this.__config.defaultValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__printHandler = function(item,key,event)\\r\\n\\t{\\r\\n\\t\\tif(this.__isModeTextArea())\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__iframePrint)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__iframePrint = this.util.createElement(\\\"iframe\\\",this.getID() + \\\"EditorPrintFrame\\\",\\\"nsEditorPrint\\\");\\r\\n\\t\\t\\t\\tthis.__iframePrint.name = this.getID() + \\\"EditorPrintFrame\\\";\\r\\n\\t\\t\\t\\tthis.__dom.doc.body.appendChild(this.__iframePrint);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar content =  this.__getHtmlFromTextArea();\\r\\n\\t\\t\\tvar html = \\\"<!DOCTYPE html><html><head><title>\\\" + this.__dom.doc.title + \\\"</title>\\\";\\r\\n\\t\\t\\tvar arrStyle = this.__dom.doc.querySelectorAll(\\\"style\\\");\\r\\n\\t\\t\\tif(arrStyle && arrStyle.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count= 0;count < arrStyle.length; count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar style = arrStyle[count].cloneNode(true);\\r\\n\\t\\t\\t\\t\\thtml += \\\"\\\\n\\\" + style.outerHTML;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar arrLink = this.__dom.doc.querySelectorAll(\\\"link\\\");\\r\\n\\t\\t\\tif(arrLink && arrLink.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count= 0;count < arrLink.length; count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar link = this.__dom.doc.createElement(\\\"link\\\");\\r\\n\\t\\t\\t\\t\\tlink.rel = arrLink[count].rel;\\r\\n\\t\\t\\t\\t\\tlink.href = arrLink[count].href;\\r\\n\\t\\t\\t\\t\\tlink.type = \\\"text/css\\\";\\r\\n\\t\\t\\t\\t\\tlink.media = \\\"all\\\";\\r\\n\\t\\t\\t\\t\\thtml += \\\"\\\\n\\\" + link.outerHTML;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\thtml +=\\\"</head><body class=\\\\\\\"nsEditorBody\\\\\\\" dir=\\\\\\\"auto\\\\\\\"><div>\\\" + content + \\\"</div></body></html>\\\";\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.__iframePrint.onload = function() \\r\\n\\t\\t\\t{\\r\\n                setTimeout(function() \\r\\n                {\\r\\n                \\tvar frame = self.__context.frames[self.getID() + \\\"EditorPrintFrame\\\"];\\r\\n                \\tframe.focus();\\r\\n                \\tframe.print();\\r\\n                \\tself.__context.focus();\\r\\n                }, 0);\\r\\n            };\\r\\n            var contentWindow = this.__iframePrint.contentWindow;\\r\\n            contentWindow.document.open();\\r\\n            contentWindow.document.write(html);\\r\\n            contentWindow.document.close();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__executeCommand(\\\"print\\\",item,\\\"print\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__previewHandler = function(item,key,event)\\r\\n\\t{\\r\\n\\t\\tvar content =  this.__getHtmlFromTextArea();\\r\\n\\t\\tcontent = \\\"<div class='\\\" + this.__getTextArea().getAttribute(\\\"class\\\") + \\\"'>\\\" + content + \\\"</div>\\\";\\r\\n\\t\\tvar objWindow = this.__context.open(\\\"\\\",\\\"_blank\\\");\\r\\n\\t\\tif(!objWindow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthrow this.util.throwNSError(\\\"NSEditor\\\",\\\"Preview window was not opened.Please deactivate PopUp Blocker for this application\\\");\\r\\n\\t\\t}\\r\\n\\t\\tobjWindow.mimeType = \\\"text/html\\\";\\r\\n\\t\\tvar width = this.__getTextArea().offsetWidth + \\\"px !important\\\";\\r\\n\\t\\tvar bodyCssClass =  this.__divOuterContainer.getAttribute(\\\"class\\\") + \\\" nsEditorBody\\\";\\r\\n\\t\\tif(this.__isModeTextArea())\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar html = \\\"\\\";\\r\\n            var arrStyle = this.__dom.doc.querySelectorAll(\\\"style\\\");\\r\\n            if(arrStyle && arrStyle.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count= 0;count < arrStyle.length; count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar style = arrStyle[count].cloneNode(true);\\r\\n\\t\\t\\t\\t\\thtml += \\\"\\\\n\\\" + style.outerHTML;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar arrLink = this.__dom.doc.querySelectorAll(\\\"link\\\");\\r\\n\\t\\t\\tif(arrLink && arrLink.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count= 0;count < arrLink.length; count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar link = this.__dom.doc.createElement(\\\"link\\\");\\r\\n\\t\\t\\t\\t\\tlink.rel = arrLink[count].rel;\\r\\n\\t\\t\\t\\t\\tlink.href = arrLink[count].href;\\r\\n\\t\\t\\t\\t\\tlink.type = \\\"text/css\\\";\\r\\n\\t\\t\\t\\t\\tlink.media = \\\"all\\\";\\r\\n\\t\\t\\t\\t\\thtml += \\\"\\\\n\\\" + link.outerHTML;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n            objWindow.document.write('' +\\r\\n                '<!DOCTYPE html><html>' +\\r\\n                '<head>' +\\r\\n                '<meta charset=\\\"utf-8\\\" />' +\\r\\n                '<meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1\\\">' +\\r\\n                '<title>' + \\\"Preview\\\" + '</title>' +\\r\\n                html +\\r\\n                '</head>' +\\r\\n                '<body class=\\\"' + bodyCssClass + '\\\" style=\\\"width:' + width + '; border:1px solid #ccc; margin:10px auto !important; height:auto !important;\\\">' + content + '</body>' +\\r\\n                '</html>'\\r\\n            );\\r\\n            \\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjWindow.document.write('' +\\r\\n                '<!DOCTYPE html><html>' +\\r\\n                '<head>' +\\r\\n                this.__getDocument().head.innerHTML +\\r\\n                '<style>body {overflow:auto !important; width:' + width + '; border:1px solid #ccc; margin: 10px auto !important; height:auto !important;}</style>' +\\r\\n                '</head>' +\\r\\n                '<body ' + bodyCssClass + '>' + content + '</body>' +\\r\\n                '</html>'\\r\\n            );\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__pageBreakForPrintingHandler = function(item,key,event)\\r\\n\\t{\\r\\n\\t\\tvar divPageBreak = \\\"<div class=\\\\\\\"nsEditorPageBreak\\\\\\\" style=\\\\\\\"page-break-after: always\\\\\\\" title=\\\\\\\"Page Break\\\\\\\"></div>\\\";\\r\\n\\t\\tthis.__selection.insertHTML(divPageBreak);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getScrollComponent = function() \\r\\n\\t{\\r\\n\\t\\tvar component = this.__isModeTextArea() ? this.__divTextAreaContainer : this.__getIFrameBody();\\r\\n\\t\\treturn component;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getScrollableComponent = function() \\r\\n\\t{\\r\\n\\t\\tvar element = this.__isModeTextArea() ? this.__divTextAreaContainer : this.__frameContentWindow;\\r\\n\\t\\treturn element;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getTextArea = function() \\r\\n\\t{\\r\\n\\t\\tvar component = this.__isModeTextArea() ? this.__compTextArea : this.__getIFrameBody();\\r\\n\\t\\treturn component;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getDocument = function() \\r\\n\\t{\\r\\n\\t\\tvar component = this.__isModeTextArea() ? this.__dom.doc : this.__getIFrameDocument();\\r\\n\\t\\treturn component;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getWindow = function() \\r\\n\\t{\\r\\n\\t\\tvar component = this.__isModeTextArea() ? this.__context : this.__frameContentWindow;\\r\\n\\t\\treturn component;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getListenerComponent = function() \\r\\n\\t{\\r\\n\\t\\tvar listenerComponent = this.__isModeTextArea() ? this.__compTextArea : this.__frameContentWindow;\\r\\n\\t\\treturn listenerComponent;\\r\\n\\t};\\r\\n\\r\\n\\tNSEditor.prototype.__isModeTextArea = function() \\r\\n\\t{\\r\\n\\t\\treturn (this.__config[\\\"mode\\\"] !== NSEditor.MODE_IFRAME);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__resizeContainer = function(width,height) \\r\\n\\t{\\r\\n\\t\\tthis.__setHeight(height);\\r\\n\\t\\tthis.__setWidth(width);\\r\\n\\t\\tthis.__handleLineNumberOnResize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__dispatchEvent = function(eventType,data,param,bubbles,cancelable)\\r\\n\\t{\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,eventType,data,param,bubbles,cancelable);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__dispatchInternalEvent = function(eventType,data,param,bubbles,cancelable)\\r\\n\\t{\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,this.__getInternalEvent(eventType),data,param,bubbles,cancelable);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__listenInternalEvent = function(eventType,callback)\\r\\n\\t{\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,this.__getInternalEvent(eventType),callback);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__removeInternalEvent = function(eventType,callback)\\r\\n\\t{\\r\\n\\t\\tthis.util.removeEvent(this.__baseComponent,this.__getInternalEvent(eventType),callback);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__addEvent = function(eventType,listener)\\r\\n\\t{\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,eventType,listener);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getInternalEvent = function(eventType)\\r\\n\\t{\\r\\n\\t\\tvar retType = \\\"\\\";\\r\\n\\t\\tvar joinBy = \\\" \\\";\\r\\n\\t\\tvar arrEventType = eventType.split(\\\" \\\");\\r\\n\\t\\tfor(var count = 0;count < arrEventType.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretType += joinBy + \\\"__\\\" + arrEventType[count];\\r\\n\\t\\t}\\r\\n\\t\\tif(retType)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretType = retType.substring(joinBy.length);\\r\\n\\t\\t}\\r\\n\\t\\treturn retType;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__height = function(height)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(height))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.css(this.__divOuterContainer,\\\"height\\\",height);\\r\\n\\t\\t}\\r\\n\\t\\tvar baseMeasurement = this.__divOuterContainer.getBoundingClientRect();\\r\\n\\t\\treturn baseMeasurement.height;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__width = function(width)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(width))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.css(this.__divOuterContainer,\\\"width\\\",width);\\r\\n\\t\\t}\\r\\n\\t\\tvar baseMeasurement = this.__divOuterContainer.getBoundingClientRect();\\r\\n\\t\\treturn baseMeasurement.width;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__heightBody = function(height)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(height))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.css(this.__divBodyContainer,\\\"height\\\",height);\\r\\n\\t\\t}\\r\\n\\t\\tvar baseMeasurement = this.__divBodyContainer.getBoundingClientRect();\\r\\n\\t\\treturn baseMeasurement.height;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__handleLineNumberOnResize = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__divLineNumberWrapper)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar lineNumberHeight = 15;\\r\\n\\t\\t\\tvar listenerComponent = this.__getScrollComponent();\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar scrollTop = listenerComponent.scrollTop;\\r\\n\\t\\t\\tvar firstLine = Math.floor((scrollTop / lineNumberHeight) + 1);\\r\\n\\t\\t\\tvar remainingScroll = (scrollTop / lineNumberHeight) % 1;\\r\\n\\r\\n\\t\\t\\tthis.__drawLineNumbers(firstLine);\\r\\n\\t\\t\\tthis.__divLineNumberWrapper.style.marginTop = (-1 * (remainingScroll * lineNumberHeight)) + \\\"px\\\";\\r\\n\\t\\t\\tthis.__paddingHorizontal = parseInt(this.util.getStyleValue(this.__divOuterContainer,\\\"border-left-width\\\",false)) +\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tparseInt(this.util.getStyleValue(this.__divOuterContainer,\\\"border-right-width\\\",false)) + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tparseInt(this.util.getStyleValue(this.__divOuterContainer,\\\"padding-left\\\",false)) + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tparseInt(this.util.getStyleValue(this.__divOuterContainer,\\\"padding-right\\\",false));\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getWrappedContent = function(content) \\r\\n\\t{\\r\\n\\t\\tif(content)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isPFound = content.match(/<\\\\/?p>/gi);\\r\\n\\t\\t\\tif (!isPFound) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn \\\"<p>\\\" + content + \\\"</p>\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn content;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__setDefaultTag = function()\\r\\n\\t{\\r\\n\\t\\tvar text = this.__getTextFromTextArea();\\r\\n\\t\\tvar htmlText = this.__getHtmlFromTextArea();\\r\\n\\t\\tif(text && text.trim().length === 0 && htmlText != this.__defaultContent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isInternalHTMLChange = true;\\r\\n\\t\\t\\tvar body = this.__getTextArea();\\r\\n\\t\\t\\tbody.innerHTML = this.__defaultContent;\\r\\n\\t\\t\\tthis.__isInternalHTMLChange = false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getPastedHTML = function(event)\\r\\n\\t{\\r\\n\\t\\tvar objReturn = {text:\\\"\\\",html:\\\"\\\",rtf:\\\"\\\"};\\r\\n\\t\\tif (this.__context.clipboardData && this.__context.clipboardData.getData) \\r\\n        { \\r\\n\\t\\t\\t\\r\\n        }\\r\\n\\t\\telse if (event.clipboardData && event.clipboardData.getData) \\r\\n        {\\r\\n\\t\\t\\tobjReturn.text = event.clipboardData.getData(\\\"text/plain\\\");\\r\\n\\t\\t\\tobjReturn.html = event.clipboardData.getData(\\\"text/html\\\");\\r\\n\\t\\t\\tobjReturn.rtf = event.clipboardData.getData(\\\"text/rtf\\\");\\r\\n        }\\r\\n\\t\\treturn objReturn;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//Placeholder functions\\r\\n\\tthis.__compPlaceHolder = null;\\r\\n\\tthis.__placeHolderToggleRef = null;\\r\\n\\tNSEditor.prototype.__createPlaceHolder = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__config[\\\"placeholder\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__compPlaceHolder)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__compPlaceHolder = this.util.createElement(\\\"span\\\",this.getID() + \\\"Placeholder\\\",\\\"nsEditorPlaceholder\\\");\\r\\n\\t\\t\\t\\tthis.__compPlaceHolder.appendChild(this.__dom.doc.createTextNode(this.__config[\\\"placeholder\\\"]));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.editorUtil.isEditable())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__removePlaceHolder();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__placeHolderToggleRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__placeHolderToggleRef = this.util.debounce(this.__togglePlaceHolder.bind(this),10);\\r\\n\\t\\t\\t\\tthis.__placeHolderToggleRef();\\r\\n\\t\\t\\t\\tthis.__addListenerToPlaceHolder();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__addListenerToPlaceHolder = function() \\r\\n\\t{\\r\\n\\t\\tthis.__listenInternalEvent(\\\"textAreaInitialized change focus keyup mouseup keydown mousedown changePlace\\\",this.__placeHolderToggleRef);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__setPlaceHolderPosition = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__isPlaceHolderVisible())\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar doc = this.__getDocument();\\r\\n\\t\\t\\tvar win = this.__getWindow();\\r\\n\\t\\t\\tif(doc && win)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar getPropValue = function(value)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(value == \\\"\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn 0;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn parseInt(value, 10);\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tvar textArea = this.__getTextArea();\\r\\n\\t\\t\\t\\tvar marginTop = 0;\\r\\n\\t\\t\\t\\tvar marginLeft = 0;\\r\\n\\t\\t\\t\\tvar paddingTop = 0;\\r\\n\\t\\t\\t\\tvar paddingLeft = 0;\\r\\n\\t\\t\\t\\tvar firstChild = textArea.firstChild;\\r\\n\\t\\t\\t\\tvar textAreaStyle = win.getComputedStyle(textArea);\\r\\n\\t\\t\\t\\tvar css = {};\\r\\n\\t\\t\\t\\tif(firstChild && this.util.isElement(firstChild))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t var childStyle = win.getComputedStyle(firstChild);\\r\\n\\t\\t\\t         marginTop = getPropValue(childStyle.getPropertyValue(\\\"margin-top\\\"));\\r\\n\\t\\t\\t         marginLeft = getPropValue(childStyle.getPropertyValue(\\\"margin-left\\\"));\\r\\n\\t\\t\\t         paddingTop = getPropValue(childStyle.getPropertyValue(\\\"padding-top\\\"));\\r\\n\\t\\t\\t         paddingLeft = getPropValue(childStyle.getPropertyValue(\\\"padding-left\\\"));\\r\\n\\t\\t\\t         css = {fontSize: getPropValue(childStyle.getPropertyValue(\\\"font-size\\\")),lineHeight: getPropValue(childStyle.getPropertyValue(\\\"line-height\\\"))};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t css = {fontSize: getPropValue(textAreaStyle.getPropertyValue(\\\"font-size\\\")),lineHeight: getPropValue(textAreaStyle.getPropertyValue(\\\"line-height\\\"))};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tcss.display = \\\"block\\\";\\r\\n\\t\\t\\t\\tcss.marginTop = Math.max(getPropValue(textAreaStyle.getPropertyValue(\\\"margin-top\\\")), marginTop);\\r\\n\\t\\t\\t\\tcss.marginLeft = Math.max(getPropValue(textAreaStyle.getPropertyValue(\\\"margin-left\\\")), marginLeft);\\r\\n\\t\\t\\t\\tcss.paddingTop = Math.max(getPropValue(textAreaStyle.getPropertyValue(\\\"padding-top\\\")), paddingTop);\\r\\n\\t\\t\\t\\tcss.paddingLeft = Math.max(getPropValue(textAreaStyle.getPropertyValue(\\\"padding-left\\\")), paddingLeft);\\r\\n\\t\\t\\t\\tthis.util.css(this.__compPlaceHolder,css);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__togglePlaceHolder = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__compPlaceHolder)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar visible = true;\\r\\n\\t\\t\\tif(this.__txtSourceCode)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvisible = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvisible = this.__isTextAreaBlank();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvisible ? this.__addPlaceHolder() : this.__removePlaceHolder();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__addPlaceHolder = function() \\r\\n\\t{\\r\\n\\t\\tif(!this.__isPlaceHolderVisible())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divTextAreaContainer.appendChild(this.__compPlaceHolder);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__setPlaceHolderPosition();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__removePlaceHolder = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__isPlaceHolderVisible())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__compPlaceHolder.parentNode.removeChild(this.__compPlaceHolder);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__isPlaceHolderVisible = function() \\r\\n\\t{\\r\\n\\t\\treturn (this.__compPlaceHolder && this.__compPlaceHolder.parentNode);\\r\\n\\t};\\r\\n\\t\\r\\n\\t//end of Placeholder functions\\r\\n\\t//FixedDiv functions (for Modal,ContextMenu etc)\\r\\n\\tthis.__compFixed = null;\\r\\n\\tNSEditor.prototype.__createFixedComp = function() \\r\\n\\t{\\r\\n\\t\\tif(!this.__compFixed)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__compFixed = this.util.createDiv(this.getID() + \\\"_FixedComp\\\",\\\"nsEditorFixedComp\\\");\\r\\n\\t\\t\\tthis.__dom.doc.body.appendChild(this.__compFixed);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getFixedComp = function() \\r\\n\\t{\\r\\n\\t\\tif(!this.__compFixed)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createFixedComp();\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__compFixed;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__isTextAreaBlank = function() \\r\\n\\t{\\r\\n\\t\\t/*var textArea = this.__getTextArea();\\r\\n\\t\\tif(textArea.children.length === 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\tvar getText = function(paramText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar regex = /[\\\\uFEFF]/g;\\r\\n\\t\\t\\tparamText = paramText.replace(regex,\\\"\\\");\\r\\n\\t\\t\\tparamText = paramText.replace(/(\\\\r\\\\n|\\\\n|\\\\r)/gm,\\\"\\\");\\r\\n\\t\\t\\treturn paramText;\\r\\n\\t\\t};\\r\\n\\t\\tif(textArea.children.length === 1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar firstChild = textArea.firstChild;\\r\\n\\t\\t\\tif(this.editorUtil.REGEX_EMPTY_TAGS.test(firstChild.nodeName))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar text = this.__getTextFromTextArea();\\r\\n\\t\\t\\tif(getText(text).length == 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar isEmpty = function(paramNode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!paramNode) \\r\\n\\t\\t\\t{\\r\\n\\t            return true;\\r\\n\\t        }\\r\\n\\t\\t\\tif(self.util.isTextNode(paramNode))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn paramNode.nodeValue === null || paramNode.nodeValue.trim().length === 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar regexNonEmptyTags = /^(img|svg|canvas|input|textarea|form)$/;\\r\\n\\t\\t\\tif(regexNonEmptyTags.test(paramNode.nodeName.toLowerCase()))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(self.util.isElement(paramNode))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar text = paramNode.textContent || paramNode.innerText;\\r\\n\\t\\t\\t\\tif(getText(text).length == 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!self.util.isElement(paramNode))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\tvar arrElements = textArea.querySelectorAll(\\\"*\\\");\\r\\n\\t\\tfor(var count = 0;count < arrElements.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar ele = arrElements[count];\\r\\n\\t\\t\\tif(!isEmpty(ele) && !(ele.tagName.toLowerCase() == \\\"br\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn true;*/\\r\\n\\t\\tvar textArea = this.__getTextArea();\\r\\n\\t\\tif (textArea.firstChild) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar firstChild = textArea.firstChild;\\r\\n\\t\\t    if(this.editorUtil.REGEX_EMPTY_TAGS.test(firstChild.nodeName))\\r\\n\\t\\t    {\\r\\n\\t\\t    \\treturn false;\\r\\n\\t\\t    }\\r\\n\\t\\t    var nextNode = this.util.findNextNode(firstChild,function(node) \\r\\n\\t\\t    { \\r\\n\\t\\t    \\treturn node && !self.editorUtil.isEmptyTextNode(node); \\r\\n\\t\\t    }, textArea);\\r\\n\\t\\t    if (this.util.isTextNode(firstChild) && !nextNode) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\treturn self.editorUtil.isEmptyTextNode(firstChild);\\r\\n\\t\\t    }\\r\\n\\t\\t    if (!nextNode) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar value = this.util.loopAllChildren(firstChild,function(paramElement) \\r\\n\\t\\t    \\t{ \\r\\n\\t\\t    \\t\\treturn self.editorUtil.isEmptyNode(paramElement) || self.util.isElementOfType(paramElement,\\\"br\\\"); \\r\\n\\t\\t    \\t});\\r\\n\\t\\t    \\tif(value)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\treturn true;\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    }\\r\\n\\t\\t    return false;\\r\\n\\t    }\\r\\n\\t    return true;   \\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getStyleValue = function(styleValue) \\r\\n\\t{\\r\\n        return parseInt(styleValue, 10) || 0;\\r\\n    };\\r\\n    \\r\\n    NSEditor.prototype.__initializeModules = function() \\r\\n\\t{\\r\\n    \\tthis.editorUtil = new NSEditorUtil(this);\\r\\n\\t\\tthis.__selection = new NSSelection(this);\\r\\n\\t\\tthis.__toolBar = new NSToolBar(this);\\r\\n\\t\\tthis.__execCommand = new NSExecCommand(this);\\r\\n\\t\\tthis.__stack = new NSStack(this);\\r\\n\\t};\\r\\n    \\r\\n    //section of functions for util\\r\\n    NSEditor.prototype.__getUtilClass = function(utilClassName) \\r\\n\\t{\\r\\n\\t\\tif(NSEditor.__util)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var utilName in NSEditor.__util)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(utilName == utilClassName)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn NSEditor.__util[utilName];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.throwNSError(\\\"NSEditor\\\",utilClassName + \\\" util has not been loaded.\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__getUtilInstance = function(utilClassName,utilInstanceID,plugginName,objPluggin,utilSetting) \\r\\n\\t{\\r\\n\\t\\tvar utilClass = this.__getUtilClass(utilClassName);\\r\\n\\t\\tif(utilClass)\\r\\n\\t\\t{\\r\\n\\t\\t\\t!this.__utilInstance[utilClassName] && (this.__utilInstance[utilClassName] = {});\\r\\n\\t\\t\\t!this.__utilInstance[utilClassName][utilInstanceID] && (this.__utilInstance[utilClassName][utilInstanceID] = {});\\r\\n\\t\\t\\tvar objUtilPluggin = this.__utilInstance[utilClassName][utilInstanceID][plugginName];\\r\\n\\t\\t\\tif(objUtilPluggin && objUtilPluggin.instance)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn objUtilPluggin.instance;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar objUtil = new utilClass(this,objPluggin,utilSetting);\\r\\n\\t\\t\\tobjUtil.id = utilInstanceID;\\r\\n\\t\\t\\tobjUtil.selection = this.__selection;\\r\\n\\t\\t\\tobjUtil.util = this.util;\\r\\n\\t\\t\\tobjUtil.editorUtil = this.editorUtil;\\r\\n\\t\\t\\tvar item = {instance: objUtil,instanceID: utilInstanceID,plugginInstance: objPluggin,utilSetting: utilSetting};\\r\\n\\t\\t\\tthis.__utilInstance[utilClassName][utilInstanceID][plugginName] = item;\\r\\n\\t\\t\\treturn objUtil;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t//end of section of functions for util\\r\\n    \\r\\n\\t//section of functions for pluggin\\r\\n\\tNSEditor.prototype.__initializePlugins = function() \\r\\n\\t{\\r\\n\\t\\tthis.__pluginsInstances = {};\\r\\n\\t\\tif(NSEditor.__plugins)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var plugginName in NSEditor.__plugins)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objPlugin = new NSEditor.__plugins[plugginName](this);\\r\\n\\t\\t\\t\\tobjPlugin.nsEditor = this;\\r\\n\\t\\t\\t\\tobjPlugin.selection = this.__selection;\\r\\n\\t\\t\\t\\tobjPlugin.util = this.util;\\r\\n\\t\\t\\t\\tobjPlugin.editorUtil = this.editorUtil;\\r\\n\\t\\t\\t\\tthis.__pluginsInstances[plugginName] = {prototype: NSEditor.__plugins[plugginName],instance: objPlugin};\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__callSetSettingsInPluggin = function() \\r\\n\\t{\\r\\n\\t\\tthis.__callFunctionInPlugins(\\\"setSettings\\\");\\r\\n\\t\\tthis.__dispatchInternalEvent(\\\"setSettings\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__callInitializeInPluggin = function() \\r\\n\\t{\\r\\n\\t\\tthis.__callFunctionInPlugins(\\\"initialize\\\");\\r\\n\\t\\tthis.__dispatchInternalEvent(\\\"initialize\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__callComponentsInitializedInPluggin = function() \\r\\n\\t{\\r\\n\\t\\tthis.__callFunctionInPlugins(\\\"componentsInitialized\\\");\\r\\n\\t\\tthis.__dispatchInternalEvent(\\\"componentsInitialized\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__callDestroyInPluggin = function() \\r\\n\\t{\\r\\n\\t\\tthis.__callFunctionInPlugins(\\\"destroy\\\");\\r\\n\\t\\tthis.__dispatchInternalEvent(\\\"destroy\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__callResizedInPluggin = function() \\r\\n\\t{\\r\\n\\t\\tthis.__callFunctionInPlugins(\\\"resized\\\");\\r\\n\\t\\tthis.__dispatchInternalEvent(\\\"resized\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__callAddStyleIFrameInPluggin = function() \\r\\n\\t{\\r\\n\\t\\treturn this.__callFunctionInPlugins(\\\"addStyleInIFrame\\\");\\r\\n\\t\\tthis.__dispatchInternalEvent(\\\"addStyleInIFrame\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__callFunctionInPlugins = function(functionName,arrParams) \\r\\n\\t{\\r\\n\\t\\tvar arrRetValue = [];\\r\\n\\t\\tif(this.__pluginsInstances)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var plugginName in this.__pluginsInstances)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objPlugin = this.__pluginsInstances[plugginName].instance;\\r\\n\\t\\t\\t\\tif(objPlugin && objPlugin[functionName])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar retValue = objPlugin[functionName].apply(objPlugin,arrParams);\\r\\n\\t\\t\\t\\t\\tif(!this.util.isUndefined(retValue))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrRetValue.push({name: plugginName,value: retValue});\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn arrRetValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__callPromptBox = function(titleHtml,message,okText,cancelText,okHandler,cancelHandler) \\r\\n\\t{\\r\\n\\t\\tif(this.__config[\\\"promptBoxCallback\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config[\\\"promptBoxCallback\\\"](titleHtml,message,okText,cancelText,okHandler,cancelHandler);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar closeConfirmBox = function(event)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dom.doc.body.removeChild(divContainer);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar divContainer = this.util.createDiv(\\\"nsEditorConfirmContainer\\\",\\\"nsEditorPromptOvelay\\\");\\r\\n\\t\\t\\tvar content = \\\"<div class='nsEditorPrompt'>\\\" +\\r\\n\\t    \\t\\t\\t\\t\\t\\t\\\"<header>\\\" +\\r\\n\\t    \\t\\t\\t\\t\\t\\t\\t\\\"<h3> \\\" + titleHtml + \\\" </h3> \\\" +\\r\\n\\t    \\t\\t\\t\\t\\t\\t\\t\\\"<i id='nsEditorIconClose' class='fa fa-close'></i>\\\" +\\r\\n\\t    \\t\\t\\t\\t\\t\\t\\\"</header>\\\" +\\r\\n\\t        \\t\\t\\t\\t\\t\\\"<div class='nsEditorPromptBody'>\\\" +\\r\\n\\t        \\t\\t\\t\\t\\t\\t\\\" <p> \\\" + message + \\\" </p> \\\" +\\r\\n\\t        \\t\\t\\t\\t\\t\\\"</div>\\\" +\\r\\n\\t        \\t\\t\\t\\t\\t\\\"<footer>\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t         \\\"<div class='controls'>\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t             \\\" <button id='btnEditorConfirmOk' class='nsEditorPromptButton nsEditorPromptButtonDanger'>\\\" + okText + \\\"</button> \\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t             \\\" <button id='btnEditorConfirmCancel' class='nsEditorPromptButton nsEditorPromptButtonDefault'>\\\" + cancelText + \\\"</button> \\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t         \\\"</div>\\\" +\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\\"</footer>\\\" +\\r\\n\\t\\t\\t\\t\\t\\t   \\\"</div>\\\";\\r\\n\\t\\t\\tdivContainer.innerHTML = content;\\r\\n\\t\\t\\tthis.__dom.doc.body.insertBefore(divContainer,this.__dom.doc.body.firstChild);\\r\\n\\t\\t\\tthis.util.addEvent(this.__dom.doc.getElementById(\\\"nsEditorIconClose\\\"),\\\"click\\\",closeConfirmBox);\\r\\n\\t\\t\\tthis.util.addEvent(this.__dom.doc.getElementById(\\\"btnEditorConfirmOk\\\"),\\\"click\\\",function(event){\\r\\n\\t\\t\\t\\tif(okHandler)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tokHandler(event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tcloseConfirmBox();\\r\\n\\t\\t\\t});\\r\\n\\t\\t\\tthis.util.addEvent(this.__dom.doc.getElementById(\\\"btnEditorConfirmCancel\\\"),\\\"click\\\",function(event){\\r\\n\\t\\t\\t\\tif(cancelHandler)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcancelHandler(event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tcloseConfirmBox();\\r\\n\\t\\t\\t});\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t//end of section of functions for pluggin\\r\\n\\r\\n\\tNSEditor.prototype.__addElement = function (node,config) \\r\\n\\t{\\r\\n\\t\\tthis.__selection.restoreSelection();\\r\\n\\t\\tif(node)\\r\\n\\t\\t{\\r\\n\\t\\t\\tconfig = config || {};\\r\\n\\t\\t\\tvar doc = this.__getDocument();\\r\\n\\t\\t\\tvar win = this.__getWindow();\\r\\n\\t\\t\\tvar textArea = this.__getTextArea();\\r\\n\\t\\t\\tvar html = this.getHtml();\\r\\n\\t\\t\\tif(html == this.__defaultContent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(textArea);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar element = this.__selection.getElementUnderCursor();\\r\\n\\t        var isCollapsed = this.__selection.isCollapsed();\\r\\n\\t        if (element && isCollapsed) \\r\\n\\t        {\\r\\n\\t        \\tvar self = this;\\r\\n\\t        \\tvar blockElement = this.editorUtil.getClosestElement(element,function(node) \\r\\n\\t        \\t{ \\r\\n\\t        \\t\\treturn self.editorUtil.isBlock(node,win); \\r\\n\\t        \\t},textArea);\\r\\n\\t            if (config.insertAfterSelectedNode && blockElement && blockElement !== textArea) \\r\\n\\t            {\\r\\n\\t            \\tif(!config.insertAfterNodeCallback || config.insertAfterNodeCallback(blockElement))\\r\\n\\t            \\t{\\r\\n\\t            \\t\\tthis.__selection.setCursorAfter(blockElement);\\r\\n\\t            \\t}\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        this.__selection.insertNode(doc.createTextNode(\\\"\\\\n\\\"));\\r\\n\\t        this.__selection.insertNode(node,Boolean.parse(config.insertCursorAfter));\\r\\n\\t        config.afterInsertCallback && config.afterInsertCallback();\\r\\n\\t        if(config.dispatchEvents && config.dispatchEvents.length)\\r\\n\\t        {\\r\\n\\t        \\tfor(var count = 0;count < config.dispatchEvents.length;count++)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar itemEvent = config.dispatchEvents[count];\\r\\n\\t        \\t\\tthis.__dispatchInternalEvent(itemEvent.name,itemEvent.args,itemEvent.args);\\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n    \\r\\n    NSEditor.prototype.__checkCharCount = function(element,charCounterType) \\r\\n    {\\r\\n    \\tvar maxCount = this.__config.maxCharCount\\r\\n        if (maxCount) \\r\\n        {\\r\\n            var countType = charCounterType || this.__config.charCounterType;\\r\\n            var length = this.editorUtil.getCharLength((typeof element === \\\"string\\\" ? element : this.__isCharTypeHTML() ? element.outerHTML : element.textContent), countType);\\r\\n            if (length > 0 && length + this.__getCharCount(countType) > maxCount) \\r\\n            {\\r\\n            \\t//TODO:indicate here that character has increased maxCharCount\\r\\n                return false;\\r\\n            }\\r\\n        }\\r\\n        return true;\\r\\n    };\\r\\n    \\r\\n    NSEditor.prototype.__getCharCount = function(charCounterType) \\r\\n    {\\r\\n        charCounterType = (typeof charCounterType === \\\"string\\\") ? charCounterType : this.__config.charCounterType;\\r\\n        var count = this.editorUtil.getCharLength((this.__isCharTypeHTML() ? this.getHtml() : this.getText()), charCounterType);\\r\\n        return count;\\r\\n    };\\r\\n\\r\\n\\t//function related to Media sources like img,audio,video\\r\\n\\tNSEditor.prototype.__createCustomMediaContainerContainer = function(mediaContainer,cssClass,contenteditable) \\r\\n\\t{\\r\\n\\t\\tcontenteditable = Boolean.parse(contenteditable);\\r\\n        var container = this.util.createDiv(null,\\\"nsEditorMediaContainerContainer\\\");\\r\\n        if(cssClass)\\r\\n        {\\r\\n        \\tthis.util.addStyleClass(cssClass);\\r\\n        }\\r\\n        container.setAttribute(\\\"contenteditable\\\",contenteditable);\\r\\n        if(mediaContainer)\\r\\n        {\\r\\n        \\tcontainer.appendChild(mediaContainer);\\r\\n        }\\r\\n        return container;\\r\\n    };\\r\\n\\r\\n    NSEditor.prototype.__createCustomMediaContainer = function(element,parent) \\r\\n    {\\r\\n        var container = this.util.createDiv(null,\\\"nsEditorMediaContainer\\\");\\r\\n        if(element)\\r\\n        {\\r\\n        \\tcontainer.appendChild(element);\\r\\n        }\\r\\n        if(parent)\\r\\n        {\\r\\n        \\tparent.appendChild(container);\\r\\n        }\\r\\n        return container;\\r\\n    };\\r\\n\\r\\n    NSEditor.prototype.__createCustomMediaCaption = function(caption,parent) \\r\\n    {\\r\\n        var divCaption = this.util.createDiv(null,\\\"nsEditorMediaCaption\\\");\\r\\n        divCaption.setAttribute(\\\"contenteditable\\\", true);\\r\\n        var divContent = this.util.createDiv(null,\\\"nsEditorMediaCaptionContent\\\");\\r\\n        divContent.innerHTML = caption;\\r\\n        divCaption.appendChild(divContent);\\r\\n        if(parent)\\r\\n        {\\r\\n        \\tparent.appendChild(divCaption);\\r\\n        }\\r\\n        return divCaption;\\r\\n    };\\r\\n\\t\\r\\n\\t//end of function related to Media sources like img,audio,video\\r\\n\\t\\r\\n\\tNSEditor.prototype.__isCharTypeHTML = function() \\r\\n    {\\r\\n\\t\\treturn (this.__config.charCounterType == \\\"byte-html\\\")\\r\\n    };\\r\\n    \\t\\r\\n\\t//function using the editor\\r\\n\\t\\r\\n\\tthis.__funcID = null;\\r\\n\\tNSEditor.prototype.__funcExecuted = function(funcID) \\r\\n\\t{\\r\\n\\t\\tthis.__funcID = funcID;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.__isFuncExecuted = function(funcID) \\r\\n\\t{\\r\\n\\t\\tvar retValue = (this.__funcID == funcID);\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//end of function using the editor \\r\\n    \\r\\n\\tNSEditor.TOOLBAR_BUTTONS_BOLD = \\\"bold\\\";\\r\\n\\tNSEditor.TOOLBAR_BUTTONS_ITALIC = \\\"italic\\\";\\r\\n\\tNSEditor.TOOLBAR_BUTTONS_UNDERLINE = \\\"underline\\\";\\r\\n\\tNSEditor.TOOLBAR_BUTTONS_STRIKETHROUGH = \\\"strikeThrough\\\";\\r\\n\\tNSEditor.TOOLBAR_BUTTONS_SUBSCRIPT = \\\"subscript\\\";\\r\\n\\tNSEditor.TOOLBAR_BUTTONS_SUPERSCRIPT = \\\"superscript\\\";\\r\\n\\tNSEditor.TOOLBAR_BUTTONS_FONTFAMILY = \\\"fontFamily\\\";\\r\\n\\tNSEditor.TOOLBAR_BUTTONS_FONTSIZE = \\\"fontSize\\\";\\r\\n\\tNSEditor.TOOLBAR_BUTTONS_PARAGRAPHFORMAT = \\\"paragraphFormat\\\";\\r\\n\\tNSEditor.TOOLBAR_BUTTONS_ALIGN = \\\"align\\\";\\r\\n\\tNSEditor.TOOLBAR_BUTTONS_ORDEREDLIST = \\\"orderedList\\\";\\r\\n\\tNSEditor.TOOLBAR_BUTTONS_UNORDEREDLIST = \\\"unorderedList\\\";\\r\\n\\tNSEditor.TOOLBAR_BUTTONS_UNDO = \\\"undo\\\";\\r\\n\\tNSEditor.TOOLBAR_BUTTONS_REDO = \\\"redo\\\";\\r\\n\\tNSEditor.MODE_TEXTAREA = \\\"textArea\\\";\\r\\n\\tNSEditor.MODE_IFRAME = \\\"iframe\\\";\\r\\n\\t\\r\\n\\treturn NSEditor;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSEditor\\\",NSEditor);\\\"use strict\\\";\\r\\n/*https://www.brainbell.com/javascript/making-resizable-table-js.html*/\\r\\nvar NSResizableTable = (function()\\r\\n{\\r\\n\\tfunction NSResizableTable(table,setting,doc)\\r\\n\\t{\\r\\n\\t\\tthis.__table = table;\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__doc = doc;\\r\\n\\t\\tthis.util = new NSUtil();\\t\\r\\n\\t\\t\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\tthis.__dom = null;\\r\\n\\t    this.__id = null;\\r\\n\\t    this.__origTableProp = {};\\r\\n\\t    this.__arrResizer = [];\\r\\n\\t    this.__objDrag = null;\\r\\n\\t    this.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSResizableTable.prototype.__initialize = function()\\r\\n\\t{\\r\\n\\t\\tif(this.util.hasStyleClass(this.__table,\\\"nsResizableTable\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.warning(\\\"NSResizableTable\\\",\\\"Table has already been processed\\\");\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__dom = this.util.getDomVariables();\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t\\tthis.util.addStyleClass(this.__table,\\\"nsResizableTable\\\");\\r\\n\\t\\tthis.__initCols();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSResizableTable.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tvar setting = this.__setting ? this.__setting : {};\\r\\n\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\tgetRowCallback: setting[\\\"getRowCallback\\\"]\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSResizableTable.prototype.__initCols = function()\\r\\n\\t{\\r\\n\\t\\tvar table = this.__table;\\r\\n\\t\\tvar row = table.getElementsByTagName(\\\"tr\\\")[0];\\r\\n\\t\\tif(this.__config.getRowCallback)\\r\\n\\t\\t{\\r\\n\\t\\t\\trow = this.__config.getRowCallback(table,this)\\r\\n\\t\\t}\\r\\n\\t\\tvar arrCols = row ? row.children : null;\\r\\n\\t\\tif(arrCols)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__origTableProp[\\\"overflow\\\"] = table.style.overflow;\\r\\n\\t\\t\\ttable.style.overflow = \\\"hidden\\\";\\r\\n\\t\\t\\tvar tableHeight = table.offsetHeight;\\r\\n\\t\\t\\tfor (var count=0;count < arrCols.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar col = arrCols[count];\\r\\n\\t\\t\\t\\tvar resizer = this.__createResizer(count,tableHeight);\\r\\n\\t\\t\\t\\tcol.appendChild(resizer);\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(col,\\\"nsResizableTableColumn\\\");\\r\\n\\t\\t\\t\\tthis.__addEventToResizer(resizer);\\r\\n\\t\\t\\t\\tthis.__arrResizer.push(resizer);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSResizableTable.prototype.__createResizer = function(colIndex,height)\\r\\n\\t{\\r\\n\\t\\tvar doc = this.__doc || this.__dom.doc;\\r\\n\\t\\tvar id = this.__getID() + \\\"_col\\\" + colIndex;\\r\\n\\t\\tvar resizer = this.util.createDiv(id,\\\"nsColumnResizer\\\",doc);\\r\\n\\t\\tresizer.style.height = height + \\\"px\\\";\\r\\n\\t\\treturn resizer;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSResizableTable.prototype.__addEventToResizer = function(resizer)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar resizeEventHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = self.util.getEvent(event);\\r\\n\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t};\\r\\n\\t\\tthis.util.addEvent(resizer,\\\"mousedown touchstart\\\",this.__resizerMouseDownHandler.bind(this,resizer));\\r\\n\\t\\tthis.util.addEvent(resizer,\\\"click\\\",resizeEventHandler);\\r\\n\\t\\tthis.util.addEvent(resizer,\\\"dblclick\\\",resizeEventHandler);\\r\\n\\t\\tthis.util.addEvent(resizer,\\\"mouseover\\\",this.__resizerMouseOverHandler.bind(this,resizer));\\r\\n\\t\\tthis.util.addEvent(resizer,\\\"mouseout\\\",this.__resizerMouseOutHandler.bind(this,resizer));\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSResizableTable.prototype.__resizerMouseDownHandler = function(resizer,event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar doc = this.__doc || this.__dom.doc;\\r\\n\\t\\tresizer = event.target;\\r\\n\\t\\tthis.__objDrag = {dragging: true,resizer: resizer};\\r\\n\\t\\tthis.__objDrag.resizerMouseMove = this.__resizerMouseOverHandler.bind(this,resizer);\\r\\n\\t\\tthis.__objDrag.resizerMouseUp = this.__resizerMouseOutHandler.bind(this,resizer);\\r\\n\\t\\tthis.util.addEvent(resizer,\\\"mouseover\\\",this.__objDrag.resizerMouseMove);\\r\\n\\t\\tthis.util.addEvent(resizer,\\\"mouseout\\\",this.__objDrag.resizerMouseUp);\\r\\n\\t\\tthis.__objDrag.docMouseMove = this.__docMouseMoveHandler.bind(this,resizer);\\r\\n\\t\\tthis.__objDrag.docMouseUp = this.__docMouseUpHandler.bind(this,resizer);\\r\\n\\t\\tthis.util.addEvent(doc,\\\"mousemove touchmove\\\",this.__objDrag.docMouseMove);\\r\\n\\t\\tthis.util.addEvent(doc,\\\"mouseup\\\",this.__objDrag.docMouseUp);\\r\\n\\t\\tthis.__objDrag.currentColumn = event.target.parentElement;\\r\\n\\t\\tthis.__objDrag.nextColumn = this.__objDrag.currentColumn.nextElementSibling;\\r\\n\\t\\tthis.__objDrag.pageX = event.pageX; \\r\\n\\t\\tvar padding = this.__getPaddingDiff(this.__objDrag.currentColumn);\\r\\n\\t\\tthis.__objDrag.currentColumnWidth = this.__objDrag.currentColumn.offsetWidth - padding;\\r\\n\\t\\tif (this.__objDrag.nextColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objDrag.nextColumnWidth = this.__objDrag.nextColumn.offsetWidth - padding;\\r\\n\\t\\t}\\r\\n\\t\\tvar item = {column: this.__objDrag.currentColumn,index: this.__objDrag.currentColumn.cellIndex};\\r\\n\\t\\tthis.__dispatchEvent(NSResizableTable.COLUMN_RESIZING_START,item,item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSResizableTable.prototype.__resizerMouseOverHandler = function(resizer,event)\\r\\n\\t{\\r\\n\\t\\t//if(this.__objDrag && this.__objDrag.dragging)\\r\\n\\t\\t//{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tthis.util.addStyleClass(event.target,\\\"nsColumnResizerMoving\\\");\\r\\n\\t\\t//}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSResizableTable.prototype.__resizerMouseOutHandler = function(resizer,event)\\r\\n\\t{\\r\\n\\t\\t//if(this.__objDrag && this.__objDrag.dragging)\\r\\n\\t\\t//{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tthis.util.removeStyleClass(event.target,\\\"nsColumnResizerMoving\\\");\\r\\n\\t\\t//}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSResizableTable.prototype.__docMouseMoveHandler = function(resizer,event)\\r\\n\\t{\\r\\n\\t\\tif(this.__objDrag && this.__objDrag.dragging)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tif(this.__objDrag.currentColumn)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.makeBodyUnselectable();\\r\\n\\t\\t\\t\\tvar diffX = event.pageX - this.__objDrag.pageX;\\r\\n\\t\\t\\t\\tif(this.__objDrag.nextColumn)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__objDrag.nextColumn.style.width = (this.__objDrag.nextColumnWidth - diffX) + \\\"px\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__objDrag.currentColumn.style.width = (this.__objDrag.currentColumnWidth + diffX) + \\\"px\\\";\\r\\n\\t\\t\\t\\tvar item = {column: this.__objDrag.currentColumn,index: this.__objDrag.currentColumn.cellIndex};\\r\\n\\t\\t\\t\\tthis.__dispatchEvent(NSResizableTable.COLUMN_RESIZING,item,item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSResizableTable.prototype.__docMouseUpHandler = function(resizer,event)\\r\\n\\t{\\r\\n\\t\\tif(this.__objDrag)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar doc = this.__doc || this.__dom.doc;\\r\\n\\t\\t\\tthis.util.removeEvent(this.__objDrag.resizer,\\\"mouseover\\\",this.__objDrag.resizerMouseMove);\\r\\n\\t\\t\\tthis.util.removeEvent(this.__objDrag.resizer,\\\"mouseout\\\",this.__objDrag.resizerMouseUp);\\r\\n\\t\\t\\tthis.util.removeEvent(doc,\\\"mousemove touchmove\\\",this.__objDrag.docMouseMove);\\r\\n\\t\\t\\tthis.util.removeEvent(doc,\\\"mouseup\\\",this.__objDrag.docMouseUp);\\r\\n\\t\\t\\tthis.util.makeBodySelectable();\\r\\n\\t\\t\\tvar currentColumn = this.__objDrag.currentColumn;\\r\\n\\t\\t\\tthis.__objDrag = null;\\r\\n\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t\\tvar item = {column: currentColumn,index: currentColumn.cellIndex};\\r\\n\\t\\t\\tthis.__dispatchEvent(NSResizableTable.COLUMN_RESIZING_END,item,item);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t/*********************************Start of Util Function*******************************/\\r\\n\\tNSResizableTable.prototype.__getID = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__id)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__id = \\\"compResizableTable\\\" + this.util.getUniqueId();\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__id;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSResizableTable.prototype.__getPaddingDiff = function(column)\\r\\n\\t{\\r\\n\\t\\tif (this.util.getStyleValue(column,\\\"box-sizing\\\") == \\\"border-box\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn 0;\\r\\n\\t\\t}\\r\\n\\t\\tvar padLeft = this.util.getStyleValue(column,\\\"padding-left\\\");\\r\\n\\t\\tvar padRight = this.util.getStyleValue(column,\\\"padding-right\\\");\\r\\n\\t\\treturn (parseInt(padLeft) + parseInt(padRight));\\r\\n\\t };\\r\\n\\t \\r\\n\\t NSResizableTable.prototype.__dispatchEvent = function(eventType,data,param,bubbles,cancelable)\\r\\n\\t {\\r\\n\\t\\tthis.util.dispatchEvent(this.__table,eventType,data,param,bubbles,cancelable);\\r\\n\\t };\\r\\n\\t/*********************************End of Util Function*******************************/\\r\\n\\t\\r\\n\\tNSResizableTable.prototype.destroy = function()\\r\\n\\t{\\r\\n\\t\\tfor(var key in this.__origTableProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__table.style[key] = this.__origTableProp[key];\\r\\n\\t\\t}\\r\\n\\t\\tthis.__origTableProp = {};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSResizableTable.COLUMN_RESIZING_START = \\\"columnResizingStart\\\";\\r\\n\\tNSResizableTable.COLUMN_RESIZING = \\\"columnResizing\\\";\\r\\n\\tNSResizableTable.COLUMN_RESIZING_END = \\\"columnResizingEnd\\\";\\r\\n\\t\\r\\n\\treturn NSResizableTable;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSResizableTable\\\",NSResizableTable);var NSTablePicker = (function()\\r\\n{\\r\\n\\tvar NSTablePicker = function(setting)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar config = {};\\r\\n\\t    \\r\\n\\t    var util = null;\\r\\n\\t    var win = null;\\r\\n\\t\\tvar doc = null;\\r\\n\\t\\tvar deviceSupport = null;\\r\\n\\t\\tvar parent = null;\\r\\n\\t    var container = null;\\r\\n\\t    var tblContainerCon = null;\\r\\n\\t    var tblContainer = null;\\r\\n\\t    var labelContainerCon = null;\\r\\n\\t    var labelContainer = null;\\r\\n\\t    var arrCells = [];\\r\\n\\t    var strDefaultStyle = \\\"\\\";\\r\\n\\t    var nsPopUp = null;\\r\\n\\t    var id = null;\\r\\n\\t\\t\\r\\n\\t\\tvar initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!setting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetting = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tutil = new NSUtil();\\r\\n\\t\\t\\tvar obj = util.getDomVariables();\\r\\n    \\t\\twin = obj.win;\\r\\n    \\t\\tdoc = obj.doc;\\r\\n    \\t\\tdeviceSupport = util.getSupportedEvents();\\r\\n\\t\\t\\tconfig = {\\r\\n\\t\\t\\t    context: setting[\\\"context\\\"] || win,\\r\\n\\t\\t\\t    isPopUp: Boolean.parse(setting[\\\"isPopUp\\\"]),\\r\\n\\t\\t\\t    popUpPos: setting[\\\"popUpPos\\\"] || util.POS_BOTTOMRIGHT,\\r\\n\\t\\t\\t    trigger: setting[\\\"trigger\\\"],\\r\\n\\t\\t\\t    triggerEvent: setting[\\\"triggerEvent\\\"] || \\\"click\\\",\\r\\n\\t\\t\\t    closeOnOutsideClick: util.isUndefinedOrNull(setting[\\\"closeOnOutsideClick\\\"]) ? true : Boolean.parse(setting[\\\"closeOnOutsideClick\\\"]),\\r\\n\\t\\t\\t    element: setting[\\\"element\\\"],\\r\\n\\t\\t\\t\\twidth: setting[\\\"width\\\"] || 200,\\r\\n\\t\\t\\t\\theight: setting[\\\"height\\\"] || 200,\\r\\n\\t\\t\\t\\tcellWidth: setting[\\\"cellWidth\\\"] || 20,\\r\\n\\t\\t\\t\\tcellHeight: setting[\\\"cellHeight\\\"] || 20,\\r\\n\\t\\t\\t\\trowCount: setting[\\\"rowCount\\\"] || 10,\\r\\n\\t\\t\\t\\tcolumnCount: setting[\\\"columnCount\\\"] || 10,\\r\\n\\t\\t\\t\\tenableShowDimension: util.isUndefinedOrNull(setting[\\\"enableShowDimension\\\"]) ? true : Boolean.parse(setting[\\\"enableShowDimension\\\"]),\\r\\n\\t\\t\\t\\ttheme: setting[\\\"theme\\\"] || \\\"White\\\",\\r\\n\\t\\t\\t\\tcellMouseOverCallback: setting[\\\"cellMouseOverCallback\\\"],\\r\\n\\t\\t\\t\\tcellMouseOutCallback: setting[\\\"cellMouseOutCallback\\\"],\\r\\n\\t\\t\\t\\tcellClickCallback: setting[\\\"cellClickCallback\\\"],\\r\\n\\t\\t\\t\\tpopUpOpenCallback: setting[\\\"popUpOpenCallback\\\"],\\r\\n\\t\\t\\t\\tpopUpCloseCallback: setting[\\\"popUpCloseCallback\\\"],\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif (!config.isPopUp && !config.element) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tutil.throwNSError(\\\"NSTablePicker\\\",\\\"Element in setting is missing\\\");\\r\\n\\t        }\\r\\n\\t   \\t\\tif(!setting.customClass)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tsetting.customClass = {};\\r\\n    \\t\\t}\\r\\n    \\t\\tconfig.customClass = {\\r\\n    \\t\\t\\t\\tcontainer:setting.customClass[\\\"container\\\"],\\r\\n    \\t\\t\\t\\ttableContainer:setting.customClass[\\\"tableContainer\\\"],\\r\\n    \\t\\t\\t\\ttable:setting.customClass[\\\"table\\\"],\\r\\n    \\t\\t\\t\\trowContainer:setting.customClass[\\\"rowContainer\\\"],\\r\\n    \\t\\t\\t\\trow:setting.customClass[\\\"row\\\"],\\r\\n    \\t\\t\\t\\tcellContainer:setting.customClass[\\\"cellContainer\\\"],\\r\\n    \\t\\t\\t\\tcell:setting.customClass[\\\"cell\\\"],\\r\\n    \\t\\t\\t\\tlabelContainer:setting.customClass[\\\"labelContainer\\\"],\\r\\n    \\t\\t\\t\\tlabel:setting.customClass[\\\"label\\\"]\\r\\n    \\t\\t};\\r\\n\\r\\n\\t\\t\\tcreateComponent();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar createComponent = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(container)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(container.parentElement)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcontainer.parentElement.removeChild(container);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tresetVars();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(config.isPopUp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar popUpSetting = {type:\\\"div\\\",width:null,position:config.popUpPos,closeOnOutsideClick:config.closeOnOutsideClick\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t,hideOrRemoveOnOutsideClick: \\\"hide\\\",width: \\\"auto\\\"};\\r\\n\\t\\t\\t\\tnsPopUp = new util.nsPopUp(popUpSetting);\\r\\n\\t\\t\\t\\tnsPopUp.create();\\r\\n\\t\\t\\t\\tparent = nsPopUp.getPopUp();\\r\\n\\t\\t\\t\\tif(config.trigger)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(util.isElement(config.trigger))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tutil.addEvent(config.trigger,config.triggerEvent,handleTriggerEvent);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tutil.warning(\\\"NSTablePicker\\\",\\\"Trigger is not a element\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparent = config.element;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcontainer = util.createDiv(getID() + \\\"Container\\\",\\\"nsTablePicker\\\");\\r\\n\\t\\t\\tparent.appendChild(container);\\r\\n\\t\\t\\tsetTheme(config.theme);\\r\\n\\t\\t\\tapplyCustomClass(container,\\\"container\\\");\\r\\n\\t\\t\\tvar radius = util.getStyleValue(container, \\\"border-radius\\\", true);\\r\\n\\t\\t\\tcreateTable(config.rowCount,config.columnCount);\\r\\n\\t\\t\\tcreateLabel();\\r\\n\\t\\t\\tif(!radius)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tradius = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tradius = util.getDimensionAsNumber(container,radius);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(radius)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tradius = parseInt(radius,10) * 2;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar labelHeight = 0;\\r\\n\\t\\t\\tif(labelContainerCon)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlabelHeight = labelContainerCon.offsetHeight;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//for Firefox\\r\\n\\t\\t\\t//container.style.width = (config.width + radius) + \\\"px\\\";\\r\\n\\t\\t\\t//container.style.height = (config.height + radius + labelHeight) + \\\"px\\\";\\r\\n\\t\\t\\t/*var paddingLeft = util.getStyleValue(tblContainerCon, \\\"padding-left\\\", true);\\r\\n\\t\\t\\tif(!paddingLeft)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tpaddingLeft = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tpaddingLeft = util.getDimensionAsNumber(tblContainerCon,paddingLeft);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar paddingRight = util.getStyleValue(tblContainerCon, \\\"padding-right\\\", true);\\r\\n\\t\\t\\tif(!paddingRight)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tpaddingRight = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tpaddingRight = util.getDimensionAsNumber(tblContainerCon,paddingRight);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\ttblContainerCon.style.width = (config.width + paddingLeft + paddingRight) + \\\"px\\\";*/\\r\\n\\t\\t\\ttblContainerCon.style.height = (config.height) + \\\"px\\\";\\r\\n\\t\\t\\t/*if(labelContainerCon)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar orignalValue = parent.style.display;\\r\\n\\t\\t\\t\\tparent.style.display = \\\"block\\\";\\r\\n\\t\\t\\t\\ttblContainerCon.style.height = (container.offsetHeight - labelContainerCon.offsetHeight) + \\\"px\\\";\\r\\n\\t\\t\\t\\tparent.style.display = (orignalValue) ? orignalValue : \\\"\\\";\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t\\tcalculateCellDimensions();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar calculateCellDimensions = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!config.cellWidth || !config.cellHeight)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar orignalValue = parent.style.display;\\r\\n\\t\\t\\t\\tparent.style.display = \\\"block\\\";\\r\\n\\t\\t\\t\\tif(!config.cellWidth)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar availableWidth = tblContainer.offsetWidth;\\r\\n\\t\\t\\t\\t\\tconfig.cellWidth = availableWidth / config.columnCount;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!config.cellHeight)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar availableHeight = tblContainer.offsetHeight;\\r\\n\\t\\t\\t\\t\\tconfig.cellHeight = availableHeight / config.rowCount;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tparent.style.display = (orignalValue) ? orignalValue : \\\"\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(config.cellWidth && config.cellHeight)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar id = getID() + \\\"Container\\\";\\r\\n\\t\\t\\t\\tutil.addCSSClassInDOM([\\\"#\\\" + id + \\\".nsTablePicker .nsTableCellContainer\\\"],[\\\"width:\\\" + config.cellWidth + \\\"px;height:\\\" + config.cellHeight + \\\"px;\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar createLabel = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(config.enableShowDimension)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlabelContainerCon = util.createDiv(null,\\\"nsTablePickerLblCon\\\");\\r\\n\\t\\t\\t\\tapplyCustomClass(labelContainerCon,\\\"labelContainer\\\");\\r\\n\\t\\t\\t\\tlabelContainer = util.createDiv(null,\\\"nsTablePickerLbl\\\");\\r\\n\\t\\t\\t\\tapplyCustomClass(labelContainer,\\\"label\\\");\\r\\n\\t\\t\\t\\tlabelContainerCon.appendChild(labelContainer);\\r\\n\\t\\t\\t\\tcontainer.appendChild(labelContainerCon);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar createTable = function(rowCount,colCount)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttblContainerCon = util.createDiv(null,\\\"nsTablePickerTblCon\\\");\\r\\n\\t\\t\\tapplyCustomClass(tblContainerCon,\\\"tableContainer\\\");\\r\\n\\t\\t\\ttblContainer = util.createDiv(null,\\\"nsTablePickerTbl\\\");\\r\\n\\t\\t\\tfor(var rowIndex = 0;rowIndex < rowCount;rowIndex++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar rowCon = createRow(rowIndex,colCount);\\r\\n\\t\\t\\t\\ttblContainer.appendChild(rowCon);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tapplyCustomClass(tblContainer,\\\"table\\\");\\r\\n\\t\\t\\ttblContainerCon.appendChild(tblContainer);\\r\\n\\t\\t\\tcontainer.appendChild(tblContainerCon);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar createRow = function(rowIndex,colCount)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rowContainer = util.createDiv(null,\\\"nsTableRowContainer\\\");\\r\\n\\t\\t\\trowContainer.setAttribute(\\\"ns-row-index\\\",rowIndex);\\r\\n\\t\\t\\tapplyCustomClass(rowContainer,\\\"rowContainer\\\");\\r\\n\\t\\t\\tvar row = util.createDiv(null,\\\"nsTableRow\\\");\\r\\n\\t\\t\\tfor(var cellIndex = 0;cellIndex < colCount;cellIndex++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cellCon = createCell(rowIndex,cellIndex,row);\\r\\n\\t\\t\\t\\trow.appendChild(cellCon);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tapplyCustomClass(row,\\\"row\\\");\\r\\n\\t\\t\\trowContainer.appendChild(row);\\r\\n\\t\\t\\treturn rowContainer;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar createCell = function(rowIndex,cellIndex,row)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cellContainer = util.createDiv(null,\\\"nsTableCellContainer\\\");\\r\\n\\t\\t\\tcellContainer.setAttribute(\\\"ns-row-index\\\",rowIndex);\\r\\n\\t\\t\\tcellContainer.setAttribute(\\\"ns-cell-index\\\",cellIndex);\\r\\n\\t\\t\\tapplyCustomClass(cellContainer,\\\"cellContainer\\\");\\r\\n\\t\\t\\tvar cell = util.createDiv(null,\\\"nsTableCell\\\");\\r\\n\\t\\t\\tcellContainer.appendChild(cell);\\r\\n\\t\\t\\tapplyCustomClass(cell,\\\"cell\\\");\\r\\n\\t\\t\\tstrDefaultStyle = cell.className;\\r\\n\\t\\t\\tutil.addEvent(cellContainer,\\\"mouseover\\\",cellMouseOverHandler.bind(null,cell,rowIndex,cellIndex));\\r\\n\\t\\t\\tutil.addEvent(cellContainer,\\\"mouseout\\\",cellMouseOutHandler.bind(null,cell,rowIndex,cellIndex));\\r\\n\\t\\t\\tutil.addEvent(cellContainer,\\\"click\\\",cellClickHandler.bind(null,cell,rowIndex,cellIndex));\\r\\n\\t\\t\\tarrCells.push({rowIndex: rowIndex,cellIndex: cellIndex,row: row,cell: cell,cellContainer: cellContainer});\\r\\n\\t\\t\\treturn cellContainer;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar cellMouseOverHandler = function(cell,rowIndex,cellIndex,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\tif(config.cellMouseOverCallback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig.cellMouseOverCallback(event,cell,rowIndex + 1,cellIndex + 1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t    if (event.target)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar xPos = (cellIndex + 1) * config.width / config.columnCount;\\r\\n\\t\\t\\t    var yPos = (rowIndex + 1) * config.height / config.rowCount;\\r\\n\\t\\t    }\\r\\n\\t\\t    renderCells(rowIndex,cellIndex);\\r\\n\\t\\t    refreshLabel(xPos,yPos,rowIndex,cellIndex);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar cellMouseOutHandler = function(cell,rowIndex,cellIndex,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\tif(config.cellMouseOutCallback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig.cellMouseOutCallback(event,cell,rowIndex + 1,cellIndex + 1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\trenderCells(null,null);\\r\\n\\t\\t\\trefreshLabel(0,0,null,null);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar cellClickHandler = function(cell,rowIndex,cellIndex,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = util.getEvent(event);\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\tif(config.cellClickCallback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig.cellClickCallback(event,cell,rowIndex + 1,cellIndex + 1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar renderCells = function(activeRowIndex,activeCellIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var cellCount = 0;cellCount < arrCells.length;cellCount++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrCells[cellCount];\\r\\n\\t\\t\\t\\tvar styleClass = strDefaultStyle;\\r\\n                if (item.rowIndex == activeRowIndex && item.cellIndex === activeCellIndex) \\r\\n                {\\r\\n                \\tstyleClass += \\\" nsTableCellActive\\\";\\r\\n                } \\r\\n                else if (item.rowIndex <= activeRowIndex && item.cellIndex <= activeCellIndex) \\r\\n                {\\r\\n                \\tstyleClass += \\\" nsTableCellSelected\\\";\\r\\n                } \\r\\n\\r\\n                /*if(item.rowIndex <= selectedRow && item.cellIndex <= selectedColumn) \\r\\n                {\\r\\n                  \\tstyleClass += \\\" nsTableCellActive\\\";\\r\\n                }*/\\r\\n                item.cell.setAttribute(\\\"class\\\",styleClass);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar refreshLabel = function(xPos,yPos,activeRowIndex,activeCellIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(config.enableShowDimension)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(activeRowIndex == null)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tlabelContainer.innerHTML = \\\"\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tlabelContainer.innerHTML = (activeRowIndex + 1)  + \\\" x \\\" + (activeCellIndex + 1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar applyCustomClass = function(element,type)\\r\\n    \\t{\\r\\n    \\t\\tif(element && type && config.customClass[type])\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tutil.addStyleClass(element,config.customClass[type]);\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar handleTriggerEvent= function(event)\\r\\n    \\t{\\r\\n    \\t\\tif(nsPopUp)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tevent = util.getEvent(event);\\r\\n    \\t\\t\\tevent.stopPropagation();\\r\\n    \\t\\t\\tif(nsPopUp.isOpen())\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tclose(event);\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t\\telse\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\topen(event);\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar resetVars = function()\\r\\n    \\t{\\r\\n    \\t\\tcontainer = null;\\r\\n\\t\\t\\tarrCells = [];\\r\\n\\t\\t\\tstrDefaultStyle = \\\"\\\";\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar getID = function()\\r\\n    \\t{\\r\\n    \\t\\tif(!id)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tvar comp = config.isPopUp ? (config.trigger ? config.trigger : null) : config.element;\\r\\n    \\t\\t\\tif(comp)\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tif(comp.hasAttribute(\\\"id\\\"))\\r\\n        \\t\\t\\t{\\r\\n        \\t\\t\\t\\tid = comp.getAttribute(\\\"id\\\");\\r\\n        \\t\\t\\t}\\r\\n        \\t\\t\\telse if(comp.hasAttribute(\\\"name\\\"))\\r\\n        \\t\\t\\t{\\r\\n        \\t\\t\\t\\tid = comp.getAttribute(\\\"name\\\");\\r\\n        \\t\\t\\t}\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t\\tif(!id)\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tid = \\\"comp\\\" + util.getUniqueId();\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t}\\r\\n    \\t\\treturn id;\\r\\n    \\t};\\r\\n\\t\\t\\r\\n\\t\\tvar setTheme = function(theme) \\r\\n    \\t{\\r\\n    \\t\\tif(container && config.theme)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tutil.removeStyleClass(container,\\\"nsTablePicker\\\" + config.theme);\\r\\n    \\t\\t\\tconfig.theme = theme;\\r\\n    \\t\\t\\tutil.addStyleClass(container,\\\"nsTablePicker\\\" + config.theme);\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar open = function(event) \\r\\n    \\t{\\r\\n    \\t\\tif(nsPopUp)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tnsPopUp.show();\\r\\n    \\t\\t\\tif(config.trigger)\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tnsPopUp.placePopUp(config.trigger);\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t\\telse if(event)\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tnsPopUp.placePopUp(event);\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t\\tif(config.popUpOpenCallback)\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tconfig.popUpOpenCallback(event,self);\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t}\\r\\n    \\t\\telse\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tutil.warning(\\\"NSTablePicker\\\",\\\"PopUp is not enabled\\\");\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar close = function(event) \\r\\n    \\t{\\r\\n    \\t\\tif(nsPopUp)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tnsPopUp.hide();\\r\\n    \\t\\t\\tif(config.popUpCloseCallback)\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tconfig.popUpCloseCallback(event,self);\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t}\\r\\n    \\t\\telse\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tutil.warning(\\\"NSTablePicker\\\",\\\"PopUp is not enabled\\\");\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar remove = function()\\r\\n    \\t{\\r\\n    \\t\\tif(nsPopUp)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tnsPopUp.remove();\\r\\n    \\t\\t\\tnsPopUp = null;\\r\\n    \\t\\t}\\r\\n    \\t\\telse if(container)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tif(container.parentElement)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcontainer.parentElement.removeChild(container);\\r\\n\\t\\t\\t\\t}\\r\\n    \\t\\t}\\r\\n    \\t\\tresetVars();\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar isOpen = function() \\r\\n    \\t{\\r\\n    \\t\\tif(nsPopUp)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\treturn nsPopUp.isOpen();\\r\\n    \\t\\t}\\r\\n    \\t\\treturn false;\\r\\n    \\t};\\r\\n\\t\\t\\r\\n\\t\\tinitialize();\\r\\n\\t\\t\\r\\n\\t\\tself.setTheme = setTheme;\\r\\n\\t\\tself.open = open;\\r\\n\\t\\tself.close = close;\\r\\n\\t\\tself.remove = remove;\\r\\n\\t\\tself.isOpen = isOpen;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSTablePicker;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSTablePicker\\\",NSTablePicker);\\\"use strict\\\"; \\r\\nvar NSTableUtil = (function()\\r\\n{\\r\\n\\tfunction NSTableUtil(doc,win) \\r\\n\\t{\\t\\t\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar util = new NSUtil();\\r\\n\\t\\tvar dom = util.getDomVariables();\\r\\n\\t\\t\\r\\n\\t\\tthis.doc = doc || dom.doc;\\r\\n\\t\\tthis.win = win || dom.window;\\r\\n\\t\\t\\r\\n\\t\\tthis.getRowsCount = function(table) \\r\\n\\t\\t{\\r\\n\\t        return table.rows.length;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.getColumnsCount = function(table) \\r\\n\\t    {\\r\\n\\t    \\tvar arrFlatRows = getFlattenRows(table);\\r\\n\\t        var colCount = arrFlatRows.reduce(function(total,cells,currentIndex,arr) \\r\\n\\t        {\\r\\n\\t            return Math.max(total, cells.length);\\r\\n\\t        },0);\\r\\n\\t        return colCount;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    //appendRow\\r\\n\\t    this.insertRow = function(table,rowReference,isInsertBelow,callback) \\r\\n\\t    {\\r\\n\\t    \\tvar arrRet = [];\\r\\n\\t    \\tvar row = null;\\r\\n\\t        if (!rowReference) \\r\\n\\t        {\\r\\n\\t            var colCount = this.getColumnsCount(table);\\r\\n\\t            row = this.doc.createElement(\\\"tr\\\");\\r\\n\\t            for (var colIndex = 0;colIndex < colCount; colIndex++) \\r\\n\\t            {\\r\\n\\t            \\tvar cell = this.doc.createElement(\\\"td\\\");\\r\\n\\t            \\tcallback && callback(cell,row,table,colIndex,rowReference,isInsertBelow);\\r\\n\\t                row.appendChild(cell);\\r\\n\\t                arrRet.push(cell);\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        else \\r\\n\\t        {\\r\\n\\t            row = rowReference.cloneNode(true);\\r\\n\\t            var arrCells = rowReference.querySelectorAll(\\\"td,th\\\");\\r\\n\\t            for (var colIndex = 0;colIndex < arrCells.length; colIndex++) \\r\\n\\t            {\\r\\n\\t            \\tvar cell = arrCells[colIndex];\\r\\n\\t            \\tvar rowspan = cell.getAttribute(\\\"rowspan\\\");\\r\\n\\t                if (rowspan && parseInt(rowspan, 10) > 1) \\r\\n\\t                {\\r\\n\\t                    var newRowSpan = parseInt(rowspan, 10) - 1;\\r\\n\\t                    if(newRowSpan > 1)\\r\\n\\t                    {\\r\\n\\t                    \\tcell.getAttribute(\\\"rowspan\\\",newRowSpan);\\r\\n\\t                    }\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t            arrCells = row.querySelectorAll(\\\"td,th\\\");\\r\\n\\t            for (var colIndex = 0;colIndex < arrCells.length; colIndex++) \\r\\n\\t            {\\r\\n\\t            \\tvar cell = arrCells[colIndex];\\r\\n\\t            \\tutil.removeAllChildren(cell);\\r\\n\\t            \\tcallback && callback(cell,row,table,colIndex,rowReference,isInsertBelow);\\r\\n\\t                arrRet.push(cell);\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        if (isInsertBelow && rowReference && rowReference.nextSibling) \\r\\n\\t        {\\r\\n\\t            if(rowReference.parentNode)\\r\\n\\t            {\\r\\n\\t            \\tvar parent = rowReference.parentNode;\\r\\n\\t            \\tparent.insertBefore(row,rowReference.nextSibling);\\r\\n\\t            }\\r\\n\\t                \\r\\n\\t        }\\r\\n\\t        else if (!isInsertBelow && rowReference) \\r\\n\\t        {\\r\\n\\t        \\tif(rowReference.parentNode)\\r\\n\\t            {\\r\\n\\t            \\tvar parent = rowReference.parentNode;\\r\\n\\t            \\tparent.insertBefore(row,rowReference);\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        else \\r\\n\\t        {\\r\\n\\t        \\tvar ref = table;\\r\\n\\t        \\tif(table.tBodies && table.tBodies.length)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tref = table.tBodies[0];\\r\\n\\t        \\t}\\r\\n\\t        \\tref.appendChild(row);\\r\\n\\t        }\\r\\n\\t        return {row: row,cells: arrRet};\\r\\n\\t    };\\r\\n\\t\\t\\r\\n\\t\\tthis.removeRow = function(table,rowIndex,callback) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrRet = [];\\r\\n\\t\\t\\tvar arrFlatRows = getFlattenRows(table);\\r\\n\\t\\t\\tvar row = table.rows[rowIndex];\\r\\n\\t\\t\\tvar arrCells = arrFlatRows[rowIndex];\\r\\n\\t\\t\\tfor(var colIndex = 0;colIndex < arrCells.length;colIndex++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cell = arrCells[colIndex];\\r\\n\\t\\t\\t\\tvar dec = false;\\r\\n\\t\\t\\t\\tif (rowIndex - 1 >= 0 && arrFlatRows[rowIndex - 1][colIndex] == cell) \\r\\n\\t\\t\\t\\t{\\r\\n\\t                dec = true;\\r\\n\\t            }\\r\\n\\t\\t\\t\\telse if (arrFlatRows[rowIndex + 1] && arrFlatRows[rowIndex + 1][colIndex] === cell) \\r\\n\\t\\t\\t\\t{\\r\\n\\t                if (cell.parentNode == row && cell.parentNode.nextSibling) \\r\\n\\t                {\\r\\n\\t                    dec = true;\\r\\n\\t                    var nextCell = colIndex + 1;\\r\\n\\t                    while (arrFlatRows[rowIndex + 1][nextCell] == cell) \\r\\n\\t                    {\\r\\n\\t                        nextCell++;\\r\\n\\t                    }\\r\\n\\t                    var nextRow = util.findNextNode(cell.parentNode, function(element) \\r\\n\\t                    { \\r\\n\\t                    \\treturn util.isElementOfType(element,\\\"tr\\\"); \\r\\n\\t                    },table,true);\\r\\n\\t                    if (arrFlatRows[rowIndex + 1][nextCell]) \\r\\n\\t                    {\\r\\n\\t                        nextRow.insertBefore(cell,arrFlatRows[rowIndex + 1][nextCell]);\\r\\n\\t                    }\\r\\n\\t                    else \\r\\n\\t                    {\\r\\n\\t                        nextRow.appendChild(cell);\\r\\n\\t                    }\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t            else \\r\\n\\t            {\\r\\n\\t            \\tcallback && callback(cell,row,table,colIndex,rowIndex);\\r\\n\\t            \\tremoveNode(cell);\\r\\n\\t            \\tarrRet.push(cell);\\r\\n\\t            }\\r\\n\\t\\t\\t\\tif (dec && (cell.parentNode === row || cell !== arrFlatRows[rowIndex][colIndex - 1])) \\r\\n\\t\\t\\t\\t{\\r\\n\\t                var rowSpan = cell.rowSpan;\\r\\n\\t                if (rowSpan - 1 > 1) \\r\\n\\t                {\\r\\n\\t                    cell.setAttribute(\\\"rowspan\\\", (rowSpan - 1).toString());\\r\\n\\t                }\\r\\n\\t                else \\r\\n\\t                {\\r\\n\\t                    cell.removeAttribute(\\\"rowspan\\\");\\r\\n\\t                }\\r\\n\\t\\t        }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tremoveNode(row);\\r\\n\\t\\t\\treturn {row: row,cells: arrRet};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//appendColumn\\r\\n\\t\\tthis.insertColumn = function(table,refIndex,isInsertAfter,callback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrRet = [];\\r\\n\\t\\t\\tvar arrFlatRows = getFlattenRows(table);\\r\\n\\t        if (util.isUndefinedOrNull(refIndex) || refIndex < 0) \\r\\n\\t        {\\r\\n\\t            refIndex = getColumnsCount(table) - 1;\\r\\n\\t        }\\r\\n\\t        for (var rowCount = 0;rowCount < arrFlatRows.length;rowCount++) \\r\\n\\t        {\\r\\n\\t            var cell = this.doc.createElement(\\\"td\\\");\\r\\n\\t            var refCell = arrFlatRows[rowCount][refIndex];\\r\\n\\t            var isAdded = false;\\r\\n\\t            if (isInsertAfter) \\r\\n\\t            {\\r\\n\\t            \\tvar newRefIndex = refIndex + 1;\\r\\n\\t                if ((arrFlatRows[rowCount] && refCell && newRefIndex >= arrFlatRows[rowCount].length) || refCell !== arrFlatRows[rowCount][newRefIndex]) \\r\\n\\t                {\\r\\n\\t                \\tvar parent = refCell.parentNode;\\r\\n\\t                \\tif(parent)\\r\\n\\t                \\t{\\r\\n\\t                \\t\\tif (refCell.nextSibling) \\r\\n\\t\\t                    {\\r\\n\\t                \\t\\t\\tparent.insertBefore(cell,refCell.nextSibling);\\r\\n\\t\\t                    }\\r\\n\\t\\t                    else \\r\\n\\t\\t                    {\\r\\n\\t\\t                    \\tparent.appendChild(cell);\\r\\n\\t\\t                    }\\r\\n\\t                \\t\\tisAdded = true;\\r\\n\\t                \\t}\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t            else \\r\\n\\t            {\\r\\n\\t            \\tvar newRefIndex = refIndex - 1;\\r\\n\\t                if (newRefIndex < 0 || (arrFlatRows[rowCount][refIndex] !== arrFlatRows[rowCount][newRefIndex] && arrFlatRows[rowCount][refIndex].parentNode)) \\r\\n\\t                {\\r\\n\\t                \\tvar parent = refCell.parentNode;\\r\\n\\t                \\tif(parent)\\r\\n\\t                \\t{\\r\\n\\t                \\t\\tparent.insertBefore(cell,arrFlatRows[rowCount][refIndex]);\\r\\n\\t                \\t\\tisAdded = true;\\r\\n\\t                \\t}\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t            if(isAdded)\\r\\n\\t            {\\r\\n\\t            \\tcallback && callback(cell,table,refIndex,isInsertAfter);\\r\\n\\t            \\tarrRet.push(cell);\\r\\n\\t            }\\r\\n\\t            else \\r\\n\\t            {\\r\\n\\t            \\tvar refCell = arrFlatRows[rowCount][refIndex];\\r\\n\\t            \\tvar colspan = refCell.getAttribute(\\\"colspan\\\");\\r\\n\\t            \\tcolspan = colspan ? parseInt(colspan,10) : 1;\\r\\n\\t            \\tcolspan++;\\r\\n\\t            \\trefCell.setAttribute(\\\"colspan\\\",colspan);\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        return arrRet;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.removeColumn = function(table,colIndex,callback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrRet = [];\\r\\n\\t\\t\\tvar arrFlatRows = getFlattenRows(table);\\r\\n\\t\\t\\tfor(var rowIndex = 0;rowIndex < arrFlatRows.length;rowIndex++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrCells = arrFlatRows[rowIndex];\\r\\n\\t\\t\\t\\tvar cell = arrCells[colIndex];\\r\\n\\t\\t\\t\\tvar dec = false;\\r\\n\\t\\t\\t\\tif ((colIndex - 1) >= 0 && arrFlatRows[rowIndex][colIndex - 1] == cell) \\r\\n\\t\\t\\t\\t{\\r\\n\\t                dec = true;\\r\\n\\t            }\\r\\n\\t            else if ((colIndex + 1) < arrCells.length && arrFlatRows[rowIndex][colIndex + 1] == cell) \\r\\n\\t            {\\r\\n\\t                dec = true;\\r\\n\\t            }\\r\\n\\t            else \\r\\n\\t            {\\r\\n\\t            \\tcallback && callback(cell,table,colIndex);\\r\\n\\t            \\tremoveNode(cell);\\r\\n\\t            \\tarrRet.push(cell);\\r\\n\\t            }\\r\\n\\t\\t\\t\\tif (dec && (rowIndex - 1 < 0 || cell !== arrFlatRows[rowIndex - 1][colIndex])) \\r\\n\\t\\t\\t\\t{\\r\\n\\t                var colspan = cell.colSpan;\\r\\n\\t                colspan = (colspan - 1) > 1 ? (colspan - 1) : null;\\r\\n\\t                if(colspan)\\r\\n\\t                {\\r\\n\\t                \\tcell.setAttribute(\\\"colspan\\\",colspan);\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrRet;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//splitVertical\\r\\n\\t\\tthis.splitCellsVertical = function(arrCells,table)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrCells.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.splitCellVertical(arrCells[count],table);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//Table.normalizeTable(table);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.splitCellVertical = function(cell,table)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objCell = getCoordinates(table,cell);\\r\\n\\t\\t\\t var objProp = {};\\r\\n            if (cell.colSpan < 2) \\r\\n            {\\r\\n            \\tgetFlattenRows(table, function(paramCell,newRowIndex,newColIndex,colSpan,rowSpan) \\r\\n                {\\r\\n                    if (objCell.rowIndex != newRowIndex && objCell.colIndex == newColIndex && paramCell != cell) \\r\\n                    {\\r\\n                       storeProperties(paramCell,\\\"colspan\\\",paramCell.colSpan + 1, objProp);\\r\\n                    }\\r\\n                    return true;\\r\\n                });\\r\\n            }\\r\\n            else \\r\\n            {\\r\\n               storeProperties(cell,\\\"colspan\\\",cell.colSpan - 1,objProp);\\r\\n            }\\r\\n            var newCell = this.doc.createElement(\\\"td\\\");\\r\\n\\t\\t\\tvar br = this.doc.createElement(\\\"br\\\");\\r\\n            newCell.appendChild(br);\\r\\n            if (cell.rowSpan > 1) \\r\\n            {\\r\\n               storeProperties(newCell,\\\"rowspan\\\",cell.rowSpan,objProp);\\r\\n            }\\r\\n            var cellWidth = cell.offsetWidth;\\r\\n            util.insertAfterElement(cell,newCell);\\r\\n            var calcWidth = cellWidth / table.offsetWidth / 2;\\r\\n            storeProperties(cell,\\\"width\\\", (calcWidth * 100).toFixed(10) + '%', objProp);\\r\\n            storeProperties(newCell,\\\"width\\\", (calcWidth * 100).toFixed(10) + '%', objProp);\\r\\n            executeProperties(objProp);\\r\\n            //instance(jodit).removeSelection(cell);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//splitHorizontal\\r\\n\\t\\tthis.splitCellsHorizontal = function(arrCells,table)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrCells.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.splitCellHorizontal(arrCells[count],table);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//Table.normalizeTable(table);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.splitCellHorizontal = function(cell,table)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar newCell = this.doc.createElement(\\\"td\\\");\\r\\n\\t\\t\\tvar br = this.doc.createElement(\\\"br\\\");\\r\\n            newCell.appendChild(br);\\r\\n            var objCell = getCoordinates(table,cell);\\r\\n            var objProp = {};\\r\\n            if (cell.rowSpan < 2) \\r\\n            {\\r\\n            \\tvar row = util.findParent(cell,\\\"tr\\\");\\r\\n            \\tvar newRow = this.doc.createElement(\\\"tr\\\");\\r\\n                getFlattenRows(table, function(paramCell,newRowIndex,newColIndex,colSpan,rowSpan) \\r\\n                {\\r\\n                    if (objCell.rowIndex == newRowIndex && objCell.colIndex != newColIndex && paramCell !== cell) \\r\\n                    {\\r\\n                    \\tstoreProperties(paramCell,\\\"rowspan\\\",paramCell.rowSpan + 1,objProp);\\r\\n                    }\\r\\n                    return true;\\r\\n                });\\r\\n                util.insertAfterElement(row,newRow);\\r\\n                newRow.appendChild(newCell);\\r\\n            }\\r\\n            else \\r\\n            {\\r\\n            \\tvar parentRow = null;\\r\\n                var afterCell = null;\\r\\n            \\tstoreProperties(cell,\\\"rowspan\\\",cell.rowSpan - 1,objProp);\\r\\n                getFlattenRows(table, function(paramCell,newRowIndex,newColIndex,colSpan,rowSpan) \\r\\n                {\\r\\n                    if (newRowIndex > objCell.rowIndex && newRowIndex < objCell.rowIndex + cell.rowSpan \\r\\n                    \\t&& objCell.colIndex > newColIndex && cell.parentNode.rowIndex == newRowIndex) \\r\\n                    {\\r\\n                    \\tafterCell = paramCell;\\r\\n                    }\\r\\n                    if (objCell.rowIndex < newRowIndex && paramCell === cell) \\r\\n                    {\\r\\n                    \\tparentRow = table.rows[newRowIndex];\\r\\n                    }\\r\\n                    return true;\\r\\n                });\\r\\n                if (afterCell) \\r\\n                {\\r\\n                \\tutil.insertAfterElement(afterCell,newCell);\\r\\n                }\\r\\n                else \\r\\n                {\\r\\n                \\tparentRow.insertBefore(newCell,parentRow.firstChild);\\r\\n                }\\r\\n            }\\r\\n            if (cell.colSpan > 1) \\r\\n            {\\r\\n            \\tstoreProperties(newCell,\\\"colspan\\\",cell.colSpan,objProp);\\r\\n            }\\r\\n            executeProperties(objProp);\\r\\n            //instance(jodit).removeSelection(cell);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//__mark\\r\\n\\t\\tvar storeProperties = function(cell,prop,propValue,objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cellID = cell.getAttribute(\\\"data-cell-util-id\\\");\\r\\n\\t\\t\\tif(!cellID)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcellID = util.getUniqueId();\\r\\n\\t\\t\\t\\tcell.setAttribute(\\\"data-cell-util-id\\\",cellID);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (!objProp[cellID]) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjProp[cellID] = {cell: cell,objCellProps: {}};\\r\\n\\t        }\\r\\n\\t\\t\\tobjProp[cellID].objCellProps[prop] = propValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//__unmark\\r\\n\\t\\tvar executeProperties = function(objProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var cellID in objProp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cell = objProp[cellID].cell;\\r\\n\\t\\t\\t\\tvar objCellProps = objProp[cellID].objCellProps;\\r\\n\\t\\t\\t\\tfor(var prop in objCellProps)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar propValue =  objCellProps[prop];\\r\\n\\t\\t\\t\\t\\tswitch(prop) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t                    case \\\"remove\\\":\\r\\n\\t                    \\tremoveNode(cell);\\r\\n\\t                    break;\\r\\n\\t                    case \\\"rowspan\\\":\\r\\n\\t                        (propValue > 1) ? cell.setAttribute(\\\"rowspan\\\",propValue) : cell.removeAttribute(\\\"rowspan\\\");\\r\\n\\t                    break;\\r\\n\\t                    case \\\"colspan\\\":\\r\\n\\t                    \\t(propValue > 1) ? cell.setAttribute(\\\"colspan\\\",propValue) : cell.removeAttribute(\\\"colspan\\\");\\r\\n\\t                    break;\\r\\n\\t                    case \\\"width\\\":\\r\\n\\t                        cell.style.width = propValue;\\r\\n\\t                    break;\\r\\n\\t                }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tcell.removeAttribute(\\\"data-cell-util-id\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//formalCoordinate\\r\\n\\t\\tvar getCoordinates = function(table,cell,isMax)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisMax = Boolean.parse(isMax);\\r\\n\\t\\t\\tvar objRet = {rowIndex: 0,colIndex: 0,width: 1,height: 1};\\r\\n\\t\\t\\tvar callback = function(paramCell,newRowIndex,newColIndex,colSpan,rowSpan)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (cell === paramCell) \\r\\n\\t            {\\r\\n\\t\\t\\t\\t\\tobjRet.rowIndex = newRowIndex;\\r\\n\\t\\t\\t\\t\\tobjRet.colIndex = newColIndex;\\r\\n\\t\\t\\t\\t\\tobjRet.width = colSpan || 1;\\r\\n\\t\\t\\t\\t\\tobjRet.height = rowSpan || 1;\\r\\n\\t                if (isMax) \\r\\n\\t                {\\r\\n\\t                \\tobjRet.rowIndex += (rowSpan || 1) - 1;\\r\\n\\t                \\tobjRet.colIndex += (colSpan || 1) - 1;\\r\\n\\t                }\\r\\n\\t                return false;\\r\\n\\t            }\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t};\\r\\n\\t        getFlattenRows(table,callback);\\r\\n\\t        return objRet;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//formalMatrix\\r\\n\\t\\t//returns rows and cells flattening considering colspan's and rowspan's\\r\\n\\t\\t// we don't need to handle hidden rows or width = 0 rows as rowIndex will handle it\\r\\n\\t\\tvar getFlattenRows = function(table,callback) \\r\\n\\t\\t{\\r\\n\\t        var arrFlatRows = [[]];\\r\\n\\t        if(table && table.rows)\\r\\n\\t        {\\r\\n\\t        \\tvar arrRows = (table.rows.length) ? table.rows : Array.prototype.slice.call(table.rows);\\r\\n\\t        \\tfor(var rowCount = 0; rowCount < arrRows.length; rowCount++) \\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar arrCells = (arrRows[rowCount].cells.length) ? arrRows[rowCount].cells : Array.prototype.slice.call(arrRows[rowCount].cells);\\r\\n\\t                for(var colCount = 0; colCount < arrCells.length; colCount++) \\r\\n\\t                {\\r\\n\\t                \\tvar arrRowsTemp = getFlattenCells(arrFlatRows,table,arrCells[colCount],rowCount,callback);\\r\\n\\t                \\tif(!arrRowsTemp)\\r\\n\\t                \\t{\\r\\n\\t                \\t\\treturn arrFlatRows;\\r\\n\\t                \\t}\\r\\n\\t                \\tarrFlatRows = arrRowsTemp;\\r\\n\\t                \\t\\r\\n\\t                }\\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t        return arrFlatRows;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    var getFlattenCells = function(arrRows,table,cell,rowIndex,callback) \\r\\n\\t\\t{\\r\\n\\t    \\tif(!arrRows[rowIndex])\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tarrRows[rowIndex] = [];\\r\\n\\t    \\t}\\r\\n\\t    \\tvar colSpan = cell.colSpan;\\r\\n\\t    \\tvar rowSpan = cell.rowSpan;\\r\\n\\t    \\tvar colIndex = 0;\\r\\n\\t    \\twhile(arrRows[rowIndex][colIndex]) \\r\\n\\t    \\t{\\r\\n\\t    \\t\\tcolIndex++;\\r\\n\\t        }\\r\\n\\t    \\tfor(var rowCount = 0; rowCount < rowSpan; rowCount++) \\r\\n\\t    \\t{\\r\\n\\t            for(var colCount = 0; colCount < colSpan; colCount++) \\r\\n\\t            {\\r\\n\\t                if (!arrRows[rowIndex + rowCount]) \\r\\n\\t                {\\r\\n\\t                \\tarrRows[rowIndex + rowCount] = [];\\r\\n\\t                }\\r\\n\\t                var newRowIndex = rowIndex + rowCount;\\r\\n\\t                var newColIndex = colIndex + colCount;\\r\\n\\t                if (callback) \\r\\n\\t                {\\r\\n\\t                \\tvar value = callback(cell,newRowIndex,newColIndex,colSpan,rowSpan);\\r\\n\\t                \\tif(!value)\\r\\n\\t                \\t{\\r\\n\\t                \\t\\treturn null;\\r\\n\\t                \\t}\\r\\n\\t                }\\r\\n\\t                arrRows[newRowIndex][newColIndex] = cell;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t    \\treturn arrRows;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar removeNode = function(node)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (node && node.parentNode)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tnode.parentNode.removeChild(node);\\r\\n\\t    \\t}\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSTableUtil;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSTableUtil\\\",NSTableUtil); var NSEditorUtil = (function()\\r\\n{\\r\\n\\tvar NSEditorUtil = function(nsEditor)\\r\\n\\t{\\r\\n    \\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\tthis.selection = nsEditor.__selection;\\r\\n\\t\\t\\r\\n\\t\\tthis.REGEX_BLOCK = /^(PRE|DIV|P|LI|H[1-6]|BLOCKQUOTE|TD|TH|TABLE|BODY|HTML|FIGCAPTION|FIGURE|DT|DD)$/i;\\r\\n\\t\\tthis.REGEX_KEY_REMOVAL_TAGS = /^(IMG|BR|IFRAME|SCRIPT|INPUT|TEXTAREA|HR)$/i;\\r\\n\\t\\tthis.REGEX_EMPTY_TAGS = /^(IMG|BR|IFRAME|SCRIPT|INPUT|TEXTAREA|HR|TABLE)$/i;\\r\\n\\t\\tthis.SPACE_REG_EXP  = /[\\\\s\\\\n\\\\t\\\\r\\\\uFEFF\\\\u200b]+/g;\\r\\n\\t\\tthis.SPACE_REG_EXP_START = /^[\\\\s\\\\n\\\\t\\\\r\\\\uFEFF\\\\u200b]+/g;\\r\\n\\t\\tthis.SPACE_REG_EXP_END = /[\\\\s\\\\n\\\\t\\\\r\\\\uFEFF\\\\u200b]+$/g;\\r\\n\\t\\tthis.INVISIBLE_SPACE =  '\\\\uFEFF';\\r\\n\\t\\tthis.INVISIBLE_SPACE_REG_EXP =  /[\\\\uFEFF]/g;\\r\\n\\r\\n\\t\\t\\r\\n\\t\\tthis.ZERO_WIDTH_SPACE = String.fromCharCode(8203),\\r\\n\\t\\t\\r\\n\\t\\t//isOrContains\\r\\n\\t\\tthis.isExistsInsideEditor = function(node)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n    \\t\\tvar parent = this.util.findParentByCallback(node,function(paramElement){\\r\\n\\t\\t\\t\\treturn paramElement === textArea || (paramElement && paramElement.parentNode === textArea);\\r\\n\\t\\t\\t},textArea);\\r\\n    \\t\\treturn !this.util.isUndefinedOrNull(parent);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//closest\\r\\n\\t\\tthis.getClosestElement = function(element,tags,root)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar condition;\\r\\n\\t        if (typeof tags === 'function') \\r\\n\\t        {\\r\\n\\t            condition = tags;\\r\\n\\t        }\\r\\n\\t        else if (tags instanceof RegExp) \\r\\n\\t        {\\r\\n\\t            condition = function (tag) \\r\\n\\t            { \\r\\n\\t            \\treturn tag && tags.test(tag.nodeName); \\r\\n\\t            };\\r\\n\\t        }\\r\\n\\t        else \\r\\n\\t        {\\r\\n\\t            condition = function (tag) \\r\\n\\t            {\\r\\n\\t                return tag && new RegExp('^(' + tags + ')$', 'i').test(tag.nodeName);\\r\\n\\t            };\\r\\n\\t        }\\r\\n\\t        return this.util.findParentByCallback(element, condition, root);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isNode = function(element, win) \\r\\n\\t\\t{\\r\\n\\t        if (!element) \\r\\n\\t        {\\r\\n\\t            return false;\\r\\n\\t        }\\r\\n\\t        if(!win)\\r\\n\\t        {\\r\\n\\t        \\twin = this.__nsEditor.__getWindow();\\r\\n\\t        }\\r\\n\\t        if (typeof win === 'object' && win && (typeof win.Node === 'function' || typeof win.Node === 'object')) \\r\\n\\t        {\\r\\n\\t            return element instanceof win.Node;\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    };\\r\\n\\t\\t\\r\\n\\t\\tthis.isBlock = function(element, win) \\r\\n\\t\\t{\\r\\n\\t        if(element && typeof element === \\\"object\\\")\\r\\n\\t        {\\r\\n\\t        \\tvar isNode = this.isNode(element, win);\\r\\n\\t        \\tvar isBlock = this.REGEX_BLOCK.test(element.nodeName);\\r\\n\\t        \\tif(isNode && !isBlock)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar display = this.util.getStyleValue(element,\\\"display\\\");\\r\\n\\t        \\t\\tif(display && display == \\\"block\\\")\\r\\n\\t        \\t\\t{\\r\\n\\t        \\t\\t\\tisBlock = true;\\r\\n\\t        \\t\\t}\\r\\n\\t        \\t}\\r\\n\\t        \\tif(isNode && isBlock)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\treturn true;\\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t        return false; \\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    //elementIsBlock\\r\\n\\t    this.isTagBlock = function(tag) \\r\\n\\t\\t{\\r\\n\\t    \\t(tag && this.REGEX_BLOCK.test(tag));\\r\\n\\t\\t};\\r\\n\\t    \\r\\n\\t    this.isTable = function(element, win) \\r\\n\\t    {\\r\\n\\t        return this.isNode(element, win) && /^(TABLE|THEAD|TBODY|TR|TH|TD)$/i.test(typeof element === 'string' ? element : element.nodeName);\\r\\n\\t    }\\r\\n\\t\\t\\r\\n\\t    this.isCell = function(element, win) \\r\\n\\t    {\\r\\n\\t    \\treturn this.isNode(element, win) && /^(td|th)$/i.test(typeof element === 'string' ? element : element.nodeName);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isImage = function(element, win) \\r\\n\\t\\t{\\r\\n\\t\\t    return this.isNode(element, win) && /^(img|svg|picture|canvas)$/i.test(typeof element === 'string' ? element : element.nodeName);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//isMediaComponent\\r\\n\\t    this.isCustomMedia = function(element)\\r\\n\\t    {\\r\\n\\t    \\treturn element && (/nsEditorMediaContainerContainer/.test(element.className));\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    //isComponent\\r\\n\\t    this.isCustomMediaOrTable = function(element) \\r\\n\\t    {\\r\\n\\t        return element && (this.isCustomMedia(element) || /^(TABLE|HR)$/.test(element.nodeName));\\r\\n\\t    };\\r\\n\\r\\n\\t    this.isFormatElement = function(element) \\r\\n\\t    {\\r\\n\\t    \\treturn element && element.nodeType == 1 && /^(P|DIV|H[1-6]|PRE|LI|TH|TD)$/i.test(element.nodeName) && !this.isCustomMediaOrTable(element) && !this.containsNode(element,\\\"div\\\");\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.isRangeFormatElement = function(element) \\r\\n\\t    {\\r\\n\\t        return element && element.nodeType === 1 && (/^(BLOCKQUOTE|OL|UL|FIGCAPTION|TABLE|THEAD|TBODY|TR|TH|TD)$/i.test(element.nodeName));\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.isMedia = function(node) \\r\\n\\t    {\\r\\n\\t        return node && /^(IMG|IFRAME|AUDIO|VIDEO|CANVAS)$/i.test(typeof node === 'string' ? node : node.nodeName);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.isBreak = function (node) \\r\\n\\t    {\\r\\n\\t        return node && /^BR$/i.test(typeof node === 'string' ? node : node.nodeName);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.isList = function (node) \\r\\n\\t    {\\r\\n\\t    \\t return node && /^(OL|UL)$/i.test(typeof node === 'string' ? node : node.nodeName);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.isListCell = function (node) \\r\\n\\t    {\\r\\n\\t    \\treturn node && /^LI$/i.test(typeof node === 'string' ? node : node.nodeName);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.isAnchor = function(node) \\r\\n\\t    {\\r\\n\\t    \\treturn node && /^A$/i.test(typeof node === 'string' ? node : node.nodeName);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.trim = function(value) \\r\\n\\t    {\\r\\n\\t    \\treturn value.replace(this.SPACE_REG_EXP_END, \\\"\\\").replace(this.SPACE_REG_EXP_START, \\\"\\\");\\r\\n\\t    };\\r\\n\\t\\t\\r\\n\\t\\tthis.getOffset = function(element,recursive,doc) \\r\\n\\t\\t{\\r\\n\\t\\t\\trecursive = Boolean.parse(recursive);\\r\\n\\t\\t\\tdoc = doc ? doc : this.__nsEditor.__getDocument();\\r\\n\\t\\t\\tvar body = doc.body;\\r\\n\\t\\t\\tvar win = doc.defaultView || doc.parentWindow;\\r\\n\\t\\t\\tvar docElem = doc.documentElement || {clientTop: 0,clientLeft: 0,scrollTop: 0,scrollLeft: 0};\\r\\n\\t\\t    var scrollTop = win.pageYOffset || docElem.scrollTop || body.scrollTop;\\r\\n\\t\\t    var scrollLeft = win.pageXOffset || docElem.scrollLeft || body.scrollLeft;\\r\\n\\t\\t    var clientTop = docElem.clientTop || body.clientTop || 0;\\r\\n\\t\\t    var clientLeft = docElem.clientLeft || body.clientLeft || 0;\\r\\n\\t\\t    var topValue = null;\\r\\n\\t\\t    var leftValue = null;\\r\\n\\t\\t    var rect = element.getBoundingClientRect();\\r\\n\\t\\t    if(!recursive && !this.__nsEditor.__isModeTextArea())\\r\\n\\t\\t    {\\r\\n\\t\\t    \\t var offset = this.getOffset(this.__nsEditor.__compTextArea,true);\\r\\n\\t\\t         topValue = rect.top + offset.top;\\r\\n\\t\\t         leftValue = rect.left + offset.left;\\r\\n\\t\\t    }\\r\\n\\t\\t    else\\r\\n\\t\\t    {\\r\\n\\t\\t    \\ttopValue = rect.top + scrollTop - clientTop;\\r\\n\\t\\t        leftValue = rect.left + scrollLeft - clientLeft;\\r\\n\\t\\t    }\\r\\n\\t\\t    return {\\r\\n\\t\\t        top: Math.round(topValue),\\r\\n\\t\\t        left: Math.round(leftValue),\\r\\n\\t\\t        width: rect.width,\\r\\n\\t\\t        height: rect.height\\r\\n\\t\\t    };\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getOffsetFromEditor = function(element,textArea,doc) \\r\\n\\t\\t{\\r\\n\\t\\t\\ttextArea = textArea ? textArea : this.__nsEditor.__getTextArea();\\r\\n\\t\\t\\tvar offsetLeft = 0;\\r\\n\\t        var offsetTop = 0;\\r\\n\\t        var offsetElement = element.nodeType === 3 ? element.parentElement : element;\\r\\n\\r\\n\\t        while (offsetElement && !this.util.hasStyleClass(offsetElement,\\\"nsEditor\\\") && offsetElement !== textArea) \\r\\n\\t        {\\r\\n\\t            offsetLeft += offsetElement.offsetLeft;\\r\\n\\t            offsetTop += offsetElement.offsetTop;\\r\\n\\t            offsetElement = offsetElement.offsetParent;\\r\\n\\t        }\\r\\n\\t        var iframe = !this.__nsEditor.__isModeTextArea();\\r\\n\\t        return {\\r\\n\\t            left: offsetLeft + (iframe ? textArea.offsetLeft : 0),\\r\\n\\t            top: (offsetTop - textArea.scrollTop) + (iframe ? textArea.parentElement.offsetTop : 0)\\r\\n\\t        };\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getContentWidth = function(element,win) \\r\\n\\t\\t{\\r\\n\\t\\t    var getValue = function (value) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tif(value)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\treturn parseInt(value, 10);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\treturn 0;\\r\\n\\t\\t    };\\r\\n\\t\\t    var style = win.getComputedStyle(element);\\r\\n\\t\\t    var width = element.offsetWidth;\\r\\n\\t\\t    var paddingLeft = getValue(style.getPropertyValue(\\\"padding-left\\\"));\\r\\n\\t\\t    var paddingRight = getValue(style.getPropertyValue(\\\"padding-right\\\"));\\r\\n\\t\\t    return (width - paddingLeft - paddingRight);\\r\\n\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isEditable = function(element) \\r\\n\\t\\t{\\r\\n\\t\\t\\telement = element ? element : this.__nsEditor.__getTextArea();\\r\\n\\t        if(element && element.nodeType === 1 && Boolean.parse(element.getAttribute(\\\"contenteditable\\\")))\\r\\n\\t        {\\r\\n\\t        \\treturn true;\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.isNonEditable = function (element) \\r\\n\\t    {\\r\\n\\t        return element && element.nodeType === 1 && !Boolean.parse(element.getAttribute(\\\"contenteditable\\\"));\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.isEmptyTextNode = function(node) \\r\\n\\t    {\\r\\n\\t        if((this.util.isTextNode(node) && (!node.nodeValue || node.nodeValue.replace(this.INVISIBLE_SPACE_REG_EXP, \\\"\\\") .length === 0)))\\r\\n\\t        {\\r\\n\\t        \\treturn true;\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.isEmptyNode = function(node,regexNonEmptyTags) \\r\\n\\t    {\\r\\n\\t    \\tif(!node) \\r\\n\\t\\t\\t{\\r\\n\\t            return true;\\r\\n\\t        }\\r\\n\\t\\t\\tif(this.util.isTextNode(node))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn node.nodeValue === null || node.nodeValue.trim().length === 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tregexNonEmptyTags = regexNonEmptyTags || /^(img|svg|canvas|input|textarea|form)$/;\\r\\n\\t\\t\\tif(regexNonEmptyTags.test(node.nodeName.toLowerCase()))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar value = this.util.loopAllChildren(node,function(paramNode) \\r\\n\\t\\t\\t{\\r\\n                if ((self.util.isTextNode(paramNode) && paramNode.nodeValue !== null &&\\r\\n                    paramNode.nodeValue.trim().length !== 0) ||\\r\\n                    (self.util.isElement(paramNode) && regexNonEmptyTags.test(paramNode.nodeName.toLowerCase()))) \\r\\n                {\\r\\n                    return false;\\r\\n                }\\r\\n            });\\r\\n\\t\\t\\treturn value;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    //to find whether element is a node related to the text style\\r\\n\\t    this.isTextStyleElement = function (element) \\r\\n\\t    {\\r\\n\\t        return element && element.nodeType !== 3 && /^(strong|span|font|b|var|i|em|u|ins|s|strike|del|sub|sup|mark|a|label|code)$/i.test(element.nodeName);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.getCharLength = function(content,charCounterType) \\r\\n\\t    {\\r\\n            return /byte/.test(charCounterType) ? this.getByteLength(content) : content.length;\\r\\n        }\\r\\n\\t    \\r\\n\\t    this.getByteLength = function(strExp) \\r\\n\\t    {\\r\\n\\t    \\tvar win = this.__nsEditor.__getWindow();\\r\\n\\t    \\tvar browserDetail = this.__nsEditor.__browserDetail;\\r\\n\\t        var encoder = win.encodeURIComponent;\\r\\n\\t        var cr = 0;\\r\\n\\t        var cl;\\r\\n\\t        //edge\\r\\n\\t        if (browserDetail.isIE && !browserDetail.isMSIE) \\r\\n\\t        {\\r\\n\\t            cl = win.unescape(encoder(strExp.toString())).length;\\r\\n\\t            if (encoder(strExp.toString()).match(/(%0A|%0D)/gi) !== null) \\r\\n\\t            {\\r\\n\\t                cr = encoder(strExp.toString()).match(/(%0A|%0D)/gi).length;\\r\\n\\t            }\\r\\n\\t        } \\r\\n\\t        else \\r\\n\\t        {\\r\\n\\t            cl = (new win.TextEncoder('utf-8').encode(strExp.toString())).length;\\r\\n\\t        }\\r\\n\\t        if (encoder(strExp.toString()).match(/(%0A|%0D)/gi) !== null) \\r\\n            {\\r\\n                cr = encoder(strExp.toString()).match(/(%0A|%0D)/gi).length;\\r\\n            }\\r\\n            return cl + cr;\\r\\n\\t    }\\r\\n\\t    \\r\\n\\t    this.compareElements = function(element1, element2) \\r\\n\\t    {\\r\\n\\t    \\tvar objRet = {};\\r\\n\\t        var ele1 = element1;\\r\\n\\t        var bNode = element2;\\r\\n\\t        while (ele1 && ele2 && ele1.parentNode !== ele2.parentNode) \\r\\n\\t        {\\r\\n\\t            ele1 = ele1.parentNode;\\r\\n\\t            ele2 = ele2.parentNode;\\r\\n\\t        }\\r\\n\\t        if (!ele1 || !ele2) \\r\\n\\t        {\\r\\n\\t        \\tobjRet = {ancestor: null,element1: element1,element2: element2, result: 0};\\r\\n\\t        }\\r\\n\\t        else \\r\\n\\t        {\\r\\n\\t        \\tvar children = ele1.parentNode.childNodes;\\r\\n\\t\\t        var aIndex = this.getIndexFromArray(children, ele1);\\r\\n\\t\\t        var bIndex = this.getIndexFromArray(children, ele2);\\r\\n\\t\\t        var result = aIndex > bIndex ? 1 : aIndex < bIndex ? -1 : 0;\\r\\n\\t\\t        objRet = {ancestor: ele1.parentNode,element1: element1,element2: element2,result: result};\\r\\n\\t        }\\r\\n\\t        return objRet;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.getIndexFromArray = function(arrData,value) \\r\\n\\t    {\\r\\n\\t    \\tvar index = arrData.findIndex(function(paramValue,index,arr){\\r\\n\\t    \\t\\tif(paramValue == value)\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\treturn true;\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t});\\r\\n\\t    \\treturn index;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.setElementPosition = function(controller, referEl, position, offset)\\r\\n\\t    {\\r\\n\\t    \\tvar rtl = false;\\r\\n\\t    \\toffset = offset ? offset :  {left: 0, top: 0};\\r\\n\\t    \\tvar body = this.__nsEditor.__getTextArea();\\r\\n\\t    \\tif (rtl)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\toffset.left *= -1;\\r\\n\\t    \\t}\\r\\n            var offset = this.getOffsetFromEditor(referEl,body);\\r\\n            controller.style.visibility = 'hidden';\\r\\n            controller.style.display = 'block';\\r\\n\\r\\n            // Height value of the arrow element is 11px\\r\\n            var topMargin = position === 'top' ? -(controller.offsetHeight + 2) : (referEl.offsetHeight + 12);\\r\\n            controller.style.top = (offset.top + topMargin + offset.top) + 'px';\\r\\n\\r\\n            var l = offset.left - body.scrollLeft + offset.left;\\r\\n            var controllerW = controller.offsetWidth;\\r\\n            var referElW = referEl.offsetWidth;\\r\\n\\r\\n            // rtl (Width value of the arrow element is 22px)\\r\\n            if (rtl) \\r\\n            {\\r\\n                var rtlW = (controllerW > referElW) ? controllerW - referElW : 0;\\r\\n                var rtlL = rtlW > 0 ? 0 : referElW - controllerW;\\r\\n                controller.style.left = (l - rtlW + rtlL) + 'px';\\r\\n                \\r\\n                if (rtlW > 0) \\r\\n                {\\r\\n                    controller.firstElementChild.style.left = ((controllerW - 14 < 10 + rtlW) ? (controllerW - 14) : (10 + rtlW)) + 'px';\\r\\n                }\\r\\n                \\r\\n                var overSize = body.offsetLeft - controller.offsetLeft;\\r\\n                if (overSize > 0) \\r\\n                {\\r\\n                    controller.style.left = '0px';\\r\\n                    controller.firstElementChild.style.left = overSize + 'px';\\r\\n                }\\r\\n            } \\r\\n            else \\r\\n            {\\r\\n                controller.style.left = l + 'px';\\r\\n\\r\\n                var overSize = body.offsetWidth - (controller.offsetLeft + controllerW);\\r\\n                if (overSize < 0) \\r\\n                {\\r\\n                    controller.style.left = (controller.offsetLeft + overSize) + 'px';\\r\\n                    //controller.firstElementChild.style.left = (20 - overSize) + 'px';\\r\\n                } \\r\\n                else \\r\\n                {\\r\\n                    //controller.firstElementChild.style.left = '20px';\\r\\n                }\\r\\n            }\\r\\n\\r\\n            controller.style.visibility = '';\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.stopEvent = function(event)\\r\\n\\t    {\\r\\n\\t    \\tevent = this.util.getEvent(event);\\r\\n\\t    \\tevent.preventDefault();\\r\\n\\t    \\tevent.stopPropagation();\\r\\n\\t    \\tevent.stopImmediatePropagation();\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    //isWysiwygDiv\\r\\n\\t    this.containsNode = function (node,type) \\r\\n\\t    {\\r\\n\\t    \\tif(node)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t    \\t\\tif(textArea.contains(node))\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tif(type)\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\treturn this.util.isElementOfType(node,type);\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t\\telse\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\treturn true;\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t}\\r\\n\\t        return false;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.onlyZeroWidthSpace = function(text) \\r\\n\\t    {\\r\\n\\t    \\tvar onlyZeroWidthRegExp = new RegExp('^' + String.fromCharCode(8203) + '+$');\\r\\n\\t        if (typeof text !== 'string')\\r\\n\\t        {\\r\\n\\t        \\ttext = text.textContent;\\r\\n\\t        }\\r\\n\\t        return text === '' || onlyZeroWidthRegExp.test(text);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.getFormatElement = function(element,callback) \\r\\n\\t    {\\r\\n\\t        if (element)\\r\\n\\t        {\\r\\n\\t\\t        while (element) \\r\\n\\t\\t        {\\r\\n\\t\\t            if (this.containsNode(element,\\\"div\\\"))\\r\\n\\t\\t            {\\r\\n\\t\\t            \\treturn null;\\r\\n\\t\\t            }\\r\\n\\t\\t            if (this.isRangeFormatElement(element))\\r\\n\\t\\t            {\\r\\n\\t\\t            \\telement.firstElementChild;\\r\\n\\t\\t            }\\r\\n\\t\\t            if (this.isFormatElement(element))\\r\\n\\t\\t            {\\r\\n\\t\\t            \\tif(!callback || callback(element))\\r\\n\\t\\t            \\t{\\r\\n\\t\\t            \\t\\treturn element;\\r\\n\\t\\t            \\t}\\r\\n\\t\\t            }\\r\\n\\t\\t            element = element.parentNode;\\r\\n\\t\\t        }\\r\\n\\t        }\\r\\n\\t        return null;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    //safeRemove\\r\\n\\t    this.removeNode = function(node) \\r\\n\\t    {\\r\\n\\t    \\tif (node && node.parentNode)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tnode.parentNode.removeChild(node);\\r\\n\\t    \\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.isIgnoreNodeChange = function (element) \\r\\n\\t    {\\r\\n\\t        return element && element.nodeType !== 3 && (this.isNonEditable(element) || !this.isTextStyleElement(element));\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    //wrap\\r\\n\\t    this.wrapNode = function(currentNode,newParent)\\r\\n\\t    {\\r\\n\\t\\t\\tif(currentNode.parentNode) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t\\t\\t\\tvar wrapper = this.util.isString(newParent) ? this.util.createElement(tag,null,null,doc) : newParent;\\r\\n\\t\\t\\t\\tthis.selection.saveSelection();\\r\\n\\t\\t\\t\\tcurrentNode.parentNode.insertBefore(wrapper,currentNode);\\r\\n\\t\\t\\t\\twrapper.appendChild(currentNode);\\r\\n\\t\\t\\t\\tthis.selection.restoreSelection();\\r\\n\\t\\t\\t\\treturn wrapper;\\r\\n\\t\\t\\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    //wrapInline\\r\\n\\t    this.wrapAllInlineSiblings = function (node,tag) \\r\\n\\t    {\\r\\n\\t    \\tthis.selection.saveSelection();\\r\\n\\t    \\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t    \\tvar win = this.__nsEditor.__getWindow();\\r\\n\\t    \\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t        var startNode = node;\\r\\n\\t        var endNode = node;\\r\\n\\t        var findNext = false;\\r\\n\\t        do \\r\\n\\t        {\\r\\n\\t            findNext = false;\\r\\n\\t            var tmpNode = startNode.previousSibling;\\r\\n\\t            if (tmp && !this.isBlock(tmp,win)) \\r\\n\\t            {\\r\\n\\t                findNext = true;\\r\\n\\t                startNode = tmpNode;\\r\\n\\t            }\\r\\n\\t        } \\r\\n\\t        while(findNext);\\r\\n\\t        do \\r\\n\\t        {\\r\\n\\t            findNext = false;\\r\\n\\t            var tmpNode = endNode.nextSibling;\\r\\n\\t            if (tmpNode && !this.isBlock(tmp,win)) \\r\\n\\t            {\\r\\n\\t                findNext = true;\\r\\n\\t                endNode = tmpNode;\\r\\n\\t            }\\r\\n\\t        } \\r\\n\\t        while(findNext);\\r\\n\\t        var parent = this.util.isString(tag) ? doc.createElement(tag) : tag;\\r\\n\\t        if (startNode.parentNode) \\r\\n\\t        {\\r\\n\\t            startNode.parentNode.insertBefore(parent,startNode);\\r\\n\\t        }\\r\\n\\t        var nextNode = startNode;\\r\\n\\t        while(nextNode) \\r\\n\\t        {\\r\\n\\t        \\tnextNode = startNode.nextSibling;\\r\\n\\t            parent.appendChild(startNode);\\r\\n\\t            if (startNode === endNode || !nextNode) \\r\\n\\t            {\\r\\n\\t                break;\\r\\n\\t            }\\r\\n\\t            startNode = nextNode;\\r\\n\\t        }\\r\\n\\t        this.selection.restoreSelection();\\r\\n\\t        return parent;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    //normalizeNode\\r\\n\\t    this.mergeTextNodes = function(node)\\r\\n\\t    {\\r\\n\\t    \\tif(node)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tif (this.util.isTextNode(node) && node.nodeValue != null && node.parentNode) \\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\twhile (this.util.isTextNode(node.nextSibling)) \\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tif (node.nextSibling.nodeValue != null) \\r\\n\\t    \\t\\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\t\\tnode.nodeValue += node.nextSibling.nodeValue;\\r\\n\\t    \\t\\t\\t\\t}\\r\\n\\t    \\t\\t\\t\\tnode.nodeValue = node.nodeValue.replace(this.INVISIBLE_SPACE_REG_EXP,\\\"\\\");\\r\\n\\t    \\t\\t\\t\\tthis.removeNode(node.nextSibling);\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t} else \\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tthis.mergeTextNodes(node.firstChild);\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t\\tthis.mergeTextNodes(node.nextSibling);\\r\\n\\t    \\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.insertNodeWrappingRange = function(node)\\r\\n\\t    {\\r\\n\\t    \\tif(node)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tif(!this.selection)\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tthis.selection = this.__nsEditor.__selection;\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t\\tif(this.selection.isCollapsed())\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.selection.insertNode(node,false,false);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar range = this.selection.getRange();\\r\\n\\t\\t\\t\\t\\tvar fragment = range.extractContents();\\r\\n\\t\\t\\t\\t\\tnode.appendChild(fragment);\\r\\n\\t\\t\\t\\t\\trange.insertNode(node);\\r\\n\\t\\t\\t\\t}\\r\\n\\t    \\t}\\r\\n\\t    }\\r\\n\\t    \\r\\n    };\\r\\n\\t\\r\\n\\treturn NSEditorUtil;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSEditorUtil\\\",NSEditorUtil); var NSToolBar = (function()\\r\\n{\\r\\n\\tvar NSToolBar = function(nsEditor)\\r\\n\\t{\\r\\n\\t\\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\tthis.editorUtil = nsEditor.editorUtil;\\r\\n\\t\\tthis.selection = nsEditor.__selection;\\r\\n\\t\\t\\r\\n\\t\\tthis.__parentContainer = null;\\r\\n\\t\\tthis.__divToolBarContainer = null;\\r\\n\\t\\tthis.__divToolBarContent = null;\\r\\n\\t\\tthis.__editorDropDown = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__groupedContainer = null;\\r\\n\\t\\tthis.__btnGrouped = null;\\r\\n\\t\\tthis.__groupedContainerDropdown = null;\\r\\n\\t\\tthis.__groupedContainerDropdownContent = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__nsToolTipInElement = null;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\tthis.__toolBarPadding = null;\\r\\n\\t\\tthis.__groupedTools = [];\\r\\n\\t\\t\\r\\n\\t\\tthis.__windowClickRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__arrowSVG = \\\"<svg class=\\\\\\\"nsEditorIcon nsEditorIconArrow\\\\\\\" viewBox=\\\\\\\"0 0 10 10\\\\\\\"><path d=\\\\\\\"M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z\\\\\\\"></path></svg>\\\"\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"resize\\\",this.__resizeHandler.bind(this));\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"lineNumberVisibilityChanged\\\",function(event){\\r\\n\\t\\t\\t\\tself.__divToolBarContainer.style.paddingLeft = (self.__nsEditor.__divLineNumberContainer.offsetWidth + 10) + \\\"px\\\";\\r\\n\\t\\t\\t});\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"iframeInitialized\\\",function(event){\\r\\n\\t\\t\\t\\tif(self.__nsEditor.__frameContentWindow)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.util.addEvent(self.__nsEditor.__frameContentWindow,\\\"click\\\",self.__windowClickRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t});\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"viewSourceChanged\\\",function(event){\\r\\n\\t\\t\\t\\tvar isDefaultDisabled = event.detail.isSourceMode;\\r\\n\\t\\t\\t\\tvar item = event.detail.item;\\r\\n\\t\\t\\t\\tvar key = event.detail.key;\\r\\n\\t\\t\\t\\tvar arrKeys = Object.keys(self.__nsEditor.__toolBarButton);\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrKeys.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar itemKey = arrKeys[count];\\r\\n\\t\\t\\t\\t\\tvar toolBarItem = self.__nsEditor.__toolBarButton[itemKey];\\r\\n\\t\\t\\t\\t\\tif(item != toolBarItem)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar disabled = toolBarItem.checkDisability ? toolBarItem.checkDisability(itemKey,toolBarItem,item,key,isDefaultDisabled) : true;\\r\\n\\t\\t\\t\\t\\t\\tself.__makeToolBarItemDisabled(toolBarItem,(isDefaultDisabled ? disabled : !disabled));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t});\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"textAreaInitialized\\\",function(event){\\r\\n\\t\\t\\t\\tsetTimeout(function()\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.__updateToolBarGrouping.call(self)\\r\\n\\t\\t\\t\\t}, 500)\\r\\n\\t\\t\\t});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getToolBarContainer = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__divToolBarContainer;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.createToolBar = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__parentContainer = this.__nsEditor.__divOuterContainer;\\r\\n\\t\\t\\tthis.__config = this.__nsEditor.__config;\\r\\n\\t\\t\\tthis.__nsToolTipInElement = new this.util.nsToolTipInElement();\\r\\n\\t\\t\\tthis.__divToolBarContainer = this.util.createDiv(this.__nsEditor.getID() + \\\"toolbarcontainer\\\",\\\"nsEditorToolBarContainer\\\");\\r\\n\\t\\t\\tthis.__parentContainer.appendChild(this.__divToolBarContainer);\\r\\n\\t\\t\\tthis.__divToolBarContent = this.util.createDiv(this.__nsEditor.getID() + \\\"toolbarcontent\\\",\\\"nsEditorToolBarContent\\\");\\r\\n\\t\\t\\tthis.__divToolBarContainer.appendChild(this.__divToolBarContent);\\r\\n\\t\\t\\tif(this.__config[\\\"enableToolBar\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__createToolBarComponents();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsEditor.__handleVisibilityOfComponent(this.__divToolBarContainer,\\\"enableToolBar\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__initSticy();\\r\\n\\t\\t\\tif(!this.__windowClickRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__windowClickRef = this.__windowClickHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__nsEditor.__context,\\\"click\\\",this.__windowClickRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__editorDropDown =  this.util.createElement(\\\"ul\\\",this.__nsEditor.getID() + \\\"dropDown\\\",\\\"nsEditorToolBarDropdown\\\");\\r\\n\\t\\t\\tthis.__nsEditor.__compFixed.appendChild(this.__editorDropDown);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.updateToolbar = function(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar checkForTags = function(arrTags,item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(arrTags && arrTags.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar tempElement = element;\\r\\n\\t\\t\\t\\t\\twhile (tempElement && tempElement.nodeType == 1) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif (arrTags.indexOf(tempElement.tagName.toLowerCase()) > -1) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tself.__makeToolBarItemActive(item,true);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\ttempElement = tempElement.parentNode;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar checkForCSS = function(objCSS,item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(objCSS)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar tempElement = element;\\r\\n\\t\\t\\t\\t\\twhile (tempElement && tempElement.nodeType == 1) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrCSS = Object.keys(objCSS);\\r\\n\\t\\t\\t\\t\\t\\tfor(var cssCount = 0;cssCount < arrCSS.length;cssCount++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(isCSSValuePresentInElement(arrCSS[cssCount],objCSS[arrCSS[cssCount]]))\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tself.__makeToolBarItemActive(item,true);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\ttempElement = tempElement.parentNode;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tself.__nsEditor.__selection.setFocus();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar isCSSValuePresentInElement = function(property,value)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cssValue = self.util.getStyleValue(element,property);\\r\\n\\t\\t\\t\\tif(cssValue)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(typeof (value) === \\\"function\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar callback = value;\\r\\n\\t\\t\\t\\t\\t\\tif(callback && callback(cssValue.toString().toLowerCase()))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if(cssValue.toString().toLowerCase() === value)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar arrKeys = Object.keys(this.__nsEditor.__toolBarButton);\\r\\n\\t\\t\\tfor(var count = 0;count < arrKeys.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar key = arrKeys[count];\\r\\n\\t\\t\\t\\tvar item = this.__nsEditor.__toolBarButton[key];\\r\\n\\t\\t\\t\\tthis.__makeToolBarItemActive(item,false);\\r\\n\\t\\t\\t\\tvar arrTags = item.tags;\\r\\n\\t\\t\\t\\tcheckForTags(arrTags,item);\\r\\n\\t\\t\\t\\tvar css = item.css;\\r\\n\\t\\t\\t\\tcheckForCSS(css,item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.destroy = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__stickyScrollRef)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tthis.util.removeEvent(this.__nsEditor.__context,\\\"scroll wheel mousewheel\\\",this.__stickyScrollRef);\\r\\n\\t    \\t\\tthis.__stickyScrollRef = null;\\r\\n\\t    \\t}\\r\\n\\t\\t\\tif(this.__windowClickRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__nsEditor.__context,\\\"click\\\",this.__windowClickRef);\\r\\n\\t\\t\\t\\tif(this.__nsEditor.__frameContentWindow)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(this.__nsEditor.__frameContentWindow,\\\"click\\\",this.__windowClickRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__windowClickRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createToolBarComponents = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeAllChildren(this.__divToolBarContent);\\r\\n\\t\\t\\tif(this.__config[\\\"toolBarButton\\\"] && this.__config[\\\"toolBarButton\\\"].length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < this.__config[\\\"toolBarButton\\\"].length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar key = this.__config[\\\"toolBarButton\\\"][count];\\r\\n\\t\\t\\t\\t\\tif(this.__nsEditor.__toolBarButton[key])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__createToolBarButton(this.__nsEditor.__toolBarButton[key],this.__divToolBarContent,key);\\r\\n\\t\\t\\t\\t\\t\\tthis.__updateShortKeyDictionary(this.__nsEditor.__toolBarButton[key],this.__divToolBarContent,key);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createToolBarButton = function(item,parent,key)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tvar btnItem =  this.util.createElement(\\\"button\\\",null,\\\"nsEditorToolBarButton\\\");\\r\\n\\t\\t\\t\\tbtnItem.innerHTML = item.html;\\r\\n\\t\\t\\t\\tif(item.tooltip && item.tooltip.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsToolTipInElement.addToolTip(btnItem,item.tooltip);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(item.isDropdown)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(btnItem,\\\"nsEditorToolBarButtonDropdown\\\");\\r\\n\\t\\t\\t\\t\\tbtnItem.appendChild(this.util.getElementFromHtml(this.__arrowSVG));\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(btnItem,\\\"click\\\",(function(item){\\r\\n\\t\\t\\t\\t\\t\\treturn function(event){\\r\\n\\t\\t\\t\\t\\t\\t\\tself.__toolBarDropdownClickHandler.call(self,item,key,event);\\r\\n\\t\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\t})(item));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(btnItem,\\\"click\\\",(function(item){\\r\\n\\t\\t\\t\\t\\t\\treturn function(event){\\r\\n\\t\\t\\t\\t\\t\\t\\tself.__toolBarButtonClickHandler.call(self,item,key,event);\\r\\n\\t\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\t})(item));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(parent)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tparent.appendChild(btnItem);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem.control = btnItem;\\r\\n\\t\\t\\t\\titem.selected = false;\\r\\n\\t\\t\\t\\treturn btnItem;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__updateShortKeyDictionary = function(item,parent,key)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(item.shortKey)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar shortKey = item.shortKey;\\r\\n\\t\\t\\t\\t\\tif(!this.util.isArray(shortKey))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tshortKey = [shortKey];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < shortKey.length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar tempKey = shortKey[count].toLowerCase();\\r\\n\\t\\t\\t\\t\\t\\tif(this.__nsEditor.__objShortKey[tempKey])\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.util.warning(\\\"NSEditor\\\",tempKey + \\\" has already been assigned to \\\" + this.__nsEditor.__objShortKey[tempKey].key + \\\". It will overriden by \\\" + key + \\\".\\\")\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tthis.__nsEditor.__objShortKey[tempKey] = {item: item,parent: parent,key: key};\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar arrItem = item.dataSource;\\r\\n\\t\\t\\t\\tif(arrItem && arrItem.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < arrItem.length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar childItem = arrItem[count];\\r\\n\\t\\t\\t\\t\\t\\tif(childItem.hasOwnProperty(\\\"htmlKey\\\"))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tchildItem = this.__nsEditor.__toolBarButton[childItem[\\\"htmlKey\\\"]];\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(childItem)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__updateShortKeyDictionary(childItem,item,childItem.value);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tthis.__makeToolBarItemActive = function(item,isActive)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item && this.__nsEditor.__config.enableToolBarActive)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem.selected = isActive;\\r\\n\\t\\t\\t\\tif(item.control)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tisActive ? this.util.addStyleClass(item.control,\\\"nsEditorToolBarItemActive\\\") : this.util.removeStyleClass(item.control,\\\"nsEditorToolBarItemActive\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__makeToolBarItemDisabled = function(item,isDisabled)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem.selected = false;\\r\\n\\t\\t\\t\\titem.disabled = isDisabled;\\r\\n\\t\\t\\t\\tif(item.control)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tisDisabled ? this.util.addStyleClass(item.control,\\\"nsEditorToolBarButtonDisabled\\\") : this.util.removeStyleClass(item.control,\\\"nsEditorToolBarButtonDisabled\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createToolBarDropdown = function(parentItem,key,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItem = parentItem.dataSource;\\r\\n\\t\\t\\tif(arrItem && arrItem.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(this.__editorDropDown);\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrItem.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = arrItem[count];\\r\\n\\t\\t\\t\\t\\tvar value = item.value;\\r\\n\\t\\t\\t\\t\\tif(item.hasOwnProperty(\\\"htmlKey\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem = this.__nsEditor.__toolBarButton[item[\\\"htmlKey\\\"]];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar child = this.util.createElement(\\\"li\\\",null,\\\"nsEditorToolBarDropdownItem\\\");\\r\\n\\t\\t\\t\\t\\t\\tchild.innerHTML = item.html;\\r\\n\\t\\t\\t\\t\\t\\tchild.setAttribute(\\\"data-nsEditor-value\\\",value);\\r\\n\\t\\t\\t\\t\\t\\tthis.util.addEvent(child,\\\"click\\\",(function(item){\\r\\n\\t\\t\\t\\t\\t\\t\\treturn function(event){\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tself.__toolBarButtonClickHandler.call(self,item,key,event);\\r\\n\\t\\t\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\t\\t})(item));\\r\\n\\t\\t\\t\\t\\t\\tthis.__editorDropDown.appendChild(child);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__placeElementByEvent(this.__editorDropDown,event,{left: -22,top: 15});\\r\\n\\t\\t\\t\\treturn this.__editorDropDown;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__toolBarDropdownClickHandler = function(item,key,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar dropdown = this.__createToolBarDropdown(item,event);\\r\\n\\t\\t\\tif(dropdown)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__showToolBarDropdown(dropdown);\\r\\n\\t\\t\\t\\tthis.editorUtil.stopEvent(event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__toolBarButtonClickHandler = function(item,key,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.__nsEditor.getDisabled())\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item.command)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__nsEditor.__executeCommand(item.command,item,key);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(item.click)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem.click(item,key,event);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__makeToolBarItemActive(item,true);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__windowClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//if(this.hasFocus())\\r\\n\\t\\t\\t//{\\r\\n\\t\\t\\t\\tif (!this.util.hasStyleClass(event.target,\\\"nsEditorToolBarButtonDropdown\\\")) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__hideToolBarDropdown();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__hideGroupedPopUp();\\r\\n\\t\\t\\t//}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__showToolBarDropdown = function(dropdown)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__isToolBarDropdownVisible())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdropdown = dropdown || this.__editorDropDown;\\r\\n\\t\\t\\t\\tvar con = this.__isGroupedPopUpVisible() ? null : this.__parentContainer;\\r\\n\\t\\t\\t\\tvar maxZIndex = this.util.getMaxZIndex(con);\\r\\n\\t\\t\\t\\tif(maxZIndex > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar parent = dropdown.parentNode;\\r\\n\\t\\t\\t\\t\\tparent.style.zIndex = maxZIndex + 1;\\r\\n\\t\\t\\t\\t\\tdropdown.style.zIndex = maxZIndex + 1;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(dropdown,\\\"nsEditorToolBarDropdownShow\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__hideToolBarDropdown = function(dropdown)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdropdown = dropdown || this.__editorDropDown;\\r\\n\\t\\t\\tthis.util.removeStyleClass(dropdown,\\\"nsEditorToolBarDropdownShow\\\");\\r\\n\\t\\t\\tvar parent = dropdown.parentNode;\\r\\n\\t\\t\\tparent.style.zIndex = \\\"\\\";\\r\\n\\t\\t\\tdropdown.style.zIndex = \\\"\\\";\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isToolBarDropdownVisible = function(dropdown)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdropdown = dropdown || this.__editorDropDown;\\r\\n\\t\\t\\treturn this.util.hasStyleClass(dropdown,\\\"nsEditorToolBarDropdownShow\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__resizeHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar origEvent = event.originalEvent;\\r\\n\\t\\t\\tthis.__hideToolBarDropdown();\\r\\n\\t\\t\\tthis.__hideToolBarDropdown();\\r\\n\\t\\t\\tthis.__updateToolBarGrouping();\\r\\n\\t\\t\\tthis.__stickyScrollHandler(event);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__updateToolBarGrouping = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (this.__divToolBarContainer && this.__divToolBarContainer.parentNode) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar beforeGroupedTools = this.__groupedTools.length;\\r\\n\\t\\t\\t\\tvar hasToolGrouped = false;\\r\\n\\r\\n\\t\\t\\t\\twhile(this.__isToolbarOverflowing()) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__groupLastTool();\\r\\n\\t\\t\\t\\t\\thasToolGrouped = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (!hasToolGrouped && this.__groupedTools.length) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\twhile(this.__groupedTools.length && !this.__isToolbarOverflowing()) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__ungroupFirstTool();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (this.__isToolbarOverflowing()) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__groupLastTool();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (this.__groupedTools.length !== beforeGroupedTools) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsEditor.__dispatchInternalEvent(\\\"toolbarUpdate\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__createHorizontalSeparator\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isToolbarOverflowing = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar win = this.__nsEditor.__getWindow();\\r\\n\\t\\t\\tvar arrToolBar = this.__nsEditor.__config.toolBarButton;\\r\\n\\t\\t\\tvar retValue = false;\\r\\n\\t\\t\\tif(win && arrToolBar && arrToolBar.length) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//uiDirection for later use\\r\\n\\t\\t\\t\\tvar uiDir = \\\"ltr\\\";\\r\\n\\t\\t\\t\\tvar toolbarRect = this.__divToolBarContainer.getBoundingClientRect();\\r\\n\\t\\t\\t\\tvar lastChildRect = this.__divToolBarContainer.lastChild.getBoundingClientRect();\\r\\n\\t\\t\\t\\tif (!this.__toolBarPadding) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar cssProperty = (uiDir == \\\"ltr\\\") ? \\\"paddingRight\\\" : \\\"paddingLeft\\\";\\r\\n\\t\\t\\t\\t\\t//this.__toolBarPadding = this.util.getStyleValue(this.__divToolBarContainer,cssProperty,false,true,win);\\r\\n\\t\\t\\t\\t\\tvar computedStyle = win.getComputedStyle(this.__divToolBarContainer);\\r\\n\\t\\t\\t\\t\\tthis.__toolBarPadding = parseInt(computedStyle[cssProperty]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (uiDir == \\\"ltr\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t//console.log(lastChildRect.right + \\\" > \\\" + (toolbarRect.right - this.__toolBarPadding));\\r\\n\\t\\t\\t\\t\\tretValue = (lastChildRect.right) > (toolbarRect.right - this.__toolBarPadding);\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue = lastChildRect.left < toolbarRect.left + this.__toolBarPadding;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__groupLastTool = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (!this.__groupedTools.length) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divToolBarContainer.appendChild(this.__getOverflowContainer());\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar arrItem = this.__divToolBarContent.querySelectorAll(\\\".nsEditorToolBarButton\\\");\\r\\n\\t\\t\\tif(arrItem && arrItem.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar btnItem = arrItem[arrItem.length - 1];\\r\\n\\t\\t\\t\\tthis.__addToolInParent(btnItem,this.__groupedContainerDropdownContent,true);\\r\\n\\t\\t\\t\\tthis.__groupedTools.unshift(btnItem);\\r\\n\\t\\t\\t\\tthis.__refreshDividerInGroupedContent();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__ungroupFirstTool = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar btnItem = this.__groupedTools[0];//this.__groupedContainerDropdownContent.querySelectorAll(\\\".nsEditorToolBarButton\\\")[0];\\r\\n\\t\\t\\tthis.__addToolInParent(btnItem,this.__divToolBarContent,false);\\r\\n\\t\\t\\tthis.__groupedTools.splice(0,1);\\r\\n\\t\\t\\tif (!this.__groupedTools.length) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divToolBarContainer.removeChild(this.__getOverflowContainer());\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//this.__refreshDividerInGroupedContent();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getOverflowContainer = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__groupedContainer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__groupedContainer = this.util.createDiv(null,\\\"nsEditorToolBarOveflowCon\\\");\\r\\n\\t\\t\\t\\tthis.__btnGrouped =  this.util.createElement(\\\"button\\\",null,\\\"nsEditorToolBarButton\\\");\\r\\n\\t\\t\\t\\tthis.__btnGrouped.innerHTML = \\\"<i class='ns-icon ns-editor-vertical-dots' aria-hidden='true'></i>\\\"; \\r\\n\\t\\t\\t\\tthis.__nsToolTipInElement.addToolTip(this.__btnGrouped,\\\"Show Tools\\\");\\r\\n\\t\\t\\t\\tthis.__groupedContainer.appendChild(this.__btnGrouped);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__btnGrouped,\\\"click\\\",this.__handleOverflowClick.bind(this));\\r\\n\\t\\t\\t\\tvar content = \\\"<div class=\\\\\\\"nsEditorToolBarOveflowDropdown\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\\"\\t<div class=\\\\\\\"nsEditorToolBarOveflowDropdownToolbar\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\\"\\t\\t<div class=\\\\\\\"nsEditorToolBarOveflowDropdownContent\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\\"\\t\\t</div>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\\"\\t</div>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\\"</div>\\\";\\r\\n\\t\\t\\t\\tthis.__groupedContainerDropdown = this.util.getElementFromHtml(content);\\r\\n\\t\\t\\t\\tthis.__nsEditor.__compFixed.appendChild(this.__groupedContainerDropdown);\\r\\n\\t\\t\\t\\tthis.__groupedContainerDropdownContent = this.__groupedContainerDropdown.querySelector(\\\".nsEditorToolBarOveflowDropdownContent\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn this.__groupedContainer;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__refreshDividerInGroupedContent = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItem = this.__groupedContainerDropdownContent.querySelectorAll(\\\".nsEditorToolBarHorizontalSeparator\\\");\\r\\n\\t\\t\\tfor(var count = arrItem.length - 1;count > -1;count--)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__groupedContainerDropdownContent.removeChild(arrItem[count]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tarrItem = this.__groupedContainerDropdownContent.querySelectorAll(\\\".nsEditorToolBarButton\\\");\\r\\n\\t\\t\\tvar afterElement = 3;\\r\\n\\t\\t\\tfor(var count = afterElement - 1;count < arrItem.length;count = count + afterElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar btn = arrItem[count];\\r\\n\\t\\t\\t\\tvar div = this.util.createDiv(null,\\\"nsEditorToolBarHorizontalSeparator\\\");\\r\\n\\t\\t\\t\\tthis.util.insertAfterElement(btn,div);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__addToolInParent = function(btnItem,parent,isFirst)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisFirst ? parent.insertBefore(btnItem,parent.firstChild) : parent.appendChild(btnItem);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleOverflowClick = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isGroupedPopUpVisible() ? this.__hideGroupedPopUp() : this.__showGroupedPopUp();\\r\\n\\t\\t\\tthis.editorUtil.stopEvent(event);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__showGroupedPopUp = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__isGroupedPopUpVisible())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar con = this.__groupedContainerDropdown;\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(con,\\\"nsEditorToolBarOveflowDropdownVisible\\\");\\r\\n\\t\\t\\t\\tvar rect = this.__groupedContainerDropdownContent.getBoundingClientRect();\\r\\n\\t\\t\\t\\tcon.style.width = rect.width + \\\"px\\\";\\r\\n\\t\\t\\t\\t//console.log(con.getBoundingClientRect().width + \\\" == \\\" + this.__groupedContainerDropdownContent.getBoundingClientRect().width);\\r\\n\\t\\t\\t\\tthis.__placeElementByEvent(con,event,{left: (-1 * rect.width) ,top: ((this.__btnGrouped.getBoundingClientRect().height) / 2)});\\r\\n\\t\\t\\t\\tvar maxZIndex = this.util.getMaxZIndex(this.__parentContainer);\\r\\n\\t\\t\\t\\tif(maxZIndex > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar parent = con.parentNode;\\r\\n\\t\\t\\t\\t\\tparent.style.zIndex = maxZIndex + 1;\\r\\n\\t\\t\\t\\t\\tcon.style.zIndex = maxZIndex + 2;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__hideGroupedPopUp = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__groupedContainerDropdown)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar con = this.__groupedContainerDropdown;\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(con,\\\"nsEditorToolBarOveflowDropdownVisible\\\");\\r\\n\\t\\t\\t\\tcon.style.width = \\\"\\\";\\r\\n\\t\\t\\t\\tvar parent = con.parentNode;\\r\\n\\t\\t\\t\\tparent.style.zIndex = \\\"\\\";\\r\\n\\t\\t\\t\\tcon.style.zIndex = \\\"\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isGroupedPopUpVisible = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.util.hasStyleClass(this.__groupedContainerDropdown,\\\"nsEditorToolBarOveflowDropdownVisible\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//part for sticky header\\r\\n\\t    \\r\\n\\t    this.__stickyScrollRef = null;\\r\\n\\t    this.__compDuplicate = null;\\r\\n\\t    this.__isSticked = false;\\r\\n\\t    this.__initSticy = function () \\r\\n\\t\\t{\\r\\n\\t    \\tif(!this.__stickyScrollRef)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tthis.__stickyScrollRef = this.__stickyScrollHandler.bind(this);\\r\\n\\t    \\t\\tthis.util.addEvent(this.__nsEditor.__context,\\\"scroll wheel mousewheel\\\",this.__stickyScrollRef);\\r\\n\\t    \\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__stickyScrollHandler = function (event) \\r\\n\\t\\t{\\r\\n\\t\\t\\t//event = this.util.getEvent(event);\\r\\n\\t\\t\\tvar win = this.__nsEditor.__context;\\r\\n\\t\\t\\tvar doc = this.__nsEditor.__dom.doc;\\r\\n\\t\\t\\tvar container = this.__parentContainer;\\r\\n\\t\\t\\tvar scrollTop = win.pageYOffset || (doc.documentElement && doc.documentElement.scrollTop) || 0;\\r\\n\\t\\t\\tvar offsetEditor = this.editorUtil.getOffset(container,true,doc);\\r\\n\\t\\t\\tvar hasScroll = (scrollTop > offsetEditor.top && scrollTop  < offsetEditor.top + offsetEditor.height);\\r\\n\\t\\t\\tvar enableInMobile = this.__config.enableStickyToolbarForMobile && this.__isDeviceMobile();\\r\\n\\t\\t\\tvar performSticky = !this.__isSourceMode && hasScroll && !enableInMobile;\\r\\n\\t\\t\\tif(this.__config.enableStickyToolbar && this.__config.enableToolBar)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(performSticky)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__makeSticky(this.__divToolBarContainer);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__removeSticky(this.__divToolBarContainer);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__nsEditor.__dispatchInternalEvent(\\\"stickyChanged\\\",{isSticky: performSticky},{isSticky: performSticky});\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isDeviceMobile = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__makeSticky = function(comp) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar container = this.__parentContainer;\\r\\n\\t\\t\\tif(!this.__isSticked)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__createDuplicate(comp);\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(container,\\\"nsEditorSticky\\\");\\r\\n\\t\\t\\t\\tthis.__isSticked = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar style = {top: 0,width: container.offsetWidth};\\r\\n\\t\\t\\tthis.util.css(comp,style);\\r\\n\\t\\t\\tif(this.__nsEditor.__browserDetail.isMSIE && this.__compDuplicate)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstyle = {height: comp.offsetHeight};\\r\\n\\t\\t\\t\\tthis.util.css(this.__compDuplicate,style);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__removeSticky = function(comp) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__isSticked)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar container = this.__parentContainer;\\r\\n\\t\\t\\t\\tvar style = {top: \\\"\\\",width: \\\"\\\"};\\r\\n\\t\\t\\t\\tthis.util.css(comp,style);\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(container,\\\"nsEditorSticky\\\");\\r\\n\\t\\t\\t\\tthis.__isSticked = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createDuplicate = function(comp) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsEditor.__browserDetail.isMSIE && !this.__compDuplicate)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__compDuplicate = this.util.createDiv(null,\\\"nsEditorStickyToolbar\\\");\\r\\n\\t\\t\\t\\tcomp.parentNode.insertBefore(this.__compDuplicate,comp);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isToolbarSticky = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.util.hasStyleClass(this.__parentContainer,\\\"nsEditorSticky\\\");\\r\\n\\t\\t};\\r\\n\\t    \\r\\n\\t    //end of sticky header\\r\\n\\t\\t\\r\\n\\t\\tthis.__createHorizontalSeparator = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar comp = this.util.createElement(\\\"span\\\",null,\\\"nsEditorToolBarVerticalSeparator\\\");\\r\\n\\t\\t\\treturn comp;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__placeElementByEvent = function(element,event,posOffset)\\r\\n\\t\\t{\\r\\n\\t\\t\\tposOffset = posOffset || {left: 0,top: 0};\\r\\n\\t\\t\\tvar offset = this.util.getEventPosition(event);\\r\\n\\t\\t\\telement.style.left = (offset.left + (posOffset.left * 1)) + \\\"px\\\";\\r\\n\\t\\t\\telement.style.top = (offset.top + (posOffset.top * 1)) + \\\"px\\\";\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\t\\r\\n\\treturn NSToolBar;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSToolBar\\\",NSToolBar); var NSSelection = (function()\\r\\n{\\r\\n\\tvar NSSelection = function(nsEditor)\\r\\n\\t{\\r\\n\\t\\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\tthis.editorUtil = nsEditor.editorUtil;\\r\\n\\t\\t\\r\\n\\t\\tthis.__savedSelection = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t/* Start of selection function */\\r\\n\\t\\tthis.getSelection = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsEditor.__isModeTextArea())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (this.__nsEditor.__context.getSelection) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn this.__nsEditor.__context.getSelection();\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse if (this.__nsEditor.__dom.doc.selection) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t   return this.__nsEditor.__dom.doc.selection;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar contentWindow = this.__nsEditor.__compTextArea.contentWindow;\\r\\n\\t\\t\\t\\tif (contentWindow) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (contentWindow.getSelection) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn contentWindow.getSelection();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (contentWindow.selection) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn contentWindow.selection;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar doc = this.__frameContentDoc;\\r\\n\\t\\t\\t\\tif (doc.getSelection) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn doc.getSelection();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (doc.selection) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn doc.selection;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//restore\\r\\n\\t    this.restoreSelection = function(objSaved) \\r\\n\\t\\t{\\r\\n\\t    \\tobjSaved = objSaved || this.__savedSelection;\\r\\n\\t    \\tif(objSaved)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tif(objSaved instanceof Range)\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tvar selection = null;\\r\\n\\t\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\t\\tvar setTextRange = function(win,doc)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(win.getSelection || doc.createRange) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tselection = win.getSelection();\\r\\n\\t\\t\\t\\t\\t        try \\r\\n\\t\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t\\t        \\tselection.removeAllRanges();\\r\\n\\t\\t\\t\\t\\t        } \\r\\n\\t\\t\\t\\t\\t        catch (error) \\r\\n\\t\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t\\t        \\tdoc.body.createTextRange().select();\\r\\n\\t\\t\\t\\t\\t        \\tif(doc.selection)\\r\\n\\t\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t\\t        \\t\\tdoc.selection.empty();\\r\\n\\t\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t\\t        selection.addRange(objSaved);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if (doc.selection) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tobjSaved.select();\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\tif(this.__nsEditor.__isModeTextArea())\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetTextRange(this.__nsEditor.__context,this.__nsEditor.__dom.doc);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetTextRange(this.__nsEditor.__frameContentWindow,this.__nsEditor.__frameContentDoc);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t\\telse if(this.util.isArray(objSaved))\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tvar range = null;\\r\\n\\t    \\t\\t\\tfor(var count = 0;count < objSaved.length;count++) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tvar item = objSaved[count];\\r\\n\\t    \\t\\t\\t\\tvar start = item.start;\\r\\n\\t    \\t\\t\\t\\tvar end = item.end;\\r\\n\\t    \\t\\t\\t\\tif(start) \\r\\n\\t    \\t\\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\t\\trange = this.createRange();\\r\\n\\t    \\t\\t\\t\\t\\tif(item.collapsed || !end) \\r\\n\\t    \\t\\t\\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\t\\t\\tvar previousNode = start.previousSibling;\\r\\n\\t    \\t\\t\\t\\t\\t\\tif(this.util.isTextNode(previousNode)) \\r\\n\\t    \\t\\t\\t\\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\t\\t\\t\\trange.setStart(previousNode,(previousNode.nodeValue ? previousNode.nodeValue.length : 0));\\r\\n\\t    \\t\\t\\t\\t\\t\\t} \\r\\n\\t    \\t\\t\\t\\t\\t\\telse \\r\\n\\t    \\t\\t\\t\\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\t\\t\\t\\trange.setStartBefore(start);\\r\\n\\t    \\t\\t\\t\\t\\t\\t}\\r\\n\\t    \\t\\t\\t\\t\\t\\tthis.editorUtil.removeNode(start);\\r\\n\\t    \\t\\t\\t\\t\\t\\trange.collapse(true);\\r\\n\\t    \\t\\t\\t\\t\\t}\\r\\n\\t    \\t\\t\\t\\t\\telse \\r\\n\\t    \\t\\t\\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\t\\t\\trange.setStartAfter(start);\\r\\n\\t    \\t\\t\\t\\t\\t\\tthis.editorUtil.removeNode(start);\\r\\n\\t    \\t\\t\\t\\t\\t\\trange.setEndBefore(end);\\r\\n\\t    \\t\\t\\t\\t\\t\\tthis.editorUtil.removeNode(end);\\r\\n\\t    \\t\\t\\t\\t\\t}\\r\\n\\t    \\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t    \\t\\t\\tif(range) \\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tthis.selectRange(range);\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//save\\r\\n\\t\\tthis.saveSelection = function(saveSelection,wrapText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsaveSelection = (saveSelection == null) ? true : Boolean.parse(saveSelection);\\r\\n\\t\\t\\tvar savedSelection = null;\\r\\n\\t\\t\\tif(wrapText)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsavedSelection = [];\\r\\n\\t\\t\\t\\tvar selection = this.getSelection();\\r\\n\\t\\t\\t\\tif(selection && selection.rangeCount) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar ranges = [];\\r\\n\\t\\t\\t\\t\\tvar rangeCount = selection.rangeCount;\\r\\n\\t\\t\\t\\t\\tvar start = null;\\r\\n\\t\\t\\t\\t\\tvar end = null;\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < rangeCount;count++) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tranges[count] = selection.getRangeAt(count);\\r\\n\\t\\t\\t\\t\\t\\tif (ranges[count].collapsed) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tstart = this.__createWrapper(true,ranges[count]);\\r\\n\\t\\t\\t\\t\\t\\t\\tsavedSelection[count] = {start:start,collapsed:true,startMarker: start.outerHTML};\\r\\n\\t\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tstart = this.__createWrapper(true,ranges[count]);\\r\\n\\t\\t\\t\\t\\t\\t\\tend = this.__createWrapper(false,ranges[count]);\\r\\n\\t\\t\\t\\t\\t\\t\\tsavedSelection[count]  = {start: start,end: end,collapsed: false,startMarker: start.outerHTML,endMarker: end.outerHTML};\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tselection.removeAllRanges();\\r\\n\\t\\t\\t\\t\\tfor(var count = rangeCount - 1;count > -1; --count) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar start = savedSelection[count].start;\\r\\n\\t\\t\\t\\t\\t\\tif(start) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(savedSelection[count].collapsed) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tranges[count].setStartAfter(start);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tranges[count].collapse(true);\\r\\n\\t\\t\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t//doing setStartAfter as with setStartBefore the element added gets added before the start selection span\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t//ranges[count].setStartBefore(start);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tranges[count].setStartAfter(start);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tif(savedSelection[count].end) \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tvar end = savedSelection[count].end;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif(end) \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//doing setEndBefore as with setEndAfter the element added wraps after the end selection span\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//ranges[count].setEndAfter(end);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tranges[count].setEndBefore(end);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\ttry \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tselection.addRange(ranges[count].cloneRange());\\r\\n\\t\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\t\\tcatch(error)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsavedSelection = this.getRange();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(saveSelection)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__savedSelection = savedSelection;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn savedSelection;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createWrapper = function(isStart,range)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar clonedRange;\\r\\n\\t\\t\\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t\\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t\\t\\tif (range) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tclonedRange = range.cloneRange();\\r\\n\\t\\t\\t\\tclonedRange.collapse(isStart);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar wrapper = this.util.createElement(\\\"span\\\",null,\\\"nsEditorSelectionWrapper nsEditorSelectionWrapper\\\" + (isStart ? \\\"Start\\\" : \\\"End\\\"),doc);\\r\\n\\t\\t\\tthis.util.css(wrapper,{lineHeight: 0,display:\\\"none\\\"});\\r\\n\\t\\t\\twrapper.appendChild(doc.createTextNode(this.editorUtil.INVISIBLE_SPACE));\\r\\n\\t\\t\\tif(clonedRange) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (this.editorUtil.isExistsInsideEditor(isStart ? clonedRange.startContainer : clonedRange.endContainer)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tclonedRange.insertNode(wrapper);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn wrapper;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//isMarker\\r\\n\\t\\tthis.isSelectionWrapper = function(node)\\r\\n\\t\\t{\\r\\n\\t\\t\\tnode && this.util.hasStyleClass(node,\\\"nsEditorSelectionWrapper\\\");\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\t/* end of selection function */\\r\\n\\t\\t\\r\\n\\t\\t/* Start of range function */\\r\\n\\t\\t\\r\\n\\t\\tthis.getRange = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar selection = this.getSelection();\\r\\n\\t\\t\\tif (selection) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (selection.rangeCount && selection.rangeCount > 0) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn selection.getRangeAt(0);\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn this.createRange();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.createRange = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t\\t\\tvar range = doc.createRange();\\r\\n\\t\\t\\treturn range;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.selectRange = function(range,focus) \\r\\n\\t\\t{\\r\\n\\t\\t\\tfocus = this.util.isUndefinedOrNull(focus) ? true : Boolean.parse(focus);\\r\\n\\t\\t\\tif(focus && !this.hasFocus()) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.setFocus();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar selection = this.getSelection();\\r\\n\\t\\t\\tif (selection) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tselection.removeAllRanges();\\r\\n\\t\\t\\t\\tselection.addRange(range);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__nsEditor.__dispatchInternalEvent(\\\"selectionchange\\\",{range:range},{range:range});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//select\\r\\n\\t\\tthis.selectElement = function(node,isInward) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(node)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tisInward = Boolean.parse(isInward);\\r\\n\\t\\t\\t\\tvar isExistsInside = this.editorUtil.isExistsInsideEditor(node);\\r\\n\\t\\t\\t\\tif(isExistsInside)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar range = this.createRange();\\r\\n\\t\\t\\t\\t    range[isInward ? \\\"selectNodeContents\\\" : \\\"selectNode\\\"](node);\\r\\n\\t\\t\\t\\t    this.selectRange(range);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.warning(\\\"NSEditor\\\",\\\"Node element must be in editor\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.createDefaultRange = function() \\r\\n\\t    {\\r\\n\\t\\t\\tthis.setFocus();\\r\\n\\t        var range = this.createRange();\\r\\n\\t        var body = this.__nsEditor.__getTextArea();\\r\\n\\t        var focusElement = body.firstElementChild;\\r\\n\\t        if (!focusElement) \\r\\n\\t        {\\r\\n\\t        \\tbody.innerHTML = this.__config.defaultValue;\\r\\n\\t        \\tfocusElement = body.firstElementChild;\\r\\n\\t        }\\r\\n\\t        range.setStart(focusElement, 0);\\r\\n\\t        range.setEnd(focusElement, 0);\\r\\n\\t        return range;\\r\\n\\t    };\\r\\n\\t\\t\\r\\n\\t\\t/* end of range function */\\r\\n\\t\\t\\r\\n\\t\\tthis.insertNode = function(node,insertCursorAfter,checkCharCount) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(node)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcheckCharCount = this.util.isUndefinedOrNull(checkCharCount) ? true : Boolean.parse(checkCharCount);\\r\\n\\t\\t\\t\\tif (!this.__nsEditor.__checkCharCount(node, null)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t            \\treturn false;\\r\\n\\t        \\t}\\r\\n\\t\\t\\t\\tinsertCursorAfter = this.util.isUndefinedOrNull(insertCursorAfter) ? true : Boolean.parse(insertCursorAfter);\\r\\n\\t\\t\\t\\tif (!this.hasFocus() && !this.__nsEditor.__isSourceMode) \\r\\n\\t\\t        {\\r\\n\\t\\t\\t\\t\\t//this.restoreSelection();\\r\\n\\t\\t            this.setFocus();\\r\\n\\t\\t        }\\r\\n\\t\\t\\t\\tif (!this.isCollapsed()) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsEditor.__executeCommand(\\\"Delete\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar tempNode = null;\\r\\n\\t\\t\\t\\tvar selection = this.getSelection();\\r\\n\\t\\t\\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t\\t\\t\\tif(selection && selection.rangeCount)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar range = selection.getRangeAt(0);\\r\\n\\t\\t\\t\\t\\tif (this.util.isElementInOrParent(range.commonAncestorContainer,textArea)) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t                if (/^(BR|HR|IMG|VIDEO)$/i.test(range.startContainer.nodeName) && range.collapsed) \\r\\n\\t\\t\\t                {\\r\\n\\t\\t\\t                \\ttempNode = range.startContainer.parentNode;\\r\\n\\t\\t\\t                \\tif(tempNode)\\r\\n\\t\\t\\t                \\t{\\r\\n\\t\\t\\t                \\t\\ttempNode.insertBefore(node, range.startContainer);\\r\\n\\t\\t\\t                \\t}\\r\\n\\t\\t\\t                }\\r\\n\\t\\t\\t                else \\r\\n\\t\\t\\t                {\\r\\n\\t\\t\\t                    range.deleteContents();\\r\\n\\t\\t\\t                    range.insertNode(node);\\r\\n\\t\\t\\t                }\\r\\n\\t\\t            }\\r\\n\\t\\t            else \\r\\n\\t\\t            {\\r\\n\\t\\t            \\ttextArea.appendChild(node);\\r\\n\\t\\t            }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse \\r\\n\\t            {\\r\\n\\t            \\ttextArea.appendChild(node);\\r\\n\\t            }\\r\\n\\t\\t\\t\\tif (insertCursorAfter) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t            if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) \\r\\n\\t\\t            {\\r\\n\\t\\t            \\tif(node.lastChild)\\r\\n\\t\\t            \\t{\\r\\n\\t\\t            \\t\\tthis.setCursorAfter(node.lastChild);\\r\\n\\t\\t            \\t}\\r\\n\\t\\t            }\\r\\n\\t\\t            else \\r\\n\\t\\t            {\\r\\n\\t\\t                this.setCursorAfter(node);\\r\\n\\t\\t            }\\r\\n\\t\\t        }\\r\\n\\t\\t\\t\\tthis.__nsEditor.__dispatchInternalEvent(\\\"insertedNode\\\");\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.insertHTML = function(html) \\r\\n\\t    {\\r\\n\\t        if (html) \\r\\n\\t        {\\r\\n\\t        \\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t        \\tvar textArea = this.__nsEditor.__getTextArea(); \\r\\n\\t        \\tvar divTemp = doc.createElement(\\\"div\\\");\\r\\n\\t        \\tvar fragment = doc.createDocumentFragment();\\r\\n\\t\\t        if (!this.hasFocus() && !this.__isSourceMode) \\r\\n\\t\\t        {\\r\\n\\t\\t            this.setFocus();\\r\\n\\t\\t        }\\r\\n\\t\\t        if (!this.editorUtil.isNode(html)) \\r\\n\\t\\t        {\\r\\n\\t\\t            divTemp.innerHTML = html.toString();\\r\\n\\t\\t        }\\r\\n\\t\\t        else \\r\\n\\t\\t        {\\r\\n\\t\\t            divTemp.appendChild(html);\\r\\n\\t\\t        }\\r\\n\\t\\t        var lastChild = divTemp.lastChild;\\r\\n\\t\\t        if (this.__isSourceMode || !lastChild) \\r\\n\\t\\t        {\\r\\n\\t\\t            return;\\r\\n\\t\\t        }\\r\\n\\t\\t        while (divTemp.firstChild) \\r\\n\\t\\t        {\\r\\n\\t\\t            lastChild = divTemp.firstChild;\\r\\n\\t\\t            fragment.appendChild(divTemp.firstChild);\\r\\n\\t\\t        }\\r\\n\\t\\t        if(this.insertNode(fragment, false))\\r\\n\\t\\t        {\\r\\n\\t\\t        \\tif (lastChild) \\r\\n\\t\\t        \\t{\\r\\n\\t\\t\\t            this.setCursorAfter(lastChild);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        else \\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t            this.setCursorIn(fragment);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        var lastEditorElement = textArea.lastChild;\\r\\n\\t\\t\\t        while(this.util.isTextNode(lastEditorElement) && lastEditorElement.previousSibling && lastEditorElement.nodeValue &&\\r\\n\\t\\t\\t            /^\\\\s*$/.test(lastEditorElement.nodeValue)) \\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t            lastEditorElement = lastEditorElement.previousSibling;\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        if (lastChild) \\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t            if (lastEditorElement && lastChild === lastEditorElement &&\\r\\n\\t\\t\\t            \\t\\tthis.util.isElement(lastChild)) \\r\\n\\t\\t\\t            {\\r\\n\\t\\t\\t            \\ttextArea.appendChild(doc.createElement(\\\"br\\\"));\\r\\n\\t\\t\\t            }\\r\\n\\t\\t\\t            this.setCursorAfter(lastChild);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t        }\\r\\n\\t\\t        \\r\\n\\t        }\\r\\n\\t    };\\r\\n\\t\\t\\r\\n\\t\\t//remove\\r\\n\\t\\tthis.removeSelectedContent = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar selection = this.getSelection();\\r\\n\\t\\t\\tvar element = this.getElementUnderCursor();\\r\\n\\t\\t\\tif (selection && element) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (var count = 0;count < selection.rangeCount; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tselection.getRangeAt(count).deleteContents();\\r\\n\\t\\t\\t\\t\\tselection.getRangeAt(count).collapse(true);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\r\\n\\t\\tthis.removeNode = function(node)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isExistsInside = this.editorUtil.isExistsInsideEditor(node);\\r\\n    \\t\\tif(isExistsInside)\\r\\n\\t\\t\\t{\\r\\n    \\t\\t\\tthis.editorUtil.removeNode(node);\\r\\n\\t\\t\\t}\\r\\n    \\t\\t//afterRemoveNode\\r\\n    \\t\\tthis.__nsEditor.__dispatchInternalEvent(\\\"removedNode\\\",{node: node},{node: node});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.insertCursorAtPoint = function (xPos,yPos) \\r\\n\\t\\t{\\r\\n\\t        var self = this;\\r\\n\\t        this.removeMarkers();\\r\\n\\t        try \\r\\n\\t        {\\r\\n\\t        \\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t        \\tvar range = this.createRange();\\r\\n\\t        \\tif(doc.caretPositionFromPoint) \\r\\n\\t        \\t{\\r\\n                    var caret = doc.caretPositionFromPoint(xPos,yPos);\\r\\n                    if (caret) \\r\\n                    {\\r\\n                        range.setStart(caret.offsetNode,caret.offset);\\r\\n                    }\\r\\n                }\\r\\n\\t        \\telse if(doc.caretRangeFromPoint) \\r\\n                {\\r\\n                    var caret = doc.caretRangeFromPoint(xPos,yPos);\\r\\n                    range.setStart(caret.startContainer, caret.startOffset);\\r\\n                }\\r\\n\\t            range.collapse(true);\\r\\n\\t            this.selectRange(range);\\r\\n\\t            return true;\\r\\n\\t        }\\r\\n\\t        catch (error) \\r\\n\\t        { \\r\\n\\t        \\t\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.isCollapsed = function() \\r\\n\\t    {\\r\\n\\t        var selection = this.getSelection();\\r\\n\\t        if(selection)\\r\\n\\t        {\\r\\n\\t        \\tfor (var count = 0; count < selection.rangeCount; count++) \\r\\n\\t\\t        {\\r\\n\\t\\t            if (!selection.getRangeAt(count).collapsed) \\r\\n\\t\\t            {\\r\\n\\t\\t                return false;\\r\\n\\t\\t            }\\r\\n\\t\\t        }\\r\\n\\t        }\\r\\n\\t        return true;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    //isFocused\\r\\n\\t    this.hasFocus = function () \\r\\n\\t    {\\r\\n\\t    \\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t    \\tvar textArea = this.__nsEditor.__getTextArea(); \\r\\n\\t        return (doc.hasFocus && doc.hasFocus() && textArea === doc.activeElement);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.setFocus = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsEditor.__isModeTextArea())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsEditor.__compTextArea && this.__nsEditor.__compTextArea.focus();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsEditor.__frameContentWindow && this.__nsEditor.__frameContentWindow.focus();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//current\\r\\n\\t\\tthis.getElementUnderCursor = function(parseChildren)\\r\\n\\t\\t{\\r\\n\\t\\t\\tparseChildren = this.util.isUndefinedOrNull(parseChildren) ? true : Boolean.parse(parseChildren);\\r\\n\\t        if (!this.__nsEditor.__isSourceMode) \\r\\n\\t        {\\r\\n\\t            var selection = this.getSelection();\\r\\n\\t            if (selection && selection.rangeCount > 0) \\r\\n\\t            {\\r\\n\\t                var range = selection.getRangeAt(0);\\r\\n\\t                var node = range.startContainer\\r\\n\\t                var isRight = false;\\r\\n\\t                var getChild = function(paramNode) \\r\\n\\t                {\\r\\n\\t                    return isRight ? paramNode.lastChild : paramNode.firstChild;\\r\\n\\t                };\\r\\n\\t                if (!this.util.isTextNode(node)) \\r\\n\\t                {\\r\\n\\t                    node = range.startContainer.childNodes[range.startOffset];\\r\\n\\t                    if (!node) \\r\\n\\t                    {\\r\\n\\t                        node = range.startContainer.childNodes[range.startOffset - 1];\\r\\n\\t                        isRight = true;\\r\\n\\t                    }\\r\\n\\t                    if (node && selection.isCollapsed && !this.util.isTextNode(node)) \\r\\n\\t                    {\\r\\n\\t                        if (!isRight && this.util.isTextNode(node.previousSibling)) \\r\\n\\t                        {\\r\\n\\t                            node = node.previousSibling;\\r\\n\\t                        }\\r\\n\\t                        else if (parseChildren) \\r\\n\\t                        {\\r\\n\\t                            var current = getChild(node);\\r\\n\\t                            while (current) \\r\\n\\t                            {\\r\\n\\t                                if (current && this.util.isTextNode(current)) \\r\\n\\t                                {\\r\\n\\t                                    node = current;\\r\\n\\t                                    break;\\r\\n\\t                                }\\r\\n\\t                                current = getChild(current);\\r\\n\\t                            }\\r\\n\\t                        }\\r\\n\\t                    }\\r\\n\\t                    if (node && !selection.isCollapsed && !this.util.isTextNode(node)) \\r\\n\\t                    {\\r\\n\\t                        var leftChild = node;\\r\\n\\t                        var rightChild = node;\\r\\n\\t                        do \\r\\n\\t                        {\\r\\n\\t                            leftChild = leftChild.firstChild;\\r\\n\\t                            rightChild = rightChild.lastChild;\\r\\n\\t                        } \\r\\n\\t                        while (leftChild && rightChild && !this.util.isTextNode(leftChild));\\r\\n\\t                        if (leftChild === rightChild && leftChild && this.util.isTextNode(leftChild)) \\r\\n\\t                        {\\r\\n\\t                            node = leftChild;\\r\\n\\t                        }\\r\\n\\t                    }\\r\\n\\t                }\\r\\n\\t                var isExistsInside = this.editorUtil.isExistsInsideEditor(node);\\r\\n\\t                if (node && isExistsInside) \\r\\n\\t                {\\r\\n\\t                    return node;\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        return null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.setCursorAfter = function(node) \\r\\n\\t\\t{\\r\\n\\t    \\tif(node)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tvar isExistsInside = this.editorUtil.isExistsInsideEditor(node);\\r\\n\\t\\t\\t\\tif(isExistsInside)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar range = this.createRange();\\r\\n\\t\\t\\t\\t\\tvar fakeNode = null;\\r\\n\\t\\t\\t        if (!this.util.isTextNode(node)) \\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t            fakeNode = this.__nsEditor.__dom.doc.createTextNode(\\\"\\\");\\r\\n\\t\\t\\t            range.setStartAfter(node);\\r\\n\\t\\t\\t            range.insertNode(fakeNode);\\r\\n\\t\\t\\t            range.selectNode(fakeNode);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        else \\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t            range.setEnd(node, node.nodeValue !== null ? node.nodeValue.length : 0);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        range.collapse(false);\\r\\n\\t\\t\\t\\t\\tthis.selectRange(range);\\r\\n\\t\\t\\t\\t\\treturn fakeNode;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.warning(\\\"NSEditor\\\",\\\"Node element must be in editor\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t    \\t}\\r\\n\\t    \\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.setCursorBefore = function(node) \\r\\n\\t\\t{\\r\\n\\t    \\tif(node)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tvar isExistsInside = this.editorUtil.isExistsInsideEditor(node);\\r\\n\\t\\t\\t\\tif(isExistsInside)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar range = this.createRange();\\r\\n\\t\\t\\t\\t\\tvar fakeNode = null;\\r\\n\\t\\t\\t        if (!this.util.isTextNode(node)) \\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t            fakeNode = this.__nsEditor.__dom.doc.createTextNode(\\\"\\\");\\r\\n\\t\\t\\t            range.setStartAfter(node);\\r\\n\\t\\t\\t            range.collapse(true);\\r\\n\\t\\t\\t            range.insertNode(fakeNode);\\r\\n\\t\\t\\t            range.selectNode(fakeNode);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        else \\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t            range.setStart(node, node.nodeValue !== null ? node.nodeValue.length : 0);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        range.collapse(true);\\r\\n\\t\\t\\t\\t\\tthis.selectRange(range);\\r\\n\\t\\t\\t\\t\\treturn fakeNode;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.warning(\\\"NSEditor\\\",\\\"Node element must be in editor\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t    \\t}\\r\\n\\t    \\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.setCursorIn = function(node,inStart) \\r\\n\\t\\t{\\r\\n\\t    \\tif(node)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tinStart = this.util.isUndefinedOrNull(inStart) ? true : Boolean.parse(inStart);\\r\\n\\t    \\t\\tvar isExistsInside = this.editorUtil.isExistsInsideEditor(node);\\r\\n\\t\\t\\t\\tif(isExistsInside)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar range = this.createRange();\\r\\n\\t\\t\\t\\t\\tvar startNode = node;\\r\\n\\t\\t\\t\\t\\tvar lastNode = node;\\r\\n\\t\\t\\t\\t\\tdo \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t            if(this.util.isTextNode(startNode)) \\r\\n\\t\\t\\t            {\\r\\n\\t\\t\\t                break;\\r\\n\\t\\t\\t            }\\r\\n\\t\\t\\t            lastNode = startNode;\\r\\n\\t\\t\\t            startNode = inStart ? startNode.firstChild : startNode.lastChild;\\r\\n\\t\\t\\t        } \\r\\n\\t\\t\\t\\t\\twhile (startNode);\\r\\n\\t\\t\\t\\t\\tif (!startNode) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t            var fakeNode = this.__nsEditor.__dom.doc.createTextNode(\\\"\\\");\\r\\n\\t\\t\\t            if (!/^(img|br|input)$/i.test(lastNode.nodeName)) \\r\\n\\t\\t\\t            {\\r\\n\\t\\t\\t            \\tlastNode.appendChild(fakeNode);\\r\\n\\t\\t\\t            \\tlastNode = fakeNode;\\r\\n\\t\\t\\t            }\\r\\n\\t\\t\\t            else \\r\\n\\t\\t\\t            {\\r\\n\\t\\t\\t            \\tstartNode = lastNode;\\r\\n\\t\\t\\t            }\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t\\t\\trange.selectNodeContents(startNode || lastNode);\\r\\n\\t\\t\\t        range.collapse(inStart);\\r\\n\\t\\t\\t        this.selectRange(range);\\r\\n\\t\\t\\t        return lastNode;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.warning(\\\"NSEditor\\\",\\\"Node element must be in editor\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t    \\t}\\r\\n\\t    \\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//getHTML\\r\\n\\t\\tthis.getSelectedHTML = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar selection = this.getSelection();\\r\\n\\t        if (selection && selection.rangeCount > 0) \\r\\n\\t        {\\r\\n\\t        \\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t            var range = selection.getRangeAt(0);\\r\\n\\t            var clonedSelection = range.cloneContents();\\r\\n\\t            var div = doc.createElement(\\\"div\\\");\\r\\n\\t            div.appendChild(clonedSelection);\\r\\n\\t            return div.innerHTML;\\r\\n\\t        }\\r\\n\\t        return \\\"\\\";\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.getSelectedNodes = function()\\r\\n\\t    {\\r\\n\\t    \\tvar selection = this.getSelection();\\r\\n\\t        if (selection && selection.rangeCount > 0) \\r\\n\\t        {\\r\\n\\t        \\tvar self = this;\\r\\n\\t        \\tvar arrNodes = [];\\r\\n\\t        \\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t        \\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t        \\tvar range = selection.getRangeAt(0);\\r\\n\\t        \\tvar arrChild = textArea.childNodes;\\r\\n\\t        \\tvar elementOffset = (range.startOffset < arrChild.length) ? range.startOffset : arrChild.length - 1;\\r\\n\\t        \\tvar start = (range.startContainer == textArea)? arrChild[elementOffset] : range.startContainer;\\r\\n\\t            var end = (range.endContainer == textArea) ? arrChild[range.endOffset - 1] : range.endContainer;\\r\\n\\t            var callback = function(node)\\r\\n\\t            {\\r\\n\\t            \\tif(node && node != textArea && !self.editorUtil.isEmptyTextNode(node) && !self.isSelectionWrapper(node))\\r\\n\\t            \\t{\\r\\n\\t            \\t\\tarrNodes.push(node);\\r\\n                    }\\r\\n                    var retValue =  (node == end || (node && node.contains && node.contains(end)));\\r\\n                    return retValue;\\r\\n\\t            };\\r\\n\\t            this.util.findNode(start,callback,textArea,true,\\\"nextSibling\\\",\\\"\\\");\\r\\n\\t            if (arrNodes.length === 0 && this.editorUtil.isEmptyTextNode(start)) \\r\\n\\t            {\\r\\n\\t            \\tarrNodes.push(start);\\r\\n\\t            }\\r\\n\\t            return arrNodes;\\r\\n\\t        }\\r\\n\\t        return null;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t  //eachSelection\\r\\n\\t    this.loopSelectedNodes = function(callback)\\r\\n\\t    {\\r\\n\\t    \\tif(callback)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tvar arrNodes = this.getSelectedNodes();\\r\\n\\t\\t    \\tif(arrNodes && arrNodes.length)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t\\t    \\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t\\t    \\t\\tvar self = this;\\r\\n\\t\\t    \\t\\tvar callbackNode = function(node)\\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\tif (node != textArea && self.editorUtil.isExistsInsideEditor(node)) \\r\\n\\t\\t    \\t\\t\\t{\\r\\n\\t\\t    \\t\\t\\t\\tif(node.nodeName.match(/^(UL|OL)$/)) \\r\\n\\t\\t    \\t\\t\\t\\t{\\r\\n\\t\\t                        var arrChild = Array.from(node.childNodes);\\r\\n\\t\\t                        if(arrChild && arrChild.length)\\r\\n\\t\\t                        {\\r\\n\\t\\t                        \\tfor(var count = 0;count < arrChild.length;count++)\\r\\n\\t\\t                        \\t{\\r\\n\\t\\t                        \\t\\tcallbackNode(arrChild);\\r\\n\\t\\t                        \\t}\\r\\n\\t\\t                        }\\r\\n\\t\\t                    }\\r\\n\\t\\t    \\t\\t\\t\\telse\\r\\n\\t\\t    \\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\t\\t\\t\\tif(self.util.isElementOfType(node,\\\"li\\\"))\\r\\n\\t\\t    \\t\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\t\\t\\t\\t\\tif (node.firstChild) \\r\\n\\t\\t    \\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t                            node = node.firstChild;\\r\\n\\t\\t\\t                        }\\r\\n\\t\\t\\t                        else \\r\\n\\t\\t\\t                        {\\r\\n\\t\\t\\t                            var tempNode = doc.createTextNode(\\\"\\\\uFEFF\\\");\\r\\n\\t\\t\\t                            node.appendChild(tempNode);\\r\\n\\t\\t\\t                            node = tempNode;\\r\\n\\t\\t\\t                        }\\r\\n\\t\\t    \\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\t\\t\\t\\tcallback(node);\\r\\n\\t\\t    \\t\\t\\t\\t}\\r\\n\\t                    }\\r\\n\\t\\t    \\t\\t};\\r\\n\\t\\t    \\t\\tfor(count = 0;count < arrNodes.length;count++)\\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\tvar node = arrNodes[count];\\r\\n\\t\\t    \\t\\t\\tcallbackNode(node);\\r\\n\\t\\t    \\t\\t}\\r\\n\\t\\t    \\t}\\r\\n\\t    \\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    /*Select.prototype.wrapInTag = function (tagOrCallback) {\\r\\n\\t        var _this = this;\\r\\n\\t        selector_1.$$('*[style*=font-size]', this.area).forEach(function (elm) {\\r\\n\\t            elm.style &&\\r\\n\\t                elm.style.fontSize &&\\r\\n\\t                elm.setAttribute('data-font-size', elm.style.fontSize.toString());\\r\\n\\t        });\\r\\n\\t        this.doc.execCommand('fontsize', false, '7');\\r\\n\\t        selector_1.$$('*[data-font-size]', this.area).forEach(function (elm) {\\r\\n\\t            var fontSize = elm.getAttribute('data-font-size');\\r\\n\\t            if (elm.style && fontSize) {\\r\\n\\t                elm.style.fontSize = fontSize;\\r\\n\\t                elm.removeAttribute('data-font-size');\\r\\n\\t            }\\r\\n\\t        });\\r\\n\\t        var result = [];\\r\\n\\t        selector_1.$$('font[size=\\\"7\\\"]', this.area).forEach(function (font) {\\r\\n\\t            try {\\r\\n\\t                if (checker_1.isFunction(tagOrCallback)) {\\r\\n\\t                    tagOrCallback(font);\\r\\n\\t                }\\r\\n\\t                else {\\r\\n\\t                    result.push(Dom_1.Dom.replace(font, tagOrCallback, _this.jodit.create.inside));\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t            finally {\\r\\n\\t                if (font.parentNode) {\\r\\n\\t                    Dom_1.Dom.unwrap(font);\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t        });\\r\\n\\t        return result;\\r\\n\\t    };\\r\\n\\t    Select.prototype.applyCSS = function (cssRules, nodeName, options) {\\r\\n\\t        var _this = this;\\r\\n\\t        if (nodeName === void 0) { nodeName = 'span'; }\\r\\n\\t        var WRAP = 1, UNWRAP = 0, defaultTag = 'SPAN';\\r\\n\\t        var mode;\\r\\n\\t        var findNextCondition = function (elm) {\\r\\n\\t            return elm !== null &&\\r\\n\\t                !Dom_1.Dom.isEmptyTextNode(elm) &&\\r\\n\\t                !_this.isMarker(elm);\\r\\n\\t        };\\r\\n\\t        var checkCssRulesFor = function (elm) {\\r\\n\\t            return (!Dom_1.Dom.isTag(elm, 'font') &&\\r\\n\\t                Dom_1.Dom.isElement(elm) &&\\r\\n\\t                ((checker_1.isPlainObject(options) &&\\r\\n\\t                    each_1.each(options, function (cssPropertyKey, cssPropertyValues) {\\r\\n\\t                        var value = css_1.css(elm, cssPropertyKey, undefined, true);\\r\\n\\t                        return (value !== null &&\\r\\n\\t                            value !== '' &&\\r\\n\\t                            cssPropertyValues.indexOf(value.toString().toLowerCase()) !== -1);\\r\\n\\t                    })) ||\\r\\n\\t                    (typeof options === 'function' && options(_this.jodit, elm))));\\r\\n\\t        };\\r\\n\\t        var isSuitElement = function (elm) {\\r\\n\\t            if (!elm) {\\r\\n\\t                return false;\\r\\n\\t            }\\r\\n\\t            var reg = RegExp('^' + elm.nodeName + '$', 'i');\\r\\n\\t            return ((reg.test(nodeName) ||\\r\\n\\t                !!(options && checkCssRulesFor(elm))) &&\\r\\n\\t                findNextCondition(elm));\\r\\n\\t        };\\r\\n\\t        var toggleStyles = function (elm) {\\r\\n\\t            if (isSuitElement(elm)) {\\r\\n\\t                if (elm.nodeName === defaultTag && cssRules) {\\r\\n\\t                    Object.keys(cssRules).forEach(function (rule) {\\r\\n\\t                        if (mode === UNWRAP ||\\r\\n\\t                            css_1.css(elm, rule) ===\\r\\n\\t                                normalize_1.normilizeCSSValue(rule, cssRules[rule])) {\\r\\n\\t                            css_1.css(elm, rule, '');\\r\\n\\t                            if (mode === undefined) {\\r\\n\\t                                mode = UNWRAP;\\r\\n\\t                            }\\r\\n\\t                        }\\r\\n\\t                        else {\\r\\n\\t                            css_1.css(elm, rule, cssRules[rule]);\\r\\n\\t                            if (mode === undefined) {\\r\\n\\t                                mode = WRAP;\\r\\n\\t                            }\\r\\n\\t                        }\\r\\n\\t                    });\\r\\n\\t                }\\r\\n\\t                if (!Dom_1.Dom.isBlock(elm, _this.win) &&\\r\\n\\t                    (!elm.getAttribute('style') || elm.nodeName !== defaultTag)) {\\r\\n\\t                    Dom_1.Dom.unwrap(elm);\\r\\n\\t                    if (mode === undefined) {\\r\\n\\t                        mode = UNWRAP;\\r\\n\\t                    }\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t        };\\r\\n\\t        if (this.isCollapsed()) {\\r\\n\\t            var clearStyle = false;\\r\\n\\t            if (this.current() &&\\r\\n\\t                Dom_1.Dom.closest(this.current(), nodeName, this.area)) {\\r\\n\\t                clearStyle = true;\\r\\n\\t                var closest = Dom_1.Dom.closest(this.current(), nodeName, this.area);\\r\\n\\t                if (closest) {\\r\\n\\t                    this.setCursorAfter(closest);\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t            if (nodeName.toUpperCase() === defaultTag || !clearStyle) {\\r\\n\\t                var node = this.jodit.create.inside.element(nodeName);\\r\\n\\t                node.appendChild(this.jodit.create.inside.text(consts.INVISIBLE_SPACE));\\r\\n\\t                this.insertNode(node, false, false);\\r\\n\\t                if (nodeName.toUpperCase() === defaultTag && cssRules) {\\r\\n\\t                    css_1.css(node, cssRules);\\r\\n\\t                }\\r\\n\\t                this.setCursorIn(node);\\r\\n\\t                return;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        var selInfo = this.save();\\r\\n\\t        normalize_1.normalizeNode(this.area.firstChild);\\r\\n\\t        this.wrapInTag(function (font) {\\r\\n\\t            if (!Dom_1.Dom.next(font, findNextCondition, font.parentNode) &&\\r\\n\\t                !Dom_1.Dom.prev(font, findNextCondition, font.parentNode) &&\\r\\n\\t                isSuitElement(font.parentNode) &&\\r\\n\\t                font.parentNode !== _this.area &&\\r\\n\\t                (!Dom_1.Dom.isBlock(font.parentNode, _this.win) ||\\r\\n\\t                    consts.IS_BLOCK.test(nodeName))) {\\r\\n\\t                toggleStyles(font.parentNode);\\r\\n\\t                return;\\r\\n\\t            }\\r\\n\\t            if (font.firstChild &&\\r\\n\\t                !Dom_1.Dom.next(font.firstChild, findNextCondition, font) &&\\r\\n\\t                !Dom_1.Dom.prev(font.firstChild, findNextCondition, font) &&\\r\\n\\t                isSuitElement(font.firstChild)) {\\r\\n\\t                toggleStyles(font.firstChild);\\r\\n\\t                return;\\r\\n\\t            }\\r\\n\\t            if (Dom_1.Dom.closest(font, isSuitElement, _this.area)) {\\r\\n\\t                var leftRange = _this.createRange(), wrapper = Dom_1.Dom.closest(font, isSuitElement, _this.area);\\r\\n\\t                leftRange.setStartBefore(wrapper);\\r\\n\\t                leftRange.setEndBefore(font);\\r\\n\\t                var leftFragment = leftRange.extractContents();\\r\\n\\t                if ((!leftFragment.textContent ||\\r\\n\\t                    !string_1.trim(leftFragment.textContent).length) &&\\r\\n\\t                    leftFragment.firstChild) {\\r\\n\\t                    Dom_1.Dom.unwrap(leftFragment.firstChild);\\r\\n\\t                }\\r\\n\\t                if (wrapper.parentNode) {\\r\\n\\t                    wrapper.parentNode.insertBefore(leftFragment, wrapper);\\r\\n\\t                }\\r\\n\\t                leftRange.setStartAfter(font);\\r\\n\\t                leftRange.setEndAfter(wrapper);\\r\\n\\t                var rightFragment = leftRange.extractContents();\\r\\n\\t                if ((!rightFragment.textContent ||\\r\\n\\t                    !string_1.trim(rightFragment.textContent).length) &&\\r\\n\\t                    rightFragment.firstChild) {\\r\\n\\t                    Dom_1.Dom.unwrap(rightFragment.firstChild);\\r\\n\\t                }\\r\\n\\t                Dom_1.Dom.after(wrapper, rightFragment);\\r\\n\\t                toggleStyles(wrapper);\\r\\n\\t                return;\\r\\n\\t            }\\r\\n\\t            var needUnwrap = [];\\r\\n\\t            var firstElementSuit;\\r\\n\\t            if (font.firstChild) {\\r\\n\\t                Dom_1.Dom.find(font.firstChild, function (elm) {\\r\\n\\t                    if (elm && isSuitElement(elm)) {\\r\\n\\t                        if (firstElementSuit === undefined) {\\r\\n\\t                            firstElementSuit = true;\\r\\n\\t                        }\\r\\n\\t                        needUnwrap.push(elm);\\r\\n\\t                    }\\r\\n\\t                    else {\\r\\n\\t                        if (firstElementSuit === undefined) {\\r\\n\\t                            firstElementSuit = false;\\r\\n\\t                        }\\r\\n\\t                    }\\r\\n\\t                    return false;\\r\\n\\t                }, font, true);\\r\\n\\t            }\\r\\n\\t            needUnwrap.forEach(Dom_1.Dom.unwrap);\\r\\n\\t            if (!firstElementSuit) {\\r\\n\\t                if (mode === undefined) {\\r\\n\\t                    mode = WRAP;\\r\\n\\t                }\\r\\n\\t                if (mode === WRAP) {\\r\\n\\t                    css_1.css(Dom_1.Dom.replace(font, nodeName, _this.jodit.create.inside), cssRules && nodeName.toUpperCase() === defaultTag\\r\\n\\t                        ? cssRules\\r\\n\\t                        : {});\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t        });\\r\\n\\t        this.restore(selInfo);\\r\\n\\t    };\\r\\n\\t    Select.prototype.splitSelection = function (currentBox) {\\r\\n\\t        if (!this.isCollapsed()) {\\r\\n\\t            return null;\\r\\n\\t        }\\r\\n\\t        var leftRange = this.createRange();\\r\\n\\t        var range = this.range;\\r\\n\\t        leftRange.setStartBefore(currentBox);\\r\\n\\t        var cursorOnTheRight = this.cursorOnTheRight(currentBox);\\r\\n\\t        var cursorOnTheLeft = this.cursorOnTheLeft(currentBox);\\r\\n\\t        var br = null;\\r\\n\\t        if (cursorOnTheRight || cursorOnTheLeft) {\\r\\n\\t            br = this.jodit.create.inside.element('br');\\r\\n\\t            range.insertNode(br);\\r\\n\\t            var clearBR = function (start, getNext) {\\r\\n\\t                var next = getNext(start);\\r\\n\\t                while (next) {\\r\\n\\t                    var nextSib = getNext(next);\\r\\n\\t                    if (next &&\\r\\n\\t                        (Dom_1.Dom.isTag(next, 'br') || Dom_1.Dom.isEmptyTextNode(next))) {\\r\\n\\t                        Dom_1.Dom.safeRemove(next);\\r\\n\\t                    }\\r\\n\\t                    else {\\r\\n\\t                        break;\\r\\n\\t                    }\\r\\n\\t                    next = nextSib;\\r\\n\\t                }\\r\\n\\t            };\\r\\n\\t            clearBR(br, function (n) { return n.nextSibling; });\\r\\n\\t            clearBR(br, function (n) { return n.previousSibling; });\\r\\n\\t            if (cursorOnTheRight) {\\r\\n\\t                leftRange.setEndBefore(br);\\r\\n\\t                range.setEndBefore(br);\\r\\n\\t            }\\r\\n\\t            else {\\r\\n\\t                leftRange.setEndAfter(br);\\r\\n\\t                range.setEndAfter(br);\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        else {\\r\\n\\t            leftRange.setEnd(range.startContainer, range.startOffset);\\r\\n\\t        }\\r\\n\\t        var fragment = leftRange.extractContents();\\r\\n\\t        if (currentBox.parentNode) {\\r\\n\\t            try {\\r\\n\\t                currentBox.parentNode.insertBefore(fragment, currentBox);\\r\\n\\t                if (cursorOnTheRight && br && br.parentNode) {\\r\\n\\t                    var range_3 = this.createRange();\\r\\n\\t                    range_3.setStartBefore(br);\\r\\n\\t                    this.selectRange(range_3);\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t            catch (e) {\\r\\n\\t                console.log(e);\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        return currentBox.previousElementSibling;\\r\\n\\t    };*/\\r\\n\\t\\t\\r\\n\\t\\t\\r\\n\\t\\t/*Select.prototype.cursorInTheEdge = function (start, parentBlock) {\\r\\n\\t        var _a;\\r\\n\\t        var end = !start, range = (_a = this.sel) === null || _a === void 0 ? void 0 : _a.getRangeAt(0), current = this.current(false);\\r\\n\\t        if (!range ||\\r\\n\\t            !current ||\\r\\n\\t            !Dom_1.Dom.isOrContains(parentBlock, current, true)) {\\r\\n\\t            return null;\\r\\n\\t        }\\r\\n\\t        var container = start ? range.startContainer : range.endContainer;\\r\\n\\t        var offset = start ? range.startOffset : range.endOffset;\\r\\n\\t        var check = function (elm) {\\r\\n\\t            return elm && !Dom_1.Dom.isTag(elm, 'br') && !Dom_1.Dom.isEmptyTextNode(elm);\\r\\n\\t        };\\r\\n\\t        if (Dom_1.Dom.isText(container)) {\\r\\n\\t            var text = container.nodeValue || '';\\r\\n\\t            if (end && text.replace(constants_1.INVISIBLE_SPACE_REG_EXP_END, '').length > offset) {\\r\\n\\t                return false;\\r\\n\\t            }\\r\\n\\t            var inv = constants_1.INVISIBLE_SPACE_REG_EXP_START.exec(text);\\r\\n\\t            if (start &&\\r\\n\\t                ((inv && inv[0].length < offset) || (!inv && offset > 0))) {\\r\\n\\t                return false;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        else {\\r\\n\\t            var children = Array.from(container.childNodes);\\r\\n\\t            if (end) {\\r\\n\\t                if (children.slice(offset).some(check)) {\\r\\n\\t                    return false;\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t            else {\\r\\n\\t                if (children.slice(0, offset).some(check)) {\\r\\n\\t                    return false;\\r\\n\\t                }\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        var next = start\\r\\n\\t            ? Dom_1.Dom.prev(current, check, parentBlock)\\r\\n\\t            : Dom_1.Dom.next(current, check, parentBlock);\\r\\n\\t        return !next;\\r\\n\\t    };\\r\\n\\t    Select.prototype.cursorOnTheLeft = function (parentBlock) {\\r\\n\\t        return this.cursorInTheEdge(true, parentBlock);\\r\\n\\t    };\\r\\n\\t    Select.prototype.cursorOnTheRight = function (parentBlock) {\\r\\n\\t        return this.cursorInTheEdge(false, parentBlock);\\r\\n\\t    };*/\\r\\n\\t\\t\\r\\n\\t\\t\\r\\n\\t\\tthis.removeMarkers = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\t\\r\\n\\treturn NSSelection;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSSelection\\\",NSSelection); var NSExecCommand = (function()\\r\\n{\\r\\n\\tvar NSExecCommand = function(nsEditor)\\r\\n\\t{\\r\\n    \\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\tthis.editorUtil = nsEditor.editorUtil;\\r\\n\\t\\tthis.selection = nsEditor.__selection;\\r\\n\\t\\tthis.doc = null;\\r\\n\\t\\tthis.win = null;\\r\\n\\t\\tthis.root = null;\\r\\n\\t\\tthis.__addingCSS;\\r\\n\\t\\t\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar browser = null;\\r\\n\\t\\tvar objCommand = {};\\r\\n\\t\\tvar objCommandWithExec = {};\\r\\n\\t\\t\\r\\n\\t\\tthis.initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"textAreaInitialized\\\",function(){\\r\\n\\t\\t\\t\\tself.doc = self.__nsEditor.__getDocument();\\r\\n\\t\\t\\t\\tself.win = self.__nsEditor.__getWindow();\\r\\n\\t\\t\\t\\tself.root = self.__nsEditor.__getTextArea();\\r\\n\\t\\t\\t});\\r\\n\\t\\t\\tvar browser = self.util.getBrowser();\\r\\n\\t\\t\\tobjCommand = {bold:{tag:function(){\\r\\n\\t\\t\\t\\t\\treturn browser.isMSIE ? \\\"strong\\\" : \\\"b\\\";\\r\\n\\t\\t\\t\\t},css: {\\\"font-weight\\\": \\\"bold\\\"}},\\r\\n\\t\\t\\t\\titalic: {tag:function(){\\r\\n\\t\\t\\t\\t\\treturn browser.isMSIE ? \\\"em\\\" : \\\"i\\\";\\r\\n\\t\\t\\t\\t},css: {\\\"font-style\\\": \\\"italic\\\"} },\\r\\n\\t\\t\\t\\tunderline: {tag:\\\"u\\\",css: {\\\"text-decoration\\\": \\\"underline\\\"},override: false},\\r\\n\\t\\t\\t\\tstrikethrough: {tag:\\\"s\\\",css: {\\\"text-decoration\\\": \\\"line-through\\\"},override: false},\\r\\n\\t\\t\\t\\tjustifycenter:{css: {\\\"text-align\\\": \\\"center\\\"}},\\r\\n\\t\\t\\t\\tjustifyleft: {css: {\\\"text-align\\\": \\\"left\\\"}},\\r\\n\\t\\t\\t\\tjustifyright: {css: {\\\"text-align\\\": \\\"right\\\"}},\\r\\n\\t\\t\\t\\tjustifyfull: {css: {\\\"text-align\\\": \\\"justify\\\"}},\\r\\n\\t\\t\\t\\tsubscript: {tag:\\\"sub\\\",css: {\\\"vertical-align\\\": \\\"sub\\\"}},\\r\\n\\t\\t\\t\\tsuperscript: {tag:\\\"sup\\\",css: {\\\"vertical-align\\\": \\\"super\\\"}},\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tundo: {},\\r\\n\\t\\t\\t\\tredo: {},\\r\\n\\t\\t\\t\\toutdent: {css: {\\\"margin-left\\\": \\\"-25\\\"}},\\r\\n\\t\\t\\t\\tindent: {css: {\\\"margin-left\\\": \\\"+25\\\"}},\\r\\n\\t\\t\\t\\tfontname: {css:{\\\"font-family\\\": \\\"##args##\\\"}},\\r\\n\\t\\t\\t\\tfontsize: {\\\"7\\\": {css: {\\\"font-size\\\": \\\"xx-large\\\"}},\\r\\n\\t\\t\\t\\t\\t\\t   \\\"6\\\": {css: {\\\"font-size\\\": \\\"x-large\\\"}},\\r\\n\\t\\t\\t\\t\\t\\t   \\\"5\\\": {css: {\\\"font-size\\\": \\\"large\\\"}},\\r\\n\\t\\t\\t\\t\\t\\t   \\\"4\\\": {css: {\\\"font-size\\\": \\\"medium\\\"}},\\r\\n\\t\\t\\t\\t\\t\\t   \\\"3\\\": {css: {\\\"font-size\\\": \\\"small\\\"}},\\r\\n\\t\\t\\t\\t\\t\\t   \\\"2\\\": {css: {\\\"font-size\\\": \\\"x-small\\\"}},\\r\\n\\t\\t\\t\\t\\t\\t   \\\"1\\\": {css: {\\\"font-size\\\": \\\"xx-small\\\"}}},\\r\\n\\t\\t\\t\\tforecolor: {css:{\\\"color\\\": \\\"##args##\\\"}},\\r\\n\\t\\t\\t\\tbackcolor: {css:{\\\"background-color\\\": \\\"##args##\\\"}},\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tobjCommandWithExec = {\\r\\n\\t\\t\\t\\tinsertorderedlist: {exec: this.handleList.bind(this),type: \\\"ol\\\"},\\r\\n\\t\\t\\t\\tinsertunorderedlist: {exec: this.handleList.bind(this),type: \\\"ul\\\"},\\r\\n\\t\\t\\t};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.execute = function(commandName,showDefaultUI,valueArgument)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = objCommand[commandName.toLowerCase()];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!item.css && valueArgument && item[valueArgument])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = item[valueArgument];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(item.tag || item.css)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar tag = item.tag;\\r\\n\\t\\t\\t\\t\\tif(this.util.isFunction(tag))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\ttag = tag(commandName,item);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(!this.__nsEditor.__config.enableTagsForProps && item.css)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\ttag = null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar css = item.css;\\r\\n\\t\\t\\t\\t\\tif(item.css && valueArgument)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcss = {}\\r\\n\\t\\t\\t\\t\\t\\tfor(var prop in item.css)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar key = this.util.convertCSSPropToJS(prop);\\r\\n\\t\\t\\t\\t\\t\\t\\tvar value = item.css[prop];\\r\\n\\t\\t\\t\\t\\t\\t\\tif(value == \\\"##args##\\\")\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvalue = valueArgument;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tcss[key] = value;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.applyStyle({tag: tag,css: css});\\r\\n\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(objCommandWithExec[commandName.toLowerCase()])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = objCommandWithExec[commandName.toLowerCase()];\\r\\n\\t\\t\\t\\tif(item.exec)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item.exec(item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.applyStyle = function(option)\\r\\n\\t\\t{\\r\\n\\t\\t\\toption.tag = option.tag || \\\"span\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar savedSelection = null;\\r\\n\\t\\t\\tif(this.selection.isCollapsed())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar span = this.util.createElement(\\\"span\\\",null,\\\"nsEditorElement nsEditorSelectedWrapper\\\",this.doc);\\r\\n\\t\\t\\t\\tthis.selection.insertNode(span,false,false);\\r\\n\\t\\t\\t\\tthis.selection.setCursorIn(span);\\r\\n\\t\\t\\t\\tsavedSelection = this.selection.saveSelection(false,true);\\r\\n\\t\\t\\t\\tthis.replaceNode(span,option.tag);\\r\\n\\t\\t\\t\\tthis.editorUtil.removeNode(span);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t/*var origDomSelection = this.selection.getSelection();\\r\\n\\t\\t\\t\\tif(origDomSelection && (origDomSelection.anchorNode == origDomSelection.focusNode))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\toption.selectedNode = origDomSelection.anchorNode;\\r\\n\\t\\t\\t\\t}*/\\r\\n\\t\\t\\t\\tvar origRange = this.selection.getSelection().getRangeAt(0);\\r\\n\\t\\t\\t\\tsavedSelection = this.selection.saveSelection(false,true);\\r\\n\\t\\t\\t\\tthis.editorUtil.mergeTextNodes(this.root.firstChild);\\r\\n\\t\\t\\t\\tthis.insertTagRestoringSize(this.replaceNode.bind(this),option);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.selection.restoreSelection(savedSelection);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//Select.prototype.wrapInTag\\r\\n\\t\\tthis.insertTagRestoringSize = function(tagOrCallback,option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrElement = this.root.querySelectorAll(\\\"*[style*=font-size]\\\");\\r\\n\\t\\t\\tvar arrFontsEle = [];\\r\\n\\t\\t\\tfor(var count = 0;count < arrElement.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar element = arrElement[count];\\r\\n\\t\\t\\t\\tif(element && element.style && element.style.fontSize)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrFontsEle.push({element: element,size: element.style.fontSize.toString()});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar font = this.util.createElement(\\\"font\\\",null,\\\"nsEditorElement nsEditorSelectedWrapper\\\",this.doc);\\r\\n\\t\\t\\tfont.setAttribute(\\\"size\\\",\\\"7\\\");\\r\\n\\t\\t\\tthis.editorUtil.insertNodeWrappingRange(font);\\r\\n\\t\\t\\t//this.doc.execCommand('fontsize', false, '7');\\r\\n\\t\\t\\tfor(var count = 0;count < arrFontsEle.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrFontsEle[count];\\r\\n\\t\\t\\t\\tif(item.element && item.element.style && item.size)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem.element.style.fontSize = item.size;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar result = [];\\r\\n\\t\\t\\tvar arrFonts = this.root.querySelectorAll('font[size=\\\"7\\\"]');\\r\\n\\t\\t\\tfor(var count = 0;count < arrFonts.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar font = arrFonts[count];\\r\\n\\t\\t\\t\\ttry\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (tagOrCallback && this.util.isFunction(tagOrCallback)) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\ttagOrCallback(font,option);\\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\telse if(tagOrCallback)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tresult.push(this.util.replaceElement(font,tagOrCallback,null,null,this.doc));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tfinally\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (font.parentNode) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.util.insertElementParentsParent(font);\\r\\n\\t                }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//applyToElement\\r\\n\\t\\tthis.replaceNode = function(node,option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar defaultTag = \\\"span\\\";\\r\\n\\t\\t\\tif(this.checkSuitableParent(node,option) || this.checkSuitableChild(node,option) || this.checkClosestWrapper(node,option) || this.unwrapChildren(node,option)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (this.__addingCSS == null) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//WRAP\\r\\n\\t\\t\\t\\tthis.__addingCSS = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (this.__addingCSS != true) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar wrapper = node;\\r\\n\\t\\t\\tif (this.editorUtil.isTagBlock(option.tag)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar ulReg = /^(ul|ol|li|td|th|tr|tbody|table)$/i;\\r\\n\\t\\t\\t\\tvar parent = this.util.findParentByCallback(node,function(paramNode){\\r\\n\\t\\t\\t\\t\\t\\tif (paramNode && self.editorUtil.isBlock(paramNode,self.win)) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif (ulReg.test(option.tag) || !ulReg.test(node.nodeName)) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t\\t\\t},this.root);\\r\\n\\t\\t\\t\\tif (parent) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\twrapper = parent;\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\twrapper = this.wrapUnwrappedText(node);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\tvar newWrapper = this.util.replaceElement(wrapper,option.tag,null,null,this.doc);\\r\\n\\t\\t\\tthis.util.addStyleClass(newWrapper,\\\"nsEditorSpan\\\")\\r\\n\\t\\t\\tif(this.editorUtil.isTagBlock(option.tag)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.postProcessListElement(newWrapper,option);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//&& this.__nsEditor.__config[\\\"enterElement\\\"] == option.tag\\r\\n\\t\\t\\tif(option.css && defaultTag == option.tag) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.css(newWrapper,option.css);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.checkSuitableParent = function(node,option) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar parentNode = node.parentNode;\\r\\n\\t\\t\\tvar nextNode = !this.util.findNextNode(node,this.isNormalNode.bind(this,option),parentNode);\\r\\n\\t\\t\\tvar prevNode = !this.util.findPrevNode(node,this.isNormalNode.bind(this,option),parentNode);\\r\\n\\t\\t\\tvar isSuit = this.isSuitableElement(option,parentNode,false);\\r\\n\\t\\t\\tvar isBlock = !this.editorUtil.isBlock(parentNode,this.win);\\r\\n\\t\\t\\tvar isTag = this.editorUtil.isTagBlock(option.tag);\\r\\n\\t\\t\\t//&& !this.util.findNextNode(node,this.isNormalNode.bind(this,option),parentNode)\\r\\n\\t\\t\\t//&& !this.util.findPrevNode(node,this.isNormalNode.bind(this,option),parentNode) \\r\\n\\t\\t\\tif (parentNode  \\r\\n\\t\\t\\t\\t&& this.isSuitableElement(option,parentNode,false) && parentNode != this.root &&\\r\\n\\t\\t\\t\\t(!this.editorUtil.isBlock(parentNode,this.win) || this.editorUtil.isTagBlock(option.tag))) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.toggleStyles(parentNode,option);\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.checkSuitableChild = function(node,option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar firstChild = node.firstChild;\\r\\n\\t\\t\\tif (firstChild && !this.util.findNextNode(firstChild,this.isNormalNode.bind(this,option),node) &&\\r\\n\\t\\t\\t\\t!this.util.findPrevNode(firstChild,this.isNormalNode.bind(this,option),node) &&\\r\\n\\t\\t\\t\\tthis.isSuitableElement(option,firstChild,false)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.toggleStyles(firstChild,option);\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.checkClosestWrapper = function(node,option) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar wrapper = this.editorUtil.getClosestElement(node,this.isSuitableElement.bind(this,option),this.root);\\r\\n\\t\\t\\tif (wrapper) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (this.editorUtil.isTagBlock(option.tag)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.toggleStyles(wrapper,option);\\r\\n\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar leftRange = this.selection.createRange();\\r\\n\\t\\t\\t\\tleftRange.setStartBefore(wrapper);\\r\\n\\t\\t\\t\\tleftRange.setEndBefore(node);\\r\\n\\t\\t\\t\\tvar leftFragment = leftRange.extractContents();\\r\\n\\t\\t\\t\\tif ((!leftFragment.textContent || !this.editorUtil.trim(leftFragment.textContent).length) && leftFragment.firstChild) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.insertElementParentsParent(leftFragment.firstChild);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (wrapper.parentNode) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\twrapper.parentNode.insertBefore(leftFragment,wrapper);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tleftRange.setStartAfter(node);\\r\\n\\t\\t\\t\\tleftRange.setEndAfter(wrapper);\\r\\n\\r\\n\\t\\t\\t\\tvar rightFragment = leftRange.extractContents();\\r\\n\\t\\t\\t\\tif ((!rightFragment.textContent || !this.editorUtil.trim(rightFragment.textContent).length) && rightFragment.firstChild) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.insertElementParentsParent(rightFragment.firstChild);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.util.insertAfterElement(wrapper,rightFragment);\\r\\n\\t\\t\\t\\tthis.toggleStyles(wrapper,option);\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.unwrapChildren = function(node,option)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar needUnwrap = [];\\r\\n\\t\\t\\tvar firstElementSuit;\\r\\n\\t\\t\\tif(node.firstChild) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tthis.util.findNode(node.firstChild,function(paramNode)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(paramNode && self.isSuitableElement(paramNode)) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif (firstElementSuit === undefined) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tfirstElementSuit = true;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tneedUnwrap.push(paramNode);\\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(firstElementSuit === undefined) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tfirstElementSuit = false;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t\\t},node,true);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(var count = 0;count < needUnwrap.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar paramNode = needUnwrap[count];\\r\\n\\t\\t\\t\\tthis.util.insertElementParentsParent(paramNode);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn firstElementSuit;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tthis.toggleStyles = function(node,option) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar css = option.css;\\r\\n\\t\\t\\tvar element = option.tag || \\\"span\\\";\\r\\n\\t\\t\\tvar defaultTag = \\\"span\\\";\\r\\n\\t\\t\\tvar elementIsDefault = (defaultTag == node.nodeName.toLowerCase());\\r\\n\\t\\t\\tif (css && elementIsDefault)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var key in css)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar nodeValue = this.util.getStyleValue(node,key,false,true,this.win);\\r\\n\\t\\t\\t\\t\\tvar valueToBeSet = this.normalizeCssValue(key,css[key]);\\r\\n\\t\\t\\t\\t\\tif(nodeValue && /color/i.test(key) && /^rgb/i.test(nodeValue.toString())) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tnodeValue = this.util.colorToHex(nodeValue.toString()) || nodeValue;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t//console.log(key + \\\",\\\" + nodeValue + \\\",\\\" + valueToBeSet);\\r\\n\\t\\t\\t\\t\\tif (this.__addingCSS == false || (nodeValue == valueToBeSet)) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.util.css(node,key,'');\\r\\n\\t\\t\\t\\t\\t\\tif(this.__addingCSS == undefined) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t//UNWRAP\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__addingCSS = false;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.util.css(node, key, css[key]);\\r\\n\\t\\t\\t\\t\\t\\tif(this.__addingCSS == undefined) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t//WRAP\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__addingCSS = true;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar isBlock = this.editorUtil.isBlock(node,this.root);\\r\\n\\t\\t\\tvar isSuitableInline = !isBlock && (!node.hasAttribute('style') || node.nodeName.toLowerCase() != defaultTag);\\r\\n\\t\\t\\tvar isSuitableBlock = !isSuitableInline && isBlock && node.nodeName.toLowerCase() == element;\\r\\n\\t\\t\\tif (isSuitableInline || isSuitableBlock) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t// toggle `<strong>test</strong>` toWYSIWYG `test`, and\\r\\n\\t\\t\\t\\t// `<span style=\\\"\\\">test</span>` toWYSIWYG `test`\\r\\n\\t\\t\\t\\tthis.util.insertElementParentsParent(node);\\r\\n\\t\\t\\t\\tif(this.__addingCSS == undefined) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__addingCSS = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isSuitableElement = function(option,node,strict)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(node) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstrict = this.util.isUndefinedOrNull(strict) ? true : Boolean.parse(strict);\\r\\n\\t\\t\\t\\tvar element = option.tag || this.__nsEditor.__config[\\\"enterElement\\\"];\\r\\n\\t\\t\\t\\tvar elementIsDefault = (this.__nsEditor.__config[\\\"enterElement\\\"] == option.tag);\\r\\n\\t\\t\\t\\tvar elmHasSameStyle = this.isStyleValueExists(node,option.css);\\r\\n\\t\\t\\t\\tvar elmIsSame = (node.nodeName.toLowerCase() == element);\\r\\n\\r\\n\\t\\t\\t\\treturn (((!elementIsDefault || !strict) && elmIsSame) || (elmHasSameStyle && this.isNormalNode(option,node)));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isStyleValueExists = function(node,objStyle)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar matches = false;\\r\\n\\t\\t\\tif(node && this.util.isElement(node) && !this.util.hasStyleClass(node,\\\"nsEditorSelectedWrapper\\\")) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tmatches = true;\\r\\n\\t\\t\\t\\tvar style = this.win.getComputedStyle(node);\\r\\n\\t\\t\\t\\tfor(var styleProp in objStyle)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(style[styleProp] != objStyle[styleProp])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tmatches = false;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn matches;\\r\\n\\t\\t};\\r\\n\\r\\n\\t\\tthis.isNormalNode = function(option,node) \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (node != null && !this.editorUtil.isEmptyTextNode(node) && !this.selection.isSelectionWrapper(node));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.normalizeCssValue = function(key,value)\\r\\n\\t\\t{\\r\\n\\t\\t\\tswitch (this.util.toKebabCase(key)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase 'font-weight':\\r\\n\\t\\t\\t\\t\\tswitch (value.toString().toLowerCase()) {\\r\\n\\t\\t\\t\\t\\t\\tcase '700':\\r\\n\\t\\t\\t\\t\\t\\tcase 'bold':\\r\\n\\t\\t\\t\\t\\t\\t\\treturn \\\"bold\\\";\\r\\n\\r\\n\\t\\t\\t\\t\\t\\tcase '400':\\r\\n\\t\\t\\t\\t\\t\\tcase 'normal':\\r\\n\\t\\t\\t\\t\\t\\t\\treturn \\\"normal\\\";\\r\\n\\r\\n\\t\\t\\t\\t\\t\\tcase '900':\\r\\n\\t\\t\\t\\t\\t\\tcase 'heavy':\\r\\n\\t\\t\\t\\t\\t\\t\\treturn \\\"heavy\\\";\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\treturn this.util.isNumeric(value) ? Number(value) : value;\\r\\n\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\tif (/color/i.test(key) && /^rgb/i.test(value.toString())) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn this.util.colorToHex(value.toString()) || value;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn value;\\r\\n\\t\\t};\\r\\n\\r\\n\\t\\t\\r\\n\\t\\tthis.postProcessListElement = function(wrapper,option) \\r\\n\\t\\t{\\r\\n\\t        if (/^(OL|UL)$/i.test(option.tag) && wrapper.tagName.toLowerCase() == option.tag.toLowerCase()) \\r\\n\\t        {\\r\\n\\t            var li = this.util.replaceElement(wrapper,\\\"li\\\",null,null,this.doc);\\r\\n\\t            var ul = this.editorUtil.wrapNode(li,option.tag);\\r\\n\\t            if(ul) \\r\\n\\t            {\\r\\n\\t                wrapper = ul;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    /********* List related functions *******************/\\r\\n\\t\\t\\r\\n\\t\\tthis.handleList = function(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar selection = this.selection.getSelection();\\r\\n\\t\\t\\tvar anchorNode = selection.anchorNode;\\r\\n\\t\\t\\tif(anchorNode) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar container = anchorNode.nodeType != Node.TEXT_NODE && anchorNode.nodeType != Node.COMMENT_NODE ? anchorNode : anchorNode.parentElement;\\r\\n\\t\\t\\t\\tvar range = selection.getRangeAt(0);\\r\\n\\t\\t\\t\\t//selected all list\\r\\n\\t\\t\\t\\tif(range.commonAncestorContainer && range.commonAncestorContainer.nodeName.toLowerCase() == item.type) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.removeList(range);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//selected li\\r\\n\\t\\t\\t\\telse if (container.nodeName.toLowerCase() == \\\"li\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.removeListItem(container,range,selection,item.type);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.createList(container,range,selection,item.type);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.createList = function(container,range,selection,type)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar fragment = range.extractContents();\\r\\n\\t\\t\\tvar list = this.doc.createElement(type);\\r\\n\\t\\t\\tlist.setAttribute(\\\"class\\\",\\\"nsExecCommandList\\\");\\r\\n\\t\\t\\tvar li = this.doc.createElement(\\\"li\\\");\\r\\n\\t\\t\\tli.style.cssText = container.style.cssText;\\r\\n\\t\\t\\tli.appendChild(fragment);\\r\\n\\t\\t\\tlist.appendChild(li);\\r\\n\\t\\t\\trange.insertNode(list);\\r\\n\\t\\t\\tselection.selectAllChildren(list);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.removeList = function(range)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar list = range.commonAncestorContainer;\\r\\n\\t\\t\\tif(list.childNodes && list.childNodes.length) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrChildren = list.childNodes;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrChildren.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar child = arrChildren[count];\\r\\n\\t\\t\\t\\t\\tif(child.childNodes && child.childNodes.length > 1 && \\r\\n\\t\\t\\t\\t\\t   child.firstChild.nodeType != Node.TEXT_NODE &&\\r\\n\\t\\t\\t\\t\\t   child.firstChild.nodeType != Node.COMMENT_NODE)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar span = this.doc.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\t\\tspan.setAttribute(\\\"class\\\",\\\"nsExecListCommand\\\");\\r\\n\\t\\t\\t\\t\\t\\tfor(var childCount = 0;childCount < child.childNodes.length;childCount++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tspan.appendChild(child.childNodes[childCount]);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t        list.parentElement.insertBefore(span,list);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t        var text = this.doc.createTextNode(child.textContent);\\r\\n\\t\\t\\t\\t        list.parentElement.insertBefore(text,list);\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tlist.parentElement.removeChild(list);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.removeListItem = function(container,range,selection,type) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.movePreviousListItem(container,type);\\r\\n\\t\\t\\tthis.moveNextListItem(container,type);\\r\\n\\t\\t\\tvar span = this.doc.createElement(\\\"span\\\");\\r\\n\\t\\t\\tspan.setAttribute(\\\"class\\\",\\\"nsExecListCommand\\\");\\r\\n\\t\\t\\tspan.style.cssText = container.style.cssText;\\r\\n\\t\\t\\tvar fragment = range.extractContents();\\r\\n\\t\\t\\tspan.appendChild(fragment);\\r\\n\\t\\t\\tvar dest = container.parentElement.nextElementSibling ? container.parentElement.nextElementSibling : container.parentElement.parentElement.lastChild;\\r\\n\\t\\t\\tcontainer.parentElement.parentElement.insertBefore(span,dest);\\r\\n\\t\\t\\tselection.selectAllChildren(container);\\r\\n\\t\\t\\tvar list = container.parentElement;\\r\\n\\t\\t\\tlist.removeChild(container);\\r\\n\\t\\t\\tif(!list.childNodes || !list.childNodes.length) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    list.parentElement.removeChild(list);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.movePreviousListItem = function(container,type) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif (container.previousElementSibling && container.previousElementSibling.nodeName.toLowerCase() == \\\"li\\\") \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    var list = this.moveListItem(container.previousElementSibling,true,type);\\r\\n\\t\\t\\t    if (list) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tcontainer.parentElement.parentElement.insertBefore(list,container.parentElement);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.moveNextListItem = function(container,type) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif (container.nextElementSibling && container.nextElementSibling.nodeName.toLowerCase() == \\\"li\\\") \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    var list = this.moveListItem(container.nextElementSibling,false,type);\\r\\n\\t\\t\\t    if(list) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tif(container.parentElement.nextSibling)\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tcontainer.parentElement.parentElement.insertBefore(list,container.parentElement.nextSibling);\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    \\telse\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tcontainer.parentElement.parentElement.appendChild(list);\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.moveListItem = function(sibling,isPrevious,type) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!sibling || sibling.nodeName.toLowerCase() != \\\"li\\\") \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    return null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar children = [];\\r\\n\\t\\t\\twhile (sibling && sibling.nodeName.toLowerCase() == \\\"li\\\") \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    children.push(sibling);\\r\\n\\t\\t\\t    sibling = isPrevious ? sibling.previousElementSibling : sibling.nextElementSibling;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (!children || children.length <= 0) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    return null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar list = this.doc.createElement(type);\\r\\n\\t\\t\\tlist.setAttribute(\\\"class\\\",\\\"nsExecCommandList\\\");\\r\\n\\t\\t\\tif(isPrevious) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tchildren.reverse();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(var count = 0;count < children.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlist.appendChild(children[count]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn list;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t/********* end of List related functions *******************/\\r\\n\\t\\t\\r\\n\\t    this.initialize();\\r\\n\\t\\t\\r\\n    };\\r\\n\\t\\r\\n\\treturn NSExecCommand;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSExecCommand\\\",NSExecCommand); var NSStack = (function()\\r\\n{\\r\\n\\tvar NSStack = function(nsEditor)\\r\\n\\t{\\r\\n\\t\\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\tthis.editorUtil = nsEditor.editorUtil;\\r\\n\\t\\t\\r\\n\\t\\tthis.arrCommands = [];\\r\\n        this.index = -1;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.clearRedo = function() \\r\\n\\t\\t{\\r\\n\\t        this.arrCommands.length = this.index + 1;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.clear = function() \\r\\n\\t    {\\r\\n\\t        this.arrCommands.length = 0;\\r\\n\\t        this.index = -1;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.push = function(command) \\r\\n\\t    {\\r\\n\\t        this.clearRedo();\\r\\n\\t        this.arrCommands.push(command);\\r\\n\\t        this.index += 1;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.undo = function() \\r\\n\\t    {\\r\\n\\t        if(this.canUndo()) \\r\\n\\t        {\\r\\n\\t            if (this.arrCommands[this.index]) \\r\\n\\t            {\\r\\n\\t                this.arrCommands[this.index].undo();\\r\\n\\t            }\\r\\n\\t            this.index -= 1;\\r\\n\\t            return true;\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.redo = function() \\r\\n\\t    {\\r\\n\\t        if (this.canRedo()) \\r\\n\\t        {\\r\\n\\t            this.index += 1;\\r\\n\\t            if (this.arrCommands[this.index]) \\r\\n\\t            {\\r\\n\\t                this.arrCommands[this.index].redo();\\r\\n\\t            }\\r\\n\\t            return true;\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.canUndo = function () \\r\\n\\t    {\\r\\n\\t        return this.index >= 0;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.canRedo = function () \\r\\n\\t    {\\r\\n\\t        return this.index < this.arrCommands.length - 1;\\r\\n\\t    };\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\t\\r\\n\\treturn NSStack;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSStack\\\",NSStack); var NSEditorModal = (function()\\r\\n{\\r\\n\\tvar NSEditorModal = function(nsEditor,nsParentPluggin,setting)\\r\\n\\t{\\r\\n\\t\\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.__nsParentPluggin = nsParentPluggin;\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\tthis.editorUtil = nsEditor.editorUtil;\\r\\n\\t\\t\\r\\n\\t\\tthis.__divModalMask = null;\\r\\n\\t\\tthis.__divDragMask = null;\\r\\n\\t\\tthis.__id = null;\\r\\n\\t\\tthis.__compOuterContainer = null;\\r\\n\\t\\tthis.__originalValue = null;\\r\\n\\t\\tthis.__objDrag = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setSetting();\\r\\n\\t\\t\\tthis.__componentsInitialized();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setSetting = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__setting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthrow this.util.throwNSError(\\\"NSEditorModal\\\",\\\"Setting for Pluggin \\\" + this.__nsParentPluggin.name + \\\" is not defined\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar config = this.__setting;\\r\\n\\t\\t\\tif(!config.contentCallback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthrow this.util.throwNSError(\\\"NSEditorModal\\\",\\\"ContentCallback in setting for Pluggin \\\" + this.__nsParentPluggin.name + \\\" is not defined\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcontainer: config[\\\"container\\\"] || this.__nsEditor.__getFixedComp(),\\r\\n\\t\\t\\t\\t\\t\\t\\t\\ttitle: config[\\\"title\\\"] || \\\"\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tenableDraggable: this.util.isUndefinedOrNull(config[\\\"enableDraggable\\\"]) ? true : Boolean.parse(config[\\\"enableDraggable\\\"]),\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tenableReset: this.util.isUndefinedOrNull(config[\\\"enableReset\\\"]) ? true : Boolean.parse(config[\\\"enableReset\\\"]),\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tshowMask: this.util.isUndefinedOrNull(config[\\\"showMask\\\"]) ? true : Boolean.parse(config[\\\"showMask\\\"]),\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcontentCSSClass: config[\\\"contentCSSClass\\\"] || \\\"\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcontentCallback: this.util.getFunction(config[\\\"contentCallback\\\"]),\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tfooterCallback: this.util.getFunction(config[\\\"footerCallback\\\"]),\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcloseCallback: this.util.getFunction(config[\\\"closeCallback\\\"]),\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tisFullScreen: Boolean.parse(config[\\\"isFullScreen\\\"])\\r\\n\\t\\t\\t\\t\\t\\t    };\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__componentsInitialized = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createComponents();\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"resized change changePlace readonly\\\",this.hide.bind(this));\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"destroy\\\",this.destroy.bind(this));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createComponents = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__id = this.__nsEditor.getID() + this.__nsParentPluggin.name + \\\"EditorModal\\\";\\r\\n\\t\\t\\tif(!this.__divModalMask)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__config.container.querySelector(\\\".nsEditorModalMask\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__divModalMask = this.__config.container.querySelector(\\\".nsEditorModalMask\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__divModalMask = this.util.createDiv(this.__id + \\\"ModalMask\\\",\\\"nsEditorModalMask\\\");\\r\\n\\t\\t\\t\\t\\tthis.__config.container.appendChild(this.__divModalMask);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__divModalMask,\\\"click\\\",this.close.bind(this));\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__divModalMask,\\\"mouseDown\\\",this.__maskMouseDownHandler.bind(this));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__divDragMask)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__config.container.querySelector(\\\".nsEditorModalDragMask\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__divDragMask = this.__config.container.querySelector(\\\".nsEditorModalDragMask\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__divDragMask = this.util.createDiv(this.__id + \\\"DragMask\\\",\\\"nsEditorModalDragMask\\\");\\r\\n\\t\\t\\t\\t\\tthis.__config.container.appendChild(this.__divDragMask);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__divDragMask,\\\"mouseDown\\\",this.__maskMouseDownHandler.bind(this));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.destroy();\\r\\n\\t\\t\\tthis.__compOuterContainer = this.__getContainer();\\r\\n\\t\\t\\tthis.__config.container.appendChild(this.__compOuterContainer);\\r\\n\\t\\t\\tthis.__hide();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.toggle = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.isHidden() ? this.show() : this.hide();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.show = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tif (this.__config.enableReset) \\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tthis.reset();\\r\\n\\t\\t    }\\r\\n\\t\\t    this.showAtCenter();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.hide = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (!this.isHidden()) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__hide();\\r\\n\\t\\t\\t\\tthis.__nsEditor.__dispatchInternalEvent(\\\"modalhide\\\",{modal:this});\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.showAtCenter = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar doc = this.__nsEditor.__dom.doc;\\r\\n\\t\\t\\tvar html = doc.documentElement || doc.body;\\r\\n\\t\\t\\tvar body = doc.body;\\r\\n\\t\\t\\tvar htmlRect = html.getBoundingClientRect();\\r\\n\\t\\t\\tif (this.__config.isFullScreen) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar modalContent = this.__compOuterContainer.querySelector(\\\".nsEditorModalContentContainer\\\");\\r\\n\\t\\t        this.__compOuterContainer.style.display = \\\"block\\\";\\r\\n\\r\\n\\t\\t        var rectContainer = this.__compOuterContainer.getBoundingClientRect();\\r\\n\\t\\t        var rectContent = modalContent.getBoundingClientRect();\\r\\n\\t\\t        this.__compOuterContainer.style.left = \\\"-100000px\\\";\\r\\n\\r\\n\\t\\t        var contentWidth = htmlRect.width - rectContainer.width + rectContent.width;\\r\\n\\t\\t        var contentHeight = htmlRect.height - rectContainer.height + rectContent.height;\\r\\n\\t\\t        this.util.css(modalContent,{width: contentWidth,height: contentHeight});\\r\\n\\t\\t        this.util.css(this.__compOuterContainer,{width: htmlRect.width,height: htmlRect.height,left: 0});\\r\\n\\t\\t        \\r\\n\\t\\t        this.__originalValue = {\\r\\n\\t\\t          html: {\\r\\n\\t\\t            overflowX: html.style.overflowX,\\r\\n\\t\\t            overflowY: html.style.overflowY\\r\\n\\t\\t          },\\r\\n\\t\\t          body: {\\r\\n\\t\\t            overflowX: body.style.overflowX,\\r\\n\\t\\t            overflowY: body.style.overflowY\\r\\n\\t\\t          }\\r\\n\\t\\t        };\\r\\n\\t\\t        var styleOverflow = {overflowX: \\\"hidden\\\",overflowY: \\\"hidden\\\"};\\r\\n\\t\\t        this.util.css(doc.documentElement,styleOverflow);\\r\\n\\t\\t        this.util.css(body,styleOverflow);\\r\\n\\t\\t    } \\r\\n\\t\\t\\telse \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t this.__compOuterContainer.style.display = \\\"\\\";\\r\\n\\t\\t\\t     var popSize = this.__fitSize();\\r\\n\\t\\t\\t     var titleBar = this.__compOuterContainer.querySelector(\\\".nsEditorModalTitlebar\\\");\\r\\n\\t\\t\\t     var titleHeight = titleBar.offsetHeight | 0;\\r\\n\\t\\t\\t     var left = htmlRect.width / 2 - popSize.width / 2;\\r\\n\\t\\t\\t     var top = htmlRect.height / 2 - (popSize.height - titleHeight) / 2 - titleHeight;\\r\\n\\t\\t\\t     this.__safeSetOffset({left: Math.max(left | 0, 0),top: Math.max(top | 0, 0)});\\r\\n\\t\\t\\t     this.util.addStyleClass(this.__compOuterContainer,\\\"nsEditorModalCentered\\\");\\r\\n\\t\\t    }\\r\\n\\t\\t\\tthis.__show();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.reset = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.isDestroyed())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar divContent = this.__compOuterContainer.querySelector(\\\".nsEditorModalContent\\\");\\r\\n\\t\\t\\t\\tvar htmlContent = this.__config.contentCallback(this,this.__nsParentPluggin);\\r\\n\\t\\t\\t\\tdivContent.innerHTML = htmlContent;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.close = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tif (this.__config.isFullScreen && this.__originalValue) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar doc = this.__nsEditor.__dom.doc;\\r\\n\\t\\t\\t\\tvar body = doc.body;\\r\\n\\t\\t\\t\\tvar docElement = doc.documentElement;\\r\\n\\t\\t\\t\\tthis.util.css(docElement,this.__originalValue.html);\\r\\n\\t\\t        this.util.css(body,this.__originalValue.body);\\r\\n\\t\\t        this.__originalValue = null;\\r\\n\\t\\t    }\\r\\n\\t\\t\\tthis.hide();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isHidden = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.isDestroyed())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn (this.__compOuterContainer.style.display == \\\"none\\\")\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isDestroyed = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__compOuterContainer && this.__compOuterContainer.parentElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.destroy = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__compOuterContainer && this.__compOuterContainer.parentElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__compOuterContainer.parentElement.removeChild(this.__compOuterContainer);\\r\\n\\t\\t\\t\\tthis.__compOuterContainer = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__show = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t//if (this.isHidden()) \\r\\n\\t\\t\\t//{\\r\\n\\t\\t\\t\\tvar container = this.__compOuterContainer;\\r\\n\\t\\t\\t\\tcontainer.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\tvar maxZIndex = this.util.getMaxZIndex();\\r\\n\\t\\t\\t\\tvar zIndex = maxZIndex + 10;\\r\\n\\t\\t\\t\\tcontainer.style.zIndex = zIndex;\\r\\n\\t\\t\\t\\tthis.__nsEditor.__getFixedComp().style.zIndex = zIndex - 4;\\r\\n\\t\\t\\t\\tthis.__showModalMask(zIndex - 2);\\r\\n\\t\\t    //}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__hide = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar container = this.__compOuterContainer;\\r\\n\\t\\t\\tvar style = {display: \\\"none\\\",zIndex: \\\"\\\",width: \\\"\\\",height: \\\"\\\"};\\r\\n\\t        this.util.css(container,style);\\r\\n\\t        this.__hideModalMask();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__fitSize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar modalBody = this.__compOuterContainer.querySelector(\\\".nsEditorModalBody\\\");\\r\\n\\t\\t\\tvar modalContent = this.__compOuterContainer.querySelector(\\\".nsEditorModalContentContainer\\\");\\r\\n\\t\\t\\t//var rectModalContent = modalContent.getBoundingClientRect();\\r\\n\\t\\t\\tvar rectModalBody = modalBody.getBoundingClientRect();\\r\\n\\t\\t\\tmodalBody.style.width = rectModalBody.width + \\\"px\\\";\\r\\n\\t\\t\\tmodalBody.style.height = rectModalBody.height + \\\"px\\\";\\r\\n\\t\\t\\treturn rectModalBody;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__safeSetOffset = function(offset) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar doc = this.__nsEditor.__dom.doc;\\r\\n\\t\\t\\tvar html = doc.documentElement || doc.body;\\r\\n\\t\\t\\tvar htmlRect = html.getBoundingClientRect();\\r\\n\\t\\t    var rect = this.__compOuterContainer.getBoundingClientRect();\\r\\n\\t\\t    var left = offset.left;\\r\\n\\t\\t    if (left + rect.width > htmlRect.right) \\r\\n\\t\\t    {\\r\\n\\t\\t        left = htmlRect.right - rect.width;\\r\\n\\t\\t    }\\r\\n\\t\\t    var top = offset.top;\\r\\n\\t\\t    if (top + rect.height > htmlRect.bottom) \\r\\n\\t\\t    {\\r\\n\\t\\t        top = htmlRect.bottom - rect.height;\\r\\n\\t\\t    }\\r\\n\\t\\t    this.util.css(this.__compOuterContainer,{left: Math.max(left, 0),top: Math.max(top, 0)});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__showModalMask = function(zIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.showMask)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__setModalMask();\\r\\n\\t\\t\\t\\tvar style = {display: \\\"\\\",zIndex: zIndex};\\r\\n\\t\\t        this.util.css(this.__divModalMask,style);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__hideModalMask = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar style = {display: \\\"none\\\",zIndex: \\\"\\\",width:\\\"\\\",height:\\\"\\\"};\\r\\n\\t        this.util.css(this.__divModalMask,style);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setModalMask = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar doc = this.__nsEditor.__dom.doc;\\r\\n\\t\\t\\tvar html = doc.documentElement || doc.body;\\r\\n\\t\\t\\tvar htmlRect = html.getBoundingClientRect();\\r\\n\\t\\t\\tvar style = {width: htmlRect.width,height: htmlRect.height};\\r\\n\\t        this.util.css(this.__divModalMask,style);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__maskMouseDownHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__titleBarMouseDownHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.enableDraggable)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\tvar win = this.__nsEditor.__dom.window;\\r\\n\\t\\t\\t\\tvar doc = this.__nsEditor.__dom.doc;\\r\\n\\t\\t\\t\\tvar html = doc.documentElement || doc.body;\\r\\n\\t\\t\\t\\tvar htmlRect = html.getBoundingClientRect();\\r\\n\\t\\t\\t\\tthis.__objDrag = {dragging:true,startX: event.clientX,startY: event.clientY,dragging:this.__dragging.bind(this),dragEnd:this.__dragEnd.bind(this)};\\r\\n\\t\\t\\t\\tthis.util.addEvent(doc,\\\"mousemove\\\",this.__objDrag.dragging);\\r\\n\\t\\t\\t\\tthis.util.addEvent(doc,\\\"mouseup\\\",this.__objDrag.dragEnd);\\r\\n\\t\\t\\t\\tthis.util.addEvent(win,\\\"mouseup\\\",this.__objDrag.dragEnd);\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t\\tthis.__dragStart(event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dragStart = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objDrag.rect = this.__compOuterContainer.getBoundingClientRect();\\r\\n\\t\\t\\tvar contentMask = this.__compOuterContainer.querySelector(\\\".nsEditorModalContentMask\\\");\\r\\n\\t\\t\\tcontentMask.style.visibility = \\\"visible\\\";\\r\\n\\t\\t\\tvar zIndex = this.__compOuterContainer.style.zIndex;\\r\\n\\t\\t\\tthis.__showModalMask(zIndex - 1);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dragging = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__objDrag && this.__objDrag.dragging)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\tvar x = event.clientX - this.__objDrag.startX;\\r\\n\\t\\t        var y = event.clientY - this.__objDrag.startY;\\r\\n\\t\\t        var offset = {};\\r\\n\\t\\t        offset.left = this.__objDrag.rect.left + x;\\r\\n\\t\\t        offset.top = this.__objDrag.rect.top + y;\\r\\n\\t            this.__safeSetOffset(offset);\\r\\n\\t\\t        event.stopPropagation();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dragEnd = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__objDrag)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar win = this.__nsEditor.__dom.window;\\r\\n\\t\\t\\t\\tvar doc = this.__nsEditor.__dom.doc;\\r\\n\\t\\t\\t\\tthis.util.removeEvent(doc,\\\"mousemove\\\",this.__objDrag.dragging);\\r\\n\\t\\t\\t\\tthis.util.removeEvent(doc,\\\"mouseup\\\",this.__objDrag.dragEnd);\\r\\n\\t\\t\\t\\tthis.util.removeEvent(win,\\\"mouseup\\\",this.__objDrag.dragEnd);\\r\\n\\t\\t\\t\\tif(this.__objDrag.dragging)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar contentMask = this.__compOuterContainer.querySelector(\\\".nsEditorModalContentMask\\\");\\r\\n\\t\\t\\t\\t\\tcontentMask.style.visibility = \\\"hidden\\\";\\r\\n\\t\\t\\t\\t\\tthis.util.removeStyleClass(this.__compOuterContainer,\\\"nsEditorModalCentered\\\");\\r\\n\\t\\t\\t\\t\\t//this.__hideModalMask();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__objDrag = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getContainer = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar htmlContent = this.__config.contentCallback(this,this.__nsParentPluggin);\\r\\n\\t\\t\\tvar htmlFooter = this.__config.footerCallback ? this.__config.footerCallback(this,this.__nsParentPluggin) : \\\"\\\";\\r\\n\\t\\t\\tvar modalContainerClass = this.__config.isFullScreen ? \\\"nsEditorModalContainerFullScreen\\\" : \\\"nsEditorModal nsEditorFor##name##\\\";\\r\\n\\t\\t\\tvar html = \\\"<div id=\\\\\\\"##id##ModalOuterContainer\\\\\\\" class=\\\\\\\"nsEditorModal nsEditorFor##name##\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t<div id=\\\\\\\"##id##ModalContainer\\\\\\\" class=\\\\\\\"\\\" + modalContainerClass + \\\" nsEditorModalContainer\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t<div id=\\\\\\\"##id##ModalBody\\\\\\\" class=\\\\\\\"nsEditorModalBody\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t<div class=\\\\\\\"nsEditorModalShadow\\\\\\\"></div>\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t<div id=\\\\\\\"##id##ModalTitlebar\\\\\\\" class=\\\\\\\"nsEditorModalTitlebar\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<div class=\\\\\\\"nsEditorModalDragHandle\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<span class=\\\\\\\"nsEditorModalCaption\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\" + this.__config.title + \\\" \\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</span>\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</div>\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<div id=\\\\\\\"##id##ModalCloseButtonContainer\\\\\\\" class=\\\\\\\"nsEditorModalCloseButtonContainer\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<button type=\\\\\\\"button\\\\\\\" data-command=\\\\\\\"close\\\\\\\" class=\\\\\\\"nsEditorModalButton nsEditorModalCloseButton\\\\\\\" aria-label=\\\\\\\"Close\\\\\\\" title=\\\\\\\"Close\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<svg xmlns=\\\\\\\"http://www.w3.org/2000/svg\\\\\\\" viewBox=\\\\\\\"0 0 15.74 15.74\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<g>\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<path d=\\\\\\\"M14.15,11.63l5.61,5.61a1.29,1.29,0,0,1,.38.93,1.27,1.27,0,0,1-.4.93,1.25,1.25,0,0,1-.92.4,1.31,1.31,0,0,1-.94-.4l-5.61-5.61L6.67,19.1a1.31,1.31,0,0,1-.94.4,1.24,1.24,0,0,1-.92-.4,1.27,1.27,0,0,1-.4-.93,1.33,1.33,0,0,1,.38-.93l5.61-5.63L4.79,6a1.26,1.26,0,0,1-.38-.93,1.22,1.22,0,0,1,.4-.92,1.28,1.28,0,0,1,.92-.39,1.38,1.38,0,0,1,.94.38l5.61,5.61,5.61-5.61a1.33,1.33,0,0,1,.94-.38,1.26,1.26,0,0,1,.92.39,1.24,1.24,0,0,1,.4.92,1.29,1.29,0,0,1-.39.93L17,8.81l-2.8,2.82Z\\\\\\\" transform=\\\\\\\"translate(-4.41 -3.76)\\\\\\\"/>\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</g>\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</svg>\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</button>\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</div>\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t</div>\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t<div id=\\\\\\\"##id##ContentContainer\\\\\\\" class=\\\\\\\"nsEditorModalContentContainer \\\" + this.__config.contentCSSClass + \\\"\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<span id=\\\\\\\"##id##ContentMask\\\\\\\" class=\\\\\\\"nsEditorModalContentMask\\\\\\\"></span>\\\\r\\\\n\\\" +\\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<div id=\\\\\\\"##id##Content\\\\\\\" class=\\\\\\\"nsEditorModalContent\\\\\\\">\\\\r\\\\n\\\" +\\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</div>\\\\r\\\\n\\\" +\\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t</div>\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t\\t \\\" + (htmlFooter ? \\\"<div class=\\\\\\\"nsEditorModalFooter\\\\\\\"></div>\\\" : \\\"\\\")  + \\\" \\\\r\\\\n\\\" +\\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\t</div>\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t</div>\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t</div>\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\thtml = html.replaceAll(\\\"##id##\\\",this.__id); \\r\\n\\t\\t\\thtml = html.replaceAll(\\\"##name##\\\",this.__nsParentPluggin.name);\\r\\n\\t\\t\\tvar compOuterContainer = this.util.getElementFromHtml(html);\\r\\n\\t\\t\\tvar compContent = compOuterContainer.querySelector(\\\".nsEditorModalContent\\\");\\r\\n\\t\\t\\tthis.__addCompInParent(compContent,htmlContent)\\r\\n\\t\\t\\tvar compFooter = compOuterContainer.querySelector(\\\".nsEditorModalFooter\\\");\\r\\n\\t\\t\\tif(compFooter)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__addCompInParent(compFooter,htmlFooter)\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar btnClose = compOuterContainer.querySelector(\\\".nsEditorModalCloseButton\\\");\\r\\n\\t\\t\\tthis.util.addEvent(btnClose,\\\"click\\\",this.close.bind(this));\\r\\n\\t\\t\\tvar compDragHandle = compOuterContainer.querySelector(\\\".nsEditorModalDragHandle\\\");\\r\\n\\t\\t\\tthis.util.addEvent(compDragHandle,\\\"mousedown\\\",this.__titleBarMouseDownHandler.bind(this));\\r\\n\\t\\t\\treturn compOuterContainer;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__addCompInParent = function(parent,content)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isString(content))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparent.innerHTML = content;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparent.appendChild(content);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.registerUtil(\\\"modal\\\",NSEditorModal);\\r\\n\\t\\r\\n\\treturn NSEditorModal;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSEditorModal\\\",NSEditorModal); var NSEditorInlinePopup = (function()\\r\\n{\\r\\n\\tvar NSEditorInlinePopup = function(nsEditor,nsParentPluggin,setting)\\r\\n\\t{\\r\\n\\t\\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.__nsParentPluggin = nsParentPluggin;\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\tthis.editorUtil = nsEditor.editorUtil;\\r\\n\\t\\t\\r\\n\\t\\tthis.__divModalMask = null;\\r\\n\\t\\tthis.__divDragMask = null;\\r\\n\\t\\tthis.__id = null;\\r\\n\\t\\tthis.__compOuterContainer = null;\\r\\n\\t\\tthis.__originalValue = null;\\r\\n\\t\\tthis.__objDrag = null;\\r\\n\\t\\tthis.__docClickRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setSetting();\\r\\n\\t\\t\\tthis.__componentsInitialized();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setSetting = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__setting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthrow this.util.throwNSError(\\\"NSEditorInlinePopup\\\",\\\"Setting for Pluggin \\\" + this.__nsParentPluggin.name + \\\" is not defined\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar config = this.__setting;\\r\\n\\t\\t\\tif(!config.contentCallback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthrow this.util.throwNSError(\\\"NSEditorInlinePopup\\\",\\\"ContentCallback in setting for Pluggin \\\" + this.__nsParentPluggin.name + \\\" is not defined\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcontainer: config[\\\"container\\\"] || this.__nsEditor.__getFixedComp(),\\r\\n\\t\\t\\t\\t\\t\\t\\t\\ttitle: config[\\\"title\\\"] || \\\"\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tenableArrow: this.util.isUndefinedOrNull(config[\\\"enableArrow\\\"]) ? true : Boolean.parse(config[\\\"enableArrow\\\"]),\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcontentCallback: this.util.getFunction(config[\\\"contentCallback\\\"])\\r\\n\\t\\t\\t\\t\\t\\t    };\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__componentsInitialized = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createComponents();\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"resized change changePlace readonly\\\",this.hide.bind(this));\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"destroy\\\",this.destroy.bind(this));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createComponents = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__id = this.__nsEditor.getID() + (this.__nsParentPluggin.name ? this.__nsParentPluggin.name : \\\"\\\") + \\\"EditorModal\\\";\\r\\n\\t\\t\\tthis.destroy();\\r\\n\\t\\t\\tthis.__compOuterContainer = this.__getContainer();\\r\\n\\t\\t\\tthis.__config.container.appendChild(this.__compOuterContainer);\\r\\n\\t\\t\\tvar compArrow = this.__compOuterContainer.querySelector(\\\".nsEditorInlinePopupArrowUp\\\");\\r\\n\\t\\t\\t//11 --> border of arrow\\r\\n\\t\\t\\tcompArrow.style.marginLeft = ((this.__compOuterContainer.offsetWidth / 2) - 11) + \\\"px\\\";\\r\\n\\t\\t\\tthis.__hide();\\r\\n\\t\\t\\tthis.util.addEvent(this.__compOuterContainer,\\\"blur\\\",this.__containerBlurHandler.bind(this),true);\\r\\n\\t\\t\\tthis.util.addEvent(this.__compOuterContainer,\\\"click\\\",this.editorUtil.stopEvent.bind(this.editorUtil));\\r\\n\\t\\t};\\r\\n\\t\\t\\t\\t\\r\\n\\t\\tthis.show = function(element,event,offset,direction) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__showAtElement(element,event,offset,direction);\\r\\n\\t\\t\\tthis.__nsEditor.__dispatchInternalEvent(\\\"inlinePopupShow\\\",{inlinePopup:this});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.hide = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (!this.isHidden()) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__hide();\\r\\n\\t\\t\\t\\tthis.__nsEditor.__dispatchInternalEvent(\\\"inlinePopupHide\\\",{inlinePopup:this});\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\t\\t\\t\\r\\n\\t\\tthis.isHidden = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.isDestroyed())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn this.util.hasStyleClass(this.__compOuterContainer,\\\"nsEditorInlinePopupHide\\\")\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isDestroyed = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__compOuterContainer && this.__compOuterContainer.parentElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getHorizontalSeparator = function(id)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar div = this.util.createDiv(id,\\\"nsEditorInlinePopupHorizontalSeparator\\\");\\r\\n\\t\\t\\treturn div;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getMenuItem = function(id,cssClass,content,toolTipContent,subMenu,handler)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar button = this.__createButton(id,cssClass,content,toolTipContent);\\r\\n\\t\\t\\tif(subMenu && subMenu.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(button,\\\"nsEditorInlinePopupButtonDropdown\\\");\\r\\n\\t\\t\\t\\tvar divContainer = this.util.createDiv(null,\\\"nsEditorInlinePopupButtonDropdownContainer\\\");\\r\\n\\t\\t\\t\\tdivContainer.appendChild(button);\\r\\n\\t\\t\\t\\tvar divDropdownCon = this.util.createDiv(null,\\\"nsEditorInlinePopupDropdownContainer\\\");\\r\\n\\t\\t\\t\\tvar compDropdown = this.util.createElement(\\\"ul\\\",null,\\\"nsEditorInlinePopupButtonDropdown\\\");\\r\\n\\t\\t\\t\\tfor(var count = 0;count < subMenu.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar li = subMenu[count];\\r\\n\\t\\t\\t\\t\\tcompDropdown.appendChild(li);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tdivDropdownCon.appendChild(compDropdown);\\r\\n\\t\\t\\t\\tdivContainer.appendChild(divDropdownCon);\\r\\n\\t\\t\\t\\tthis.util.addEvent(button,\\\"click\\\",this.__btnHandlerWithSubMenu.bind(this,button,divContainer,divDropdownCon,handler));\\r\\n\\t\\t\\t\\treturn divContainer;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addEvent(button,\\\"click\\\",this.__btnHandler.bind(this,button,handler));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn button;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getSubMenuItem = function(id,cssClass,content,toolTipContent,handler)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar li = this.util.createElement(\\\"li\\\",id,\\\"nsEditorInlinePopupButtonDropdownItem\\\");\\r\\n\\t\\t\\tif(cssClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(li,cssClass);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar anchor = this.util.createElement(\\\"a\\\",null,\\\"nsEditorInlinePopupButtonDropdownItemContent\\\");\\r\\n\\t\\t\\tthis.__setAttribute(anchor,{tabindex: \\\"-1\\\", role: \\\"option\\\"});\\r\\n\\t\\t\\tif(content)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__addCompInParent(anchor,content)\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(toolTipContent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar toolTip = this.__createTooltip(toolTipContent);\\r\\n\\t\\t\\t\\t//anchor.appendChild(toolTip);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tli.appendChild(anchor);\\r\\n\\t\\t\\tthis.util.addEvent(li,\\\"click\\\",this.__btnSubMenuHandler.bind(this,li,handler));\\r\\n\\t\\t\\treturn li;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.destroy = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__compOuterContainer && this.__compOuterContainer.parentElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__compOuterContainer.parentElement.removeChild(this.__compOuterContainer);\\r\\n\\t\\t\\t\\tthis.__compOuterContainer = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createButton = function(id,cssClass,content,toolTipContent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar button = this.util.createElement(\\\"button\\\",id,\\\"nsEditorInlinePopupButton\\\");\\r\\n\\t\\t\\tvar objAttribute = {type: \\\"button\\\",tabindex: \\\"-1\\\",role:\\\"button\\\",\\\"data-title\\\": (toolTip ? toolTip : \\\"\\\")};\\r\\n\\t\\t\\tthis.__setAttribute(button,objAttribute);\\r\\n\\t\\t\\tif(cssClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(button,cssClass);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(content)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__addCompInParent(button,content)\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(toolTipContent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar toolTip = this.__createTooltip(toolTipContent);\\r\\n\\t\\t\\t\\tbutton.appendChild(toolTip);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn button;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createTooltip = function(toolTipContent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar toolTip = this.util.createElement(\\\"span\\\",null,\\\"nsEditorInlinePopupButtonTooltip\\\");\\r\\n\\t\\t\\tvar toolTipText = this.util.createElement(\\\"span\\\",null,\\\"nsEditorInlinePopupButtonTooltipText\\\");\\r\\n\\t\\t\\ttoolTipText.innerHTML = toolTipContent;\\r\\n\\t\\t\\ttoolTip.appendChild(toolTipText);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn toolTip;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__btnHandler = function(button,handler,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tthis.__commonBtnHandler(button,event);\\r\\n\\t\\t\\thandler && handler(event,button);\\r\\n\\t\\t\\tthis.hide();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__btnHandlerWithSubMenu = function(button,container,dropdownContainer,handler,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.__commonBtnHandler(button,event,function(btn){\\r\\n\\t\\t\\t\\tif(btn != button)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t//var con = btn.parentElement;\\r\\n\\t\\t\\t\\t\\tself.util.removeStyleClass(btn,\\\"nsEditorInlinePopupButtonOpen\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t});\\r\\n\\t\\t\\tvar isDropdownOpen = this.util.hasStyleClass(dropdownContainer,\\\"nsEditorInlinePopupDropdownContainerVisible\\\");\\r\\n\\t\\t\\tif(isDropdownOpen)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(button,\\\"nsEditorInlinePopupButtonOpen\\\");\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(dropdownContainer,\\\"nsEditorInlinePopupDropdownContainerVisible\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__resetMenuButtons(true);\\r\\n\\t\\t\\t\\tthis.__resetSubMenuButtons();\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(button,\\\"nsEditorInlinePopupButtonOpen\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(dropdownContainer,\\\"nsEditorInlinePopupDropdownContainerVisible\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\thandler && handler(event,button);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__btnSubMenuHandler = function(button,handler,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tthis.__commonBtnHandler(button,event);\\r\\n\\t\\t\\tthis.hide();\\r\\n\\t\\t\\thandler && handler(event,button);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__commonBtnHandler = function(button,event,callback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrButton = this.__compOuterContainer.querySelectorAll(\\\".nsEditorInlinePopupButton\\\");\\r\\n\\t\\t\\tfor(var count = 0;count < arrButton.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(arrButton[count],\\\"nsEditorInlinePopupButtonActive\\\");\\r\\n\\t\\t\\t\\tcallback && callback(arrButton[count]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.addStyleClass(button,\\\"nsEditorInlinePopupButtonActive\\\");\\r\\n\\t\\t\\tthis.editorUtil.stopEvent(event);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__containerBlurHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar target = event.target;\\r\\n\\t\\t\\tif(!this.__compOuterContainer.contains(target))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.editorUtil.stopEvent();\\r\\n\\t\\t\\t\\tthis.hide();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setAttribute = function(element,item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var key in item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\telement.setAttribute(key,item[key].toString());\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getContainer = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar html = \\\"<div id=\\\\\\\"##id##InlinePopUpOuterContainer\\\\\\\" class=\\\\\\\"nsEditorInlinePopup nsEditorInlinePopupFor##name##\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t\\\" + (this.__config.enableArrow ? \\\"<div id=\\\\\\\"##id##InlinePopUpArrow\\\\\\\" class=\\\\\\\"nsEditorInlinePopupArrow nsEditorInlinePopupArrowUp\\\\\\\"></div>\\\" : \\\"\\\") + \\\"\\\\r\\\\n\\\" +\\r\\n\\\"\\t\\t\\t\\t\\t\\t\\t<div id=\\\\\\\"##id##InlinePopUpContentContainer\\\\\\\" class=\\\\\\\"nsEditorInlinePopupContentContainer\\\\\\\"></div> \\\\r\\\\n\\\" +\\r\\n\\\"\\t\\t\\t\\t\\t\\t</div>\\\";\\r\\n\\t\\t\\thtml = html.replaceAll(\\\"##id##\\\",this.__id);\\r\\n\\t\\t\\thtml = html.replaceAll(\\\"##name##\\\",(this.__nsParentPluggin.name ? this.__nsParentPluggin.name : \\\"\\\"));\\r\\n\\t\\t\\tvar compOuterContainer = this.util.getElementFromHtml(html);\\r\\n\\t\\t\\tcompOuterContainer.setAttribute(\\\"tabindex\\\",\\\"-1\\\");\\r\\n\\t\\t\\tvar compContent = compOuterContainer.querySelector(\\\".nsEditorInlinePopupContentContainer\\\");\\r\\n\\t\\t\\tvar content = this.__config.contentCallback(compContent,this,this.__nsParentPluggin);\\r\\n\\t\\t\\tthis.__addCompInParent(compContent,content);\\r\\n\\t\\t\\treturn compOuterContainer;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__addCompInParent = function(parent,content)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(content)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isString(content))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tparent.innerHTML = content;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tparent.appendChild(content);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__hide = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (!this.isHidden()) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__docClickRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(this.__nsEditor.__dom.doc,\\\"click\\\",this.__docClickRef);\\r\\n\\t\\t\\t\\t\\tthis.__docClickRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__resetMenuButtons();\\r\\n\\t\\t\\t\\tthis.__resetSubMenuButtons();\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__compOuterContainer,\\\"nsEditorInlinePopupHide\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__showAtElement = function(element,event,offset,direction) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__compOuterContainer,\\\"nsEditorInlinePopupHide\\\");\\r\\n\\t\\t\\tvar win = this.__nsEditor.__dom.win;\\r\\n\\t\\t\\tvar doc = this.__nsEditor.__dom.doc;\\r\\n\\t\\t\\tvar compTextArea = this.__nsEditor.__compTextArea;\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar offsetFunc = function(el) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    var rect = el.getBoundingClientRect();\\r\\n\\t\\t\\t    var scrollLeft = win.pageXOffset || doc.documentElement.scrollLeft;\\r\\n\\t\\t\\t    var scrollTop = win.pageYOffset || doc.documentElement.scrollTop;\\r\\n\\t\\t\\t    var textAreaRect = {left: 0,top: 0};\\r\\n\\t\\t\\t    if(!self.__nsEditor.__isModeTextArea())\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\ttextAreaRect = compTextArea.getBoundingClientRect();\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    //return { top: rect.top + scrollTop + textAreaRect.top, left: rect.left + scrollLeft  + textAreaRect.left};\\r\\n\\t\\t\\t    //looks like rect is including scroll position\\r\\n\\t\\t\\t    var width = self.__compOuterContainer.offsetWidth;\\r\\n\\t\\t\\t    //11 is top of arrow\\r\\n\\t\\t\\t    return { top: rect.top + textAreaRect.top + (11/2) , left: (rect.left + textAreaRect.left - (width/4))};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdirection = direction ? direction : \\\"bottom\\\";\\r\\n\\t\\t\\toffset = offset ? offset : {left: 0,top: 0};\\r\\n\\t\\t\\toffset.left = offset.left ? offset.left : 0;\\r\\n\\t\\t\\toffset.top = offset.top ? offset.top : 0;\\r\\n\\t\\t\\t//var eventOffset = this.util.getEventPosition(event);\\r\\n\\t\\t\\tvar eventOffset = offsetFunc(element);\\r\\n\\t\\t\\tthis.__compOuterContainer.style.left = (eventOffset.left + offset.left) + \\\"px\\\";\\r\\n\\t\\t\\tthis.__compOuterContainer.style.top = (eventOffset.top + offset.top + element.offsetHeight) + \\\"px\\\";\\r\\n\\t\\t\\tif(!this.__docClickRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__docClickRef = this.__documentClickHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__nsEditor.__dom.doc,\\\"click\\\",this.__docClickRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t/*var self = this;\\r\\n\\t\\t\\tsetTimeout(function() {\\r\\n\\t\\t\\t\\tself.util.removeStyleClass(self.__compOuterContainer,\\\"nsEditorInlinePopupHide\\\");\\r\\n\\t\\t\\t}, 50);*/\\r\\n\\t\\t\\t//this.__compOuterContainer.focus();\\r\\n\\t\\t\\t//this.editorUtil.setElementPosition(this.__compOuterContainer,element,direction);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.__documentClickHandler = function(event)\\r\\n\\t    {\\r\\n\\t    \\tthis.hide();\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.__resetMenuButtons = function(excludeActive)\\r\\n\\t\\t{\\r\\n\\t    \\tthis.__resetBtn(\\\"nsEditorInlinePopupButtonOpen\\\");\\r\\n\\t    \\t!excludeActive && this.__resetBtn(\\\"nsEditorInlinePopupButtonActive\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__resetSubMenuButtons = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__resetBtn(\\\"nsEditorInlinePopupDropdownContainerVisible\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__resetBtn = function(cssClass)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrBtn = this.__compOuterContainer.querySelectorAll(\\\".\\\" + cssClass);\\r\\n\\t\\t\\tfor(var count = 0;count < arrBtn.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(arrBtn[count],cssClass);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.registerUtil(\\\"inlinePopup\\\",NSEditorInlinePopup);\\r\\n\\t\\r\\n\\treturn NSEditorInlinePopup;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSEditorInlinePopup\\\",NSEditorInlinePopup); var NSEditorUIFunc = (function()\\r\\n{\\r\\n\\tvar NSEditorUIFunc = function(nsEditor,nsParentPluggin,setting)\\r\\n\\t{\\r\\n\\t\\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.__nsParentPluggin = nsParentPluggin;\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\t\\r\\n\\t\\tthis.horizontalAlign = {left:\\\"left\\\",right:\\\"right\\\",center:\\\"center\\\",justify:\\\"justify\\\"};\\r\\n\\t\\tthis.verticalAlign = {top:\\\"top\\\",middle:\\\"middle\\\",bottom:\\\"bottom\\\",normal:\\\"delete\\\"};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//horizontal Align section start\\r\\n\\t\\tthis.setHorizontalAlignForNodes = function(alignment,arrNodes)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.setAlignmentForNodes(alignment,arrNodes,this.horizontalAlign,\\\"textAlign\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.setHorizontalAlignForNode = function(alignment,node)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.setAlignmentForNode(this.horizontalAlign,alignment,node,\\\"textAlign\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.clearHorizontalAlign = function(node)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.clearAlign(node,\\\"textAlign\\\");\\r\\n\\t\\t};\\r\\n\\t\\t//horizontal Align section ends\\r\\n\\t\\t\\r\\n\\t\\t//vertical Align section starts\\r\\n\\t\\tthis.setVerticalAlignForNodes = function(alignment,arrNodes)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar callback = null;\\r\\n\\t\\t\\tif(alignment == \\\"normal\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tcallback = function(node)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(node) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tself.clearVerticalAlign(node);\\r\\n\\t\\t            }\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.setAlignmentForNodes(alignment,arrNodes,this.verticalAlign,\\\"verticalAlign\\\",callback)\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.setVerticalAlignForNode = function(alignment,node)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.setAlignmentForNode(this.verticalAlign,alignment,node,\\\"verticalAlign\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.clearVerticalAlign = function(node)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.clearAlign(node,\\\"verticalAlign\\\");\\r\\n\\t\\t};\\r\\n\\t\\t//vertical Align section ends\\r\\n\\t\\t\\r\\n\\t\\tthis.setAlignmentForNodes = function(alignment,arrNodes,objAlign,styleProp,callback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t\\t\\tvar win = this.__nsEditor.__getWindow();\\r\\n    \\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n    \\t\\tcallback = callback || function(node)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(node) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar parent = self.util.findParentByCallback(node,function(paramNode) \\r\\n\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\treturn self.editorUtil.isBlock(paramNode,win); \\r\\n\\t\\t\\t\\t\\t},textArea);\\r\\n\\t\\t            if (!parent) \\r\\n\\t\\t            {\\r\\n\\t\\t            \\tparent = self.editorUtil.wrapAllInlineSiblings(node,self.__nsEditor.__config.enterElement);\\r\\n\\t\\t            }\\r\\n\\t\\t            self.setAlignmentForNode(objAlign,alignment,parent,styleProp);\\r\\n\\t            }\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(arrNodes && arrNodes.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrNodes.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcallback(arrNodes[count]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.selection.loopSelectedNodes(callback);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.setAlignmentForNode = function(objAlign,alignment,node,styleProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t\\t\\tvar win = this.__nsEditor.__getWindow();\\r\\n    \\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t\\t\\tif(alignment && this.util.isElement(node) && this.editorUtil.isNode(node,win))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.clearAlign(node,styleProp);\\r\\n\\t\\t\\t\\tvar align = objAlign[alignment.toLowerCase()];\\r\\n\\t\\t\\t\\tif(align)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tnode.style[styleProp] = align;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.clearAlign = function(node,styleProp)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar clearAlign = function(paramNode)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (self.util.isElement(paramNode)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (paramNode.style[styleProp]) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tparamNode.style[styleProp] = \\\"\\\";\\r\\n\\t\\t\\t\\t\\t\\tif (!paramNode.style.cssText.trim().length) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tparamNode.removeAttribute(\\\"style\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(node)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrChild = node.childNodes;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrChild.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tclearAlign(arrChild[count]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tclearAlign(node);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.registerUtil(\\\"uiFunc\\\",NSEditorUIFunc);\\r\\n\\t\\r\\n\\treturn NSEditorUIFunc;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSEditorUIFunc\\\",NSEditorUIFunc);var NSEditorFullScreen = (function()\\r\\n{\\t\\r\\n\\tvar NSEditorFullScreen = function(nsEditor)\\r\\n\\t{\\r\\n\\t\\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\t\\r\\n\\t\\tthis.__orignalSetting = {height:null,width: null,changed: false};\\r\\n\\t\\t\\r\\n\\t\\tthis.setSettings = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.__nsEditor.__toolBarButton[\\\"fullScreen\\\"] = {html:\\\"<i class='ns-icon ns-editor-expand' aria-hidden='true'></i>\\\",tooltip:\\\"Full Screen\\\",showAsMenu: true,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  checkDisability: function(toolBarKey,toolBarItem,item,itemKey,isDefaultDisabled)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  //it should enabled every time\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  return !isDefaultDisabled;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  },\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  click:function(item,key,event)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  self.toggle();\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  event = self.util.getEvent();\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  var iTag = event.target;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  if(event.target.nodeName.toLowerCase() === \\\"button\\\")\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  iTag = event.target.children[0];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  if(iTag)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  if(self.util.hasStyleClass(iTag,\\\"ns-editor-expand\\\"))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  self.util.removeStyleClass(iTag,\\\"ns-editor-expand\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  self.util.addStyleClass(iTag,\\\"ns-editor-collapse\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  else\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  self.util.addStyleClass(iTag,\\\"ns-editor-expand\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  self.util.removeStyleClass(iTag,\\\"ns-editor-collapse\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  }};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"toggleFullSize\\\",this.toggle.bind(this));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.componentsInitialized = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.resized = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.isFullScreen())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__resizeContainer(false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.destroy = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.toggle = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.isFullScreen() ? this.restore() : this.maximize();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isFullScreen = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.util.hasStyleClass(this.__nsEditor.__divOuterContainer,\\\"nsEditorFullScreen\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.maximize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.isFullScreen())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar con = this.__nsEditor.__divOuterContainer;\\r\\n\\t\\t\\t\\tvar zIndex = this.util.getMaxZIndex(con);\\r\\n\\t\\t\\t\\tif(zIndex > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcon.style.zIndex = zIndex + 1;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(con,\\\"nsEditorFullScreen\\\");\\r\\n\\t\\t\\t\\tthis.__setParentsPosition(false);\\r\\n\\t            this.__resizeContainer(false);\\r\\n\\t            this.__nsEditor.__dispatchInternalEvent(NSEditor.EVENT_MAXIMIZED);\\r\\n\\t            this.__nsEditor.__dispatchInternalEvent(\\\"resizeFullScreen\\\");\\r\\n\\t\\t\\t\\tthis.__nsEditor.__dispatchEvent(NSEditor.EVENT_MAXIMIZED);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.restore = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.isFullScreen())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar con = this.__nsEditor.__divOuterContainer;\\r\\n\\t\\t\\t\\tcon.style.zIndex = \\\"\\\";\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(con,\\\"nsEditorFullScreen\\\");\\r\\n\\t\\t\\t\\tthis.__setParentsPosition(true);\\r\\n\\t            this.__resizeContainer(true);\\r\\n\\t\\t\\t\\tthis.__nsEditor.__dispatchInternalEvent(NSEditor.EVENT_RESTORED);\\r\\n\\t\\t\\t\\tthis.__nsEditor.__dispatchInternalEvent(\\\"resizeFullScreen\\\");\\r\\n\\t\\t\\t\\tthis.__nsEditor.__dispatchEvent(NSEditor.EVENT_RESTORED);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setParentsPosition = function(isReset)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar parent = this.__nsEditor.__divOuterContainer.parentNode;\\r\\n            while (parent && parent.nodeType !== Node.DOCUMENT_NODE) \\r\\n            {\\r\\n            \\tisReset ? this.util.removeStyleClass(parent,\\\"nsEditorFullScreenParent\\\") : this.util.addStyleClass(parent,\\\"nsEditorFullScreenParent\\\");\\r\\n            \\tparent = parent.parentNode;\\r\\n            }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__resizeContainer = function(isReset)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar container = this.__nsEditor.__divOuterContainer;\\r\\n\\t\\t\\tif(isReset)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__orignalSetting.changed)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = {height:this.__orignalSetting.height || \\\"auto\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\twidth:this.__orignalSetting.width || \\\"auto\\\"};\\r\\n\\t\\t\\t\\t\\tthis.util.css(container,item);\\r\\n\\t\\t\\t\\t\\tthis.__orignalSetting = {height:null,width: null,changed: false};\\r\\n\\t\\t\\t\\t\\tthis.__nsEditor.__resizeCallback(false);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__orignalSetting.height = this.util.getStyleValue(container,\\\"height\\\",false,true);\\r\\n\\t\\t\\t\\tthis.__orignalSetting.width = this.util.getStyleValue(container,\\\"width\\\",false,true);\\r\\n\\t\\t\\t\\tvar item = {height:this.__nsEditor.__context.innerHeight,width:this.__nsEditor.__context.innerWidth};\\r\\n\\t\\t\\t\\tthis.util.css(container,item);\\r\\n\\t\\t\\t\\tthis.__orignalSetting.changed = true;\\r\\n\\t\\t\\t\\tthis.__nsEditor.__resizeCallback(true);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tNSEditor.prototype.maximize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objFullScreen = this.__pluginsInstances[\\\"fullScreen\\\"].instance;\\r\\n\\t\\t\\tobjFullScreen.maximize();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tNSEditor.prototype.restore = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objFullScreen = this.__pluginsInstances[\\\"fullScreen\\\"].instance;\\r\\n\\t\\t\\tobjFullScreen.restore();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tNSEditor.prototype.isFullScreen = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objFullScreen = this.__pluginsInstances[\\\"fullScreen\\\"].instance;\\r\\n\\t\\t\\treturn objFullScreen.isFullScreen();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tNSEditor.prototype.toggleFullScreen = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objFullScreen = this.__pluginsInstances[\\\"fullScreen\\\"].instance;\\r\\n\\t\\t\\treturn objFullScreen.toggle();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\tNSEditor.TOOLBAR_BUTTONS_FULLSCREEN = \\\"fullScreen\\\";\\r\\n\\tNSEditor.EVENT_MAXIMIZED = \\\"maximized\\\";\\r\\n\\tNSEditor.EVENT_RESTORED = \\\"restored\\\";\\r\\n\\tNSEditor.prototype.registerPlugin(\\\"fullScreen\\\",NSEditorFullScreen);\\r\\n\\t\\r\\n\\treturn NSEditorFullScreen;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSEditorFullScreen\\\",NSEditorFullScreen);var NSEditorResize = (function()\\r\\n{\\r\\n\\tvar NSEditorResize = function(nsEditor)\\r\\n\\t{\\r\\n\\t\\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\t\\r\\n\\t\\tthis.__enableResizeHorizontal = false;\\r\\n\\t\\tthis.__enableResizeVertical = false;\\r\\n\\t\\tthis.__objStart = {xPos:0,yPos:0,width:0,height:0,isResized: false};\\r\\n\\t\\tthis.__docMouseMoveRef = null;\\r\\n\\t\\tthis.__docMouseUpRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.setSettings = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsEditor.__config[\\\"enableResize\\\"] = Boolean.parse(this.__nsEditor.__setting[\\\"enableResize\\\"]);\\r\\n\\t\\t\\tthis.__nsEditor.__config[\\\"resizeDirection\\\"] = this.__nsEditor.__setting[\\\"resizeDirection\\\"] || NSEditor.RESIZE_DIRECTION_VERTICAL;\\r\\n\\t\\t\\tthis.__enableResizeHorizontal = (this.__nsEditor.__config[\\\"resizeDirection\\\"] == NSEditor.RESIZE_DIRECTION_BOTH || this.__nsEditor.__config[\\\"resizeDirection\\\"] == NSEditor.RESIZE_DIRECTION_HORIZONTAL);\\r\\n\\t\\t\\tthis.__enableResizeVertical = (this.__nsEditor.__config[\\\"resizeDirection\\\"] == NSEditor.RESIZE_DIRECTION_BOTH || this.__nsEditor.__config[\\\"resizeDirection\\\"] == NSEditor.RESIZE_DIRECTION_VERTICAL);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.componentsInitialized = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsEditor.__config.enableResize && this.__nsEditor.__config.height != \\\"auto\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsEditor.__handleVisibilityOfComponent(this.__nsEditor.__divFooterContainer,\\\"enableResize\\\");\\r\\n\\t\\t\\t\\tvar spanResizer = this.util.createElement(\\\"span\\\",this.__nsEditor.getID() + \\\"Resizer\\\",\\\"nsEditorResizer\\\");\\r\\n\\t\\t\\t\\tif(this.__nsEditor.__config[\\\"resizeDirection\\\"] !==  NSEditor.RESIZE_DIRECTION_BOTH)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(spanResizer,\\\"nsEditorResizer\\\" + this.__nsEditor.__config[\\\"resizeDirection\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tspanResizer.innerHTML = \\\"\\\\u25E2\\\";\\r\\n\\t\\t\\t\\tthis.util.addEvent(spanResizer,\\\"mousedown touchstart\\\",this.__resizeMouseDownHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.__nsEditor.__divFooterContainer.appendChild(spanResizer);\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tthis.__nsEditor.__listenInternalEvent(NSEditor.EVENT_MAXIMIZED,function(event){\\r\\n\\t\\t\\t\\t\\tself.util.addStyleClass(spanResizer,\\\"nsEditorComponentHidden\\\");\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\tthis.__nsEditor.__listenInternalEvent(NSEditor.EVENT_RESTORED,function(event){\\r\\n\\t\\t\\t\\t\\tself.util.removeStyleClass(spanResizer,\\\"nsEditorComponentHidden\\\");\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.resized = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.destroy = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__resizeMouseDownHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar outerContainer = this.__nsEditor.__divOuterContainer;\\r\\n\\t\\t\\tthis.__objStart = {xPos:event.clientX,yPos:event.clientY,width:outerContainer.offsetWidth,height:outerContainer.offsetHeight,isResized: true};\\r\\n\\t\\t\\tif(!this.__docMouseMoveRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__docMouseMoveRef = this.__docMouseMoveHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__nsEditor.__context,\\\"mousemove touchmove\\\",this.__docMouseMoveRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__docMouseUpRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__docMouseUpRef = this.__docMouseUpHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__nsEditor.__context,\\\"mouseup touchend\\\",this.__docMouseUpRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__nsEditor.__dispatchInternalEvent(\\\"resizeStart\\\");\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__docMouseMoveHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tif(this.__objStart.isResized)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (this.__enableResizeHorizontal) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar width = this.__objStart.width + event.clientX - this.__objStart.xPos;\\r\\n\\t\\t\\t\\t\\tthis.__nsEditor.__width(width);\\r\\n\\t            }\\r\\n\\t\\t\\t\\tif (this.__enableResizeVertical) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar height = this.__objStart.height + event.clientY - this.__objStart.yPos;\\r\\n\\t\\t\\t\\t\\tthis.__nsEditor.__height(height);\\r\\n\\t            }\\r\\n\\t\\t\\t\\tthis.__nsEditor.__resizeCallback();\\r\\n\\t\\t\\t\\tthis.__nsEditor.__dispatchInternalEvent(\\\"resize\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__docMouseUpHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__objStart.isResized)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__objStart = {xPos:0,yPos:0,width:0,height:0,isResized: false};\\r\\n\\t\\t\\t\\tthis.__nsEditor.__dispatchInternalEvent(\\\"resizeEnd\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__docMouseMoveRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__nsEditor.__context,\\\"mousemove touchmove\\\",this.__docMouseMoveRef);\\r\\n\\t\\t\\t\\tthis.__docMouseMoveRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__docMouseUpRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__nsEditor.__context,\\\"mouseup touchend\\\",this.__docMouseUpRef);\\r\\n\\t\\t\\t\\tthis.__docMouseUpRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\tNSEditor.RESIZE_DIRECTION_HORIZONTAL = \\\"horizontal\\\";\\r\\n\\tNSEditor.RESIZE_DIRECTION_VERTICAL = \\\"vertical\\\";\\r\\n\\tNSEditor.RESIZE_DIRECTION_BOTH = \\\"both\\\";\\r\\n\\tNSEditor.prototype.registerPlugin(\\\"resize\\\",NSEditorResize);\\r\\n\\t\\r\\n\\treturn NSEditorResize;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSEditorResize\\\",NSEditorResize);var NSEditorLink = (function()\\r\\n{\\t\\r\\n\\tvar NSEditorLink = function(nsEditor)\\r\\n\\t{\\r\\n\\t\\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\tthis.editorUtil = nsEditor.editorUtil;\\r\\n\\t\\t\\r\\n\\t\\tthis.name = \\\"link\\\";\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__modal = null;\\r\\n\\t\\tthis.__divBody = null;\\r\\n\\t\\tthis.__divFooter = null;\\r\\n\\t\\tthis.__id = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.setSettings = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar setting = this.__nsEditor.__setting.link;\\r\\n\\t\\t\\tif(!setting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetting = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\tprotocol: setting[\\\"protocol\\\"]\\r\\n\\t\\t\\t    };\\r\\n\\t\\t\\tthis.__nsEditor.__toolBarButton[\\\"link\\\"] = {html:\\\"<i class='ns-icon ns-editor-link' aria-hidden='true'></i>\\\",tooltip:\\\"Link\\\",showAsMenu: true,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  checkDisability: function(toolBarKey,toolBarItem,item,itemKey,isDefaultDisabled)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  if(itemKey === \\\"viewSourceCode\\\")\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  return true;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  return false;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  },\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  click:function(item,key,event)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  self.selection.saveSelection();\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  self.__createElements();\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  }};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__id = this.__nsEditor.getID() + this.name;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.componentsInitialized = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.resized = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.destroy = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createElements = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__modal)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar setting = {title: \\\"Add Link\\\",contentCSSClass:\\\"nsEditorLinkModalContent\\\",enableReset: false,contentCallback: this.__getBody.bind(this),footerCallback: this.__getFooter.bind(this)}\\r\\n\\t\\t\\t\\tthis.__modal = this.__nsEditor.__getUtilInstance(\\\"modal\\\",\\\"linkModal\\\",this.name,this,setting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__modal.toggle();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getBody = function(objModal,objLink)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__divBody)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divBody = this.util.createDiv(this.__id + \\\"LinkModalContentContainer\\\",\\\"nsEditorLinkModalContentContainer\\\");\\r\\n\\t\\t\\t\\tvar html = '<div class=\\\"nsEditorLinkModalContentForm\\\">' +\\r\\n\\t\\t                        '<label class=\\\"nsEditorLinkModalContentFormLabel\\\">URL</label>' +\\r\\n\\t\\t                        '<input id=\\\"##id##TxtUrl\\\" class=\\\"nsEditorLinkModalContentFormTextBox\\\" type=\\\"text\\\" />' +\\r\\n\\t\\t                    '</div>' +\\r\\n\\t\\t                    '<div class=\\\"nsEditorLinkModalContentForm\\\">' +\\r\\n\\t\\t                        '<label class=\\\"nsEditorLinkModalContentFormLabel\\\">Text to display</label>' +\\r\\n\\t\\t                    \\t'<input id=\\\"##id##TxtText\\\" class=\\\"nsEditorLinkModalContentFormTextBox\\\" type=\\\"text\\\" />' +\\r\\n\\t\\t                    '</div>' +\\r\\n\\t\\t                    '<div class=\\\"nsEditorLinkModalContentFormLast\\\">' +\\r\\n\\t\\t                        '<label class=\\\"nsEditorLinkModalContentFormLabel\\\">' +\\r\\n\\t\\t                    \\t\\t'<input id=\\\"##id##ChkNewWindow\\\" type=\\\"checkbox\\\" class=\\\"nsEditorLinkModalContentFormCheckbox\\\" checked />&nbsp; Open in new tab or window' + \\r\\n\\t\\t                    \\t\\t'</label>' +\\r\\n\\t\\t                    '</div>';\\r\\n\\t\\t\\t\\thtml = html.replaceAll(\\\"##id##\\\",this.__id);\\r\\n\\t\\t\\t\\tthis.__divBody.innerHTML = html;\\r\\n\\t\\t\\t}\\r\\n\\t        return this.__divBody;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getFooter = function(objModal,objLink)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__divFooter)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divFooter = this.util.createDiv(null,\\\"nsEditorLinkFooterContainer\\\");\\r\\n\\t\\t\\t\\tthis.__divFooter.innerHTML = \\\"<button class=\\\\\\\"nsEditorPrimaryButton nsEditorLinkFooterButton\\\\\\\" title=\\\\\\\"Submit\\\\\\\"><span>Submit</span></button>\\\";\\r\\n\\t\\t\\t\\tvar btnSubmit = this.__divFooter.querySelector(\\\".nsEditorLinkFooterButton\\\");\\r\\n\\t\\t\\t\\tthis.util.addEvent(btnSubmit,\\\"click\\\",this.__submitHandler.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn this.__divFooter;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__submitHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.editorUtil.stopEvent(event);\\r\\n\\t\\t\\tvar txtUrl = this.__divBody.querySelector(\\\"#\\\" + this.__id + \\\"TxtUrl\\\");\\r\\n\\t\\t\\tvar txtText = this.__divBody.querySelector(\\\"#\\\" + this.__id + \\\"TxtText\\\");\\r\\n\\t\\t\\tvar chkNewWindow = this.__divBody.querySelector(\\\"#\\\" + this.__id + \\\"ChkNewWindow\\\");\\r\\n\\t\\t\\tif(txtUrl.value && txtUrl.value.trim().length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar url = this.__getLink(txtUrl.value.trim(),this.__config.protocol);\\r\\n\\t\\t\\t\\tvar anchor = this.util.createElement(\\\"a\\\");\\r\\n\\t\\t\\t\\tanchor.href = url;\\r\\n\\t\\t\\t\\tanchor.textContent = (txtText.value.trim().length) ? txtText.value.trim() : txtUrl.value.trim();\\r\\n\\t\\t\\t\\tanchor.target = (chkNewWindow.checked ? \\\"_blank\\\" : \\\"\\\");\\r\\n\\t\\t\\t\\tthis.__insertLink(anchor);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getLink = function(value,protocol)\\r\\n\\t\\t{\\r\\n\\t        value = value.trim();\\r\\n\\t        var url = !value ? \\\"\\\" : (protocol && value.indexOf('://') === -1 && value.indexOf('#') !== 0) ? protocol + value : value.indexOf('://') === -1 ? '/' + value : value;\\r\\n\\t        return url;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__insertLink = function(link)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrEvents = [{name:\\\"closeAllPopups\\\"}];\\r\\n\\t\\t\\tvar config = {insertAfterSelectedNode: false,dispatchEvents: arrEvents};\\r\\n\\t\\t\\tthis.__nsEditor.__addElement(link,config);\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.registerPlugin(\\\"link\\\",NSEditorLink);\\r\\n\\t\\r\\n\\treturn NSEditorLink;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSEditorLink\\\",NSEditorLink);var NSEditorTable = (function()\\r\\n{\\r\\n\\tvar NSEditorTable = function(nsEditor)\\r\\n\\t{\\r\\n\\t\\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\tthis.editorUtil = nsEditor.editorUtil;\\r\\n\\t\\t\\r\\n\\t\\tthis.__nsTablePicker = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.setSettings = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.__nsEditor.__toolBarButton[\\\"table\\\"] = {html:\\\"<i class='ns-icon ns-editor-table' aria-hidden='true'></i>\\\",tooltip:\\\"Table\\\",showAsMenu: true,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  checkDisability: function(toolBarKey,toolBarItem,item,itemKey,isDefaultDisabled)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  if(itemKey === \\\"viewSourceCode\\\")\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  return true;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  return false;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  },\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  click:function(item,key,event)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  self.selection.saveSelection();\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  self.toggle.call(self,event);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  }};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeTablePicker();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.componentsInitialized = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.resized = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.addStyleInIFrame = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar style = \\\".nsEditorBody table\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"{\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    border-collapse: collapse;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    margin-bottom: 10px;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    width:100%;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"}\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\".nsEditorBody table tr \\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"{\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    user-select: none;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"}\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\".nsEditorBody table tr td,\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\".nsEditorBody table tr th\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"{\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    border: 1px solid #ddd;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    vertical-align: middle;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    user-select: text;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    padding: 5px 10px;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"}\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\".nsEditorBody table .nsEditorHiddenRow\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"{\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\theight: 0px;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    overflow: hidden;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    line-height: 0;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"}\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\".nsEditorBody table .nsEditorHiddenRow td\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"{\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\theight: 0;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    padding: 0;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    border-top: 0;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    overflow: hidden;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    line-height: 0;\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"}\\\";\\r\\n\\t\\t\\treturn style;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.destroy = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsTablePicker)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsTablePicker.remove();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.toggle = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsTablePicker)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__nsTablePicker.isOpen())\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsTablePicker.close(event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsTablePicker.open(event);\\r\\n\\t\\t\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__tablePickerCellClick = function(event,cell,rowIndex,cellIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsTablePicker.close(event);\\r\\n\\t\\t\\tconsole.log(rowIndex,cellIndex);\\r\\n\\t\\t\\tthis.__createTable(rowIndex,cellIndex);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getDefaultValues = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar borderMap = {thin: \\\"0px\\\",medium: \\\"1px\\\",thick: \\\"2px\\\"};\\r\\n\\t\\t\\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t\\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t\\t\\tvar table = this.util.createElement(\\\"table\\\",null,null,doc);\\r\\n\\t\\t    table.insertRow(0).insertCell(0).innerHTML = \\\"xxx\\\";\\r\\n\\t\\t    textArea.appendChild(table);\\r\\n\\t\\t    var td = table.getElementsByTagName(\\\"td\\\")[0];\\r\\n\\t\\t    var tmpValue = this.util.getStyleValue(table, \\\"border-left-width\\\");\\r\\n\\t\\t    var tableBorder = parseInt(borderMap[tmpValue] || tmpValue, 10);\\r\\n\\t\\t    tmpValue = this.util.getStyleValue(td, \\\"padding-left\\\");\\r\\n\\t\\t    var cellPadding = parseInt(borderMap[tmpValue] || tmpValue, 10);\\r\\n\\t\\t    tmpValue = this.util.getStyleValue(td, \\\"border-left-width\\\");\\r\\n\\t\\t    cellBorder = parseInt(borderMap[tmpValue] || tmpValue, 10);\\r\\n\\t\\t    textArea.removeChild(table);\\r\\n\\t\\t    return {\\r\\n\\t\\t        tableBorder: tableBorder,\\r\\n\\t\\t        cellPadding: cellPadding,\\r\\n\\t\\t        cellBorder: cellBorder\\r\\n\\t\\t    };\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getCellWidth = function(colCount)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n            var doc = this.__nsEditor.__getDocument();\\r\\n            var parent = textArea;\\r\\n\\t\\t\\tvar selection = this.selection.getSelection();\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tif(selection && selection.rangeCount)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar scanParent = function(paramElement)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn paramElement === textArea || (paramElement && self.editorUtil.isBlock(paramElement,textArea));\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tvar range = selection.getRangeAt(0);\\r\\n\\t\\t\\t\\tvar startElement = range.startContainer;\\r\\n\\t\\t\\t\\tvar blockElement = this.util.findParentByCallback(startElement,scanParent,textArea);\\r\\n\\t\\t\\t\\tif(blockElement)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tparent = blockElement;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar objDefault = this.__getDefaultValues();\\r\\n\\t\\t\\tvar tableWidth = parent.offsetWidth;\\r\\n\\t\\t\\tvar extraWidth = (objDefault.cellPadding * 2) - objDefault.cellBorder;\\r\\n\\t\\t\\tvar cellWidth = Math.floor((tableWidth / colCount) - extraWidth);\\r\\n\\t\\t\\treturn cellWidth;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createTable = function(rowCount,colCount)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n            var doc = this.__nsEditor.__getDocument();\\r\\n\\t\\t\\tvar table = this.util.createElement(\\\"table\\\",null,null,doc);\\r\\n\\t\\t\\tvar thead = this.util.createElement(\\\"thead\\\",null,null,doc);\\r\\n\\t\\t\\ttable.appendChild(thead);\\r\\n\\t\\t\\tvar tbody = this.util.createElement(\\\"tbody\\\",null,null,doc);\\r\\n\\t\\t\\ttable.appendChild(tbody);\\r\\n\\t\\t\\tthis.__createFirstRow(doc,table,thead,colCount);\\r\\n            var firstCell = null;\\r\\n            var tr = null;\\r\\n            for (var rowIndex = 1; rowIndex <= rowCount; rowIndex++) \\r\\n            {\\r\\n                tr = this.__createRow(doc,rowIndex,colCount);\\r\\n                if (!firstCell) \\r\\n                {\\r\\n                \\tfirstCell = tr.children[0];\\r\\n                }\\r\\n                tbody.appendChild(doc.createTextNode(\\\"\\\\n\\\"));\\r\\n                tbody.appendChild(tr);\\r\\n            }\\r\\n            this.__insertTable(doc,textArea,table,firstCell);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createFirstRow = function(doc,table,thead,colCount)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cellWidth = this.__getCellWidth(colCount);\\r\\n\\t\\t\\tvar tr = this.util.createElement(\\\"tr\\\",null,null,doc);\\r\\n            this.util.addStyleClass(tr,\\\"nsEditorHiddenRow\\\");\\r\\n            var td = null;\\r\\n            for (var cellIndex = 1; cellIndex <= colCount; cellIndex++) \\r\\n            {\\r\\n                td = this.util.createElement(\\\"td\\\",null,null,doc);\\r\\n                td.style.width = cellWidth + \\\"px\\\";\\r\\n                tr.appendChild(td);\\r\\n            }\\r\\n            thead.appendChild(tr);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createRow = function(doc,rowIndex,colCount)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar tr = this.util.createElement(\\\"tr\\\",null,null,doc);\\r\\n\\t\\t\\ttr.setAttribute(\\\"data-ns-row-index\\\",rowIndex);\\r\\n            for (var cellIndex = 1; cellIndex <= colCount; cellIndex++) \\r\\n            {\\r\\n            \\tvar td = this.__createCell(doc,\\\"td\\\",rowIndex,cellIndex);\\r\\n                tr.appendChild(doc.createTextNode(\\\"\\\\n\\\"));\\r\\n                tr.appendChild(doc.createTextNode(\\\"\\\\t\\\"));\\r\\n                tr.appendChild(td);\\r\\n            }\\r\\n            return tr;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createCell = function(doc,nodeName,rowIndex,cellIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tnodeName = nodeName.toLowerCase();\\r\\n\\t\\t\\tvar node = this.util.createElement(nodeName,null,null,doc);\\r\\n\\t\\t\\tnode.setAttribute(\\\"data-ns-row-index\\\",rowIndex);\\r\\n\\t\\t\\tnode.setAttribute(\\\"data-ns-cell-index\\\",cellIndex);\\r\\n\\t\\t\\t//this.__nsEditor.__nsToolTipInElement.addToolTip(node,\\\"\\\" + cellIndex);\\r\\n\\t\\t\\tvar div = this.util.createDiv();\\r\\n\\t\\t\\tdiv.appendChild(this.util.createElement(\\\"br\\\",null,null,doc));\\r\\n\\t\\t\\tnode.appendChild(div);\\r\\n            return node;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__insertTable = function(doc,textArea,table,firstCell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar item = {table: table};\\r\\n\\t\\t\\tvar arrEvents = [{name:\\\"closeAllPopups\\\"},{name:\\\"tableAdded\\\",args:item}];\\r\\n\\t\\t\\tvar config = {insertAfterSelectedNode: true,insertAfterNodeCallback:function(blockElement){\\r\\n\\t\\t\\t\\treturn (blockElement && !blockElement.nodeName.match(/^TD|TH|TBODY|TABLE|THEADER|TFOOTER$/));\\r\\n\\t\\t\\t},dispatchEvents: arrEvents,afterInsertCallback: function(){\\r\\n\\t\\t\\t\\tif(firstCell)\\r\\n\\t            {\\r\\n\\t\\t\\t\\t\\tself.selection.setCursorIn(firstCell);\\r\\n\\t\\t\\t\\t\\tself.util.scrollIntoView(firstCell,textArea,doc);\\r\\n\\t            }\\r\\n\\t\\t\\t}};\\r\\n\\t\\t\\tthis.__nsEditor.__addElement(table,config);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initializeTablePicker = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__nsTablePicker)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar setting = {isPopUp: true,width: 145, height:130,cellWidth: 12,cellHeight: 11, rowCount: 12,columnCount: 12, cellClickCallback: this.__tablePickerCellClick.bind(this)  };\\r\\n\\t\\t\\t\\tthis.__nsTablePicker = new NSTablePicker(setting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditorTable.setIndexInTable = function(table)\\r\\n\\t{\\r\\n\\t\\tvar util = new NSUtil();\\r\\n\\t\\tvar arrRow = table.rows;\\r\\n\\t\\tfor(var rowIndex = 0;rowIndex < arrRow.length;rowIndex++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar row = arrRow[rowIndex];\\r\\n\\t\\t\\tif(!util.hasStyleClass(row,\\\"nsEditorHiddenRow\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trow.setAttribute(\\\"data-ns-row-index\\\",rowIndex);\\r\\n\\t\\t\\t\\tvar arrCell = row.cells;\\r\\n\\t\\t\\t\\tfor(var cellIndex = 0;cellIndex < arrCell.length;cellIndex++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar cell = arrCell[cellIndex];\\r\\n\\t\\t\\t\\t\\tcell.setAttribute(\\\"data-ns-row-index\\\",rowIndex);\\r\\n\\t\\t\\t\\t\\tcell.setAttribute(\\\"data-ns-cell-index\\\",cellIndex);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.registerPlugin(\\\"table\\\",NSEditorTable);\\r\\n\\t\\r\\n\\treturn NSEditorTable;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSEditorTable\\\",NSEditorTable);var NSFooterComp = (function()\\r\\n{\\r\\n\\tvar NSFooterComp = function(nsEditor)\\r\\n\\t{\\r\\n\\t\\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\tthis.editorUtil = nsEditor.editorUtil;\\r\\n\\t\\t\\r\\n\\t\\tthis.__compElementPathContainerContainer = null;\\r\\n\\t\\tthis.__compElementPath = null;\\r\\n\\t\\tthis.__compWords = null;\\r\\n\\t\\tthis.__compChars = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__excludeSpace = true;\\r\\n\\t\\t\\r\\n\\t\\tthis.setSettings = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsEditor.__config[\\\"enableElementPath\\\"] = this.util.isUndefinedOrNull(this.__nsEditor.__setting[\\\"enableElementPath\\\"]) ? true : Boolean.parse(this.__nsEditor.__setting[\\\"enableElementPath\\\"]);\\r\\n\\t\\t\\tthis.__nsEditor.__config[\\\"enableWordsCount\\\"] = this.util.isUndefinedOrNull(this.__nsEditor.__setting[\\\"enableWordsCount\\\"]) ? true : Boolean.parse(this.__nsEditor.__setting[\\\"enableWordsCount\\\"]);\\r\\n\\t\\t\\tthis.__nsEditor.__config[\\\"enableCharsCount\\\"] = this.util.isUndefinedOrNull(this.__nsEditor.__setting[\\\"enableCharsCount\\\"]) ? true : Boolean.parse(this.__nsEditor.__setting[\\\"enableCharsCount\\\"]);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.componentsInitialized = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsEditor.__config[\\\"enableElementPath\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__compElementPathContainer = this.util.createElement(\\\"div\\\",null,\\\"nsEditorElementPathContainer\\\");\\r\\n\\t\\t\\t\\tthis.__nsEditor.__divFooterLeftContainer.appendChild(this.__compElementPathContainer);\\r\\n\\t\\t\\t\\tthis.__compElementPath = this.util.createElement(\\\"ul\\\",null,\\\"nsEditorElementPath\\\");\\r\\n\\t\\t\\t\\tthis.__compElementPathContainer.appendChild(this.__compElementPath);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__nsEditor.__config[\\\"enableWordsCount\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__compWords = this.util.createElement(\\\"span\\\",null,\\\"nsEditorWordsContainer\\\");\\r\\n\\t\\t\\t\\tthis.__nsEditor.__divFooterRightContainer.appendChild(this.__compWords);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__nsEditor.__config[\\\"enableCharsCount\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__compChars = this.util.createElement(\\\"span\\\",null,\\\"nsEditorCharsContainer\\\");\\r\\n\\t\\t\\t\\tthis.__nsEditor.__divFooterRightContainer.appendChild(this.__compChars);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"change keyup\\\",this.__keyEventHandler.bind(this));\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"mousedown change keyup click selectionchange selectionstart\\\",this.__pathChangeHandler.bind(this));\\r\\n\\t\\t\\tthis.__refreshFooterComp();\\r\\n\\t\\t\\tthis.__setElementPath();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.resized = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.destroy = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__keyEventHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//var eventDetail = event.detail;\\r\\n\\t\\t\\t//var orignalEvent = eventDetail.orignalEvent;\\r\\n\\t\\t\\tthis.__refreshFooterComp();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__pathChangeHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//var eventDetail = event.detail;\\r\\n\\t\\t\\t//var orignalEvent = eventDetail.orignalEvent;\\r\\n\\t\\t\\tthis.__setElementPath();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__refreshFooterComp = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__compWords)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__compWords.innerHTML = \\\"Words: \\\" + this.__getWordCount();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__compChars)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__compChars.innerHTML = \\\"Chars: \\\" + this.__getCharCount();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setElementPath = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__compElementPath)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar element = this.selection.getElementUnderCursor();\\r\\n\\t\\t\\t\\tthis.__compElementPath.innerHTML = \\\"\\\";\\r\\n\\t\\t\\t\\t//var html = \\\"\\\";\\r\\n\\t\\t\\t\\tif(element)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\t\\tvar scanParent = function(paramElement)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t if(paramElement && textArea !== paramElement && !self.util.isTextNode(paramElement)) \\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t var name = paramElement.nodeName.toLowerCase();\\r\\n\\t\\t\\t\\t\\t\\t\\t var path = self.__getXPathByElement(paramElement,textArea).replace(/^\\\\//, \\\"\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\t var li = self.__getLI(paramElement,path,name,\\\"Select \\\" + name);\\r\\n\\t\\t\\t\\t\\t\\t\\t if(self.__compElementPath.firstChild)\\r\\n\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t self.__compElementPath.insertBefore(self.__getSeparatorLI(),self.__compElementPath.firstChild);\\r\\n\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t\\t self.__compElementPath.insertBefore(li,self.__compElementPath.firstChild);\\r\\n\\t\\t\\t\\t\\t\\t\\t //html = name + (html ? \\\" > \\\" : \\\"\\\") + html;\\r\\n\\t\\t\\t\\t\\t\\t\\t //console.log(html);\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\tthis.util.findParentByCallback(element,scanParent,textArea);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//this.__compElementPathContainer.innerHTML = html ? (\\\"Path: \\\" + html) : \\\"\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getSeparatorLI = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar html = \\\"<li> > </li>\\\";\\r\\n\\t\\t\\tvar li = this.util.getElementFromHtml(html);\\r\\n            var a = li.firstChild;\\r\\n            return li;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getLI = function(bindElement, path, name, title) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar html = \\\"<li class=\\\\\\\"nsEditorElementPathItem\\\\\\\"><a role=\\\\\\\"button\\\\\\\" data-nseditor-path=\\\\\\\"\\\" + path + \\\"\\\\\\\" href=\\\\\\\"javascript:void(0)\\\\\\\" title=\\\\\\\"\\\" + title + \\\"\\\\\\\" tabindex=\\\\\\\"-1\\\\\\\"'>\\\" + name + \\\"</a></li>\\\";\\r\\n            var li = this.util.getElementFromHtml(html);\\r\\n            var a = li.firstChild;\\r\\n            this.util.addEvent(a,\\\"click\\\",this.__selectPathHandler.bind(this,bindElement,path,name));\\r\\n            //this.util.addEvent(a,\\\"contextmenu\\\",this.__contextMenuHandler.bind(this,bindElement));\\r\\n            return li;\\r\\n        };\\r\\n        \\r\\n        this.__getXPathByElement = function(element, textArea)\\r\\n        {\\r\\n        \\tif (!element || element.nodeType !== 1) \\r\\n        \\t{\\r\\n                return \\\"\\\";\\r\\n            }\\r\\n            if (!element.parentNode || textArea === element) \\r\\n            {\\r\\n                return \\\"\\\";\\r\\n            }\\r\\n            if (element.id) \\r\\n            {\\r\\n                return \\\"//*[@id='\\\" + element.id + \\\"']\\\";\\r\\n            }\\r\\n            var arrSameElement = [].filter.call(element.parentNode.childNodes, function (node) { return node.nodeName === element.nodeName; });\\r\\n            var parentPath = this.__getXPathByElement(element.parentNode, textArea);\\r\\n            var indexString = arrSameElement.length > 1 ? \\\"[\\\" + (Array.from(arrSameElement).indexOf(element) + 1) + \\\"]\\\": \\\"\\\";\\r\\n            var retString = parentPath + \\\"/\\\" +  element.nodeName.toLowerCase() + indexString;\\r\\n            return retString;\\r\\n        };\\r\\n        \\r\\n        this.__selectPathHandler = function(element,path,name,event)\\r\\n        {\\r\\n        \\ttry \\r\\n        \\t{\\r\\n        \\t\\tvar doc = this.__nsEditor.__getDocument();\\r\\n        \\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n                var pathElements = doc.evaluate(path,textArea, null, XPathResult.ANY_TYPE, null);\\r\\n                var selectedElement = pathElements.iterateNext();\\r\\n                if (selectedElement) \\r\\n                {\\r\\n                \\tthis.selection.selectElement(selectedElement);\\r\\n                    return;\\r\\n                }\\r\\n            }\\r\\n            catch (error) \\r\\n            { \\r\\n            }\\r\\n            this.selection.selectElement(element);\\r\\n            return;\\r\\n        };\\r\\n\\t\\t\\r\\n\\t\\tthis.__getWordCount = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar wordcount = 0;\\r\\n\\t\\t\\tvar html = this.__nsEditor.__getHtmlFromTextArea() || \\\"\\\";\\r\\n\\t\\t\\tif(html.replace(/\\\\s*<[^>]*?>\\\\s*/g, '') !== '') \\r\\n\\t\\t\\t{\\r\\n\\t            if (html.trim() !== \\\"\\\") \\r\\n\\t            {\\r\\n\\t            \\t//remove inline tags without adding spaces\\r\\n\\t            \\thtml = html.replace(/<\\\\/?(b|i|em|strong|span|u|strikethrough|a|img|small|sub|sup|label)( [^>*?])?>/gi, '');\\r\\n\\t            \\t//replace adjacent tags with possible space between with a space\\r\\n\\t            \\thtml = html.replace(/(<[^>]*?>\\\\s*<[^>]*?>)/ig, ' ');\\r\\n\\t            \\t//remove any singular tags\\r\\n\\t                html = html.replace(/(<[^>]*?>)/ig, '');\\r\\n\\t                //condense spacing\\r\\n\\t                html = html.replace(/\\\\s+/ig, ' ');\\r\\n\\t                //count remaining non-space strings\\r\\n\\t                wordcount = html.match(/\\\\S+/g).length; \\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t\\t\\treturn wordcount;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getCharCount = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar text = this.__nsEditor.__getTextFromTextArea() || \\\"\\\";\\r\\n\\t\\t\\ttext = text.replace(/(\\\\r\\\\n|\\\\n|\\\\r)/gm,\\\"\\\").replace(/^\\\\s+/g,' ').replace(/\\\\s+$/g, ' ');\\r\\n\\t\\t\\ttext = this.__excludeSpace ? text.replace(this.editorUtil.SPACE_REG_EXP, \\\"\\\") : text;\\r\\n\\t\\t\\tvar charcount = text.length;\\r\\n\\t\\t\\treturn charcount;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tNSEditor.prototype.getWordCount = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objFooterComp = this.__pluginsInstances[\\\"footercomp\\\"].instance;\\r\\n\\t\\t\\treturn objFooterComp.__getWordCount();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tNSEditor.prototype.getCharCount = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objFooterComp = this.__pluginsInstances[\\\"footercomp\\\"].instance;\\r\\n\\t\\t\\treturn objFooterComp.__getCharCount();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.registerPlugin(\\\"footercomp\\\",NSFooterComp);\\r\\n\\t\\r\\n\\treturn NSFooterComp;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSFooterComp\\\",NSFooterComp);  var NSElementResizer = (function()\\r\\n{\\r\\n\\tvar NSElementResizer = function(nsEditor)\\r\\n\\t{\\r\\n\\t\\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\tthis.editorUtil = nsEditor.editorUtil;\\r\\n\\t\\tthis.__config = {};\\r\\n\\t\\t\\r\\n\\t\\tthis.__container = null;\\r\\n\\t\\tthis.__compTopLeft = null;\\r\\n\\t\\tthis.__compTopRight = null;\\r\\n\\t\\tthis.__compBottomLeft = null;\\r\\n\\t\\tthis.__compBottomRight = null;\\r\\n\\t\\tthis.__compSize = null;\\r\\n\\t\\tthis.__doc = null;\\r\\n\\t\\tthis.__win = null;\\r\\n\\t\\tthis.__textArea = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__isElementResized = false;\\r\\n        this.__isShown = false;\\r\\n        this.__element = null;\\r\\n        this.__objResizer = {};\\r\\n        this.__resizerRef = null;\\r\\n\\t\\t\\r\\n\\t\\t\\r\\n\\t\\tthis.setSettings = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting = this.__nsEditor.__setting.elementResizer;\\r\\n\\t\\t\\tif(!setting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetting = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tresizableElements: setting[\\\"resizableElements\\\"] || \\\"img, iframe\\\",//\\\"img, table, iframe\\\"\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tenableShowSize: this.util.isUndefinedOrNull(setting[\\\"enableShowSize\\\"]) ? true : Boolean.parse(setting[\\\"enableShowSize\\\"]),\\r\\n\\t\\t\\t\\t\\t\\t\\t\\thideSizeInterval: setting[\\\"hideSizeInterval\\\"] || 1000,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tsizeLabelFunction: setting[\\\"sizeLabelFunction\\\"] ? this.util.getFunction(setting[\\\"sizeLabelFunction\\\"]) : null,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tminWidth: setting[\\\"minWidth\\\"] || 50,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tminHeight: setting[\\\"minHeight\\\"] || 50,\\r\\n\\t\\t\\t\\t\\t\\t    };\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.componentsInitialized = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__doc = this.__nsEditor.__getDocument();\\r\\n\\t\\t\\tthis.__win = this.__nsEditor.__getWindow();\\r\\n\\t\\t\\tthis.__textArea = this.__nsEditor.__getTextArea();\\r\\n\\t\\t\\tthis.__createComponents();\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"change\\\",this.__changeHandler.bind(this));\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"changePlace\\\",this.__addListeners.bind(this));\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"readonly\\\",this.__readonlyHandler.bind(this));\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"hideResizer\\\",this.__hide.bind(this));\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"maximized\\\",this.__fullScreenHandler);\\r\\n\\t\\t\\tthis.__addListeners();\\r\\n\\t\\t\\tthis.__changeHandler();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.resized = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.destroy = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createComponents = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__container)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__container = this.util.createElement(\\\"div\\\",null,\\\"nsElemEditorResizer\\\",this.__doc);\\r\\n\\t\\t\\t\\tthis.__compTopLeft = this.__createResizer(\\\"nsEditorResizerTopLeft\\\");\\r\\n\\t\\t\\t\\tthis.__compTopRight = this.__createResizer(\\\"nsEditorResizerTopRight\\\");\\r\\n\\t\\t\\t\\tthis.__compBottomLeft = this.__createResizer(\\\"nsEditorResizerBottomLeft\\\");\\r\\n\\t\\t\\t\\tthis.__compBottomRight = this.__createResizer(\\\"nsEditorResizerBottomRight\\\");\\r\\n\\t\\t\\t\\tif(this.__config.enableShowSize)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__compSize = this.util.createElement(\\\"span\\\",null,\\\"nsEditorResizerSize\\\",this.__doc);\\r\\n\\t\\t\\t\\t\\tthis.__container.appendChild(this.__compSize);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createResizer = function(cssClass)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar comp = this.util.createElement(\\\"div\\\",null,\\\"nsEditorResizerComp \\\" + cssClass,this.__doc);\\r\\n\\t\\t\\tthis.util.addEvent(comp,\\\"mousedown touchstart\\\",this.__resizeClickHandler.bind(this,comp));\\r\\n\\t\\t\\tthis.__container.appendChild(comp);\\r\\n\\t\\t\\treturn comp;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__addListeners = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"keydown\\\", this.__keydownHandler.bind(this));\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"resize\\\", this.__updateCompSize.bind(this));\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"mouseup keydown touchend\\\",this.__clickOutsideHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent([this.__win,this.__textArea],\\\"scroll\\\",this.__scrollHandler.bind(this));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__addListenerToElement = function(element,type)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(element)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addEvent(element,\\\"click\\\",this.__elementClickHandler.bind(this,element,type));\\r\\n\\t\\t\\t\\tthis.util.addEvent(element,\\\"mousedown\\\",this.__elementMouseDownHandler.bind(this,element,type));\\r\\n\\t\\t\\t\\tthis.util.addEvent(element,\\\"dragstart\\\",this.__hide.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__elementClickHandler = function(element,type,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (this.__element !== element || !this.__isShown) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\tevent.stopImmediatePropagation();\\r\\n                this.__element = element;\\r\\n                this.__show();\\r\\n                if (type == \\\"img\\\" && !this.__element.complete)\\r\\n                {\\r\\n                \\tthis.util.addEvent(this.__element,\\\"load\\\",this.__updateCompSize);\\r\\n                }\\r\\n            }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__elementMouseDownHandler = function(element,type,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsEditor.__browserDetail.isMSIE && type == \\\"img\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__resizeClickHandler = function(compResier,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (this.__element && this.__element.parentNode) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t\\t\\tthis.__isElementResized = true;\\r\\n\\t\\t\\t\\tthis.__objResizer.resizer = compResier;\\r\\n\\t\\t\\t\\tthis.__objResizer.width = this.__element.offsetWidth;\\r\\n\\t\\t\\t\\tthis.__objResizer.height = this.__element.offsetHeight;\\r\\n\\t\\t\\t\\tthis.__objResizer.ratio = this.__objResizer.width / this.__objResizer.height;\\r\\n\\t\\t\\t\\tthis.__objResizer.startX = event.clientX;\\r\\n\\t\\t\\t\\tthis.__objResizer.startY = event.clientY;\\r\\n\\t\\t\\t\\tthis.__nsEditor.__dispatchInternalEvent(\\\"hidePopup\\\");\\r\\n\\t\\t\\t\\tthis.__resizerRef = this.__resizeHandler.bind(this); \\r\\n\\t\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"mousemove touchmove\\\", this.__resizerRef);\\r\\n\\t        }\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__hide();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__resizeHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t if (this.__isElementResized && this.__element) \\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t event = this.util.getEvent(event);\\r\\n\\t\\t\\t\\t event = event.orignalEvent;\\r\\n\\t\\t\\t\\t event = this.util.getEvent(event)\\r\\n\\t\\t\\t\\t event.stopImmediatePropagation();\\r\\n\\t\\t\\t\\t var diffX = event.clientX - this.__objResizer.startX;\\r\\n\\t\\t\\t\\t var diffY = event.clientY - this.__objResizer.startY;\\r\\n\\t\\t\\t\\t var cssClass = this.__objResizer.resizer.className;\\r\\n\\t             var newWidth = 0;\\r\\n\\t             var newHeight = 0;\\r\\n\\t             var isLeft = cssClass.match(/Left/);\\r\\n\\t             var isTop = cssClass.match(/Top/);\\r\\n\\t             var leftMul = isLeft ?  -1 : 1;\\r\\n\\t             var topMul = isTop ?  -1 : 1;\\r\\n\\t             var isImage = this.util.isElementOfType(this.__element,\\\"img\\\");\\r\\n\\t             if(isImage)\\r\\n\\t             {\\r\\n\\t            \\t if (diffX) \\r\\n\\t            \\t {\\r\\n\\t            \\t\\t newWidth = this.__objResizer.width + leftMul * diffX;\\r\\n\\t            \\t\\t newHeight = Math.round(newWidth / this.__objResizer.ratio);\\r\\n\\t                 }\\r\\n\\t            \\t else \\r\\n\\t            \\t {\\r\\n\\t            \\t\\t newHeight = this.__objResizer.height + topMul * diffY;\\r\\n\\t            \\t\\t newWidth = Math.round(newHeight * this.__objResizer.ratio);\\r\\n\\t                 }\\r\\n\\t            \\t var maxWidth = this.util.getInnerWidth(this.__textArea,this.__win);\\r\\n\\t            \\t if (newWidth > maxWidth) \\r\\n\\t            \\t {\\r\\n\\t            \\t\\t newWidth = maxWidth;\\r\\n\\t            \\t\\t newHeight = Math.round(newWidth / this.__objResizer.ratio);\\r\\n\\t            \\t }\\r\\n\\t             }\\r\\n\\t             else\\r\\n\\t             {\\r\\n\\t            \\t newWidth = this.__objResizer.width + leftMul * diffX;\\r\\n\\t            \\t newHeight = this.__objResizer.height + topMul * diffY;\\r\\n\\t             }\\r\\n\\t             if (newWidth > this.__config.minWidth) \\r\\n\\t             {\\r\\n\\t            \\t if (newWidth < this.__container.offsetWidth) \\r\\n\\t            \\t {\\r\\n\\t            \\t\\t this.__element.style.width = newWidth + \\\"px\\\";\\r\\n\\t                 }\\r\\n\\t                 else \\r\\n\\t                 {\\r\\n\\t                \\t this.__element.style.width = \\\"100%\\\";\\r\\n\\t                 }\\r\\n\\t             }\\r\\n\\t             if (newHeight > this.__config.minHeight) \\r\\n\\t             {\\r\\n\\t            \\t this.__element.style.height = newHeight + \\\"px\\\";\\r\\n\\t             }\\r\\n\\t             this.__updateCompSize();\\r\\n                 this.__updateSizeLabel(this.__element.offsetWidth,this.__element.offsetHeight);\\r\\n\\t\\t\\t }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__clickOutsideHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//var eventDetail = event.detail;\\r\\n\\t\\t\\t//console.log(\\\"In __clickOutsideHandler \\\" + eventDetail.orignalEvent.type);\\r\\n\\t\\t\\tif (this.__isShown) \\r\\n\\t\\t\\t{\\r\\n                if (this.__isElementResized) \\r\\n                {\\r\\n                \\tvar event = this.util.getEvent(event);\\r\\n                    //_this.jodit.unlock();\\r\\n                    this.__isElementResized = false;\\r\\n                    //this.jodit.setEditorValue();\\r\\n                    event.stopImmediatePropagation();\\r\\n                    this.__nsEditor.__removeInternalEvent(\\\"mousemove touchmove\\\", this.__resizerRef);\\r\\n                    this.__resizerRef = null;\\r\\n                }\\r\\n                else \\r\\n                {\\r\\n                    this.__hide();\\r\\n                }\\r\\n            }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__changeHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t if(this.__isShown) \\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t if (!this.__element || !this.__element.parentNode) \\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t this.__hide();\\r\\n\\t\\t         }\\r\\n\\t\\t         else \\r\\n\\t\\t         {\\r\\n\\t\\t        \\t this.__updateCompSize();\\r\\n\\t\\t         }\\r\\n\\t\\t     }\\r\\n\\t\\t\\t if(!this.__nsEditor.isRemoved() && !this.__nsEditor.__isSourceMode)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t var arrElements = this.__textArea.querySelectorAll(this.__config.resizableElements);\\r\\n\\t\\t\\t\\t for(var count = 0;count < arrElements.length;count++)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t var element = arrElements[count];\\r\\n\\t\\t\\t\\t\\t var processed = Boolean.parse(element.getAttribute(\\\"ns-editor-processed\\\"));\\r\\n\\t\\t\\t\\t\\t var type = element.tagName.toLowerCase();\\r\\n\\t\\t\\t\\t\\t if(!processed && (type == \\\"img\\\" || type == \\\"table\\\"))\\r\\n\\t\\t\\t\\t     {\\r\\n\\t\\t\\t\\t\\t\\t element.setAttribute(\\\"ns-editor-processed\\\",true);\\r\\n\\t\\t\\t\\t\\t\\t this.__addListenerToElement(element,type);\\r\\n\\t\\t\\t\\t     }\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__readonlyHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar eventDetail = event.detail;\\r\\n\\t\\t\\tif(eventDetail && eventDetail.isReadOnly)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__hide();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__scrollHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (this.__isShown && !this.__isElementResized) \\r\\n\\t\\t\\t{\\r\\n                this.__hide();\\r\\n            }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__keydownHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar keyCode = event.which || event.keyCode;\\r\\n\\t\\t\\tif(this.__isShown && keyCode === this.util.KEYCODE.DELETE && this.__element && !this.util.isElementOfType(this.__element,\\\"table\\\")) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__deleteHandler(event);\\r\\n\\t        }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__fullScreenHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__isShown)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar zIndex = this.util.getStyleValue(this.__nsEditor.__divOuterContainer,\\\"z-index\\\");\\r\\n\\t\\t\\t\\tthis.__container.style.zIndex = zIndex;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__deleteHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__element)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__element.parentNode)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__element.parentNode.removeChild(this.__element);\\r\\n\\t\\t\\t\\t}\\r\\n\\t            this.__hide();\\r\\n\\t            event.preventDefault();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__updateCompSize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__isShown && !this.__nsEditor.isRemoved())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__element && this.__container) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar parent = this.__container.parentNode || this.__doc.documentElement;\\r\\n\\t                var parentPos = this.editorUtil.getOffset(parent,true);\\r\\n\\t                var elementPos = this.editorUtil.getOffset(this.__element,false);\\r\\n\\t                var left = parseInt(this.__container.style.left || \\\"0\\\", 10);\\r\\n\\t                var top = parseInt(this.__container.style.top || \\\"0\\\", 10);\\r\\n\\t                var width = this.__container.offsetWidth;\\r\\n\\t                var height = this.__container.offsetHeight;\\r\\n\\t                var newTop = elementPos.top - 1 - parentPos.top;\\r\\n\\t                var newLeft = elementPos.left - 1 - parentPos.left;\\r\\n\\t                if (top !== newTop || left !== newLeft || width !== this.__element.offsetWidth || height !== this.__element.offsetHeight) \\r\\n\\t                {\\r\\n\\t                \\tvar style = {top: newTop, left: newLeft, width: this.__element.offsetWidth, height: this.__element.offsetHeight};\\r\\n\\t                \\t/*console.log(parentPos);\\r\\n\\t                \\tconsole.log(elementPos);\\r\\n\\t                \\tconsole.log(style);*/\\r\\n\\t                \\tthis.util.css(this.__container,style);\\r\\n\\t                \\tthis.__nsEditor.__dispatchInternalEvent(\\\"changesize\\\");\\r\\n\\t                }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__updateSizeLabel = function(width,height)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__compSize)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (width < this.__compSize.offsetWidth || height < this.__compSize.offsetHeight) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__showHideSizeComp(false);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__showHideSizeComp(true);\\r\\n\\t\\t\\t\\t\\tvar label = width + \\\" x \\\" + height;\\r\\n\\t\\t\\t\\t\\tif(this.__config.sizeLabelFunction)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tlabel = this.__config.sizeLabelFunction(width,height);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__compSize.textContent = label\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\t\\tsetTimeout(function(){ \\r\\n\\t\\t\\t\\t\\t\\tself.__showHideSizeComp.call(self,false); \\r\\n\\t\\t\\t\\t\\t}, this.__config.hideSizeInterval);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__show = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__isShown && this.editorUtil.isEditable())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__isShown = true;\\r\\n\\t\\t\\t\\tthis.__nsEditor.__divBodyContainer.appendChild(this.__container);\\r\\n\\t\\t\\t\\tthis.__updateCompSize();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__hide = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isElementResized = false;\\r\\n\\t        this.__isShown = false;\\r\\n\\t        this.__element = null;\\r\\n\\t        if(this.__container.parentNode)\\r\\n\\t        {\\r\\n\\t        \\tthis.__container.parentNode.removeChild(this.__container);\\r\\n\\t        }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__showHideSizeComp = function(isShow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__compSize)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__compSize.style.opacity = isShow ? \\\"1\\\" : \\\"0\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.registerPlugin(\\\"elementResizer\\\",NSElementResizer);\\r\\n\\t\\r\\n\\treturn NSElementResizer;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSElementResizer\\\",NSElementResizer);var NSTablePluggins = (function()\\r\\n{\\r\\n\\tvar NSTablePluggins = function(nsEditor)\\r\\n\\t{\\r\\n\\t\\t/*this.nsEditor = nsEditor;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\tthis.editorUtil = nsEditor.editorUtil;*/\\r\\n\\t\\tthis.__tblUtil = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__objTables = {};\\r\\n\\t\\tthis.__objUIFunc = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__processedTableIDAttribute = \\\"data-ns-editor-table-id\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__rowSubMenu = [{key:\\\"above\\\",label:\\\"Insert row above\\\",toolTip:\\\"Insert row above\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t {key:\\\"below\\\",label:\\\"Insert row below\\\",toolTip:\\\"Insert row below\\\"}];\\r\\n\\r\\n\\t\\tthis.__columnSubMenu = [{key:\\\"before\\\",label:\\\"Insert column before\\\",toolTip:\\\"Insert column before\\\"},\\r\\n\\t\\t\\t\\t\\t \\t\\t\\t{key:\\\"after\\\",label:\\\"Insert column after\\\",toolTip:\\\"Insert column after\\\"}];\\r\\n\\t\\t\\r\\n\\t\\tthis.__cellSubMenu = [{key:\\\"mergeCells\\\",label:\\\"Merge cells\\\",toolTip:\\\"Merge cells\\\"},\\r\\n\\t\\t\\t\\t\\t  {key:\\\"verticalSplit\\\",label:\\\"Vertical split\\\",toolTip:\\\"Vertical split\\\"},\\r\\n\\t\\t\\t\\t\\t  {key:\\\"horizontalSplit\\\",label:\\\"Horizontal split\\\",toolTip:\\\"Horizontal split\\\"}];\\r\\n\\t\\t\\r\\n\\t\\tthis.__alignSubMenu = [{key:\\\"top\\\",label:\\\"Top\\\",toolTip:\\\"Align Top\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  {key:\\\"middle\\\",label:\\\"Middle\\\",toolTip:\\\"Align Middle\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  {key:\\\"bottom\\\",label:\\\"Bottom\\\",toolTip:\\\"Align Bottom\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  {key:\\\"normal\\\",label:\\\"Normal\\\",toolTip:\\\"Align Normal\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  {key:\\\"left\\\",label:\\\"Left\\\",toolTip:\\\"Align Left\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  {key:\\\"right\\\",label:\\\"Right\\\",toolTip:\\\"Align Right\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  {key:\\\"center\\\",label:\\\"Center\\\",toolTip:\\\"Align Center\\\"},\\r\\n\\t\\t\\t\\t\\t\\t  {key:\\\"justify\\\",label:\\\"Justify\\\",toolTip:\\\"Align Justify\\\"}];\\r\\n\\t\\t\\r\\n\\t\\tthis.__removeSubMenu = [{key:\\\"table\\\",label:\\\"Delete Table\\\",toolTip:\\\"Delete Table\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t  {key:\\\"row\\\",label:\\\"Delete Row\\\",toolTip:\\\"Delete Row\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t  {key:\\\"column\\\",label:\\\"Delete Column\\\",toolTip:\\\"Delete Column\\\"},\\r\\n\\t\\t\\t\\t\\t\\t\\t  {key:\\\"cell\\\",label:\\\"Empty Cell\\\",toolTip:\\\"Empty Cell\\\"}];\\r\\n\\t\\t\\r\\n\\t\\tthis.__objMenu = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.CLASS_SELECTED_CELL = \\\"nsEditorSelectedCell\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objMenu = { remove: {html: \\\"<i class=\\\\\\\"ns-icon ns-editor-trash\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\"></i>\\\",toolTip:\\\"Remove\\\",subMenu:this.__removeSubMenu,subMenuClickHandler:this.__removeClickHandler.bind(this)},\\r\\n\\t\\t\\t\\t\\t\\t\\t   row: {html: \\\"<i class=\\\\\\\"ns-icon ns-editor-bars\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\"></i>\\\",toolTip:\\\"Row\\\",subMenu:this.__rowSubMenu,subMenuClickHandler:this.__rowClickHandler.bind(this)},\\r\\n\\t\\t\\t\\t\\t\\t\\t   column: {html: \\\"<i class=\\\\\\\"ns-icon ns-editor-layout\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\"></i>\\\",toolTip:\\\"Column\\\",subMenu:this.__columnSubMenu,subMenuClickHandler:this.__columnClickHandler.bind(this)},\\r\\n\\t\\t\\t\\t\\t\\t\\t   cell: {html: \\\"<i class=\\\\\\\"ns-icon ns-editor-square\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\"></i>\\\",toolTip:\\\"Cell\\\",subMenu:this.__cellSubMenu,subMenuClickHandler:this.__cellClickHandler.bind(this)},\\r\\n\\t\\t\\t\\t\\t\\t\\t   alignment: {html: \\\"<i class=\\\\\\\"ns-icon ns-editor-align-left\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\"></i>\\\",toolTip:\\\"Alignment\\\",subMenu:this.__alignSubMenu,subMenuClickHandler:this.__alignClickHandler.bind(this)},\\r\\n\\t\\t\\t\\t\\t\\t\\t   header: {html: \\\"<i class=\\\\\\\"ns-icon ns-editor-header\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\"></i>\\\",toolTip:\\\"Table Header\\\",menuClickHandler:this.__headerClickHandler.bind(this)},\\r\\n\\t\\t\\t\\t\\t\\t\\t };\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.setSettings = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar tableSetting = this.nsEditor.__setting[\\\"tableSetting\\\"];\\r\\n\\t\\t\\tif(!tableSetting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttableSetting = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar tableConfig = {};\\r\\n\\t\\t\\ttableConfig = {\\r\\n\\t\\t\\t\\t\\tenableColumnResize : this.util.isUndefinedOrNull(tableSetting[\\\"enableColumnResize\\\"]) ? true : Boolean.parse(tableSetting[\\\"enableColumnResize\\\"]),\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tthis.nsEditor.__config[\\\"tableSetting\\\"] = tableConfig;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.componentsInitialized = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.nsEditor.__listenInternalEvent(\\\"tableAdded\\\", this.__initTable.bind(this));\\r\\n\\t\\t\\tthis.nsEditor.__listenInternalEvent(\\\"mousedown mouseup\\\", this.__handleMouseEvents.bind(this));\\r\\n\\t\\t\\tthis.nsEditor.__listenInternalEvent(\\\"dblclick click\\\", this.__handleClickEvents.bind(this));\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tthis.__tblUtil = new NSTableUtil(this.nsEditor.__getDocument(),this.nsEditor.__getWindow());\\r\\n\\t\\t\\tthis.__objUIFunc = this.nsEditor.__getUtilInstance(\\\"uiFunc\\\",\\\"tablePluggins\\\",this.name,this,null);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.resized = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.destroy = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getSelectedCells = function(table)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrCells = null;\\r\\n\\t\\t\\tif(table)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrCells = table.querySelectorAll(\\\".\\\" + this.CLASS_SELECTED_CELL);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar textArea = this.nsEditor.__getTextArea();\\r\\n\\t\\t\\t\\tarrCells = textArea.querySelectorAll(\\\".\\\" + this.CLASS_SELECTED_CELL);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrCells; \\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initTable = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.editorUtil.isEditable())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(event.detail && event.detail.table)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar table = event.detail.table;\\r\\n\\t\\t\\t\\t\\tif(!table.hasAttribute(this.__processedTableIDAttribute))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar id = \\\"compNSEditorTable\\\" + this.util.getUniqueId();\\r\\n\\t\\t\\t\\t\\t\\ttable.setAttribute(this.__processedTableIDAttribute,id);\\r\\n\\t\\t\\t\\t\\t\\tvar resizableTable = this.__createResizableTable(table);\\r\\n\\t\\t\\t\\t\\t\\tvar popUp = this.__createPopup(table);\\r\\n\\t\\t\\t\\t\\t\\tthis.__objTables[id] = {table: table,resizableTable: resizableTable,popUp: popUp};\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleMouseEvents = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = event.detail;\\r\\n\\t\\t\\tvar element = item.element;\\r\\n\\t\\t\\tvar parentElement = item.parentElement;\\r\\n\\t\\t\\tvar orignalEvent = item.orignalEvent;\\r\\n\\t\\t\\tvar cell = this.editorUtil.isCell(element) ? element : (this.editorUtil.isCell(parentElement) ? parentElement : null);\\r\\n\\t\\t\\tif(cell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar table = this.util.findParent(cell,\\\"TABLE\\\");\\r\\n\\t\\t\\t\\tvar id = table.getAttribute(this.__processedTableIDAttribute);\\r\\n\\t\\t\\t\\tif(id)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar popUp = this.__objTables[id].popUp;\\r\\n\\t\\t\\t\\t\\tif(popUp)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tswitch(orignalEvent.type)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tcase \\\"mousedown\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tpopUp.hide();\\r\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t\\tcase \\\"mouseup\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tthis.__highlightCell(cell,table);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tthis.selection.saveSelection();\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t/*var offset = {left: -40,top: 17}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tpopUp.show(cell,orignalEvent,offset);*/\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tpopUp.show(cell,orignalEvent);\\r\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleClickEvents = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__clearTableSelectedCells = function(table)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrCells = this.getSelectedCells(table);\\r\\n\\t\\t\\tfor(var count = 0;count < arrCells.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(arrCells[count],this.CLASS_SELECTED_CELL);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__highlightCell = function(cell,table)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar textArea = this.nsEditor.__getTextArea();\\r\\n\\t\\t\\tthis.__clearTableSelectedCells();\\r\\n\\t\\t\\tif(cell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(cell,this.CLASS_SELECTED_CELL);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createResizableTable = function(table)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting = {getRowCallback: this.__getRow.bind(this)};\\r\\n\\t\\t\\tvar nsResizableTable = new NSResizableTable(table,setting,this.nsEditor.__getDocument());\\r\\n\\t\\t\\treturn nsResizableTable;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createPopup = function(table)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting = {title: \\\"Edit Table\\\",enableArrow: true,contentCallback: this.__getPopUpBody.bind(this,table)};\\r\\n\\t\\t\\tvar inlinePopUp = this.nsEditor.__getUtilInstance(\\\"inlinePopup\\\",\\\"tablePopUp\\\",this.name,this,setting);\\r\\n\\t\\t\\tthis.util.addEvent(table,\\\"click\\\",this.__tblClickHandler.bind(this));\\r\\n\\t\\t\\treturn inlinePopUp;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__tblClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.editorUtil.stopEvent(event);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getRow = function(table,objResizableTable)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(table && table.tBodies && table.tBodies.length > 0 && table.tBodies[0].rows && table.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn table.tBodies[0].rows[0];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getPopUpBody = function(table,container,objPopup,objTablePluggin)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar index = 0;\\r\\n\\t\\t\\tfor(var key in this.__objMenu)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = this.__objMenu[key];\\r\\n\\t\\t\\t\\tvar arrSubMenu = null;\\r\\n\\t\\t\\t\\tif(index % 3 == 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar compSep = objPopup.getHorizontalSeparator();\\r\\n\\t\\t\\t\\t\\tcontainer.appendChild(compSep);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(item.subMenu && item.subMenu.length)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrSubMenu = this.__getSubMenu(table,objPopup,item.subMenu,item,key);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar menu = this.__createMenuItem(table,objPopup,item.html,item.toolTip,arrSubMenu,item,key);\\r\\n\\t\\t\\t\\tcontainer.appendChild(menu);\\r\\n\\t\\t\\t\\tindex++;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createMenuItem = function(table,objPopup,contentHtml,tooltip,subMenu,item,menuName)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar handler = (subMenu && subMenu.length) ? null : this.__menuClickHandler.bind(this,table,item,null,menuName);\\r\\n\\t\\t\\tvar menu = objPopup.getMenuItem(null,null,contentHtml,tooltip,subMenu,handler);\\r\\n\\t\\t\\treturn menu;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getSubMenu = function(table,objPopup,arrSubMenu,parentItem,parentMenu)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrRet = [];\\r\\n\\t\\t\\tfor(var count = 0;count < arrSubMenu.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrSubMenu[count];\\r\\n\\t\\t\\t\\tvar handler = this.__menuClickHandler.bind(this,table,item,parentItem,parentMenu);\\r\\n\\t\\t\\t\\tvar anchor = objPopup.getSubMenuItem(null,null,item.label,item.toolTip,handler);\\r\\n\\t\\t\\t\\tarrRet.push(anchor);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrRet;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__menuClickHandler = function(table,item,parentItem,parentMenuName,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar textArea = this.nsEditor.__getTextArea();\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t/*var cell = this.editorUtil.isCell(event.target) ? event.target : this.util.findParentByCallback(event.target,function(node){\\r\\n\\t\\t\\t\\tnode && self.editorUtil.isCell(node);\\r\\n\\t\\t\\t},textArea);*/\\r\\n\\t\\t\\tvar arrCells = this.getSelectedCells(table);\\r\\n\\t\\t\\tif(arrCells && arrCells.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cell = arrCells[0];\\r\\n\\t\\t\\t\\tvar row = this.util.findParent(cell,\\\"TR\\\");\\r\\n\\t\\t\\t\\tvar rowIndex = row.rowIndex;\\r\\n\\t\\t\\t\\tvar cellIndex = cell.cellIndex;\\r\\n\\t\\t\\t\\tthis.selection.restoreSelection();\\r\\n\\t\\t\\t\\tif(parentItem && parentItem.subMenuClickHandler)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tparentItem.subMenuClickHandler(arrCells,row,table,cellIndex,rowIndex,item,parentItem,parentMenuName,event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(item && item.menuClickHandler)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem.menuClickHandler(arrCells,row,table,cellIndex,rowIndex,item,parentMenuName,event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.warning(\\\"NSEditor\\\",\\\"Selected Cell is not found in Editor\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__rowClickHandler = function(arrCells,row,table,cellIndex,rowIndex,item,parentItem,parentMenuName,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar callback = function(newCell,newRow,paramTable,colIndex,rowReference,isInsertBelow)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.util.removeStyleClass(newCell,self.CLASS_SELECTED_CELL);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tswitch(item.key)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase \\\"above\\\":\\r\\n\\t\\t\\t\\t\\tthis.__tblUtil.insertRow(table,row,false,callback); \\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"below\\\":\\r\\n\\t\\t\\t\\t\\tthis.__tblUtil.insertRow(table,row,true,callback);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__refreshIndexInTable(table);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__columnClickHandler = function(arrCells,row,table,cellIndex,rowIndex,item,parentItem,parentMenuName,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar callback = function(newCell,paramTable,refIndex,isInsertAfter)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.util.removeStyleClass(newCell,self.CLASS_SELECTED_CELL);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tswitch(item.key)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase \\\"before\\\":\\r\\n\\t\\t\\t\\t\\tthis.__tblUtil.insertColumn(table,cellIndex,false,callback); \\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"after\\\":\\r\\n\\t\\t\\t\\t\\tthis.__tblUtil.insertColumn(table,cellIndex,true,callback); \\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__refreshIndexInTable(table);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__cellClickHandler = function(arrCells,row,table,cellIndex,rowIndex,item,parentItem,parentMenuName,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tswitch(item.key)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase \\\"mergeCells\\\":\\r\\n\\t\\t\\t\\t\\tthis.__tblUtil.mergeSelectedCells(arrCells,table);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"verticalSplit\\\":\\r\\n\\t\\t\\t\\t\\tthis.__tblUtil.splitCellsVertical(arrCells,table);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"horizontalSplit\\\":\\r\\n\\t\\t\\t\\t\\tthis.__tblUtil.splitCellsHorizontal(arrCells,table);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__clearTableSelectedCells(table);\\r\\n\\t\\t\\tthis.__refreshIndexInTable(table);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__alignClickHandler = function(arrCells,row,table,cellIndex,rowIndex,item,parentItem,parentMenuName,event)\\r\\n\\t\\t{\\t\\t\\t\\r\\n\\t\\t\\tswitch(item.key)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase \\\"top\\\":\\r\\n\\t\\t\\t\\tcase \\\"middle\\\":\\r\\n\\t\\t\\t\\tcase \\\"bottom\\\":\\r\\n\\t\\t\\t\\tcase \\\"normal\\\":\\r\\n\\t\\t\\t\\t\\tthis.__objUIFunc.setVerticalAlignForNodes(item.key,arrCells);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"left\\\":\\r\\n\\t\\t\\t\\tcase \\\"right\\\":\\r\\n\\t\\t\\t\\tcase \\\"center\\\":\\r\\n\\t\\t\\t\\tcase \\\"justify\\\":\\r\\n\\t\\t\\t\\t\\tthis.__objUIFunc.setHorizontalAlignForNodes(item.key,arrCells);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__removeClickHandler = function(arrCells,row,table,cellIndex,rowIndex,item,parentItem,parentMenuName,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tswitch(item.key)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase \\\"table\\\":\\r\\n\\t\\t\\t\\t\\tthis.editorUtil.removeNode(table);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"row\\\":\\r\\n\\t\\t\\t\\t\\tthis.__tblUtil.removeRow(table,rowIndex);\\r\\n\\t\\t\\t\\t\\tthis.__refreshIndexInTable(table);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"column\\\":\\r\\n\\t\\t\\t\\t\\tthis.__tblUtil.removeColumn(table,cellIndex);\\r\\n\\t\\t\\t\\t\\tthis.__refreshIndexInTable(table);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"cell\\\":\\r\\n\\t\\t\\t\\t\\tfor(var cellIndex = 0;cellIndex < arrCells.length;cellIndex++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar cell = arrCells[cellIndex];\\r\\n\\t\\t\\t\\t\\t\\tthis.util.removeAllChildren(cell);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__headerClickHandler = function(arrCells,row,table,cellIndex,rowIndex,item,menuName,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__refreshIndexInTable = function(table)\\r\\n\\t\\t{\\r\\n\\t\\t\\tNSEditorTable.setIndexInTable(table);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.registerPlugin(\\\"tablePluggins\\\",NSTablePluggins);\\r\\n\\t\\r\\n\\treturn NSTablePluggins;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSTablePluggins\\\",NSTablePluggins);var NSEditorSearchReplace = (function()\\r\\n{\\r\\n\\tvar NSEditorSearchReplace = function(nsEditor)\\r\\n\\t{\\r\\n\\t\\tthis.__nsEditor = nsEditor;\\r\\n\\t\\tthis.util = nsEditor.util;\\r\\n\\t\\tthis.editorUtil = nsEditor.editorUtil;\\r\\n\\t\\t\\r\\n\\t\\tthis.__refsSearch = {};\\r\\n\\t\\tthis.__selSearchElement = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.setSettings = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.__nsEditor.__toolBarButton[\\\"searchReplace\\\"] ={html:\\\"<i class='ns-icon ns-editor-search' aria-hidden='true'></i>\\\",tooltip:\\\"Search Or Replace\\\",showAsMenu: true,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t   \\t\\t\\tisDropdown:true,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t   \\t\\t\\tdataSource:[{value:\\\"Search\\\",html:\\\"<span>Search</span>\\\",tooltip:\\\"Search\\\",shortKey:\\\"ctrl+f\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t   \\t\\t\\t\\t  click:function(item,key,event)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  self.__searchClickHandler.call(self,event);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  }},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {value:\\\"Replace\\\",html:\\\"<span>Replace</span>\\\",tooltip:\\\"Replace\\\",shortKey:\\\"ctrl+h\\\",\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  click:function(item,key,event)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  self.__replaceClickHandler.call(self,event);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  }},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t],\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t   \\t\\t\\t\\t\\t  checkDisability: function(toolBarKey,toolBarItem,item,itemKey,isDefaultDisabled)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  if(itemKey === \\\"viewSourceCode\\\")\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  return true;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  return false;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t   }\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.componentsInitialized = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"stickyChanged\\\",this.__applySearchSticky.bind(this));\\r\\n\\t\\t\\tthis.__nsEditor.__listenInternalEvent(\\\"keydown mousedown\\\",function(event){\\r\\n\\t\\t\\t\\tif(self.__isSearchCompVisible()) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.__selSearchElement = self.selection.getElementUnderCursor();\\r\\n\\t\\t\\t\\t\\tself.__updateSearchCount();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.resized = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.destroy = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsTablePicker)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsTablePicker.remove();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__searchClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createSearchComponents();\\r\\n\\t\\t\\tthis.__showSearchComp();\\r\\n\\t\\t\\tthis.__hideReplaceComp();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__replaceClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__searchClickHandler();\\r\\n\\t\\t\\tthis.__showReplaceComp();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createSearchComponents = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__refsSearch.wrapper || !this.__refsSearch.wrapper.parentNode)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tthis.__setSearchContainer();\\r\\n\\t\\t\\t\\tthis.__nsEditor.__divTextAreaContainer.appendChild(this.__refsSearch.wrapper);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__refsSearch.close,\\\"click\\\",this.__hideSearchComp.bind(this));\\r\\n\\t\\t\\t\\tvar prevNextClick = this.__prevNextClickHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent([this.__refsSearch.previous,this.__refsSearch.next],\\\"click\\\",prevNextClick);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__refsSearch.moreoption,\\\"click\\\",this.__toggleReplaceComp.bind(this));\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__refsSearch.replaceButton,\\\"click\\\",this.__btnReplaceClickHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__refsSearch.replaceAllButton,\\\"click\\\",this.__btnReplaceAllClickHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__refsSearch.search,\\\"keydown\\\",this.util.debounce(function(event)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tevent = self.util.getEvent(event);\\r\\n\\t\\t\\t\\t\\tswitch (event.key) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcase self.util.KEYCODE.ENTER:\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tself.editorUtil.stopEvent(event);\\r\\n\\t\\t\\t\\t\\t\\t\\t/*if (editor.e.fire('searchNext')) {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tthis.close();\\r\\n\\t\\t\\t\\t\\t\\t\\t}*/\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tdefault:\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tself.__updateSearchCount();\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t},10));\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setSearchContainer = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar html = \\\"<div data-ns-ref=\\\\\\\"wrapper\\\\\\\" class=\\\\\\\"nsEditorSearchWrapper\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t <div class=\\\\\\\"nsEditorSearchContainer\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t<div class=\\\\\\\"nsEditorSearchContent\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t<div class=\\\\\\\"nsEditorSearchInputCountWrapper\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t<table cellpadding=\\\\\\\"0\\\\\\\" cellspacing=\\\\\\\"0\\\\\\\" class=\\\\\\\"nsEditorSearchInputCountOuterContainer\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t<tbody>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t\\t<tr>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t\\t\\t<td class=\\\\\\\"nsEditorSearchInputContainer\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t\\t\\t\\t<input data-ns-ref=\\\\\\\"search\\\\\\\" type=\\\\\\\"text\\\\\\\" spellcheck=\\\\\\\"false\\\\\\\" class=\\\\\\\"nsEditorSearchInput\\\\\\\" placeholder=\\\\\\\"Find\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t\\t\\t</td>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t\\t\\t<td class=\\\\\\\"nsEditorSearchCountContainer\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t\\t\\t\\t<span data-ns-ref=\\\\\\\"count\\\\\\\" class=\\\\\\\"nsEditorSearchCount\\\\\\\">0 of 0</span>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t\\t\\t</td>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t\\t</tr>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t</tbody>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t</table>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t</div>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t<div class=\\\\\\\"nsEditorSearchButtonContainer\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t<button data-ns-ref=\\\\\\\"next\\\\\\\" type=\\\\\\\"button\\\\\\\" tabindex=\\\\\\\"-1\\\\\\\" class=\\\\\\\"nsEditorSearchButton nsEditorSearchButtonNext\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t<span class=\\\\\\\"nsEditorSearchButtonIconWrap\\\\\\\">\\\" +\\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t\\t<i class=\\\\\\\"ns-icon ns-editor-next\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\"></i>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t</span>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t</button>\\\\r\\\\n\\\" +\\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t<button data-ns-ref=\\\\\\\"previous\\\\\\\" type=\\\\\\\"button\\\\\\\" tabindex=\\\\\\\"-1\\\\\\\" class=\\\\\\\"nsEditorSearchButton nsEditorSearchButtonPrevious\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t<span class=\\\\\\\"nsEditorSearchButtonIconWrap\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t\\t<i class=\\\\\\\"ns-icon ns-editor-prev\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\"></i>\\\\r\\\\n\\\" +\\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t</span>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t</button>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t</div>\\\\r\\\\n\\\" +\\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t<div class=\\\\\\\"nsEditorSearchButtonContainer\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t<button data-ns-ref=\\\\\\\"moreoption\\\\\\\" type=\\\\\\\"button\\\\\\\" tabindex=\\\\\\\"-1\\\\\\\" class=\\\\\\\"nsEditorSearchButton nsEditorSearchButtonMoreOption\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t<span class=\\\\\\\"nsEditorSearchButtonIconWrap\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t\\t<i data-ns-ref=\\\\\\\"moreoptionicon\\\\\\\" class=\\\\\\\"ns-icon ns-editor-expand-bold\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\"></i>\\\\r\\\\n\\\" +\\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t</span>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t</button>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t</div>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t<div class=\\\\\\\"nsEditorSearchButtonContainer\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t<button data-ns-ref=\\\\\\\"close\\\\\\\" type=\\\\\\\"button\\\\\\\" tabindex=\\\\\\\"-1\\\\\\\" class=\\\\\\\"nsEditorSearchButton nsEditorSearchButtonClose\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t<span class=\\\\\\\"nsEditorSearchButtonIconWrap\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t\\t<i class=\\\\\\\"ns-icon ns-editor-close-bold\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\"></i>\\\\r\\\\n\\\" +\\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t</span>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t</button>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t</div>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t</div>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"   \\t<div data-ns-ref=\\\\\\\"replaceWrapper\\\\\\\" class=\\\\\\\"nsEditorReplaceContainer\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t<input data-ns-ref=\\\\\\\"replaceInput\\\\\\\" class=\\\\\\\"nsEditorReplaceInput\\\\\\\" placeholder=\\\\\\\"Replace\\\\\\\" aria-label=\\\\\\\"Replace Field\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t<div class=\\\\\\\"nsEditorReplaceButtonWrapper\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t<span class=\\\\\\\"nsEditorReplaceButtonContainer\\\\\\\" tabindex=\\\\\\\"-1\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t<button data-ns-ref=\\\\\\\"replaceButton\\\\\\\" class=\\\\\\\"nsEditorReplaceButton nsEditorReplaceButtonReplace\\\\\\\">Replace</button>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t</span>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t<span class=\\\\\\\"nsEditorReplaceButtonContainer\\\\\\\" tabindex=\\\\\\\"-1\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t\\t<button data-ns-ref=\\\\\\\"replaceAllButton\\\\\\\" class=\\\\\\\"nsEditorReplaceButton nsEditorReplaceButtonReplaceAll\\\\\\\">Replace All</button>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t\\t</span>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t\\t</div>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"\\t\\t</div>\\\"\\r\\n\\t\\t\\t\\t\\t\\\"\\t</div>\\\\r\\\\n\\\" +\\r\\n\\t\\t\\t\\t\\t\\\"</div>\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tthis.__refsSearch = this.util.getReferenceFromHtml(html).refs;\\r\\n\\t\\t\\treturn this.__refsSearch.wrapper;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__prevNextClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__refsSearch.search.value && this.__refsSearch.search.value.trim().length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.editorUtil.stopEvent(event);\\r\\n\\t\\t\\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t\\t\\t\\tvar searchElement = this.selection.getElementUnderCursor();\\r\\n\\t\\t\\t\\tvar isNext = event.currentTarget == this.__refsSearch.next;\\r\\n\\t\\t\\t\\tthis.__searchTextSelect({startNode: searchElement || textArea.firstChild,text: this.__refsSearch.search.value,next:isNext});\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__btnReplaceClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__refsSearch.replaceInput.value && this.__refsSearch.replaceInput.value.trim().length && \\r\\n\\t\\t\\t\\t\\tthis.__refsSearch.search.value && this.__refsSearch.search.value.trim().length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.editorUtil.stopEvent(event);\\r\\n\\t\\t\\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t\\t\\t\\tvar searchElement = this.selection.getElementUnderCursor();\\r\\n\\t\\t\\t\\tthis.__searchTextReplace({startNode: searchElement || textArea.firstChild,text: this.__refsSearch.search.value,replaceText:this.__refsSearch.replaceInput.value});\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__btnReplaceAllClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__refsSearch.replaceInput.value && this.__refsSearch.replaceInput.value.trim().length && \\r\\n\\t\\t\\t\\t\\tthis.__refsSearch.search.value && this.__refsSearch.search.value.trim().length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.editorUtil.stopEvent(event);\\r\\n\\t\\t\\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t\\t\\t\\tvar searchElement = this.selection.getElementUnderCursor();\\r\\n\\t\\t\\t\\tsearchElement = searchElement || textArea.firstChild;\\r\\n\\t\\t\\t\\twhile(this.__searchTextReplace({startNode: searchElement,text: this.__refsSearch.search.value,replaceText:this.__refsSearch.replaceInput.value}))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsearchElement = this.selection.getElementUnderCursor();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__showSearchComp = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__isSearchCompVisible())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsEditor.__dispatchInternalEvent(\\\"hideAllPopup\\\",{container: this.__refsSearch.wrapper},{container: this.__refsSearch.wrapper});\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__refsSearch.wrapper,\\\"nsEditorSearchVisible\\\");\\r\\n\\t\\t\\t\\tthis.__applySearchSticky();\\r\\n\\t\\t\\t\\tthis.__selSearchElement = this.selection.getElementUnderCursor();\\r\\n\\t\\t\\t\\tvar selectedText = this.selection.getSelection() ? this.selection.getSelection().toString() : \\\"\\\";\\r\\n\\t\\t\\t\\tif (selectedText) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__refsSearch.search.value = selectedText;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__refsSearch.search.value = \\\"\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__updateSearchCount();\\r\\n\\t\\t\\t\\tselectedText ? this.__refsSearch.search.select() : this.__refsSearch.search.focus();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__hideSearchComp = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__refsSearch.wrapper,\\\"nsEditorSearchVisible\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isSearchCompVisible = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (this.__refsSearch.wrapper && this.__refsSearch.wrapper.parentNode && this.util.hasStyleClass(this.__refsSearch.wrapper,\\\"nsEditorSearchVisible\\\"));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__showReplaceComp = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__isReplaceCompVisible())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__refsSearch.replaceInput.value = \\\"\\\";\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__refsSearch.replaceWrapper,\\\"nsEditorReplaceContainerVisible\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__refsSearch.moreoptionicon,\\\"ns-editor-collapse-bold\\\");\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__refsSearch.moreoptionicon,\\\"ns-editor-expand-bold\\\"); \\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__hideReplaceComp = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__refsSearch.replaceWrapper,\\\"nsEditorReplaceContainerVisible\\\");\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__refsSearch.moreoptionicon,\\\"ns-editor-collapse-bold\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__refsSearch.moreoptionicon,\\\"ns-editor-expand-bold\\\"); \\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__toggleReplaceComp = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__isReplaceCompVisible() ? this.__hideReplaceComp() : this.__showReplaceComp();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isReplaceCompVisible = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (this.__refsSearch.replaceWrapper && this.__refsSearch.replaceWrapper.parentNode && this.util.hasStyleClass(this.__refsSearch.replaceWrapper,\\\"nsEditorReplaceContainerVisible\\\"));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t\\r\\n\\t\\tthis.__updateSearchCount = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__isSearchCompVisible())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__refsSearch.search.value.length ? this.util.addStyleClass(this.__refsSearch.count,\\\"nsEditorSearchCountVisible\\\") : this.util.removeStyleClass(this.__refsSearch.count,\\\"nsEditorSearchCountVisible\\\");\\r\\n\\t\\t\\t\\tvar objCount = this.__getTextCounts(this.__refsSearch.search.value);\\r\\n\\t\\t\\t\\tthis.__refsSearch.count.innerHTML = objCount.index + \\\"/\\\" + objCount.count;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__applySearchSticky = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isSticky = this.__nsEditor.__toolBar.isToolbarSticky();\\r\\n\\t\\t\\tif(this.__isSearchCompVisible())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar css = {};\\r\\n\\t\\t\\t\\tif(isSticky)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(this.__refsSearch.wrapper,\\\"nsEditorSearchWrapperSticky\\\");\\r\\n\\t\\t\\t\\t\\tvar rect = this.__nsEditor.__toolBar.__divToolBarContainer.getBoundingClientRect();\\r\\n\\t\\t\\t\\t\\t//css = {top: rect.top + rect.height,left: rect.left + rect.width};\\r\\n\\t\\t\\t\\t\\tcss = {top: rect.top + rect.height,right: rect.left};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeStyleClass(this.__refsSearch.wrapper,\\\"nsEditorSearchWrapperSticky\\\");\\r\\n\\t\\t\\t\\t\\tcss = {top: \\\"\\\",left: \\\"\\\",right: \\\"\\\"};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.util.css(this.__refsSearch.wrapper,css);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//calcCounts\\r\\n\\t\\tthis.__getTextCounts = function(text)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isInArray = function(paramBound,paramArrBound)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < paramArrBound.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar tempBound = paramArrBound[count];\\r\\n\\t\\t\\t\\t\\tif(tempBound.startContainer == paramBound.startContainer && tempBound.endContainer == paramBound.endContainer &&\\r\\n\\t\\t\\t\\t\\t\\ttempBound.startOffset == paramBound.startOffset && tempBound.endOffset == paramBound.endOffset)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar objRet = {index: 0,count: 0};\\r\\n\\t\\t\\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t\\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t\\t\\tvar range = this.selection.getRange();\\r\\n\\t\\t\\tvar startNode = textArea.firstChild;\\r\\n\\t\\t\\tvar arrBound = [];\\r\\n\\t\\t\\tvar bound = null;\\r\\n\\t\\t\\twhile(startNode && text.length) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbound = this.__searchText({startNode: startNode,text: text,next: true,deep: 0,range: (bound || doc.createRange())});\\r\\n\\t\\t\\t\\tif(bound)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (isInArray(bound,arrBound)) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tarrBound.push(bound);\\r\\n\\t\\t\\t\\t\\tstartNode = bound.startContainer;\\r\\n\\t\\t\\t\\t\\tobjRet.count++;\\r\\n\\t\\t\\t\\t\\tif (range && isInArray(range, [bound])) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tobjRet.index = objRet.count;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstartNode = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn objRet;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//objParam has properties startNode,text,next,deep,range\\r\\n\\t\\t//find\\r\\n\\t\\tthis.__searchText = function(objParam)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (objParam.startNode && objParam.text.length) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t\\t\\t\\tobjParam.sentence = \\\"\\\";\\r\\n\\t\\t\\t\\tobjParam.bound = {startContainer: null,startOffset: null,endContainer: null,endOffset: null};\\r\\n\\t\\t\\t\\tvar siblingProperty = objParam.next ? \\\"nextSibling\\\" : \\\"previousSibling\\\";\\r\\n\\t\\t\\t\\tvar childProperty = objParam.next ? \\\"firstChild\\\" : \\\"lastChild\\\";\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tthis.util.findNodeWithCurrent(objParam.startNode,function(node) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(node && self.__isSearchNode.call(self,objParam,node))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn false;\\r\\n\\t            },textArea,siblingProperty,childProperty);\\r\\n\\t\\t\\t\\tif (objParam.bound.startContainer && objParam.bound.endContainer) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn objParam.bound;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (!objParam.deep) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__selSearchElement = objParam.next ? textArea.firstChild : textArea.lastChild;\\r\\n\\t\\t\\t\\t\\treturn this.__searchText({startNode: this.__selSearchElement,text: objParam.text,next: objParam.next,deep: objParam.deep + 1,range: objParam.range});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//objParam has properties text,next,deep,range,sentence,bound\\r\\n\\t\\tthis.__isSearchNode = function(objParam,paramNode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (this.util.isTextNode(paramNode) && paramNode.nodeValue != null && paramNode.nodeValue.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar win = this.__nsEditor.__getWindow();\\r\\n\\t\\t\\t\\tvar value = paramNode.nodeValue;\\r\\n\\t\\t\\t\\tif (!objParam.next && paramNode === objParam.range.startContainer) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvalue = !objParam.deep ? value.substr(0, objParam.range.startOffset) : value.substr(objParam.range.endOffset);\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse if (objParam.next && paramNode === objParam.range.endContainer) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvalue = !objParam.deep ? value.substr(objParam.range.endOffset) : value.substr(0, objParam.range.startOffset);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar tmpSentence = objParam.next ? objParam.sentence + value : value + objParam.sentence;\\r\\n\\t\\t\\t\\tvar part = this.__searchSomePart(objParam.text,tmpSentence,objParam.next);\\r\\n\\t\\t\\t\\tif(part != false) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar currentPart = this.__searchSomePart(objParam.text,value,objParam.next);\\r\\n\\t\\t\\t\\t\\tif (currentPart === true) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcurrentPart = this.editorUtil.trim(objParam.text);\\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\telse if(currentPart === false) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcurrentPart = this.__searchSomePart(value,objParam.text,objParam.next);\\r\\n\\t\\t\\t\\t\\t\\tif (currentPart === true) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tcurrentPart = this.editorUtil.trim(value);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar currentPartIndex = this.__searchSomePartIndex(objParam.text,value,objParam.next) || 0;\\r\\n\\t\\t\\t\\t\\tif(((objParam.next && !objParam.deep) || (!objParam.next && objParam.deep)) && paramNode.nodeValue.length - value.length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcurrentPartIndex += paramNode.nodeValue.length - value.length;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (objParam.bound.startContainer == null) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tobjParam.bound.startContainer = paramNode;\\r\\n\\t\\t\\t\\t\\t\\tobjParam.bound.startOffset = currentPartIndex;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (part !== true) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tobjParam.sentence = tmpSentence;\\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tobjParam.bound.endContainer = paramNode;\\r\\n\\t\\t\\t\\t\\t\\tobjParam.bound.endOffset = currentPartIndex;\\r\\n\\t\\t\\t\\t\\t\\tobjParam.bound.endOffset += currentPart.length;\\r\\n\\t\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjParam.sentence = \\\"\\\";\\r\\n\\t\\t\\t\\t\\tobjParam.bound = {startContainer: null,startOffset: null,endContainer: null,endOffset: null};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if (this.editorUtil.isBlock(paramNode,win) && objParam.sentence != \\\"\\\") \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjParam.sentence = objParam.next ? objParam.sentence + \\\" \\\" : \\\" \\\" + objParam.sentence;\\r\\n\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//objParam has properties startNode,text,next\\r\\n\\t\\t//findAndSelect\\r\\n\\t\\tthis.__searchTextSelect = function(objParam)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t\\t\\tobjParam.range = this.selection.getRange();\\r\\n\\t\\t\\tobjParam.deep = 0;\\r\\n\\t\\t\\tvar bound = this.__searchText(objParam);\\r\\n\\t\\t\\tif (bound && bound.startContainer && bound.endContainer) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar range = doc.createRange();\\r\\n\\t\\t\\t\\ttry \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trange.setStart(bound.startContainer,bound.startOffset);\\r\\n\\t\\t\\t\\t\\trange.setEnd(bound.endContainer,bound.endOffset);\\r\\n\\t\\t\\t\\t\\tthis.selection.selectRange(range);\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\tcatch (error) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconsole.debug(error);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__scrollToNode(bound.startContainer);\\r\\n\\t\\t\\t\\tthis.__selSearchElement = bound.startContainer;\\r\\n\\t\\t\\t\\tthis.__updateSearchCount();\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//objParam has properties startNode,text,replaceText\\r\\n\\t\\t//findAndReplace\\r\\n\\t\\tthis.__searchTextReplace = function(objParam)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar doc = this.__nsEditor.__getDocument();\\r\\n\\t\\t\\tobjParam.next = true;\\r\\n\\t\\t\\tobjParam.range = this.selection.getRange();\\r\\n\\t\\t\\tobjParam.deep = 0;\\r\\n\\t\\t\\tvar bound = this.__searchText(objParam);\\r\\n\\t\\t\\tif (bound && bound.startContainer && bound.endContainer) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar range = doc.createRange();\\r\\n\\t\\t\\t\\ttry \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trange.setStart(bound.startContainer,bound.startOffset);\\r\\n\\t\\t\\t\\t\\trange.setEnd(bound.endContainer,bound.endOffset);\\r\\n\\t\\t\\t\\t\\trange.deleteContents();\\r\\n\\t\\t\\t\\t\\tvar textNode = doc.createTextNode(objParam.replaceText);\\r\\n\\t\\t\\t\\t\\trange.insertNode(textNode);\\r\\n\\t\\t\\t\\t\\tthis.selection.selectElement(textNode);\\r\\n\\t\\t\\t\\t\\tthis.__scrollToNode(textNode);\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\tcatch (error) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconsole.debug(error);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__updateSearchCount();\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__searchSomePart = function(text,sentence,start,getIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tstart = this.util.isUndefinedOrNull(start) ? true : Boolean.parse(start);\\r\\n\\t\\t\\tgetIndex = Boolean.parse(getIndex);\\r\\n\\t\\t\\ttext = this.editorUtil.trim(text.toLowerCase());\\r\\n\\t\\t\\tsentence = sentence.toLowerCase();\\r\\n\\r\\n\\t\\t\\tvar textIndex = start ? 0 : text.length - 1;\\r\\n\\t\\t\\tvar length = 0;\\r\\n\\t\\t\\tvar startAtIndex = null;\\r\\n\\t\\t\\tvar inc = start ? 1 : -1;\\r\\n\\t\\t\\tvar tmp = [];\\r\\n\\r\\n\\t\\t\\tfor (var count = (start ? 0 : sentence.length - 1); !this.util.isUndefined(sentence[count]);count += inc) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar some = (text[textIndex] === sentence[count]);\\r\\n\\t\\t\\t\\tif (some || (startAtIndex != null && this.editorUtil.SPACE_REG_EXP.test(sentence[count]))) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (startAtIndex == null || !start) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tstartAtIndex = count;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\ttmp.push(sentence[count]);\\r\\n\\t\\t\\t\\t\\tif(some) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tlength += 1;\\r\\n\\t\\t\\t\\t\\t\\ttextIndex += inc;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstartAtIndex = null;\\r\\n\\t\\t\\t\\t\\ttmp.length = 0;\\r\\n\\t\\t\\t\\t\\tlength = 0;\\r\\n\\t\\t\\t\\t\\ttextIndex = start ? 0 : text.length - 1;\\r\\n\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\tif (length === text.length) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn getIndex ? startAtIndex : true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (getIndex) \\r\\n\\t\\t\\t{\\r\\n\\t            return this.util.isUndefinedOrNull(startAtIndex) ? startAtIndex : false;\\r\\n\\t        }\\r\\n\\t\\t\\tif(tmp.length) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn start ? tmp.join('') : tmp.reverse().join('');\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__searchSomePartIndex = function(text,sentence,start)\\r\\n\\t\\t{\\r\\n\\t\\t\\tstart = this.util.isUndefinedOrNull(start) ? true : Boolean.parse(start);\\r\\n\\t        return this.__searchSomePart(text,sentence,start,true);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__scrollToNode = function(node)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar textArea = this.__nsEditor.__getTextArea();\\r\\n\\t\\t\\tvar parent = this.editorUtil.getClosestElement(node,this.util.isElement,textArea);\\r\\n\\t\\t\\tif (!parent) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparent = this.util.findPrevNode(node,this.util.isElement,textArea);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(parent && parent != textArea)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparent.scrollIntoView();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSEditor.prototype.registerPlugin(\\\"searchReplace\\\",NSEditorSearchReplace);\\r\\n\\t\\r\\n\\treturn NSEditorSearchReplace;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSEditorSearchReplace\\\",NSEditorSearchReplace);\";","export const NSGridCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\nvar svgRef = require('./nsSVG.min.js');\\r\\nvar NSSvg = svgRef.NSSvg;\\r\\nvar NSSvgShapes = svgRef.NSSvgShapes;\\r\\nvar plugginsRef = require('./nsPluggins.min.js');\\r\\nvar nsTextEditor = plugginsRef.nsTextEditor;\\r\\nvar nsTextAreaEditor = plugginsRef.nsTextAreaEditor;\\r\\nvar NSCellSelection = plugginsRef.NSCellSelection;\\r\\nvar NSTableCellNavigator = plugginsRef.NSTableCellNavigator;\\r\\nvar dateutilRef = require('./nsDateUtil.min.js');\\r\\nvar NSDateUtil = dateutilRef.NSDateUtil;\\r\\n\\r\\n\\t\\t}\\r\\n \\\"use strict\\\"; \\r\\nvar NSMenu = (function()\\r\\n{\\r\\n\\tfunction NSMenu(setting) \\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.DEFAULT_POSITION = this.util.POS_BOTTOMRIGHT;\\r\\n\\t\\t\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__id = null;\\r\\n\\t\\tthis.__popUp = null;\\r\\n\\t\\tthis.__nsPopUp = null;\\r\\n\\t\\tthis.__fieldItem = null;\\r\\n\\t\\tthis.__fieldItemChild = null;\\r\\n\\t\\tthis.__fieldChild = \\\"children\\\";\\r\\n\\t\\tthis.__isInternalCall = false;\\r\\n\\t\\tthis.__suppressDocumentHandler = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentClickRef = null;\\r\\n\\t\\tthis.__documentKeyUpRef = null;\\r\\n\\t\\tthis.__lastSelectedTarget = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSMenu.prototype.create = function (dataSource) \\r\\n\\t{ \\r\\n\\t\\tif(dataSource && (this.__config.createRunTime || this.__isInternalCall))\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__popUp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.remove();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__isInternalCall = false;\\r\\n\\t\\t\\tthis.__config.dataSource = dataSource;\\r\\n\\t\\t\\tthis.__popUp = this.__createElement(true,this.__config.dataSource);\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__nsPopUp,\\\"nsMainMenu\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.remove = function () \\r\\n\\t{ \\r\\n\\t\\tif(this.__config.createRunTime || this.__isInternalCall)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isInternalCall = false;\\r\\n\\t\\t\\tthis.__nsPopUp.remove();\\r\\n\\t\\t\\tthis.__popUp = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.show = function (event) \\r\\n\\t{ \\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__nsPopUp.hideOtherNSPopUp();\\r\\n\\t\\tif(this.__config.createRunTime)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isInternalCall = true;\\r\\n\\t\\t\\tvar dataSource = null;\\r\\n\\t\\t\\tif(this.__config.sourceProvider)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdataSource = this.__config.sourceProvider(this.__lastSelectedTarget);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(dataSource && dataSource.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.create(dataSource);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.preventDefault(event);\\r\\n\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__nsPopUp.show();\\r\\n\\t\\tthis.__nsPopUp.placePopUp(event);\\r\\n\\t\\tif(!this.__documentClickRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__documentClickRef = this.__documentClickHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document.documentElement,\\\"click\\\", this.__documentClickRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__documentKeyUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__documentKeyUpRef = this.__documentKeyUpHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document.documentElement,\\\"keyup\\\", this.__documentKeyUpRef);\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.preventDefault(event);\\r\\n\\t};\\r\\n\\tNSMenu.prototype.hide = function() \\r\\n\\t{\\r\\n\\t\\tthis.__lastSelectedTarget = null;\\r\\n\\t\\tthis.__hideAllSubMenus();\\r\\n\\t\\tif(this.__config.createRunTime)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isInternalCall = true;\\r\\n\\t\\t\\tthis.remove();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsPopUp.hide();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__documentClickRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document.documentElement,\\\"click\\\", this.__documentClickRef, false);\\r\\n\\t\\t\\tthis.__documentClickRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__documentKeyUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document.documentElement,\\\"keyup\\\", this.__documentKeyUpRef, false);\\r\\n\\t\\t\\tthis.__documentKeyUpRef = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__initialize = function ()\\r\\n\\t{\\r\\n\\t\\tif(this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//eventHandler:extra eventHandler which developer wants to execute on the event i.e. click,customEvent etc\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\tparent: this.__setting[\\\"parent\\\"] || null,\\r\\n\\t\\t\\t\\t\\tdataSource: this.__setting[\\\"dataSource\\\"] || null,\\r\\n\\t\\t\\t\\t\\tisContextMenu: (this.util.isUndefined(this.__setting[\\\"isContextMenu\\\"]) || this.__setting[\\\"isContextMenu\\\"] === null) ? true : Boolean.parse(this.__setting[\\\"isContextMenu\\\"]),\\r\\n\\t\\t\\t\\t\\teventType: this.__setting[\\\"eventType\\\"] || \\\"click\\\",\\r\\n\\t\\t\\t\\t\\tcreateRunTime: (this.util.isUndefined(this.__setting[\\\"createRunTime\\\"]) || this.__setting[\\\"createRunTime\\\"] === null) ? false : Boolean.parse(this.__setting[\\\"createRunTime\\\"]),\\r\\n\\t\\t\\t\\t\\tsourceProvider: this.__setting[\\\"sourceProvider\\\"] || null,\\r\\n\\t\\t\\t\\t\\ttargetType: this.__setting[\\\"targetType\\\"] || null,\\r\\n\\t\\t\\t\\t\\tdefaultHandler: (this.__setting[\\\"defaultHandler\\\"] ? this.util.getFunction(this.__setting[\\\"defaultHandler\\\"]) : null),\\r\\n\\t\\t\\t\\t\\teventHandler: (this.__setting[\\\"eventHandler\\\"] ? this.util.getFunction(this.__setting[\\\"eventHandler\\\"]) : null),\\r\\n\\t\\t\\t\\t\\tposition: this.__setting[\\\"position\\\"] || this.DEFAULT_POSITION,\\r\\n\\t\\t\\t\\t\\twidth: parseInt(this.__setting[\\\"width\\\"]) || -1\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\tif(this.__config.parent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar popUpSetting = {id:this.__getID() + \\\"menu\\\",type:\\\"ul\\\",width:this.__config.width,position:this.__config.position};\\r\\n\\t\\t\\t\\tthis.__nsPopUp = new this.util.nsPopUp(popUpSetting);\\r\\n\\t\\t\\t\\tthis.__fieldItem = this.__getID() + \\\"_item\\\";\\r\\n\\t\\t\\t\\tthis.__fieldItemChild = this.__getID() + \\\"_child\\\";\\r\\n\\t\\t\\t\\tif(!this.__config.createRunTime)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__isInternalCall = true;\\r\\n\\t\\t\\t\\t\\tthis.create(this.__config.dataSource);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__config.isContextMenu)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__config.parent,\\\"contextmenu\\\", this.__parentContextMenuHandler.bind(this));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__config.parent,this.__config.eventType, this.__parentClickHandler.bind(this),false);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__createElement = function(isRoot,dataSource) \\r\\n\\t{\\r\\n\\t\\tvar parentNode = null;\\r\\n\\t\\tif(dataSource && dataSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isRoot)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparentNode = this.__nsPopUp.create();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparentNode = document.createElement(\\\"ul\\\"); \\r\\n\\t\\t\\t\\tthis.util.addStyleClass(parentNode,\\\"nsMenu\\\");\\r\\n\\t\\t\\t\\tif(this.__config.width > -1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tparentNode.style.width = this.__config.width + \\\"px\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor (var count = 0; count < dataSource.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t\\tthis.__createItem(item,parentNode);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn parentNode;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__createItem = function(item,parent)\\r\\n\\t{\\r\\n\\t\\tvar menuItem = null;\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tmenuItem = document.createElement(\\\"li\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(menuItem,\\\"nsMenuItem\\\");\\r\\n\\t\\t\\tif(item[\\\"header\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(menuItem,\\\"nsHeader\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(item[\\\"disabled\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(menuItem,\\\"nsDisabled\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar button = document.createElement(\\\"BUTTON\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(button,\\\"nsMenuButton\\\");\\r\\n\\t\\t\\tif(item[\\\"iconHTML\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar spanIcon = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(spanIcon,\\\"nsMenuAlign\\\");\\r\\n\\t\\t\\t\\tspanIcon.innerHTML = item[\\\"iconHTML\\\"];\\r\\n\\t\\t\\t\\tbutton.appendChild(spanIcon);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar spanText = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(spanText,\\\"nsMenuText\\\");\\r\\n\\t\\t\\tspanText.appendChild(document.createTextNode(item[\\\"title\\\"]));\\r\\n\\t\\t\\tbutton.appendChild(spanText);\\r\\n\\t\\t\\tmenuItem.appendChild(button);\\r\\n\\t\\t\\tthis.util.addEvent(menuItem,\\\"click\\\",this.__itemClickHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(menuItem,\\\"mouseenter\\\",this.__itemMouseOverHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(menuItem,\\\"mouseleave\\\",this.__itemMouseOutHandler.bind(this));\\r\\n\\t\\t\\tif(item[this.__fieldChild]) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(menuItem,\\\"nsSubMenu\\\");\\r\\n\\t\\t    \\tvar subMenu = this.__createElement(false,item[this.__fieldChild]);\\r\\n\\t\\t    \\tif(subMenu)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.util.addStyleClass(subMenu,\\\"nsSubMenuContainer\\\");\\r\\n\\t\\t\\t    \\tmenuItem.appendChild(subMenu);\\r\\n\\t\\t\\t    \\titem[this.__fieldItemChild] = subMenu;\\r\\n\\t\\t\\t    \\tmenuItem.setAttribute(\\\"hasChild\\\",true);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tmenuItem.setAttribute(\\\"hasChild\\\",false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(parent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparent.appendChild(menuItem);\\r\\n\\t\\t\\t\\tif(item[\\\"separatorBelow\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar lineMenuItem = document.createElement(\\\"li\\\");\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(lineMenuItem,\\\"nsMenuSeparator\\\");\\r\\n\\t\\t\\t\\t\\tparent.appendChild(lineMenuItem);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem[this.__fieldItem] = menuItem;\\r\\n\\t\\t}\\r\\n\\t\\treturn menuItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__itemClickHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"LI\\\");\\r\\n\\t\\tvar item = this.__getItem(target,this.__config.dataSource);\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar handler = null;\\r\\n\\t\\t\\tif(item[\\\"handler\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\thandler = this.util.getFunction(item[\\\"handler\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!handler)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\thandler = this.__config.defaultHandler;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(handler)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\thandler(this.__lastSelectedTarget,item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.hide();\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__itemMouseOverHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"LI\\\");\\r\\n\\t\\tif(target.getAttribute(\\\"hasChild\\\") === \\\"true\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItem(target,this.__config.dataSource);\\r\\n\\t\\t\\tif(item && item[this.__fieldItemChild])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar childMenu = item[this.__fieldItemChild];\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(childMenu,\\\"nsShowMenu\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__itemMouseOutHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"LI\\\");\\r\\n\\t\\tif(target.getAttribute(\\\"hasChild\\\") === \\\"true\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItem(target,this.__config.dataSource);\\r\\n\\t\\t\\tif(item && item[this.__fieldItemChild])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar childMenu = item[this.__fieldItemChild];\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(childMenu,\\\"nsShowMenu\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__documentClickHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t/*if(!this.__config.isContextMenu && this.__isParentPresent(event.target,this.__config.parent))\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t}*/\\r\\n\\t\\t//commenting this so that menu closes on click in Grid\\r\\n\\t\\t/*if(this.__suppressDocumentHandler)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__suppressDocumentHandler = false;\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t}*/\\r\\n\\t\\tthis.hide();\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSMenu.prototype.__documentKeyUpHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tif(event.keyCode === this.util.KEYCODE.ESC) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.hide();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__parentContextMenuHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.eventHandler)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.eventHandler(event);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__setLastSelectedTarget(this.util.getTarget(event));\\r\\n\\t\\tthis.show(event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__parentClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.eventHandler)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.eventHandler(event);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__setLastSelectedTarget(this.util.getTarget(event));\\r\\n\\t\\t//below condition to make documentClickhandler aware that do not hide the menu,hence put only for click handler\\r\\n\\t\\tif(this.__config.eventType === \\\"click\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__suppressDocumentHandler = true;\\r\\n\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t}\\r\\n\\t\\tthis.show(event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__getItem = function(objItem,dataSource)\\r\\n\\t{\\r\\n\\t\\tif(objItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor (var count = 0; count < dataSource.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t\\tif(item[this.__fieldItem] == objItem)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(item.hasOwnProperty(this.__fieldChild))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar childItem = this.__getItem(objItem,item[this.__fieldChild]);\\r\\n\\t\\t\\t\\t\\tif(childItem)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn childItem;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__hideAllSubMenus = function()\\r\\n\\t{\\r\\n\\t\\tvar arrSubMenus = this.__popUp.querySelectorAll(\\\"ul\\\");\\r\\n\\t\\tif(arrSubMenus && arrSubMenus.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar subMenu = null;\\r\\n\\t\\t\\tfor(var count = 0;count < arrSubMenus.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsubMenu = arrSubMenus[count];\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(subMenu,\\\"nsShowMenu\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__setLastSelectedTarget = function(target)\\r\\n\\t{\\r\\n\\t\\tif(target && this.__config.targetType)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttarget = this.util.findParent(target,this.__config.targetType);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__lastSelectedTarget = target;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__getID = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__id)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.parent.hasAttribute(\\\"id\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = this.__config.parent.getAttribute(\\\"id\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__config.parent.hasAttribute(\\\"name\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = this.__config.parent.getAttribute(\\\"name\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = \\\"comp\\\" + this.util.getUniqueId();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__id;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__isParentPresent =  function(node,parentNode) \\r\\n\\t{\\r\\n\\t\\twhile (node && node!== document.body)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(node.id === parentNode.id) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tnode = node.parentNode;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSMenu;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSMenu\\\",NSMenu); \\\"use strict\\\";\\r\\nvar NSPagination = (function()\\r\\n{\\r\\n\\tfunction NSPagination(setting) \\r\\n\\t{\\r\\n\\t\\tthis.PAGE_CLICK = \\\"pageClick\\\";\\r\\n\\t\\tthis.PAGE_CHANGE = \\\"pageChange\\\";\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\t\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__id = null;\\r\\n\\t\\tthis.__container = null;\\r\\n\\t\\tthis.__itemFirst = null;\\r\\n\\t\\tthis.__itemLast = null;\\r\\n\\t\\tthis.__itemPrev = null;\\r\\n\\t\\tthis.__itemNext = null;\\r\\n\\t\\tthis.__arrItemPage = [];\\r\\n\\t\\tthis.__pageCount = 0;\\r\\n\\t\\tthis.__selectedPage = -1;\\r\\n\\t\\tthis.__initialize();\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSPagination.prototype.__initialize = function ()\\r\\n\\t{\\r\\n\\t\\tif(this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\tparent: this.__setting[\\\"parent\\\"] || null,\\r\\n\\t\\t\\t\\t\\ttotalRecords: parseInt(this.__setting[\\\"totalRecords\\\"]) || 0,\\r\\n\\t\\t\\t\\t\\tpageSize: parseInt(this.__setting[\\\"pageSize\\\"]) || 0,\\r\\n\\t\\t\\t\\t\\ttotalPageCount: parseInt(this.__setting[\\\"totalPageCount\\\"]) || 0,\\r\\n\\t\\t\\t\\t\\tvisiblePages: parseInt(this.__setting[\\\"visiblePages\\\"]) || 5,\\r\\n\\t\\t\\t\\t\\tcontainerStyle: this.__setting[\\\"containerStyle\\\"] || \\\"nsPaginationContainer\\\",\\r\\n\\t\\t\\t\\t\\tactiveStyle: this.__setting[\\\"activeStyle\\\"] || \\\"nsPageActive\\\",\\r\\n\\t\\t\\t\\t\\tdisabledStyle: this.__setting[\\\"disabledStyle\\\"] || \\\"nsPageDisabled\\\",\\r\\n\\t\\t\\t\\t\\ttextFirst : this.__setting[\\\"textFirst\\\"] || \\\"&laquo;\\\",\\r\\n\\t\\t\\t\\t\\ttextLast : this.__setting[\\\"textLast\\\"] || \\\"&raquo;\\\",\\r\\n\\t\\t\\t\\t\\ttextNext : this.__setting[\\\"textNext\\\"] || \\\"&rsaquo;\\\",\\r\\n\\t\\t\\t\\t\\ttextPrev : this.__setting[\\\"textPrev\\\"] || \\\"&lsaquo;\\\",\\r\\n\\t\\t\\t\\t\\ttextTitlePagePrefix: this.__setting[\\\"textTitlePagePrefix\\\"] || \\\"Page\\\",\\r\\n\\t\\t\\t        textTitleFirst : this.__setting[\\\"textTitleFirst\\\"] || 'First Page', \\r\\n\\t\\t\\t        textTitleLast : this.__setting[\\\"textTitleLast\\\"] || 'Last Page',\\r\\n\\t\\t\\t        textTitleNext : this.__setting[\\\"textTitleNext\\\"] || 'Next Page', \\r\\n\\t\\t\\t        textTitlePrev : this.__setting[\\\"textTitlePrev\\\"] || 'Previous Page', \\r\\n\\t\\t\\t\\t\\tshowPrevNext : (!this.util.isUndefined(this.__setting[\\\"showPrevNext\\\"]) && this.__setting[\\\"showPrevNext\\\"] != null) ? Boolean.parse(this.__setting[\\\"showPrevNext\\\"]) : true,\\r\\n\\t\\t\\t\\t\\tshowFirstLast : (!this.util.isUndefined(this.__setting[\\\"showFirstLast\\\"]) && this.__setting[\\\"showFirstLast\\\"] != null) ? Boolean.parse(this.__setting[\\\"showFirstLast\\\"]) : false\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\tthis.__create();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.changePageSize = function(pageSize)\\r\\n\\t{\\r\\n\\t\\tif(pageSize > 0 && this.__config)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.pageSize = pageSize;\\r\\n\\t\\t\\tthis.__create();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.setSelectedPage = function(pageNumber)\\r\\n\\t{\\r\\n\\t\\tthis.__update(pageNumber);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.getSelectedPage = function(pageNumber)\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedPage;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__create = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__config.parent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__container)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__container.parentNode.removeChild(this.__container);\\r\\n\\t\\t\\t\\tthis.__arrItemPage = [];\\r\\n\\t\\t\\t\\tthis.__selectedPage = -1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__config.totalPageCount > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__pageCount = this.__config.totalPageCount;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__config.pageSize > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__pageCount =  Math.ceil(this.__config.totalRecords / this.__config.pageSize);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__container = this.util.createElement(\\\"ul\\\",this.__getID() + \\\"container\\\",this.__config.containerStyle);\\r\\n\\t\\t\\tthis.__config.parent.appendChild(this.__container);\\r\\n\\t\\t\\tif(this.__config.showFirstLast)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__itemFirst = this.__createItem(\\\"-4\\\",this.__config[\\\"textFirst\\\"],this.__config.textTitleFirst,this.__controlItemClickHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__config.showPrevNext)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__itemPrev = this.__createItem(\\\"-3\\\",this.__config[\\\"textPrev\\\"],this.__config.textTitlePrev,this.__controlItemClickHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar createdNumber = Math.min(this.__pageCount,this.__config.visiblePages);\\r\\n\\t\\t\\tfor(var count = 1;count <= createdNumber;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar pageItem = this.__createItem(count,count,this.__config.textTitlePagePrefix + \\\" \\\" + count,this.__pageItemClickHandler);\\r\\n\\t\\t\\t\\tthis.__arrItemPage.push(pageItem);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__config.showPrevNext)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__itemNext = this.__createItem(\\\"-2\\\",this.__config[\\\"textNext\\\"],this.__config.textTitleNext,this.__controlItemClickHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__config.showFirstLast)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__itemLast = this.__createItem(\\\"-1\\\",this.__config[\\\"textLast\\\"],this.__config.textTitleLast,this.__controlItemClickHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//this.__selectPage(1);\\r\\n\\t\\t\\tthis.__updateControlState(1);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__controlItemClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"li\\\");\\r\\n\\t\\tvar index = parseInt(target.getAttribute(\\\"pageNum\\\"));\\r\\n\\t\\tvar pageSelected = -1;\\r\\n\\t\\tswitch(index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcase -4:\\r\\n\\t\\t\\t\\tpageSelected = 1;\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase -3:\\r\\n\\t\\t\\t\\tpageSelected = this.__selectedPage - 1;\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase -2:\\r\\n\\t\\t\\t\\tpageSelected = this.__selectedPage + 1;\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase -1:\\r\\n\\t\\t\\t\\tpageSelected = this.__pageCount;\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__update(pageSelected);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__pageItemClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"li\\\");\\r\\n\\t\\tvar index = parseInt(target.getAttribute(\\\"pageNum\\\"));\\r\\n\\t\\tthis.__update(index);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__createItem = function(pageNumber,htmlText,titleText,clickHandler)\\r\\n\\t{\\r\\n\\t\\tvar pageItem = this.util.createElement(\\\"li\\\",this.__getID() + \\\"Page\\\" + pageNumber,null);\\r\\n\\t\\tpageItem.setAttribute(\\\"pageNum\\\",pageNumber);\\r\\n\\t\\tpageItem.setAttribute(\\\"title\\\",titleText);\\r\\n\\t\\tthis.util.addEvent(pageItem,\\\"click\\\",clickHandler.bind(this));\\r\\n\\t\\tvar pageText = this.util.createElement(\\\"a\\\",null,null);\\r\\n\\t\\tpageText.setAttribute(\\\"href\\\",\\\"javascript:void(0);\\\");\\r\\n\\t\\tpageText.innerHTML = htmlText;\\r\\n\\t\\tpageItem.appendChild(pageText);\\r\\n\\t\\tthis.__container.appendChild(pageItem);\\r\\n\\t\\treturn pageItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__update = function(pageNumber)\\r\\n\\t{\\r\\n\\t\\tif(pageNumber <= 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tpageNumber = 1;\\r\\n\\t\\t}\\r\\n\\t\\telse if(pageNumber > this.__pageCount)\\r\\n\\t\\t{\\r\\n\\t\\t\\tpageNumber = this.__pageCount;\\r\\n\\t\\t}\\r\\n\\t\\tvar range = this.__calculateRange(this.__pageCount,Math.min(this.__pageCount,this.__config.visiblePages),pageNumber);\\r\\n\\t\\tthis.__updateItem(range[0],range[1]);\\r\\n\\t\\tthis.__selectPage(pageNumber);\\r\\n\\t\\tthis.__updateControlState(pageNumber);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__updateItem = function(fromPage,toPage)\\r\\n\\t{\\r\\n\\t\\tvar firstNumber = parseInt(this.__arrItemPage[0].getAttribute(\\\"pageNum\\\"));\\r\\n\\t\\tvar lastNumber = parseInt(this.__arrItemPage[this.__arrItemPage.length - 1].getAttribute(\\\"pageNum\\\"));\\r\\n\\t\\tif(!(firstNumber === fromPage && lastNumber === toPage))\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < this.__arrItemPage.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar pageItem = this.__arrItemPage[count];\\r\\n\\t\\t\\t\\tvar index = count + fromPage;\\r\\n\\t\\t\\t\\tpageItem.setAttribute(\\\"pageNum\\\",index);\\r\\n\\t\\t\\t\\tpageItem.setAttribute(\\\"title\\\",this.__config.textTitlePagePrefix + \\\" \\\" + index);\\r\\n\\t\\t\\t\\tvar pageText = pageItem.firstChild;\\r\\n\\t\\t\\t\\tpageText.innerHTML = index;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__updateControlState = function(pageNumber)\\r\\n\\t{\\r\\n\\t\\tif(pageNumber === 1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__itemFirst ? this.util.addStyleClass(this.__itemFirst,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t\\tthis.__itemPrev ? this.util.addStyleClass(this.__itemPrev,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__itemFirst ? this.util.removeStyleClass(this.__itemFirst,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t\\tthis.__itemPrev ? this.util.removeStyleClass(this.__itemPrev,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t\\tif(pageNumber === this.__pageCount)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__itemNext ? this.util.addStyleClass(this.__itemNext,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t\\tthis.__itemLast ? this.util.addStyleClass(this.__itemLast,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__itemNext ? this.util.removeStyleClass(this.__itemNext,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t\\tthis.__itemLast ? this.util.removeStyleClass(this.__itemLast,this.__config.disabledStyle) : \\\"\\\";\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__calculateRange = function(totalPages,visiblePages,pageToBeSelected)\\r\\n\\t{\\r\\n\\t\\tvar renderPage = [1,totalPages];\\r\\n\\t\\tvar limit = Math.floor(visiblePages/2);\\r\\n\\t\\tif(visiblePages > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\trenderPage[0] = Math.max(pageToBeSelected - limit, 1);\\r\\n\\t\\t\\trenderPage[1] = Math.min(pageToBeSelected + limit, totalPages);\\r\\n\\t\\t\\tvar difference = renderPage[1] - renderPage[0];\\r\\n\\t\\t\\tif(renderPage[0] === 1 && difference < visiblePages)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trenderPage[1] = visiblePages;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(renderPage[1] === totalPages && difference < visiblePages)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trenderPage[0] = renderPage[1] - visiblePages + 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn renderPage;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__selectPage = function(pageIndex)\\r\\n\\t{\\r\\n\\t\\tvar selectedIndex = -1;\\r\\n\\t\\tfor(var count = 0;count < this.__arrItemPage.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar pageItem = this.__arrItemPage[count];\\r\\n\\t\\t\\tthis.util.removeStyleClass(pageItem,this.__config.activeStyle);\\r\\n\\t\\t\\tvar index = parseInt(pageItem.getAttribute(\\\"pageNum\\\"));\\r\\n\\t\\t\\tif(index === pageIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tselectedIndex = count;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(selectedIndex > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar oldPage = this.__selectedPage;\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__arrItemPage[selectedIndex],this.__config.activeStyle);\\r\\n\\t\\t\\tthis.__selectedPage = pageIndex;\\r\\n\\t\\t\\tvar fromRecord =  (pageIndex - 1) * this.__config.pageSize;\\r\\n\\t\\t\\tvar toRecord = fromRecord +  this.__config.pageSize - 1;\\r\\n\\t\\t\\ttoRecord = (toRecord < this.__config.totalRecords) ? toRecord : ((toRecord === this.__config.totalRecords) ? this.__config.totalRecords - 1 : this.__config.totalRecords);\\r\\n\\t\\t\\tvar item = {oldIndex:oldPage,newIndex:this.__selectedPage,fromRecord:fromRecord,toRecord:toRecord};\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__config.parent,this.PAGE_CLICK,item,item);\\r\\n\\t\\t\\tif(oldPage !== this.__selectedPage)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.__config.parent,this.PAGE_CHANGE,item,item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSPagination.prototype.__getID = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__id)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.parent.hasAttribute(\\\"id\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = this.__config.parent.getAttribute(\\\"id\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__config.parent.hasAttribute(\\\"name\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = this.__config.parent.getAttribute(\\\"name\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = \\\"comp\\\" + this.util.getUniqueId();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__id;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSPagination;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSPagination\\\",NSPagination);\\r\\nvar NSExport = (function()\\r\\n{\\r\\n\\t//DONOT REMOVE: taken from https://gist.github.com/sevir/3946819\\r\\n\\tif (window && !window.atob && !window.btoa)\\r\\n\\t{\\r\\n\\t ( function( window ) {\\r\\n\\t    var _PADCHAR = \\\"=\\\",\\r\\n\\t      _ALPHA = \\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\";\\r\\n\\t   \\r\\n\\t    function _getbyte64( s, i ) { \\r\\n\\t      var idx = _ALPHA.indexOf( s.charAt( i ) );\\r\\n\\t   \\r\\n\\t      if ( idx === -1 ) {\\r\\n\\t        throw \\\"Cannot decode base64\\\";\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      return idx;\\r\\n\\t    }\\r\\n\\t   \\r\\n\\t    function _decode( s ) {\\r\\n\\t      var pads = 0,\\r\\n\\t        i,\\r\\n\\t        b10,\\r\\n\\t        imax = s.length,\\r\\n\\t        x = [];\\r\\n\\t   \\r\\n\\t      s = String( s );\\r\\n\\t   \\r\\n\\t      if ( imax === 0 ) {\\r\\n\\t        return s;\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      if ( imax % 4 !== 0 ) {\\r\\n\\t        throw \\\"Cannot decode base64\\\";\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      if ( s.charAt( imax - 1 ) === _PADCHAR ) {\\r\\n\\t        pads = 1;\\r\\n\\t   \\r\\n\\t        if ( s.charAt( imax - 2 ) === _PADCHAR ) {\\r\\n\\t          pads = 2;\\r\\n\\t        }\\r\\n\\t   \\r\\n\\t        // either way, we want to ignore this last block\\r\\n\\t        imax -= 4;\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      for ( i = 0; i < imax; i += 4 ) {\\r\\n\\t        b10 = ( _getbyte64( s, i ) << 18 ) | ( _getbyte64( s, i + 1 ) << 12 ) | ( _getbyte64( s, i + 2 ) << 6 ) | _getbyte64( s, i + 3 );\\r\\n\\t        x.push( String.fromCharCode( b10 >> 16, ( b10 >> 8 ) & 0xff, b10 & 0xff ) );\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      switch ( pads ) {\\r\\n\\t        case 1:\\r\\n\\t          b10 = ( _getbyte64( s, i ) << 18 ) | ( _getbyte64( s, i + 1 ) << 12 ) | ( _getbyte64( s, i + 2 ) << 6 );\\r\\n\\t          x.push( String.fromCharCode( b10 >> 16, ( b10 >> 8 ) & 0xff ) );\\r\\n\\t          break;\\r\\n\\t   \\r\\n\\t        case 2:\\r\\n\\t          b10 = ( _getbyte64( s, i ) << 18) | ( _getbyte64( s, i + 1 ) << 12 );\\r\\n\\t          x.push( String.fromCharCode( b10 >> 16 ) );\\r\\n\\t          break;\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      return x.join( \\\"\\\" );\\r\\n\\t    }\\r\\n\\t   \\r\\n\\t    function _getbyte( s, i ) {\\r\\n\\t      var x = s.charCodeAt( i );\\r\\n\\t   \\r\\n\\t      if ( x > 255 ) {\\r\\n\\t        throw \\\"INVALID_CHARACTER_ERR: DOM Exception 5\\\";\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      return x;\\r\\n\\t    }\\r\\n\\t   \\r\\n\\t    function _encode( s ) {\\r\\n\\t      if ( arguments.length !== 1 ) {\\r\\n\\t        throw \\\"SyntaxError: exactly one argument required\\\";\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      s = String( s );\\r\\n\\t   \\r\\n\\t      var i,\\r\\n\\t        b10,\\r\\n\\t        x = [],\\r\\n\\t        imax = s.length - s.length % 3;\\r\\n\\t   \\r\\n\\t      if ( s.length === 0 ) {\\r\\n\\t        return s;\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      for ( i = 0; i < imax; i += 3 ) {\\r\\n\\t        b10 = ( _getbyte( s, i ) << 16 ) | ( _getbyte( s, i + 1 ) << 8 ) | _getbyte( s, i + 2 );\\r\\n\\t        x.push( _ALPHA.charAt( b10 >> 18 ) );\\r\\n\\t        x.push( _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) );\\r\\n\\t        x.push( _ALPHA.charAt( ( b10 >> 6 ) & 0x3f ) );\\r\\n\\t        x.push( _ALPHA.charAt( b10 & 0x3f ) );\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      switch ( s.length - imax ) {\\r\\n\\t        case 1:\\r\\n\\t          b10 = _getbyte( s, i ) << 16;\\r\\n\\t          x.push( _ALPHA.charAt( b10 >> 18 ) + _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) + _PADCHAR + _PADCHAR );\\r\\n\\t          break;\\r\\n\\t   \\r\\n\\t        case 2:\\r\\n\\t          b10 = ( _getbyte( s, i ) << 16 ) | ( _getbyte( s, i + 1 ) << 8 );\\r\\n\\t          x.push( _ALPHA.charAt( b10 >> 18 ) + _ALPHA.charAt( ( b10 >> 12 ) & 0x3F ) + _ALPHA.charAt( ( b10 >> 6 ) & 0x3f ) + _PADCHAR );\\r\\n\\t          break;\\r\\n\\t      }\\r\\n\\t   \\r\\n\\t      return x.join(\\\"\\\");\\r\\n\\t    }\\r\\n\\t\\r\\n\\t    window.btoa = _encode;\\r\\n\\t    window.atoa = _decode;\\r\\n\\t   \\r\\n\\t  })( window );\\r\\n\\t}\\r\\n\\t\\r\\n\\t\\\"use strict\\\"; \\r\\n\\tfunction NSExport(grid,fileName,extPath,ignoreColumn) \\r\\n\\t{\\r\\n\\t\\tthis.__grid = grid;\\r\\n\\t\\tthis.__fileName = fileName;\\r\\n\\t\\tthis.__ignoreColumn = ignoreColumn;\\r\\n\\t\\tthis.__extFilePath = extPath ? extPath : \\\"../lib/com/ext\\\";\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__defaultDelimiter = \\\",\\\";\\r\\n\\t\\tthis.__defaultNewLine = \\\"\\\\r\\\\n\\\";\\r\\n\\t\\tthis.__externalScriptLoad = {jspdf:false,html2canvas:false};\\r\\n\\t}\\r\\n\\t\\r\\n\\t//Orientation: portrait or landscape\\r\\n\\tNSExport.prototype.word = function(setting) \\r\\n\\t{\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.type === \\\"doc\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar docSetting = {appType:\\\"doc\\\",extension:\\\"doc\\\",event:setting.event,orientation:setting.orientation,element:setting.element,pageBreakTag:setting.pageBreakTag,headerFooterCss:\\\"\\\",startHtml:\\\"\\\",endHtml:\\\"\\\"};\\r\\n\\t\\t\\t\\tif(setting.hasHeaderOrFooter)\\r\\n\\t            {\\r\\n\\t            \\tdocSetting.headerFooterCss = setting.headerFooterCss || \\\"\\\";\\r\\n\\t            \\tdocSetting.startHtml = setting.startHtml || \\\"\\\";\\r\\n\\t            \\tdocSetting.endHtml = setting.endHtml || \\\"\\\";\\r\\n\\t            }\\r\\n\\t\\t\\t\\tif(setting.enablePageNumber)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdocSetting.headerFooterCss += \\\"p.MsoHeader, li.MsoHeader, div.MsoHeader{     margin:0in;     margin-top:.0001pt;     mso-pagination:widow-orphan;     tab-stops:center 3.0in right 6.0in; } p.MsoFooter, li.MsoFooter, div.MsoFooter{     margin:0in 0in 1in 0in;     margin-bottom:.0001pt;     mso-pagination:widow-orphan;     tab-stops:center 3.0in right 6.0in; } .footer {     font-size: 9pt; } @page Section1{     size:8.5in 11.0in;     margin:0.5in 0.5in 0.5in 0.5in;     mso-header-margin:0.5in;     mso-header:h1;     mso-footer:f1;     mso-footer-margin:0.5in;     mso-paper-source:0; } div.Section1{     page:Section1; } table#hrdftrtbl{     margin:0in 0in 0in 9in; }\\\";\\r\\n\\t\\t\\t\\t\\tdocSetting.startHtml = \\\"<div class=\\\\\\\"Section1\\\\\\\">\\\" + docSetting.startHtml; \\r\\n\\t\\t\\t\\t\\tdocSetting.endHtml += \\\"<table id=\\\\\\\"hrdftrtbl\\\\\\\" border=\\\\\\\"1\\\\\\\" cellspacing=\\\\\\\"0\\\\\\\" cellpadding=\\\\\\\"0\\\\\\\"> <tr> <td> <div style=\\\\\\\"mso-element:footer\\\\\\\" id=\\\\\\\"f1\\\\\\\"> <p class=\\\\\\\"MsoFooter\\\\\\\"> <table width=\\\\\\\"100%\\\\\\\" border=\\\\\\\"0\\\\\\\" cellspacing=\\\\\\\"0\\\\\\\" cellpadding=\\\\\\\"0\\\\\\\"> <tr> <td align=\\\\\\\"center\\\\\\\" class=\\\\\\\"footer\\\\\\\"> <g:message code=\\\\\\\"offer.letter.page.label\\\\\\\"/> <span style=\\\\\\\"mso-field-code: PAGE \\\\\\\"></span> of <span style=\\\\\\\"mso-field-code: NUMPAGES \\\\\\\"></span> </td> </tr> </table> </p> </div> </td> </tr> </table> </div>\\\";;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__exportOfficeTypes(docSetting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!setting.orientation || (setting.orientation !== \\\"portrait\\\" && setting.orientation !== \\\"landscape\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.warning(\\\"NSExport\\\",\\\"Docx type value was either not valid or not in the correct format.Hence defaulting to portrait\\\");\\r\\n\\t\\t\\t\\t\\tsetting.orientation = \\\"portrait\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar docSetting = {appType:\\\"doc\\\",element:setting.element,pageBreakTag:setting.pageBreakTag,headerFooterCss:\\\"\\\",startHtml:\\\"\\\",endHtml:\\\"\\\"};\\r\\n\\t\\t\\t\\tif(setting.hasHeaderOrFooter)\\r\\n\\t            {\\r\\n\\t            \\tdocSetting.headerFooterCss = setting.headerFooterCss;\\r\\n\\t            \\tdocSetting.startHtml = setting.startHtml;\\r\\n\\t            \\tdocSetting.endHtml = setting.endHtml;\\r\\n\\t            }\\r\\n\\t\\t\\t\\tvar htmlText = this.__getHTMLTextForOffice(docSetting);\\r\\n\\t\\t\\t\\tif(htmlText && htmlText.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar fileName = this.__getFileName(\\\"docx\\\");\\r\\n\\t\\t\\t\\t\\tvar exportSetting = {fileName:fileName,htmlSetting:{html:htmlText,htmlStyle: setting.extraStyle,loopNodesCallback: setting.loopNodesCallback},printSetting:{orientation: setting.orientation}};\\r\\n\\t\\t\\t\\t\\tvar docxExport = new NSDocxExport(exportSetting);\\r\\n\\t\\t\\t\\t\\tdocxExport.process();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.powerpoint = function(setting) \\r\\n\\t{\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar docSetting = {appType:\\\"powerpoint\\\",extension:\\\"ppt\\\",event:setting.event,element:setting.element};\\r\\n\\t\\t\\tthis.__exportOfficeTypes(docSetting);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.excel = function(setting) \\r\\n\\t{\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.type === \\\"xls\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar docSetting = {appType:\\\"excel\\\",extension:\\\"xls\\\",sheetName:setting.sheetName,event:setting.event,element:setting.element,properties:setting.properties};\\r\\n\\t\\t\\t\\tthis.__exportOfficeTypes(docSetting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objXslxExport = new this.xslxExport(this,setting.sheetName,setting.event,setting.properties);\\r\\n\\t\\t\\t\\tobjXslxExport.exportToxlsx();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.csv = function(event) \\r\\n\\t{ \\r\\n\\t\\tvar csvText = this.__getTableAsString(this.__defaultDelimiter,this.__defaultNewLine);\\r\\n\\t\\tif(csvText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar uri = \\\"application/csv\\\";\\r\\n\\t\\t\\tthis.__downloadFile(csvText,uri,\\\"csv\\\",event);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.xml = function(event) \\r\\n\\t{ \\r\\n\\t\\tvar xmlText = this.__getTableAsXML();\\r\\n\\t\\tif(xmlText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar uri = \\\"application/xml\\\";\\r\\n\\t\\t\\tthis.__downloadFile(xmlText,uri,\\\"xml\\\",event);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.text = function(event) \\r\\n\\t{ \\r\\n\\t\\tvar csvText = this.__getTableAsString(this.__defaultDelimiter,this.__defaultNewLine,\\\"-\\\");\\r\\n\\t\\tif(csvText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar uri = \\\"application/txt\\\";\\r\\n\\t\\t\\tthis.__downloadFile(csvText,uri,\\\"txt\\\",event);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.json = function(event) \\r\\n\\t{ \\r\\n\\t\\tvar jsonText = this.__getTableAsJson();\\r\\n\\t\\tif(jsonText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar uri = \\\"application/json\\\";\\r\\n\\t\\t\\tthis.__downloadFile(jsonText,uri,\\\"json\\\",event);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.pdf = function(event,setting) \\r\\n\\t{ \\r\\n\\t\\tthis.__processPDF = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__externalScriptLoad.jspdf = true;\\r\\n\\t\\t\\tif(!setting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetting = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar config = {\\r\\n\\t\\t\\t\\t\\tfontSize: setting[\\\"fontSize\\\"] || 14,\\r\\n\\t\\t\\t\\t\\twidth: setting[\\\"width\\\"] || 1200,\\r\\n\\t\\t\\t\\t\\ttopMargin: setting[\\\"topMargin\\\"] || 30,\\r\\n\\t\\t\\t\\t\\tbottomMargin: setting[\\\"bottomMargin\\\"] || 60,\\r\\n\\t\\t\\t\\t\\tleftMargin: setting[\\\"leftMargin\\\"] || 60,\\r\\n\\t\\t\\t\\t\\tmaxWidth: setting[\\\"maxWidth\\\"] || 550\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar divSource = this.__getStructureForPDF(config.width,config.fontSize);\\r\\n\\t\\t\\tdocument.body.appendChild(divSource);\\r\\n\\t\\t\\tvar pdf = new jsPDF(\\\"p\\\", \\\"pt\\\", \\\"ledger\\\");\\r\\n\\t\\t\\t// we support special element handlers. Register them with jQuery-style \\r\\n\\t\\t    // ID selector for either ID or node name. (\\\"#iAmID\\\", \\\"div\\\", \\\"span\\\" etc.)\\r\\n\\t\\t    // There is no support for any other type of selectors \\r\\n\\t\\t    // (class, of compound) at this time.\\r\\n\\t\\t\\tspecialElementHandlers = \\r\\n\\t\\t\\t{\\r\\n\\t\\t        // element with id of \\\"bypass\\\" - jQuery style selector\\r\\n\\t\\t        '#bypassme' : function(element, renderer) {\\r\\n\\t\\t            // true = \\\"handled elsewhere, bypass text extraction\\\"\\r\\n\\t\\t            return true;\\r\\n\\t\\t        }\\r\\n\\t\\t    };\\r\\n\\t\\t    margins = {\\r\\n\\t\\t        top : config.topMargin,\\r\\n\\t\\t        bottom : config.bottomMargin,\\r\\n\\t\\t        left : config.leftMargin,\\r\\n\\t\\t        width : config.maxWidth\\r\\n\\t\\t    };\\r\\n\\t\\t    var self =  this;\\r\\n\\t\\t    // all coords and widths are in jsPDF instance's declared units\\r\\n\\t\\t    // 'inches' in this case\\r\\n\\t\\t    pdf.fromHTML(divSource, // HTML string or DOM elem ref.\\r\\n\\t\\t    margins.left, // x coord\\r\\n\\t\\t    margins.top, { // y coord\\r\\n\\t\\t        'width' : margins.width, // max width of content on PDF\\r\\n\\t\\t        'elementHandlers' : specialElementHandlers\\r\\n\\t\\t    },\\r\\n\\t\\r\\n\\t\\t    function(dispose) {\\r\\n\\t\\t        // dispose: object with X, Y of the last line add to the PDF \\r\\n\\t\\t        //          this allow the insertion of new lines after html\\r\\n\\t\\t        pdf.save(self.__getFileName(\\\"pdf\\\"));\\r\\n\\t\\t\\t\\tdocument.body.removeChild(divSource);\\r\\n\\t\\t    }, margins);\\r\\n\\t\\t};\\r\\n\\t\\tif(!this.__externalScriptLoad.jspdf)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__includeJavaScriptFile(this.__extFilePath + \\\"/jspdf/jspdf.min.js\\\",this.__processPDF.bind(this));\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__processPDF.bind(this)();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.image = function(setting) \\r\\n\\t{\\r\\n\\t\\tif(!setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsetting = {};\\r\\n\\t\\t}\\r\\n\\t\\tthis.__processImage = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__externalScriptLoad.html2canvas = true;\\r\\n\\t\\t\\tif(!setting.type || (setting.type !== \\\"png\\\" && setting.type !== \\\"jpeg\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.warning(\\\"NSExport\\\",\\\"Image type value was either not valid or not in the correct format.Hence defaulting to png\\\");\\r\\n\\t\\t\\t\\tsetting.type = \\\"png\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar imageType = \\\"image/\\\" + setting.type; \\r\\n\\t\\t\\tvar divParent = this.__getStructureForImage();\\r\\n\\t\\t\\tif(divParent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar nsExport = this;\\r\\n\\t\\t\\t\\thtml2canvas(divParent,{\\r\\n\\t\\t\\t\\t\\tonrendered: function(canvas) {\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t//document.body.appendChild(canvas);\\r\\n\\t\\t\\t\\t\\t\\tvar data = canvas.toDataURL(imageType);\\r\\n\\t\\t\\t\\t\\t\\tif(!data || data === \\\"data:,\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tnsExport.util.throwNSError(\\\"NSExport\\\",\\\"Please give table some width and height\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tnsExport.__downloadFile(data,imageType,setting.type);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t});\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSExport\\\",\\\"Please add the table inside a parent Element\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tif(!this.__externalScriptLoad.html2canvas)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__includeJavaScriptFile(this.__extFilePath + \\\"/html2canvas/html2canvas.min.js\\\",this.__processImage.bind(this));\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__processImage.bind(this)();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__exportOfficeTypes = function(setting) \\r\\n\\t{\\r\\n\\t\\tvar htmlText = this.__getHTMLTextForOffice(setting);\\r\\n\\t\\tif(htmlText && htmlText.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar uri = \\\"application/vnd.ms-\\\" + setting.appType;\\r\\n\\t\\t\\tif(setting.extension === \\\"doc\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\turi = \\\"application/msword\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__downloadFile(htmlText,uri,setting.extension,setting.event);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getHTMLTextForOffice = function(setting) \\r\\n\\t{\\r\\n\\t\\tvar appType = setting.appType;\\r\\n\\t\\tvar element = setting.element;\\r\\n\\t\\tvar headerFooterCss = setting.headerFooterCss ? setting.headerFooterCss : \\\"\\\";\\r\\n\\t    var startHtml = setting.startHtml ? setting.startHtml : \\\"\\\";\\r\\n\\t    var endHtml = setting.endHtml ? setting.endHtml : \\\"\\\";\\r\\n\\t\\tvar htmlText = \\\"\\\";\\r\\n\\t\\tvar outerHTML = null;\\r\\n\\t\\tvar isTable =  false;\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\touterHTML = element.outerHTML;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar table = this.__getTable();\\r\\n\\t\\t\\tif(table)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\touterHTML = table.outerHTML;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tisTable = true;\\r\\n\\t\\t}\\r\\n\\t\\tvar objValue = {};\\r\\n\\t\\tswitch(appType)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcase \\\"doc\\\":\\r\\n\\t\\t\\t\\tobjValue = this.__getHTMLTextForWord(setting,outerHTML,isTable);\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase \\\"excel\\\":\\r\\n\\t\\t\\t\\tobjValue = this.__getHTMLTextForExcel(setting,outerHTML,isTable);\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase \\\"powerpoint\\\":\\r\\n\\t\\t\\t\\tobjValue = this.__getHTMLTextForPpt(setting,outerHTML,isTable);\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t}\\r\\n\\t\\tif(outerHTML)\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjValue.style = (objValue.style) ? objValue.style : \\\"\\\";\\r\\n\\t\\t\\thtmlText = '<html  xmlns:o=\\\"urn:schemas-microsoft-com:office:office\\\" xmlns:x=\\\"urn:schemas-microsoft-com:office:' + appType +'\\\" xmlns=\\\"http://www.w3.org/TR/REC-html40\\\">';\\r\\n\\t\\t\\thtmlText += '<head><meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=UTF-8\\\">';\\r\\n\\t\\t\\thtmlText +='<!--[if gte mso 9]><xml>';\\r\\n\\t\\t\\thtmlText += objValue.header;\\r\\n\\t\\t\\thtmlText += '</xml><![endif]-->';\\r\\n\\t\\t    //htmlText +=\\\"<o:shapedefaults v:ext=\\\\\\\"edit\\\\\\\" spidmax=\\\\\\\"1026\\\\\\\"/>\\\";\\r\\n\\t\\t\\thtmlText += '<style>' + objValue.style + headerFooterCss + '.header{mso-style-parent:style0;color:white;font-size:10.0pt;font-weight:700;font-family:Tahoma, sans-serif;mso-font-charset:0;text-align:center;background:gray;mso-pattern:black none;}</style>';\\r\\n\\t\\t\\thtmlText += '</head>';\\r\\n\\t\\t\\thtmlText += '<body link=\\\"blue\\\" vlink=\\\"purple\\\">';\\r\\n\\t\\t\\thtmlText += startHtml + objValue.html + endHtml;\\r\\n\\t\\t\\thtmlText += '</body></html>';\\r\\n\\t\\t}\\r\\n\\t\\treturn htmlText;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getHTMLTextForWord = function(setting,html,isTable)\\r\\n\\t{\\r\\n\\t\\tvar objReturn = {header:null,style:null,html:html};\\r\\n\\t\\tobjReturn.header = \\\"<w:WordDocument><w:View>Print</w:View><w:Zoom>100</w:Zoom><w:DoNotOptimizeForBrowser/></w:WordDocument>\\\";\\r\\n\\t\\tif(isTable)\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjReturn.style = 'table{border-collapse: collapse;} table, th, td {border: 1px solid black;} ';\\r\\n\\t\\t}\\r\\n\\t\\tif(setting[\\\"pageBreakTag\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjReturn.html = objReturn.html.replaceAll(setting[\\\"pageBreakTag\\\"],\\\"<br clear=all style='mso-special-character:line-break;page-break-before:always'>\\\");\\r\\n\\t\\t}\\r\\n\\t\\treturn objReturn;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getHTMLTextForExcel = function(setting,html,isTable)\\r\\n\\t{\\r\\n\\t\\tvar objReturn = {header:null,style:null,html:html};\\r\\n\\t\\tobjReturn.header = \\\"<x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>\\\";\\r\\n\\t\\tobjReturn.header += (setting[\\\"sheetName\\\"] ? setting[\\\"sheetName\\\"]: ((this.__fileName ? this.__fileName : \\\"Sheet 1\\\")));\\r\\n\\t\\tobjReturn.header += '</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook>';\\r\\n\\t\\treturn objReturn;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getHTMLTextForPpt = function(setting,html,isTable)\\r\\n\\t{\\r\\n\\t\\tvar objReturn = {header:null,style:null,html:html};\\r\\n\\t\\tobjReturn.header = \\\"<x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>\\\";\\r\\n\\t\\tobjReturn.header += (setting[\\\"sheetName\\\"] ? setting[\\\"sheetName\\\"]: ((this.__fileName ? this.__fileName : \\\"Sheet 1\\\")));\\r\\n\\t\\tobjReturn.header += '</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook>';\\r\\n\\t\\treturn objReturn;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__downloadFile = function(text,uri,fileType,event) \\r\\n\\t{\\r\\n\\t\\tif(text && fileType)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (\\\"Blob\\\" in window) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar fileName = this.__getFileName(fileType);\\r\\n\\t\\t\\t\\tif (\\\"msSaveOrOpenBlob\\\" in window.navigator) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar blobObject = null;\\r\\n\\t\\t\\t\\t\\tif(text instanceof Blob)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tblobObject = text;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if(!(text instanceof ArrayBuffer) && text.indexOf(\\\"base64\\\") > -1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tblobObject = this.__dataURItoBlob(text);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tblobObject = new Blob([text], { type: uri});\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\twindow.navigator.msSaveOrOpenBlob(blobObject,fileName);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar hrefvalue = null;\\r\\n\\t\\t\\t\\t\\tif(text instanceof ArrayBuffer)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar blobObject = new Blob([text], {type: uri});\\r\\n\\t\\t\\t\\t\\t\\threfvalue = URL.createObjectURL(blobObject);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if(text instanceof Blob)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\threfvalue = URL.createObjectURL(text);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(text.indexOf(\\\"data:\\\") === -1)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\turi = \\\"data:\\\" + uri;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(text.indexOf(\\\";base64,\\\") === -1)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar base64String = \\\";base64,\\\" + window.btoa(window.unescape(encodeURIComponent(text)));\\r\\n\\t\\t\\t\\t\\t\\t\\threfvalue = uri + base64String;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\threfvalue = text;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t    var anchor = document.createElement(\\\"a\\\");\\r\\n\\t\\t\\t\\t    if (\\\"webkitURL\\\" in window) \\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t          // Chrome allows the link to be clicked without actually adding it to the DOM.\\r\\n\\t\\t\\t\\t    \\t//hrefvalue = window.webkitURL.createObjectURL([hrefvalue]);\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t    else\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\t//hrefvalue = window.URL.createObjectURL([hrefvalue]);\\r\\n\\t\\t\\t\\t    \\tanchor.style.display = 'none';\\r\\n\\t\\t\\t\\t        document.body.appendChild(anchor);\\r\\n\\t\\t\\t\\t        this.util.addEvent(anchor,\\\"click\\\",function(event){\\r\\n\\t\\t\\t\\t    \\t\\tdocument.body.removeChild(event.target);\\r\\n\\t\\t\\t\\t    \\t});\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t    anchor.setAttribute(\\\"href\\\",hrefvalue);\\r\\n\\t\\t\\t\\t    anchor.setAttribute(\\\"download\\\",this.__getFileName(fileType));\\r\\n\\t\\t\\t\\t    anchor.setAttribute(\\\"target\\\",\\\"_blank\\\");\\r\\n\\t\\t\\t\\t    anchor.innerHTML = \\\"Download File\\\";\\r\\n\\t\\t\\t\\t    /*if(window.URL && window.URL.revokeObjectURL)\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\twindow.URL.revokeObjectURL(hrefvalue);\\r\\n\\t\\t\\t\\t    }*/\\r\\n\\t\\t\\t\\t    anchor.click();\\r\\n\\t\\t\\t\\t    if(event)\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\tthis.util.preventDefault(event);\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getTable = function() \\r\\n\\t{ \\r\\n\\t\\tvar tblResult = null;\\r\\n\\t\\tif(this.__grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar grid = this.__getPrototype(this.__grid);\\r\\n\\t\\t\\tif(grid && this.__isTypeNSGrid(grid))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tblHeader = grid.__tblCenterHeader;\\r\\n\\t\\t    \\tvar tblBody = grid.__tblCenterBody;\\r\\n\\t\\t    \\ttblResult = document.createElement(\\\"TABLE\\\");\\r\\n\\t\\t    \\ttblResult.style.width = tblHeader.style.width;\\r\\n\\t\\t    \\tif(tblHeader && tblHeader.tBodies && tblHeader.tBodies.length > 0 && tblHeader.tBodies[0].rows && tblHeader.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\tvar arrColumns = grid.__columns;\\r\\n\\t\\t    \\t\\tif(grid.gridType === grid.GRID_TYPE_GROUP)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrColumns = grid.util.cloneObject(arrColumns);\\r\\n\\t\\t\\t\\t\\t\\tarrColumns.splice(0, 1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\tvar header = tblResult.createTHead();\\r\\n\\t\\t    \\t\\tvar headerRow = header.insertRow(-1);\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t        for(colIndex = 0; colIndex < arrColumns.length; colIndex++)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t        \\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t        \\t\\tvar headerCell = headerRow.insertCell(-1);\\r\\n\\t\\t\\t        \\t\\tthis.util.addStyleClass(headerCell,\\\"header\\\");\\r\\n\\t\\t\\t\\t    \\t\\theaderCell.style.width = colItem[\\\"width\\\"]; \\r\\n\\t\\t\\t\\t    \\t\\tvar headerText = colItem[\\\"headerText\\\"];\\r\\n\\t\\t\\t\\t    \\t\\theaderCell.appendChild(document.createTextNode(headerText));\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        if(tblBody && tblBody.tBodies && tblBody.tBodies.length > 0 && tblBody.tBodies[0].rows && tblBody.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t        \\tvar arrItems = grid.__getAllItems();\\r\\n\\t\\t\\t        \\tvar body = document.createElement(\\\"tbody\\\");\\r\\n\\t\\t\\t        \\ttblResult.appendChild(body);\\r\\n\\t\\t\\t        \\tvar colText = \\\"\\\";\\r\\n\\t\\t\\t        \\tvar row = null;\\r\\n\\t\\t\\t        \\tfor(rowIndex = 0;rowIndex < arrItems.length;rowIndex++)\\r\\n\\t\\t\\t \\t        {\\r\\n\\t\\t\\t        \\t\\tvar item = arrItems[rowIndex];\\r\\n\\t\\t\\t        \\t\\tif(!item.hasOwnProperty(grid.__fieldRowVisible) || item[grid.__fieldRowVisible])\\r\\n\\t\\t\\t        \\t\\t{\\r\\n\\t\\t\\t\\t        \\t\\tvar bodyRow = body.insertRow(-1);\\r\\n\\t\\t\\t\\t        \\t\\tfor(colIndex = 0;colIndex < arrColumns.length;colIndex++)\\r\\n\\t\\t\\t\\t    \\t        {\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t\\t        \\t\\t\\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t\\t    \\t        \\t{\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolText = item[colItem[\\\"dataField\\\"]];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(colItem.hasOwnProperty(\\\"exportRenderer\\\"))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcolText = colItem[\\\"exportRenderer\\\"](item,colItem[\\\"dataField\\\"],item[grid.__fieldIndex],count);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tvar bodyCell = bodyRow.insertCell(-1);\\r\\n\\t\\t\\t\\t\\t        \\t\\t\\tbodyCell.style.width = colItem[\\\"width\\\"]; \\r\\n\\t\\t\\t\\t\\t    \\t    \\t\\tbodyCell.innerHTML = colText;\\r\\n\\t\\t\\t\\t    \\t        \\t}\\r\\n\\t\\t\\t\\t    \\t        }\\r\\n\\t\\t\\t        \\t\\t}\\r\\n\\t\\t\\t \\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttblResult = this.__grid.cloneNode(true);\\r\\n\\t\\t\\t\\tif(tblResult.tHead && tblResult.tHead.rows && tblResult.tHead.rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar headerRow = tblResult.tHead.rows[0];\\r\\n\\t\\t\\t\\t\\tif(headerRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrCells = [];\\r\\n\\t\\t\\t\\t\\t\\tvar arrTempCells = [];\\r\\n\\t\\t\\t\\t\\t\\tif(headerRow.getElementsByTagName(\\\"th\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrTempCells = headerRow.getElementsByTagName(\\\"th\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(headerRow.getElementsByTagName(\\\"td\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrTempCells = headerRow.getElementsByTagName(\\\"td\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tarrCells = Array.prototype.slice.call(arrTempCells).slice(0);\\r\\n\\t\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t    \\t\\tvar cell = null;\\r\\n\\t\\t\\t    \\t\\tfor(colIndex = arrCells.length - 1; colIndex >= 0; colIndex--)\\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t    \\t\\t\\theaderRow.deleteCell(colIndex);\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t        for(colIndex = 0; colIndex < arrCells.length; colIndex++)\\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\tcell = arrCells[colIndex];\\r\\n\\t\\t\\t\\t        \\tvar headerCell = headerRow.insertCell(-1);\\r\\n\\t\\t\\t\\t        \\theaderCell.style.width = cell.offsetWidth + \\\"px\\\";\\r\\n\\t\\t\\t\\t        \\theaderCell.color = \\\"red\\\";\\r\\n\\t\\t\\t\\t        \\theaderCell.appendChild(document.createTextNode(cell.textContent.trim()));\\r\\n\\t\\t\\t\\t        \\tthis.util.addStyleClass(headerCell,\\\"header\\\");\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(tblResult)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttblResult.setAttribute(\\\"border\\\",0);\\r\\n\\t\\t    \\ttblResult.setAttribute(\\\"cellpadding\\\",0);\\r\\n\\t\\t    \\ttblResult.setAttribute(\\\"cellspacing\\\",0);\\r\\n\\t\\t    \\ttblResult.setAttribute(\\\"style\\\",\\\"border-collapse:collapse;table-layout:fixed;\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn tblResult;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getTableAsString = function(delimiter,newLine,headerSeparator) \\r\\n\\t{ \\r\\n\\t\\tvar strResult = \\\"\\\";\\r\\n\\t\\tif(this.__grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar grid = this.__getPrototype(this.__grid);\\r\\n\\t\\t\\tif(grid && this.__isTypeNSGrid(grid))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tblHeader = grid.__tblCenterHeader;\\r\\n\\t\\t    \\tvar tblBody = grid.__tblCenterBody;\\r\\n\\t\\t    \\tif(tblHeader && tblHeader.tBodies && tblHeader.tBodies.length > 0 && tblHeader.tBodies[0].rows && tblHeader.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\tvar arrColumns = grid.__columns;\\r\\n\\t\\t    \\t\\tif(grid.gridType === grid.GRID_TYPE_GROUP)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrColumns = grid.util.cloneObject(arrColumns);\\r\\n\\t\\t\\t\\t\\t\\tarrColumns.splice(0, 1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t    \\t\\tvar cell = null;\\r\\n\\t\\t    \\t\\tvar arrCollItem = [];\\r\\n\\t\\t\\t        for(colIndex = 0; colIndex < arrColumns.length; colIndex++)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t        \\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t    \\t\\tvar headerText = colItem[\\\"headerText\\\"];\\r\\n\\t\\t\\t\\t    \\t\\tif(colIndex > 0)\\r\\n\\t\\t\\t\\t    \\t\\t{\\r\\n\\t\\t\\t\\t    \\t\\t\\tstrResult += delimiter;\\r\\n\\t\\t\\t\\t    \\t\\t}\\r\\n\\t\\t\\t\\t    \\t\\tstrResult += this.__getFieldValue(headerText,delimiter);\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        strResult += newLine;\\r\\n\\t\\t\\t        if(headerSeparator)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar separatorLength = strResult.length + 20;\\r\\n\\t\\t\\t        \\tfor(var count = 0;count < separatorLength;count++)\\r\\n\\t\\t\\t \\t        {\\r\\n\\t\\t\\t        \\t\\tstrResult += headerSeparator;\\r\\n\\t\\t\\t \\t        }\\r\\n\\t\\t\\t        \\tstrResult += newLine;\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        if(tblBody && tblBody.tBodies && tblBody.tBodies.length > 0 && tblBody.tBodies[0].rows && tblBody.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t        \\tvar arrItems = grid.__getAllItems();\\r\\n\\t\\t\\t        \\tvar colText = \\\"\\\";\\r\\n\\t\\t\\t        \\tfor(rowIndex = 0;rowIndex < arrItems.length;rowIndex++)\\r\\n\\t\\t\\t \\t        {\\r\\n\\t\\t\\t        \\t\\tvar item = arrItems[rowIndex];\\r\\n\\t\\t\\t        \\t\\tif(!item.hasOwnProperty(grid.__fieldRowVisible) || item[grid.__fieldRowVisible])\\r\\n\\t\\t\\t        \\t\\t{\\r\\n\\t\\t\\t\\t        \\t\\tfor(colIndex = 0;colIndex < arrColumns.length;colIndex++)\\r\\n\\t\\t\\t\\t    \\t        {\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t\\t        \\t\\t\\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t\\t    \\t        \\t{\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tif(colIndex > 0)\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\t\\t\\tstrResult += delimiter;\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\t\\t}\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolText = item[colItem[\\\"dataField\\\"]];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(colItem.hasOwnProperty(\\\"exportRenderer\\\"))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcolText = colItem[\\\"exportRenderer\\\"](item,colItem[\\\"dataField\\\"],item[grid.__fieldIndex],count);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tstrResult += this.__getFieldValue(colText,delimiter);\\r\\n\\t\\t\\t\\t    \\t        \\t}\\r\\n\\t\\t\\t\\t    \\t        }\\r\\n\\t\\t\\t\\t        \\t\\tstrResult += newLine;\\r\\n\\t\\t\\t        \\t\\t}\\r\\n\\t\\t\\t \\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__grid.tHead && this.__grid.tHead.rows && this.__grid.tHead.rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar headerRow = this.__grid.tHead.rows[0];\\r\\n\\t\\t\\t\\t\\tif(headerRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrCells = [];\\r\\n\\t\\t\\t\\t\\t\\tif(headerRow.getElementsByTagName(\\\"th\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"th\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(headerRow.getElementsByTagName(\\\"td\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"td\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t    \\t\\tvar cell = null;\\r\\n\\t\\t\\t\\t        for(colIndex = 0; colIndex < arrCells.length; colIndex++)\\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t\\t        \\tcell = arrCells[colIndex];\\r\\n\\t\\t\\t\\t\\t    \\t\\tvar headerText = cell.textContent.trim();\\r\\n\\t\\t\\t\\t\\t    \\t\\tif(colIndex > 0)\\r\\n\\t\\t\\t\\t\\t    \\t\\t{\\r\\n\\t\\t\\t\\t\\t    \\t\\t\\tstrResult += delimiter;\\r\\n\\t\\t\\t\\t\\t    \\t\\t}\\r\\n\\t\\t\\t\\t\\t    \\t\\tstrResult += this.__getFieldValue(headerText,delimiter);\\r\\n\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t        strResult += newLine;\\r\\n\\t\\t\\t\\t        if(headerSeparator)\\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\tvar separatorLength = strResult.length + 20;\\r\\n\\t\\t\\t\\t        \\tfor(var count = 0;count < separatorLength;count++)\\r\\n\\t\\t\\t\\t \\t        {\\r\\n\\t\\t\\t\\t        \\t\\tstrResult += headerSeparator;\\r\\n\\t\\t\\t\\t \\t        }\\r\\n\\t\\t\\t\\t        \\tstrResult += newLine;\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__grid.tBodies && this.__grid.tBodies.length > 0 && this.__grid.tBodies[0].rows && this.__grid.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrRows = this.__grid.tBodies[0].rows;\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t    \\t\\tfor(rowIndex = 0;rowIndex < arrRows.length;rowIndex++)\\r\\n\\t\\t \\t        {\\r\\n\\t\\t        \\t\\tvar row = arrRows[rowIndex];\\r\\n\\t\\t        \\t\\tvar cells = row.cells;\\r\\n\\t\\t        \\t\\tfor(colIndex = 0;colIndex < cells.length;colIndex++)\\r\\n\\t\\t    \\t        {\\r\\n\\t\\t        \\t\\t\\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t        \\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t\\t        \\t\\t\\tif(colIndex > 0)\\r\\n\\t\\t\\t\\t\\t    \\t\\t{\\r\\n\\t\\t\\t\\t\\t    \\t\\t\\tstrResult += delimiter;\\r\\n\\t\\t\\t\\t\\t    \\t\\t}\\r\\n\\t\\t\\t        \\t\\t\\tstrResult += this.__getFieldValue(cell.textContent.trim());\\r\\n\\t\\t\\t\\t        \\t}\\r\\n\\t\\t    \\t        }\\r\\n\\t\\t        \\t\\tstrResult += newLine;\\r\\n\\t\\t \\t        }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn strResult;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getTableAsXML = function() \\r\\n\\t{ \\r\\n\\t\\tvar strXML = \\\"\\\";\\r\\n\\t\\tif(this.__grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tstrXML = '<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>';\\r\\n\\t\\t\\tstrXML += '<root>';\\r\\n\\t\\t\\tvar grid = this.__getPrototype(this.__grid);\\r\\n\\t\\t\\tif(grid && this.__isTypeNSGrid(grid))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tblHeader = grid.__tblCenterHeader;\\r\\n\\t\\t    \\tvar tblBody = grid.__tblCenterBody;\\r\\n\\t\\t    \\tif(tblHeader && tblHeader.tBodies && tblHeader.tBodies.length > 0 && tblHeader.tBodies[0].rows && tblHeader.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\tstrXML += '<columns>';\\r\\n\\t\\t    \\t\\tvar arrColumns = grid.__columns;\\r\\n\\t\\t    \\t\\tif(grid.gridType === grid.GRID_TYPE_GROUP)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrColumns = grid.util.cloneObject(arrColumns);\\r\\n\\t\\t\\t\\t\\t\\tarrColumns.splice(0, 1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t    \\t\\tvar cell = null;\\r\\n\\t\\t    \\t\\tvar arrCollItem = [];\\r\\n\\t\\t\\t        for(colIndex = 0; colIndex < arrColumns.length; colIndex++)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t        \\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t    \\t\\tvar headerText = colItem[\\\"headerText\\\"];\\r\\n\\t\\t\\t\\t    \\t\\tstrXML += \\\"<column>\\\" + headerText + \\\"</column>\\\";\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        strXML += '</columns>';\\r\\n\\t\\t\\t        if(tblBody && tblBody.tBodies && tblBody.tBodies.length > 0 && tblBody.tBodies[0].rows && tblBody.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t        \\tstrXML += '<rows>';\\r\\n\\t\\t\\t        \\tvar arrItems = grid.__getAllItems();\\r\\n\\t\\t\\t        \\tvar colText = \\\"\\\";\\r\\n\\t\\t\\t        \\tvar rowCounter = 1;\\r\\n\\t\\t\\t        \\tfor(rowIndex = 0;rowIndex < arrItems.length;rowIndex++)\\r\\n\\t\\t\\t \\t        {\\r\\n\\t\\t\\t        \\t\\tvar item = arrItems[rowIndex];\\r\\n\\t\\t\\t        \\t\\tif(!item.hasOwnProperty(grid.__fieldRowVisible) || item[grid.__fieldRowVisible])\\r\\n\\t\\t\\t        \\t\\t{\\r\\n\\t\\t\\t        \\t\\t\\tstrXML += '<row id=\\\"row-'+ rowCounter++ +'\\\">';\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar colCounter = 1;\\r\\n\\t\\t\\t\\t        \\t\\tfor(colIndex = 0;colIndex < arrColumns.length;colIndex++)\\r\\n\\t\\t\\t\\t    \\t        {\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t\\t        \\t\\t\\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t\\t    \\t        \\t{\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolText = item[colItem[\\\"dataField\\\"]];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(colItem.hasOwnProperty(\\\"exportRenderer\\\"))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcolText = colItem[\\\"exportRenderer\\\"](item,colItem[\\\"dataField\\\"],item[grid.__fieldIndex],count);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tstrXML += '<column id=\\\"column-'+ colCounter++ +'\\\">';\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tstrXML += colText;\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tstrXML += '</column>';\\r\\n\\t\\t\\t\\t    \\t        \\t}\\r\\n\\t\\t\\t\\t    \\t        }\\r\\n\\t\\t\\t\\t        \\t\\tstrXML += '</row>';\\r\\n\\t\\t\\t        \\t\\t}\\r\\n\\t\\t\\t \\t        }\\r\\n\\t\\t\\t        \\tstrXML += '</rows>';\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__grid.tHead && this.__grid.tHead.rows && this.__grid.tHead.rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar headerRow = this.__grid.tHead.rows[0];\\r\\n\\t\\t\\t\\t\\tif(headerRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrCells = [];\\r\\n\\t\\t\\t\\t\\t\\tif(headerRow.getElementsByTagName(\\\"th\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"th\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(headerRow.getElementsByTagName(\\\"td\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"td\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tstrXML += '<columns>';\\r\\n\\t\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t    \\t\\tvar cell = null;\\r\\n\\t\\t\\t\\t        for(colIndex = 0; colIndex < arrCells.length; colIndex++)\\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t\\t        \\tcell = arrCells[colIndex];\\r\\n\\t\\t\\t\\t\\t        \\tstrXML += \\\"<column>\\\" + cell.textContent.trim() + \\\"</column>\\\";\\r\\n\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t        strXML += '</columns>';\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__grid.tBodies && this.__grid.tBodies.length > 0 && this.__grid.tBodies[0].rows && this.__grid.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrRows = this.__grid.tBodies[0].rows;\\r\\n\\t\\t\\t\\t\\tstrXML += '<rows>';\\r\\n\\t\\t        \\tvar rowCounter = 1;\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t    \\t\\tfor(rowIndex = 0;rowIndex < arrRows.length;rowIndex++)\\r\\n\\t\\t \\t        {\\r\\n\\t\\t    \\t\\t\\tstrXML += '<row id=\\\"row-'+ rowCounter++ +'\\\">';\\r\\n\\t\\t    \\t\\t\\tvar colCounter = 1;\\r\\n\\t\\t        \\t\\tvar row = arrRows[rowIndex];\\r\\n\\t\\t        \\t\\tvar cells = row.cells;\\r\\n\\t\\t        \\t\\tfor(colIndex = 0;colIndex < cells.length;colIndex++)\\r\\n\\t\\t    \\t        {\\r\\n\\t\\t        \\t\\t\\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t        \\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t\\t        \\t\\t\\tstrXML += '<column id=\\\"column-'+ colCounter++ +'\\\">';\\r\\n\\t\\t        \\t\\t\\t\\tstrXML += cell.textContent.trim();\\r\\n\\t\\t        \\t\\t\\t\\tstrXML += '</column>';\\r\\n\\t\\t\\t\\t        \\t}\\r\\n\\t\\t    \\t        }\\r\\n\\t\\t        \\t\\tstrXML += '</row>';\\r\\n\\t\\t \\t        }\\r\\n\\t\\t    \\t\\tstrXML += '</rows>';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tstrXML += '</root>';\\r\\n\\t\\t}\\r\\n\\t\\treturn strXML;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getTableAsJson = function() \\r\\n\\t{ \\r\\n\\t\\tvar retValue = { columns: [], rows: [] };\\r\\n\\t\\tif(this.__grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar grid = this.__getPrototype(this.__grid);\\r\\n\\t\\t\\tif(grid && this.__isTypeNSGrid(grid))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tblHeader = grid.__tblCenterHeader;\\r\\n\\t\\t    \\tvar tblBody = grid.__tblCenterBody;\\r\\n\\t\\t    \\tif(tblHeader && tblHeader.tBodies && tblHeader.tBodies.length > 0 && tblHeader.tBodies[0].rows && tblHeader.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\tvar arrColumns = grid.__columns;\\r\\n\\t\\t    \\t\\tif(grid.gridType === grid.GRID_TYPE_GROUP)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrColumns = grid.util.cloneObject(arrColumns);\\r\\n\\t\\t\\t\\t\\t\\tarrColumns.splice(0, 1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t        for(colIndex = 0; colIndex < arrColumns.length; colIndex++)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t        \\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t    \\t\\tvar headerText = colItem[\\\"headerText\\\"];\\r\\n\\t\\t\\t\\t    \\t\\tretValue.columns.push(headerText);\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        if(tblBody && tblBody.tBodies && tblBody.tBodies.length > 0 && tblBody.tBodies[0].rows && tblBody.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t        \\tvar arrItems = grid.__getAllItems();\\r\\n\\t\\t\\t        \\tvar colText = \\\"\\\";\\r\\n\\t\\t\\t        \\tfor(rowIndex = 0;rowIndex < arrItems.length;rowIndex++)\\r\\n\\t\\t\\t \\t        {\\r\\n\\t\\t\\t        \\t\\tvar item = arrItems[rowIndex];\\r\\n\\t\\t\\t        \\t\\tif(!item.hasOwnProperty(grid.__fieldRowVisible) || item[grid.__fieldRowVisible])\\r\\n\\t\\t\\t        \\t\\t{\\r\\n\\t\\t\\t\\t        \\t\\tvar rowData = [];\\r\\n\\t\\t\\t\\t        \\t\\tfor(colIndex = 0;colIndex < arrColumns.length;colIndex++)\\r\\n\\t\\t\\t\\t    \\t        {\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar colItem = arrColumns[colIndex];\\r\\n\\t\\t\\t\\t        \\t\\t\\tif(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"])))\\r\\n\\t\\t\\t\\t    \\t        \\t{\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolText = item[colItem[\\\"dataField\\\"]];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(colItem.hasOwnProperty(\\\"exportRenderer\\\"))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcolText = colItem[\\\"exportRenderer\\\"](item,colItem[\\\"dataField\\\"],item[grid.__fieldIndex],count);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\trowData.push(colText ? colText : \\\"\\\");\\r\\n\\t\\t\\t\\t    \\t        \\t}\\r\\n\\t\\t\\t\\t    \\t        }\\r\\n\\t\\t\\t\\t        \\t\\tretValue.rows.push(rowData);\\r\\n\\t\\t\\t        \\t\\t}\\r\\n\\t\\t\\t \\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__grid.tHead && this.__grid.tHead.rows && this.__grid.tHead.rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar headerRow = this.__grid.tHead.rows[0];\\r\\n\\t\\t\\t\\t\\tif(headerRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrCells = [];\\r\\n\\t\\t\\t\\t\\t\\tif(headerRow.getElementsByTagName(\\\"th\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"th\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(headerRow.getElementsByTagName(\\\"td\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"td\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t    \\t\\tvar cell = null;\\r\\n\\t\\t\\t\\t        for(colIndex = 0; colIndex < arrCells.length; colIndex++)\\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t\\t        \\tcell = arrCells[colIndex];\\r\\n\\t\\t\\t\\t\\t        \\tretValue.columns.push(typeof cell !== \\\"undefined\\\" ? cell.textContent.trim() : \\\"\\\");\\r\\n\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__grid.tBodies && this.__grid.tBodies.length > 0 && this.__grid.tBodies[0].rows && this.__grid.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrRows = this.__grid.tBodies[0].rows;\\r\\n\\t\\t        \\tvar rowCounter = 1;\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t    \\t\\tfor(rowIndex = 0;rowIndex < arrRows.length;rowIndex++)\\r\\n\\t\\t \\t        {\\r\\n\\t\\t        \\t\\tvar row = arrRows[rowIndex];\\r\\n\\t\\t        \\t\\tvar style = window.getComputedStyle(row);\\r\\n\\t\\t        \\t\\tif (style.display !== \\\"none\\\") \\r\\n\\t\\t        \\t\\t{\\r\\n\\t\\t        \\t\\t\\tvar rowData = [];\\r\\n\\t\\t\\t        \\t\\tvar cells = row.cells;\\r\\n\\t\\t\\t        \\t\\tfor(colIndex = 0;colIndex < cells.length;colIndex++)\\r\\n\\t\\t\\t    \\t        {\\r\\n\\t\\t\\t        \\t\\t\\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t\\t\\t        \\t\\t\\trowData.push(typeof cell !== \\\"undefined\\\" ? cell.textContent.trim() : \\\"\\\");\\r\\n\\t\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t    \\t        }\\r\\n\\t\\t\\t        \\t\\tretValue.rows.push(rowData);\\r\\n\\t\\t        \\t\\t}\\r\\n\\t\\t \\t        }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn JSON.stringify(retValue);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getTableAsArray = function() \\r\\n\\t{ \\r\\n\\t\\tvar arrSource = [];\\r\\n\\t\\tvar arrColumns = [];\\r\\n\\t\\tvar util = this.util;\\r\\n\\t\\tif(this.__grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar grid = this.__getPrototype(this.__grid);\\r\\n\\t\\t\\tif(grid && this.__isTypeNSGrid(grid))\\r\\n\\t\\t\\t{\\r\\n\\t\\t    \\tif(grid.__columns && grid.__columns.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\tvar arrColumnsTemp = grid.util.cloneObject(grid.__columns,true);\\r\\n\\t\\t    \\t\\tif(grid.gridType === grid.GRID_TYPE_GROUP)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\t\\tarrColumnsTemp.splice(0, 1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t        for(colIndex = 0; colIndex < arrColumnsTemp.length; colIndex++)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar colItem = arrColumnsTemp[colIndex];\\r\\n\\t\\t\\t        \\tif(!(colItem && (!colItem.hasOwnProperty(grid.__fieldColVisible) || colItem[grid.__fieldColVisible]) && (!colItem.hasOwnProperty(\\\"isExportable\\\") || Boolean.parse(colItem[\\\"isExportable\\\"]))))\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t        \\t\\tarrColumnsTemp.splice(colIndex, 1);\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        \\telse\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t        \\t\\tcolItem.headerCellStyle = colItem[\\\"excelStyleHeaderFunction\\\"] ? colItem[\\\"excelStyleHeaderFunction\\\"](colItem,colIndex) : null;\\r\\n\\t\\t\\t        \\t\\tcolItem.type = colItem.exportType;\\r\\n\\t\\t\\t        \\t\\tif(!util.isUndefinedOrNull(colItem.width))\\r\\n\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t        \\t\\tvar unit = util.getDimensionUnit(colItem.width);\\r\\n\\t\\t\\t\\t        \\t\\tswitch(unit)\\r\\n\\t\\t\\t\\t        \\t\\t{\\r\\n\\t\\t\\t\\t        \\t\\t\\tcase 1:\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolItem.widthInPercentage = parseInt(colItem.width.substring(0,colItem.width.length - 1));\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolItem.width = null;\\r\\n\\t\\t\\t\\t        \\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t        \\t\\t\\tcase 2:\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolItem.widthInPx = util.getDimensionAsNumber(null,colItem.width);\\r\\n\\t\\t\\t\\t        \\t\\t\\t\\tcolItem.width = null;\\r\\n\\t\\t\\t\\t        \\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t        \\t\\t}\\r\\n\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        var dataSource = grid.getFilteredData();\\r\\n\\t\\t\\t        if(dataSource && dataSource.length > 0)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tfor(rowIndex = 0;rowIndex < dataSource.length;rowIndex++)\\r\\n\\t\\t\\t \\t        {\\r\\n\\t\\t\\t        \\t\\tvar data = dataSource[rowIndex];\\r\\n\\t\\t\\t        \\t\\tvar item = {};\\r\\n\\t\\t\\t        \\t\\tfor(colIndex = 0;colIndex < arrColumnsTemp.length;colIndex++)\\r\\n\\t\\t\\t    \\t        {\\r\\n\\t\\t\\t        \\t\\t\\tvar colItem = arrColumnsTemp[colIndex];\\r\\n\\t\\t\\t        \\t\\t\\tvar dataField = colItem.dataField;\\r\\n\\t\\t\\t        \\t\\t\\tvar text = colItem[\\\"exportGetBodyTextFunction\\\"] ? colItem[\\\"exportGetBodyTextFunction\\\"](data,dataField,colItem) : data[dataField];\\r\\n\\t\\t\\t        \\t\\t\\tvar style = colItem[\\\"excelStyleBodyFunction\\\"] ? colItem[\\\"excelStyleBodyFunction\\\"](data,dataField,colItem,text) : null;\\r\\n\\t\\t\\t        \\t\\t\\titem[dataField] = {value: text,style: style};\\r\\n\\t\\t\\t    \\t        }\\r\\n\\t\\t\\t        \\t\\tarrSource.push(item);\\r\\n\\t\\t\\t \\t        }\\r\\n\\t\\t\\t        \\tif(grid.__enableFooter)\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t        \\t\\tvar item = {};\\r\\n\\t\\t\\t        \\t\\tfor (var colIndex = 0; colIndex < arrColumnsTemp.length; colIndex++)\\r\\n\\t\\t\\t    \\t\\t    {\\r\\n\\t\\t\\t    \\t\\t    \\tvar colItem = arrColumnsTemp[colIndex];\\r\\n\\t\\t\\t    \\t\\t    \\tvar dataField = colItem.dataField;\\r\\n\\t\\t\\t    \\t\\t    \\tvar text = colItem[\\\"exportGetFooterTextFunction\\\"] ? colItem[\\\"exportGetFooterTextFunction\\\"](dataField,colItem,grid.getGroupedSource(),0,colIndex) : \\\"\\\";\\r\\n\\t\\t\\t    \\t\\t    \\tvar style = colItem[\\\"excelStyleFooterFunction\\\"] ? colItem[\\\"excelStyleFooterFunction\\\"](dataField,colItem,grid.getGroupedSource(),0,colIndex,text) : null;\\r\\n\\t\\t\\t        \\t\\t\\titem[dataField] = {value: text,style: style};\\r\\n\\t\\t\\t    \\t\\t    }\\r\\n\\t\\t\\t        \\t\\tarrSource.push(item);\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        arrColumns = arrColumnsTemp;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__grid.tHead && this.__grid.tHead.rows && this.__grid.tHead.rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar headerRow = this.__grid.tHead.rows[0];\\r\\n\\t\\t\\t\\t\\tif(headerRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrCells = [];\\r\\n\\t\\t\\t\\t\\t\\tif(headerRow.getElementsByTagName(\\\"th\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"th\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(headerRow.getElementsByTagName(\\\"td\\\").length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells = headerRow.getElementsByTagName(\\\"td\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t\\t    \\t\\tvar cell = null;\\r\\n\\t\\t\\t    \\t\\tvar text = \\\"\\\";\\r\\n\\t\\t\\t    \\t\\tvar headerText = \\\"\\\";\\r\\n\\t\\t\\t    \\t\\tvar dataField = \\\"\\\";\\r\\n\\t\\t\\t\\t        for(colIndex = 0; colIndex < arrCells.length; colIndex++)\\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t\\t        \\tcell = arrCells[colIndex];\\r\\n\\t\\t\\t\\t\\t        \\tvar altText = \\\"col\\\" + colIndex;\\r\\n\\t\\t\\t\\t\\t        \\tif(typeof cell == \\\"undefined\\\" || cell.textContent.trim() !== \\\"\\\")\\r\\n\\t\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t\\t        \\t\\ttext = \\\"\\\";\\r\\n\\t\\t\\t\\t\\t        \\t\\theaderText = \\\"\\\";\\r\\n\\t\\t\\t\\t\\t        \\t\\tdataField = altText;\\r\\n\\t\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t\\t\\t        \\telse\\r\\n\\t\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t\\t        \\t\\ttext = cell.textContent.trim();\\r\\n\\t\\t\\t\\t\\t        \\t\\theaderText = text;\\r\\n\\t\\t\\t\\t\\t        \\t\\tdataField = text;\\r\\n\\t\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t\\t\\t        \\tarrColumns.push({headerText:headerText,dataField:dataField,widthInPx:cell.offsetWidth});\\r\\n\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__grid.tBodies && this.__grid.tBodies.length > 0 && this.__grid.tBodies[0].rows && this.__grid.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrRows = this.__grid.tBodies[0].rows;\\r\\n\\t\\t    \\t\\tvar rowIndex = 0;\\r\\n\\t\\t    \\t\\tvar colIndex = 0;\\r\\n\\t\\t    \\t\\tfor(rowIndex = 0;rowIndex < arrRows.length;rowIndex++)\\r\\n\\t\\t \\t        {\\r\\n\\t\\t        \\t\\tvar row = arrRows[rowIndex];\\r\\n\\t\\t        \\t\\tvar style = window.getComputedStyle(row);\\r\\n\\t\\t        \\t\\tif (style.display !== \\\"none\\\") \\r\\n\\t\\t        \\t\\t{\\r\\n\\t\\t\\t        \\t\\tvar cells = row.cells;\\r\\n\\t\\t\\t        \\t\\tvar item = {};\\r\\n\\t\\t\\t        \\t\\tvar arrColIndex = 0;\\r\\n\\t\\t\\t        \\t\\tfor(colIndex = 0;colIndex < cells.length;colIndex++)\\r\\n\\t\\t\\t    \\t        {\\r\\n\\t\\t\\t        \\t\\t\\tif(!this.__isColumnIgnored(colIndex))\\r\\n\\t\\t\\t\\t\\t        \\t{\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar objColumn = arrColumns[arrColIndex];\\r\\n\\t\\t\\t\\t        \\t\\t\\tvar text = (typeof cell == \\\"undefined\\\" || cell.textContent.trim() !== \\\"\\\") ? cell.textContent.trim() : \\\"\\\";\\r\\n\\t\\t\\t\\t        \\t\\t\\titem[objColumn.dataField] = {value: text};\\r\\n\\t\\t\\t\\t        \\t\\t\\tarrColIndex++;\\r\\n\\t\\t\\t\\t\\t        \\t}\\r\\n\\t\\t\\t    \\t        }\\r\\n\\t\\t\\t        \\t\\tarrSource.push(item);\\r\\n\\t\\t        \\t\\t}\\r\\n\\t\\t \\t        }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn {columns:arrColumns,source:arrSource};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getStructureForPDF = function(width,fontSize) \\r\\n\\t{ \\r\\n\\t\\tif(this.__grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar tblResult = this.__getTable();\\r\\n\\t\\t\\ttblResult.style.width = width + \\\"px\\\";\\r\\n\\t\\t\\ttblResult.style.fontSize = fontSize + \\\"px\\\";\\r\\n\\t\\t\\tvar divParent = this.util.createDiv(\\\"div\\\" + this.util.getUniqueId());\\r\\n\\t\\t\\tdivParent.appendChild(tblResult);\\r\\n\\t\\t\\treturn divParent;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getStructureForImage = function() \\r\\n\\t{ \\r\\n\\t\\tvar divReturn = null;\\r\\n\\t\\tif(this.__grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar grid = this.__getPrototype(this.__grid);\\r\\n\\t\\t\\tif(grid && this.__isTypeNSGrid(grid))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivReturn = grid.__divOuterContainer;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivReturn = this.__grid.parentElement;\\r\\n\\t\\t\\t\\tif(divReturn && divReturn.nodeName === \\\"BODY\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdivReturn = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn divReturn;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__isColumnIgnored = function(colIndex) \\r\\n\\t{\\r\\n\\t    if(this.__ignoreColumn && this.__ignoreColumn.length > 0)\\r\\n\\t    {\\r\\n\\t    \\tfor(var count = 0;count < this.__ignoreColumn.length;count++)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tif(this.__ignoreColumn[count] === colIndex)\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\treturn true;\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t}\\r\\n\\t    }\\r\\n\\t    return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getFieldValue = function(value,delimiter) \\r\\n\\t{\\r\\n\\t\\tif(!value)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvalue = \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t\\tvalue = \\\"\\\" + value;\\r\\n\\t    var addQuotes = (value.indexOf(delimiter) !== -1) || (value.indexOf('\\\\r') !== -1) || (value.indexOf('\\\\n') !== -1);\\r\\n\\t    var replaceDoubleQuotes = (value.indexOf('\\\"') !== -1);\\r\\n\\t    if (replaceDoubleQuotes) \\r\\n\\t    {\\r\\n\\t    \\tvalue = fixedValue.replace(/\\\"/g, '\\\"\\\"');\\r\\n\\t    }\\r\\n\\t    if (addQuotes || replaceDoubleQuotes) \\r\\n\\t    {\\r\\n\\t    \\tvalue = '\\\"' + value + '\\\"';\\r\\n\\t    }\\r\\n\\t    return value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getFileName = function(format) \\r\\n\\t{\\r\\n\\t\\tvar date = new Date();\\r\\n\\t    var day = date.getDate();\\r\\n\\t    var month = date.getMonth() + 1;\\r\\n\\t    var year = date.getFullYear();\\r\\n\\t    var hour = date.getHours();\\r\\n\\t    var mins = date.getMinutes();\\r\\n\\t    var timePart = day + \\\".\\\" + month + \\\".\\\" + year + \\\"_\\\" + hour + \\\".\\\" + mins;\\r\\n\\t    var fileName = (this.__fileName? this.__fileName : \\\"download\\\");\\r\\n\\t    fileName = fileName + \\\"(\\\" + timePart + \\\")\\\" + \\\".\\\" + format;\\r\\n\\t    \\r\\n\\t    return fileName;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//taken from http://stackoverflow.com/questions/4998908/convert-data-uri-to-file-then-append-to-formdata\\r\\n\\tNSExport.prototype.__dataURItoBlob = function(dataURI) \\r\\n\\t{\\r\\n\\t    // convert base64/URLEncoded data component to raw binary data held in a string\\r\\n\\t    var byteString = null;\\r\\n\\t    var uintArray = null;\\r\\n\\t    var mimeString = null;\\r\\n\\t    if (dataURI.split(',')[0].indexOf('base64') >= 0)\\r\\n\\t    {\\r\\n\\t    \\t byteString = window.atob(dataURI.split(',')[1]);\\r\\n\\t    }\\r\\n\\t    else\\r\\n\\t    {\\r\\n\\t    \\t byteString = decodeURIComponent(dataURI.split(',')[1]);\\r\\n\\t    }\\r\\n\\t    // separate out the mime component\\r\\n\\t    mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\\r\\n\\t    // write the bytes of the string to a typed array\\r\\n\\t    uintArray = new Uint8Array(byteString.length);\\r\\n\\t    for (var count = 0; count < byteString.length; count++) \\r\\n\\t    {\\r\\n\\t    \\tuintArray[count] = byteString.charCodeAt(count);\\r\\n\\t    }\\r\\n\\t\\r\\n\\t    return new Blob([uintArray], {type:mimeString});\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__includeJavaScriptFile = function (filePath,callback,position)\\r\\n\\t{\\r\\n\\t    if(filePath)\\r\\n\\t    {\\r\\n\\t        if(!position)\\r\\n\\t        {\\r\\n\\t            position = \\\"body\\\";\\r\\n\\t        }\\r\\n\\t        var domPosition = document.getElementsByTagName(position)[0];\\r\\n\\t        var script = document.createElement(\\\"script\\\");\\r\\n\\t        script.setAttribute(\\\"id\\\", filePath);\\r\\n\\t        script.setAttribute(\\\"type\\\",\\\"text/javascript\\\");\\r\\n\\t        script.setAttribute(\\\"src\\\",filePath);\\r\\n\\t        if(callback)\\r\\n\\t        {\\r\\n\\t            script.onload = function()\\r\\n\\t            {\\r\\n\\t            \\tcallback(filePath);\\r\\n\\t            }; \\r\\n\\t        }\\r\\n\\t        domPosition.appendChild(script);\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__getPrototype = function(grid) \\r\\n\\t{\\r\\n\\t\\tif(grid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isElementOfType(grid,\\\"NS-GRID\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tgrid = grid.__nsGrid;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn grid;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.__isTypeNSGrid = function(grid) \\r\\n\\t{\\r\\n\\t\\ttry\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(grid)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(grid instanceof NSGrid)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tcatch(error)\\r\\n\\t\\t{}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSExport.prototype.xslxExport = function(objNSExport,worksheetName,event,properties)\\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__objNSExport = objNSExport;\\r\\n\\t\\tthis.__worksheetName = worksheetName;\\r\\n\\t\\tthis.__event = event;\\r\\n\\t\\tthis.__properties = properties;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\t\\r\\n\\t\\tthis.exportToxlsx = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar processXSLX = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objTableValue = self.__objNSExport.__getTableAsArray();\\r\\n\\t\\t\\t\\tif(objTableValue)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(!self.__properties)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tself.__properties = {};\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar fileName = self.__objNSExport.__getFileName(\\\"xlsx\\\");\\r\\n\\t\\t\\t\\t\\tvar headerStyle = {\\r\\n\\t\\t\\t\\t\\t\\t\\tfont: {bold: true, color: '#FFFFFF'},\\r\\n\\t\\t\\t\\t\\t\\t\\thorizontal: 'center',\\r\\n\\t\\t\\t\\t\\t\\t\\tpattern: {color: '#000000'}\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\tvar prop = {};\\r\\n\\t\\t\\t\\t\\tfor(var key in self.__properties)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tprop[key] = self.__properties[key];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tprop.dataSource = objTableValue.source;\\r\\n\\t\\t\\t\\t\\tprop.columns = objTableValue.columns;\\r\\n\\t\\t\\t\\t\\tprop.name = prop.name || \\\"Sheet 1\\\";\\r\\n\\t\\t\\t\\t\\tprop.headerStyle = prop.headerStyle || headerStyle;\\r\\n\\t\\t\\t\\t\\tvar arrSheet=[prop];\\r\\n\\t\\t\\t\\t\\tvar setting = {fileName:fileName,sheets:arrSheet};\\r\\n\\t\\t\\t\\t\\tvar xlsxExport = new NSXlsxExport(setting);\\r\\n\\t\\t\\t\\t\\txlsxExport.process();\\r\\n\\t\\t\\t\\t\\tif(self.__event)\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\t\\tself.util.preventDefault(this.__event);\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tprocessXSLX();\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\treturn NSExport;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSExport\\\",NSExport);\\\"use strict\\\";\\r\\nvar NSFilter = (function()\\r\\n{\\r\\n\\tfunction NSFilter(data,filter,setting,recordLimit,isHierarchical,childField,filterFunction,hierarchyFilterChildren,arrIgnoreKeysInCloneDataSource) \\r\\n\\t{\\r\\n\\t\\tthis.EXACT = \\\"exact\\\";\\r\\n\\t\\tthis.STARTS_WITH = \\\"startsWith\\\";\\r\\n\\t\\tthis.ENDS_WITH = \\\"endsWith\\\";\\r\\n\\t\\tthis.CONTAINS = \\\"contains\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.IS_FOUND_FIELD = \\\"__nsFilter__found\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__data = data;\\r\\n\\t\\tthis.__filter = filter;\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__recordLimit = (parseInt(recordLimit) > 0) ? recordLimit : -1;\\r\\n\\t\\tthis.__isHierarchical = this.util.isUndefined(isHierarchical) ? false : Boolean.parse(isHierarchical);\\r\\n\\t\\tthis.__childField = childField ? childField : \\\"children\\\";\\r\\n\\t\\tthis.__filterFunction = filterFunction;\\r\\n\\t\\tthis.__hierarchyFilterChildren = hierarchyFilterChildren;\\r\\n\\t\\tthis.__arrIgnoreKeysInCloneDataSource = arrIgnoreKeysInCloneDataSource;\\r\\n\\t\\tthis.__ignoreSameLevelNode = true;\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSFilter.prototype.execute = function(data,filter,setting,recordLimit,isHierarchical,childField,filterFunction,hierarchyFilterChildren,arrIgnoreKeysInCloneDataSource) \\r\\n\\t{ \\r\\n\\t\\tdata = data ? data : this.__data;\\r\\n\\t\\tfilter = filter ? filter : this.__filter;\\r\\n\\t\\tsetting = setting ? setting : this.__setting;\\r\\n\\t\\trecordLimit = (parseInt(recordLimit) > 0) ? recordLimit : this.__recordLimit;\\r\\n\\t\\tisHierarchical = this.util.isUndefined(isHierarchical) ? Boolean.parse(this.__isHierarchical) : Boolean.parse(isHierarchical);\\r\\n\\t\\tchildField = childField ? childField : this.__childField;\\r\\n\\t\\tfilterFunction = filterFunction ? filterFunction : this.__filterFunction;\\r\\n\\t\\thierarchyFilterChildren = hierarchyFilterChildren ? hierarchyFilterChildren : this.__hierarchyFilterChildren;\\r\\n\\t\\tarrIgnoreKeysInCloneDataSource = this.util.isUndefinedOrNull(arrIgnoreKeysInCloneDataSource) ? this.__arrIgnoreKeysInCloneDataSource : arrIgnoreKeysInCloneDataSource;\\r\\n\\t\\tif(data && filter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar dataSource = data.slice(0);\\r\\n\\t\\t\\tvar arrFilter = [];\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar callFilterFunction = function(source,level,parentItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\t\\tfor (var count = 0; count < source.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\t\\tvar found = false;\\r\\n\\t\\t\\t\\t\\tif(isHierarchical && item[childField] && item[childField].length > 0 )\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrChild = callFilterFunction(item[childField],level + 1,item);\\r\\n\\t\\t\\t\\t\\t\\tif(arrChild && arrChild.length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tfound = true;\\r\\n\\t\\t\\t\\t\\t\\t\\tif(self.__ignoreSameLevelNode)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t            item[childField] = arrChild;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(!found && self.__filterItem(item,filter,setting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(isHierarchical && hierarchyFilterChildren)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar arrChildren = item[childField];\\r\\n\\t\\t\\t\\t\\t\\t\\tif(arrChildren && arrChildren.length > 0)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar childItem = null;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar childLength = arrChildren.length;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tfor(var childCount = childLength - 1;childCount > -1;childCount--)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tchildItem = arrChildren[childCount];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif(childItem)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(!hierarchyFilterChildren(childItem,childCount,childItem[self.IS_FOUND_FIELD],filter,setting,item))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tarrChildren.splice(childCount, 1);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tfound = true;\\r\\n\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t\\tif(!isHierarchical && recordLimit > 0 && arrReturn.length >= recordLimit)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//return false;\\r\\n\\t\\t\\t\\treturn arrReturn;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar callNonHierarchicalFilterFunction = function(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\t\\tfor (var count = 0; count < source.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\t\\tif(self.__filterItemNonHierarchical(item,filter,setting,filterFunction))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn arrReturn;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tdataSource = this.util.cloneObject(dataSource,isHierarchical,[],arrIgnoreKeysInCloneDataSource);\\r\\n\\t\\t\\tif(isHierarchical)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrFilter = callFilterFunction(dataSource,1,null);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrFilter = callNonHierarchicalFilterFunction(dataSource);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrFilter;\\r\\n\\t\\t}\\r\\n\\t\\treturn data;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterItemNonHierarchical = function(item,filter,setting,filterFunction) \\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tif(filterFunction)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = filterFunction(item,filter,setting);\\r\\n\\t\\t\\tthis.__setItem(item,retValue);\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t}\\r\\n\\t\\telse if(filter instanceof Function) \\r\\n\\t    {\\r\\n\\t\\t\\tretValue = filter(item,setting);\\r\\n\\t        this.__setItem(item,retValue);\\r\\n\\t        return retValue;\\r\\n\\t    }\\r\\n\\t    else if(filter instanceof Array) \\r\\n\\t    {\\r\\n\\t        for (var count = 0; count < filter.length; ++count) \\r\\n\\t        {\\r\\n\\t            if (this.__filterItemNonHierarchical(item,filter[count],setting,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\tthis.__setItem(item,true);\\r\\n\\t            \\treturn true;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    }\\r\\n\\t    else if(setting.type === \\\"date\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterDate(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if(typeof(item) === \\\"string\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterString(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if (item === item + 0 && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterNumeric(item,filter);\\r\\n\\t    }\\r\\n\\t    else if(typeof (filter) === \\\"object\\\") \\r\\n\\t    {\\r\\n\\t        for(var key in filter) \\r\\n\\t        {\\r\\n\\t        \\tvar tempSetting = {};\\r\\n\\t        \\tif(setting && setting[key])\\r\\n\\t        \\t{\\r\\n\\t        \\t\\ttempSetting = setting[key];\\r\\n\\t        \\t}\\r\\n\\t            if(!this.__filterItemNonHierarchical(item[key],filter[key],tempSetting,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\treturn false;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        this.__setItem(item,true);\\r\\n\\t        return true;\\r\\n\\t    }\\r\\n\\t\\tretValue = (filter == item);\\r\\n\\t    this.__setItem(item,retValue);\\r\\n\\t    return retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterItem = function(item,filter,setting,isHierarchical,childField,parentItem,filterFunction) \\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tif(filterFunction)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = filterFunction(item,filter,setting,isHierarchical,childField,parentItem);\\r\\n\\t\\t\\tthis.__setItem(item,retValue);\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t}\\r\\n\\t\\telse if(filter instanceof Function) \\r\\n\\t    {\\r\\n\\t\\t\\tretValue = filter(item,setting);\\r\\n\\t        this.__setItem(item,retValue);\\r\\n\\t        return retValue;\\r\\n\\t    }\\r\\n\\t    else if(filter instanceof Array) \\r\\n\\t    {\\r\\n\\t        for (var count = 0; count < filter.length; ++count) \\r\\n\\t        {\\r\\n\\t            if (this.__filterItem(item,filter[count],setting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\tthis.__setItem(item,true);\\r\\n\\t            \\treturn true;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    }\\r\\n\\t    else if(setting.type === \\\"date\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterDate(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if(typeof(item) === \\\"string\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterString(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if (item === item + 0 && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterNumeric(item,filter);\\r\\n\\t    }\\r\\n\\t    else if(typeof (filter) === \\\"object\\\") \\r\\n\\t    {\\r\\n\\t        for(var key in filter) \\r\\n\\t        {\\r\\n\\t        \\tif(isHierarchical && key === childField)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tcontinue;\\r\\n\\t        \\t}\\r\\n\\t        \\tvar tempSetting = {};\\r\\n\\t        \\tif(setting && setting[key])\\r\\n\\t        \\t{\\r\\n\\t        \\t\\ttempSetting = setting[key];\\r\\n\\t        \\t}\\r\\n\\t            if(!this.__filterItem(item[key],filter[key],tempSetting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\treturn false;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        this.__setItem(item,true);\\r\\n\\t        return true;\\r\\n\\t    }\\r\\n\\t\\tretValue = (filter == item);\\r\\n\\t    this.__setItem(item,retValue);\\r\\n\\t    return retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__setItem = function(item,isFound)\\r\\n\\t{\\r\\n\\t\\tif(item && typeof (item) === \\\"object\\\" && isFound)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem[this.IS_FOUND_FIELD] = true;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterNumeric= function(value,searchParam)\\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tvalue = parseFloat(value);\\r\\n\\t\\tif(!isNaN(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(/<=/.test(searchParam)) // first checks if there is an operator (<,>,<=,>=)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value <= parseFloat(searchParam.replace(/<=/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/>=/.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value >= parseFloat(searchParam.replace(/>=/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/</.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value < parseFloat(searchParam.replace(/</,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/>/.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value > parseFloat(searchParam.replace(/>/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value === parseFloat(searchParam));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterDate= function(value,searchParam,setting)\\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar matchValue = function(compareValue,opt)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compValue = false;\\r\\n\\t\\t\\tif(self.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar newVal = self.__getDate(value,setting.cellFormat);\\r\\n\\t\\t\\t\\tif(newVal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tnewVal.setHours(0, 0, 0, 0);\\r\\n\\t\\t\\t\\t\\tcompareValue.setHours(0, 0, 0, 0);\\r\\n\\t\\t\\t\\t\\tswitch(opt)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"equals\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() === newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"greaterThan\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() < newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"lessThan\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() > newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"notEqual\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() != newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.util.warning(\\\"NSFilter\\\",value + \\\" cannot be converted to date Object for given cell format\\\");\\r\\n\\t\\t\\t\\t\\tcompValue = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn compValue;\\r\\n\\t\\t};\\r\\n\\t\\tvar processDate = function(date,type)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compValue = false;\\r\\n\\t\\t\\tif(date && matchType1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!date || !Object.prototype.toString.call(date) === '[object Date]')\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(setting.comparator)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = setting.comparator(value,date,setting);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = matchValue(date,type);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn compValue;\\r\\n\\t\\t};\\r\\n\\t\\tif(setting.matchType1 || setting.matchType2)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar matchType1 = setting.matchType1;\\r\\n\\t\\t\\tvar firstDate = setting.firstDate;\\r\\n\\t\\t\\tvar operation = setting.operation;\\r\\n\\t\\t\\tvar matchType2 = setting.matchType2;\\r\\n\\t\\t\\tvar secondDate = setting.secondDate;\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(firstDate && secondDate && matchType1 && matchType2 && operation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar firstVal = processDate(firstDate,matchType1);\\r\\n\\t\\t\\t\\tvar secondVal = processDate(secondDate,matchType2);\\r\\n\\t\\t\\t\\tswitch(operation)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcase \\\"and\\\":\\r\\n\\t\\t\\t\\t\\t\\tretValue = (firstVal && secondVal);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase \\\"or\\\":\\r\\n\\t\\t\\t\\t\\t\\tretValue = (firstVal || secondVal);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(firstDate && matchType1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = processDate(firstDate,matchType1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(secondDate && matchType2)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = processDate(secondDate,matchType2);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!searchParam || !Object.prototype.toString.call(searchParam) === '[object Date]')\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(setting.comparator)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = setting.comparator(value,searchParam,setting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = matchValue(searchParam,\\\"equals\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterString= function(value,searchParam,setting)\\r\\n\\t{\\r\\n\\t\\tvar regExp = null;\\r\\n\\t\\tvar regExpModifier = \\\"g\\\";\\r\\n\\t\\tvar startWithChar = \\\"(^)\\\";\\r\\n\\t\\tvar endsWithChar = \\\"($)\\\";\\r\\n\\t\\tvar searchString = \\\"\\\";\\r\\n\\t\\tvar isCaseSensitive = false;\\r\\n\\t\\tvar isMultiline = false;\\r\\n\\t\\tvar matchType = this.CONTAINS;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisCaseSensitive = Boolean.parse(setting[\\\"caseSensitive\\\"]);\\r\\n\\t\\t\\tisMultiline = Boolean.parse(setting[\\\"multiline\\\"]);\\r\\n\\t\\t\\tmatchType = setting[\\\"matchType\\\"] ? setting[\\\"matchType\\\"] : matchType;\\r\\n\\t\\t}\\r\\n\\t\\tif(!isCaseSensitive)\\r\\n\\t\\t{\\r\\n\\t\\t\\tregExpModifier += \\\"i\\\";\\r\\n\\t\\t}\\r\\n\\t\\tif(isMultiline)\\r\\n\\t\\t{\\r\\n\\t\\t\\tregExpModifier += \\\"m\\\";\\r\\n\\t\\t}\\r\\n\\t\\tsearchParam = this.__removeSpecialCharacter(searchParam);\\r\\n\\t\\tif(matchType === this.EXACT)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = startWithChar + searchParam + endsWithChar;\\r\\n\\t\\t}\\r\\n\\t\\telse if(matchType === this.STARTS_WITH)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = startWithChar + searchParam;\\r\\n\\t\\t}\\r\\n\\t\\telse if(matchType === this.ENDS_WITH)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = searchParam + endsWithChar;\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = searchParam;\\r\\n\\t\\t}\\r\\n\\t\\tregExp = new RegExp(searchString,regExpModifier);\\r\\n\\t\\treturn regExp.test(value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__removeSpecialCharacter = function(text)\\r\\n\\t{\\r\\n\\t\\tfunction replaceEscape(char)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(text)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar exp = new RegExp(\\\"\\\\\\\\\\\" + char,\\\"g\\\");\\r\\n\\t\\t\\t\\ttext = text.replace(exp,\\\"\\\\\\\\\\\" + char);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar specialChar = ['\\\\\\\\','[','^','$','.','|','?','*','+','(',')'];\\r\\n\\t\\tfor(var count = 0;count < specialChar.length;count++) \\r\\n\\t\\t{\\r\\n\\t\\t\\treplaceEscape(specialChar[count]);\\r\\n\\t\\t}\\r\\n\\t\\treturn text;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//ref from : https://stackoverflow.com/questions/7445328/check-if-a-string-is-a-date-value\\r\\n\\tNSFilter.prototype.__getDate = function(value,arrFormat) \\r\\n\\t{\\r\\n\\t\\tif(value)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar dateFormat;\\r\\n\\t\\t    if (Object.prototype.toString.call(value) === '[object Date]') \\r\\n\\t\\t    {\\r\\n\\t\\t        return value;\\r\\n\\t\\t    }\\r\\n\\t\\t    if(arrFormat)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar dateUtil = new NSDateUtil();\\r\\n\\t\\t    \\tif(!this.util.isArray(arrFormat))\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tarrFormat = [arrFormat];\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tfor(var count = 0;count < arrFormat.length;count++)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tvar format = arrFormat[count];\\r\\n\\t\\t    \\t\\tvar date = dateUtil.parseString(value,format);\\r\\n\\t\\t    \\t\\tif(date)\\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\treturn date;\\r\\n\\t\\t    \\t\\t}\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    }\\r\\n\\t\\t    else\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tif (typeof value.replace === 'function') \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t        value.replace(/^\\\\s+|\\\\s+$/gm, '');\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    dateFormat = /(^\\\\d{1,4}[\\\\.|\\\\\\\\/|-]\\\\d{1,2}[\\\\.|\\\\\\\\/|-]\\\\d{1,4})(\\\\s*(?:0?[1-9]:[0-5]|1(?=[012])\\\\d:[0-5])\\\\d\\\\s*[ap]m)?$/;\\r\\n\\t\\t\\t    if(dateFormat.test(value))\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\treturn new Date(value);//Date.parse(value);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t    return null;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSFilter;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSFilter\\\",NSFilter);\\\"use strict\\\";\\r\\nvar NSTouchToMouse = (function()\\r\\n{\\r\\n\\tfunction NSTouchToMouse(element,setting,doc,win) \\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.doc = this.util.getDoc(doc);\\r\\n\\t\\tthis.win = this.util.getWin(win);\\r\\n\\t\\tthis.__element = this.util.getElement(element);\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\tthis.__touchEventRef = null;\\r\\n\\t\\tthis.__gestureChangeRef = null;\\r\\n\\t\\tthis.__gestureEndRef = null;\\r\\n\\t\\tthis.__objLocal = {documentClick: false,doubleTapWaiting: false,preTouchStart: false,gestureChanged: false};\\r\\n\\t\\tthis.__objEvents = null;\\r\\n\\t\\tthis.__useConstructor = false;\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTouchToMouse.prototype.isTouchSupported = function()\\r\\n\\t{\\r\\n\\t\\tvar isTouchSupported = ((\\\"ontouchstart\\\" in this.win) || (this.win.navigator.msMaxTouchPoints > 0));\\r\\n\\t\\treturn isTouchSupported;\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.isGestureSupported = function()\\r\\n\\t{\\r\\n\\t\\tvar isGestureSupported = (\\\"ongesturestart\\\" in this.win);\\r\\n\\t\\treturn isGestureSupported;\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.destroy = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__touchEventRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(this.__element,\\\"touchstart\\\",this.__touchEventRef);\\r\\n\\t\\t\\tthis.util.removeEvent(this.__element,\\\"touchmove\\\",this.__touchEventRef,true);\\r\\n\\t\\t\\tthis.util.removeEvent(this.__element,\\\"touchend\\\",this.__touchEventRef,true);\\r\\n\\t\\t\\tthis.util.removeEvent(this.__element,\\\"touchcancel\\\",this.__touchEventRef,true);\\r\\n\\t\\t\\tthis.__touchEventRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__gestureChangeRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(this.__element,\\\"gesturechange\\\",this.__gestureChangeRef);\\r\\n\\t\\t\\tthis.__gestureChangeRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__gestureEndRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(this.__element,\\\"gestureend\\\",this.__gestureEndRef);\\r\\n\\t\\t\\tthis.__gestureEndRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__objLocal = {documentClick: false,doubleTapWaiting: false,preTouchStart: false,gestureChanged: false};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTouchToMouse.prototype.__initialize = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.throwNSError(\\\"NSTouchToMouse\\\",\\\"Element is not valid\\\");\\r\\n\\t\\t}\\r\\n\\t\\tvar setting = this.__setting || {};\\r\\n\\t\\tthis.__config = {\\r\\n\\t\\t\\tdoubleTapInterval: this.util.isUndefinedOrNull(setting[\\\"doubleTapInterval\\\"]) ? 500 : parseInt(setting[\\\"doubleTapInterval\\\"]),\\r\\n\\t\\t\\tsuppressMouseEvent: Boolean.parse(setting[\\\"suppressMouseEvent\\\"]),\\r\\n\\t\\t\\ttouchStartHandler: setting[\\\"touchStartHandler\\\"],//format function(screenXPos,screenYPos,event)\\r\\n\\t\\t\\ttouchMoveHandler: setting[\\\"touchMoveHandler\\\"],//format function(screenXPos,screenYPos,event)\\r\\n\\t\\t\\ttouchEndHandler: setting[\\\"touchEndHandler\\\"],//format function(screenXPos,screenYPos,event)\\r\\n\\t\\t\\tdoubleTapHandler: setting[\\\"doubleTapHandler\\\"],//format function(screenXPos,screenYPos,event)\\r\\n\\t\\t\\tpinchHandler: setting[\\\"pinchHandler\\\"],//format function(scale,event)\\r\\n\\t\\t};\\r\\n\\t\\tthis.__initObjEvents();\\r\\n\\t\\tthis.__addListeners();\\r\\n\\t\\tthis.__useConstructor = this.__isMouseEventConstructorExists();\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__initObjEvents = function()\\r\\n\\t{\\r\\n\\t\\tthis.__objEvents = {\\r\\n\\t\\t\\t\\\"touchstart\\\":{mouseEventType: \\\"mousedown\\\",callback:this.__touchStartHandler.bind(this)},\\r\\n\\t\\t\\t\\\"touchmove\\\":{mouseEventType: \\\"mousemove\\\",callback:this.__touchMoveHandler.bind(this)},\\r\\n\\t\\t\\t\\\"touchend\\\":{mouseEventType: \\\"mouseup\\\",callback:this.__touchEndHandler.bind(this),fireExtraEvent:this.__fireClickEvent.bind(this)},\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__addListeners = function()\\r\\n\\t{\\r\\n\\t\\tvar isTouchSupported = this.isTouchSupported();\\r\\n\\t\\tvar isGestureSupported = this.isGestureSupported();\\r\\n\\t\\tif (isTouchSupported) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__touchEventRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__touchEventRef = this.__touchEventHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__element,\\\"touchstart\\\",this.__touchEventRef);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__element,\\\"touchmove\\\",this.__touchEventRef,true);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__element,\\\"touchend\\\",this.__touchEventRef,true);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__element,\\\"touchcancel\\\",this.__touchEventRef,true);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.debug(\\\"NSTouchToMouse\\\",\\\"Touch is not supported\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(isGestureSupported)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__gestureChangeRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__gestureChangeRef = this.__gestureChangeHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__element,\\\"gesturechange\\\",this.__gestureChangeRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__gestureEndRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__gestureEndRef = this.__gestureEndHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__element,\\\"gestureend\\\",this.__gestureEndRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.debug(\\\"NSTouchToMouse\\\",\\\"Gesture is not supported\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__touchEventHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(!this.__objLocal.gestureChanged)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar touch = event.touchEvent;\\r\\n\\t\\t\\tvar item = this.__objEvents[event.type];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar mouseEventType = item.mouseEventType;\\r\\n\\t\\t\\t\\titem.callback(event,touch);\\r\\n\\t\\t\\t\\tthis.__fireMouseEvent(mouseEventType,event,touch);\\r\\n\\t\\t\\t\\tif(item.fireExtraEvent)\\r\\n                {\\r\\n                \\titem.fireExtraEvent(event,touch);\\r\\n                }\\r\\n                event.preventDefault();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.debug(\\\"NSTouchToMouse\\\",event.type + \\\" is not supported\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__gestureChangeHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__objLocal.gestureChanged = true;\\r\\n\\t\\tif(this.__config.pinchHandler)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.pinchHandler(event.scale,event);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__objLocal.preTouchStart = true;\\r\\n        event.preventDefault();\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__gestureEndHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__objLocal.gestureChanged = false;\\r\\n\\t\\tevent.preventDefault();\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__touchStartHandler = function(event,touch)\\r\\n\\t{\\r\\n\\t\\tthis.__fireCallback(\\\"touchStartHandler\\\",event,touch);\\r\\n\\t\\tthis.__objLocal.preTouchStart = true;\\r\\n\\t\\tthis.__objLocal.documentClick = true;\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__touchMoveHandler = function(event,touch)\\r\\n\\t{\\r\\n\\t\\tthis.__fireCallback(\\\"touchMoveHandler\\\",event,touch);\\r\\n\\t\\tthis.__objLocal.preTouchStart = false;\\r\\n\\t\\tthis.__objLocal.documentClick = false;\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__touchEndHandler = function(event,touch)\\r\\n\\t{\\r\\n\\t\\tif (this.__objLocal.doubleTapWaiting && this.__objLocal.preTouchStart) \\r\\n\\t\\t{\\t\\r\\n\\t\\t\\tthis.__fireCallback(\\\"doubleTapHandler\\\",event,touch);\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objLocal.doubleTapWaiting = true;\\r\\n\\t\\t\\tthis.__fireCallback(\\\"touchEndHandler\\\",event,touch);\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\twindow.setTimeout(function () \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__objLocal.doubleTapWaiting = false;\\r\\n\\t\\t\\t}, this.__config.doubleTapInterval);\\t\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t\\tthis.__objLocal.preTouchStart = false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTouchToMouse.prototype.__fireClickEvent = function(event,touch)\\r\\n\\t{\\r\\n\\t\\tif(this.__objLocal.documentClick)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__fireMouseEvent(\\\"click\\\",event,touch);\\r\\n            this.__objLocal.documentClick = false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTouchToMouse.prototype.__fireMouseEvent = function(mouseEventType,event,touch)\\r\\n\\t{\\r\\n\\t\\tif(!this.__config.suppressMouseEvent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar mouseEvent = null;\\r\\n\\t\\t\\tvar option = {bubbles: true,cancelable: true,view:this.win,detail:1,screenX:touch.screenX,screenY:touch.screenY,clientX:touch.clientX,clientY:touch.clientY,ctrlKey:false,\\r\\n\\t\\t\\t\\t\\t\\t  altKey:false,shiftKey:false,metaKey:false,button:0,relatedTarget:null};\\r\\n\\t\\t\\tif(this.__useConstructor)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tmouseEvent = new MouseEvent(mouseEventType,option);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tmouseEvent = this.doc.createEvent(\\\"MouseEvent\\\");\\r\\n\\t\\t\\t\\tmouseEvent.initMouseEvent(mouseEventType,option.bubbles,option.cancelable,option.view,option.detail,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  option.screenX,option.screenY,option.clientX,option.clientY,option.ctrlKey,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  option.altKey,option.shiftKey,option.metaKey,option.button,option.relatedTarget);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\ttouch.target.dispatchEvent(mouseEvent);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSTouchToMouse.prototype.__isMouseEventConstructorExists = function()\\r\\n\\t{\\r\\n\\t\\ttry \\r\\n\\t\\t{\\r\\n\\t\\t    new MouseEvent(\\\"test\\\");\\r\\n\\t\\t    return true;\\r\\n\\t\\t} \\r\\n\\t\\tcatch(error) \\r\\n\\t\\t{\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\r\\n\\tNSTouchToMouse.prototype.__fireCallback = function(callbackKey,event,touch)\\r\\n\\t{\\r\\n\\t\\tif(this.__config[callbackKey])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config[callbackKey](touch.screenX,touch.screenY,event);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\r\\n\\treturn NSTouchToMouse;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSTouchToMouse\\\",NSTouchToMouse); \\\"use strict\\\";\\r\\nvar NSVirtualScroll = (function()\\r\\n{\\r\\n\\tfunction NSVirtualScroll(setting) \\r\\n\\t{\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.util = null;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\tthis.__internal = {};\\r\\n\\t\\tthis.__objProp = {};\\r\\n\\t\\tthis.__objSelectedProp = {};\\r\\n\\t\\tthis.__domVariables = null;\\r\\n\\t\\tthis.__doc = null;\\r\\n\\t\\tthis.__win = null;\\r\\n\\t\\tthis.__scrollHandlerRef = null;\\r\\n\\t\\tthis.__resizeHandlerRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.dataSource = function(paramItems)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(paramItems))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar reInit = false;\\r\\n\\t\\t\\tif(!this.__internal.itemDimension)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treInit = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.util.isNumber(paramItems))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.totalLength = parseInt(paramItems);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isArray(paramItems))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.items = paramItems;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.totalLength = null;\\r\\n\\t\\t\\t\\tthis.__config.items = [paramItems];\\r\\n\\t\\t\\t}\\r\\n            this.__internal.objItemComp = {};\\r\\n            this.__internal.arrItem = [];\\r\\n\\t\\t\\tif(reInit)\\r\\n\\t\\t\\t{\\r\\n                var item = this.__getItemAt(0);\\r\\n\\t\\t\\t\\tthis.__internal.isItemHtml = this.util.isString(item);\\r\\n\\t\\t\\t\\tthis.__setSize();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar scrollElement = this.__config.scrollElement;\\r\\n\\t\\t\\tvar scrollPos = scrollElement[this.__objSelectedProp.scroll];\\r\\n\\t\\t\\tif(this.__internal.items && (this.__internal.items.length * this.__internal.itemDimension < scrollPos)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tscrollElement[this.__objSelectedProp.scroll] = 0;\\r\\n\\t\\t\\t\\tthis.__internal.lastPageNum = 0;\\r\\n\\t\\t    }\\r\\n\\t\\t\\tthis.__addItems();\\r\\n\\t\\t\\tscrollElement[this.__objSelectedProp.scroll] = scrollPos;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.refresh = function(isReset)\\r\\n\\t{\\r\\n\\t\\tvar currItemSize = this.__internal.itemDimension;\\r\\n\\t\\tthis.__setSize();\\r\\n\\t\\tvar newItemSize = this.__internal.itemDimension;\\r\\n\\t\\tif((currItemSize != newItemSize) || isReset)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar criteria = null;\\r\\n\\t\\t\\tif(this.__config.totalLength)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcriteria = this.__config.totalLength;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isArray(this.__config.items) && this.__config.items && this.__config.items.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcriteria = this.__config.items;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcriteria = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.dataSource(criteria);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.getScrollProgress = function()\\r\\n\\t{\\r\\n\\t\\tvar scrollPos = this.__internal.scrollPos;\\r\\n\\t\\tvar itemSize = this.__internal.itemDimension;\\r\\n\\t\\tvar totalSize = this.__internal.arrItem.length * itemSize;\\r\\n\\t\\tvar progress = ((scrollPos / totalSize) * 100) || 0;\\r\\n\\t\\treturn progress;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.appendItems = function(arrItem)\\r\\n\\t{\\r\\n\\t\\tthis.__addNewItems(arrItem,false);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.prependItems = function(arrItem)\\r\\n\\t{\\r\\n\\t\\tthis.__addNewItems(arrItem,true);\\r\\n\\t};\\r\\n\\t\\r\\n\\t//assuming that size of all rows are same\\r\\n\\t//if not same add offset\\r\\n\\t//if variable Row size and utility user has original scroll Position then set scrollPosition and pass index as null\\r\\n\\tNSVirtualScroll.prototype.scrollToIndex = function(index,animationRequired,offset,scrollPosition)\\r\\n\\t{\\r\\n\\t\\tvar arrItem = this.__internal.arrItem;\\r\\n\\t\\tif(arrItem && arrItem.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar scrollPos = null;\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(index) && index > -1 && index < arrItem.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\toffset = this.util.isUndefinedOrNull(offset) ? 0 : parseInt(offset);\\r\\n\\t\\t\\t\\tscrollPos = (this.__internal.itemDimension * index) + offset;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(!this.util.isUndefinedOrNull(scrollPosition))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\toffset = 0;\\r\\n\\t\\t\\t\\tscrollPos = scrollPosition;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(scrollPos))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar scrollElement = this.__config.scrollElement;\\r\\n\\t\\t\\t\\tif(animationRequired)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar animation = new this.util.animation(scrollElement,[\\r\\n\\t\\t       \\t  \\t    {\\r\\n\\t\\t       \\t  \\t      time: 500,\\r\\n\\t\\t       \\t  \\t      property:this.__objSelectedProp.scroll,\\r\\n\\t\\t       \\t  \\t      target: scrollPos,\\r\\n\\t\\t       \\t  \\t    }\\r\\n\\t\\t       \\t  \\t]);\\r\\n\\t\\t   \\t  \\t  \\tanimation.animate();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tscrollElement[this.__objSelectedProp.scroll] = scrollPos;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//this function is used for updating items(dom elements) already generated \\r\\n\\tNSVirtualScroll.prototype.updateItems = function(updateCallback) \\r\\n\\t{\\r\\n\\t\\tif(this.__internal.arrItem && this.__internal.arrItem.length && updateCallback) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItem = this.__internal.arrItem;\\r\\n\\t\\t\\tfor(var count = 0;count < arrItem.length;count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrItem[count]; \\r\\n\\t\\t\\t\\titem = updateCallback(item);\\r\\n\\t\\t\\t\\tarrItem[count] = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__internal.arrItem = arrItem;\\r\\n\\t\\t\\tthis.__internal.origArrItem = this.__internal.arrItem;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.destroy = function()\\r\\n\\t{\\r\\n\\t\\tvar scrollElement = this.__config.scrollElement;\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tif(this.__internal.contentTabIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcontentElement.setAttribute(\\\"tabindex\\\",this.__internal.contentTabIndex);\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.removeStyleClass(scrollElement,\\\"nsVirtualScrollElement nsVirtualScrollElement\\\" + this.util.toCamelCase(this.__config.direction,true));\\r\\n\\t\\tthis.util.removeStyleClass(contentElement,\\\"nsVirtualScrollContent nsVirtualScrollContent\\\" + this.util.toCamelCase(this.__config.direction,true));\\r\\n\\t\\tif(this.__scrollHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(scrollElement,\\\"scroll\\\",this.__scrollHandlerRef);\\r\\n\\t\\t\\tthis.__scrollHandlerRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__resizeHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(this.__win,\\\"resize\\\",this.__resizeHandlerRef);\\r\\n\\t\\t\\tthis.__resizeHandlerRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__internal.divLoader)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__internal.divLoader.parentNode.removeChild(this.__internal.divLoader);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__initialize = function()\\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tif(this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\tscrollElement: this.util.getElement(this.__setting[\\\"scrollElement\\\"]),\\r\\n\\t\\t\\t\\t\\tcontentElement: this.util.getElement(this.__setting[\\\"contentElement\\\"]),\\r\\n\\t\\t\\t\\t\\tdirection: this.__setting[\\\"direction\\\"] || NSVirtualScroll.DIRECTION_VERTICAL,\\r\\n\\t\\t\\t\\t\\titemTag: this.__setting[\\\"itemTag\\\"],\\r\\n\\t\\t\\t\\t\\tpageSize: parseInt(this.__setting[\\\"pageSize\\\"]) || 30,//number of items after the cache will be refreshed\\r\\n\\t\\t\\t\\t\\tpagesRendered: parseInt(this.__setting[\\\"pagesRendered\\\"]) || 3,//number of items(pageSize * pagesRendered) to be rendered\\r\\n\\t\\t\\t\\t\\titems: this.__setting[\\\"items\\\"],//array of items, can be html or nodes\\r\\n\\t\\t\\t\\t\\ttotalLength: parseInt(this.__setting[\\\"totalLength\\\"]) || 0,//either mention items or totalLength and itemCreateCallback\\r\\n\\t\\t\\t\\t\\tgetItemComponent: this.__setting[\\\"getItemComponent\\\"],\\r\\n\\t\\t\\t\\t\\tgetEmptyItemComponent: this.__setting[\\\"getEmptyItemComponent\\\"],\\r\\n\\t\\t\\t\\t\\tenableScrollDelay: Boolean.parse(this.__setting[\\\"enableScrollDelay\\\"]),//for Mobile device which are slow in rendering\\r\\n\\t\\t\\t\\t\\tscrollInterval: this.__setting[\\\"scrollInterval\\\"],\\r\\n\\t\\t\\t\\t\\tenableLoader: Boolean.parse(this.__setting[\\\"enableLoader\\\"]),\\r\\n\\t\\t\\t\\t\\tgetLoaderComponent: this.__setting[\\\"getLoaderComponent\\\"],\\r\\n\\t\\t\\t\\t\\tresizeInterval: parseInt(this.__setting[\\\"resizeInterval\\\"]) || 150,\\r\\n\\t\\t\\t\\t\\tscrollingProgress: this.__setting[\\\"scrollingProgress\\\"], //scrollingProgress callback while scrolling like  scrollingProgress(progress)\\r\\n\\t\\t\\t\\t\\tpageWillChange: this.__setting[\\\"pageWillChange\\\"], //pageWillChange callback before page change like  pageWillChange(oldPage,newPage)\\r\\n\\t\\t\\t\\t\\tpageChanged: this.__setting[\\\"pageChanged\\\"], //pageChanged callback before page change like  pageChanged(page)\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\tif(!this.__config.scrollElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSVirtualScroll\\\",\\\"scrollElement is not valid\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__config.contentElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSVirtualScroll\\\",\\\"contentElement is not valid\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__domVariables = this.util.getDomVariables();\\r\\n\\t\\t\\tthis.__doc = this.__domVariables.doc;\\r\\n\\t\\t\\tthis.__win = this.__domVariables.win;\\r\\n\\t\\t\\tif((!this.__config.items || this.__config.items.length == 0) && !this.__config.totalLength)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.items = this.__fetchChildren(contentElement);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__setProps();\\r\\n\\t\\t\\tthis.__setInternalVars();\\r\\n\\t\\t\\tthis.__create();\\r\\n\\t\\t\\tthis.__addListeners();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__setProps = function()\\r\\n\\t{\\r\\n\\t\\tthis.__objProp = {\\r\\n\\t\\t\\t    vertical: {\\r\\n\\t\\t\\t        direction:NSVirtualScroll.DIRECTION_VERTICAL,size: \\\"height\\\",offset: \\\"offsetHeight\\\",\\r\\n\\t\\t\\t        scroll: \\\"scrollTop\\\", scrollSize: \\\"scrollHeight\\\",paddingStart:\\\"paddingTop\\\",\\r\\n\\t\\t\\t        paddingEnd:\\\"paddingBottom\\\",marginStart:\\\"marginTop\\\",marginEnd:\\\"marginBottom\\\"\\r\\n\\t\\t\\t    },\\r\\n\\t\\t\\t    horizontal: {\\r\\n\\t\\t\\t        direction:NSVirtualScroll.DIRECTION_HORIZONTAL,size: \\\"width\\\",offset: \\\"offsetWidth\\\",\\r\\n\\t\\t\\t        scroll: \\\"scrollLeft\\\", scrollSize: \\\"scrollWidth\\\",paddingStart:\\\"paddingLeft\\\",\\r\\n\\t\\t\\t        paddingEnd:\\\"paddingRight\\\",marginStart:\\\"marginLeft\\\",marginEnd:\\\"marginRight\\\"\\r\\n\\t\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\tthis.__objSelectedProp = this.__objProp[\\\"vertical\\\"];\\r\\n\\t\\tif(this.__config.direction == NSVirtualScroll.DIRECTION_HORIZONTAL)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objSelectedProp = this.__objProp[\\\"horizontal\\\"];\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//call this function only with init is needed\\r\\n\\tNSVirtualScroll.prototype.__setInternalVars = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__internal.itemDimension)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.contentElement.hasAttribute(\\\"tabindex\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__internal.contentTabIndex = this.__config.contentElement.getAttribute(\\\"tabindex\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__internal.scrollIntervalID = -1;\\r\\n\\t\\t\\tthis.__internal.resizeIntervalID = -1;\\r\\n\\t\\t\\tthis.__internal.scrollPos = -1;\\r\\n\\t\\t\\tthis.__internal.lastPageNum = -1;\\r\\n\\t\\t\\tthis.__internal.objItemComp = {};\\r\\n\\t\\t\\tthis.__internal.objCache = {};\\r\\n\\t\\t\\tthis.__internal.cssExtraItem = \\\"nsVirtualExtraItem\\\" + this.util.toCamelCase(this.__objSelectedProp.direction,true);\\r\\n\\t\\t\\tthis.__internal.isMobile = this.util.isMobile().any;\\r\\n\\t\\t\\tif(this.__config.enableScrollDelay && this.util.isUndefinedOrNull(this.__config.scrollInterval))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.scrollInterval = this.__internal.isMobile ? 300 : 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__internal.divLoader = null;\\r\\n\\t\\t\\tthis.__addLoader();\\r\\n\\t\\t\\tthis.__internal.pageSize = this.__config.pageSize;\\r\\n\\t\\t\\tthis.__internal.pagesRendered = this.__config.pagesRendered;\\r\\n\\t\\t\\tvar item = this.__getItemAt(0);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__internal.isItemHtml = this.util.isString(item);\\r\\n\\t\\t\\t\\tthis.__setSize();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__internal.itemDimension = 0;\\r\\n\\t\\t\\t\\tthis.__internal.pageDimension = 0;\\r\\n\\t\\t\\t\\tthis.__internal.itemsRendered = 0;\\r\\n\\t\\t\\t\\tthis.__internal.renderedSize = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__setSize = function()\\r\\n\\t{\\r\\n\\t\\tthis.__internal.itemDimension = this.__getItemSize();\\r\\n\\t\\tthis.__internal.pageDimension = this.__internal.itemDimension * this.__internal.pageSize;\\r\\n\\t\\tthis.__internal.itemsRendered = this.__internal.pageSize * this.__internal.pagesRendered;\\r\\n\\t\\tthis.__internal.renderedSize = this.__internal.pagesRendered * this.__internal.pageDimension;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__create = function()\\r\\n\\t{\\r\\n\\t\\tvar scrollElement = this.__config.scrollElement;\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tthis.util.addStyleClass(scrollElement,\\\"nsVirtualScrollElement nsVirtualScrollElement\\\" + this.util.toCamelCase(this.__config.direction,true));\\r\\n\\t\\tthis.util.addStyleClass(contentElement,\\\"nsVirtualScrollContent nsVirtualScrollContent\\\" + this.util.toCamelCase(this.__config.direction,true));\\r\\n\\t\\tcontentElement.setAttribute(\\\"tabindex\\\",0);\\r\\n\\t\\tif((this.__config.items && this.__config.items.length) || this.__config.totalLength)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar scrollPos = scrollElement[this.__objSelectedProp.scroll];\\r\\n\\t\\t\\tthis.__addItems();\\r\\n\\t\\t\\tscrollElement[this.__objSelectedProp.scroll] = scrollPos;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__addListeners = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__scrollHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__scrollHandlerRef = this.__config.enableScrollDelay ? this.__scrollHandlerWithDelay.bind(this) : this.__scrollHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(this.__config.scrollElement,\\\"scroll\\\",this.__scrollHandlerRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__resizeHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__resizeHandlerRef = this.__resizeHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(this.__win,\\\"resize\\\",this.__resizeHandlerRef);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__scrollHandlerWithDelay = function(event)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tclearTimeout(this.__internal.scrollIntervalID);\\r\\n\\t\\tthis.__internal.scrollIntervalID = setTimeout(function(){\\r\\n\\t\\t\\tself.__scrollHandler.call(self,event);\\r\\n\\t\\t},this.__config.scrollInterval);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__scrollHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tthis.__internal.scrollIntervalID = -1;\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar pageNumber = this.__getCurrentPageNum();\\r\\n\\t\\tvar lastPageNum = this.__internal.lastPageNum;\\r\\n\\t\\tthis.__internal.lastPageNum = pageNumber;\\r\\n\\t\\t/*console.log(\\\"lastPageNum::\\\" + lastPageNum + \\\" pageNumber::\\\" + pageNumber);*/\\r\\n\\t\\tif(lastPageNum != pageNumber)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//console.log(\\\"In Scroll\\\");\\r\\n\\t\\t\\tthis.__addItems();\\r\\n\\t\\t\\tthis.__fireCallback(\\\"scrollingProgress\\\",this.getScrollProgress());\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//not used for now\\r\\n\\tNSVirtualScroll.prototype.__isScrollingDown = function() {\\r\\n\\t\\t  var isScrollingDown = false;\\r\\n\\t\\t  var currentScrollPos = this.__config.scrollElement[this.__objSelectedProp.scroll];\\r\\n\\r\\n\\t\\t  if (currentScrollPos > this.__internal.prevScrollPos) {\\r\\n\\t\\t    isScrollingDown = true;\\r\\n\\t\\t  } else {\\r\\n\\t\\t    isScrollingDown = false;\\r\\n\\t\\t  }\\r\\n\\r\\n\\t\\t  this.__internal.prevScrollPos = currentScrollPos;\\r\\n\\t\\t  return isScrollingDown;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__resizeHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tclearTimeout(this.__internal.resizeIntervalID);\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tthis.__internal.resizeIntervalID = setTimeout(self.refresh.bind(self), this.__config.resizeInterval);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getItemSize = function()\\r\\n\\t{\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tvar isAdded = false;\\r\\n\\t\\tvar size = null;\\r\\n\\t\\tif(!contentElement.children.length)\\r\\n\\t\\t{\\r\\n            var itemHtml = this.__getItemAt(0);\\r\\n\\t\\t\\tthis.__setItemsInDom(itemHtml);\\r\\n\\t\\t\\tisAdded = true;\\r\\n\\t\\t}\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar length = contentElement.children.length;\\r\\n\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = contentElement.children[count];\\r\\n\\t\\t\\tif(!this.util.hasStyleClass(item,this.__internal.cssExtraItem))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__config.itemTag)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.itemTag = item.tagName.toLowerCase();\\r\\n\\t\\t}\\r\\n\\t\\tsize = item[this.__objSelectedProp.offset];\\r\\n\\t\\tif(this.__config.itemTag == \\\"tr\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar border = this.util.getStyleValue(contentElement,\\\"borderCollapse\\\");\\r\\n\\t\\t\\tif(border != \\\"collapse\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar borderSpacing = this.util.getStyleValue(contentElement,\\\"borderSpacing\\\");\\r\\n\\t\\t\\t\\tsize += this.__getInt(borderSpacing);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar marginStart = this.util.getStyleValue(item,this.__objSelectedProp.marginStart);\\r\\n\\t        var marginEnd = this.util.getStyleValue(item,this.__objSelectedProp.marginEnd);\\r\\n\\t        marginStart = this.__getInt(marginStart);\\r\\n\\t        marginEnd = this.__getInt(marginEnd);\\r\\n\\t        size += Math.max(marginStart, marginEnd);\\r\\n\\t\\t}\\r\\n\\t\\tif(isAdded)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setItemsInDom(null);\\r\\n\\t\\t}\\r\\n\\t\\treturn size;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__addItems = function()\\r\\n\\t{\\r\\n\\t\\tvar arrItem = this.__internal.arrItem || [];\\r\\n\\t\\tvar itemPage = this.__getPageData(arrItem,this.__getCurrentPageNum());\\r\\n\\t\\tvar hasPageContentChanged = this.__hasCacheChanged(\\\"data\\\",itemPage.arrItem);\\r\\n        var hasStartOffsetChanged = this.__hasCacheChanged(\\\"top\\\",itemPage.startOffset);\\r\\n        var hasEndOffsetChanged = this.__hasCacheChanged(\\\"bottom\\\",itemPage.endOffset);\\r\\n        var contentElement = this.__config.contentElement;\\r\\n        var arrSource = [];\\r\\n        if(hasPageContentChanged || hasStartOffsetChanged) \\r\\n        {\\r\\n            if(itemPage.startOffset) \\r\\n            {\\r\\n            \\tarrSource.push(this.__getExtraItem(\\\"nsVirtualTopItem\\\",itemPage.startOffset));\\r\\n            }\\r\\n            arrSource.push.apply(arrSource,itemPage.arrItem);\\r\\n            if(itemPage.endOffset) \\r\\n            {\\r\\n            \\tarrSource.push(this.__getExtraItem(\\\"nsVirtualBottomItem\\\",itemPage.endOffset));\\r\\n            }\\r\\n            this.__fireCallback(\\\"pageWillChange\\\",[this.__internal.currentItemPage,itemPage]);\\r\\n            this.__setItemsInDom(arrSource);\\r\\n            this.__handleTagAfterRender(itemPage);\\r\\n            this.__fireCallback(\\\"pageChanged\\\",[itemPage]);\\r\\n            this.__internal.currentItemPage = itemPage;\\r\\n        } \\r\\n        else if(hasEndOffsetChanged) \\r\\n        {\\r\\n        \\tcontentElement.lastChild.style[this.__objSelectedProp.size] = itemPage.endOffset + \\\"px\\\";\\r\\n        }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__setItemsInDom = function(arrItem,isAdd)\\r\\n\\t{\\r\\n\\t\\tthis.__setLoaderVisibility(true);\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tif(this.__internal.isItemHtml)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(arrItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar html = this.__convertArrayToString(arrItem);\\r\\n\\t\\t\\t\\tisAdd ? contentElement.innerHTML += html : contentElement.innerHTML = html;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tisAdd ? null : contentElement.innerHTML = \\\"\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!isAdd)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//IE Bug that when Html elements are added(i.e. when this.__internal.isItemHtml is false) you do contentElement.innerHTML = \\\"\\\" \\r\\n\\t\\t\\t\\t//then the items being rendered in this.__internal.arrItem also becomes empty\\r\\n\\t\\t\\t\\tif(this.__internal.isItemHtml)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcontentElement.innerHTML = \\\"\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\twhile(contentElement.firstChild) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcontentElement.removeChild(contentElement.lastChild);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(arrItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrItem = this.util.isArray(arrItem) ? arrItem : [arrItem];\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar length = arrItem.length;\\r\\n\\t\\t\\t\\tfor(var count =0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(arrItem[count]) {\\r\\n\\t\\t\\t\\t\\t\\titem = arrItem[count];\\r\\n\\t\\t\\t\\t\\t\\tthis.util.isString(item) ? contentElement.innerHTML += item : contentElement.appendChild(item);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__setLoaderVisibility(false);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getAllItems = function(fromIndex,toIndex)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.items && this.__config.items.length && this.__config.items.length > fromIndex)\\r\\n\\t\\t{\\r\\n            toIndex = this.__config.items.length > toIndex ? toIndex : this.__config.items.length - 1;\\r\\n            var arrCloned = this.__config.items.slice();\\r\\n\\t\\t\\tvar arrItem = arrCloned.splice(fromIndex,toIndex - fromIndex);\\r\\n\\t\\t\\treturn arrItem;\\r\\n\\t\\t}\\r\\n\\t\\telse if(this.__config.totalLength && this.__config.getItemComponent)\\r\\n\\t\\t{\\r\\n            fromIndex = this.__config.totalLength > fromIndex ? fromIndex : this.__config.totalLength - 1;\\r\\n            toIndex = this.__config.totalLength > toIndex ? toIndex : this.__config.totalLength - 1;\\r\\n            if(!this.__internal.arrItem) {\\r\\n\\t\\t\\t\\tthis.__internal.arrItem = [];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar arrItem = this.__internal.arrItem;\\r\\n            var arrRet = [];\\r\\n\\t\\t\\tfor(var count = fromIndex;count < toIndex + 1;count++)\\r\\n\\t\\t\\t{\\r\\n                if(arrItem.length > count && arrItem[count]) {\\r\\n                    arrRet.push(arrItem[count]);\\r\\n                }\\r\\n                else {\\r\\n                    var item = this.__getItemFromComponent(count);\\r\\n                    arrItem[count] = item;\\r\\n                    arrRet.push(item);\\r\\n                }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrRet;\\r\\n\\t\\t}\\r\\n\\t\\treturn [];\\r\\n\\t};\\r\\n\\r\\n    NSVirtualScroll.prototype.__getItemAt = function(index) \\r\\n    {\\r\\n        if(this.__config.items && this.__config.items.length && this.__config.items.length > index)\\r\\n\\t\\t{\\r\\n           return this.__config.items[index];\\r\\n\\t\\t}\\r\\n        else if(this.__config.arrItem && this.__config.arrItem.length && this.__config.arrItem.length > index && this.__config.arrItem[index])\\r\\n\\t\\t{\\r\\n           return this.__config.arrItem[index];\\r\\n\\t\\t}\\r\\n        else if(this.__config.totalLength > index && this.__config.getItemComponent) {\\r\\n           return this.__getItemFromComponent(index);\\r\\n        }\\r\\n        return null;\\r\\n    };\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getItemFromComponent = function(index)\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tif(this.__config.totalLength > index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar comp = new this.__config.getItemComponent(index);\\r\\n\\t\\t\\titem = comp.getElement();\\r\\n\\t\\t\\tthis.__internal.objItemComp[index.toString()] = comp;\\r\\n\\t\\t}\\r\\n\\t\\treturn item;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getPageData = function(arrItem,pageNum)\\r\\n\\t{\\r\\n\\t\\tvar internal = this.__internal;\\r\\n\\t\\tvar retItem = null;\\r\\n        if(this.__config.totalLength === 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretItem = {startOffset: 0,endOffset: 0,itemsBefore: 0,arrItem:[this.__getEmptyItem()]};\\r\\n\\t\\t}\\r\\n\\t\\t/*else if(arrItem.length < internal.pageSize)\\r\\n\\t\\t{\\r\\n            var startIndex = 0;\\r\\n\\t        var endIndex = internal.pageSize;\\r\\n            var arrRet = this.__getAllItems(startIndex,endIndex);\\r\\n\\t\\t\\tretItem = {startOffset: 0,endOffset: 0,itemsBefore: 0,arrItem:arrRet};\\r\\n\\t\\t}*/\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar startIndex = Math.max((internal.itemsRendered - internal.pageSize) * pageNum, 0);\\r\\n\\t        var endIndex = startIndex + internal.itemsRendered;\\r\\n            var totalLength = this.__getTotalLength();\\r\\n\\t        var startOffset = Math.max(startIndex * internal.itemDimension, 0);\\r\\n\\t        var endOffset = Math.max((totalLength - endIndex) * internal.itemDimension, 0);\\r\\n\\t        var itemsBefore = startIndex;\\r\\n\\t        if(startOffset < 1) \\r\\n\\t        {\\r\\n\\t        \\titemsBefore++;\\r\\n\\t        }\\r\\n\\t        var arrRet = this.__getAllItems(startIndex,endIndex);//arrItem.slice(startIndex,endIndex);\\r\\n\\t        retItem = {startOffset: startOffset,endOffset: endOffset,itemsBefore: itemsBefore,arrItem:arrRet};\\r\\n\\t\\t}\\r\\n\\t\\tconsole.log(retItem);\\r\\n\\t\\treturn retItem;\\r\\n\\t};\\r\\n\\r\\n    NSVirtualScroll.prototype.__getTotalLength = function() \\r\\n    {\\r\\n        if(this.__config.items && this.__config.items.length)\\r\\n\\t\\t{\\r\\n           return this.__config.items.length;\\r\\n\\t\\t}\\r\\n        else if(this.__config.totalLength && this.__config.getItemComponent) {\\r\\n           return this.__config.totalLength;\\r\\n        }\\r\\n        return 0;\\r\\n    };\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__addNewItems = function(arrNewItem,isPrepend)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(arrNewItem))\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrNewItem = this.util.isArray(arrNewItem) ? arrNewItem : [arrNewItem];\\r\\n\\t\\t\\tif(arrNewItem && arrNewItem.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrItem = [];\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrNewItem.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrItem.push(arrNewItem.items[count]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar arrExisting = this.__internal.arrItem;\\r\\n\\t\\t\\t\\tthis.__internal.arrItem = isPrepend ? arrItem.concat(arrExisting) : arrExisting.concat(arrItem);\\r\\n\\t\\t\\t\\tthis.__addItems();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__handleTagAfterRender = function(itemPage)\\r\\n\\t{\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tif(this.__config.itemTag == \\\"ol\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tcontentElement.setAttribute(\\\"start\\\", itemPage.itemsBefore);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__fetchChildren = function(element)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChildren = element.children;\\r\\n\\t\\t\\tvar arrRet = [];\\r\\n\\t\\t\\tvar length = arrChildren.length;\\r\\n\\t\\t\\tvar child = null;\\r\\n\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tchild = arrChildren[count];\\r\\n\\t\\t\\t\\tarrRet.push(this.__getItemHtml(child));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrRet;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__fireCallback = function(callbackName,args)\\r\\n\\t{\\r\\n\\t\\tif(this.__config[callbackName]) {\\r\\n\\t\\t\\tthis.__config[callbackName](args);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__hasCacheChanged = function(key,value)\\r\\n\\t{\\r\\n\\t\\tvar changed = (value != this.__internal.objCache[key]);\\r\\n\\t\\tthis.__internal.objCache[key] = value;\\r\\n\\t    return changed;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getCurrentPageNum = function()\\r\\n\\t{\\r\\n\\t\\tthis.__internal.scrollPos = this.__config.scrollElement[this.__objSelectedProp.scroll];\\r\\n\\t\\tvar pageNum = Math.floor(this.__internal.scrollPos / (this.__internal.renderedSize - this.__internal.pageDimension)) || 0;\\r\\n\\t\\t//console.log(this.__internal.scrollPos + \\\",\\\" + this.__internal.renderedSize + \\\",\\\" + this.__internal.pageDimension + \\\",\\\" + pageNum);\\r\\n\\t\\treturn pageNum;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getExtraItem = function(cssClass,size)\\r\\n\\t{\\r\\n\\t\\tvar item = this.util.createElement(this.__config.itemTag,null,this.__internal.cssExtraItem,this.__doc);\\r\\n\\t\\tcssClass && this.util.addStyleClass(item,cssClass);\\r\\n\\t\\tsize && (item.style[this.__objSelectedProp.size] = size + \\\"px\\\");\\r\\n\\t\\treturn (this.__internal.isItemHtml ? this.__getItemHtml(item) : item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getEmptyItem = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__config.getEmptyItemComponent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar comp = new this.__config.getEmptyItemComponent();\\r\\n\\t\\t\\treturn (this.__internal.isItemHtml ? this.__getItemHtml(comp.getElement()) : comp.getElement());\\r\\n\\t\\t}\\r\\n\\t\\tvar item = this.util.createElement(this.__config.itemTag,null,null,this.__doc);\\r\\n\\t\\tif(this.__config.itemTag == \\\"tr\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\titem.innerHTML = \\\"<td colSpan='1000'></td>\\\";\\r\\n\\t\\t}\\r\\n\\t\\treturn (this.__internal.isItemHtml ? this.__getItemHtml(item) : item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getItemHtml = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.util.isString(item) ? item : item.outerHTML;\\r\\n\\t\\t}\\r\\n\\t\\treturn \\\"\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__addLoader = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__config.enableLoader)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__internal.divLoader = this.util.createDiv(null,\\\"nsVirtualScrollLoader\\\");\\r\\n\\t\\t\\tvar divText = null;\\r\\n\\t\\t\\tif(this.__config.getLoaderComponent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar comp = new this.__config.getLoaderComponent();\\r\\n\\t\\t\\t\\tdivText = comp.getElement();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivText = this.util.createDiv(null,\\\"nsVirtualScrollLoaderTextCon\\\");\\r\\n\\t\\t\\t\\tdivText.innerHTML = \\\"<b class=\\\\\\\"nsVirtualScrollLoaderText\\\\\\\">Rendering...</b>\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__internal.divLoader.appendChild(divText);\\r\\n\\t\\t\\tthis.__setLoaderVisibility(false);\\r\\n\\t\\t\\tthis.__config.scrollElement.appendChild(this.__internal.divLoader);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__setLoaderVisibility = function(isShow)\\r\\n\\t{\\r\\n\\t\\tif(this.__internal.divLoader)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__internal.divLoader.style.display = isShow ? \\\"\\\" : \\\"none\\\";\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__convertArrayToString = function(arrItem,separator)\\r\\n\\t{\\r\\n\\t\\tif(arrItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tseparator = separator ? separator : \\\"\\\";\\r\\n\\t\\t\\treturn this.util.isArray(arrItem) ? arrItem.join(separator) : arrItem;\\r\\n\\t\\t}\\r\\n\\t\\treturn \\\"\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getInt = function(value)\\r\\n\\t{\\r\\n\\t\\treturn parseInt(value,10) || 0;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.DIRECTION_VERTICAL = \\\"vertical\\\";\\r\\n\\tNSVirtualScroll.DIRECTION_HORIZONTAL = \\\"horizontal\\\";\\r\\n\\t\\r\\n\\treturn NSVirtualScroll;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSVirtualScroll\\\",NSVirtualScroll);\\r\\n\\\"use strict\\\"; \\r\\nvar NSFlatGrid = (function()\\r\\n{\\r\\n\\tfunction NSFlatGrid(nsGrid,nsUtil) \\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid = nsGrid;\\r\\n\\t\\tthis.util = nsUtil;\\r\\n\\t}\\r\\n\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\tNSFlatGrid.prototype.__initialize = function ()\\r\\n\\t{\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty) \\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tif(attributeName === \\\"pagesize\\\" && parseInt(newVal) > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsGrid.__pageSize = parseInt(newVal);\\r\\n\\t\\t\\tthis.__nsGrid.dataSource(this.__nsGrid.__dataSource,true);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.dataSource = function(source)\\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid.__arrWrapper = this.__nsGrid.__dataSource.slice(0);\\r\\n\\t\\tthis.__nsGrid.__arrFilteredGroupedSource = this.__nsGrid.__arrWrapper.slice(0);\\r\\n\\t\\tthis.__setWrapperSource(this.__nsGrid.__arrWrapper,0,-1,0,true);\\r\\n\\t\\tif(this.__nsGrid.__enablePagination)\\r\\n\\t\\t{\\r\\n\\t\\t\\t/*if(!this.__nsGrid.__isPaginationTypeScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__createPaginationControl(this.__nsGrid.__divOuterContainer);\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t\\tif(this.__nsGrid.__isPaginationModeAuto)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__updateTotalRecords(this.__nsGrid.__arrWrapper.length);\\r\\n\\t\\t\\t\\tif(this.__nsGrid.__isPaginationTypeScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrWrapper.slice(0);//this.__nsGrid.__arrWrapper.slice(0,this.__nsGrid.__INFINITE_SCROLL_INITIAL_LOAD);\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__paginationFetchRecordCallBack = this.__addRowsforScrollPagination.bind(this);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrWrapper.slice(0);\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__paginationFetchRecordCallBack = this.__addRowsforPagePagination.bind(this);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrWrapper.slice(0);\\r\\n\\t\\t\\t\\tthis.__nsGrid.__updateTotalRecords();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrWrapper.slice(0);\\r\\n\\t\\t\\tthis.__nsGrid.__updateTotalRecords();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.addItemsAsChildren = function(item,arrChildren)\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.afterGridRendered = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.arrowClickHandler = function(parentItem,isCollapse) \\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.expandCollapseHandler = function(item,isCollapse)\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__createBody = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__createBodyBody= function(dataSet,startIndex,endIndex)\\r\\n\\t{\\r\\n\\t    if(dataSet && dataSet.length > 0)\\r\\n\\t    {\\r\\n\\t    \\t for (var rowIndex = startIndex; rowIndex < endIndex; rowIndex++)\\r\\n\\t\\t     {\\r\\n\\t    \\t\\tvar item = dataSet[rowIndex];\\r\\n\\t    \\t\\tthis.__createRow(item);\\r\\n\\t\\t     }\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__setSourceForAsync= function()\\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrWrapper.slice(0);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__createRowAsync= function(item,index,array)\\r\\n\\t{\\r\\n\\t\\tthis.__createRow(item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__createBodyBodyVirtual= function(dataSet,totalRows)\\r\\n\\t{\\r\\n\\t\\tif(dataSet && dataSet.length > 0)\\r\\n\\t    {\\r\\n\\t    \\tif(totalRows > dataSet.length)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\ttotalRows = dataSet.length;\\r\\n\\t    \\t}\\r\\n\\t    \\telse if(this.__nsGrid.__enableVariableRowHeight)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\ttotalRows = totalRows + this.__nsGrid.__extraRowCountForVariableHeight;\\r\\n\\t    \\t}\\r\\n\\t    \\tthis.__createBodyBody(dataSet,0,totalRows);\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__checkForAdditionalColumns = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__addSVGInPage = function(objSVG)\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__setMeasurement = function()\\r\\n\\t{\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__resetDataInBody= function(fromIndex,toIndex)\\r\\n\\t{\\r\\n\\t\\tvar row = null;\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar arrRows = this.__nsGrid.__tblCenterBodyBody.rows;\\r\\n\\t\\tvar rowLength = arrRows.length;\\r\\n\\t\\tvar length = this.__nsGrid.__arrInternalSource.length;\\r\\n\\t\\tvar rowCount = 0;\\r\\n\\t\\tfor(var count = fromIndex; count < length; count++)\\r\\n\\t    {\\r\\n\\t\\t\\tif(rowLength <= rowCount) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\trow = arrRows[rowCount];\\r\\n\\t\\t\\titem = this.__nsGrid.__arrInternalSource[count];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__resetRow(row,item[this.__nsGrid.__fieldIndex],item);\\r\\n\\t\\t\\t\\trowCount++;\\r\\n\\t\\t\\t}\\r\\n\\t    }\\r\\n\\t\\tfor(var rowIndex = rowCount;rowIndex < rowLength;rowIndex++)\\r\\n\\t\\t{\\r\\n\\t\\t\\trow = arrRows[rowIndex];\\r\\n\\t\\t\\trow.style.display = \\\"none\\\";\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-index\\\",null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__setWrapperSource = function(source,offset,parentIndex,level,setFieldIndex)\\r\\n\\t{\\r\\n\\t\\tif(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!offset)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\toffset = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = source.length;;\\r\\n\\t\\t\\tvar count = 0;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar index = -1; \\r\\n\\t\\t\\tif(this.__nsGrid.__renderInCachedMode)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\tindex = offset + count;\\r\\n\\t\\t\\t\\t\\tthis.__setRowItemProperty(item,index,setFieldIndex);\\r\\n\\t\\t\\t\\t\\tvar colLength = this.__nsGrid.__columns.length;\\r\\n\\t\\t\\t\\t\\tvar arrCellsText = [];\\r\\n\\t\\t\\t\\t\\tfor (var colIndex = 0; colIndex < colLength; colIndex++)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar colItem = this.__nsGrid.__columns[colIndex];\\r\\n\\t\\t\\t            var cellDiv = this.util.createDiv(null);\\r\\n\\t\\t\\t            this.util.addStyleClass(cellDiv,this.__nsGrid.__CLASS_CELL_CHILD);\\r\\n\\t\\t\\t            this.__nsGrid.__addCellText(null,item,cellDiv,colItem,colIndex);\\r\\n\\t\\t\\t            arrCellsText.push(cellDiv);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t\\t\\titem[this.__nsGrid.__fieldCellText] = arrCellsText;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\tindex = offset + count;\\r\\n\\t\\t\\t\\t\\tthis.__setRowItemProperty(item,index,setFieldIndex);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__updateCellText = function(row,cell,item,colItem,rowIndex,colIndex)\\r\\n\\t{\\r\\n\\t\\tif(cell && item && colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeAllChildren(cell);\\r\\n\\t\\t\\tif(this.__nsGrid.__renderInCachedMode)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tthis.__renderCellHTML(row,cell,item,colItem,colIndex);\\r\\n\\t    \\t}\\r\\n\\t    \\telse\\r\\n\\t    \\t{\\r\\n\\t    \\t\\t this.__renderCellNormal(row,cell,item,colItem,colIndex);\\r\\n\\t    \\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__getFlatSource = function(onlySource)\\r\\n\\t{\\r\\n\\t\\treturn this.__nsGrid.__arrWrapper;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__isCellEditable = function(objColumn,item,cell,cellIndex,row,rowIndex)\\r\\n\\t{\\r\\n\\t\\treturn true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__handleOnDemandClick = function(item,event)\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\tNSFlatGrid.prototype.__createRow = function(item,itemIndex,isAdd)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisAdd = this.util.isUndefinedOrNull(isAdd) ? true : Boolean.parse(isAdd);\\r\\n\\t\\t\\tvar row = document.createElement(\\\"TR\\\");\\r\\n\\t\\t\\tvar index = item[this.__nsGrid.__fieldIndex];\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldRowHtml] = row;\\r\\n\\t\\t\\tthis.__nsGrid.__setBodyRowProperty(row,item,index);\\r\\n\\t\\t\\tthis.__nsGrid.__applyCustomClass(row,\\\"bodyRow\\\");\\r\\n\\t\\t\\tvar colLength = this.__nsGrid.__columns.length;\\r\\n\\t\\t\\tfor (var colIndex = 0; colIndex < colLength; colIndex++)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar colItem = this.__nsGrid.__columns[colIndex];\\r\\n\\t\\t    \\tvar cell =  this.__nsGrid.__createBodyRowCell(row,colIndex,false);\\r\\n\\t\\t    \\tif(this.__nsGrid.__renderInCachedMode)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.__renderCellHTML(row,cell,item,colItem,colIndex);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\telse\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\t this.__renderCellNormal(row,cell,item,colItem,colIndex);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tthis.__nsGrid.__setBodyCellProperties.bind(this.__nsGrid)(cell);\\r\\n\\t\\t    }\\r\\n\\t\\t\\tif(isAdd)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar addRow = true;\\r\\n\\t\\t\\t\\tif(!this.util.isUndefinedOrNull(itemIndex) && itemIndex > -1 && this.__nsGrid.__tblCenterBodyBody.children \\r\\n\\t\\t\\t\\t\\t\\t&& this.__nsGrid.__tblCenterBodyBody.children.length > itemIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar prevRow = this.__nsGrid.__tblCenterBodyBody.children[itemIndex]; //this.__nsGrid.__getRowByIndex(itemIndex);\\r\\n\\t\\t\\t\\t\\tif(prevRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__nsGrid.__tblCenterBodyBody.insertBefore(row,prevRow);\\r\\n\\t\\t\\t\\t\\t\\taddRow = false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(addRow)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__tblCenterBodyBody.appendChild(row);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__nsGrid.__createFixedBodyRow(row);\\r\\n\\t\\t\\treturn row;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__renderCellNormal = function(row,cell,item,colItem,colIndex)\\r\\n\\t{\\r\\n\\t\\t var cellDiv = this.util.createDiv(null);\\r\\n\\t     this.util.addStyleClass(cellDiv,this.__nsGrid.__CLASS_CELL_CHILD);\\r\\n\\t     this.__nsGrid.__addCellText(row,item,cellDiv,colItem,colIndex);\\r\\n\\t     //this.__nsGrid.__highlightDiv(cellDiv,colIndex);\\r\\n\\t     cell.appendChild(cellDiv);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__renderCellHTML = function(row,cell,item,colItem,colIndex)\\r\\n\\t{\\r\\n\\t\\tvar arrCellsText = item[this.__nsGrid.__fieldCellText];\\r\\n\\t\\tcell.innerHTML = arrCellsText[colIndex].outerHTML;\\r\\n\\t\\t//this.__nsGrid.__highlightDiv(cell.firstChild,colIndex);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__updateRow = function(row,item)\\r\\n\\t{\\r\\n\\t\\tif(row && item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item[this.__nsGrid.__fieldSelected])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(row,this.__nsGrid.__CLASS_SELECTED_ROW);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(row,this.__nsGrid.__CLASS_SELECTED_ROW);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar index = item[this.__nsGrid.__fieldIndex];\\r\\n\\t\\t\\tvar cells = row.cells;\\r\\n\\t\\t\\tfor (var colIndex = 0; colIndex < this.__nsGrid.__columns.length; colIndex++)\\r\\n\\t        {\\r\\n\\t\\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t        \\tvar colItem = this.__nsGrid.__columns[colIndex];\\r\\n\\t        \\tthis.__updateCellText(row,cell,item,colItem,index,colIndex);\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__setRowItemProperty = function(item,rowIndex,setFieldIndex)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setFieldIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldIndex] = rowIndex;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldVisibleIndex] = rowIndex + 1;\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldRowVisible] = true;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__resetRow = function(row,index,item)\\r\\n\\t{\\r\\n\\t\\trow.style.display = \\\"\\\";\\r\\n\\t\\trow.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\titem[this.__nsGrid.__fieldRowHtml] = row;\\r\\n\\t\\tthis.__updateRow(row,item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__addRowsforScrollPagination = function(fromRecord,toRecord,pageSize)\\r\\n\\t{\\r\\n\\t\\t//console.log(\\\"In __addRowsforScrollPagination \\\" + fromRecord + \\\",\\\" + toRecord + \\\",\\\" + pageSize);\\r\\n\\t\\tvar arrArray = this.__nsGrid.__arrInternalSource.slice(fromRecord,toRecord + 1); \\r\\n\\t\\tthis.__nsGrid.__addRemoveRowCallInternal = true;\\r\\n\\t\\tthis.__nsGrid.addRows(arrArray);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFlatGrid.prototype.__addRowsforPagePagination = function(fromRecord,toRecord,pageSize)\\r\\n\\t{\\r\\n\\t\\t//slice returns index range from fromRecord to toRecord - 1 hence adding 1 \\r\\n\\t\\t//this.__nsGrid.__arrInternalSource = this.__nsGrid.__arrWrapper.slice(fromRecord,toRecord + 1);\\r\\n\\t\\tthis.__nsGrid.__resetDataInBody(fromRecord,toRecord);\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSFlatGrid;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSFlatGrid\\\",NSFlatGrid);\\r\\n \\\"use strict\\\"; \\r\\nvar NSHierarchicalGrid = (function()\\r\\n{\\r\\n\\tfunction NSHierarchicalGrid(nsGrid,nsUtil) \\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid = nsGrid;\\r\\n\\t\\tthis.util = nsUtil;\\r\\n\\t\\t\\r\\n\\t\\tthis.__ARROW_COLLAPSE_PATH = \\\"M 0 9.99994L 6.10352e-005 -3.05176e-005L 5 5.00006L 0 9.99994 Z\\\";\\r\\n\\t\\tthis.__ARROW_EXPANDED_PATH = \\\"M 0 3.05176e-005L 9.99994 9.15527e-005L 4.99988 5.00003L 0 3.05176e-005 Z\\\";\\r\\n\\t\\tthis.__CLASS_ARROW = \\\"nsGridArrowFill\\\";\\r\\n\\t\\tthis.__rowCounter = -1;\\r\\n\\t\\tthis.__enableOnDemandHierarchy = false;\\r\\n\\t\\tthis.__onDemandChildDetectionField = \\\"hasChildren\\\";\\r\\n\\t\\tthis.__onDemandChildFetchCallback = null;\\r\\n\\t}\\r\\n\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\tNSHierarchicalGrid.prototype.__initialize = function ()\\r\\n\\t{\\r\\n\\t\\tvar setting = this.__nsGrid.__setting;\\r\\n\\t\\tif(setting.hasOwnProperty(\\\"enableOnDemandHierarchy\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__enableOnDemandHierarchy = Boolean.parse(setting[\\\"enableOnDemandHierarchy\\\"]);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableOnDemandHierarchy)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"onDemandChildDetectionField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__onDemandChildDetectionField = setting[\\\"onDemandChildDetectionField\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"onDemandChildFetchCallback\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__onDemandChildFetchCallback = setting[\\\"onDemandChildFetchCallback\\\"];\\r\\n\\t\\t\\t\\tthis.__onDemandChildFetchCallback = this.util.getFunction(this.__onDemandChildFetchCallback);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__onDemandChildDetectionField)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSGrid\\\",\\\"Value for onDemandChildDetectionField is not valid\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__onDemandChildFetchCallback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSGrid\\\",\\\"Value for onDemandChildFetchCallback is not valid\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableVirtualScroll || (this.__nsGrid.__enablePagination && this.__nsGrid.__isPaginationModeAuto))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.warning(\\\"NSGrid\\\",\\\"As VirtualScroll or Pagination Mode is true so OnDemandHierarchy will have no impact.\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty) \\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.dataSource = function(source)\\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid.__arrWrapper = this.__nsGrid.__dataSource.slice(0);\\r\\n\\t\\tthis.__nsGrid.__arrFilteredGroupedSource = this.__nsGrid.__arrWrapper.slice(0);\\r\\n\\t\\tthis.__setWrapperSource(this.__nsGrid.__arrWrapper,0,-1,0,true,true,true);\\r\\n\\t\\tthis.__nsGrid.__updateTotalRecords(this.__rowCounter);\\r\\n\\t\\tif(this.__nsGrid.__enablePagination && this.__nsGrid.__isPaginationModeAuto)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsGrid.__isPaginationTypeScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0);//this.__nsGrid.__arrFlatHierarchicalSource.slice(0,this.__nsGrid.__INFINITE_SCROLL_INITIAL_LOAD);\\r\\n\\t\\t\\t\\tthis.__nsGrid.__paginationFetchRecordCallBack = this.__addRowsforScrollPagination.bind(this);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0,this.__nsGrid.__pageSize);\\r\\n\\t\\t\\t\\tthis.__nsGrid.__createPaginationControl(this.__nsGrid.__divOuterContainer);\\r\\n\\t\\t\\t\\tthis.__nsGrid.__paginationFetchRecordCallBack = this.__addRowsforPagePagination.bind(this);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0);//this.__nsGrid.__arrWrapper.slice(0);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.addItemsAsChildren = function(item,arrChildren)\\r\\n\\t{\\r\\n\\t\\tif(item && arrChildren && arrChildren.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!item[this.__nsGrid.__childField])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__childField] = [];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem[this.__nsGrid.__childField].push.apply(item[this.__nsGrid.__childField], arrChildren);\\r\\n\\t\\t\\tthis.__setWrapperSource(this.__nsGrid.__arrWrapper,0,-1,0,true,false,false);\\r\\n\\t\\t\\tthis.__nsGrid.__updateTotalRecords(this.__rowCounter);\\r\\n\\t\\t\\tif(!(this.__nsGrid.__enablePagination && this.__nsGrid.__isPaginationModeAuto))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0);\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldRowVisible] = true;\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldIsCollapsed] = false;\\r\\n\\t\\t   \\t\\tvar row = this.__nsGrid.__getRowFromItem(item);\\r\\n\\t\\t   \\t\\tvar rowIndex = this.__nsGrid.__getIndexByItem(item);\\r\\n\\t\\t   \\t\\tthis.__nsGrid.__showHideRow(rowIndex,null,false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.afterGridRendered = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.arrowClickHandler = function(parentItem,isCollapse) \\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.expandCollapseHandler = function(item,isCollapse)\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__createBodyBody= function(dataSet,startIndex,endIndex)\\r\\n\\t{\\r\\n\\t    if(dataSet && dataSet.length > 0)\\r\\n\\t    {\\r\\n\\t    \\tfor (var rowIndex = startIndex; rowIndex < endIndex; rowIndex++)\\r\\n\\t\\t    {\\r\\n\\t    \\t\\tvar item = dataSet[rowIndex];\\r\\n\\t    \\t\\tthis.__createRow(item);\\r\\n\\t\\t    }\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__setSourceForAsync= function()\\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__createRowAsync= function(item,index,array)\\r\\n\\t{\\r\\n\\t\\tthis.__createRow(item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__createBodyBodyVirtual= function(dataSet,totalRows,level)\\r\\n\\t{\\r\\n\\t\\tif(dataSet && dataSet.length > 0)\\r\\n\\t    {\\r\\n\\t    \\tif(totalRows > dataSet.length)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\ttotalRows = dataSet.length;\\r\\n\\t    \\t}\\r\\n\\t    \\telse if(this.__nsGrid.__enableVariableRowHeight)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\ttotalRows = totalRows + this.__nsGrid.__extraRowCountForVariableHeight;\\r\\n\\t    \\t}\\r\\n\\t    \\tthis.__createBodyBody(dataSet,0,totalRows);\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__createBody = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__checkForAdditionalColumns = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__setMeasurement = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__addSVGInPage = function(objSVG)\\r\\n\\t{\\r\\n\\t\\tobjSVG.addPath(\\\"svgArrowDown\\\",this.__ARROW_EXPANDED_PATH,\\\"0 0 16 16\\\");\\r\\n\\t\\tobjSVG.addPath(\\\"svgArrowRight\\\",this.__ARROW_COLLAPSE_PATH,\\\"0 0 16 16\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__setWrapperSource = function(source,offset,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible)\\r\\n\\t{\\r\\n\\t\\tif(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(level === 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!offset)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\toffset = 0;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrFlatHierarchicalSource = [];\\r\\n\\t\\t\\t\\tthis.__rowCounter = offset;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = source.length;\\r\\n\\t\\t\\tvar count = 0;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tif(this.__nsGrid.__renderInCachedMode)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\tthis.__rowCounter++;\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__arrFlatHierarchicalSource.push(item);\\r\\n\\t\\t\\t\\t\\tthis.__setRowItemProperty(item,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible);\\r\\n\\t\\t\\t\\t\\tvar colLength = this.__nsGrid.__columns.length;\\r\\n\\t\\t\\t\\t\\tvar arrCellsText = [];\\r\\n\\t\\t\\t\\t\\tfor (var colIndex = 0; colIndex < colLength; colIndex++)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar colItem = this.__nsGrid.__columns[colIndex];\\r\\n\\t\\t\\t            var cellDiv = this.util.createDiv(null);\\r\\n\\t\\t\\t            this.__nsGrid.__addCellText(null,item,cellDiv,colItem,colIndex);\\r\\n\\t\\t\\t            arrCellsText.push(cellDiv);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t\\t\\titem[this.__nsGrid.__fieldCellText] = arrCellsText;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\tthis.__rowCounter++;\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__arrFlatHierarchicalSource.push(item);\\r\\n\\t\\t\\t\\t\\tthis.__setRowItemProperty(item,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t/*useVisibleIndex flag is used when we want to use visible index,generally true for all cases except for expandCollapse all due to performance issues*/  \\r\\n\\tNSHierarchicalGrid.prototype.__resetDataInBody= function(fromIndex,toIndex,fromRowIndex,useVisibleIndex)\\r\\n\\t{\\r\\n\\t\\tif(!fromRowIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfromRowIndex = 0;\\r\\n\\t\\t}\\r\\n\\t\\tvar row = null;\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar arrRows = this.__nsGrid.__tblCenterBodyBody.rows;\\r\\n\\t\\tvar rowLength = arrRows.length;\\r\\n\\t\\tvar length = this.__nsGrid.__arrFlatHierarchicalSource.length;\\r\\n\\t\\tvar indexCount = fromIndex;\\r\\n\\t\\tvar rowCount = fromRowIndex;\\r\\n\\t\\tfor(var count = fromIndex; count < length; count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsGrid.__enableVirtualScroll && useVisibleIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = this.__nsGrid.__getVisibleItemByIndex(this.__nsGrid.__arrFlatHierarchicalSource,count);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = this.__nsGrid.__arrFlatHierarchicalSource[count];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//breaking if item not found as if large data set is rendered and after collapse all the while scrolling after a while item is null still it goes to end of data set which are hidden\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(item[this.__nsGrid.__fieldRowVisible])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(rowLength <= rowCount) // || indexCount > toIndex\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\trow = arrRows[rowCount];\\r\\n\\t\\t\\t\\t\\tthis.__resetRow(row,item);\\r\\n\\t\\t\\t\\t\\tindexCount++;\\r\\n\\t\\t\\t\\t\\trowCount++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tfor(var rowIndex = rowCount;rowIndex < rowLength;rowIndex++)\\r\\n\\t\\t{\\r\\n\\t\\t\\trow = arrRows[rowIndex];\\r\\n\\t\\t\\trow.style.display = \\\"none\\\";\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-index\\\",null);\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-level\\\",null);\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-parent-index\\\",null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__updateCellText = function(row,cell,item,colItem,rowIndex,colIndex)\\r\\n\\t{\\r\\n\\t\\tif(cell && item && colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeAllChildren(cell);\\r\\n\\t\\t\\tvar cellDiv = this.util.createDiv(null);\\r\\n\\t\\t\\tvar divText = this.__setBodyCellProperty(row,cell,cellDiv,item,rowIndex,colItem,colIndex,item[this.__nsGrid.__fieldParentIndex],item[this.__nsGrid.__fieldRowLevel]);\\r\\n\\t\\t\\t//this.__nsGrid.__highlightDiv(divText,colIndex);\\r\\n\\t\\t\\tcell.appendChild(cellDiv);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__getFlatSource = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__nsGrid.__arrFlatHierarchicalSource;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__isCellEditable = function(objColumn,item,cell,cellIndex,row,rowIndex)\\r\\n\\t{\\r\\n\\t\\treturn true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__isOnDemandHasChildren = function(item)\\r\\n\\t{\\r\\n\\t\\treturn (this.__enableOnDemandHierarchy && item[this.__onDemandChildDetectionField]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__handleOnDemandClick = function(item,event)\\r\\n\\t{\\r\\n\\t\\tif(item && this.__isOnDemandHasChildren(item))\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__onDemandChildFetchCallback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\tvar rowLevel = item[this.__nsGrid.__fieldRowLevel];\\r\\n\\t\\t\\t\\tvar rowIndex = this.__nsGrid.__getIndexByItem(item);\\r\\n\\t\\t\\t\\tthis.__onDemandChildFetchCallback(item,rowIndex,rowLevel,event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t/********************************End of Common Functions for Grid ****************************************/\\r\\n\\tNSHierarchicalGrid.prototype.__createRow = function(item,itemIndex,isAdd)\\r\\n\\t{\\r\\n\\t\\tif(item && item[this.__nsGrid.__fieldRowVisible])\\r\\n\\t\\t{\\r\\n\\t\\t\\tisAdd = this.util.isUndefinedOrNull(isAdd) ? true : Boolean.parse(isAdd);\\r\\n\\t\\t\\tvar row = document.createElement(\\\"TR\\\");\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldRowHtml] = row;\\r\\n\\t\\t\\tvar index = item[this.__nsGrid.__fieldIndex];\\r\\n\\t\\t\\tvar level = item[this.__nsGrid.__fieldRowLevel];\\r\\n\\t\\t\\tvar parentIndex = item[this.__nsGrid.__fieldParentIndex];\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-level\\\",level);\\r\\n\\t\\t\\tif(item[this.__nsGrid.__fieldHasParent])\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\trow.setAttribute(\\\"ns-parent-index\\\",parentIndex);\\r\\n\\t\\t    }\\r\\n\\t\\t\\tthis.__nsGrid.__setBodyRowProperty(row,item,index);\\r\\n\\t\\t\\tthis.__nsGrid.__applyCustomClass(row,\\\"bodyRow\\\");\\r\\n\\t\\t\\tvar colLength = this.__nsGrid.__columns.length;\\r\\n\\t\\t\\tfor (var colIndex = 0; colIndex < colLength; colIndex++)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar colItem = this.__nsGrid.__columns[colIndex];\\r\\n\\t\\t\\t\\tvar cell =  this.__nsGrid.__createBodyRowCell(row,colIndex,true);\\r\\n\\t            var cellDiv = cell.firstChild;\\r\\n\\t            var divText = this.__setBodyCellProperty(row,cell,cellDiv,item,index,colItem,colIndex,parentIndex,level);\\r\\n\\t            //this.__nsGrid.__highlightDiv(divText,colIndex);\\r\\n\\t            cell.appendChild(cellDiv);\\r\\n\\t            this.__nsGrid.__setBodyCellProperties.bind(this.__nsGrid)(cell);\\r\\n\\t\\t    }\\r\\n\\t\\t\\tif(isAdd)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar addRow = true;\\r\\n\\t\\t\\t\\tif(!this.util.isUndefinedOrNull(itemIndex) && itemIndex > 0 && this.__nsGrid.__tblCenterBodyBody.children \\r\\n\\t\\t\\t\\t\\t\\t&& this.__nsGrid.__tblCenterBodyBody.children.length >= itemIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar prevRow = this.__nsGrid.__tblCenterBodyBody.children[itemIndex - 1]; //this.__nsGrid.__getRowByIndex(itemIndex);\\r\\n\\t\\t\\t\\t\\tif(prevRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__nsGrid.__tblCenterBodyBody.insertBefore(row,prevRow);\\r\\n\\t\\t\\t\\t\\t\\taddRow = false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(addRow)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__tblCenterBodyBody.appendChild(row);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__nsGrid.__createFixedBodyRow(row);\\r\\n\\t\\t\\treturn row;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__updateRow = function(row,item)\\r\\n\\t{\\r\\n\\t\\tif(row && item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar index = item[this.__nsGrid.__fieldIndex];\\r\\n\\t\\t\\tvar level = item[this.__nsGrid.__fieldRowLevel];\\r\\n\\t\\t\\tvar parentIndex = item[this.__nsGrid.__fieldParentIndex];\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-level\\\",level);\\r\\n\\t\\t\\tif(item[this.__nsGrid.__fieldHasParent])\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\trow.setAttribute(\\\"ns-parent-index\\\",parentIndex);\\r\\n\\t\\t    }\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trow.setAttribute(\\\"ns-parent-index\\\",null);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(item[this.__nsGrid.__fieldSelected])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(row,this.__nsGrid.__CLASS_SELECTED_ROW);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(row,this.__nsGrid.__CLASS_SELECTED_ROW);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar cells = row.cells;\\r\\n\\t\\t\\tfor (var colIndex = 0; colIndex < this.__nsGrid.__columns.length; colIndex++)\\r\\n\\t        {\\r\\n\\t\\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t\\t\\tvar colItem = this.__nsGrid.__columns[colIndex];\\r\\n\\t\\t\\t\\tthis.__updateCellText(row,cell,item,colItem,index,colIndex);\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__setRowItemProperty = function(item,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar totalRowCount = this.__rowCounter;\\r\\n\\t\\t\\tif(setFieldIndex || this.util.isUndefinedOrNull(item[this.__nsGrid.__fieldIndex]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldIndex] = totalRowCount;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldVisibleIndex] = totalRowCount;\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldRowLevel] = level;\\r\\n\\t\\t\\tvar hasChild = false;\\r\\n\\t\\t\\tif((item[this.__nsGrid.__childField] && item[this.__nsGrid.__childField].length > 0)  || (this.__isOnDemandHasChildren(item)))\\r\\n\\t\\t    {\\r\\n\\t\\t    \\thasChild = true;\\r\\n\\t\\t    \\tthis.__setWrapperSource(item[this.__nsGrid.__childField],0,totalRowCount,level + 1,setFieldIndex,setIsCollapsed,setItemVisible);\\r\\n\\t\\t    }\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldParentIndex] = parentIndex;\\r\\n\\t\\t\\tif(parentIndex > -1)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldHasParent] = true;\\r\\n\\t\\t    }\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldHasParent] = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldHasChild] = hasChild;\\r\\n\\t\\t\\tif(setItemVisible || this.util.isUndefinedOrNull(item[this.__nsGrid.__fieldRowVisible]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldRowVisible] = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setIsCollapsed || this.util.isUndefinedOrNull(item[this.__nsGrid.__fieldIsCollapsed]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldIsCollapsed] = this.__isOnDemandHasChildren(item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__setBodyCellProperty = function(row,cell,cellDiv,item,currentIndex,colItem,colIndex,parentIndex,level)\\r\\n\\t{\\r\\n\\t\\tvar hierarchicalPadding = 0;\\r\\n\\t\\tvar divText = null;\\r\\n\\t\\tif(colItem && colItem.hasOwnProperty(\\\"dataField\\\") && colItem[\\\"dataField\\\"])\\r\\n\\t\\t{\\r\\n\\t        if(colIndex == 0 && ((item[this.__nsGrid.__childField]  && item[this.__nsGrid.__childField].length > 0) || (this.__isOnDemandHasChildren(item))))\\r\\n\\t        {\\r\\n\\t        \\tthis.util.addStyleClass(cellDiv,this.__nsGrid.__CLASS_GROUP_CELL);\\r\\n\\t        \\tthis.__nsGrid.__createArrow(item,currentIndex,cellDiv,item[this.__nsGrid.__fieldIsCollapsed],colItem);\\r\\n\\t        \\tvar cellText = this.util.createDiv(null,this.__nsGrid.__CLASS_CELL_CHILD);\\r\\n\\t        \\tcellText.style.verticalAlign = \\\"top\\\";\\r\\n\\t        \\tdivText = cellText;\\r\\n\\t        \\tif(this.__nsGrid.__renderInCachedMode)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar arrCellsText = item[this.__nsGrid.__fieldCellText];\\r\\n\\t        \\t\\tcellText.innerHTML = arrCellsText[colIndex].outerHTML;\\r\\n\\t        \\t}\\r\\n\\t        \\telse\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tthis.__nsGrid.__addCellText(row,item,cellText,colItem,colIndex);\\r\\n\\t        \\t}\\r\\n\\t        \\tthis.util.addStyleClass(cellText,\\\"nsGroupCellText\\\");\\r\\n\\t        \\tcellDiv.appendChild(cellText);\\r\\n\\t        }\\r\\n\\t        else\\r\\n\\t        {\\r\\n\\t        \\tthis.util.addStyleClass(cellDiv,this.__nsGrid.__CLASS_CELL_CHILD);\\r\\n\\t        \\tif(this.__nsGrid.__renderInCachedMode)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar arrCellsText = item[this.__nsGrid.__fieldCellText];\\r\\n\\t        \\t\\tcellDiv.innerHTML = arrCellsText[colIndex].outerHTML;\\r\\n\\t        \\t}\\r\\n\\t        \\telse\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tthis.__nsGrid.__addCellText(row,item,cellDiv,colItem,colIndex);\\r\\n\\t        \\t}\\r\\n\\t        \\tdivText = cellDiv;\\r\\n\\t        \\t//24 = 16(Arrow Width) + 6(Arrow Parent Padding) + 2(cellDiv horizontalGap between elements shown in debugger)\\r\\n\\t        \\thierarchicalPadding = 24;\\r\\n\\t        }\\r\\n\\t        if(colIndex == 0)\\r\\n\\t        {\\r\\n\\t        \\tif(level === 0 || !this.__nsGrid.__showExpandCollapseIcon)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tcell.style.paddingLeft = \\\"1px\\\";\\r\\n\\t        \\t}\\r\\n\\t        \\telse\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar paddingLeft = (10 * level) + hierarchicalPadding;\\r\\n\\t        \\t\\tcell.style.paddingLeft = paddingLeft + \\\"px\\\";\\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t\\tthis.__nsGrid.__addPriorityClassInCell(cell,colItem);\\r\\n\\t\\treturn divText;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__createArrow = function(compArrow,objSVG,arrowID,isCollapsed,item,colItem)\\r\\n\\t{\\r\\n\\t\\t if(this.__nsGrid.__isRowExpansionIconCustom())\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.__setArrowDirection(compArrow,isCollapsed,colItem);\\r\\n\\t\\t }\\r\\n\\t\\t else\\r\\n\\t\\t {\\r\\n\\t\\t\\t var svg = objSVG.addSVG(compArrow,arrowID + \\\"svg\\\",this.__CLASS_ARROW,null,null,null,null,null,null,true);\\r\\n\\t\\t\\t this.util.addStyleClass(svg,this.__CLASS_ARROW + \\\"Theme\\\");\\r\\n\\t\\t\\t if(isCollapsed)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t objSVG.addUse(svg,arrowID + \\\"use\\\",null,\\\"#svgArrowRight\\\");\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t else\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t objSVG.addUse(svg,arrowID + \\\"use\\\",null,\\\"#svgArrowDown\\\");\\r\\n\\t\\t\\t }\\r\\n\\t\\t }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__setArrowDirection = function(compArrow,isCollapsed,colItem)\\r\\n\\t{\\r\\n\\t\\tif(this.__nsGrid.__isRowExpansionIconCustom())\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCollapsed)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompArrow.innerHTML = this.__nsGrid.__getCustomIcon(\\\"rowCollapsed\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompArrow.innerHTML = this.__nsGrid.__getCustomIcon(\\\"rowExpanded\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = compArrow.getAttribute(\\\"id\\\") + \\\"use\\\";\\r\\n\\t\\t\\tif(isCollapsed)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#svgArrowRight\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#svgArrowDown\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__resetRow = function(row,item)\\r\\n\\t{\\r\\n\\t\\tvar index = item[this.__nsGrid.__fieldIndex];\\r\\n\\t\\trow.style.display = \\\"\\\";\\r\\n\\t\\trow.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\titem[this.__nsGrid.__fieldRowHtml] = row;\\r\\n\\t\\tthis.__updateRow(row,item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__addRowsforScrollPagination = function(fromRecord,toRecord,pageSize)\\r\\n\\t{\\r\\n\\t\\t//console.log(\\\"In __addRowsforScrollPagination \\\" + fromRecord + \\\",\\\" + toRecord + \\\",\\\" + pageSize);\\r\\n\\t\\tvar arrArray = this.__nsGrid.__arrFlatHierarchicalSource.slice(fromRecord,toRecord + 1); \\r\\n\\t\\tthis.__nsGrid.__addRemoveRowCallInternal = true;\\r\\n\\t\\tthis.__nsGrid.addRows(arrArray);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSHierarchicalGrid.prototype.__addRowsforPagePagination = function(fromRecord,toRecord,pageSize)\\r\\n\\t{\\r\\n\\t\\t//slice returns index range from fromRecord to toRecord - 1 hence adding 1 \\r\\n\\t\\t//this.__nsGrid.__arrInternalSource = this.__nsGrid.__arrWrapper.slice(fromRecord,toRecord + 1);\\r\\n\\t\\tthis.__nsGrid.__resetDataInBody(fromRecord,toRecord);\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSHierarchicalGrid;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSHierarchicalGrid\\\",NSHierarchicalGrid); \\\"use strict\\\";\\r\\nvar NSGroupingGrid = (function()\\r\\n{\\r\\n\\tfunction NSGroupingGrid(nsGrid,nsUtil) \\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid = nsGrid;\\r\\n\\t\\tthis.util = nsUtil;\\r\\n\\t\\t\\r\\n\\t\\tthis.__ARROW_COLLAPSE_PATH = \\\"M 10,5.99994L 6,5.99994L 6,9.99994L 4,9.99994L 4,5.99994L 0,5.99994L 0,3.99994L 4,3.99994L 4,-6.10352e-005L 6,-6.10352e-005L 6,3.99994L 10,3.99994L 10,5.99994 Z\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__isSingleLevelMode = true; \\r\\n\\t\\tthis.__groupSource = null;\\r\\n\\t\\tthis.__fieldColNameArrow = this.__nsGrid.getID() + \\\"_arrow_field\\\";\\r\\n\\t\\tthis.__groupColumnFieldName = this.__nsGrid.getID() + \\\"_group_field\\\";\\r\\n\\t\\tthis.__childrenCountField = this.__nsGrid.getID() + \\\"_children_count_field\\\";\\r\\n\\t\\tthis.__rowCounter = -1;\\r\\n\\t}\\r\\n\\t /********************************Common Functions for Grid ****************************************/\\r\\n\\tNSGroupingGrid.prototype.__initialize = function ()\\r\\n\\t{\\r\\n\\t\\tvar setGroupColumn = false;\\r\\n\\t\\tif(this.__nsGrid.hasAttribute(\\\"isSingleLevelGrouping\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isSingleLevelMode =  Boolean.parse(this.__nsGrid.getAttribute(\\\"isSingleLevelGrouping\\\"));\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__nsGrid.hasAttribute(\\\"multiLevelGroupColumn\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__multiLevelGroupColumn = this.__nsGrid.getAttribute(\\\"multiLevelGroupColumn\\\");\\r\\n\\t\\t\\tif(this.__multiLevelGroupColumn)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__multiLevelGroupColumn.dataField)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__groupColumnFieldName = this.__multiLevelGroupColumn.dataField;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__multiLevelGroupColumn.dataField = this.__groupColumnFieldName;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__multiLevelGroupColumn.groupRenderer)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__multiLevelGroupColumn.groupRenderer = this.__groupTextRenderer.bind(this);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetGroupColumn = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tsetGroupColumn = true;\\r\\n\\t\\t}\\r\\n\\t\\tif(setGroupColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__multiLevelGroupColumn = {headerText:\\\"Group\\\",dataField:this.__groupColumnFieldName,width:\\\"100px\\\",enableFilter:true,groupRenderer:this.__groupTextRenderer.bind(this)};\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty) \\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tif(attributeName === \\\"groupbyfield\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsGrid.__groupByField = newVal;\\r\\n\\t\\t\\tthis.__nsGrid.dataSource(this.__nsGrid.__dataSource,true);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.dataSource = function(source)\\r\\n\\t{\\r\\n\\t\\tif(this.__nsGrid.__groupByField && this.__nsGrid.__groupByField.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrGroupField = this.__nsGrid.__groupByField.split(\\\",\\\");\\r\\n\\t\\t\\tvar setting = {childField:this.__nsGrid.__childField,parentLevelIndicatorField:this.__nsGrid.__isParentRowField,isSingleLevel:this.__isSingleLevelMode,groupField:this.__multiLevelGroupColumn.dataField,childrenCountField:this.__childrenCountField};\\r\\n\\t\\t\\tvar groupCollection = new this.util.groupCollection(this.__nsGrid.__dataSource,setting);\\r\\n\\t\\t\\tthis.__groupSource = groupCollection.groupBy(arrGroupField);\\r\\n\\t\\t\\tif(this.__groupSource)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrWrapper = this.__groupSource.slice(0);\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrFilteredGroupedSource =  this.__groupSource.slice(0);\\r\\n\\t\\t\\t\\tthis.__setWrapperSource(this.__nsGrid.__arrWrapper,0,-1,0,true);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrWrapper = [];\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrFilteredGroupedSource =  [];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__nsGrid.__updateTotalRecords(this.__rowCounter);\\r\\n\\t\\t\\tif(this.__nsGrid.__enablePagination && this.__nsGrid.__isPaginationModeAuto)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__nsGrid.__isPaginationTypeScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0);//this.__nsGrid.__arrFlatHierarchicalSource.slice(0,this.__nsGrid.__INFINITE_SCROLL_INITIAL_LOAD);\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__paginationFetchRecordCallBack = this.__addRowsforScrollPagination.bind(this);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0,this.__nsGrid.__pageSize);\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__createPaginationControl(this.__nsGrid.__divOuterContainer);\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__paginationFetchRecordCallBack = this.__addRowsforPagePagination.bind(this);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0);//this.__nsGrid.__arrWrapper.slice(0);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.addItemsAsChildren = function(item,arrChildren)\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.afterGridRendered = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.arrowClickHandler = function(parentItem,isCollapse) \\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.expandCollapseHandler = function(item,isCollapse)\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__createBody = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__createBodyBody= function(dataSet,startIndex,endIndex)\\r\\n\\t{\\r\\n\\t    if(dataSet && dataSet.length > 0)\\r\\n\\t    {\\r\\n\\t    \\tfor (var rowIndex = startIndex; rowIndex < endIndex; rowIndex++)\\r\\n\\t\\t    {\\r\\n\\t    \\t\\tvar item = dataSet[rowIndex];\\r\\n\\t    \\t\\tthis.__createRow(item);\\r\\n\\t\\t    }\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__setSourceForAsync= function()\\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__createRowAsync= function(item,index,array)\\r\\n\\t{\\r\\n\\t\\tthis.__createRow(item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__createBodyBodyVirtual= function(dataSet,totalRows,level)\\r\\n\\t{\\r\\n\\t\\tif(dataSet && dataSet.length > 0)\\r\\n\\t    {\\r\\n\\t    \\tif(totalRows > dataSet.length)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\ttotalRows = dataSet.length;\\r\\n\\t    \\t}\\r\\n\\t    \\telse if(this.__nsGrid.__enableVariableRowHeight)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\ttotalRows = totalRows + this.__nsGrid.__extraRowCountForVariableHeight;\\r\\n\\t    \\t}\\r\\n\\t    \\tthis.__createBodyBody(dataSet,0,totalRows);\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__checkForAdditionalColumns = function()\\r\\n\\t{\\r\\n\\t\\tvar colArrow = {};\\r\\n\\t\\tif(this.__isSingleLevelMode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcolArrow.headerText = \\\"\\\";\\r\\n\\t\\t\\tcolArrow.dataField = this.__fieldColNameArrow;\\r\\n\\t\\t\\tcolArrow.width = \\\"50px\\\";\\r\\n\\t\\t\\tcolArrow.enableFilter = false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tcolArrow = this.__multiLevelGroupColumn;\\r\\n\\t\\t\\tvar arrGroupField = this.__nsGrid.__groupByField.split(\\\",\\\");\\r\\n\\t\\t\\tfor(var count = 0;count < arrGroupField.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar field = arrGroupField[count];\\r\\n\\t\\t\\t\\tvar objField = this.__nsGrid.__getColumnObjectByDataField(field,this.__nsGrid.__orignalColumns);\\r\\n\\t\\t\\t\\tif(objField)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjField[this.__nsGrid.__fieldColVisible] = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tcolArrow.sortable = false;\\r\\n\\t\\tcolArrow.sortDescending = true;\\r\\n\\t\\tcolArrow.draggable = false;\\r\\n\\t\\tcolArrow.resizable = true;\\r\\n\\t\\tcolArrow.isExportable = false;\\r\\n\\t\\tcolArrow.enableEditable = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.__nsGrid.__orignalColumns.splice(0, 0, colArrow);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__setMeasurement = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__addSVGInPage = function(objSVG)\\r\\n\\t{\\r\\n\\t\\tvar minusID = \\\"svgMinus\\\";\\r\\n\\t\\tvar minusRect = objSVG.createRect(minusID + \\\"Rect\\\",0,0,10,2,null);\\r\\n\\t\\tobjSVG.addElementInSymbol(minusID,\\\"0 0 16 16\\\",minusRect);\\r\\n\\t\\tvar plusID = \\\"svgPlus\\\";\\r\\n\\t\\tobjSVG.addPath(plusID,this.__ARROW_COLLAPSE_PATH,\\\"0 0 16 16\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__setWrapperSource = function(source,offset,parentIndex,level,setFieldIndex)\\r\\n\\t{\\r\\n\\t\\tif(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(level === 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!offset)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\toffset = 0;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrFlatHierarchicalSource = [];\\r\\n\\t\\t\\t\\tthis.__rowCounter = offset;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = source.length;\\r\\n\\t\\t\\tvar count = 0;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tif(this.__nsGrid.__renderInCachedMode)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\tthis.__rowCounter++;\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__arrFlatHierarchicalSource.push(item);\\r\\n\\t\\t\\t\\t\\tthis.__setRowItemProperty(item,parentIndex,level,setFieldIndex);\\r\\n\\t\\t\\t\\t\\tvar colLength = this.__nsGrid.__columns.length;\\r\\n\\t\\t\\t\\t\\tvar arrCellsText = [];\\r\\n\\t\\t\\t\\t\\tfor (var colIndex = 0; colIndex < colLength; colIndex++)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar colItem = this.__nsGrid.__columns[colIndex];\\r\\n\\t\\t\\t            var cellDiv = this.util.createDiv(null);\\r\\n\\t\\t\\t            this.__nsGrid.__addCellText(null,item,cellDiv,colItem,colIndex);\\r\\n\\t\\t\\t            arrCellsText.push(cellDiv);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t\\t\\titem[this.__nsGrid.__fieldCellText] = arrCellsText;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\tthis.__rowCounter++;\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__arrFlatHierarchicalSource.push(item);\\r\\n\\t\\t\\t\\t\\tthis.__setRowItemProperty(item,parentIndex,level,setFieldIndex);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t/*useVisibleIndex flag is used when we want to use visible index,generally true for all cases except for expandCollapse all due to performance issues*/  \\r\\n\\tNSGroupingGrid.prototype.__resetDataInBody= function(fromIndex,toIndex,fromRowIndex,useVisibleIndex)\\r\\n\\t{\\r\\n\\t\\tif(!fromRowIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfromRowIndex = 0;\\r\\n\\t\\t}\\r\\n\\t\\tif(!useVisibleIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tuseVisibleIndex = false;\\r\\n\\t\\t}\\r\\n\\t\\tvar row = null;\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar arrRows = this.__nsGrid.__tblCenterBodyBody.rows;\\r\\n\\t\\tvar rowLength = arrRows.length;\\r\\n\\t\\tvar length = this.__nsGrid.__arrFlatHierarchicalSource.length;\\r\\n\\t\\tvar indexCount = fromIndex;\\r\\n\\t\\tvar rowCount = fromRowIndex;\\r\\n\\t\\tfor(var count = fromIndex; count < length; count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsGrid.__enableVirtualScroll && useVisibleIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = this.__nsGrid.__getVisibleItemByIndex(this.__nsGrid.__arrFlatHierarchicalSource,count);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = this.__nsGrid.__arrFlatHierarchicalSource[count];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//breaking if item not found as if large data set is rendered and after collapse all the while scrolling after a while item is null still it goes to end of data set which are hidden\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(item[this.__nsGrid.__fieldRowVisible])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(rowLength <= rowCount) // || indexCount > toIndex\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\trow = arrRows[rowCount];\\r\\n\\t\\t\\t\\t\\tthis.__resetRow(row,item);\\r\\n\\t\\t\\t\\t\\tindexCount++;\\r\\n\\t\\t\\t\\t\\trowCount++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tfor(var rowIndex = rowCount;rowIndex < rowLength;rowIndex++)\\r\\n\\t\\t{\\r\\n\\t\\t\\trow = arrRows[rowIndex];\\r\\n\\t\\t\\trow.style.display = \\\"none\\\";\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-index\\\",null);\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-level\\\",null);\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-parent-index\\\",null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__updateCellText = function(row,cell,item,colItem,rowIndex,colIndex)\\r\\n\\t{\\r\\n\\t\\tif(cell && item && colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeAllChildren(cell);\\r\\n\\t\\t\\tvar cellDiv = this.util.createDiv(null);\\r\\n\\t\\t\\tvar divText = this.__setBodyCellProperty(row,cell,cellDiv,item,rowIndex,colItem,colIndex,item[this.__nsGrid.__fieldParentIndex],item[this.__nsGrid.__fieldRowLevel]);\\r\\n\\t\\t\\t//this.__nsGrid.__highlightDiv(divText,colIndex);\\r\\n\\t\\t\\tcell.appendChild(cellDiv);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__getFlatSource = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__nsGrid.__arrFlatHierarchicalSource;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__isCellEditable = function(objColumn,item,cell,cellIndex,row,rowIndex)\\r\\n\\t{\\r\\n\\t\\tif(item && item[this.__nsGrid.__fieldHasChild] > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\treturn true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__handleOnDemandClick = function(item,event)\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\t/********************************End of Common Functions for Grid ****************************************/\\r\\n\\tNSGroupingGrid.prototype.__createRow = function(item,itemIndex,isAdd)\\r\\n\\t{\\r\\n\\t\\tif(item && item[this.__nsGrid.__fieldRowVisible])\\r\\n\\t\\t{\\r\\n\\t\\t\\tisAdd = this.util.isUndefinedOrNull(isAdd) ? true : Boolean.parse(isAdd);\\r\\n\\t\\t\\tvar row = document.createElement(\\\"TR\\\");\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldRowHtml] = row;\\r\\n\\t\\t\\tvar index = item[this.__nsGrid.__fieldIndex];\\r\\n\\t\\t\\tvar level = item[this.__nsGrid.__fieldRowLevel];\\r\\n\\t\\t\\tvar parentIndex = item[this.__nsGrid.__fieldParentIndex];\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-level\\\",level);\\r\\n\\t\\t\\tif(item[this.__nsGrid.__fieldHasParent])\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\trow.setAttribute(\\\"ns-parent-index\\\",parentIndex);\\r\\n\\t\\t    }\\r\\n\\t\\t\\tthis.__nsGrid.__setBodyRowProperty(row,item,index);\\r\\n\\t\\t\\tthis.__nsGrid.__applyCustomClass(row,\\\"bodyRow\\\");\\r\\n\\t\\t\\tvar colLength = this.__nsGrid.__columns.length;\\r\\n\\t\\t\\tfor (var colIndex = 0; colIndex < colLength; colIndex++)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar colItem = this.__nsGrid.__columns[colIndex];\\r\\n\\t\\t\\t\\tvar cell =  this.__nsGrid.__createBodyRowCell(row,colIndex,true);\\r\\n\\t            var cellDiv = cell.firstChild;\\r\\n\\t            var divText = this.__setBodyCellProperty(row,cell,cellDiv,item,index,colItem,colIndex,parentIndex,level);\\r\\n\\t            //this.__nsGrid.__highlightDiv(divText,colIndex);\\r\\n\\t            cell.appendChild(cellDiv);\\r\\n\\t            this.__nsGrid.__setBodyCellProperties.bind(this.__nsGrid)(cell);\\r\\n\\t\\t    }\\r\\n\\t\\t\\tif(isAdd)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar addRow = true;\\r\\n\\t\\t\\t\\tif(!this.util.isUndefinedOrNull(itemIndex) && itemIndex > 0 && this.__nsGrid.__tblCenterBodyBody.children \\r\\n\\t\\t\\t\\t\\t\\t&& this.__nsGrid.__tblCenterBodyBody.children.length >= itemIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar prevRow = this.__nsGrid.__tblCenterBodyBody.children[itemIndex - 1]; //this.__nsGrid.__getRowByIndex(itemIndex);\\r\\n\\t\\t\\t\\t\\tif(prevRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__nsGrid.__tblCenterBodyBody.insertBefore(row,prevRow);\\r\\n\\t\\t\\t\\t\\t\\taddRow = false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(addRow)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__tblCenterBodyBody.appendChild(row);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__nsGrid.__createFixedBodyRow(row);\\r\\n\\t\\t\\treturn row;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__updateRow = function(row,item)\\r\\n\\t{\\r\\n\\t\\tif(row && item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar index = item[this.__nsGrid.__fieldIndex];\\r\\n\\t\\t\\tvar level = item[this.__nsGrid.__fieldRowLevel];\\r\\n\\t\\t\\tvar parentIndex = item[this.__nsGrid.__fieldParentIndex];\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-level\\\",level);\\r\\n\\t\\t\\tif(item[this.__nsGrid.__fieldHasParent])\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\trow.setAttribute(\\\"ns-parent-index\\\",parentIndex);\\r\\n\\t\\t    }\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trow.setAttribute(\\\"ns-parent-index\\\",null);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(item[this.__nsGrid.__fieldSelected])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(row,this.__nsGrid.__CLASS_SELECTED_ROW);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(row,this.__nsGrid.__CLASS_SELECTED_ROW);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar cells = row.cells;\\r\\n\\t\\t\\tfor (var colIndex = 0; colIndex < this.__nsGrid.__columns.length; colIndex++)\\r\\n\\t        {\\r\\n\\t\\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t\\t\\tvar colItem = this.__nsGrid.__columns[colIndex];\\r\\n\\t\\t\\t\\tthis.__updateCellText(row,cell,item,colItem,index,colIndex);\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__setRowItemProperty = function(item,parentIndex,level,setFieldIndex)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar totalRowCount = this.__rowCounter;\\r\\n\\t\\t\\tif(setFieldIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldIndex] = totalRowCount;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldVisibleIndex] = totalRowCount;\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldRowLevel] = level;\\r\\n\\t\\t\\tvar hasChild = false;\\r\\n\\t\\t\\tif(item.hasOwnProperty(this.__nsGrid.__childField) && item[this.__nsGrid.__childField] && item[this.__nsGrid.__childField].length > 0)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\thasChild = true;\\r\\n\\t\\t    \\tthis.__setWrapperSource(item[this.__nsGrid.__childField],0,totalRowCount,level + 1,setFieldIndex);\\r\\n\\t\\t    }\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldParentIndex] = parentIndex;\\r\\n\\t\\t\\tif(parentIndex > -1)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldHasParent] = true;\\r\\n\\t\\t    }\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldHasParent] = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldHasChild] = hasChild;\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldRowVisible] = true;\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldIsCollapsed] = false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__setBodyCellProperty = function(row,cell,cellDiv,item,currentIndex,colItem,colIndex,parentIndex,level)\\r\\n\\t{\\r\\n\\t\\tvar hierarchicalPadding = 0;\\r\\n\\t\\tvar divText = null;\\r\\n\\t\\tif(colItem && colItem.hasOwnProperty(\\\"dataField\\\") && colItem[\\\"dataField\\\"])\\r\\n\\t\\t{\\r\\n\\t        if(colIndex == 0 && item[this.__nsGrid.__childField]  && item[this.__nsGrid.__childField].length > 0)\\r\\n\\t        {\\r\\n\\t        \\tthis.util.addStyleClass(cellDiv,this.__nsGrid.__CLASS_GROUP_CELL);\\r\\n\\t        \\tthis.__nsGrid.__createArrow(item,currentIndex,cellDiv,item[this.__nsGrid.__fieldIsCollapsed],colItem);\\r\\n\\t        \\tvar cellText = this.util.createDiv(null,this.__nsGrid.__CLASS_CELL_CHILD);\\r\\n\\t        \\tcellText.style.verticalAlign = \\\"top\\\";\\r\\n\\t        \\tdivText = cellText;\\r\\n\\t        \\tif(this.__nsGrid.__renderInCachedMode)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar arrCellsText = item[this.__nsGrid.__fieldCellText];\\r\\n\\t        \\t\\tcellText.innerHTML = arrCellsText[colIndex].outerHTML;\\r\\n\\t        \\t}\\r\\n\\t        \\telse\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tthis.__nsGrid.__addCellText(row,item,cellText,colItem,colIndex);\\r\\n\\t        \\t}\\r\\n\\t        \\tif(this.__nsGrid.__showExpandCollapseIcon)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tthis.util.addStyleClass(cellText,\\\"nsGroupCellText\\\");\\r\\n\\t        \\t}\\r\\n\\t        \\tcellDiv.appendChild(cellText);\\r\\n\\t        }\\r\\n\\t        else\\r\\n\\t        {\\r\\n\\t        \\tthis.util.addStyleClass(cellDiv,this.__nsGrid.__CLASS_CELL_CHILD);\\r\\n\\t        \\tif(this.__nsGrid.__renderInCachedMode)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar arrCellsText = item[this.__nsGrid.__fieldCellText];\\r\\n\\t        \\t\\tcellDiv.innerHTML = arrCellsText[colIndex].outerHTML;\\r\\n\\t        \\t}\\r\\n\\t        \\telse\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tthis.__nsGrid.__addCellText(row,item,cellDiv,colItem,colIndex);\\r\\n\\t        \\t}\\r\\n\\t        \\tdivText = cellDiv;\\r\\n\\t        \\t//24 = 16(Arrow Width) + 6(Arrow Parent Padding) + 2(cellDiv horizontalGap between elements shown in debugger)\\r\\n\\t        \\thierarchicalPadding = 24;\\r\\n\\t        }\\r\\n\\t        if(colIndex == 0)\\r\\n\\t        {\\r\\n\\t        \\tif(level === 0 || !this.__nsGrid.__showExpandCollapseIcon)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tcell.style.paddingLeft = \\\"1px\\\";\\r\\n\\t        \\t}\\r\\n\\t        \\telse\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar paddingLeft = (10 * level) + hierarchicalPadding;\\r\\n\\t        \\t\\tcell.style.paddingLeft = paddingLeft + \\\"px\\\";\\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t\\tthis.__nsGrid.__addPriorityClassInCell(cell,colItem);\\r\\n\\t\\treturn divText;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__createArrow = function(compArrow,objSVG,arrowID,isCollapsed,item,colItem)\\r\\n\\t{\\r\\n\\t\\t compArrow.style.paddingTop = \\\"0px\\\";\\r\\n\\t\\t if(this.__nsGrid.__isRowExpansionIconCustom())\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.__setArrowDirection(compArrow,isCollapsed,colItem);\\r\\n\\t\\t }\\r\\n\\t\\t else\\r\\n\\t\\t {\\r\\n\\t\\t\\t var classArrow = \\\"nsGridGroupIcon\\\"; \\r\\n\\t\\t\\t var svg = objSVG.addSVG(compArrow,arrowID + \\\"svg\\\",\\\"nsGridGroupSVG\\\",null,null,null,null,null,null,true);\\r\\n\\t\\t\\t this.util.addStyleClass(svg,classArrow);\\r\\n\\t\\t\\t this.util.addStyleClass(svg,classArrow + \\\"Theme\\\");\\r\\n\\t\\t\\t if(isCollapsed)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t objSVG.addUse(svg,arrowID + \\\"use\\\",null,\\\"#svgPlus\\\");\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t else\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t objSVG.addUse(svg,arrowID + \\\"use\\\",null,\\\"#svgMinus\\\");\\r\\n\\t\\t\\t }\\r\\n\\t\\t }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__setArrowDirection = function(compArrow,isCollapsed,colItem)\\r\\n\\t{\\r\\n\\t\\tif(this.__nsGrid.__isRowExpansionIconCustom())\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCollapsed)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompArrow.innerHTML = this.__nsGrid.__getCustomIcon(\\\"rowCollapsed\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompArrow.innerHTML = this.__nsGrid.__getCustomIcon(\\\"rowExpanded\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = compArrow.getAttribute(\\\"id\\\") + \\\"use\\\";\\r\\n\\t\\t\\tif(isCollapsed)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#svgPlus\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#svgMinus\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__resetRow = function(row,item)\\r\\n\\t{\\r\\n\\t\\tvar index = item[this.__nsGrid.__fieldIndex];\\r\\n\\t\\trow.style.display = \\\"\\\";\\r\\n\\t\\trow.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\titem[this.__nsGrid.__fieldRowHtml] = row;\\r\\n\\t\\tthis.__updateRow(row,item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__addRowsforScrollPagination = function(fromRecord,toRecord,pageSize)\\r\\n\\t{\\r\\n\\t\\t//console.log(\\\"In __addRowsforScrollPagination \\\" + fromRecord + \\\",\\\" + toRecord + \\\",\\\" + pageSize);\\r\\n\\t\\tvar arrArray = this.__nsGrid.__arrFlatHierarchicalSource.slice(fromRecord,toRecord + 1); \\r\\n\\t\\tthis.__nsGrid.__addRemoveRowCallInternal = true;\\r\\n\\t\\tthis.__nsGrid.addRows(arrArray);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__addRowsforPagePagination = function(fromRecord,toRecord,pageSize)\\r\\n\\t{\\r\\n\\t\\t//slice returns index range from fromRecord to toRecord - 1 hence adding 1 \\r\\n\\t\\t//this.__nsGrid.__arrInternalSource = this.__nsGrid.__arrWrapper.slice(fromRecord,toRecord + 1);\\r\\n\\t\\tthis.__nsGrid.__resetDataInBody(fromRecord,toRecord);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGroupingGrid.prototype.__groupTextRenderer = function(data,dataField,rowIndex,columnIndex,row,arrChildren,childrenCount,arrAllChildItems,groupLevel)\\r\\n\\t{\\r\\n\\t\\tif(data && data.hasOwnProperty(dataField))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar innerHTML = \\\"<span>\\\" + data[dataField];\\r\\n\\t\\t\\tif(childrenCount)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tinnerHTML += \\\" &#40;\\\" + childrenCount + \\\"&#41;\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tinnerHTML += \\\"</span>\\\";\\r\\n\\t\\t\\treturn innerHTML;\\r\\n\\t\\t}\\r\\n\\t\\treturn \\\"\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSGroupingGrid;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSGroupingGrid\\\",NSGroupingGrid);\\r\\n \\\"use strict\\\"; \\r\\nvar NSMasterDetailGrid = (function()\\r\\n{\\r\\n\\tfunction NSMasterDetailGrid(nsGrid,nsUtil) \\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid = nsGrid;\\r\\n\\t\\tthis.util = nsUtil;\\r\\n\\t\\t\\r\\n\\t\\tthis.__ARROW_COLLAPSE_PATH = \\\"M 0 9.99994L 6.10352e-005 -3.05176e-005L 5 5.00006L 0 9.99994 Z\\\";\\r\\n\\t\\tthis.__ARROW_EXPANDED_PATH = \\\"M 0 3.05176e-005L 9.99994 9.15527e-005L 4.99988 5.00003L 0 3.05176e-005 Z\\\";\\r\\n\\t\\tthis.__CLASS_ARROW = \\\"nsGridArrowFill\\\";\\r\\n\\t\\tthis.__rowCounter = -1;\\r\\n\\t\\tthis.__masterDetailHasChildField = \\\"hasChildren\\\";\\r\\n\\t\\tthis.__masterDetailHasChildCallback = null;\\r\\n\\t\\t//Detail Grid Settings\\r\\n\\t\\tthis.__masterDetailColumns = null;\\r\\n\\t\\tthis.__masterDetailGetDataSourceCallback = null;\\r\\n\\t\\tthis.__masterDetailGridSetting = null;\\r\\n\\t\\tthis.__masterDetailDoesGridRefreshEverytimeCallback = null;\\r\\n\\t\\tthis.__masterDetailGridDetailHtmlCallback = null;\\r\\n\\t\\t//End of Detail Grid Settings\\r\\n\\t\\t//Custom Detail Renderer\\r\\n\\t\\tthis.__masterDetailDetailRenderer = null;\\r\\n\\t\\tthis.__masterDetailDetailRendererParam = null;\\r\\n\\t\\t//End of Custom Detail Renderer\\r\\n\\t\\tthis.__masterDetailHeight = -1;\\r\\n\\t\\tthis.__filteringRendering = false;//flag which stops the Detail Component being Rendered while filtering id going on \\r\\n\\t\\t\\r\\n\\t\\tthis.__detailCell = this.__nsGrid.__fieldPrefix + \\\"_detail_cell\\\";\\r\\n\\t\\tthis.__detailIndicatorField = this.__nsGrid.__fieldPrefix + \\\"_detail_indicator_field\\\";\\r\\n\\t\\tthis.__detailCompInstance = this.__nsGrid.__fieldPrefix + \\\"_detail_component_instance\\\";\\r\\n\\t\\tthis.__detailCompParentItem = this.__nsGrid.__fieldPrefix + \\\"_detail_parent_item\\\";\\r\\n\\t\\tthis.__detailCompElement = this.__nsGrid.__fieldPrefix + \\\"_detail_element\\\";\\r\\n\\t\\tthis.__detailCompGridIns = this.__nsGrid.__fieldPrefix + \\\"_grid_instance\\\";\\r\\n\\t}\\r\\n\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\tNSMasterDetailGrid.prototype.__initialize = function ()\\r\\n\\t{\\r\\n\\t\\tvar gridSetting = this.__nsGrid.__setting;\\r\\n\\t\\tvar setting = gridSetting.masterDetailSetting;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"hasChildField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__masterDetailHasChildField = setting[\\\"hasChildField\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(setting.hasOwnProperty(\\\"hasChildCallback\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__masterDetailHasChildCallback = setting[\\\"hasChildCallback\\\"];\\r\\n\\t\\t\\t\\tthis.__masterDetailHasChildCallback = this.util.getFunction(this.__masterDetailHasChildCallback);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"detailColumns\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__masterDetailColumns = setting[\\\"detailColumns\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"detailDataSourceCallback\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__masterDetailGetDataSourceCallback = setting[\\\"detailDataSourceCallback\\\"];\\r\\n\\t\\t\\t\\tthis.__masterDetailGetDataSourceCallback = this.util.getFunction(this.__masterDetailGetDataSourceCallback);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"detailGridSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__masterDetailGridSetting = setting[\\\"detailGridSetting\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"gridRefreshEverytimeCallback\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__masterDetailDoesGridRefreshEverytimeCallback = setting[\\\"gridRefreshEverytimeCallback\\\"];\\r\\n\\t\\t\\t\\tthis.__masterDetailDoesGridRefreshEverytimeCallback = this.util.getFunction(this.__masterDetailDoesGridRefreshEverytimeCallback);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"gridHtmlCallback\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__masterDetailGridDetailHtmlCallback = setting[\\\"gridHtmlCallback\\\"];\\r\\n\\t\\t\\t\\tthis.__masterDetailGridDetailHtmlCallback = this.util.getFunction(this.__masterDetailGridDetailHtmlCallback);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"detailRenderer\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__masterDetailDetailRenderer = setting[\\\"detailRenderer\\\"];\\r\\n\\t\\t\\t\\tthis.__masterDetailDetailRenderer = this.util.getFunction(this.__masterDetailDetailRenderer);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"detailRendererParam\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__masterDetailDetailRendererParam = setting[\\\"detailRendererParam\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"detailHeight\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__masterDetailHeight = parseInt(setting[\\\"detailHeight\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__masterDetailHasChildField && !this.__masterDetailHasChildCallback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSGrid\\\",\\\"Enter either childDetectionField or childDetectionCallback value in masterDetailSetting.\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!(((this.__masterDetailColumns && this.__masterDetailColumns.length) && this.__masterDetailGetDataSourceCallback) || this.__masterDetailDetailRenderer))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSGrid\\\",\\\"Enter either detailColumns and detailDataSourceCallback or detailRenderer value in masterDetailSetting.\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty) \\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.dataSource = function(source)\\r\\n\\t{\\r\\n\\t\\tthis.__addChildrenToSource(this.__nsGrid.__dataSource);\\r\\n\\t\\tthis.__nsGrid.__arrWrapper = this.__nsGrid.__dataSource.slice(0);\\r\\n\\t\\tthis.__nsGrid.__arrFilteredGroupedSource = this.__nsGrid.__arrWrapper.slice(0);\\r\\n\\t\\tthis.__setWrapperSource(this.__nsGrid.__arrWrapper,0,-1,0,true,true,true);\\r\\n\\t\\tthis.__nsGrid.__updateTotalRecords(this.__rowCounter);\\r\\n\\t\\tif(this.__nsGrid.__enablePagination && this.__nsGrid.__isPaginationModeAuto)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsGrid.__isPaginationTypeScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0);//this.__nsGrid.__arrFlatHierarchicalSource.slice(0,this.__nsGrid.__INFINITE_SCROLL_INITIAL_LOAD);\\r\\n\\t\\t\\t\\tthis.__nsGrid.__paginationFetchRecordCallBack = this.__addRowsforScrollPagination.bind(this);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0,this.__nsGrid.__pageSize);\\r\\n\\t\\t\\t\\tthis.__nsGrid.__createPaginationControl(this.__nsGrid.__divOuterContainer);\\r\\n\\t\\t\\t\\tthis.__nsGrid.__paginationFetchRecordCallBack = this.__addRowsforPagePagination.bind(this);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0);//this.__nsGrid.__arrWrapper.slice(0);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.addItemsAsChildren = function(item,arrChildren)\\r\\n\\t{\\r\\n\\t\\tif(item && arrChildren && arrChildren.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!item[this.__nsGrid.__childField])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__childField] = [];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem[this.__nsGrid.__childField].push.apply(item[this.__nsGrid.__childField], arrChildren);\\r\\n\\t\\t\\tthis.__setWrapperSource(this.__nsGrid.__arrWrapper,0,-1,0,true,false,false);\\r\\n\\t\\t\\tthis.__nsGrid.__updateTotalRecords(this.__rowCounter);\\r\\n\\t\\t\\tif(!(this.__nsGrid.__enablePagination && this.__nsGrid.__isPaginationModeAuto))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0);\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldRowVisible] = true;\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldIsCollapsed] = false;\\r\\n\\t\\t   \\t\\tvar row = this.__nsGrid.__getRowFromItem(item);\\r\\n\\t\\t   \\t\\tvar rowIndex = this.__nsGrid.__getIndexByItem(item);\\r\\n\\t\\t   \\t\\tthis.__nsGrid.__showHideRow(rowIndex,null,false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.afterGridRendered = function()\\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid.__expandCollapseAll(true);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.afterFiltering = function(isReset)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\t//first expand all the rows so that the indexes of detail items are valid and then collapse the rows after 0 sec.\\r\\n\\t\\t//while this collapsing and expanding happens .. disable the detail component to be called/created for performance.\\r\\n\\t\\tthis.__filteringRendering = true;\\r\\n\\t\\tthis.__nsGrid.__expandCollapseAll(false);\\r\\n\\t\\tsetTimeout(function() {\\r\\n\\t\\t\\tself.__nsGrid.__expandCollapseAll(true);\\r\\n\\t\\t\\tsetTimeout(function(){\\r\\n\\t\\t\\t\\t//reset the flag so that the detail compoent can be created again\\r\\n\\t\\t\\t\\tself.__filteringRendering = false;\\r\\n\\t\\t\\t}, 50);\\r\\n\\t\\t},0);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.arrowClickHandler = function(parentItem,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(!isCollapse && parentItem && parentItem[this.__nsGrid.__fieldHasChild]) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar childIndex = parentItem[this.__nsGrid.__fieldIndex] + 1;\\r\\n\\t\\t\\tvar childItem = this.__nsGrid.__getItemByIndex(childIndex);\\r\\n\\t\\t\\tif(childItem) {\\r\\n\\t\\t\\t\\t/*var childRow = childItem[this.__nsGrid.__fieldRow];\\r\\n\\t\\t\\t\\tif(childRow) {\\r\\n\\t\\t\\t\\t\\tvar childCell = childRow.firstChild;\\r\\n\\t\\t\\t\\t\\tthis.__renderDetailCell(childCell,childItem,item,childRow);\\r\\n\\t\\t\\t\\t}*/\\r\\n\\t\\t\\t\\tthis.expandCollapseHandler(childItem,isCollapse);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.expandCollapseHandler = function(item,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(!isCollapse && item && item[this.__detailIndicatorField]) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar row = item[this.__nsGrid.__fieldRow];\\r\\n\\t\\t\\tif(row) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cell = row.firstChild;\\r\\n\\t\\t\\t\\tthis.__renderDetailCell(cell,item,null,row);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__createBodyBody = function(dataSet,startIndex,endIndex)\\r\\n\\t{\\r\\n\\t    if(dataSet && dataSet.length > 0)\\r\\n\\t    {\\r\\n\\t    \\tfor (var rowIndex = startIndex; rowIndex < endIndex; rowIndex++)\\r\\n\\t\\t    {\\r\\n\\t    \\t\\tvar item = dataSet[rowIndex];\\r\\n\\t    \\t\\tthis.__createRow(item);\\r\\n\\t\\t    }\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__setSourceForAsync = function()\\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__createRowAsync = function(item,index,array)\\r\\n\\t{\\r\\n\\t\\tthis.__createRow(item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__createBodyBodyVirtual = function(dataSet,totalRows,level)\\r\\n\\t{\\r\\n\\t\\tif(dataSet && dataSet.length > 0)\\r\\n\\t    {\\r\\n\\t    \\tif(totalRows > dataSet.length)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\ttotalRows = dataSet.length;\\r\\n\\t    \\t}\\r\\n\\t    \\telse if(this.__nsGrid.__enableVariableRowHeight)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\ttotalRows = totalRows + this.__nsGrid.__extraRowCountForVariableHeight;\\r\\n\\t    \\t}\\r\\n\\t    \\tthis.__createBodyBody(dataSet,0,totalRows);\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__createBody = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__checkForAdditionalColumns = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__setMeasurement = function()\\r\\n\\t{\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__addSVGInPage = function(objSVG)\\r\\n\\t{\\r\\n\\t\\tobjSVG.addPath(\\\"svgArrowDown\\\",this.__ARROW_EXPANDED_PATH,\\\"0 0 16 16\\\");\\r\\n\\t\\tobjSVG.addPath(\\\"svgArrowRight\\\",this.__ARROW_COLLAPSE_PATH,\\\"0 0 16 16\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__setWrapperSource = function(source,offset,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible)\\r\\n\\t{\\r\\n\\t\\tif(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(level === 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!offset)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\toffset = 0;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrFlatHierarchicalSource = [];\\r\\n\\t\\t\\t\\tthis.__rowCounter = offset;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = source.length;\\r\\n\\t\\t\\tvar count = 0;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t/*if(this.__nsGrid.__renderInCachedMode)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\tthis.__rowCounter++;\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__arrFlatHierarchicalSource.push(item);\\r\\n\\t\\t\\t\\t\\tthis.__setRowItemProperty(item,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible);\\r\\n\\t\\t\\t\\t\\tvar colLength = this.__nsGrid.__columns.length;\\r\\n\\t\\t\\t\\t\\tvar arrCellsText = [];\\r\\n\\t\\t\\t\\t\\tfor (var colIndex = 0; colIndex < colLength; colIndex++)\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar colItem = this.__nsGrid.__columns[colIndex];\\r\\n\\t\\t\\t            var cellDiv = this.util.createDiv(null);\\r\\n\\t\\t\\t            this.__nsGrid.__addCellText(null,item,cellDiv,colItem,colIndex);\\r\\n\\t\\t\\t            arrCellsText.push(cellDiv);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t\\t\\titem[this.__nsGrid.__fieldCellText] = arrCellsText;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{*/\\r\\n\\t\\t\\tfor (count = 0; count < length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\tthis.__rowCounter++;\\r\\n\\t\\t\\t\\tthis.__nsGrid.__arrFlatHierarchicalSource.push(item);\\r\\n\\t\\t\\t\\tthis.__setRowItemProperty(item,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t/*useVisibleIndex flag is used when we want to use visible index,generally true for all cases except for expandCollapse all due to performance issues*/  \\r\\n\\tNSMasterDetailGrid.prototype.__resetDataInBody = function(fromIndex,toIndex,fromRowIndex,useVisibleIndex)\\r\\n\\t{\\r\\n\\t\\tif(!fromRowIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfromRowIndex = 0;\\r\\n\\t\\t}\\r\\n\\t\\tvar row = null;\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar arrRows = this.__nsGrid.__tblCenterBodyBody.rows;\\r\\n\\t\\tvar rowLength = arrRows.length;\\r\\n\\t\\tvar length = this.__nsGrid.__arrFlatHierarchicalSource.length;\\r\\n\\t\\tvar indexCount = fromIndex;\\r\\n\\t\\tvar rowCount = fromRowIndex;\\r\\n\\t\\tfor(var count = fromIndex; count < length; count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsGrid.__enableVirtualScroll && useVisibleIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = this.__nsGrid.__getVisibleItemByIndex(this.__nsGrid.__arrFlatHierarchicalSource,count);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = this.__nsGrid.__arrFlatHierarchicalSource[count];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//breaking if item not found as if large data set is rendered and after collapse all the while scrolling after a while item is null still it goes to end of data set which are hidden\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(item[this.__nsGrid.__fieldRowVisible])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(rowLength <= rowCount) // || indexCount > toIndex\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\trow = arrRows[rowCount];\\r\\n\\t\\t\\t\\t\\tthis.__resetRow(row,item);\\r\\n\\t\\t\\t\\t\\tindexCount++;\\r\\n\\t\\t\\t\\t\\trowCount++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tfor(var rowIndex = rowCount;rowIndex < rowLength;rowIndex++)\\r\\n\\t\\t{\\r\\n\\t\\t\\trow = arrRows[rowIndex];\\r\\n\\t\\t\\trow.style.display = \\\"none\\\";\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-index\\\",null);\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-level\\\",null);\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-parent-index\\\",null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__updateCellText = function(row,cell,item,colItem,rowIndex,colIndex)\\r\\n\\t{\\r\\n\\t\\tif(cell && item && colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeAllChildren(cell);\\r\\n\\t\\t\\tvar cellDiv = this.util.createDiv(null);\\r\\n\\t\\t\\tvar divText = this.__setBodyCellProperty(row,cell,cellDiv,item,rowIndex,colItem,colIndex,item[this.__nsGrid.__fieldParentIndex],item[this.__nsGrid.__fieldRowLevel]);\\r\\n\\t\\t\\t//this.__nsGrid.__highlightDiv(divText,colIndex);\\r\\n\\t\\t\\tcell.appendChild(cellDiv);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__getFlatSource = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__nsGrid.__arrFlatHierarchicalSource;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__isCellEditable = function(objColumn,item,cell,cellIndex,row,rowIndex)\\r\\n\\t{\\r\\n\\t\\treturn true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__handleOnDemandClick = function(item,event)\\r\\n\\t{\\r\\n\\t};\\r\\n\\tNSMasterDetailGrid.prototype.__ignoreFieldsForDeepCopy = function()\\r\\n\\t{\\r\\n\\t\\treturn [this.__detailCompInstance, this.__detailCompParentItem];\\r\\n\\t};\\r\\n\\t/********************************End of Common Functions for Grid ****************************************/\\r\\n\\tNSMasterDetailGrid.prototype.__createRow = function(item,itemIndex,isAdd)\\r\\n\\t{\\r\\n\\t\\t// && (!item[this.__detailCompParentItem] || item[this.__detailCompParentItem][this.__nsGrid.__fieldIsCollapsed])\\r\\n\\t\\tif(item && item[this.__nsGrid.__fieldRowVisible])\\r\\n\\t\\t{\\r\\n\\t\\t\\tisAdd = this.util.isUndefinedOrNull(isAdd) ? true : Boolean.parse(isAdd);\\r\\n\\t\\t\\tvar row = this.util.createElement(\\\"TR\\\");\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldRowHtml] = row;\\r\\n\\t\\t\\tvar index = item[this.__nsGrid.__fieldIndex];\\r\\n\\t\\t\\tvar level = item[this.__nsGrid.__fieldRowLevel];\\r\\n\\t\\t\\tvar parentIndex = item[this.__nsGrid.__fieldParentIndex];\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-level\\\",level);\\r\\n\\t\\t\\tif(item[this.__nsGrid.__fieldHasParent])\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\trow.setAttribute(\\\"ns-parent-index\\\",parentIndex);\\r\\n\\t\\t    }\\r\\n\\t\\t\\tthis.__nsGrid.__setBodyRowProperty(row,item,index);\\r\\n\\t\\t\\tthis.__nsGrid.__applyCustomClass(row,\\\"bodyRow\\\");\\r\\n\\t\\t\\tvar colLength = this.__nsGrid.__columns.length;\\r\\n\\t\\t\\tif(item[this.__detailIndicatorField]) {\\r\\n\\t\\t\\t\\tif(!item[this.__detailCell]) {\\r\\n\\t\\t\\t\\t\\tvar cell =  this.__nsGrid.__createBodyRowCell(row,0,true);\\r\\n\\t\\t\\t\\t\\tcell.setAttribute(\\\"colspan\\\",this.__nsGrid.__columns.length);\\r\\n\\t\\t\\t\\t\\tvar cellDiv = cell.firstChild;\\r\\n\\t\\t\\t\\t\\tif(this.__masterDetailHeight > 0) {\\r\\n\\t\\t\\t\\t\\t\\tcell.style.height = this.__masterDetailHeight + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t\\tcellDiv.style.height = \\\"100%\\\";\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse {\\r\\n\\t\\t\\t\\t\\t\\tcell.style.height = \\\"auto\\\";\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(item[this.__detailCompElement]) {\\r\\n\\t\\t\\t\\t\\t\\tcellDiv.appendChild(item[this.__detailCompElement]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse {\\r\\n\\t\\t\\t\\t\\t\\t//this.__renderDetailCell(cell,item,null,row);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\titem[this.__detailCell] = cell;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse {\\r\\n\\t\\t\\t\\t\\trow.appendChild(item[this.__detailCell]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse {\\r\\n\\t\\t\\t\\tfor (var colIndex = 0; colIndex < colLength; colIndex++)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\tvar colItem = this.__nsGrid.__columns[colIndex];\\r\\n\\t\\t\\t\\t\\tvar cell =  this.__nsGrid.__createBodyRowCell(row,colIndex,true);\\r\\n\\t\\t            var cellDiv = cell.firstChild;\\r\\n\\t\\t            var divText = this.__setBodyCellProperty(row,cell,cellDiv,item,index,colItem,colIndex,parentIndex,level);\\r\\n\\t\\t            //this.__nsGrid.__highlightDiv(divText,colIndex);\\r\\n\\t\\t            cell.appendChild(cellDiv);\\r\\n\\t\\t            this.__nsGrid.__setBodyCellProperties.bind(this.__nsGrid)(cell);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(isAdd)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar addRow = true;\\r\\n\\t\\t\\t\\tif(!this.util.isUndefinedOrNull(itemIndex) && itemIndex > 0 && this.__nsGrid.__tblCenterBodyBody.children \\r\\n\\t\\t\\t\\t\\t\\t&& this.__nsGrid.__tblCenterBodyBody.children.length >= itemIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar prevRow = this.__nsGrid.__tblCenterBodyBody.children[itemIndex - 1]; //this.__nsGrid.__getRowByIndex(itemIndex);\\r\\n\\t\\t\\t\\t\\tif(prevRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__nsGrid.__tblCenterBodyBody.insertBefore(row,prevRow);\\r\\n\\t\\t\\t\\t\\t\\taddRow = false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(addRow)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__tblCenterBodyBody.appendChild(row);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__nsGrid.__createFixedBodyRow(row);\\r\\n\\t\\t\\treturn row;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__updateRow = function(row,item)\\r\\n\\t{\\r\\n\\t\\tif(row && item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar index = item[this.__nsGrid.__fieldIndex];\\r\\n\\t\\t\\tvar level = item[this.__nsGrid.__fieldRowLevel];\\r\\n\\t\\t\\tvar parentIndex = item[this.__nsGrid.__fieldParentIndex];\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\trow.setAttribute(\\\"ns-level\\\",level);\\r\\n\\t\\t\\tif(item[this.__nsGrid.__fieldHasParent])\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\trow.setAttribute(\\\"ns-parent-index\\\",parentIndex);\\r\\n\\t\\t    }\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trow.setAttribute(\\\"ns-parent-index\\\",null);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(item[this.__nsGrid.__fieldSelected])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(row,this.__nsGrid.__CLASS_SELECTED_ROW);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(row,this.__nsGrid.__CLASS_SELECTED_ROW);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar cells = row.cells;\\r\\n\\t\\t\\tfor (var colIndex = 0; colIndex < this.__nsGrid.__columns.length; colIndex++)\\r\\n\\t        {\\r\\n\\t\\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t\\t\\tvar colItem = this.__nsGrid.__columns[colIndex];\\r\\n\\t\\t\\t\\tthis.__updateCellText(row,cell,item,colItem,index,colIndex);\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__setRowItemProperty = function(item,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar totalRowCount = this.__rowCounter;\\r\\n\\t\\t\\tif(setFieldIndex || this.util.isUndefinedOrNull(item[this.__nsGrid.__fieldIndex]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldIndex] = totalRowCount;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldVisibleIndex] = totalRowCount;\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldRowLevel] = level;\\r\\n\\t\\t\\tvar hasChild = false;\\r\\n\\t\\t\\tif((item[this.__nsGrid.__childField] && item[this.__nsGrid.__childField].length > 0))\\r\\n\\t\\t    {\\r\\n\\t\\t    \\thasChild = true;\\r\\n\\t\\t    \\tthis.__setWrapperSource(item[this.__nsGrid.__childField],0,totalRowCount,level + 1,setFieldIndex,setIsCollapsed,setItemVisible);\\r\\n\\t\\t    }\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldParentIndex] = parentIndex;\\r\\n\\t\\t\\tif(parentIndex > -1)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldHasParent] = true;\\r\\n\\t\\t    }\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldHasParent] = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem[this.__nsGrid.__fieldHasChild] = hasChild;\\r\\n\\t\\t\\tif(setItemVisible || this.util.isUndefinedOrNull(item[this.__nsGrid.__fieldRowVisible]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldRowVisible] = true;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setIsCollapsed || this.util.isUndefinedOrNull(item[this.__nsGrid.__fieldIsCollapsed]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__nsGrid.__fieldIsCollapsed] = true;//Boolean.parse(item[this.__detailIndicatorField]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__setBodyCellProperty = function(row,cell,cellDiv,item,currentIndex,colItem,colIndex,parentIndex,level)\\r\\n\\t{\\r\\n\\t\\tvar hierarchicalPadding = 0;\\r\\n\\t\\tvar divText = null;\\r\\n\\t\\tif(colItem && colItem.hasOwnProperty(\\\"dataField\\\") && colItem[\\\"dataField\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(colIndex == 0 && item[this.__nsGrid.__childField]  && item[this.__nsGrid.__childField].length > 0)\\r\\n\\t        {\\r\\n\\t        \\tthis.util.addStyleClass(cellDiv,this.__nsGrid.__CLASS_GROUP_CELL);\\r\\n\\t        \\tthis.__nsGrid.__createArrow(item,currentIndex,cellDiv,item[this.__nsGrid.__fieldIsCollapsed],colItem);\\r\\n\\t        \\tvar cellText = this.util.createDiv(null,this.__nsGrid.__CLASS_CELL_CHILD);\\r\\n\\t        \\tcellText.style.verticalAlign = \\\"top\\\";\\r\\n\\t        \\tdivText = cellText;\\r\\n\\t        \\tif(this.__nsGrid.__renderInCachedMode)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar arrCellsText = item[this.__nsGrid.__fieldCellText];\\r\\n\\t        \\t\\tcellText.innerHTML = arrCellsText[colIndex].outerHTML;\\r\\n\\t        \\t}\\r\\n\\t        \\telse\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tthis.__nsGrid.__addCellText(row,item,cellText,colItem,colIndex);\\r\\n\\t        \\t}\\r\\n\\t        \\tthis.util.addStyleClass(cellText,\\\"nsGroupCellText\\\");\\r\\n\\t        \\tcellDiv.appendChild(cellText);\\r\\n\\t        }\\r\\n\\t        else\\r\\n\\t        {\\r\\n\\t        \\tthis.util.addStyleClass(cellDiv,this.__nsGrid.__CLASS_CELL_CHILD);\\r\\n\\t        \\tif(this.__nsGrid.__renderInCachedMode)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar arrCellsText = item[this.__nsGrid.__fieldCellText];\\r\\n\\t        \\t\\tcellDiv.innerHTML = arrCellsText[colIndex].outerHTML;\\r\\n\\t        \\t}\\r\\n\\t        \\telse\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tthis.__nsGrid.__addCellText(row,item,cellDiv,colItem,colIndex);\\r\\n\\t        \\t}\\r\\n\\t        \\tdivText = cellDiv;\\r\\n\\t        \\t//24 = 16(Arrow Width) + 6(Arrow Parent Padding) + 2(cellDiv horizontalGap between elements shown in debugger)\\r\\n\\t        \\thierarchicalPadding = 24;\\r\\n\\t        }\\r\\n\\t        if(colIndex == 0)\\r\\n\\t        {\\r\\n\\t        \\tvar paddingLeft = (10 * level) + hierarchicalPadding;\\r\\n\\t        \\tif(level === 0 || !this.__nsGrid.__showExpandCollapseIcon)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tpaddingLeft += 2;\\r\\n\\t        \\t}\\r\\n\\t        \\tcell.style.paddingLeft = paddingLeft + \\\"px\\\";\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t\\tthis.__nsGrid.__addPriorityClassInCell(cell,colItem);\\r\\n\\t\\treturn divText;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__createArrow = function(compArrow,objSVG,arrowID,isCollapsed,item,colItem)\\r\\n\\t{\\r\\n\\t\\t if(this.__nsGrid.__isRowExpansionIconCustom())\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.__setArrowDirection(compArrow,isCollapsed,colItem);\\r\\n\\t\\t }\\r\\n\\t\\t else\\r\\n\\t\\t {\\r\\n\\t\\t\\t var svg = objSVG.addSVG(compArrow,arrowID + \\\"svg\\\",this.__CLASS_ARROW,null,null,null,null,null,null,true);\\r\\n\\t\\t\\t this.util.addStyleClass(svg,this.__CLASS_ARROW + \\\"Theme\\\");\\r\\n\\t\\t\\t if(isCollapsed)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t objSVG.addUse(svg,arrowID + \\\"use\\\",null,\\\"#svgArrowRight\\\");\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t else\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t objSVG.addUse(svg,arrowID + \\\"use\\\",null,\\\"#svgArrowDown\\\");\\r\\n\\t\\t\\t }\\r\\n\\t\\t }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__setArrowDirection = function(compArrow,isCollapsed,colItem)\\r\\n\\t{\\r\\n\\t\\tif(this.__nsGrid.__isRowExpansionIconCustom())\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCollapsed)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompArrow.innerHTML = this.__nsGrid.__getCustomIcon(\\\"rowCollapsed\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompArrow.innerHTML = this.__nsGrid.__getCustomIcon(\\\"rowExpanded\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = compArrow.getAttribute(\\\"id\\\") + \\\"use\\\";\\r\\n\\t\\t\\tif(isCollapsed)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#svgArrowRight\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#svgArrowDown\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__resetRow = function(row,item)\\r\\n\\t{\\r\\n\\t\\tvar index = item[this.__nsGrid.__fieldIndex];\\r\\n\\t\\trow.style.display = \\\"\\\";\\r\\n\\t\\trow.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\titem[this.__nsGrid.__fieldRowHtml] = row;\\r\\n\\t\\tthis.__updateRow(row,item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__addRowsforScrollPagination = function(fromRecord,toRecord,pageSize)\\r\\n\\t{\\r\\n\\t\\tvar arrArray = this.__nsGrid.__arrFlatHierarchicalSource.slice(fromRecord,toRecord + 1); \\r\\n\\t\\tthis.__nsGrid.__addRemoveRowCallInternal = true;\\r\\n\\t\\tthis.__nsGrid.addRows(arrArray);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__addRowsforPagePagination = function(fromRecord,toRecord,pageSize)\\r\\n\\t{\\r\\n\\t\\t//slice returns index range from fromRecord to toRecord - 1 hence adding 1 \\r\\n\\t\\t//this.__nsGrid.__arrInternalSource = this.__nsGrid.__arrWrapper.slice(fromRecord,toRecord + 1);\\r\\n\\t\\tthis.__nsGrid.__resetDataInBody(fromRecord,toRecord);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__addChildrenToSource = function(arrSource)\\r\\n\\t{\\r\\n\\t\\tif(arrSource) {\\r\\n\\t\\t\\tfor(var count = 0;count < arrSource.length;count++) {\\r\\n\\t\\t\\t\\tvar item = arrSource[count];\\r\\n\\t\\t\\t\\tif(!item[this.__nsGrid.__childField] || !item[this.__nsGrid.__childField].length) {\\r\\n\\t\\t\\t\\t\\tvar hasChildren = this.__hasChildren(item);\\r\\n\\t\\t\\t\\t\\tif(hasChildren) {\\r\\n\\t\\t\\t\\t\\t\\tvar childItem = this.util.cloneObject(item, true);\\r\\n\\t\\t\\t\\t\\t\\tchildItem[this.__detailIndicatorField] = true;\\r\\n\\t\\t\\t\\t\\t\\t//only call detail component when its not between filtering\\r\\n\\t\\t\\t\\t\\t\\tif(!this.__filteringRendering) {\\r\\n\\t\\t\\t\\t\\t\\t\\tchildItem[this.__detailCompInstance] = this.__getRendererInstance(item);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tchildItem[this.__detailCompParentItem] = item;\\r\\n\\t\\t\\t\\t\\t\\titem[this.__nsGrid.__childField] = [childItem];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__getRendererInstance = function(parentItem)\\r\\n\\t{\\r\\n\\t\\tvar objRenderer = null;\\r\\n\\t\\tif(this.__masterDetailColumns && this.__masterDetailColumns.length) \\r\\n\\t\\t{\\r\\n\\t\\t\\tobjRenderer = this.__getGridRenderer(this,this.__masterDetailColumns,this.__masterDetailGridSetting);\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tobjRenderer = new this.__masterDetailDetailRenderer();\\r\\n\\t\\t}\\r\\n\\t\\treturn objRenderer;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__hasChildren = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item) {\\r\\n\\t\\t\\tif(item.hasOwnProperty(this.__masterDetailHasChildField)) {\\r\\n\\t\\t\\t\\treturn Boolean.parse(item[this.__masterDetailHasChildField]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__masterDetailHasChildCallback) {\\r\\n\\t\\t\\t\\treturn this.__masterDetailHasChildCallback(item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__renderDetailCell = function(cell,item,parentItem,row)\\r\\n\\t{\\r\\n\\t\\tif(cell && item) {\\r\\n\\t\\t\\tif(!parentItem) {\\r\\n\\t\\t\\t\\tparentItem = item[this.__detailCompParentItem];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar compInstance = item[this.__detailCompInstance];\\r\\n\\t\\t\\tvar cellDiv = cell.firstChild;\\r\\n\\t        this.util.addStyleClass(cellDiv,\\\"nsBodyDataGridCellMasterDetailCon\\\");\\r\\n\\t        var params = {};\\r\\n\\t        if(this.__masterDetailDetailRendererParam) {\\r\\n\\t        \\tparams = this.util.cloneObject(this.__masterDetailDetailRendererParam,true);\\r\\n\\t        }\\r\\n\\t        params.masterData = parentItem;\\r\\n\\t        params.container = cellDiv;\\r\\n\\t        params.cell = cell;\\r\\n\\t        params.row = row;\\r\\n\\t        params.rowIndex = item[this.__nsGrid.__fieldIndex];\\r\\n\\t        //only call detail component when its not between filtering\\r\\n\\t        if(compInstance && !this.__filteringRendering) {\\r\\n\\t\\t        if(!item[this.__detailCompElement] || !compInstance.renderEverytime || compInstance.renderEverytime(params)) {\\r\\n\\t\\t        \\tvar callback = function() {\\r\\n\\t\\t        \\t\\tvar childComp = this.__callComponentFunction(compInstance,\\\"getElement\\\",null,null,true);\\r\\n\\t\\t\\t\\t        //var childComp = compInstance.getElement();\\r\\n\\t\\t\\t\\t        cellDiv.innerHTML = \\\"\\\";\\r\\n\\t\\t\\t\\t        cellDiv.appendChild(childComp);\\r\\n\\t\\t\\t\\t        item[this.__detailCompElement] = childComp;\\r\\n\\t\\t\\t\\t        this.__callComponentFunction(compInstance,\\\"elementAdded\\\",params,null,false);\\r\\n\\t\\t        \\t};\\r\\n\\t\\t        \\tvar res = this.__callComponentFunction(compInstance,\\\"init\\\",params,null,true);\\r\\n\\t\\t        \\tthis.util.resolveFunctionOrPromise(res,callback.bind(this));\\r\\n\\t\\t        }\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__callComponentFunction = function(compIns,functionRef,param,defaultValue,throwError)\\r\\n\\t{\\r\\n\\t\\tif(compIns && compIns[functionRef] && this.util.isFunction(compIns[functionRef]))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = null;\\r\\n\\t\\t\\tvar retValue = null;\\r\\n\\t\\t\\tif(param && this.util.isArray(param) && param.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = compIns[functionRef].apply(null,param);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = compIns[functionRef](param);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(retValue))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse if(throwError) {\\r\\n\\t\\t\\tthis.util.throwNSError(\\\"NSGrid\\\",\\\"Function \\\" + functionRef + \\\" should be present in detail renderer.\\\");\\r\\n\\t\\t}\\r\\n\\t\\treturn defaultValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMasterDetailGrid.prototype.__getGridRenderer = function(parent,columns,setting) \\r\\n\\t{\\r\\n\\t\\tfunction GridRenderer() {\\r\\n\\t\\t  this.con = null;\\r\\n\\t\\t  this.gridCon = null;\\r\\n\\t\\t  this.params = null;\\r\\n\\t\\t  this.item = null;\\r\\n\\t\\t  this.objGrid = null;\\r\\n\\t\\t  this.arrSource = [];\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tGridRenderer.prototype.init = function(params) {\\r\\n\\t\\t\\tthis.params = parent.util.cloneObject(params);\\r\\n\\t\\t\\tthis.item = params.masterData;\\r\\n\\t\\t\\tif(parent.__masterDetailGridDetailHtmlCallback) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar html = parent.__masterDetailGridDetailHtmlCallback(params);\\r\\n\\t\\t\\t\\tif(html) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar objComp = parent.util.getReferenceFromHtml(html);\\r\\n\\t\\t\\t\\t\\tif(objComp.refs && objComp.refs[\\\"detailGrid\\\"]) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.con = objComp.element;\\r\\n\\t\\t\\t\\t\\t\\tthis.gridCon = objComp.refs[\\\"detailGrid\\\"];\\r\\n\\t\\t\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.con = parent.util.createElement(\\\"div\\\");\\r\\n\\t\\t\\tthis.con.style.height = \\\"100%\\\";\\r\\n\\t\\t\\tthis.gridCon = this.con;\\r\\n\\t\\t\\tvar container = params.container;\\r\\n\\t\\t\\tparent.util.addStyleClass(container,\\\"nsMasterDetailGridContainer\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tGridRenderer.prototype.getElement = function() {\\r\\n\\t\\t  \\treturn this.con;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tGridRenderer.prototype.elementAdded = function(params) {\\r\\n\\t\\t\\tthis.__getGridObject();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tGridRenderer.prototype.renderEverytime = function(params) {\\r\\n\\t\\t\\tif(parent.__masterDetailDoesGridRefreshEverytimeCallback) {\\r\\n\\t\\t\\t\\treturn parent.__masterDetailDoesGridRefreshEverytimeCallback(params);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t};\\r\\n\\t\\t//private function\\r\\n\\t\\tGridRenderer.prototype.__setGridSource = function(arrSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.arrSource = arrSource;\\r\\n\\t\\t\\tthis.objGrid.dataSource.call(this.objGrid,this.arrSource);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tGridRenderer.prototype.__getGridObject = function(arrSource) {\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar masterItem = this.item;\\r\\n\\t\\t\\tthis.objGrid = new NSGrid(this.gridCon,setting);\\r\\n\\t\\t\\tthis.objGrid.setColumn(columns);\\r\\n\\t\\t\\tthis.params.gridContainer = this.gridCon;\\r\\n\\t\\t\\tthis.params.setDataSource = this.__setGridSource.bind(this);\\r\\n\\t\\t\\tparent.__masterDetailGetDataSourceCallback(this.params);\\r\\n\\t\\t\\treturn this.objGrid;\\r\\n\\t\\t};\\r\\n\\t\\treturn new GridRenderer();\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSMasterDetailGrid;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSMasterDetailGrid\\\",NSMasterDetailGrid);\\\"use strict\\\";\\r\\nvar NSGridEditor = (function()\\r\\n{\\r\\n\\tvar NSGridEditor = function(nsGrid)\\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid = nsGrid;\\r\\n\\t\\tthis.util = this.__nsGrid.util;\\r\\n\\t\\t\\r\\n\\t\\tthis.__config = {editType:NSGrid.EDITOR_EDITTYPE_CELL,clickType:NSGrid.EDITOR_EDITING_DOUBLECLICK,stopEditingOnGridFocusOut:false,enableMultipleEdit:false};\\r\\n\\t\\tthis.__defaultCellSetting = {type:NSGrid.EDITOR_TYPE_TEXT,params:null,customEditor:null,validator:null,isCellEditableCallback:null};\\r\\n\\t\\t\\r\\n\\t\\tthis.__table = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__objEditor = {};\\r\\n\\t\\tthis.__tblClickRef = null;\\r\\n\\t\\tthis.__tblEventRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsGrid.__enableEditable)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar editorSetting = this.__nsGrid.__editorSetting;\\r\\n\\t\\t\\t\\tif(!editorSetting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\teditorSetting = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\t\\teditType:editorSetting.editType || this.__config.editType,\\r\\n\\t\\t\\t\\t\\t\\tclickType:editorSetting.clickType || this.__config.clickType,\\r\\n\\t\\t\\t\\t\\t\\tstopEditingOnGridFocusOut: Boolean.parse(editorSetting.stopEditingOnGridFocusOut),\\r\\n\\t\\t\\t\\t\\t\\tenableMultipleEdit: Boolean.parse(editorSetting.enableMultipleEdit)\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.__table = this.__nsGrid.__tblCenterBody;\\r\\n\\t\\t\\t\\tif(this.__config.editType != NSGrid.EDITOR_EDITING_NOCLICK)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t//if(!this.__tblClickRef)\\r\\n\\t\\t\\t\\t\\t//{\\r\\n\\t\\t\\t\\t\\t\\tthis.__tblClickRef = this.__tblClickHandler.bind(this);\\r\\n\\t\\t\\t\\t\\t\\tthis.util.addEvent(this.__table,\\\"click\\\", this.__tblClickRef);\\r\\n\\t\\t\\t\\t\\t//}\\r\\n\\t\\t\\t\\t\\t//if(!this.__tblEventRef)\\r\\n\\t\\t\\t\\t\\t//{\\r\\n\\t\\t\\t\\t\\t\\tvar mouseEvent = this.__getMouseEventType();\\r\\n\\t\\t\\t\\t\\t\\tthis.__tblEventRef = this.__tblEventHandler.bind(this);\\r\\n\\t\\t\\t\\t\\t\\tthis.util.addEvent(this.__table,mouseEvent, this.__tblEventRef);\\r\\n\\t\\t\\t\\t\\t//}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__documentKeyEventRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__documentKeyEventRef = this.__documentKeyEventHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document,\\\"keydown\\\", this.__documentKeyEventRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__config.stopEditingOnGridFocusOut)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__listenInternalEvent(\\\"blur\\\",this.__tblBlurHandler.bind(this));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.edit = function(element,rowIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\telement = this.__getElement(element,rowIndex);\\r\\n\\t\\t\\tif(element)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__handleEditors(element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.cancelEdit = function(element,rowIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\telement = this.__getElement(element,rowIndex);\\r\\n\\t\\t\\tthis.__callCancelForEditors(element);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.saveEdit = function(element,rowIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\telement = this.__getElement(element,rowIndex);\\r\\n\\t\\t\\tthis.__callSaveForEditors(element);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t/*\\r\\n\\t\\t * returns array of key and value\\r\\n\\t\\t * if element is null then it returns all editor instances\\r\\n\\t\\t */\\r\\n\\t\\tthis.getEditorInstances = function(element,rowIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\telement = this.__getElement(element,rowIndex);\\r\\n\\t\\t\\treturn this.__getAllEditors(element);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.processColumnObject = function(objColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(objColumn)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!objColumn.hasOwnProperty(\\\"enableEditable\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjColumn.enableEditable = this.__nsGrid.__enableEditable;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(objColumn[\\\"editorSetting\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(!objColumn[\\\"editorSetting\\\"].hasOwnProperty(\\\"type\\\") || !objColumn[\\\"editorSetting\\\"][\\\"type\\\"])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tobjColumn[\\\"editorSetting\\\"][\\\"type\\\"] = this.__defaultCellSetting.type;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(objColumn[\\\"editorSetting\\\"].hasOwnProperty(\\\"customEditor\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar customEditor = objColumn[\\\"editorSetting\\\"][\\\"customEditor\\\"];\\r\\n\\t\\t\\t\\t\\t\\tif (typeof customEditor === \\\"string\\\" || customEditor instanceof String)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(this.util.isFunction(customEditor))\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tobjColumn[\\\"editorSetting\\\"][\\\"customEditor\\\"] = this.__nsGrid.__context[customEditor];\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.isOtherKeyNavigationValid = function(event,cell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar hasFocus = false;\\r\\n\\t\\t\\tif(this.__config.editType == NSGrid.EDITOR_EDITTYPE_CELL)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\thasFocus = this.__hasCellFocus(cell);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar row = this.util.findParent(cell,\\\"TR\\\");\\r\\n\\t\\t\\t\\thasFocus = this.__hasRowFocus(row);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn !hasFocus;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.resetVariables = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objEditor = {};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentKeyEventHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__hasEditor())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t    \\tvar keyCode = this.util.KEYCODE;\\r\\n\\t\\t    \\tif (event.keyCode == keyCode.ENTER) \\r\\n\\t\\t      \\t{\\r\\n\\t\\t    \\t\\tthis.__callSaveForEditors();\\r\\n\\t\\t      \\t}\\r\\n\\t\\t      \\telse if (event.keyCode == keyCode.TAB) \\r\\n\\t\\t      \\t{\\r\\n\\t\\t      \\t\\tthis.__callSaveForEditors();\\r\\n\\t\\t      \\t\\tevent.preventDefault();\\r\\n\\t\\t      \\t}\\r\\n\\t\\t      \\telse if (event.keyCode == keyCode.ESC) \\r\\n\\t\\t      \\t{\\r\\n\\t\\t      \\t\\tthis.__callCancelForEditors();\\r\\n\\t\\t      \\t\\tthis.__callDestroyForRowEditors();\\r\\n\\t\\t        \\tevent.preventDefault();\\r\\n\\t\\t      \\t}\\r\\n\\t\\t    \\tthis.__callRowEditorsFunction(\\\"handleKeyDown\\\",[event,event.keyCode]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t/*\\r\\n\\t\\t * for editType = cell \\r\\n\\t\\t * combination can be this.__getElement(cellIndex,rowIndex),this.__getElement(cell),this.__getElement(dataField,rowIndex)\\r\\n\\t\\t * \\r\\n\\t\\t * for editType = row \\r\\n\\t\\t * combination can be this.__getElement(rowIndex),this.__getElement(row)\\r\\n\\t\\t * \\r\\n\\t\\t */\\r\\n\\t\\t\\r\\n\\t\\tthis.__getElement = function(element,rowIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = null;\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(element))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__config.editType == NSGrid.EDITOR_EDITTYPE_CELL)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.util.isNumber(element))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(this.util.isUndefinedOrNull(rowIndex))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tvar row = this.__nsGrid.__getRowByIndex(parseInt(rowIndex));\\r\\n\\t\\t\\t\\t\\t\\tif(row && row.cells && row.cells.length > element)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tretValue = row.cells[element];\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if(this.util.isElement(element))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(element.nodeName == \\\"TD\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tretValue = element;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if(this.util.isString(element))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(this.util.isUndefinedOrNull(rowIndex))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tvar cellIndex = this.__nsGrid.__getColumnIndexByObject(this.__nsGrid.__getColumnObjectByDataField(element));\\r\\n\\t\\t\\t\\t\\t\\tif(!this.util.isUndefinedOrNull(cellIndex))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar row = this.__nsGrid.__getRowByIndex(parseInt(rowIndex));\\r\\n\\t\\t\\t\\t\\t\\t\\tif(row && row.cells && row.cells.length > cellIndex)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tretValue = row.cells[cellIndex];\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.util.isNumber(element))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue = this.__nsGrid.__getRowByIndex(element);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if(this.util.isElement(element))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(element.nodeName == \\\"TR\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tretValue = element;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tretValue = this.util.findParent(element,\\\"TR\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t//in this case row will be blank as through dataField we cannot fetch row \\r\\n\\t\\t\\t\\t\\telse if(this.util.isString(element))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__tblClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\tvar parentType = this.__getTargetType();\\r\\n\\t\\t\\tvar parent = this.util.findParent(target,parentType);\\r\\n\\t\\t\\tif(parent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrRowIndexes = Object.keys(this.__objEditor);\\r\\n\\t\\t\\t\\tif(arrRowIndexes && arrRowIndexes.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(!this.__config.enableMultipleEdit)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(parentType == \\\"TR\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t//same row clicked so just return;\\r\\n\\t\\t\\t\\t\\t\\t\\tvar objEditors = this.__getEditorsForRow(parent);\\r\\n\\t\\t\\t\\t\\t\\t\\tif(objEditors)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar arrCellIndex = Object.keys(objEditors);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tif(arrCellIndex && arrCellIndex.length > 0)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t/*var cellIndex = arrCellIndex[0];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tvar cellItem = objEditors[cellIndex];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tcellItem.editor.setFocus();*/\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tthis.__commitRowEditorChanges();\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t//same cell clicked so just return;\\r\\n\\t\\t\\t\\t\\t\\t\\tvar editor = this.__getEditor(null,parent);\\r\\n\\t\\t\\t\\t\\t\\t\\tif(editor)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\teditor.setFocus();\\r\\n\\t\\t\\t\\t\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tthis.__commitRowEditorChanges();\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__tblEventHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\tvar parentType = this.__getTargetType();\\r\\n\\t\\t\\tvar parent = this.util.findParent(target,parentType);\\r\\n\\t\\t\\tif(parent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__handleEditors(parent);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__tblBlurHandler = function(event,detail)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__callSaveForEditors();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__popUpWrapperMouseDownHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__hasCellFocus = function(cell,editor)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar hasFocus = false;\\r\\n\\t\\t\\teditor = cell ? this.__getEditor(null,cell) : editor;\\r\\n\\t\\t\\tif(editor)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar element = editor.getElement();\\r\\n\\t\\t\\t\\tvar hasFocusFunction = editor.hasFocus;\\r\\n\\t\\t\\t\\tif(hasFocusFunction && this.util.isFunction(hasFocusFunction))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\thasFocus = hasFocusFunction(); \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\thasFocus = (element === document.activeElement);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn hasFocus;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__hasRowFocus = function(row)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(row)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrEditor = this.__getOnlyEditors(row);\\r\\n\\t\\t\\t\\tif(arrEditor && arrEditor.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < arrEditor.length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar hasFocus = this.__hasCellFocus(null,arrEditor[count]);\\r\\n\\t\\t\\t\\t\\t\\tif(hasFocus)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar activeElement = document.activeElement;\\r\\n\\t\\t\\t\\t\\tif(activeElement)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar activeRow = this.util.findParent(activeElement,\\\"TR\\\");\\r\\n\\t\\t\\t\\t\\t\\tif(activeRow && activeRow == row)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleEditors = function(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(element.nodeName == \\\"TD\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__handleCellEditor(element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__handleRowEditors(element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__callSaveForEditors = function(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(element && element.nodeName == \\\"TD\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callSaveForEditor(element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callSaveForRowEditors(element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__callCancelForEditors = function(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(element && element.nodeName == \\\"TD\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callCancelForEditor(element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callCancelForRowEditors(element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleRowEditors = function(row)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(row)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrCells = row.cells;\\r\\n\\t\\t\\t\\tif(arrCells && arrCells.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < arrCells.length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__handleCellEditor(arrCells[count]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__commitRowEditorChanges = function(row)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrEditor = this.__getOnlyEditors(row);\\r\\n\\t\\t\\tif(arrEditor && arrEditor.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrEditor.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__commitEditorChanges(null,arrEditor[count]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__callSaveForRowEditors = function(row)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrEditor = this.__getOnlyEditors(row);\\r\\n\\t\\t\\tif(arrEditor && arrEditor.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrEditor.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__callSaveForEditor(null,arrEditor[count]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__callCancelForRowEditors = function(row)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrEditor = this.__getOnlyEditors(row);\\r\\n\\t\\t\\tif(arrEditor && arrEditor.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrEditor.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__callCancelForEditor(null,arrEditor[count]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__callDestroyForRowEditors = function(row)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrEditor = this.__getOnlyEditors(row);\\r\\n\\t\\t\\tif(arrEditor && arrEditor.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrEditor.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__callDestroyForEditor(null,arrEditor[count]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__callRowEditorsFunction = function(functionRef,param,defaultValue,row)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrEditor = this.__getOnlyEditors(row);\\r\\n\\t\\t\\tif(arrEditor && arrEditor.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrEditor.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__callEditorFunction(arrEditor[count],functionRef,param,defaultValue,true);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__hasEditor = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrEditor = this.__getOnlyEditors();\\r\\n\\t\\t\\tif(arrEditor && arrEditor.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getOnlyEditors = function(row)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrRet = [];\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(row))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrEditor = this.__getAllEditors();\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrEditor.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar cellItem = arrEditor[count];\\r\\n\\t\\t\\t\\t\\tarrRet.push(cellItem.editor);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isNumber(row))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow = this.__nsGrid.__getRowByIndex(row);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar objEditors = this.__getEditorsForRow(row);\\r\\n\\t\\t\\t\\tif(objEditors)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var cellIndex in objEditors)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar cellItem = objEditors[cellIndex];\\r\\n\\t\\t\\t\\t\\t\\tarrRet.push(cellItem.editor);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrRet;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getAllEditors = function(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrRet = [];\\r\\n\\t\\t\\tif(this.__objEditor)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(element)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(element.nodeName == \\\"TD\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\telement = this.util.findParent(element,\\\"TR\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(element)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar objEditors = this.__getEditorsForRow(element);\\r\\n\\t\\t\\t\\t\\t\\tif(objEditors)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar rowIndex = parseInt(element.getAttribute(\\\"ns-index\\\"));\\r\\n\\t\\t\\t\\t\\t\\t\\tvar itemInfo = this.__nsGrid.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t\\t\\t\\t\\tfor(var cellIndex in objEditors)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar cellItem = rowItem[cellIndex];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar colInfo = this.__nsGrid.__getColumnObject(cellIndex);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tarrRet.push({rowIndex: rowIndex,item: itemInfo,cellIndex: cellIndex,colInfo: colInfo,cellItem: cellItem,editor: cellItem.editor});\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var rowIndex in this.__objEditor)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar rowItem = this.__objEditor[rowIndex];\\r\\n\\t\\t\\t\\t\\t\\tvar itemInfo = this.__nsGrid.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t\\t\\t\\tfor(var cellIndex in rowItem)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar cellItem = rowItem[cellIndex];\\r\\n\\t\\t\\t\\t\\t\\t\\tvar colInfo = this.__nsGrid.__getColumnObject(cellIndex);\\r\\n\\t\\t\\t\\t\\t\\t\\tarrRet.push({rowIndex: rowIndex,item: itemInfo,cellIndex: cellIndex,colInfo: colInfo,cellItem: cellItem,editor: cellItem.editor});\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrRet;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleCellEditor = function(cell,event,item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(cell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar editor = this.__getEditor(null,cell);\\r\\n\\t\\t\\t\\tif(!editor)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar colIndex = cell.cellIndex;\\r\\n\\t\\t\\t\\t\\tvar objColumn = this.__nsGrid.__getColumnObject(colIndex);\\r\\n\\t\\t\\t\\t\\tif(objColumn && objColumn.enableEditable)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar row = cell.parentNode;\\r\\n\\t\\t\\t\\t\\t\\tvar rowIndex = this.__nsGrid.__getIndexFromRow(row);\\r\\n\\t\\t\\t\\t\\t\\tif(!item)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\titem = this.__nsGrid.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(this.__isCellEditable(objColumn,item,cell,colIndex,row,rowIndex))\\r\\n\\t\\t\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar callback = function(row,cell,editor)\\r\\n\\t\\t\\t\\t\\t\\t    \\t{\\r\\n\\t\\t\\t\\t\\t\\t    \\t\\tthis.__insertEditorInObj(editor,row,cell);\\r\\n\\t\\t\\t\\t\\t\\t    \\t};\\r\\n\\t\\t\\t\\t\\t\\t    \\tthis.__createEditor(cell,objColumn,row,rowIndex,item,callback.bind(this,row,cell));\\r\\n\\t\\t\\t\\t\\t\\t    \\t\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tif(event)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createEditor = function(cell,objColumn,row,rowIndex,item,paramCallback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar createPopUpWrapper = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar container = document.body;\\r\\n\\t\\t      \\tvar wrapper = self.util.createDiv(null,\\\"nsGridEditorPopUp\\\");\\r\\n\\t\\t      \\tcontainer.appendChild(wrapper);\\r\\n\\t\\t      \\treturn wrapper;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar addChildInPopUp = function(element,parent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparent.appendChild(element);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar addChild = function(element)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivChild.innerHTML = \\\"\\\";\\r\\n\\t\\t\\t\\tdivChild.appendChild(element);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar commitChanges = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__callSaveForEditor.call(self,cell,editor);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar cancelChanges = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__callCancelForEditor.call(self,cell,editor);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar position = this.__getPosition(cell);\\r\\n\\t\\t\\tvar editorSetting = this.__getEditorSetting(objColumn);\\r\\n\\t\\t\\tvar divChild = cell.querySelector(\\\".\\\" + this.__nsGrid.__CLASS_CELL_CHILD);\\r\\n\\t\\t    var currentValue = item[objColumn.dataField];\\r\\n\\t\\t\\tvar editorFunction = this.__getEditorFunction(editorSetting);\\r\\n\\t\\t\\tvar setting = {cell:cell,row:row,item:item,rowIndex:rowIndex,cellIndex:cell.cellIndex,position:position,defaultValue:currentValue,\\r\\n\\t\\t\\t\\t\\tcommitChanges:commitChanges,cancelChanges:cancelChanges,validator:editorSetting.validator,setting:editorSetting,column:objColumn,api:this.__nsGrid};\\r\\n\\t\\t\\tvar callback = function(editorFunction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar editor = new editorFunction();\\r\\n\\t\\t\\t\\tvar retVal = editor.init(setting);\\r\\n\\t\\t\\t\\tvar initCallback = function(bodyCompInstance)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar element = editor.getElement();\\r\\n\\t\\t\\t\\t\\tvar isPopUp = editor.isPopUp();\\r\\n\\t\\t\\t\\t\\tvar popUpWrapper = null;\\r\\n\\t\\t\\t\\t\\tif(isPopUp)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tpopUpWrapper = createPopUpWrapper();\\r\\n\\t\\t\\t\\t\\t\\tpopUpWrapper.style.top = (position.top - 5) + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t\\tpopUpWrapper.style.left = (position.left - 5) + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t\\tthis.__callEditorFunction(editor,\\\"setPopUpWrapper\\\",popUpWrapper,null,false);\\r\\n\\t\\t\\t\\t\\t\\taddChildInPopUp(element,popUpWrapper);\\r\\n\\t\\t\\t\\t\\t\\tif(this.__config.stopEditingOnGridFocusOut)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t//stop propagation of event on document level so that pop up is not closed\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.util.addEvent(popUpWrapper,\\\"mousedown\\\", this.__popUpWrapperMouseDownHandler.bind(this));\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__nsGrid.__addTouchEvent(popUpWrapper);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\taddChild(element);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__callEditorFunction(editor,\\\"elementAdded\\\",null,null,false);\\r\\n\\t\\t\\t\\t\\tvar config = {cell:cell,row:row,divChild:divChild,setting:editorSetting,column:objColumn,item:item,isPopUp:isPopUp,element:element,popUpWrapper:popUpWrapper};\\r\\n\\t\\t\\t\\t\\teditor[this.__getAttributeKey(\\\"config\\\")] = config;\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.util.resolveFunctionOrPromise(retVal,initCallback.bind(this));\\r\\n\\t\\t\\t\\tparamCallback && paramCallback(editor);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tthis.util.resolveFunctionOrPromise(editorFunction,callback.bind(this));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isCellEditable = function(objColumn,item,cell,cellIndex,row,rowIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsGrid.__isCellEditable(objColumn,item,cell,cellIndex,row,rowIndex))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar editorSetting = this.__getEditorSetting(objColumn);\\r\\n\\t\\t\\t\\tif(editorSetting && editorSetting.isCellEditableCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn editorSetting.isCellEditableCallback(objColumn,item,cell,cellIndex,row,rowIndex,item[this.__nsGrid.__fieldRowLevel]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__callSaveForEditor = function(cell,editor)\\r\\n\\t\\t{\\r\\n\\t\\t\\teditor = cell ? this.__getEditor(null,cell) : editor;\\r\\n\\t\\t\\tif(editor)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callEditorFunction(editor,\\\"save\\\",null,null,false);\\r\\n\\t\\t\\t\\tthis.__commitEditorChanges(cell,editor);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.warning(\\\"NSGrid\\\",\\\"Editor For cell could not be found\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__callCancelForEditor = function(cell,editor)\\r\\n\\t\\t{\\r\\n\\t\\t\\teditor = cell ? this.__getEditor(null,cell) : editor;\\r\\n\\t\\t\\tif(editor)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callEditorFunction(editor,\\\"cancel\\\",null,null,false);\\r\\n\\t\\t\\t\\tvar config = editor[this.__getAttributeKey(\\\"config\\\")];\\r\\n\\t\\t\\t\\tvar cell = config.cell;\\r\\n\\t\\t\\t\\tvar row = config.row;\\r\\n\\t\\t\\t\\tvar objColumn = config.column;\\r\\n\\t\\t\\t\\tvar item = config.item;\\r\\n\\t\\t\\t\\tvar editorSetting = config.setting;\\r\\n\\t\\t\\t\\tvar setValue = item[objColumn.dataField];\\r\\n\\t\\t\\t\\tthis.__setCellValue(cell,setValue,item,row,objColumn,editorSetting);\\r\\n\\t\\t\\t\\tthis.__callDestroyForEditor(cell,editor);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.warning(\\\"NSGrid\\\",\\\"Editor For cell could not be found\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__callDestroyForEditor = function(cell,editor)\\r\\n\\t\\t{\\r\\n\\t\\t\\teditor = cell ? this.__getEditor(null,cell) : editor;\\r\\n\\t\\t\\tif(editor)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__callEditorFunction(editor,\\\"destroy\\\",null,null,false);\\r\\n\\t\\t\\t\\tvar config = editor[this.__getAttributeKey(\\\"config\\\")];\\r\\n\\t\\t\\t\\tvar element = null;\\r\\n\\t\\t\\t\\tif(config.isPopUp)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\telement = config.popUpWrapper;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\telement = editor.getElement();\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(element && element.parentNode)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t\\t\\t\\telement.parentNode.removeChild(element);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t\\t\\tthis.__deleteEditor(null,cell,editor);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.warning(\\\"NSGrid\\\",\\\"Editor For cell could not be found\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__commitEditorChanges = function(cell,editor)\\r\\n\\t\\t{\\r\\n\\t\\t\\teditor = cell ? this.__getEditor(null,cell) : editor;\\r\\n\\t\\t\\tif(editor)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tvar destroyEditor = function()\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.__callDestroyForEditor.call(self,cell);\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tvar config = editor[this.__getAttributeKey(\\\"config\\\")];\\r\\n\\t\\t\\t\\tvar cell = config.cell;\\r\\n\\t\\t\\t\\tvar row = config.row;\\r\\n\\t\\t\\t\\tvar objColumn = config.column;\\r\\n\\t\\t\\t\\tvar item = config.item;\\r\\n\\t\\t\\t\\tvar editorSetting = config.setting;\\r\\n\\t\\t\\t\\tvar value = editor.getValue();\\r\\n\\t\\t\\t\\tvar isValid = this.__callEditorFunction(editor,\\\"validate\\\",null,true,false);\\r\\n\\t\\t\\t\\tif(isValid)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar setValue = item[objColumn.dataField];\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\tvar hasValueChanged = this.__callEditorFunction(editor,\\\"hasValueChanged\\\",setValue,null,null,false);\\r\\n\\t\\t\\t\\t\\tif(hasValueChanged == null)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\thasValueChanged = !(setValue === value);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tdestroyEditor();\\r\\n\\t\\t\\t\\t\\tif(hasValueChanged)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetValue = value;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__setCellValue(cell,setValue,item,row,objColumn,editorSetting);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//this.util.warning(\\\"NSGrid\\\",\\\"Editor For cell could not be found\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__callEditorFunction = function(editor,functionRef,param,defaultValue,checkCellFocus)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(editor && editor[functionRef] && this.util.isFunction(editor[functionRef]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcheckCellFocus = Boolean.parse(checkCellFocus);\\r\\n\\t\\t\\t\\tif(!checkCellFocus || this.__hasCellFocus(null,editor))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar retValue = null;\\r\\n\\t\\t\\t\\t\\t/*var config = editor[this.__getAttributeKey(\\\"config\\\")];\\r\\n\\t\\t\\t\\t\\tif(config)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tconsole.log(config.column.dataField + \\\" :: \\\" + config.item[config.column.dataField]);\\r\\n\\t\\t\\t\\t\\t}*/\\r\\n\\t\\t\\t\\t\\tvar retValue = null;\\r\\n\\t\\t\\t\\t\\tif(param && this.util.isArray(param) && param.length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue = editor[functionRef].apply(null,param);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue = editor[functionRef](param);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(!this.util.isUndefinedOrNull(retValue))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn defaultValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setCellValue = function(cell,newValue,item,row,objColumn,editorSetting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(cell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar colIndex = cell.cellIndex;\\r\\n\\t\\t\\t\\tvar rowIndex = this.__nsGrid.__getIndexFromRow(row);\\r\\n\\t\\t\\t\\tvar currentValue = item[objColumn.dataField];\\r\\n\\t\\t\\t\\titem[objColumn.dataField] = newValue;\\r\\n\\t\\t\\t\\tthis.__nsGrid.updateItemInDataSource(item);\\r\\n\\t\\t\\t\\tthis.__nsGrid.updateRowByIndex(rowIndex);\\r\\n\\t\\t\\t\\tthis.__nsGrid.__dispatchEvent(NSGrid.EDITOR_CELL_VALUE_CHANGED,cell,{cellIndex:colIndex,rowIndex:rowIndex,cell:cell,row:row,newValue:newValue,oldValue:currentValue,item:item});\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getAttributeKey = function(key)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn \\\"__\\\" + this.__nsGrid.__fieldPrefix + \\\"_\\\" + key;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getPosition = function(element) \\r\\n\\t\\t{\\r\\n\\t\\t      var position = {\\r\\n\\t\\t        top: element.offsetTop,\\r\\n\\t\\t        left: element.offsetLeft,\\r\\n\\t\\t        bottom: 0,\\r\\n\\t\\t        right: 0,\\r\\n\\t\\t        width: this.util.getOuterWidth(element),\\r\\n\\t\\t        height: this.util.getOuterHeight(element),\\r\\n\\t\\t        visible: true};\\r\\n\\t\\t      position.bottom = position.top + position.height;\\r\\n\\t\\t      position.right = position.left + position.width;\\r\\n\\t\\r\\n\\t\\t      // walk up the tree\\r\\n\\t\\t      var offsetParent = element.offsetParent;\\r\\n\\t\\t      while ((element = element.parentNode) != document.body) \\r\\n\\t\\t      {\\r\\n\\t\\t        if (position.visible && element.scrollHeight != element.offsetHeight && this.util.getStyleValue(element,\\\"overflowY\\\",false) != \\\"visible\\\") \\r\\n\\t\\t        {\\r\\n\\t\\t          \\tposition.visible = position.bottom > element.scrollTop && position.top < element.scrollTop + element.clientHeight;\\r\\n\\t\\t        }\\r\\n\\t\\t        if (position.visible && element.scrollWidth != element.offsetWidth && this.util.getStyleValue(element,\\\"overflowX\\\",false) != \\\"visible\\\") \\r\\n\\t\\t        {\\r\\n\\t\\t          \\tposition.visible = position.right > element.scrollLeft && position.left < element.scrollLeft + element.clientWidth;\\r\\n\\t\\t        }\\r\\n\\t\\t        position.left -= element.scrollLeft;\\r\\n\\t\\t        position.top -= element.scrollTop;\\r\\n\\t\\t        if (element === offsetParent) \\r\\n\\t\\t        {\\r\\n\\t\\t          \\tposition.left += element.offsetLeft;\\r\\n\\t\\t          \\tposition.top += element.offsetTop;\\r\\n\\t\\t          \\toffsetParent = element.offsetParent;\\r\\n\\t\\t        }\\r\\n\\t\\t        position.bottom = position.top + position.height;\\r\\n\\t\\t        position.right = position.left + position.width;\\r\\n\\t\\t      }\\r\\n\\t\\r\\n\\t\\t      return position;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getMouseEventType = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = \\\"dblclick\\\";\\r\\n\\t\\t\\tswitch(this.__config.clickType)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase NSGrid.EDITOR_EDITING_SINGLECLICK:\\r\\n\\t\\t\\t\\t\\tretValue = \\\"click\\\";\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase NSGrid.EDITOR_EDITING_DOUBLECLICK:\\r\\n\\t\\t\\t\\t\\tretValue = \\\"dblclick\\\";\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase NSGrid.EDITOR_EDITING_NOCLICK:\\r\\n\\t\\t\\t\\t\\tretValue = \\\"\\\";\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getEditorSetting = function(objColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar editorSetting = objColumn.editorSetting;\\r\\n\\t\\t\\tif(!editorSetting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\teditorSetting = this.__defaultCellSetting;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn editorSetting;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getEditorFunction = function(editorSetting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retFunction = null;\\r\\n\\t\\t\\tif(editorSetting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tswitch(editorSetting.type)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcase NSGrid.EDITOR_TYPE_TEXT:\\r\\n\\t\\t\\t\\t\\t\\tretFunction = this.__nsTextEditor;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase NSGrid.EDITOR_TYPE_TEXTAREA:\\r\\n\\t\\t\\t\\t\\t\\tretFunction = this.__nsTextAreaEditor;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase NSGrid.EDITOR_TYPE_CUSTOM:\\r\\n\\t\\t\\t\\t\\t\\tretFunction = editorSetting.customEditor;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retFunction;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getTargetType = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.editType == NSGrid.EDITOR_EDITTYPE_ROW)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn \\\"TR\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn \\\"TD\\\";\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__insertEditorInObj = function(editor,row,cell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getRowCellInfo(row,cell);\\r\\n\\t\\t\\tif(item && item.cellIndex > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.__config.enableMultipleEdit)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar parentType = this.__getTargetType();\\r\\n\\t\\t\\t\\t\\tif(parentType == \\\"TR\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(this.__objEditor[item.rowIndex] && this.__objEditor[item.rowIndex][item.cellIndex])\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__objEditor[item.rowIndex][item.cellIndex] = {};\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__objEditor = {};\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__objEditor[item.rowIndex])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__objEditor[item.rowIndex] = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__objEditor[item.rowIndex][item.cellIndex])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__objEditor[item.rowIndex][item.cellIndex] = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__objEditor[item.rowIndex][item.cellIndex].editor)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__objEditor[item.rowIndex][item.cellIndex].editor = editor;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getEditor = function(row,cell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getRowCellInfo(row,cell);\\r\\n\\t\\t\\tif(item && item.cellIndex > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__objEditor && this.__objEditor[item.rowIndex] && this.__objEditor[item.rowIndex][item.cellIndex] && this.__objEditor[item.rowIndex][item.cellIndex].editor)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn this.__objEditor[item.rowIndex][item.cellIndex].editor;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getEditorsForRow = function(row)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getRowCellInfo(row,null);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__objEditor && this.__objEditor[item.rowIndex])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn this.__objEditor[item.rowIndex];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__deleteEditor = function(row,cell,editor)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(editor)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcell = cell ? cell : this.util.findParent(editor.getElement(),\\\"TD\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar item = this.__getRowCellInfo(row,cell);\\r\\n\\t\\t\\tif(item && item.cellIndex > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__objEditor && this.__objEditor[item.rowIndex] && this.__objEditor[item.rowIndex][item.cellIndex] && this.__objEditor[item.rowIndex][item.cellIndex].editor)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdelete this.__objEditor[item.rowIndex][item.cellIndex];\\r\\n\\t\\t\\t\\t\\tvar objKeys = Object.keys(this.__objEditor[item.rowIndex]);\\r\\n\\t\\t\\t\\t\\tif(!objKeys || objKeys.length == 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdelete this.__objEditor[item.rowIndex];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__deleteEditorsForRow = function(row)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getRowCellInfo(row,null);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__objEditor && this.__objEditor[item.rowIndex])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar rowEditors = this.__objEditor[item.rowIndex];\\r\\n\\t\\t\\t\\t\\tfor(var cellIndex in rowEditors)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(rowEditors[cellIndex].editor)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdelete rowEditors[cellIndex].editor;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getRowCellInfo = function(row,cell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar getInfo = function(rowIndex,cellIndex,rowRet,cellRet)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar itemInfo = self.__nsGrid.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t\\tvar colInfo = self.__nsGrid.__getColumnObject(cellIndex);\\r\\n\\t\\t\\t\\treturn {rowIndex: rowIndex,cellIndex: cellIndex,rowInfo: itemInfo,colInfo: colInfo,row: rowRet,cell: cellRet};\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(row) && !this.util.isUndefinedOrNull(cell))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar rowIndex = -1;\\r\\n\\t\\t\\t\\tvar cellIndex = -1;\\r\\n\\t\\t\\t\\tvar rowRet = null;\\r\\n\\t\\t\\t\\tvar cellRet = null;\\r\\n\\t\\t\\t\\tif(this.util.isElement(row))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trowIndex = parseInt(row.getAttribute(\\\"ns-index\\\"));\\r\\n\\t\\t\\t\\t\\trowRet = row;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.util.isNumber(row))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trowIndex = parseInt(row);\\r\\n\\t\\t\\t\\t\\trowRet = this.__nsGrid.__getRowByIndex(rowIndex);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.util.isElement(cell))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcellIndex = parseInt(cell.cellIndex);\\r\\n\\t\\t\\t\\t\\tcellRet = cell;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.util.isNumber(cell))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcellIndex = parseInt(cell);\\r\\n\\t\\t\\t\\t\\tcellRet = rowRet.cells[cellIndex];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar retItem = getInfo(rowIndex,cellIndex,rowRet,cellRet);\\r\\n\\t\\t\\t\\treturn retItem;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(!this.util.isUndefinedOrNull(cell))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar rowIndex = -1;\\r\\n\\t\\t\\t\\tvar cellIndex = -1;\\r\\n\\t\\t\\t\\tvar rowRet = null;\\r\\n\\t\\t\\t\\tvar cellRet = null;\\r\\n\\t\\t\\t\\tif(this.util.isElement(cell))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcellIndex = parseInt(cell.cellIndex);\\r\\n\\t\\t\\t\\t\\tcellRet = cell;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.util.isNumber(cell))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcellIndex = parseInt(cell);\\r\\n\\t\\t\\t\\t\\tcellRet = rowRet.cells[cellIndex];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\trowRet = cellRet.parentElement;\\r\\n\\t\\t\\t\\trowIndex = parseInt(rowRet.getAttribute(\\\"ns-index\\\"));\\r\\n\\t\\t\\t\\tvar retItem = getInfo(rowIndex,cellIndex,rowRet,cellRet);\\r\\n\\t\\t\\t\\treturn retItem;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\telse if(!this.util.isUndefinedOrNull(row))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar rowIndex = -1;\\r\\n\\t\\t\\t\\tvar rowRet = null;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tif(this.util.isElement(row))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trowIndex = parseInt(row.getAttribute(\\\"ns-index\\\"));\\r\\n\\t\\t\\t\\t\\trowRet = row;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.util.isNumber(row))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trowIndex = parseInt(row);\\r\\n\\t\\t\\t\\t\\trowRet = this.__nsGrid.__getRowByIndex(rowIndex);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar itemInfo = this.__nsGrid.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t\\treturn {rowIndex: rowIndex,cellIndex: -1,rowInfo: itemInfo,colInfo: null,row: rowRet,cell: null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n    \\r\\n\\t\\tthis.__destroy = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__tblClickRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__removeTouchEvent(this.__table);\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__table,\\\"click\\\", this.__tblClickRef);\\r\\n\\t\\t\\t\\tthis.__tblClickRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__tblEventRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar mouseEvent = this.__getMouseEventType();\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__table,mouseEvent, this.__tblEventRef);\\r\\n\\t\\t\\t\\tthis.__tblEventRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tif(this.__documentKeyEventRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(document,\\\"keydown\\\", this.__documentKeyEventRef);\\r\\n\\t\\t\\t\\tthis.__documentKeyEventRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__nsTextEditor = function() \\r\\n\\t\\t{\\r\\n\\t\\t    var input;\\r\\n\\t\\t    var defaultValue;\\r\\n\\t\\t    var setting = null;\\r\\n\\t\\t    var self = this;\\r\\n\\t\\t    var util = new NSUtil();\\r\\n\\t\\t    \\r\\n\\t\\t    this.init = function(config) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tsetting = config;\\r\\n\\t\\t    \\tvar editorSetting = setting.setting;\\r\\n\\t\\t    \\tvar params = this.__getParams(editorSetting.params);\\r\\n\\t\\t    \\tinput = util.createElement(\\\"input\\\",null,\\\"nsTextEditor\\\"); \\r\\n\\t\\t    \\tdefaultValue = setting.defaultValue;\\r\\n\\t\\t      \\tinput.value = defaultValue;\\r\\n\\t\\t      \\tinput.style.width = \\\"98%\\\";\\r\\n\\t\\t      \\tif(params.cssClass)\\r\\n\\t\\t      \\t{\\r\\n\\t\\t      \\t\\tutil.addStyleClass(input,params.cssClass);\\r\\n\\t\\t      \\t}\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.getElement = function()\\r\\n\\t\\t    {\\r\\n\\t\\t    \\treturn input;\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.elementAdded = function()\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tutil.addEvent(input,\\\"click\\\",function(event){\\r\\n\\t\\t    \\t\\tevent = util.getEvent(event);\\r\\n\\t\\t    \\t\\tself.setFocus();\\r\\n\\t\\t    \\t\\t//the below line stops propagation and hence document click handler is not fired in handleCellSelector\\r\\n\\t\\t    \\t\\t//event.stopPropagation();\\r\\n\\t\\t    \\t\\t//event.stopImmediatePropagation();\\r\\n\\t\\t    \\t\\tevent.preventDefault();\\r\\n\\t\\t    \\t});\\r\\n\\t\\t    \\tinput.focus();\\r\\n\\t\\t      \\tinput.select();\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.handleKeyDown = function(event,keyCode) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar objKeyCode = util.KEYCODE;\\r\\n\\t\\t    \\tif (keyCode == objKeyCode.LEFT && keyCode == objKeyCode.RIGHT) \\r\\n\\t\\t      \\t{\\r\\n\\t\\t    \\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t      \\t} \\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.getValue = function() \\r\\n\\t\\t    {\\r\\n\\t\\t      \\treturn input.value;\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.destroy = function() \\r\\n\\t\\t    {\\r\\n\\t\\t    \\t\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.setFocus = function()\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tinput.focus();\\r\\n\\t\\t    \\t//setTimeout(function(){input.selectionStart = input.selectionEnd = 10000; }, 0);\\r\\n\\t\\t    \\tinput.selectionEnd = input.selectionStart = input.value.length;\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.hasValueChanged = function(currentValue) \\r\\n\\t\\t    {\\r\\n\\t\\t      \\treturn (!(input.value == \\\"\\\" && currentValue == null)) && (input.value != currentValue);\\r\\n\\t\\t    };\\r\\n\\t\\t\\t\\r\\n\\t\\t    this.validate = function() \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tif(setting.validator)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\treturn setting.validator(input,input.value);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t      \\treturn true;\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.isPopUp = function()\\r\\n\\t\\t    {\\r\\n\\t\\t    \\treturn false;\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.save = function() \\r\\n\\t\\t    {\\r\\n\\t\\t    \\t\\r\\n\\t\\t    };\\r\\n\\t\\r\\n\\t\\t    this.cancel = function() \\r\\n\\t\\t    {\\r\\n\\t\\t      \\tinput.value = defaultValue;\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.setPopUpWrapper = function(popUpWrapper) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\t\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.__getParams = function(params)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tif(!params)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tparams = {};\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tparams = {\\r\\n\\t\\t    \\t\\tcssClass: params.cssClass || null,\\r\\n\\t\\t    \\t};\\r\\n\\t\\t    \\t\\r\\n\\t\\t    \\treturn params;\\r\\n\\t\\t    };\\r\\n\\t\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__nsTextAreaEditor = function() \\r\\n\\t\\t{\\r\\n\\t\\t    var input, wrapper, parentWrapper;\\r\\n\\t\\t    var defaultValue;\\r\\n\\t\\t    var util = new NSUtil();\\r\\n\\t\\t    var setting = null;\\r\\n\\t\\t    var self = this;\\r\\n\\t\\t\\t\\r\\n\\t\\t    this.init = function (config) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tsetting = config;\\r\\n\\t\\t    \\tvar editorSetting = setting.setting;\\r\\n\\t\\t    \\tvar params = this.__getParams(editorSetting.params);\\r\\n\\t\\t      \\twrapper = util.createDiv(null,\\\"nsGridTextAreaEditor\\\");\\r\\n\\t\\t      \\tinput = util.createElement(\\\"textarea\\\",null,\\\"nsGridTextArea\\\"); \\r\\n\\t\\t      \\tif(params.cssClass.textArea)\\r\\n\\t\\t      \\t{\\r\\n\\t\\t      \\t\\tutil.addStyleClass(input,params.cssClass.textArea);\\r\\n\\t\\t      \\t}\\r\\n\\t\\t      \\tinput.setAttribute(\\\"hidefocus\\\",true);\\r\\n\\t\\t      \\tinput.setAttribute(\\\"rows\\\",params.rows);\\r\\n\\t\\t      \\twrapper.appendChild(input);\\r\\n\\t\\t      \\twrapper.appendChild(document.createElement(\\\"br\\\"));\\r\\n\\t\\t      \\tvar buttonWrapper = util.createDiv(null);\\r\\n\\t\\t      \\tbuttonWrapper.style.textAlign = \\\"right\\\";\\r\\n\\t\\t      \\twrapper.appendChild(buttonWrapper);\\r\\n\\t\\t      \\tvar btnSave = util.createElement(\\\"button\\\",null,params.cssClass.saveButton);\\r\\n\\t\\t      \\tbtnSave.appendChild(document.createTextNode(params.saveButtonText));\\r\\n\\t\\t      \\tutil.addEvent(btnSave,\\\"click\\\",this.__saveHandler);\\r\\n\\t\\t      \\tbuttonWrapper.appendChild(btnSave);\\r\\n\\t\\t      \\tbuttonWrapper.appendChild(document.createTextNode(\\\" \\\"));\\r\\n\\t\\t      \\tvar btnCancel = util.createElement(\\\"button\\\",null,params.cssClass.cancelButton);\\r\\n\\t\\t      \\tbtnCancel.appendChild(document.createTextNode(params.cancelButtonText));\\r\\n\\t\\t      \\tbuttonWrapper.appendChild(btnCancel);\\r\\n\\t\\t      \\tutil.addEvent(btnCancel,\\\"click\\\",this.__cancelHandler);\\r\\n\\t\\t      \\tdefaultValue = setting.defaultValue;\\r\\n\\t\\t      \\tinput.value = defaultValue;\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.getElement = function()\\r\\n\\t\\t    {\\r\\n\\t\\t    \\treturn wrapper;\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.elementAdded = function()\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tinput.focus();\\r\\n\\t\\t      \\tinput.select();\\r\\n\\t\\t    };\\r\\n\\t\\r\\n\\t\\t    this.handleKeyDown = function(event,keyCode) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tevent = util.getEvent(event);\\r\\n\\t\\t    \\tvar objKeyCode = util.KEYCODE;\\r\\n\\t\\t      \\tif (keyCode == objKeyCode.ENTER && event.ctrlKey) \\r\\n\\t\\t      \\t{\\r\\n\\t\\t        \\tself.save();\\r\\n\\t\\t      \\t} \\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.getValue = function() \\r\\n\\t\\t    {\\r\\n\\t\\t      \\treturn input.value;\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.destroy = function() \\r\\n\\t\\t    {\\r\\n\\t\\t    \\t\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.setFocus = function()\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tinput.focus();\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.hasFocus = function()\\r\\n\\t\\t    {\\r\\n\\t\\t    \\treturn input === document.activeElement;\\r\\n\\t\\t    };\\r\\n\\t\\r\\n\\t\\t    this.hasValueChanged = function(currentValue) \\r\\n\\t\\t    {\\r\\n\\t\\t      \\treturn (!(input.value == \\\"\\\" && currentValue == null)) && (input.value != currentValue);\\r\\n\\t\\t    };\\r\\n\\t\\r\\n\\t\\t    this.validate = function() \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tif(setting.validator)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\treturn setting.validator(input,input.value);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t      \\treturn true;\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.isPopUp = function()\\r\\n\\t\\t    {\\r\\n\\t\\t    \\treturn true;\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.save = function () \\r\\n\\t\\t    {\\r\\n\\t\\t    \\t\\r\\n\\t\\t    };\\r\\n\\t\\r\\n\\t\\t    this.cancel = function () \\r\\n\\t\\t    {\\r\\n\\t\\t      \\tinput.value = defaultValue;\\r\\n\\t\\t      \\t\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.setPopUpWrapper = function(popUpWrapper) \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tparentWrapper = popUpWrapper;\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    //non framework function\\r\\n\\t\\t    this.__saveHandler = function(event)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tsetting.commitChanges();\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.__cancelHandler = function(event)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tsetting.cancelChanges();\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t    this.__getParams = function(params)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tif(!params)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tparams = {};\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tif(!params.cssClass)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\t params.cssClass = {};\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tvar cssClass = {\\r\\n\\t\\t    \\t\\t\\ttextArea: params.cssClass[\\\"textArea\\\"] || null,\\r\\n\\t\\t    \\t\\t\\tsaveButton: params.cssClass[\\\"saveButton\\\"] || null,\\r\\n\\t\\t    \\t\\t\\tcancelButton: params.cssClass[\\\"cancelButton\\\"] || null\\r\\n\\t\\t    \\t};\\r\\n\\t\\t    \\tparams = {\\r\\n\\t\\t    \\t\\trows: params.rows || 5,\\r\\n\\t\\t    \\t\\tcssClass: cssClass,\\r\\n\\t\\t    \\t\\tsaveButtonText: params.saveButtonText || \\\"Save\\\",\\r\\n\\t\\t    \\t\\tcancelButtonText: params.cancelButtonText || \\\"Cancel\\\",\\r\\n\\t\\t    \\t};\\r\\n\\t\\t    \\t\\r\\n\\t\\t    \\treturn params;\\r\\n\\t\\t    };\\r\\n\\t\\t    \\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\treturn NSGridEditor;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSGridEditor\\\",NSGridEditor);\\r\\n\\r\\nvar NSGridKeyboard = (function()\\r\\n{\\r\\n\\tvar NSGridKeyboard = function(nsGrid)\\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid = nsGrid;\\r\\n\\t\\tthis.util = this.__nsGrid.util;\\r\\n\\t\\t\\r\\n\\t\\tvar self = this;\\r\\n\\t\\t\\r\\n\\t\\tthis.keyDownHandler = function(event,keyCode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isShiftCtrlPressed = this.__nsGrid.__isShiftPressed || this.__nsGrid.__isCtrlPressed;\\r\\n\\t\\t\\tvar source = this.__nsGrid.__objGrid.__getFlatSource();\\r\\n\\t\\t\\t//key Up\\r\\n\\t\\t\\tif(keyCode === this.util.KEYCODE.UP && isShiftCtrlPressed && this.__enableMultipleSelection)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__nsGrid.__lastNavigationDirection && this.__nsGrid.__lastNavigationDirection === this.__nsGrid.NAVIGATION_DOWN)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.__nsGrid.NAVIGATION_UP);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__nsGrid.__selectedIndex != 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__selectedIndex--;\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__navigationIndex--;\\r\\n\\t\\t\\t\\t\\twhile(!this.__nsGrid.__isMouseHoverAllowed(this.__nsGrid.__selectedIndex))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__nsGrid.__selectedIndex--;\\r\\n\\t\\t\\t\\t\\t\\tthis.__nsGrid.__navigationIndex--;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.__nsGrid.NAVIGATION_UP);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//key down\\r\\n\\t\\t\\telse if(keyCode === this.util.KEYCODE.DOWN && isShiftCtrlPressed && this.__nsGrid.__enableMultipleSelection)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__nsGrid.__lastNavigationDirection && this.__nsGrid.__lastNavigationDirection === this.__nsGrid.NAVIGATION_UP)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.__nsGrid.NAVIGATION_DOWN);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(source && this.__nsGrid.__selectedIndex != source.length - 1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__selectedIndex++;\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__navigationIndex++;\\r\\n\\t\\t\\t\\t\\twhile(!this.__nsGrid.__isMouseHoverAllowed(this.__nsGrid.__selectedIndex))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__nsGrid.__selectedIndex++;\\r\\n\\t\\t\\t\\t\\t\\tthis.__nsGrid.__navigationIndex++;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.__nsGrid.NAVIGATION_DOWN);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(keyCode === this.__nsGrid.util.KEYCODE.UP)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(source && this.__nsGrid.__navigationIndex === -1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__navigationIndex = source.length - 1;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__nsGrid.__navigationIndex > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn this.__keyBoardNavigationHandler(event,this.__nsGrid.NAVIGATION_UP);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(keyCode === this.util.KEYCODE.DOWN)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(source)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn this.__keyBoardNavigationHandler(event,this.__nsGrid.NAVIGATION_DOWN);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(keyCode === this.util.KEYCODE.ENTER)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__clearAllRowSelection(false);\\r\\n\\t\\t\\t\\tvar row = this.__getkeyboardNavigationRow();\\r\\n\\t\\t\\t\\tif(row)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__markRowSelected(this.__nsGrid.__getIndexFromRow(row));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__keyBoardNavigationHandler = function(event,direction)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar lastIndex = this.__nsGrid.__navigationIndex;\\r\\n\\t\\t\\tvar currentIndex = this.__nsGrid.__navigationIndex;\\r\\n\\t\\t\\t(direction === this.__nsGrid.NAVIGATION_UP) ? currentIndex--:currentIndex++;\\r\\n\\t\\t\\twhile(!this.__nsGrid.__isMouseHoverAllowed(currentIndex))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t(direction === this.__nsGrid.NAVIGATION_UP) ? currentIndex--:currentIndex++;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar endHandler = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__nsGrid.__navigationIndex = currentIndex;\\r\\n\\t\\t\\t\\tvar row = self.__getkeyboardNavigationRow();\\r\\n\\t\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tif(row)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar source = self.__nsGrid.__objGrid.__getFlatSource();\\r\\n\\t\\t\\t\\t\\tindex = self.__nsGrid.__getIndexFromRow(row);\\r\\n\\t\\t\\t\\t\\titem = self.__nsGrid.__getItemByIndex(index, source);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tself.__nsGrid.__dispatchEvent(NSGrid.ROW_NAVIGATED,item,{rowIndex:index,item:item,row:row});\\r\\n\\t\\t\\t\\tself.__nsGrid.__lastNavigationDirection = null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(this.__nsGrid.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar virtualHandler = function()\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = self.__nsGrid.__getVisibleItemByIndex.call(self.__nsGrid,null,currentIndex);\\r\\n\\t\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar index = item[self.__nsGrid.__fieldIndex];\\r\\n\\t\\t\\t\\t\\t\\tself.__setVirtualRowHoverField.call(self,index);\\r\\n\\t\\t\\t\\t\\t\\tself.__virtualRowHover.call(self);\\r\\n\\t\\t\\t\\t\\t\\tendHandler();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.__nsGrid.scrollToIndex(currentIndex,false);\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tsetTimeout(function()\\r\\n\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\tvirtualHandler();\\r\\n\\t\\t\\t\\t},0);\\r\\n\\t\\t\\t\\t//this.__setVirtualRowHover(currentIndex);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar row = this.__nsGrid.__getRowFromContainer(lastIndex);\\r\\n\\t\\t\\t\\tvar currentRow = this.__nsGrid.__getRowFromContainer(currentIndex);\\r\\n\\t\\t\\t\\tif(currentRow)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeStyleClass(row,\\\"nsRowHover\\\");\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(currentRow,\\\"nsRowHover\\\");\\r\\n\\t\\t\\t\\t\\tthis.__refreshScrollPosition(currentRow,direction);\\r\\n\\t\\t\\t\\t\\tendHandler();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__keyBoardSelectionHandler = function(event,direction)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar selectedIndex = this.__nsGrid.__selectedIndex;\\r\\n\\t\\t\\tif(this.__nsGrid.__isRowSelected(selectedIndex))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__markRowUnselected(selectedIndex);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__markRowSelected(selectedIndex);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(direction === this.__nsGrid.NAVIGATION_DOWN)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__nsGrid.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.scrollToIndex(selectedIndex,false);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(Math.floor(selectedIndex % this.__nsGrid.__pageSize) === 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar row = this.__nsGrid.__getRowByIndex(selectedIndex);\\r\\n\\t\\t\\t\\t\\tthis.__refreshScrollPosition(row,this.__nsGrid.NAVIGATION_DOWN);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(direction === this.__nsGrid.NAVIGATION_UP)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__nsGrid.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.scrollToIndex(selectedIndex,false);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar row = this.__nsGrid.__getRowByIndex(selectedIndex);\\r\\n\\t\\t\\t\\t\\tthis.__refreshScrollPosition(row,this.__nsGrid.NAVIGATION_UP);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__nsGrid.__lastNavigationDirection = direction;\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__refreshScrollPosition = function(row,direction)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__isElementInView(row))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__scrollToRow(row,direction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isElementInView = function(row)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cellBottom = 0;\\r\\n\\t\\t    var parentBottom = 0;\\r\\n\\t\\t    var cellTop = 0;\\r\\n\\t\\t    var parentTop = 0;\\r\\n\\t\\t\\tif(row)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar scrollParent = this.__nsGrid.__divCenterTableBodyContainer;\\r\\n\\t\\t\\t\\tvar listChild = row;//.querySelector(\\\".nsListChild\\\");\\r\\n\\t\\t\\t\\tif(scrollParent && listChild)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar cellRect = listChild.getBoundingClientRect();\\r\\n\\t\\t            parentTop = 0;\\r\\n\\t\\t            var rectScrollParent = scrollParent.getBoundingClientRect();\\r\\n\\t\\t            parentBottom = rectScrollParent.height;\\r\\n\\t\\t            cellTop =  cellRect.top - rectScrollParent.top;\\r\\n\\t\\t            cellBottom = cellTop + cellRect.height;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn cellBottom <= parentBottom && cellTop >= parentTop;\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__scrollToRow = function(row,direction)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(row)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar scrollParent = this.__nsGrid.__divCenterTableBodyContainer;\\r\\n\\t\\t\\t\\tvar rowRect = row.getBoundingClientRect();\\r\\n\\t\\t\\t\\tvar currentScroll = scrollParent.scrollTop;\\r\\n\\t\\t\\t\\tscrollParent.scrollTop = (direction === this.__nsGrid.NAVIGATION_UP) ? (currentScroll - rowRect.height) : (currentScroll + rowRect.height);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t/*if(row)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar scrollParent = this.__nsGrid.__divCenterTableBodyContainer;\\r\\n\\t\\t\\t\\tvar rowRect = row.getBoundingClientRect();\\r\\n\\t\\t\\t\\tvar rowTop = rowRect.top;\\r\\n\\t\\t\\t\\tvar rowBottom = rowTop + rowRect.height;\\r\\n\\t\\t\\t\\tvar scrollParentHeight = scrollParent.getBoundingClientRect().height;\\r\\n\\t\\t\\t\\tvar currentScroll = scrollParent.scrollTop;\\r\\n\\t\\t\\t\\t// scroll up\\r\\n\\t\\t\\t\\tif (rowTop < 0)// && \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tscrollParent.scrollTop = currentScroll + rowTop;\\r\\n\\t\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t// scroll down\\r\\n\\t\\t\\t\\t//else if (direction === this.__nsGrid.NAVIGATION_UP)//rowBottom  > scrollParentHeight\\r\\n\\t\\t\\t\\t//{\\r\\n\\t\\t\\t\\t\\tvar scrollAmount = rowBottom - scrollParentHeight;\\r\\n\\t\\t\\t\\t\\tconsole.log(rowBottom + \\\"-\\\" + scrollParentHeight + \\\" = \\\" + scrollAmount)\\r\\n\\t\\t\\t\\t\\tscrollParent.scrollTop = currentScroll + scrollAmount;\\r\\n\\t\\t\\t\\t//}\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__getkeyboardNavigationRow = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar row = null;\\r\\n\\t\\t\\tif(this.__nsGrid.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trow = this.__nsGrid.__tblCenterBody.tBodies[0].querySelector(\\\".nsRowHover\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trow = this.__nsGrid.__getRowFromContainer(this.__nsGrid.__navigationIndex);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn row;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__virtualRowHover = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrRows = this.__nsGrid.__getBodyBodyRow(this.__nsGrid.__tblCenterBody);\\r\\n\\t\\t\\tif(this.__nsGrid.__hasBodyRows() && arrRows.length > 0 && this.__nsGrid.__arrInternalSource)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar row = null;\\r\\n\\t\\t\\t\\tvar index = null;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tfor(var count = 0; count < arrRows.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow = arrRows[count];\\r\\n\\t\\t\\t\\t\\tindex = this.__nsGrid.__getIndexFromRow(row);\\r\\n\\t\\t\\t\\t\\titem = this.__nsGrid.__getItemByIndex(index);\\r\\n\\t\\t\\t\\t\\t(item && item[this.__nsGrid.__fieldHover]) ? this.util.addStyleClass(row,\\\"nsRowHover\\\") : this.util.removeStyleClass(row,\\\"nsRowHover\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setVirtualRowHoverField = function(indexToSet)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tindexToSet = -1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar source = this.__nsGrid.__objGrid.__getFlatSource();\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tfor(var count = 0; count < source.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__nsGrid.__fieldHover] = (item[this.__nsGrid.__fieldIndex] === indexToSet); \\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setVirtualRowHover = function(indexToSet)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsGrid.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tindexToSet = 0;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar item = this.__nsGrid.__getVisibleItemByIndex(null,indexToSet);\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__navigationIndex = indexToSet;\\r\\n\\t\\t\\t\\t\\tvar index = item[this.__nsGrid.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tthis.__setVirtualRowHoverField(index);\\r\\n\\t\\t\\t\\t\\tthis.__virtualRowHover();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setRowHover = function(indexToSet)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tindexToSet = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__nsGrid.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__setVirtualRowHover(indexToSet);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tindexToSet = 0;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__nsGrid.__navigationIndex = indexToSet;\\r\\n\\t\\t\\t\\tvar row = this.__nsGrid.__getRowFromContainer(this.__nsGrid.__navigationIndex);\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(row,\\\"nsRowHover\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\treturn NSGridKeyboard;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSGridKeyboard\\\",NSGridKeyboard);\\r\\n\\r\\nvar NSGridSort = (function()\\r\\n{\\r\\n\\tvar NSGridSort = function(nsGrid)\\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid = nsGrid;\\r\\n\\t\\tthis.util = this.__nsGrid.util;\\r\\n\\t\\tthis.__arrFields = [];\\r\\n\\t\\t\\r\\n\\t\\tthis.__CLASS_SORTING_ASC = \\\"nsSortedAsc\\\";\\r\\n\\t\\tthis.__CLASS_SORTING_DESC = \\\"nsSortedDesc\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.determineSortFunction = function(item,colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__determineSortFunction(item,colItem);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.handle = function(header,columnDetail,isMultiColumnSort,customIsAscending)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__handleSorting(header,columnDetail,isMultiColumnSort,customIsAscending);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.reset = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__resetColumnHeaders(false);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleSorting= function(header,columnDetail,isMultiColumnSort,customIsAscending)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(header && columnDetail && columnDetail.sortable)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar sortAscending = true;\\r\\n\\t\\t\\t\\tvar isCustomSort = !this.util.isUndefined(customIsAscending);\\r\\n\\t\\t\\t\\tisMultiColumnSort = Boolean.parse(isMultiColumnSort);\\r\\n\\t\\t\\t\\tthis.__nsGrid.__dispatchEvent(NSGrid.SORT_CHANGING,columnDetail,{columnDetail:columnDetail});\\r\\n\\t\\t\\t\\tif (this.util.hasStyleClass(header,this.__CLASS_SORTING_ASC) || this.util.hasStyleClass(header,this.__CLASS_SORTING_DESC))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t        if(this.util.hasStyleClass(header,this.__CLASS_SORTING_ASC))\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t             this.__removeAscendingIndicator(header,columnDetail);\\r\\n\\t\\t\\t             sortAscending = false;\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        else if(this.util.hasStyleClass(header,this.__CLASS_SORTING_DESC))\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tthis.__removeDescendingIndicators(header,columnDetail);\\r\\n\\t\\t\\t\\t       \\tsortAscending = true;\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t   \\telse\\r\\n\\t\\t\\t   \\t{\\r\\n\\t\\t\\t   \\t\\tsortAscending = !columnDetail.sortDescending;\\r\\n\\t\\t\\t   \\t}\\r\\n\\t\\t\\t\\tif(!isMultiColumnSort)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__arrFields = [];\\r\\n\\t\\t\\t\\t\\tthis.__resetColumnHeaders(true);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar isColumnExisting = false;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < this.__arrFields.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__arrFields[count][\\\"field\\\"] === columnDetail[\\\"sortField\\\"])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tisColumnExisting = true;\\r\\n\\t\\t\\t\\t\\t\\tthis.__arrFields[count][\\\"sortAscending\\\"] = sortAscending;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!isColumnExisting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__arrFields.push({field:columnDetail.sortField,sortFunction:columnDetail.sortFunction,sortAscending:sortAscending});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t   \\t//customIsAscending is passed it overrides the setting in columnDetail\\r\\n\\t\\t\\t   \\tif(isCustomSort)\\r\\n\\t\\t\\t   \\t{\\r\\n\\t\\t\\t   \\t\\tsortAscending = customIsAscending;\\r\\n\\t\\t\\t   \\t}\\r\\n\\t\\t\\t   \\tif(sortAscending)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t   \\t\\tthis.__addAscendingIndicator(header,columnDetail);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t   \\telse\\r\\n\\t\\t\\t   \\t{\\r\\n\\t\\t\\t   \\t\\tthis.__addDescendingIndicator(header,columnDetail);\\r\\n\\t\\t\\t   \\t}\\r\\n\\t\\t\\t   \\tif(this.__nsGrid.__enableHierarchical || this.__nsGrid.__enableGrouping || this.__nsGrid.__enableMasterDetail)\\r\\n\\t\\t\\t   \\t{\\r\\n\\t\\t\\t   \\t\\t  this.__sortHierarchicalStructure(this.__nsGrid.__arrWrapper,this.__arrFields); \\r\\n\\t\\t\\t   \\t\\t  this.__nsGrid.__objGrid.__setWrapperSource(this.__nsGrid.__arrWrapper,0,-1,0,false);\\r\\n\\t\\t\\t   \\t\\t  this.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0);\\r\\n\\t\\t\\t   \\t}\\r\\n\\t\\t\\t   \\telse\\r\\n\\t\\t\\t   \\t{\\r\\n\\t\\t\\t   \\t\\t  this.__sortArrOfObjectsByParam(this.__nsGrid.__arrWrapper,this.__arrFields);\\r\\n\\t\\t\\t   \\t\\t  this.__nsGrid.__arrInternalSource = this.__nsGrid.__arrWrapper.slice(0);\\r\\n\\t\\t\\t   \\t}\\r\\n\\t\\t\\t   \\t//to stop error of horizontal scrollbar position getting reset when sorting\\r\\n\\t\\t\\t   \\tvar horScrollPos = 0;\\r\\n\\t\\t\\t   \\tif(this.__nsGrid.__divCenterTableBodyContainer)\\r\\n\\t\\t\\t   \\t{\\r\\n\\t\\t\\t\\t\\thorScrollPos = this.__nsGrid.__divCenterTableBodyContainer.scrollLeft;\\r\\n\\t\\t\\t   \\t}\\r\\n\\t\\t\\t   \\tthis.__nsGrid.resetFilters();\\r\\n\\t\\t\\t   \\tthis.__nsGrid.__renderBody(true,false);\\r\\n\\t\\t\\t   \\tcolumnDetail[this.__nsGrid.__fieldColSortedAsc] = sortAscending;\\r\\n\\t\\t\\t   \\tif(this.__nsGrid.__divCenterTableBodyContainer && horScrollPos > 0)\\r\\n\\t\\t\\t   \\t{\\r\\n\\t\\t\\t   \\t\\tthis.__nsGrid.__divCenterTableBodyContainer.scrollLeft = horScrollPos;\\r\\n\\t\\t\\t   \\t}\\r\\n\\t\\t\\t   \\tthis.__nsGrid.__dispatchEvent(NSGrid.SORT_CHANGED,this.__arrFields,{fieldDetails:this.__arrFields});\\r\\n\\t\\t    }\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.warning(\\\"NSGrid\\\",\\\"This column is not sortable.\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__sortHierarchicalStructure= function(dataSource,arrFields)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(dataSource && dataSource.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < dataSource.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t\\t\\tif(this.__nsGrid.__isNodeLastParent(item))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__sortArrOfObjectsByParam(item[this.__nsGrid.__childField],arrFields);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if(item[this.__nsGrid.__fieldHasChild])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__sortHierarchicalStructure(item[this.__nsGrid.__childField],arrFields);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t//This method is based on Stuart Langridge's \\\"sorttable\\\" code\\r\\n\\t\\tthis.__determineSortFunction= function(item,colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\t  var sortType = colItem.sortType;\\r\\n\\t\\t\\t  var sortFunction = \\\"__sortCaseInsensitive\\\";\\r\\n\\t\\t\\t  if(sortType == null)\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  var value = item.toString();\\r\\n\\t\\t\\t      if(this.__isDate(item) || value.match(/^\\\\d\\\\d[\\\\/-]\\\\d\\\\d[\\\\/-]\\\\d\\\\d\\\\d\\\\d$/) || value.match(/^\\\\d\\\\d[\\\\/-]\\\\d\\\\d[\\\\/-]\\\\d\\\\d$/))\\r\\n\\t\\t\\t      {\\r\\n\\t\\t\\t          sortFunction = \\\"__sortDate\\\";\\r\\n\\t\\t\\t      }\\r\\n\\t\\t\\t      if (value.match(/^[$]/))\\r\\n\\t\\t\\t      {\\r\\n\\t\\t\\t          sortFunction = \\\"__sortCurrency\\\";\\r\\n\\t\\t\\t      }\\r\\n\\t\\t\\t      if (value.match(/^[\\\\d\\\\.]+$/) || value.match(/^[+-]?\\\\d*\\\\.?\\\\d+([eE]-?\\\\d+)?$/) || !isNaN(value))\\r\\n\\t\\t\\t      {\\r\\n\\t\\t\\t          sortFunction = \\\"__sortNumeric\\\";\\r\\n\\t\\t\\t      }\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  else\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  var objVal = {\\\"date\\\": {func: \\\"__sortDate\\\"},\\\"currency\\\": {func: \\\"__sortCurrency\\\"},\\\"number\\\": {func: \\\"__sortNumeric\\\"},\\\"string\\\": {func: \\\"__sortCaseInsensitive\\\"}};\\r\\n\\t\\t\\t\\t  if(objVal[sortType.toLowerCase()])\\r\\n\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t  sortFunction = objVal[sortType.toLowerCase()].func;\\r\\n\\t\\t\\t\\t  }\\r\\n\\t\\t\\t  }\\r\\n\\t\\t      return sortFunction;\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__sortArrOfObjectsByParam= function(arrToSort,arrFields)\\r\\n\\t\\t{\\r\\n\\t\\t    arrToSort.sort(function (item1, item2)\\r\\n\\t\\t    {\\r\\n\\t\\t        var retValue = 0;\\r\\n\\t\\t        var objField = null;\\r\\n\\t\\t        for (var count = 0; count < arrFields.length; count++) \\r\\n\\t\\t        {\\r\\n\\t\\t        \\tobjField = arrFields[count];\\r\\n\\t\\t        \\tif(objField[\\\"sortAscending\\\"] == null || objField[\\\"sortAscending\\\"] == undefined)\\r\\n\\t\\t     \\t    {\\r\\n\\t\\t        \\t\\tobjField[\\\"sortAscending\\\"] = true;  // default to true\\r\\n\\t\\t     \\t    }\\r\\n\\t\\t        \\tif (typeof this[objField[\\\"sortFunction\\\"]] === \\\"function\\\")\\r\\n\\t\\t\\t        {\\r\\n\\t\\t        \\t\\tretValue = this[objField[\\\"sortFunction\\\"]](item1,item2,objField[\\\"field\\\"],objField[\\\"sortAscending\\\"]);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t        \\tif (retValue !== 0) \\r\\n\\t\\t        \\t{\\r\\n\\t\\t        \\t\\tbreak;\\r\\n\\t\\t        \\t}\\r\\n\\t\\t        }\\r\\n\\t\\t        return retValue;\\r\\n\\t\\t    }.bind(this));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__sortCaseInsensitive= function(item1, item2 , sortField, sortAscending)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!item1[sortField] && !item2[sortField])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar retValue = -1;\\r\\n\\t\\t\\tif(!item1[sortField])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = -1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(!item2[sortField])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar firstString = item1[sortField].toLowerCase();\\r\\n\\t\\t\\t    var secondString = item2[sortField].toLowerCase();\\r\\n\\t\\t\\t      \\r\\n\\t\\t\\t    if(firstString == secondString)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\treturn 0;\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    if (firstString < secondString)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t        retValue = -1;\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    else\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t        retValue = 1;\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t    if(sortAscending)\\r\\n\\t\\t    {\\r\\n\\t\\t        return retValue; \\r\\n\\t\\t    }\\r\\n\\t\\t    return (retValue * -1);\\r\\n\\t\\t};\\r\\n\\t\\t \\r\\n\\t\\tthis.__sortDate= function(item1, item2 , sortField, sortAscending)\\r\\n\\t\\t{\\r\\n\\t\\t      // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX\\r\\n\\t\\t      var firstDateString = item1[sortField];\\r\\n\\t\\t      var secondDateString = item2[sortField];\\r\\n\\t\\t      var firstDate, secondDate, year = -1;\\r\\n\\t\\t      if(this.util.isUndefinedOrNull(firstDateString) || this.util.isUndefinedOrNull(secondDateString))\\r\\n\\t\\t      {\\r\\n\\t\\t    \\t  var retValue = -1;\\r\\n\\t\\t    \\t  if(this.util.isUndefinedOrNull(firstDateString) && this.util.isUndefinedOrNull(secondDateString))\\r\\n\\t\\t\\t      {\\r\\n\\t\\t\\t    \\t  retValue = 0;\\r\\n\\t\\t\\t      }\\r\\n\\t\\t    \\t  if(this.util.isUndefinedOrNull(firstDateString))\\r\\n\\t\\t    \\t  {\\r\\n\\t\\t    \\t\\t  retValue = -1;\\r\\n\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t  else if(this.util.isUndefinedOrNull(secondDateString))\\r\\n\\t\\t\\t\\t  {\\r\\n\\t\\t\\t\\t\\t  retValue = 1;\\r\\n\\t\\t\\t\\t  }\\r\\n\\t\\t    \\t  if(sortAscending)\\r\\n\\t\\t\\t\\t  {\\r\\n\\t\\t    \\t\\t  return retValue; \\r\\n\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t  return (retValue * -1);\\r\\n\\t\\t      }\\r\\n\\t\\t      if(this.__isDate(firstDateString) && this.__isDate(secondDateString))\\r\\n\\t\\t      {\\r\\n\\t\\t    \\t  firstDate = this.__convertToDate(firstDateString);\\r\\n\\t\\t    \\t  secondDate = this.__convertToDate(secondDateString);\\r\\n\\t\\t    \\t  if(sortAscending)\\r\\n\\t\\t    \\t  {\\r\\n\\t\\t    \\t\\t  if (firstDate > secondDate) \\r\\n\\t\\t    \\t\\t  {\\r\\n\\t\\t    \\t\\t\\t  return 1;\\r\\n\\t\\t    \\t\\t  }\\r\\n\\t\\t    \\t\\t  if (firstDate < secondDate)\\r\\n\\t\\t    \\t\\t  {\\r\\n\\t\\t    \\t\\t\\t  return -1;\\r\\n\\t\\t    \\t\\t  }\\r\\n\\t\\t    \\t\\t  return 0;\\r\\n\\t\\t    \\t  }\\r\\n\\t\\t    \\t  else\\r\\n\\t\\t    \\t  {\\r\\n\\t\\t    \\t\\t  if (firstDate > secondDate) \\r\\n\\t\\t    \\t\\t  {\\r\\n\\t\\t    \\t\\t\\t  return -1;\\r\\n\\t\\t    \\t\\t  }\\r\\n\\t\\t    \\t\\t  if (firstDate < secondDate)\\r\\n\\t\\t    \\t\\t  {\\r\\n\\t\\t    \\t\\t\\t  return 1;\\r\\n\\t\\t    \\t\\t  }\\r\\n\\t\\t    \\t\\t  return 0;\\r\\n\\t\\t    \\t  }\\r\\n\\t\\t      }\\r\\n\\t\\t     \\r\\n\\t\\t      if (firstDateString.length == 10)\\r\\n\\t\\t      {\\r\\n\\t\\t           firstDate = firstDateString.substr(6,4) + firstDateString.substr(3,2) + firstDateString.substr(0,2);\\r\\n\\t\\t      }\\r\\n\\t\\t      else\\r\\n\\t\\t      {\\r\\n\\t\\t           year = firstDateString.substr(6,2);\\r\\n\\t\\t           if (parseInt(year) < 50)\\r\\n\\t\\t           {\\r\\n\\t\\t                year = \\\"20\\\" + year;\\r\\n\\t\\t           }\\r\\n\\t\\t           else\\r\\n\\t\\t           {\\r\\n\\t\\t                year = \\\"19\\\" + year;\\r\\n\\t\\t           }\\r\\n\\t\\t           firstDate = year + firstDateString.substr(3,2) + firstDateString.substr(0,2);\\r\\n\\t\\t      }\\r\\n\\t\\t     \\r\\n\\t\\t      if (secondDateString.length == 10)\\r\\n\\t\\t      {\\r\\n\\t\\t           secondDate = secondDateString.substr(6,4)+secondDateString.substr(3,2)+secondDateString.substr(0,2);\\r\\n\\t\\t      }\\r\\n\\t\\t      else\\r\\n\\t\\t      {\\r\\n\\t\\t           year = secondDateString.substr(6,2);\\r\\n\\t\\t           if (parseInt(year) < 50)\\r\\n\\t\\t           {\\r\\n\\t\\t                year = \\\"20\\\" + year;\\r\\n\\t\\t           }\\r\\n\\t\\t           else\\r\\n\\t\\t           {\\r\\n\\t\\t                year = \\\"19\\\" + year;\\r\\n\\t\\t           }\\r\\n\\t\\t           secondDate = year + secondDateString.substr(3,2) + secondDateString.substr(0,2);\\r\\n\\t\\t      }\\r\\n\\t\\t     \\r\\n\\t\\t      if (firstDate == secondDate)\\r\\n\\t\\t      {\\r\\n\\t\\t          return 0;\\r\\n\\t\\t      }\\r\\n\\t\\t      var retValue = -1;\\r\\n\\t\\t      if (firstDate < secondDate)\\r\\n\\t\\t      {\\r\\n\\t\\t          retValue = -1;\\r\\n\\t\\t      }\\r\\n\\t\\t      else\\r\\n\\t\\t      {\\r\\n\\t\\t          retValue = 1;\\r\\n\\t\\t      }\\r\\n\\t\\t      if(sortAscending)\\r\\n\\t\\t      {\\r\\n\\t\\t          return retValue; \\r\\n\\t\\t      }\\r\\n\\t\\t      return (retValue * -1);\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__sortCurrency= function(item1, item2 , sortField, sortAscending)\\r\\n\\t\\t{\\r\\n\\t\\t      var firstCurrency = item1[sortField].replace(/[^0-9.]/g,\\\"\\\");\\r\\n\\t\\t      var secondCurrency = item2[sortField].replace(/[^0-9.]/g,\\\"\\\");\\r\\n\\t\\t      if(sortAscending)\\r\\n\\t\\t      {\\r\\n\\t\\t          return parseFloat(firstCurrency) - parseFloat(secondCurrency); \\r\\n\\t\\t      }\\r\\n\\t\\t      return parseFloat(secondCurrency) - parseFloat(firstCurrency);\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__sortNumeric= function(item1, item2 , sortField, sortAscending)\\r\\n\\t\\t{\\r\\n\\t\\t      var firstNumber = parseFloat(item1[sortField]);\\r\\n\\t\\t      if (isNaN(firstNumber))\\r\\n\\t\\t      {\\r\\n\\t\\t          firstNumber = 0;\\r\\n\\t\\t      }\\r\\n\\t\\t      var secondNumber = parseFloat(item2[sortField]);\\r\\n\\t\\t      if (isNaN(secondNumber))\\r\\n\\t\\t      {\\r\\n\\t\\t          secondNumber = 0;\\r\\n\\t\\t      }\\r\\n\\t\\t      if(sortAscending)\\r\\n\\t\\t      {\\r\\n\\t\\t          return (firstNumber - secondNumber);\\r\\n\\t\\t      }\\r\\n\\t\\t      return (secondNumber - firstNumber);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isDate = function(value) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif (Object.prototype.toString.call(value) === '[object Date]') \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (typeof value.replace === 'function') \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    value.replace(/^\\\\s+|\\\\s+$/gm, '');\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar dateFormat = /(^\\\\d{1,4}[\\\\.|\\\\\\\\/|-]\\\\d{1,2}[\\\\.|\\\\\\\\/|-]\\\\d{1,4})(\\\\s*(?:0?[1-9]:[0-5]|1(?=[012])\\\\d:[0-5])\\\\d\\\\s*[ap]m)?$/;\\r\\n\\t\\t\\tvar retValue = dateFormat.test(value);\\r\\n\\t\\t\\tif(!retValue)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvalue = this.__formatDateString(value);\\r\\n\\t\\t\\t\\tvar parsedDate = Date.parse(value);\\r\\n\\t\\t\\t\\tif (isNaN(value) && !isNaN(parsedDate)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__convertToDate = function(value) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = null;\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(value))\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvalue = this.__formatDateString(value);\\r\\n\\t\\t\\t\\tretValue = new Date(value);\\r\\n\\t\\t    }\\r\\n\\t\\t    return retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__formatDateString = function(value)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isString(value))\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\t//For conditions where date comes like (from sqlserver convert(varchar,date,100)) \\\"May 16 2016  2:25PM\\\" \\r\\n\\t\\t\\t\\t//then new Date returns nan.It should be like \\\"May 16 2016  2:25 PM\\\"\\r\\n\\t\\t\\t\\tvar ampm = null;\\r\\n\\t\\t\\t\\tampm = ((value.indexOf(\\\"AM\\\") > -1) ? \\\"AM\\\" : ((value.indexOf(\\\"PM\\\") > -1) ? \\\"PM\\\" : null));\\r\\n\\t\\t\\t\\tif(ampm)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar index = value.indexOf(ampm);\\r\\n\\t\\t\\t\\t\\tif(value.charAt(index-1) != \\\" \\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvalue = value.substring(0,index) + \\\" \\\" + ampm;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t\\treturn value;\\r\\n\\t\\t};\\r\\n\\t\\t/******************************Create Sort Components*******************************/\\r\\n\\t\\tthis.__addAscendingIndicator = function(target,columnDetail)\\r\\n\\t\\t{\\r\\n\\t\\t     if(target)\\r\\n\\t\\t     {\\r\\n\\t\\t    \\t this.__setSortIcons(target,true,false,columnDetail);\\r\\n\\t\\t         this.util.addStyleClass(target,this.__CLASS_SORTING_ASC);\\r\\n\\t\\t     }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__removeAscendingIndicator= function(target,columnDetail)\\r\\n\\t\\t{\\r\\n\\t\\t     if(target)\\r\\n\\t\\t     {\\r\\n\\t\\t          this.util.removeStyleClass(target,this.__CLASS_SORTING_ASC);\\r\\n\\t\\t          this.__setSortIcons(target,false,false,columnDetail);\\r\\n\\t\\t     }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__addDescendingIndicator= function(target,columnDetail)\\r\\n\\t\\t{\\r\\n\\t\\t    if(target)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__setSortIcons(target,false,true,columnDetail);\\r\\n\\t\\t        this.util.addStyleClass(target,this.__CLASS_SORTING_DESC);\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__removeDescendingIndicators= function(target,columnDetail)\\r\\n\\t\\t{\\r\\n\\t\\t     if(target)\\r\\n\\t\\t     {\\r\\n\\t\\t    \\t this.util.removeStyleClass(target,this.__CLASS_SORTING_DESC);\\r\\n\\t\\t    \\t this.__setSortIcons(target,false,false,columnDetail);\\r\\n\\t\\t     }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__resetIndicators= function(target,columnDetail)\\r\\n\\t\\t{\\r\\n\\t\\t     if(target)\\r\\n\\t\\t     {\\r\\n\\t\\t          this.__removeAscendingIndicator(target,columnDetail);\\r\\n\\t\\t          this.__removeDescendingIndicators(target,columnDetail);\\r\\n\\t\\t          this.__setSortIcons(target,true,true,columnDetail);\\r\\n\\t\\t     }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__resetColumnHeaders= function(isInternal)\\r\\n\\t\\t{\\r\\n\\t\\t     var headerBodyRow = this.__nsGrid.__getHeaderBodyRow(this.__nsGrid.__tblCenterHeader);\\r\\n\\t\\t     if (!headerBodyRow)\\r\\n\\t\\t     {\\r\\n\\t\\t          return;\\r\\n\\t\\t     }\\r\\n\\t\\t     var headers = headerBodyRow.cells;\\r\\n\\t\\t     for (var colCount = 0; colCount < headers.length; colCount++)\\r\\n\\t\\t     {\\r\\n\\t\\t          this.__resetIndicators(headers[colCount]);\\r\\n\\t\\t     }\\r\\n\\t\\t     if(isInternal)\\r\\n\\t\\t     {\\r\\n\\t\\t    \\t for (var colCount = 0; colCount < this.__nsGrid.__columns.length; colCount++)\\r\\n\\t\\t\\t     {\\r\\n\\t\\t\\t    \\t this.__nsGrid.__columns[colCount][this.__nsGrid.__fieldColSortedAsc] = null;\\r\\n\\t\\t\\t     }\\r\\n\\t\\t     }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__setSortIcons= function(target,isAscVisible,isDescVisible,columnDetail)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(target)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!columnDetail)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar columnIndex = parseInt(target.getAttribute(\\\"currentColumnIndex\\\"));\\r\\n\\t\\t\\t\\t\\tcolumnDetail = this.__nsGrid.__getColumnObject(columnIndex);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(columnDetail && this.__nsGrid.__isSortingIconCustom(columnDetail))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar divSorting = target.querySelector(\\\".nsGridSortContainer\\\");\\r\\n\\t\\t\\t\\t\\tif(divSorting)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdivSorting.innerHTML = \\\"\\\";\\r\\n\\t\\t\\t\\t\\t\\tif(isAscVisible)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdivSorting.innerHTML += this.__nsGrid.__getColumnCustomIcon(columnDetail,\\\"sortAscending\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(isDescVisible)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdivSorting.innerHTML += this.__nsGrid.__getColumnCustomIcon(columnDetail,\\\"sortDescending\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(isAscVisible != null)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t var divSortAsc = document.getElementById(target.getAttribute(\\\"id\\\") + \\\"SortAsc\\\");\\r\\n\\t\\t\\t\\t\\t\\t if(divSortAsc)\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t divSortAsc.style.display = isAscVisible ? \\\"\\\" : \\\"none\\\";\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(isDescVisible != null)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t var divSortDesc = document.getElementById(target.getAttribute(\\\"id\\\") + \\\"SortDesc\\\");\\r\\n\\t\\t\\t\\t\\t\\t if(divSortDesc)\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t divSortDesc.style.display = isDescVisible ? \\\"\\\" : \\\"none\\\";\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t/******************************End of Create Sort Components*******************************/\\r\\n\\t};\\r\\n\\treturn NSGridSort;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSGridSort\\\",NSGridSort);\\r\\n\\r\\nvar NSGridColumnResize = (function()\\r\\n{\\r\\n\\tvar NSGridColumnResize = function(nsGrid)\\r\\n\\t{\\r\\n\\t\\tthis.__nsGrid = nsGrid;\\r\\n\\t\\tthis.util = this.__nsGrid.util;\\r\\n\\t\\t\\r\\n\\t\\t//cell which is being resized\\r\\n\\t\\tthis.__resizingHeader = null;\\r\\n\\t\\tthis.__resizingHeaderCell = null;\\r\\n\\t\\tthis.__resizingBodyCell = null;\\r\\n\\t\\tthis.__resizeHandler = null;\\r\\n\\t\\tthis.__resizeIndicatorMouseDownInterval = -1;\\r\\n\\t\\tthis.__resizeIndicatorMouseDownCount = 0;\\r\\n\\t\\t\\r\\n\\t\\tthis.__doResizeRef = null;\\r\\n\\t\\tthis.__endResizeRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.autoResize = function(index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(index > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objColumn = this.__nsGrid.__getColumnObject(index);\\r\\n\\t\\t\\t\\tif(objColumn)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(objColumn[\\\"autoSize\\\"]) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar preferredWidth = this.__getPreferredWidthForColumn(objColumn);\\r\\n\\t\\t\\t\\t\\t\\tif(preferredWidth > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar cellIndex = objColumn[this.__nsGrid.__fieldColIndex];\\r\\n\\t\\t\\t\\t\\t\\t\\tvar resizingHeaderCell = this.__getHeaderTopCell(null,cellIndex);\\r\\n\\t\\t\\t\\t\\t\\t\\tvar resizingBodyCell = this.__getBodyTopCell(null,cellIndex);\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__resize(this.__nsGrid.__tblCenterHeader,resizingHeaderCell,preferredWidth,objColumn);\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__resize(this.__nsGrid.__tblCenterBody,resizingBodyCell,preferredWidth,objColumn);\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__handleColumnResize();\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__nsGrid.__dispatchEvent(NSGrid.COLUMN_RESIZED,objColumn,objColumn);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.util.warning(\\\"NSGrid\\\",\\\"This column with dataField \\\" + objColumn.dataField + \\\" is not autosizable.\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse {\\r\\n\\t\\t\\t\\t\\tthis.util.warning(\\\"NSGrid\\\",\\\"This column details was not found.\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.addResizeIndicator = function(row,cell,divCellContainer,objColumn,colID)\\r\\n\\t\\t{\\r\\n\\t\\t\\t if(objColumn[\\\"resizable\\\"])\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\tvar divResize = this.util.createDiv(null,\\\"nsColumnResizeIndicator\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(divResize,\\\"nsColumnResizeIndicatorTheme\\\");\\r\\n\\t\\t\\t\\tdivResize.title = \\\"Drag to resize the column \\\" + objColumn.headerText;\\r\\n\\t\\t\\t\\t//divResize.style.height = this.__nsGrid.__getViewportHeight() + \\\"px\\\";\\r\\n\\t\\t\\t\\t//divResize.style.borderRight = '2px solid #0000ff';\\r\\n\\t\\t\\t\\tvar resizeEventHandler = this.__resizeEventHandler.bind(this);\\r\\n\\t\\t\\t\\t//this.util.addEvent(divResize,\\\"mouseover\\\",resizeEventHandler);\\r\\n\\t\\t\\t\\t//this.util.addEvent(divResize,\\\"mouseout\\\",resizeEventHandler);\\r\\n\\t\\t\\t\\tthis.util.addEvent(divResize,\\\"mousedown\\\",resizeEventHandler);\\r\\n\\t\\t\\t\\tthis.util.addEvent(divResize,\\\"click\\\",resizeEventHandler);\\r\\n\\t\\t\\t\\tthis.util.addEvent(divResize,\\\"dblclick\\\",resizeEventHandler);\\r\\n\\t\\t\\t\\tdivCellContainer.appendChild(divResize);\\r\\n\\t\\t\\t\\tthis.__nsGrid.__addTouchEvent(divResize);\\r\\n\\t\\t\\t }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.startResize = function(event,target)\\r\\n\\t\\t{\\r\\n\\t\\t\\t/*if(!this.__nsGrid.__onGridLine)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t\\tthis.__nsGrid.__isColumnResizing = true;\\r\\n\\t\\t\\tthis.util.removeEvent(target,\\\"click\\\",this.__nsGrid.__headerClickRef);\\r\\n\\t\\t\\tthis.__nsGrid.__headerClickRef = null;\\r\\n\\t\\t    this.util.removeEvent(target,\\\"mouseover\\\",this.__nsGrid.__headerMouseOverRef);\\r\\n\\t\\t    this.__nsGrid.__headerMouseOverRef = null;\\r\\n\\t\\t    this.util.removeEvent(target,\\\"mouseout\\\",this.__nsGrid.__headerMouseOutRef);\\r\\n\\t\\t    this.__nsGrid.__headerMouseOutRef = null;\\r\\n\\t\\t    this.__nsGrid.__removeTouchEvent(target);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tthis.__resizingHeader = target;\\r\\n\\t\\t\\tthis.__resizingHeaderCell = this.__getHeaderTopCell(target);\\r\\n\\t\\t\\tthis.__resizingBodyCell = this.__getBodyTopCell(target);\\r\\n\\t\\t\\tvar objColumn = this.__nsGrid.__getColumnObject(this.__resizingHeader.getAttribute(\\\"currentColumnIndex\\\"));\\r\\n\\t\\t\\tthis.__nsGrid.__dispatchEvent(NSGrid.COLUMN_RESIZING,objColumn,objColumn);\\r\\n\\t\\t\\tthis.__createResizeHandler(event);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tthis.__doResizeRef = this.__doResize.bind(this);\\r\\n\\t\\t\\tthis.__endResizeRef = this.__endResize.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"mousemove\\\",this.__doResizeRef);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"mouseup\\\",this.__endResizeRef);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__resize = function(table,cell,desirableWidth,objColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cellPaddingLeft = this.util.getDimensionAsNumber(cell,cell.style.paddingLeft);\\r\\n\\t\\t\\tvar cellPaddingRight = this.util.getDimensionAsNumber(cell,cell.style.paddingRight);\\r\\n\\t\\t\\tvar pad = parseInt(cellPaddingLeft,10) + parseInt(cellPaddingRight,10);\\r\\n\\t\\t\\tif(!objColumn && this.__resizingHeader)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn = this.__nsGrid.__getColumnObject(this.__resizingHeader.getAttribute(\\\"currentColumnIndex\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar minWidth = this.__nsGrid.__columnMinWidth;\\r\\n\\t\\t\\tif(objColumn)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tminWidth = objColumn[\\\"minWidth\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar setWidth = Math.max((desirableWidth - pad), minWidth);\\r\\n\\t\\t\\tif(objColumn)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"width\\\"] = setWidth + \\\"px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcell.style.width = setWidth + \\\"px\\\";\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__doResize = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//putting this check as somehow the document evenlistener is not getting detached\\r\\n\\t\\t\\tif(!this.__resizingHeader)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.makeBodyUnselectable();\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tthis.__resizeHandler.style.left = this.__getResizeLeftPos(event) + \\\"px\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__endResize = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//putting this check as somehow the document evenlistener is not getting detached\\r\\n\\t\\t\\tif(!this.__resizingHeader)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mousemove\\\",this.__doResizeRef);\\r\\n\\t\\t\\tthis.__doResizeRef = null;\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mouseup\\\",this.__endResizeRef);\\r\\n\\t\\t\\tthis.__endResizeRef = null;\\r\\n\\t\\t\\tthis.util.removeEvent(selectedHeader,\\\"mouseout\\\",this.__nsGrid.__headerMouseOutRef);\\r\\n\\t\\t\\tthis.__nsGrid.__headerMouseOutRef = null;\\r\\n\\t\\t\\tthis.util.removeEvent(selectedHeader,\\\"click\\\",this.__nsGrid.__headerClickRef);\\r\\n\\t\\t\\tthis.__nsGrid.__headerClickRef = null;\\r\\n\\t\\t\\tthis.__nsGrid.__removeTouchEvent(selectedHeader);\\r\\n\\t\\t\\tthis.util.makeBodySelectable();\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar selectedHeader = this.__resizingHeader;\\r\\n\\t\\t\\tvar tableHeader = this.__nsGrid.__tblCenterHeader;\\r\\n\\t\\t\\tvar tableBody = this.__nsGrid.__tblCenterBody;\\r\\n\\t\\t\\tvar posEvent = this.util.getEventPosition(event,this.__nsGrid.__divCenterTableBodyContainer);\\r\\n\\t\\t\\tvar desiredWidth = posEvent.left - this.util.getCumulativeOffset(selectedHeader).x;\\r\\n\\t\\t\\tthis.__resize(tableHeader,this.__resizingHeaderCell,desiredWidth);\\r\\n\\t\\t\\tthis.__resize(tableBody,this.__resizingBodyCell,desiredWidth);\\r\\n\\t\\t\\tif(this.__resizeHandler)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__divOuterContainer.removeChild(this.__resizeHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar column = this.__resizingHeader;\\r\\n\\t\\t\\tthis.__resizingHeader = null;\\r\\n\\t\\t\\tthis.__resizingHeaderCell = null;\\r\\n\\t\\t\\tthis.__resizingBodyCell = null;\\r\\n\\t\\t\\tthis.__resizeHandler = null;\\r\\n\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t\\tthis.__handleColumnResize();\\r\\n\\t\\t\\tvar objColumn = this.__nsGrid.__getColumnObject(column.getAttribute(\\\"currentColumnIndex\\\"));\\r\\n\\t\\t\\tthis.__nsGrid.__dispatchEvent(NSGrid.COLUMN_RESIZED,objColumn,objColumn);\\r\\n\\t\\t\\tthis.__nsGrid.__isColumnResizing = false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__resizeEventHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar stopEventPropogation = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\tvar resizeIndicator = target;\\r\\n\\t\\t    target = this.util.findParent(target,\\\"TD\\\");\\r\\n\\t\\t    var colIndex = parseInt(target.getAttribute(\\\"currentColumnIndex\\\"));\\r\\n\\t\\t    //var objColumn = this.__nsGrid.__getColumnObject(colIndex);\\r\\n\\t\\t\\tswitch(event.type)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t/*case \\\"mouseover\\\":\\r\\n\\t\\t\\t\\t\\tif(this.util.hasStyleClass(resizeIndicator,\\\"nsColumnResizeIndicator\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar height = this.__nsGrid.__getViewportHeight();\\r\\n\\t\\t\\t\\t\\t\\tif(height != resizeIndicator.offsetHeight)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tresizeIndicator.style.height = height + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tresizeIndicator.style.borderRight = '2px solid #0000ff';\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"mouseout\\\":\\r\\n\\t\\t\\t\\t\\tif(this.util.hasStyleClass(resizeIndicator,\\\"nsColumnResizeIndicator\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tresizeIndicator.style.borderRight = '';\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tbreak;*/\\r\\n\\t\\t\\t\\tcase \\\"mousedown\\\":\\r\\n\\t\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\t\\tthis.__resizeIndicatorMouseDownCount++;\\r\\n\\t\\t\\t\\t\\tif (this.__resizeIndicatorMouseDownInterval != -1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tclearTimeout(this.__resizeIndicatorMouseDownInterval);\\r\\n\\t\\t\\t\\t\\t\\tthis.__resizeIndicatorMouseDownInterval = -1;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__resizeIndicatorMouseDownInterval = setTimeout(\\r\\n\\t\\t\\t\\t\\t\\tfunction()\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(self.__resizeIndicatorMouseDownCount > 1)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tself.autoResize(colIndex);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tself.startResize(event,target);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t/*var headerRect = headerCell.getBoundingClientRect();\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar headerHeight = headerCell.offsetHeight;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar startOffset = headerRect.left - 6;\\r\\n\\t\\t\\t\\t\\t\\t\\t    var startWidth = parseInt(headerRect.width, 10);\\r\\n\\t\\t\\t\\t\\t\\t\\t    this.__resizeIndicatorHandler.style.top = headerRect.top + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t\\t\\t    this.__resizeIndicatorHandler.style.left = (startOffset + startWidth) + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t\\t\\t    this.__resizeIndicatorHandler.style.height = headerHeight + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tthis.__lastHeaderCell = headerCell;*/\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tself.__resizeIndicatorMouseDownCount = 0;\\r\\n\\t\\t\\t\\t\\t\\t},500);\\r\\n\\t\\t\\t\\t\\tstopEventPropogation();\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"mouseleave\\\":\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"click\\\":\\r\\n\\t\\t\\t\\t\\tstopEventPropogation();\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"dblclick\\\":\\r\\n\\t\\t\\t\\t\\tstopEventPropogation();\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createResizeHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__resizeHandler = this.util.createDiv(null,\\\"nsResizeHandle\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__resizeHandler,\\\"nsResizeHandle\\\" + this.__nsGrid.__theme);\\r\\n\\t\\t\\tthis.__resizeHandler.style.top = this.util.getCumulativeOffset(this.__resizingHeader,this.__nsGrid.__divTableWrapper).y + \\\"px\\\";\\r\\n\\t\\t\\tthis.__resizeHandler.style.left = this.__getResizeLeftPos(event) + \\\"px\\\";\\r\\n\\t\\t\\tvar scrollBarWidth = this.util.getScrollBarWidth(this.__nsGrid.__divCenterTableBodyContainer);\\r\\n\\t\\t\\tthis.__resizeHandler.style.height = (this.__nsGrid.__divCenterTableHeaderContainer.offsetHeight + this.__nsGrid.__divCenterTableBodyContainer.offsetHeight - scrollBarWidth) + \\\"px\\\";\\r\\n\\t\\t\\tvar maxZIndex = this.util.getMaxZIndex(this.__resizingHeader); \\r\\n\\t\\t\\tif(maxZIndex > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__resizeHandler.style.zIndex = maxZIndex + 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__nsGrid.__divOuterContainer.appendChild(this.__resizeHandler);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getResizeLeftPos = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar left = 0;\\r\\n\\t\\t\\tvar scrollContainer = this.__nsGrid.__getHorizontalScrollableContainer();\\r\\n\\t\\t\\tvar hasHorizontalScrollbar = scrollContainer.scrollWidth > scrollContainer.clientWidth;\\r\\n\\t\\t\\tif(hasHorizontalScrollbar)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar containerLeft = this.util.getOffSetByRect(this.__nsGrid.__divOuterContainer).left;\\r\\n\\t\\t\\t    left = (event.pageX - containerLeft + scrollContainer.scrollLeft);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar posEvent = this.util.getEventPosition(event);\\r\\n\\t\\t\\t\\tleft = posEvent.left;\\r\\n\\t\\t\\t}\\r\\n\\t\\t    return left;\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__getHeaderTopCell = function(cell,cellIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(cell || !this.util.isUndefinedOrNull(cellIndex))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = cell ? cell.cellIndex : cellIndex;\\r\\n\\t\\t\\t\\tvar headerRow = this.__nsGrid.__getHeaderHeaderRow(this.__nsGrid.__tblCenterHeader);\\r\\n\\t\\t\\t\\tif(headerRow && headerRow.cells.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar headerCells = headerRow.cells;\\r\\n\\t\\t\\t\\t\\treturn headerCells[index];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__getBodyTopCell = function(cell,cellIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(cell || !this.util.isUndefinedOrNull(cellIndex))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = cell ? cell.cellIndex : cellIndex;\\r\\n\\t\\t\\t\\tvar bodyRow = this.__nsGrid.__getBodyHeaderRow(this.__nsGrid.__tblCenterBody);\\r\\n\\t\\t\\t\\tif(bodyRow && bodyRow.cells.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar bodyCells = bodyRow.cells;\\r\\n\\t\\t\\t\\t\\treturn bodyCells[index];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleColumnResize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsGrid.__alignTables(false);\\r\\n\\t\\t\\tif(this.__nsGrid.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//this.__nsGrid.__setVirtualVariables(false,false,false,false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//this.__nsGrid.__setFixedCellsPosition();\\r\\n\\t\\t\\tthis.__nsGrid.__addStyleForFixedColumns();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getPreferredWidthForColumn = function(objColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(objColumn)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tvar addRows = function(sourceTable)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrRows = sourceTable.tBodies[0].rows;\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < arrRows.length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar sourceRow = arrRows[count];\\r\\n\\t\\t\\t\\t\\t\\t//Ignore Filter Row\\r\\n\\t\\t\\t\\t\\t\\tif(sourceRow && !self.util.hasStyleClass(sourceRow,\\\"nsGridFilterRow\\\") && sourceRow.cells && sourceRow.cells.length)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar row = document.createElement(\\\"TR\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\tvar cell = row.insertCell(-1);\\r\\n\\t\\t\\t\\t\\t\\t\\tcell.innerHTML = sourceRow.cells[objColumn[self.__nsGrid.__fieldColIndex]].innerHTML;\\r\\n\\t\\t\\t\\t\\t\\t\\tcell.style.whiteSpace = \\\"nowrap\\\";\\r\\n\\t\\t\\t\\t\\t\\t\\tcell.style.width = \\\"\\\";\\r\\n\\t\\t\\t\\t\\t\\t\\tvar arrChildren = cell.querySelectorAll(\\\".nsTruncateToFit\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\tfor(var childCount = 0;childCount < arrChildren.length;childCount++)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar child = arrChildren[childCount];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tself.util.removeStyleClass(child,\\\"nsTruncateToFit\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tbody.appendChild(row);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tvar dummyTable = this.__nsGrid.__tblCenterBody.cloneNode(false);\\r\\n\\t\\t\\t\\tdummyTable.setAttribute(\\\"id\\\",\\\"nsDummyTable\\\");\\r\\n\\t\\t\\t\\tdummyTable.style.width = \\\"auto\\\";\\r\\n\\t\\t\\t\\tvar body = document.createElement(\\\"tbody\\\");\\r\\n\\t\\t\\t\\tdummyTable.appendChild(body);\\r\\n\\t\\t\\t\\taddRows(this.__nsGrid.__tblCenterHeader);\\r\\n\\t\\t\\t\\taddRows(this.__nsGrid.__tblCenterBody);\\r\\n\\t\\t\\t\\t//this.__nsGrid.__divCenterTableBodyContainer.appendChild(dummyTable);\\r\\n\\t\\t\\t\\tdocument.body.appendChild(dummyTable);\\r\\n\\t\\t\\t\\tvar preferredWidth = dummyTable.getBoundingClientRect().width;\\r\\n\\t\\t\\t\\t//this.__nsGrid.__divCenterTableBodyContainer.removeChild(dummyTable);\\r\\n\\t\\t\\t\\tdocument.body.removeChild(dummyTable);\\r\\n\\t\\t\\t\\t//+1 so that headers doesnot wordwrap\\r\\n\\t\\t\\t\\treturn preferredWidth + 5;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn 0;\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\treturn NSGridColumnResize;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSGridColumnResize\\\",NSGridColumnResize);\\r\\n\\r\\nvar NSGridColumnMove = (function()\\r\\n{\\r\\n\\tvar NSGridColumnMove = function(nsGrid)\\r\\n\\t{\\r\\n\\t\\tthis.__MIN_DRAG_OFFSET = 100;\\r\\n\\t\\t\\r\\n\\t\\tthis.__nsGrid = nsGrid;\\r\\n\\t\\tthis.util = nsGrid.util;\\r\\n\\t\\t\\r\\n\\t\\tthis.__objColumnDrag = null;\\r\\n\\t\\tthis.__lastDragEvent = null;\\r\\n\\t\\tthis.__lastDragInfo = null;\\r\\n\\t\\tthis.__isColumnDragged = false;\\r\\n\\t\\tthis.__scrollLeft = false;\\r\\n\\t    this.__scrollRight = false;\\r\\n\\t\\tthis.__dragColumnMoveRef = null;\\r\\n\\t\\tthis.__dragColumnEndRef = null;\\r\\n\\t\\tthis.__scrollInterval = null;\\r\\n\\t\\tthis.__animationSteps = null;\\r\\n\\t\\tthis.__moveAttempts = 0;\\r\\n\\t\\tthis.__scrollableContainer = null;\\r\\n\\t\\tthis.__maxZIndex = 0;\\r\\n\\t\\t\\r\\n\\t\\tthis.handle = function(event,target)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__maxZIndex = this.util.getMaxZIndex(target);\\r\\n\\t\\t\\tthis.__scrollableContainer = this.__nsGrid.__getHorizontalScrollableContainer();\\r\\n\\t\\t\\tthis.__startColumnMove(event,target);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__startColumnMove = function(event,target)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//should be merging __onGridLine and __isColumnResizing\\r\\n\\t\\t\\tif(this.__nsGrid.__isColumnResizing || this.__nsGrid.__onGridLine)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar objColumn = this.__nsGrid.__getColumnObject(target.getAttribute(\\\"currentColumnIndex\\\"));\\r\\n\\t\\t\\tvar columnIndex = this.__nsGrid.__getColumnIndexByObject(objColumn);\\r\\n\\t\\t\\tif(columnIndex > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__dispatchEvent(NSGrid.COLUMN_MOVING,objColumn,{columnDetail:objColumn,columnIndex:columnIndex});\\r\\n\\t\\t\\t\\tthis.__lastDragEvent = event;\\r\\n\\t\\t\\t\\tthis.__isColumnDragged = true;\\r\\n\\t\\t\\t\\tthis.__objColumnDrag = {};\\r\\n\\t\\t\\t\\tthis.__objColumnDrag.source = target;\\r\\n\\t\\t\\t\\tthis.__objColumnDrag.objColumn = objColumn;\\r\\n\\t\\t\\t\\tthis.__objColumnDrag.columnIndex = columnIndex;\\r\\n\\t\\t\\t\\tvar position = this.util.getEventPosition(event,this.__nsGrid.__divCenterTableHeaderContainer);\\r\\n\\t\\t\\t\\tthis.__objColumnDrag.dragElement = this.__createCopyItem(target,position);\\r\\n\\t\\t\\t\\tthis.__objColumnDrag.dragElementAdded = false;\\r\\n\\t\\t\\t\\tthis.__objColumnDrag.position = position;\\r\\n\\t\\t\\t\\tthis.__dragColumnMoveRef = this.__dragColumnMoveHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.__dragColumnEndRef = this.__dragColumnEndHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(document,\\\"mousemove\\\",this.__dragColumnMoveRef);\\r\\n\\t\\t\\t\\tthis.util.addEvent(document,\\\"mouseup\\\",this.__dragColumnEndRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__dragColumnMoveHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar direction = this.__getDragDirection(event);\\r\\n\\t\\t\\tthis.__lastDragEvent = event;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar position = this.util.getEventPosition(event);\\r\\n\\t\\t\\tvar leftOffset = this.__objColumnDrag.position.left - position.left;\\r\\n\\t\\t    var topOffset = this.__objColumnDrag.position.top - position.top;\\r\\n\\t\\t    var dragRadius = (leftOffset * leftOffset) + (topOffset * topOffset);\\r\\n\\t\\t    if(!this.__objColumnDrag.dragElementAdded && dragRadius > this.__MIN_DRAG_OFFSET)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tdocument.body.appendChild(this.__objColumnDrag.dragElement);\\r\\n\\t\\t    \\tthis.__objColumnDrag.dragElementAdded = true;\\r\\n\\t\\t    }\\r\\n\\t\\t    this.__positionDragElement(event);\\r\\n\\t\\t    /*var posEvent = this.util.getEventPosition(event);\\r\\n\\t\\t    this.__objColumnDrag.dragElement.style.left = posEvent.left + \\\"px\\\";\\r\\n\\t        this.__objColumnDrag.dragElement.style.top = posEvent.top + \\\"px\\\";*/\\r\\n\\t\\t    if(this.__objColumnDrag.lastDropTarget)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.util.removeStyleClass(this.__objColumnDrag.lastDropTarget,\\\"nsDottedCell\\\"); \\r\\n\\t\\t    \\tthis.__objColumnDrag.lastDropTarget = null;\\r\\n\\t\\t    }\\r\\n\\t\\t    var target = this.util.getTarget(event);\\r\\n\\t\\t    var element = this.util.findParentBySelector(target,\\\".\\\" + this.__nsGrid.__CLASS_TABLE_HEADER_DROPPABLE_CELL);\\r\\n\\t\\t    if(element != this.__objColumnDrag.source)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.util.addStyleClass(element,\\\"nsDottedCell\\\");   \\r\\n\\t\\t    \\tthis.__objColumnDrag.lastDropTarget = element;\\r\\n\\t\\t    }\\r\\n\\t\\t    var objDrag = this.__getDragInfoObject(event,direction);\\r\\n\\t\\t    this.__handleScrollMovement(objDrag);\\r\\n\\t\\t    event.preventDefault();\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__dragColumnEndHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__lastDragEvent = null;\\r\\n\\t\\t\\tthis.__isColumnDragged = false;\\r\\n\\t\\t\\tthis.__stopScrollAnimation();\\r\\n\\t\\t\\tif(this.__objColumnDrag.lastDropTarget)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.util.removeStyleClass(this.__objColumnDrag.lastDropTarget,\\\"nsDottedCell\\\"); \\r\\n\\t\\t    \\tthis.__objColumnDrag.lastDropTarget = null;\\r\\n\\t\\t    }\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mousemove\\\",this.__dragColumnMoveRef);\\r\\n\\t\\t\\tthis.__dragColumnMoveRef = null;\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mouseup\\\",this.__dragColumnEndRef);\\r\\n\\t\\t\\tthis.__dragColumnEndRef = null;\\r\\n\\t\\t\\tif(this.__objColumnDrag.dragElementAdded)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar position = this.util.getEventPosition(event);\\r\\n\\t\\t\\t\\tposition.top = position.top + this.__nsGrid.__divCenterTableHeaderContainer.scrollTop;\\r\\n\\t\\t\\t\\tposition.left = position.left + this.__nsGrid.__divCenterTableHeaderContainer.scrollLeft;\\r\\n\\t\\t\\t\\tvar tablePosition = this.util.getOffSet(this.__nsGrid.__tblCenterHeader);\\r\\n\\t\\t\\t\\tif (position.top < tablePosition.top || position.top > (tablePosition.top + this.__nsGrid.__tblCenterHeader.offsetHeight)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(this.__objColumnDrag.dragElement,\\\"nsGhostHeader\\\");\\r\\n\\t\\t\\t\\t\\tvar transitionEndCallback = function()\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__removeDragElement();\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\tvar transition = new this.util.transition(this.__objColumnDrag.dragElement,transitionEndCallback.bind(this));\\r\\n\\t\\t\\t\\t\\tthis.__objColumnDrag.dragElement.style.left = (this.__objColumnDrag.position.left - this.__nsGrid.__divCenterTableHeaderContainer.scrollLeft) + \\\"px\\\"; //position.left + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\tthis.__objColumnDrag.dragElement.style.top = (this.__objColumnDrag.position.top ) + \\\"px\\\";\\r\\n\\t\\t\\t\\t    return;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar targetIndex = this.__getHeaderColumnByPosition(position);\\r\\n\\t\\t\\t    if (targetIndex > -1 && targetIndex != this.__objColumnDrag.columnIndex) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tthis.__nsGrid.moveColumn(this.__objColumnDrag.columnIndex,targetIndex);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    this.__removeDragElement();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__nsGrid.__dispatchEvent(NSGrid.COLUMN_MOVED,this.__objColumnDrag.objColumn,{columnDetail:this.__objColumnDrag.objColumn,columnIndex:this.__objColumnDrag.columnIndex});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createCopyItem = function(target,position)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar divDrag = null;\\r\\n\\t\\t\\tif(target && position)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivDrag = this.util.createDiv(this.__nsGrid.getID() + \\\"Drag\\\",this.__nsGrid.__CLASS_TABLE_HEADER_CELL);\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(divDrag , \\\"nsDataGridHeaderDrag\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(divDrag , \\\"nsDataGridHeaderDrag\\\" + this.__nsGrid.__theme);\\r\\n\\t\\t\\t\\tdivDrag.innerHTML = target.innerHTML;\\r\\n\\t\\t\\t\\tdivDrag.style.left = (position.left) + \\\"px\\\";\\r\\n\\t\\t\\t\\tdivDrag.style.top = (position.top) + \\\"px\\\";\\r\\n\\t\\t\\t\\t//giving 50px padding to the width if width is very less\\r\\n\\t\\t\\t\\tdivDrag.style.width = (target.offsetWidth + 50) + \\\"px\\\";\\r\\n\\t\\t\\t\\tdivDrag.style.height = target.offsetHeight + \\\"px\\\";\\r\\n\\t\\t\\t\\tif(this.__maxZIndex > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdivDrag.style.zIndex = this.__maxZIndex + 1;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn divDrag;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__positionDragElement = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar posEvent = this.util.getEventPosition(event);\\r\\n\\t\\t\\tvar rectDragElement = this.__objColumnDrag.dragElement.getBoundingClientRect();\\r\\n\\t        var objDimension = this.util.getDocumentDimension();\\r\\n\\t        var browserWidth = objDimension.width - 2;\\r\\n\\t        var browserHeight = objDimension.height - 2;\\r\\n\\t        // put DragElement vertically in middle of cursor\\r\\n\\t        var yPos = posEvent.top - (rectDragElement.height / 2);\\r\\n\\t        var xPos = posEvent.left;\\r\\n\\t        if (browserWidth > 0) \\r\\n\\t        {\\r\\n\\t            if ((xPos + this.__objColumnDrag.dragElement.clientWidth) > browserWidth) \\r\\n\\t            {\\r\\n\\t            \\txPos = browserWidth - this.__objColumnDrag.dragElement.clientWidth;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        if (browserHeight > 0) \\r\\n\\t        {\\r\\n\\t            if ((yPos + this.__objColumnDrag.dragElement.clientHeight) > browserHeight) \\r\\n\\t            {\\r\\n\\t            \\tyPos = browserHeight - this.__objColumnDrag.dragElement.clientHeight;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        xPos = Math.max(0,xPos);\\r\\n\\t        yPos = Math.max(0,yPos);\\r\\n\\t        this.__objColumnDrag.dragElement.style.left = xPos + \\\"px\\\";\\r\\n\\t        this.__objColumnDrag.dragElement.style.top = yPos + \\\"px\\\";\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__removeDragElement = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__objColumnDrag && this.__objColumnDrag.dragElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdocument.body.removeChild(this.__objColumnDrag.dragElement);\\r\\n\\t\\t\\t\\tthis.__objColumnDrag.dragElement = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__getHeaderColumnByPosition = function(position) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar headerBodyRow = this.__nsGrid.__getHeaderBodyRow(this.__nsGrid.__tblCenterHeader);\\r\\n\\t\\t\\tif(headerBodyRow)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar headerBodyRowCells = headerBodyRow.cells;\\r\\n\\t\\t\\t    for (var count = 0; count < headerBodyRowCells.length; count++) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tvar cell = headerBodyRowCells[count];\\r\\n\\t\\t\\t    \\tif(this.util.hasStyleClass(cell,this.__nsGrid.__CLASS_TABLE_HEADER_DROPPABLE_CELL))\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tvar rowPosition = this.util.getOffSet(cell);\\r\\n\\t\\t\\t\\t    \\tif (rowPosition.left <= position.left && position.left <= rowPosition.left + headerBodyRowCells[count].offsetWidth) \\r\\n\\t\\t\\t\\t    \\t{\\r\\n\\t\\t\\t\\t    \\t\\treturn count;\\r\\n\\t\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    return -1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\t/*Horizontal Scroll Logic for Edge cases */\\r\\n\\t\\tthis.__getDragDirection = function(event) \\r\\n\\t\\t{\\r\\n\\t\\t    var direction = null;\\r\\n\\t\\t    if (this.__lastDragEvent.clientX > event.clientX) \\r\\n\\t\\t    {\\r\\n\\t\\t        direction = \\\"left\\\";\\r\\n\\t\\t    }\\r\\n\\t\\t    else if (this.__lastDragEvent.clientX < event.clientX) \\r\\n\\t\\t    {\\r\\n\\t\\t        direction = \\\"right\\\";\\r\\n\\t\\t    }\\r\\n\\t\\t    return direction;\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__getDragInfoObject = function(event,direction) \\r\\n\\t\\t{\\r\\n\\t\\t    // localise x and y to the target component\\r\\n\\t\\t    var rect = this.__nsGrid.__divCenterTableHeaderContainer.getBoundingClientRect();\\r\\n\\t\\t    var x = event.clientX - rect.left;\\r\\n\\t\\t    var y = event.clientY - rect.top;\\r\\n\\t\\t    var objDragInfo = \\r\\n\\t\\t    {\\r\\n\\t\\t        event: event,\\r\\n\\t\\t        x: x,\\r\\n\\t\\t        y: y,\\r\\n\\t\\t        direction: direction\\r\\n\\t\\t    };\\r\\n\\t\\t    return objDragInfo;\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__handleScrollMovement = function(objDragInfo) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__lastDragInfo = objDragInfo;\\r\\n\\t\\t    if (!objDragInfo || !objDragInfo.direction) \\r\\n\\t\\t    {\\r\\n\\t\\t        return;\\r\\n\\t\\t    }\\r\\n\\t\\t    var adjustedScrollPos = this.__getAdjustedScrollPosition(objDragInfo);\\r\\n\\t\\t    this.__setScrollVariables(adjustedScrollPos);\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__getAdjustedScrollPosition = function(objDragInfo) \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn objDragInfo.x + this.__scrollableContainer.scrollLeft;\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__setScrollVariables = function (adjustedScrollPos) \\r\\n\\t\\t{\\r\\n\\t\\t    if (this.__scrollableContainer) \\r\\n\\t\\t    {\\r\\n\\t\\t        //below logic checks if the scroll should move right or left\\r\\n\\t\\t        var xPosLeft = this.__scrollableContainer.scrollLeft;\\r\\n\\t\\t        var xPosRight = xPosLeft + this.__scrollableContainer.clientWidth;\\r\\n\\t\\t        this.__scrollLeft = adjustedScrollPos < (xPosLeft + 50);\\r\\n\\t\\t        this.__scrollRight = adjustedScrollPos > (xPosRight - 100);\\r\\n\\t\\t        if(this.__scrollLeft || this.__scrollRight) \\r\\n\\t\\t        {\\r\\n\\t\\t            this.__startScrollAnimation();\\r\\n\\t\\t        }\\r\\n\\t\\t        else \\r\\n\\t\\t        {\\r\\n\\t\\t            this.__stopScrollAnimation();\\r\\n\\t\\t        }\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__startScrollAnimation = function() \\r\\n\\t\\t{\\r\\n\\t\\t    if (!this.__scrollInterval) \\r\\n\\t\\t    {\\r\\n\\t\\t        this.__animationSteps = 0;\\r\\n\\t\\t        this.__moveAttempts = 0;\\r\\n\\t\\t        this.__scrollInterval = setInterval(this.__scrollBody.bind(this), 100);\\r\\n\\t\\t        if (this.__scrollLeft) \\r\\n\\t\\t        {\\r\\n\\t\\t        \\tthis.__setIcon(\\\"left\\\",true);\\r\\n\\t\\t            //this.dragAndDropService.setGhostIcon(dragAndDropService_1.DragAndDropService.ICON_LEFT, true);\\r\\n\\t\\t        }\\r\\n\\t\\t        else \\r\\n\\t\\t        {\\r\\n\\t\\t        \\tthis.__setIcon(\\\"right\\\",true);\\r\\n\\t\\t            //this.dragAndDropService.setGhostIcon(dragAndDropService_1.DragAndDropService.ICON_RIGHT, true);\\r\\n\\t\\t        }\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__stopScrollAnimation = function () \\r\\n\\t\\t{\\r\\n\\t\\t    if (this.__scrollInterval) \\r\\n\\t\\t    {\\r\\n\\t\\t        clearInterval(this.__scrollInterval);\\r\\n\\t\\t        this.__scrollInterval = null;\\r\\n\\t\\t        this.__setIcon(\\\"move\\\",false);\\r\\n\\t\\t        //this.dragAndDropService.setGhostIcon(dragAndDropService_1.DragAndDropService.ICON_MOVE);\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__scrollBody = function() \\r\\n\\t\\t{\\r\\n\\t\\t    var pixelsToMove;\\r\\n\\t\\t    this.__animationSteps++;\\r\\n\\t\\t    pixelsToMove = 10 + (this.__animationSteps * 5);\\r\\n\\t\\t    if (pixelsToMove > 100) \\r\\n\\t\\t    {\\r\\n\\t\\t        pixelsToMove = 100;\\r\\n\\t\\t    }\\r\\n\\t\\t    var pixelsMoved = 0;\\r\\n\\t\\t    if (this.__scrollLeft) \\r\\n\\t\\t    {\\r\\n\\t\\t        pixelsMoved = this.__scrollBodyHorizontally(-pixelsToMove);\\r\\n\\t\\t    }\\r\\n\\t\\t    else if (this.__scrollRight) \\r\\n\\t\\t    {\\r\\n\\t\\t        pixelsMoved = this.__scrollBodyHorizontally(pixelsToMove);\\r\\n\\t\\t    }\\r\\n\\t\\t    if (pixelsMoved !== 0) \\r\\n\\t\\t    {\\r\\n\\t\\t        this.__handleScrollMovement(this.__lastDragInfo);\\r\\n\\t\\t        this.__moveAttempts = 0;\\r\\n\\t\\t    }\\r\\n\\t\\t    else \\r\\n\\t\\t    {\\r\\n\\t\\t        this.__moveAttempts++;\\r\\n\\t\\t        if (this.__moveAttempts > 7) \\r\\n\\t\\t        {\\r\\n\\t\\t            if (this.__scrollLeft) \\r\\n\\t\\t            {\\r\\n\\t\\t                //this.columnController.setColumnPinned(this.__lastDragInfo.dragItem, column_1.Column.PINNED_LEFT);\\r\\n\\t\\t            }\\r\\n\\t\\t            else \\r\\n\\t\\t            {\\r\\n\\t\\t                //this.columnController.setColumnPinned(this.__lastDragInfo.dragItem, column_1.Column.PINNED_RIGHT);\\r\\n\\t\\t            }\\r\\n\\t\\t            this.__pushScroll();\\r\\n\\t\\t        }\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__scrollBodyHorizontally = function(pixels) \\r\\n\\t\\t{\\r\\n\\t\\t    var oldScrollPosition = this.__scrollableContainer.scrollLeft;\\r\\n\\t\\t    this.__scrollableContainer.scrollLeft = oldScrollPosition + pixels;\\r\\n\\t\\t    var newScrollPosition = this.__scrollableContainer.scrollLeft;\\r\\n\\t\\t    return newScrollPosition - oldScrollPosition;\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__pushScroll = function() \\r\\n\\t\\t{\\r\\n\\t\\t    if (this.__isColumnDragged) \\r\\n\\t\\t    {\\r\\n\\t\\t        this.__handleScrollMovement(this.__lastDragEvent);\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setIcon = function(iconName,animate)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(iconName)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar divDrag = this.__objColumnDrag.dragElement;\\r\\n\\t\\t\\t\\tvar divMove = divDrag.querySelector(\\\".nsHeaderMove\\\");\\r\\n\\t\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\t\\tvar iconID = null;\\r\\n\\t\\t\\t\\tswitch(iconName) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t         case \\\"left\\\":\\r\\n\\t\\t\\t        \\t iconID = new NSSvgShapes().__MOVE_ICON_ID;\\r\\n\\t\\t\\t             break;\\r\\n\\t\\t\\t         case \\\"right\\\":\\r\\n\\t\\t\\t        \\t iconID = new NSSvgShapes().__RIGHT_ICON_ID;\\r\\n\\t\\t\\t             break;\\r\\n\\t\\t\\t         case \\\"move\\\":\\r\\n\\t\\t\\t        \\t iconID = new NSSvgShapes().__LEFT_ICON_ID;\\r\\n\\t\\t\\t             break;\\r\\n\\t\\t\\t         default:\\r\\n\\t\\t\\t        \\t iconID = null;\\r\\n\\t\\t\\t             break;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(divMove)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeAllChildren(divMove);\\r\\n\\t\\t\\t\\t\\tif(iconID)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar containerID = divMove.getAttribute(\\\"id\\\");\\r\\n\\t\\t\\t\\t\\t\\tif(!containerID)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tcontainerID = this.util.getUniqueId();\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tvar svg = objSVG.addSVG(divMove,containerID + iconID + \\\"svg\\\",\\\"nsMoveIcon\\\",null,null,null,null,null,null,false);\\r\\n\\t\\t\\t\\t\\t\\tthis.util.addStyleClass(svg,\\\"nsMoveIconTheme\\\");\\r\\n\\t\\t\\t\\t\\t\\tobjSVG.addUse(svg,containerID + \\\"use\\\",null,\\\"#\\\" + iconID);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tanimate ? this.util.addStyleClass(divMove,\\\"nsAnimateLeftToRight\\\") : this.util.removeStyleClass(divMove,\\\"nsAnimateLeftToRight\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t/*End of Horizontal Scroll Logic for Edge cases */\\r\\n\\t};\\r\\n\\treturn NSGridColumnMove;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSGridColumnMove\\\",NSGridColumnMove);\\r\\n\\r\\nvar NSGridFilter = (function()\\r\\n{\\r\\n\\tvar NSGridFilter = function(nsGrid)\\r\\n\\t{\\r\\n\\t\\tthis.SEARCH_INTERVAL = 500;\\r\\n\\t\\tthis.__nsGrid = nsGrid;\\r\\n\\t\\tthis.__enableApply = true;\\r\\n\\t\\tthis.__isOrFilter = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.util = nsGrid.util;\\r\\n\\t\\tthis.isFiltered = false;\\r\\n\\t\\tthis.__interval = null;\\r\\n\\t\\tthis.__objControl = {};\\r\\n\\t\\tthis.__filteredColumn = [];\\r\\n\\t\\tthis.__objAdvancedFilterSetting = {};\\r\\n\\t\\tthis.__nsPopUp = null;\\r\\n\\t\\tthis.__maxZIndex = -1;\\r\\n\\t\\tthis.__documentClickRef = null;\\r\\n\\t\\tthis.__documentKeyUpRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.processColumnObject = function(objColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsGrid.__enableFilter)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(objColumn.hasOwnProperty(\\\"enableFilter\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjColumn.enableFilter = Boolean.parse(objColumn[\\\"enableFilter\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjColumn.enableFilter = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(objColumn.enableFilter)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar objFilter = objColumn[\\\"filter\\\"];\\r\\n\\t\\t\\t\\t\\tif(objFilter)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(objFilter.hasOwnProperty(\\\"filterRenderer\\\"))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar filterRenderer = objFilter[\\\"filterRenderer\\\"];\\r\\n\\t\\t\\t\\t\\t\\t\\tif (typeof filterRenderer === \\\"string\\\" || filterRenderer instanceof String)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tif(this.util.isFunction(filterRenderer))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tobjFilter.filterRenderer = this.__nsGrid.__context[filterRenderer];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(objFilter.hasOwnProperty(\\\"filterTemplate\\\") && objFilter[\\\"filterTemplate\\\"])\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tobjFilter.filterTemplate = this.util.getTemplate(objFilter[\\\"filterTemplate\\\"]);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(objFilter.hasOwnProperty(\\\"type\\\") && objFilter[\\\"type\\\"] == NSGrid.FILTER_TYPE_DATE)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__setDefaultDatePicker();\\r\\n\\t\\t\\t\\t\\t\\t\\tobjFilter.filterDateComponent = new this.__nsGrid.__components[\\\"datePicker\\\"]();\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tobjFilter.filterRenderer = this.__defaultRenderer.bind(this);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(this.__nsGrid.__enableAdvancedFilter)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(objFilter.hasOwnProperty(\\\"enableAdvancedFilter\\\"))\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tobjFilter.enableAdvancedFilter = Boolean.parse(objFilter[\\\"enableAdvancedFilter\\\"]);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tobjFilter.enableAdvancedFilter = true;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tobjFilter[\\\"advancedFilterType\\\"] = objFilter[\\\"advancedFilterType\\\"] ? objFilter[\\\"advancedFilterType\\\"] : NSGrid.ADVANCED_FILTER_TEXT;\\r\\n\\t\\t\\t\\t\\t\\t\\tif(objFilter.hasOwnProperty(\\\"advancedFilterHandler\\\"))\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar advancedFilterHandler = objFilter[\\\"advancedFilterHandler\\\"];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tif (typeof advancedFilterHandler === \\\"string\\\" || advancedFilterHandler instanceof String)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif(this.util.isFunction(advancedFilterHandler))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tobjFilter.advancedFilterHandler = this.__nsGrid.__context[advancedFilterHandler];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tobjFilter.enableAdvancedFilter = false;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tobjColumn[\\\"filter\\\"] = {filterRenderer:this.__defaultRenderer.bind(this),enableAdvancedFilter:this.__nsGrid.__enableAdvancedFilter,advancedFilterType:NSGrid.ADVANCED_FILTER_TEXT};\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.addFilterRenderer = function(rendererRow,rendererCell,colItem,colIndex,colID)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsGrid.__enableFilter && colItem && colItem[\\\"enableFilter\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objFilter = colItem[\\\"filter\\\"];\\r\\n\\t\\t\\t\\tif(objFilter)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar divHeaderRendererContainer = this.util.createDiv(colID + \\\"rendererContainer\\\",\\\"nsFilterParentContainer\\\"); \\r\\n\\t\\t\\t\\t\\trendererCell.appendChild(divHeaderRendererContainer);\\r\\n\\t\\t\\t\\t\\tvar dataField = colItem[\\\"dataField\\\"];\\r\\n\\t\\t\\t\\t\\tvar type = objFilter[\\\"type\\\"];\\r\\n\\t\\t\\t\\t\\tvar templateRenderer = objFilter[\\\"filterTemplate\\\"];\\r\\n\\t\\t\\t\\t\\tvar itemRenderer = objFilter[\\\"filterRenderer\\\"];\\r\\n\\t\\t\\t\\t\\tvar dateComponent = objFilter[\\\"filterDateComponent\\\"];\\r\\n\\t\\t\\t\\t\\tif(dateComponent && type == NSGrid.FILTER_TYPE_DATE)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar config = objFilter[\\\"config\\\"] || {};\\r\\n\\t\\t\\t\\t\\t\\tthis.dateRenderer(dateComponent,dataField,divHeaderRendererContainer,config,objFilter,this.dateSelectedHandler.bind(this,objFilter));\\r\\n\\t\\t\\t\\t\\t\\tthis.__objControl[dataField] = {control:dateComponent,config:config,type:\\\"date\\\"};\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if(itemRenderer)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar objRenderer = itemRenderer(colItem,colIndex,rendererCell,rendererRow);\\r\\n\\t\\t\\t\\t\\t\\tif(objRenderer)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(this.util.isString(objRenderer))\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar compSpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompSpan.innerHTML = objRenderer;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tdivHeaderRendererContainer.appendChild(compSpan);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tdivHeaderRendererContainer.appendChild(objRenderer);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if(templateRenderer)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdivHeaderRendererContainer.appendChild(templateRenderer.cloneNode(true));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(objFilter && objFilter[\\\"enableAdvancedFilter\\\"])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar rendererID = this.__getRendererID(dataField);\\r\\n\\t\\t\\t\\t\\t\\tvar divFilterIconContainer = this.util.createDiv(rendererID + \\\"FilterIconContainer\\\",\\\"nsFilterIconContainer\\\");\\r\\n\\t\\t\\t\\t\\t\\tdivFilterIconContainer.setAttribute(\\\"field\\\",dataField);\\r\\n\\t\\t\\t\\t\\t\\tthis.util.addEvent(divFilterIconContainer,\\\"click\\\",this.__filterIconClickHandler.bind(this));\\r\\n\\t\\t\\t\\t\\t\\tif(this.__nsGrid.__getColumnCustomIcon(colItem,\\\"filter\\\"))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdivFilterIconContainer.innerHTML = this.__nsGrid.__getColumnCustomIcon(colItem,\\\"filter\\\");\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\t\\t\\t\\t\\tvar filterID = new NSSvgShapes().__FILTER_ICON_ID;\\r\\n\\t\\t\\t\\t\\t\\t\\tvar svg = objSVG.addSVG(divFilterIconContainer,rendererID + \\\"filtersvg\\\",\\\"nsFilterIconSVG\\\",null,null,null,null,null,null,true);\\r\\n\\t\\t\\t\\t\\t\\t\\tobjSVG.addUse(svg,rendererID + \\\"use\\\",null,\\\"#\\\" + filterID);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tthis.util.addStyleClass(divHeaderRendererContainer,\\\"nsAdvancedFilterParentContainer\\\");\\r\\n\\t\\t\\t\\t\\t\\tdivHeaderRendererContainer.appendChild(divFilterIconContainer);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.dateRenderer = function(dateComponent,dataField,parent,config,objFilter,dateSelectedHandler)\\r\\n\\t\\t{\\r\\n\\t\\t\\tconfig.dateSelectedHandler = this.dateSelectedHandler.bind(this,objFilter,config);//dateSelectedHandler;\\r\\n\\t\\t\\tdateComponent.init(config);\\r\\n\\t\\t\\tvar element = dateComponent.getElement();\\r\\n\\t\\t\\tif(element)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\telement.setAttribute(\\\"field\\\",dataField);\\r\\n\\t\\t\\t\\tparent.appendChild(element);\\r\\n\\t\\t\\t\\tdateComponent.elementAdded();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.warning(\\\"NSGrid\\\",\\\"Date Component UI is null.\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.dateSelectedHandler = function(objFilter,config,isTyping)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar dateComponent = objFilter[\\\"filterDateComponent\\\"];\\r\\n\\t\\t\\tif(dateComponent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar date = dateComponent.getDate();\\r\\n\\t\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\t\\t//clear advanced Filter object if coming from normal filter\\r\\n\\t\\t\\t\\tif(!this.__nsPopUp)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar dataField = target.getAttribute(\\\"field\\\");\\r\\n\\t\\t\\t\\t\\tif(dataField)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__objAdvancedFilterSetting[dataField] = null;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(isTyping)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tclearTimeout(this.__interval);\\r\\n\\t\\t\\t\\t\\tvar base = this;\\r\\n\\t\\t\\t\\t\\tthis.__interval = setTimeout(function(){\\r\\n\\t\\t\\t\\t\\t\\t\\tbase.__filterGrid.bind(base)();\\r\\n\\t\\t\\t\\t\\t}, this.SEARCH_INTERVAL);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__filterGrid.bind(this)();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.setFiltersInControls = function(filter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsGrid.__enableFilter && this.__objControl && filter)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t for(var field in this.__objControl)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t if(filter[field])\\r\\n\\t\\t\\t\\t     {\\r\\n\\t\\t\\t\\t\\t\\t var control = this.__objControl[field];\\r\\n\\t\\t\\t\\t\\t\\t if(control && control.control)\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t if(control.type == \\\"date\\\")\\r\\n\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t control.control.setDate(filter[field]);\\r\\n\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t\\t else if(control.type == \\\"text\\\")\\r\\n\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t control.control.value = filter[field];\\r\\n\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t     }\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.resetFilters = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsGrid.__enableFilter && this.__objControl)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t for(var field in this.__objControl)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t var control = this.__objControl[field];\\r\\n\\t\\t\\t\\t\\t if(control && control.control)\\r\\n\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t if(control.type == \\\"date\\\" && control.control.getDate())\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t control.control.setDate(null);\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t else if(control.type == \\\"text\\\" && control.control.value)\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t control.control.value = \\\"\\\";\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t this.__resetFiltering();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.remove = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__documentClickRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(document,\\\"click\\\", this.__documentClickRef, false);\\r\\n\\t\\t\\t\\tthis.__documentClickRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__documentKeyUpRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(document,\\\"keyup\\\", this.__documentKeyUpRef, false);\\r\\n\\t\\t\\t\\tthis.__documentKeyUpRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.clearFilters = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\t for(var field in this.__objControl)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t var control = this.__objControl[field];\\r\\n\\t\\t\\t\\t if(control && control.control)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t if(control.type == \\\"date\\\" && control.control.getDate())\\r\\n\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t control.control.setDate(null);\\r\\n\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t else if(control.type == \\\"text\\\" && control.control.value)\\r\\n\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t control.control.value = \\\"\\\";\\r\\n\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t this.__objAdvancedFilterSetting = {};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.resetVariables = function() \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__filteredColumn = [];\\r\\n\\t\\t\\tthis.__objAdvancedFilterSetting = [];\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__documentClickRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__documentClickRef = this.__documentClickHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(document,\\\"click\\\", this.__documentClickRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__documentKeyUpRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__documentKeyUpRef = this.__documentKeyUpHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(document,\\\"keyup\\\", this.__documentKeyUpRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__maxZIndex = this.util.getMaxZIndex();\\r\\n\\t\\t\\tthis.__injectInNSGrid();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__defaultRenderer = function(colItem,colIndex,cell,row)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(colItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objFilter = colItem[\\\"filter\\\"];\\r\\n\\t\\t\\t\\tvar dataField = colItem[\\\"dataField\\\"];\\r\\n\\t\\t\\t\\tvar headerText = colItem[\\\"headerText\\\"];\\r\\n\\t\\t\\t\\tvar rendererID = this.__getRendererID(dataField);\\r\\n\\t\\t\\t\\tvar divRenderer = this.util.createDiv(rendererID,\\\"nsFilterContainer\\\");\\r\\n\\t\\t\\t\\tvar txtFilter = this.util.createElement(\\\"input\\\",\\\"txt\\\" + rendererID,\\\"nsFilter\\\");\\r\\n\\t\\t\\t\\t//this.util.addStyleClass(txtFilter,\\\"nsSearchInlineTextBox\\\");\\r\\n\\t\\t\\t\\ttxtFilter.setAttribute(\\\"type\\\",\\\"search\\\");\\r\\n\\t\\t\\t\\ttxtFilter.setAttribute(\\\"autocomplete\\\",\\\"off\\\");\\r\\n\\t\\t\\t\\ttxtFilter.setAttribute(\\\"field\\\",dataField);\\r\\n\\t\\t\\t\\t//txtFilter.setAttribute(\\\"placeholder\\\",\\\"Search \\\" + headerText);\\r\\n\\t\\t\\t\\tthis.util.addEvent(txtFilter,\\\"input\\\",this.__txtInputChangeHandler.bind(this));\\r\\n\\t\\t\\t\\t//this.util.addEvent(txtFilter,\\\"search\\\",this.__txtInputChangeHandler.bind(this));\\r\\n\\t\\t\\t\\t//var divSearch = this.util.getSearchTextBox(txtFilter);\\r\\n\\t\\t\\t\\t//txtFilter.style.width = (cell.offsetWidth / 2) + \\\"px\\\";\\r\\n\\t\\t\\t\\tdivRenderer.appendChild(txtFilter);\\r\\n\\t\\t\\t\\tthis.__objControl[dataField] = {control:txtFilter,type:\\\"text\\\"};\\r\\n\\t\\t\\t\\treturn divRenderer;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__txtInputChangeHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\tvar dataField = target.getAttribute(\\\"field\\\");\\r\\n\\t\\t\\tif(dataField)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__objAdvancedFilterSetting[dataField] = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tclearTimeout(this.__interval);\\r\\n\\t\\t\\tvar base = this;\\r\\n\\t\\t\\tthis.__interval = setTimeout(function(){\\r\\n\\t\\t\\t\\t\\tbase.__filterGrid.bind(base)();\\r\\n\\t\\t\\t\\t}, this.SEARCH_INTERVAL);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__filterIconClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\ttarget = this.util.getWebComponentElement(target);\\r\\n\\t\\t\\tif(target && !this.util.hasStyleClass(target,\\\"nsFilterIconContainer\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttarget = this.util.findParentBySelector(target,\\\".nsFilterIconContainer\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar dataField = target.getAttribute(\\\"field\\\");\\r\\n\\t\\t\\tvar objColumn = this.__nsGrid.__getColumnObjectByDataField(dataField);\\r\\n\\t\\t\\tvar objFilter = objColumn[\\\"filter\\\"];\\r\\n\\t\\t\\tif(this.__nsPopUp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__removePopUp();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar control = this.__objControl[dataField];\\r\\n\\t\\t\\tif(control && control.control)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t(control.type == \\\"date\\\") ? control.control.setDate(null) : control.control.value = \\\"\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar colID = this.__getRendererID(dataField);\\r\\n\\t\\t\\tvar popUpPos = objFilter[\\\"advancedFilterPopUpPos\\\"];\\r\\n\\t\\t\\tif(!popUpPos)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tpopUpPos = this.util.POS_BOTTOMLEFT;\\r\\n\\t\\t\\t\\tif(objColumn[this.__nsGrid.__fieldColIndex] === 0 || (this.__nsGrid.__enableGrouping && objColumn[this.__nsGrid.__fieldColIndex] === 1))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tpopUpPos = this.util.POS_BOTTOMRIGHT; \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar popUpSetting = {id:colID + \\\"detailFilterContainer\\\",type:\\\"div\\\",width:275,position:popUpPos,closeOnOutsideClick:true};\\r\\n\\t\\t\\tthis.__nsPopUp = new this.util.nsPopUp(popUpSetting);\\r\\n\\t\\t\\tthis.__nsPopUp.create();\\r\\n\\t\\t\\tvar popUp = this.__nsPopUp.getPopUp();\\r\\n\\t\\t\\tif(this.__maxZIndex > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tpopUp.style.zIndex = this.__maxZIndex + 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.addEvent(popUp,\\\"click\\\",this.__detailFilterClickHandler.bind(this));\\r\\n\\t\\t\\tvar advancedFilterType = objFilter[\\\"advancedFilterType\\\"];\\r\\n\\t\\t\\tif(objFilter.advancedFilterHandler)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjFilter.advancedFilterHandler(dataField,this.__nsPopUp,this.__objAdvancedFilterSetting,this.__getRendererID(dataField),this.__enableApply,\\r\\n\\t\\t\\t\\t\\t\\tthis.__createApplySection.bind(this),this.__advanceFilterGrid.bind(this),this.__removePopUp.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(advancedFilterType === NSGrid.ADVANCED_FILTER_TEXT)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__getTextDetailFilter(dataField,objFilter);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(advancedFilterType === NSGrid.ADVANCED_FILTER_NUMBER)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__getNumberDetailFilter(dataField,objFilter);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(advancedFilterType === NSGrid.ADVANCED_FILTER_LIST)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__getListDetailFilter(dataField,objFilter);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(advancedFilterType === NSGrid.ADVANCED_FILTER_DATE)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__getDateDetailFilter(dataField,objFilter);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__nsPopUp.show();\\r\\n\\t\\t\\tthis.__nsPopUp.placePopUp(event);\\r\\n\\t\\t\\t//event.stopImmediatePropagation();\\r\\n\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__filterGrid = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t var conditionFilter = null;\\r\\n\\t\\t\\t if(this.__isOrFilter)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t var filter = [];\\r\\n\\t\\t\\t\\t var setting = {};\\r\\n\\t\\t\\t\\t for(var field in this.__objControl)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t var control = this.__objControl[field];\\r\\n\\t\\t\\t\\t\\t if(control && control.control)\\r\\n\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t if(control.type == \\\"date\\\" && control.control.getDate())\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t var item = {};\\r\\n\\t\\t\\t\\t\\t\\t\\t item[field] = control.control.getDate();\\r\\n\\t\\t\\t\\t\\t\\t\\t var config = control.config || {};\\r\\n\\t\\t\\t\\t\\t\\t\\t setting[field] = {matchType:\\\"equals\\\",type:\\\"date\\\"};\\r\\n\\t\\t\\t\\t\\t\\t\\t for(var key in config)\\r\\n\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t if(this.util.isUndefined(setting[field][key]))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t setting[field][key] = config[key];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t\\t filter.push(item);\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t else if(control.type == \\\"text\\\" && control.control.value)\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t var item = {};\\r\\n\\t\\t\\t\\t\\t\\t\\t item[field] = control.control.value;\\r\\n\\t\\t\\t\\t\\t\\t\\t setting[field] = {caseSensitive:false,multiline:false,matchType:new NSFilter().CONTAINS};\\r\\n\\t\\t\\t\\t\\t\\t\\t filter.push(item);\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t conditionFilter = filter;\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t else\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t var filter = {};\\r\\n\\t\\t\\t\\t var setting = {};\\r\\n\\t\\t\\t\\t for(var field in this.__objControl)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t var control = this.__objControl[field];\\r\\n\\t\\t\\t\\t\\t if(control && control.control)\\r\\n\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t if(control.type == \\\"date\\\" && control.control.getDate())\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t filter[field] = control.control.getDate();\\r\\n\\t\\t\\t\\t\\t\\t\\t var config = control.config || {};\\r\\n\\t\\t\\t\\t\\t\\t\\t setting[field] = {matchType:\\\"equals\\\",type:\\\"date\\\"};\\r\\n\\t\\t\\t\\t\\t\\t\\t for(var key in config)\\r\\n\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t if(this.util.isUndefined(setting[field][key]))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t setting[field][key] = config[key];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t else if(control.type == \\\"text\\\" && control.control.value)\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t filter[field] = control.control.value;\\r\\n\\t\\t\\t\\t\\t\\t\\t setting[field] = {caseSensitive:false,multiline:false,matchType:new NSFilter().CONTAINS};\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t conditionFilter = Object.keys(filter);\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t var isReset = false;\\r\\n\\t\\t\\t if(filter && conditionFilter && conditionFilter.length > 0)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t this.__handleFiltering(filter,setting);\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t else\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t this.__resetFiltering();\\r\\n\\t\\t\\t\\t isReset = true;\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t this.__nsGrid.__callFunctionInsideGridType(\\\"afterFiltering\\\",isReset);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__advanceFilterGrid = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t var fieldSetting = null;\\r\\n\\t\\t\\t var field = null;\\r\\n\\t\\t\\t var conditionFilter = null;\\r\\n\\t\\t\\t if(this.__isOrFilter)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t var filter = [];\\r\\n\\t\\t\\t\\t var setting = {};\\r\\n\\t\\t\\t\\t var item = null;\\r\\n\\t\\t\\t\\t for(field in this.__objAdvancedFilterSetting)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t fieldSetting = this.__objAdvancedFilterSetting[field];\\r\\n\\t\\t\\t\\t\\t if(fieldSetting)\\r\\n\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t if(fieldSetting.type == NSGrid.ADVANCED_FILTER_DATE)\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t item = {};\\r\\n\\t\\t\\t\\t\\t\\t\\t item[field] = new Date();\\r\\n\\t\\t\\t\\t\\t\\t\\t filter.push(item);\\r\\n\\t\\t\\t\\t\\t\\t\\t var config = fieldSetting.config || {};\\r\\n\\t\\t\\t\\t\\t\\t\\t setting[field] = {matchType1:fieldSetting.firstSelectValue,firstDate:fieldSetting.firstDate,operation:fieldSetting.operationSelectValue,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t matchType2:fieldSetting.secondSelectValue,secondDate:fieldSetting.secondDate,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t type:NSGrid.ADVANCED_FILTER_DATE};\\r\\n\\t\\t\\t\\t\\t\\t\\t for(var key in config)\\r\\n\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t if(this.util.isUndefined(setting[field][key]))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t setting[field][key] = config[key];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t else if(fieldSetting[\\\"arrText\\\"] && fieldSetting[\\\"arrTextField\\\"])\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t var arrTextField = fieldSetting[\\\"arrTextField\\\"];\\r\\n\\t\\t\\t\\t\\t\\t\\t var arrText = fieldSetting[\\\"arrText\\\"];\\r\\n\\t\\t\\t\\t\\t\\t\\t var length = arrText.length;\\r\\n\\t\\t\\t\\t\\t\\t\\t filter[field] = [];\\r\\n\\t\\t\\t\\t\\t\\t\\t for(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t item = {};\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t item[field] = arrText[count][arrTextField];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t filter.push(item);\\r\\n\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t\\t setting[field] = {caseSensitive:fieldSetting.caseSensitive,multiline:false,matchType:fieldSetting.matchType};\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t else\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t item = {};\\r\\n\\t\\t\\t\\t\\t\\t\\t item[field] = fieldSetting.text;\\r\\n\\t\\t\\t\\t\\t\\t\\t filter.push(item);\\r\\n\\t\\t\\t\\t\\t\\t\\t setting[field] = {caseSensitive:fieldSetting.caseSensitive,multiline:false,matchType:fieldSetting.matchType};\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t conditionFilter = filter;\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t else\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t var filter = {};\\r\\n\\t\\t\\t\\t var setting = {};\\r\\n\\t\\t\\t\\t for(field in this.__objAdvancedFilterSetting)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t fieldSetting = this.__objAdvancedFilterSetting[field];\\r\\n\\t\\t\\t\\t\\t if(fieldSetting)\\r\\n\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t if(fieldSetting.type == NSGrid.ADVANCED_FILTER_DATE)\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t filter[field] = new Date();\\r\\n\\t\\t\\t\\t\\t\\t\\t var config = fieldSetting.config || {};\\r\\n\\t\\t\\t\\t\\t\\t\\t setting[field] = {matchType1:fieldSetting.firstSelectValue,firstDate:fieldSetting.firstDate,operation:fieldSetting.operationSelectValue,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t matchType2:fieldSetting.secondSelectValue,secondDate:fieldSetting.secondDate,\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t type:NSGrid.ADVANCED_FILTER_DATE};\\r\\n\\t\\t\\t\\t\\t\\t\\t for(var key in config)\\r\\n\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t if(this.util.isUndefined(setting[field][key]))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t setting[field][key] = config[key];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t else if(fieldSetting[\\\"arrText\\\"] && fieldSetting[\\\"arrTextField\\\"])\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t var arrTextField = fieldSetting[\\\"arrTextField\\\"];\\r\\n\\t\\t\\t\\t\\t\\t\\t var arrText = fieldSetting[\\\"arrText\\\"];\\r\\n\\t\\t\\t\\t\\t\\t\\t var length = arrText.length;\\r\\n\\t\\t\\t\\t\\t\\t\\t filter[field] = [];\\r\\n\\t\\t\\t\\t\\t\\t\\t for(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t filter[field].push(arrText[count][arrTextField]);\\r\\n\\t\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t\\t setting[field] = {caseSensitive:fieldSetting.caseSensitive,multiline:false,matchType:fieldSetting.matchType};\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t\\t else\\r\\n\\t\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t\\t filter[field] = fieldSetting.text;\\r\\n\\t\\t\\t\\t\\t\\t\\t setting[field] = {caseSensitive:fieldSetting.caseSensitive,multiline:false,matchType:fieldSetting.matchType};\\r\\n\\t\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t conditionFilter = Object.keys(filter);\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t var isReset = false;\\r\\n\\t\\t\\t if(filter && conditionFilter && conditionFilter.length > 0)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t this.__handleFiltering(filter,setting);\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t else\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t this.__resetFiltering();\\r\\n\\t\\t\\t\\t isReset = true;\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t this.__nsGrid.__callFunctionInsideGridType(\\\"afterFiltering\\\",isReset);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleFiltering = function(filter,setting,enableHighlighting,recordLimit)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsGrid.__enableFilter)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar eventParam = {filter:filter,setting:setting,recordLimit:recordLimit};\\r\\n\\t\\t\\t\\tthis.__nsGrid.__dispatchEvent(NSGrid.FILTER_CHANGING,eventParam,eventParam);\\r\\n\\t\\t\\t\\tthis.__filteredColumn = [];\\r\\n\\t\\t\\t\\tif(filter)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\t if(this.util.isUndefinedOrNull(enableHighlighting))\\r\\n\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\tenableHighlighting = true;\\r\\n\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t var isHierarchical = false;\\r\\n\\t\\t\\t\\t\\t var source = this.__nsGrid.__arrWrapper;\\r\\n\\t\\t\\t\\t\\t if(this.__nsGrid.__enableHierarchical || this.__nsGrid.__enableGrouping || this.__nsGrid.__enableMasterDetail)\\r\\n\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t isHierarchical = true;\\r\\n\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t   \\t var nsFilter = new NSFilter(source,filter,setting,recordLimit,isHierarchical,this.__nsGrid.__childField,\\r\\n\\t\\t\\t\\t   \\t\\t\\t this.__nsGrid.__filterFunction,this.__nsGrid.__hierarchyFilterChildrenFunction,\\r\\n\\t\\t\\t\\t   \\t\\t\\t (this.__nsGrid.__objGrid.__ignoreFieldsForDeepCopy && this.__nsGrid.__objGrid.__ignoreFieldsForDeepCopy())\\r\\n\\t\\t\\t\\t   \\t );\\r\\n\\t\\t\\t\\t   \\t this.__nsGrid.__arrInternalSource = nsFilter.execute();\\r\\n\\t\\t\\t\\t   \\t this.__nsGrid.__arrFilteredGroupedSource =  this.__nsGrid.__arrInternalSource.slice(0);\\r\\n\\t\\t\\t\\t   \\t if(enableHighlighting)\\r\\n\\t\\t\\t\\t   \\t {\\r\\n\\t\\t\\t\\t\\t   \\t if(filter instanceof Array) \\r\\n\\t\\t\\t\\t  \\t     {\\r\\n\\t\\t\\t\\t\\t   \\t\\t for (var count = 0; count < filter.length; count++) \\r\\n\\t\\t\\t\\t\\t         {\\r\\n\\t\\t\\t\\t\\t \\t   \\t\\tvar item = filter[count];\\r\\n\\t\\t\\t\\t\\t \\t   \\t\\tvar key = Object.keys(item)[0];\\r\\n\\t\\t\\t\\t\\t \\t   \\t\\tvar colItem = this.__nsGrid.__getColumnObjectByDataField(key);\\r\\n\\t\\t\\t\\t\\t \\t   \\t\\tthis.__filteredColumn.push({field:key,text:item[key],item:colItem});\\r\\n\\t\\t\\t\\t\\t         }\\r\\n\\t\\t\\t\\t  \\t     }\\r\\n\\t\\t\\t\\t  \\t\\t else if(typeof(filter) === \\\"object\\\") \\r\\n\\t\\t\\t\\t  \\t     {\\r\\n\\t\\t\\t\\t  \\t        for(var key in filter) \\r\\n\\t\\t\\t\\t  \\t        {\\r\\n\\t\\t\\t\\t  \\t        \\tvar colItem = this.__nsGrid.__getColumnObjectByDataField(key);\\r\\n\\t\\t\\t\\t  \\t        \\tthis.__filteredColumn.push({field:key,text:filter[key],item:colItem});\\r\\n\\t\\t\\t\\t  \\t        }\\r\\n\\t\\t\\t\\t  \\t     }\\r\\n\\t\\t\\t\\t   \\t }\\r\\n\\t\\t\\t\\t   \\t if(isHierarchical)\\r\\n\\t\\t\\t\\t   \\t {\\r\\n\\t\\t\\t\\t   \\t\\tthis.__nsGrid.__objGrid.__setWrapperSource(this.__nsGrid.__arrInternalSource,0,-1,0,false);\\r\\n\\t\\t\\t\\t   \\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0); \\r\\n\\t\\t\\t\\t   \\t }\\r\\n\\t\\t\\t\\t   \\t this.__nsGrid.__updateTotalRecords();\\r\\n\\t\\t\\t\\t   \\t this.__nsGrid.__updateVisibleIndexByRow(this.__nsGrid.__arrInternalSource);\\r\\n\\t\\t\\t\\t   \\t this.__nsGrid.__renderBody(false,true);\\r\\n\\t\\t\\t\\t   \\t this.isFiltered = true;\\r\\n\\t\\t\\t\\t   \\t this.__nsGrid.__dispatchEvent(NSGrid.FILTER_CHANGED,eventParam,eventParam);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__resetFiltering = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsGrid.__enableFilter)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__nsGrid.__dataSource)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__dispatchEvent(NSGrid.FILTER_CHANGING,null,null);\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrWrapper.slice(0);\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__arrFilteredGroupedSource =  this.__nsGrid.__arrInternalSource.slice(0);\\r\\n\\t\\t\\t\\t\\tthis.__filteredColumn = [];\\r\\n\\t\\t\\t\\t\\tif(this.__nsGrid.__enableHierarchical || this.__nsGrid.__enableGrouping || this.__nsGrid.__enableMasterDetail)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__nsGrid.__objGrid.__setWrapperSource(this.__nsGrid.__arrInternalSource,0,-1,0,false);\\r\\n\\t\\t\\t\\t\\t\\tthis.__nsGrid.__arrInternalSource = this.__nsGrid.__arrFlatHierarchicalSource.slice(0); \\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__updateTotalRecords();\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__updateVisibleIndexByRow(this.__nsGrid.__arrInternalSource);\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__renderBody(false,true);\\r\\n\\t\\t\\t\\t\\tthis.isFiltered = false;\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__dispatchEvent(NSGrid.FILTER_CHANGED,null,null);\\r\\n\\t\\t\\t\\t\\tthis.__nsGrid.__dispatchEvent(NSGrid.FILTER_RESETTED,null,null);\\r\\n\\t\\t\\t\\t\\t//this.unHighlightText();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__highlightDiv = function(divText,colIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar length = this.__filteredColumn.length;\\r\\n\\t\\t\\tfor (var count = 0; count < length; count++) \\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar item = this.__filteredColumn[count].item;\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar type = (item.filter && item.filter.type) ? item.filter.type : \\\"text\\\";\\r\\n\\t\\t\\t\\t\\tif(type == \\\"text\\\" && item[this.__nsGrid.__fieldColIndex] === colIndex)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar text = this.__filteredColumn[count].text;\\r\\n\\t\\t\\t\\t\\t\\tthis.util.highlightText(divText,text,\\\"nsTextHighlight\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentClickHandler = function(event) \\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tthis.__removePopUp();\\r\\n\\t\\t\\tthis.__nsGrid.__dispatchEvent(NSGrid.ADVANCED_FILTER_CLOSING);\\r\\n\\t\\t\\t/*var target = this.util.getTarget(event);\\r\\n\\t\\t\\tif(!(target && target.getAttribute(\\\"id\\\") && target.getAttribute(\\\"id\\\").endsWith(\\\"FilterIconContainer\\\")))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__removePopUp();\\r\\n\\t\\t\\t\\tthis.util.preventDefault(event);\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\t\\tthis.__documentKeyUpHandler = function(event) \\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tif(event.keyCode === this.util.KEYCODE.ESC) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__removePopUp();\\r\\n\\t\\t\\t\\tthis.__nsGrid.__dispatchEvent(NSGrid.ADVANCED_FILTER_CLOSING);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__detailFilterClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__removePopUp = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsPopUp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsPopUp.remove();\\r\\n\\t\\t\\t\\tthis.__nsPopUp = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getTextDetailFilter = function(dataField,objFilter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar txtInputChangeHandler = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tclearTimeout(self.__interval);\\r\\n\\t\\t\\t\\tself.__interval = setTimeout(function(){\\r\\n\\t\\t\\t\\t\\t\\thandleTextFilter();\\r\\n\\t\\t\\t\\t\\t}, self.SEARCH_INTERVAL);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar handleTextFilter = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar text = null;\\r\\n\\t\\t\\t\\tif(txtFilter.value && txtFilter.value !== \\\"\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttext = txtFilter.value;\\r\\n\\t\\t\\t\\t\\titem = {text:text,caseSensitive:chkSensitive.checked,matchType:arrOptions[cmbFilter.selectedIndex].value,sensitiveChecked:chkSensitive.checked,\\r\\n\\t\\t\\t\\t\\t\\t\\toptionIndex:cmbFilter.selectedIndex,textInputText:txtFilter.value,type:NSGrid.ADVANCED_FILTER_TEXT};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tself.__objAdvancedFilterSetting[dataField] = item;\\r\\n\\t\\t\\t\\tself.__advanceFilterGrid.bind(self)();\\r\\n\\t\\t\\t\\tif(self.__enableApply)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.__removePopUp();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar resetTextFilter = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__objAdvancedFilterSetting[dataField] = null;\\r\\n\\t\\t\\t\\tself.__advanceFilterGrid.bind(self)();\\r\\n\\t\\t\\t\\tself.__removePopUp();\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar createSelect = function(arrSource,strID,prevField)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar divSelect = self.util.createElement(\\\"span\\\",colID + strID + \\\"detailFilterSelectContainer\\\");\\r\\n\\t\\t\\t\\tvar cmbFilter = self.util.createElement(\\\"select\\\",colID + strID + \\\"detailFilterSelect\\\",\\\"nsFilterSelect\\\");\\r\\n\\t\\t\\t\\tcmbFilter.style.height = \\\"25px\\\";\\r\\n\\t\\t\\t\\tvar option = null;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar label = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrSource.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = arrSource[count];\\r\\n\\t\\t\\t\\t\\toption = document.createElement(\\\"option\\\");\\r\\n\\t\\t\\t\\t\\tlabel = document.createTextNode(item[\\\"label\\\"]);\\r\\n\\t\\t\\t\\t\\toption.appendChild(label);\\r\\n\\t\\t\\t\\t\\toption.setAttribute(\\\"value\\\", item[\\\"id\\\"]);\\r\\n\\t\\t\\t\\t\\tcmbFilter.appendChild(option);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(objPrev && objPrev[prevField])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcmbFilter.selectedIndex = objPrev[prevField];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tdivSelect.style.display = \\\"inline-block\\\";\\r\\n\\t\\t\\t\\tdivSelect.style.width = \\\"40%\\\";\\r\\n\\t\\t\\t\\tdivSelect.appendChild(cmbFilter);\\r\\n\\t\\t\\t\\tdivUpperContainer.appendChild(divSelect);\\r\\n\\t\\t\\t\\treturn cmbFilter;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar createCheckbox = function(text,strID,prevField)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar divCheckbox = self.util.createElement(\\\"span\\\",colID + strID + \\\"detailFilterCheckboxContainer\\\");\\r\\n\\t\\t\\t\\tvar label = self.util.createElement(\\\"label\\\",colID + strID + \\\"detailFilterLabel\\\",null);\\r\\n\\t\\t\\t\\tvar checkbox = self.util.createElement(\\\"input\\\",colID + strID + \\\"detailFilterCheckbox\\\",null);\\r\\n\\t\\t\\t\\tcheckbox.setAttribute(\\\"type\\\",\\\"checkbox\\\");\\r\\n\\t\\t\\t\\tlabel.appendChild(checkbox);\\r\\n\\t\\t\\t\\tif(text)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tlabel.appendChild(document.createTextNode(text));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(objPrev && objPrev[prevField])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcheckbox.setAttribute(\\\"checked\\\",true);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tlabel.style.fontWeight = \\\"400\\\";\\r\\n\\t\\t\\t\\tlabel.style.cursor = \\\"pointer\\\";\\r\\n\\t\\t\\t\\tcheckbox.style.marginRight = \\\"5px\\\";\\r\\n\\t\\t\\t\\tdivCheckbox.style.paddingTop = \\\"5px\\\";\\r\\n\\t\\t\\t\\tdivCheckbox.style.display = \\\"inline-block\\\";\\r\\n\\t\\t\\t\\tdivCheckbox.appendChild(label);\\r\\n\\t\\t\\t\\tdivLowerContainer.appendChild(divCheckbox);\\r\\n\\t\\t\\t\\treturn checkbox;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar nsFilter = new NSFilter();\\r\\n\\t\\t\\tvar arrOptions = [{id:1,label:\\\"Contains\\\",value:nsFilter.CONTAINS},\\r\\n\\t\\t\\t                  {id:2,label:\\\"Exact\\\",value:nsFilter.EXACT},\\r\\n\\t\\t\\t                  {id:3,label:\\\"Starts With\\\",value:nsFilter.STARTS_WITH},\\r\\n\\t\\t\\t                  {id:4,label:\\\"Ends With\\\",value:nsFilter.ENDS_WITH}];\\r\\n\\t\\t\\tvar objPrev = this.__objAdvancedFilterSetting[dataField];\\r\\n\\t\\t\\tvar colID = this.__getRendererID(dataField);\\r\\n\\t\\t\\tvar divDetailFilterContainer = this.__nsPopUp.getPopUp();\\r\\n\\t\\t\\t//divDetailFilterContainer.style.width = \\\"275px\\\";\\r\\n\\t\\t\\tdivDetailFilterContainer.style.padding = \\\"10px\\\";\\r\\n\\t\\t\\tvar divUpperContainer = this.util.createDiv(colID + \\\"detailFilterUpperContainer\\\");\\r\\n\\t\\t\\tdivUpperContainer.style.paddingBottom = \\\"8px\\\";\\r\\n\\t\\t\\tvar divLowerContainer = this.util.createDiv(colID + \\\"detailFilterLowerContainer\\\");\\r\\n\\t\\t\\tvar cmbFilter = createSelect(arrOptions,\\\"options\\\",\\\"optionIndex\\\");\\r\\n\\t\\t\\tvar divTextInput = this.util.createElement(\\\"span\\\",colID + \\\"detailFilterTextInputContainer\\\");\\r\\n\\t\\t\\tdivTextInput.style.float = \\\"right\\\";\\r\\n\\t\\t\\tdivTextInput.style.width = \\\"60%\\\";\\r\\n\\t\\t\\tvar txtFilter = this.util.createElement(\\\"input\\\",colID + \\\"detailFilterTextInput\\\",\\\"nsFilterTextInput\\\");\\r\\n\\t\\t\\ttxtFilter.setAttribute(\\\"placeholder\\\", \\\"Enter Value here\\\");\\r\\n\\t\\t\\ttxtFilter.style.width = \\\"100%\\\";\\r\\n\\t\\t\\tif(objPrev && objPrev[\\\"textInputText\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttxtFilter.value = objPrev[\\\"textInputText\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//var divSearch = this.util.getSearchTextBox(txtFilter);\\r\\n\\t\\t\\t//this.util.addStyleClass(divSearch,\\\"nsFilterSearchTextBox\\\");\\r\\n\\t\\t\\tdivTextInput.appendChild(txtFilter);\\r\\n\\t\\t\\tdivUpperContainer.appendChild(divTextInput);\\r\\n\\t\\t\\tvar chkSensitive = createCheckbox(\\\"Case Sensitive\\\",\\\"sensitive\\\",\\\"sensitiveChecked\\\");\\r\\n\\t\\t\\tif(this.__enableApply)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__createApplySection.bind(this)(colID,divLowerContainer,handleTextFilter,resetTextFilter);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addEvent(chkSensitive,\\\"click\\\",handleTextFilter);\\r\\n\\t\\t\\t\\tthis.util.addEvent(cmbFilter,\\\"change\\\",handleTextFilter);\\r\\n\\t\\t\\t\\tthis.util.addEvent(txtFilter,\\\"keyup\\\",txtInputChangeHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdivDetailFilterContainer.appendChild(divUpperContainer);\\r\\n\\t\\t\\tdivDetailFilterContainer.appendChild(divLowerContainer);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getNumberDetailFilter = function(dataField,objFilter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar txtInputChangeHandler = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tclearTimeout(self.__interval);\\r\\n\\t\\t\\t\\tself.__interval = setTimeout(function(){\\r\\n\\t\\t\\t\\t\\t\\thandleNumberFilter();\\r\\n\\t\\t\\t\\t\\t}, self.SEARCH_INTERVAL);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar handleNumberFilter = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar text = null;\\r\\n\\t\\t\\t\\tif(txtFilter.value && txtFilter.value !== \\\"\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttext = arrOptions[cmbFilter.selectedIndex].sign + txtFilter.value;\\r\\n\\t\\t\\t\\t\\titem = {text:text,caseSensitive:false,matchType:new NSFilter().CONTAINS,index:cmbFilter.selectedIndex,textInputText:txtFilter.value,type:NSGrid.ADVANCED_FILTER_NUMBER};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tself.__objAdvancedFilterSetting[dataField] = item;\\r\\n\\t\\t\\t\\tself.__advanceFilterGrid.bind(self)();\\r\\n\\t\\t\\t\\tif(self.__enableApply)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.__removePopUp();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar resetNumberFilter = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__objAdvancedFilterSetting[dataField] = null;\\r\\n\\t\\t\\t\\tself.__advanceFilterGrid.bind(self)();\\r\\n\\t\\t\\t\\tself.__removePopUp();\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar arrOptions = [{id:1,label:\\\"<=\\\",toolTip:\\\"Less than Equals To\\\",sign:\\\"<=\\\"},\\r\\n\\t\\t\\t                  {id:2,label:\\\">=\\\",toolTip:\\\"Greater than Equals To\\\",sign:\\\">=\\\"},\\r\\n\\t\\t\\t                  {id:3,label:\\\"<\\\",toolTip:\\\"Less than\\\",sign:\\\"<\\\"},\\r\\n\\t\\t\\t                  {id:4,label:\\\">\\\",toolTip:\\\"Greater than\\\",sign:\\\">\\\"},\\r\\n\\t\\t\\t                  {id:5,label:\\\"=\\\",toolTip:\\\"Equals\\\",sign:\\\"\\\"}];\\r\\n\\t\\t\\tvar objPrev = this.__objAdvancedFilterSetting[dataField];\\r\\n\\t\\t\\tvar colID = this.__getRendererID(dataField);\\r\\n\\t\\t\\tvar divDetailFilterContainer = this.__nsPopUp.getPopUp();\\r\\n\\t\\t\\t//divDetailFilterContainer.style.width = \\\"225px\\\";\\r\\n\\t\\t\\tdivDetailFilterContainer.style.padding = \\\"10px\\\";\\r\\n\\t\\t\\tvar divUpperContainer = this.util.createDiv(colID + \\\"detailFilterUpperContainer\\\");\\r\\n\\t\\t\\tdivUpperContainer.style.paddingBottom = \\\"8px\\\";\\r\\n\\t\\t\\tvar divLowerContainer = this.util.createDiv(colID + \\\"detailFilterLowerContainer\\\");\\r\\n\\t\\t\\tvar divSelect = this.util.createElement(\\\"span\\\",colID + \\\"detailFilterSelectContainer\\\");\\r\\n\\t\\t\\tvar cmbFilter = this.util.createElement(\\\"select\\\",colID + \\\"detailFilterSelect\\\",\\\"nsFilterSelect\\\");\\r\\n\\t\\t\\tcmbFilter.style.height = \\\"25px\\\";\\r\\n\\t\\t\\tdivSelect.style.display = \\\"inline-block\\\";\\r\\n\\t\\t\\tdivSelect.style.width = \\\"20%\\\";\\r\\n\\t\\t\\tvar option = null;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar label = null;\\r\\n\\t\\t\\tfor(var count = 0;count < arrOptions.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrOptions[count];\\r\\n\\t\\t\\t\\toption = document.createElement(\\\"option\\\");\\r\\n\\t\\t\\t\\tlabel = document.createTextNode(item[\\\"label\\\"]);\\r\\n\\t\\t\\t\\toption.appendChild(label);\\r\\n\\t\\t\\t\\t//option.setAttribute(\\\"text\\\", item[\\\"label\\\"]);\\r\\n\\t\\t\\t\\toption.setAttribute(\\\"value\\\", item[\\\"id\\\"]);\\r\\n\\t\\t\\t\\tcmbFilter.appendChild(option);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(objPrev && objPrev[\\\"index\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcmbFilter.selectedIndex = objPrev[\\\"index\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdivSelect.appendChild(cmbFilter);\\r\\n\\t\\t\\tdivUpperContainer.appendChild(divSelect);\\r\\n\\t\\t\\tvar divTextInput = this.util.createElement(\\\"span\\\",colID + \\\"detailFilterTextInputContainer\\\");\\r\\n\\t\\t\\tvar txtFilter = this.util.createElement(\\\"input\\\",colID + \\\"detailFilterTextInput\\\",\\\"nsFilterTextInput\\\");\\r\\n\\t\\t\\ttxtFilter.setAttribute(\\\"placeholder\\\", \\\"Enter Value here\\\");\\r\\n\\t\\t\\tif(objPrev && objPrev[\\\"textInputText\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttxtFilter.value = objPrev[\\\"textInputText\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdivTextInput.style.float = \\\"right\\\";\\r\\n\\t\\t\\tdivTextInput.style.width = \\\"80%\\\";\\r\\n\\t\\t\\ttxtFilter.style.width = \\\"100%\\\";\\r\\n\\t\\t\\tdivTextInput.appendChild(txtFilter);\\r\\n\\t\\t\\tdivUpperContainer.appendChild(divTextInput);\\r\\n\\t\\t\\tif(this.__enableApply)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__createApplySection.bind(this)(colID,divLowerContainer,handleNumberFilter,resetNumberFilter);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addEvent(cmbFilter,\\\"change\\\",handleNumberFilter);\\r\\n\\t\\t\\t\\tthis.util.addEvent(txtFilter,\\\"keyup\\\",txtInputChangeHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdivDetailFilterContainer.appendChild(divUpperContainer);\\r\\n\\t\\t\\tdivDetailFilterContainer.appendChild(divLowerContainer);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getListDetailFilter = function(dataField,objFilter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar itemRenderer = function(item,labelField,fieldIndex,isDisabled,listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar divRenderer = self.util.createElement(\\\"span\\\",colID + \\\"filterListContainer\\\" + item[\\\"id\\\"] ,\\\"nsFilterListRenderer\\\");\\r\\n\\t\\t\\t\\t\\tvar label = self.util.createElement(\\\"label\\\");\\r\\n\\t\\t\\t\\t\\tvar checkBox = self.util.createElement(\\\"input\\\",null,\\\"nsFilterListRendererCheckBox\\\");\\r\\n\\t\\t\\t\\t\\tcheckBox.setAttribute(\\\"type\\\",\\\"checkbox\\\");\\r\\n\\t\\t\\t\\t\\tcheckBox.checked = Boolean.parse(item[\\\"selected\\\"]);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(checkBox,\\\"click\\\",checkBoxClickHandler);\\r\\n\\t\\t\\t\\t\\tlabel.style.fontWeight = \\\"400\\\";\\r\\n\\t\\t\\t\\t\\tlabel.style.cursor = \\\"pointer\\\";\\r\\n\\t\\t\\t\\t\\tcheckBox.style.marginRight = \\\"5px\\\";\\r\\n\\t\\t\\t\\t\\tlabel.appendChild(checkBox);\\r\\n\\t\\t\\t\\t\\tlabel.appendChild(document.createTextNode(item[labelField]));\\r\\n\\t\\t\\t\\t\\tdivRenderer.appendChild(label);\\r\\n\\t\\t\\t\\t\\treturn divRenderer;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar txtInputChangeHandler = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tclearTimeout(self.__interval);\\r\\n\\t\\t\\t\\tself.__interval = setTimeout(function(){\\r\\n\\t\\t\\t\\t\\t\\thandleListFilter(true);\\r\\n\\t\\t\\t\\t\\t}, self.SEARCH_INTERVAL);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar handleListFilter = function(isReset)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar text = null;\\r\\n\\t\\t\\t\\tvar text = txtFilter.value;\\r\\n\\t\\t\\t\\tif(text === \\\"\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjNSList.resetFilter();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar setting = {caseSensitive:false,multiline:false,matchType:new NSFilter().CONTAINS};\\r\\n\\t\\t\\t\\t\\tobjNSList.filter(text,setting,true);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(isReset)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrSelected = objNSList.__arrInternalSource;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar checkBoxClickHandler = function(event)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar target = self.util.getTarget(event);\\r\\n\\t\\t\\t\\tvar checked = target.checked;\\r\\n\\t\\t\\t\\ttarget = self.util.findParent(target,\\\"li\\\");\\r\\n\\t\\t\\t\\tvar source = objNSList.__arrInternalSource;\\r\\n\\t\\t\\t\\tvar index = objNSList.__getIndexFromTarget(target);\\r\\n\\t\\t\\t\\tif(index > -1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttempItem = objNSList.__getItemByIndex(index);\\r\\n\\t\\t\\t\\t\\tif(tempItem)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar selectedIndex = source.findIndex(findIndexfromSelectedArray);\\r\\n\\t\\t\\t\\t\\t\\tif(checked && selectedIndex > -1)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrSelected.push(tempItem);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(!checked && selectedIndex > -1)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tfor(var count = 0;count < arrSelected.length;count++)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tif(arrSelected[count].id == selectedIndex)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tarrSelected.splice(count,1);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\ttempItem[\\\"selected\\\"] = checked;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tsetSelectAllCheckBox();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar chkSelectAllClickHandler = function(event)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(arrSource)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar length = arrSource.length;\\r\\n\\t\\t\\t\\t\\tvar checked = chkSelectAll.checked;\\r\\n\\t\\t\\t\\t\\tvar source = objNSList.__arrInternalSource;\\r\\n\\t\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem = arrSource[count];\\r\\n\\t\\t\\t\\t\\t\\titem[\\\"selected\\\"] = checked;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(source)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\t\\t\\titem[\\\"selected\\\"] = checked;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(checked)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrSelected = self.util.cloneObject(arrSource);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrSelected = [];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tobjNSList.__renderBody(false);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar setSelectAllCheckBox = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar isAllSelected = isSelectedAll();\\r\\n\\t\\t\\t\\tvar isNoneSelected = isUnselectedAll();\\r\\n\\t\\t\\t\\tif(isAllSelected)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchkSelectAll.indeterminate = false;\\r\\n\\t\\t\\t\\t\\tchkSelectAll.checked = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(isNoneSelected)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchkSelectAll.indeterminate = false;\\r\\n\\t\\t\\t\\t\\tchkSelectAll.checked = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchkSelectAll.indeterminate = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar findIndexfromSelectedArray = function(element,index,array)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn (element[\\\"id\\\"] === tempItem[\\\"id\\\"]);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar isSelectedAll = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(arrSource && arrSelected)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn (arrSource.length === arrSelected.length);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar isUnselectedAll = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(arrSelected)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn (arrSelected.length === 0);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar handleMainFilter = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrTemp = [];\\r\\n\\t\\t\\t\\tif(arrSelected && arrSelected.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < arrSelected.length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(arrSelected[count][\\\"selected\\\"])\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrTemp.push(arrSelected[count]);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar item = {arrText:arrTemp,arrTextField:\\\"label\\\",caseSensitive:true,matchType:new NSFilter().EXACT,arrSelected:arrSelected,textInputText:txtFilter.value,type:NSGrid.ADVANCED_FILTER_LIST};\\r\\n\\t\\t\\t\\tself.__objAdvancedFilterSetting[dataField] = item;\\r\\n\\t\\t\\t\\tself.__advanceFilterGrid.bind(self)();\\r\\n\\t\\t\\t\\tif(self.__enableApply)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.__removePopUp();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar resetMainFilter = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__objAdvancedFilterSetting[dataField] = null;\\r\\n\\t\\t\\t\\tself.__advanceFilterGrid.bind(self)();\\r\\n\\t\\t\\t\\tself.__removePopUp();\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar tempItem = null;\\r\\n\\t\\t\\tvar objPrev = this.__objAdvancedFilterSetting[dataField];\\r\\n\\t\\t\\tif(!objPrev)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjPrev = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar arrSelected = objPrev[\\\"arrSelected\\\"];\\r\\n\\t\\t\\tvar arrSource = this.__getUniqueValues(this.__nsGrid.__objGrid.__getFlatSource(),dataField,arrSelected);\\r\\n\\t\\t\\tif(!arrSelected)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrSelected = this.util.cloneObject(arrSource);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar colID = this.__getRendererID(dataField);\\r\\n\\t\\t\\tvar divDetailFilterContainer = this.__nsPopUp.getPopUp();\\r\\n\\t\\t\\t//divDetailFilterContainer.style.width = \\\"240px\\\";\\r\\n\\t\\t\\tdivDetailFilterContainer.style.padding = \\\"10px\\\";\\r\\n\\t\\t\\tvar divUpperContainer = this.util.createDiv(colID + \\\"detailFilterUpperContainer\\\");\\r\\n\\t\\t\\tdivUpperContainer.style.paddingBottom = \\\"8px\\\";\\r\\n\\t\\t\\tvar divLowerContainer = this.util.createDiv(colID + \\\"detailFilterLowerContainer\\\");\\r\\n\\t\\t\\tvar divTextInput = this.util.createDiv(colID + \\\"detailFilterTextInputContainer\\\",\\\"nsFilterLineContainer\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(divTextInput,\\\"nsFilterLineContainerTheme\\\");\\r\\n\\t\\t\\tdivTextInput.setAttribute(\\\"style\\\",\\\"height:29px;\\\");\\r\\n\\t\\t\\tvar txtFilter = this.util.createElement(\\\"input\\\",colID + \\\"detailFilterTextInput\\\",\\\"nsFilterTextInput\\\");\\r\\n\\t\\t\\ttxtFilter.setAttribute(\\\"placeholder\\\", \\\"Enter Value here\\\");\\r\\n\\t\\t\\ttxtFilter.style.width = \\\"100%\\\";\\r\\n\\t\\t\\tif(objPrev[\\\"textInputText\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttxtFilter.value = objPrev[\\\"textInputText\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.addEvent(txtFilter,\\\"keyup\\\",txtInputChangeHandler);\\r\\n\\t\\t\\tdivTextInput.appendChild(txtFilter);\\r\\n\\t\\t\\tdivUpperContainer.appendChild(divTextInput);\\r\\n\\t\\t\\tdivDetailFilterContainer.appendChild(divUpperContainer);\\r\\n\\t\\t\\tdivDetailFilterContainer.appendChild(divLowerContainer);\\r\\n\\t\\t\\tvar divList = this.util.createDiv(colID + \\\"detailFilterListContainer\\\");\\r\\n\\t\\t\\tvar lstFilter = this.util.createElement(\\\"div\\\",colID + \\\"detailFilterList\\\",\\\"nsFilterList\\\");\\r\\n\\t\\t\\tlstFilter.style.height = \\\"300px\\\";\\r\\n\\t\\t\\tdivList.appendChild(lstFilter);\\r\\n\\t\\t\\tdivUpperContainer.appendChild(divList);\\r\\n\\t\\t\\tvar setting = {labelField:\\\"label\\\",enableVirtualScroll:false,enableDragDrop:false,enableDragByHandle:false,enableMultipleSelection:true,enableKeyboardNavigation:false,\\r\\n\\t\\t\\t\\t\\t\\t   customScrollerRequired:false,enableMouseHover:true,enableMouseHoverAnimation:false,itemRenderer:itemRenderer.bind(this)};\\r\\n\\t\\t\\tsetting[\\\"dataSource\\\"] = arrSource;\\r\\n\\t\\t\\tvar objNSList = new NSList(lstFilter,setting);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar divSelectAll = this.util.createElement(\\\"span\\\",colID + \\\"detailFilterSelectAllContainer\\\",\\\"nsFilterLineContainer\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(divSelectAll,\\\"nsFilterLineContainerTheme\\\");\\r\\n\\t\\t\\tvar label = self.util.createElement(\\\"label\\\");\\r\\n\\t\\t\\tvar chkSelectAll = self.util.createElement(\\\"input\\\",null,\\\"nsFilterListRendererCheckBox\\\");\\r\\n\\t\\t\\tchkSelectAll.setAttribute(\\\"type\\\",\\\"checkbox\\\");\\r\\n\\t\\t\\tthis.util.addEvent(chkSelectAll,\\\"click\\\",chkSelectAllClickHandler);\\r\\n\\t\\t\\tlabel.appendChild(chkSelectAll);\\r\\n\\t\\t\\tlabel.appendChild(document.createTextNode(\\\"Select All\\\"));\\r\\n\\t\\t\\tlabel.style.fontWeight = \\\"400\\\";\\r\\n\\t\\t\\tlabel.style.cursor = \\\"pointer\\\";\\r\\n\\t\\t\\tchkSelectAll.style.marginRight = \\\"5px\\\";\\r\\n\\t\\t\\tdivSelectAll.style.paddingTop = \\\"5px\\\";\\r\\n\\t\\t\\tdivSelectAll.style.display = \\\"inline-block\\\";\\r\\n\\t\\t\\tdivSelectAll.appendChild(label);\\r\\n\\t\\t\\tdivLowerContainer.appendChild(divSelectAll);\\r\\n\\t\\t\\tif(this.__enableApply)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__createApplySection.bind(this)(colID,divLowerContainer,handleMainFilter,resetMainFilter);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\thandleListFilter(false);\\r\\n\\t\\t\\tsetSelectAllCheckBox();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getDateDetailFilter = function(dataField,objFilter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.__setDefaultDatePicker();\\r\\n\\t\\t\\tvar arrOptions = [{text:\\\"Equals\\\",value:\\\"equals\\\"},\\r\\n\\t\\t\\t                  {text:\\\"Greater than\\\",value:\\\"greaterThan\\\"},\\r\\n\\t\\t\\t                  {text:\\\"Less than\\\",value:\\\"lessThan\\\"},\\r\\n\\t\\t\\t                  {text:\\\"Not equal\\\",value:\\\"notEqual\\\"}];\\r\\n\\t\\t\\tvar arrOptOption = [{text:\\\"And\\\",value:\\\"and\\\"},\\r\\n\\t\\t\\t                  {text:\\\"OR\\\",value:\\\"or\\\"}];\\r\\n\\t\\t\\tvar createSelect = function(id,css)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar select =  self.util.createElement(\\\"select\\\",id,css);\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrOptions.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = arrOptions[count];\\r\\n\\t\\t\\t\\t\\tvar option = self.util.createElement(\\\"option\\\");\\r\\n\\t\\t\\t\\t\\toption.setAttribute(\\\"value\\\", item.value);\\r\\n\\t\\t\\t\\t\\tvar text = document.createTextNode(item.text);\\r\\n\\t\\t\\t\\t\\toption.appendChild(text);\\r\\n\\t\\t\\t\\t\\tselect.appendChild(option);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn select;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar handleMainFilter = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = {type:NSGrid.ADVANCED_FILTER_DATE,selectFirst:selectFirst,firstSelectIndex:selectFirst.selectedIndex,firstSelectValue:selectFirst.options[selectFirst.selectedIndex].value,\\r\\n\\t\\t\\t\\t\\t\\t\\tcompFirstDate:compFirstDate,firstDate:compFirstDate.getDate(),\\r\\n\\t\\t\\t\\t\\t\\t\\toperationSelect:select,operationSelectedIndex:select.selectedIndex,operationSelectValue:select.options[select.selectedIndex].value,\\r\\n\\t\\t\\t\\t\\t\\t\\tselectSecond:selectSecond,secondSelectIndex:selectSecond.selectedIndex,secondSelectValue:selectSecond.options[selectSecond.selectedIndex].value,\\r\\n\\t\\t\\t\\t\\t\\t\\tcompSecondDate:compSecondDate,secondDate:compSecondDate.getDate(),config:dateConfig,\\r\\n\\t\\t\\t\\t\\t\\t\\tdivUpperContainer:divUpperContainer,divLowerContainer:divLowerContainer\\r\\n\\t\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tself.__objAdvancedFilterSetting[dataField] = item;\\r\\n\\t\\t\\t\\tself.__advanceFilterGrid.bind(self)();\\r\\n\\t\\t\\t\\tif(self.__enableApply)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.__removePopUp();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar resetMainFilter = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__objAdvancedFilterSetting[dataField] = null;\\r\\n\\t\\t\\t\\tself.__advanceFilterGrid.bind(self)();\\r\\n\\t\\t\\t\\tself.__removePopUp();\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar divDetailFilterContainer = this.__nsPopUp.getPopUp();\\r\\n\\t\\t\\tdivDetailFilterContainer.style.padding = \\\"10px\\\";\\r\\n\\t\\t\\tvar dateConfig = objFilter[\\\"advancedFilterConfig\\\"] || {};\\r\\n\\t\\t\\tvar filterConfig = objFilter[\\\"config\\\"] || {};\\r\\n\\t\\t\\tfor(var key in filterConfig)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isUndefined(dateConfig[key]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdateConfig[key] = filterConfig[key];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tdateConfig[\\\"filterManually\\\"] = this.__enableApply;\\r\\n\\t\\t\\tvar objPrev = this.__objAdvancedFilterSetting[dataField];\\r\\n\\t\\t\\tif(objPrev)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar divUpperContainer = objPrev.divUpperContainer;\\r\\n\\t\\t\\t\\tvar divLowerContainer = objPrev.divLowerContainer;\\r\\n\\t\\t\\t\\tvar selectFirst = objPrev.selectFirst;\\r\\n\\t\\t\\t\\tselectFirst.selectedIndex = objPrev.firstSelectIndex;\\r\\n\\t\\t\\t\\tvar compFirstDate = objPrev.compFirstDate;\\r\\n\\t\\t\\t\\tcompFirstDate.setDate(objPrev.firstDate);\\r\\n\\t\\t\\t\\tvar select = objPrev.operationSelect;\\r\\n\\t\\t\\t\\tselect.selectedIndex = objPrev.operationSelectedIndex;\\r\\n\\t\\t\\t\\tvar selectSecond = objPrev.selectSecond;\\r\\n\\t\\t\\t\\tselectSecond.selectedIndex = objPrev.secondSelectIndex;\\r\\n\\t\\t\\t\\tvar compSecondDate = objPrev.compSecondDate;\\r\\n\\t\\t\\t\\tcompSecondDate.setDate(objPrev.secondDate);\\r\\n\\t\\t\\t\\tdivDetailFilterContainer.appendChild(divUpperContainer);\\r\\n\\t\\t\\t\\tdivDetailFilterContainer.appendChild(divLowerContainer);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t/*if(!objPrev)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjPrev = {};\\r\\n\\t\\t\\t\\t}*/\\r\\n\\t\\t\\t\\tvar colID = this.__getRendererID(dataField);\\r\\n\\t\\t\\t\\tvar divUpperContainer = this.util.createDiv(colID + \\\"detailFilterUpperContainer\\\");\\r\\n\\t\\t\\t\\tdivUpperContainer.style.paddingBottom = \\\"8px\\\";\\r\\n\\t\\t\\t\\tvar divLowerContainer = this.util.createDiv(colID + \\\"detailFilterLowerContainer\\\");\\r\\n\\t\\t\\t\\tvar divFirstSelect = this.util.createDiv(colID + \\\"detailFirstSelectContainer\\\",\\\"nsGridFilterFirstSelectContainer\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(divFirstSelect,\\\"nsGridFilterFirstSelectContainerTheme\\\");\\r\\n\\t\\t\\t\\t//divFirstSelect.setAttribute(\\\"style\\\",\\\"height:29px;\\\");\\r\\n\\t\\t\\t\\tvar selectFirst =  createSelect(colID + \\\"detailFirstSelect\\\",\\\"nsGridFilterFirstSelect\\\");\\r\\n\\t\\t\\t\\tdivFirstSelect.appendChild(selectFirst);\\r\\n\\t\\t\\t\\tdivUpperContainer.appendChild(divFirstSelect);\\r\\n\\t\\t\\t\\t//selectFirst.selectedIndex = this.util.isUndefinedOrNull(objPrev.firstSelectIndex) ? 0 : objPrev.firstSelectIndex;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tvar divFirstDate = this.util.createDiv(colID + \\\"detailFirstDateContainer\\\",\\\"nsGridFilterFirstDateContainer\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(divFirstDate,\\\"nsGridFilterFirstDateContainerTheme\\\");\\r\\n\\t\\t\\t\\tdivUpperContainer.appendChild(divFirstDate);\\r\\n\\t\\t\\t\\tvar compFirstDate = new this.__nsGrid.__components[\\\"datePicker\\\"]();\\r\\n\\t\\t\\t\\tthis.dateRenderer(compFirstDate,dataField,divFirstDate,dateConfig,objFilter);\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tvar divOption = this.util.createDiv(colID + \\\"detailOptionContainer\\\",\\\"nsGridFilterOptionContainer\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(divOption,\\\"nsGridFilterOptionContainerTheme\\\");\\r\\n\\t\\t\\t\\tvar select =  this.util.createElement(\\\"select\\\",null,\\\"nsGridFilterOptOption\\\");\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrOptOption.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = arrOptOption[count];\\r\\n\\t\\t\\t\\t\\tvar option = this.util.createElement(\\\"option\\\");\\r\\n\\t\\t\\t\\t\\toption.setAttribute(\\\"value\\\", item.value);\\r\\n\\t\\t\\t\\t\\tvar text = document.createTextNode(item.text);\\r\\n\\t\\t\\t\\t\\toption.appendChild(text);\\r\\n\\t\\t\\t\\t\\tselect.appendChild(option);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tdivOption.appendChild(select);\\r\\n\\t\\t\\t\\tdivUpperContainer.appendChild(divOption);\\r\\n\\t\\t\\t\\t//select.selectedIndex = this.util.isUndefinedOrNull(objPrev.operationSelectedIndex) ? 0 : objPrev.operationSelectedIndex;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tvar divSecondSelect = this.util.createDiv(colID + \\\"detailSecondSelectContainer\\\",\\\"nsGridFilterSecondSelectContainer\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(divSecondSelect,\\\"nsGridFilterSecondSelectContainerTheme\\\");\\r\\n\\t\\t\\t\\t//divSecondSelect.setAttribute(\\\"style\\\",\\\"height:29px;\\\");\\r\\n\\t\\t\\t\\tvar selectSecond =  createSelect(colID + \\\"detailSecondSelect\\\",\\\"nsGridFilterSecondSelect\\\");\\r\\n\\t\\t\\t\\tdivSecondSelect.appendChild(selectSecond);\\r\\n\\t\\t\\t\\tdivUpperContainer.appendChild(divSecondSelect);\\r\\n\\t\\t\\t\\t//selectSecond.selectedIndex = this.util.isUndefinedOrNull(objPrev.secondSelectIndex) ? 0 : objPrev.secondSelectIndex;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tvar divSecondDate = this.util.createDiv(colID + \\\"detailSecondDateContainer\\\",\\\"nsGridFilterSecondDateContainer\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(divSecondDate,\\\"nsGridFilterSecondDateContainerTheme\\\");\\r\\n\\t\\t\\t\\tdivUpperContainer.appendChild(divSecondDate);\\r\\n\\t\\t\\t\\tvar compSecondDate = new this.__nsGrid.__components[\\\"datePicker\\\"]();\\r\\n\\t\\t\\t\\tthis.dateRenderer(compSecondDate,dataField,divSecondDate,dateConfig,objFilter);\\r\\n\\t\\t\\t\\tdivDetailFilterContainer.appendChild(divUpperContainer);\\r\\n\\t\\t\\t\\tdivDetailFilterContainer.appendChild(divLowerContainer);\\r\\n\\t\\t\\t\\tif(this.__enableApply)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__createApplySection.bind(this)(colID,divLowerContainer,handleMainFilter,resetMainFilter);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createApplySection = function(colID,parent,applyClickHandler,resetClickHandler)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar divApplyButton = this.util.createDiv(colID + \\\"detailFilterApplyButtonContainer\\\",\\\"nsFilterButtonDiv\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(divApplyButton,\\\"nsFilterButtonDivTheme\\\");\\r\\n\\t\\t\\tvar btnFilter = this.util.createElement(\\\"button\\\",colID + \\\"detailFilterApply\\\",\\\"nsFilterButton\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(btnFilter,\\\"nsButton\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(btnFilter,\\\"nsButtonGreen\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(btnFilter,\\\"nsButtonShadow\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(btnFilter,\\\"nsButtonFont12\\\");\\r\\n\\t\\t\\tbtnFilter.innerHTML = \\\"Filter\\\";\\r\\n\\t\\t\\tdivApplyButton.appendChild(btnFilter);\\r\\n\\t\\t\\tvar btnCancel = this.util.createElement(\\\"button\\\",colID + \\\"detailFilterReset\\\",\\\"nsFilterButton\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(btnCancel,\\\"nsButton\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(btnCancel,\\\"nsButtonGrey\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(btnCancel,\\\"nsButtonShadow\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(btnCancel,\\\"nsButtonFont12\\\");\\r\\n\\t\\t\\tbtnCancel.innerHTML = \\\"Cancel\\\";\\r\\n\\t\\t\\tdivApplyButton.appendChild(btnCancel);\\r\\n\\t\\t\\tdivApplyButton.style.float = \\\"right\\\";\\r\\n\\t\\t\\tparent.appendChild(divApplyButton);\\r\\n\\t\\t\\tthis.util.addEvent(btnFilter,\\\"click\\\",applyClickHandler);\\r\\n\\t\\t\\tthis.util.addEvent(btnCancel,\\\"click\\\",resetClickHandler);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getRendererID = function(dataField)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (this.__nsGrid.getID() + \\\"col\\\" + dataField + \\\"renderer\\\");\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getUniqueValues = function(arrSource,dataField,arrSelected)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar findItem = function(element, index, array) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn (item[\\\"value\\\"] === element[\\\"value\\\"]);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar arrReturn = null;\\r\\n\\t\\t\\tvar item = {};\\r\\n\\t\\t\\tif(arrSource && arrSource.length > 0 && dataField)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objMap = {};\\r\\n\\t\\t\\t\\tvar value = \\\"\\\";\\r\\n\\t\\t\\t\\tvar length = arrSource.length;\\r\\n\\t\\t\\t\\tvar count = 0;\\r\\n\\t\\t\\t\\tvar arrTemp = [];\\r\\n\\t\\t\\t\\tvar itemPrev = {};\\r\\n\\t\\t\\t\\tarrReturn = [];\\r\\n\\t\\t\\t    for(count = 0; count < length;count++)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tvalue = arrSource[count][dataField];\\r\\n\\t\\t\\t    \\tif(value)\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tobjMap[value] = value;\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    arrTemp = Object.keys(objMap);\\r\\n\\t\\t\\t    length = arrTemp.length;\\r\\n\\t\\t\\t    if(length > 0)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tfor(count = 0; count < length;count++)\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\tvalue = arrTemp[count];\\r\\n\\t\\t\\t\\t    \\titem = {id:count,label:value,value:value,selected:true};\\r\\n\\t\\t\\t\\t    \\t//if arrSelected is present and then item is not found then it is unselected\\r\\n\\t\\t\\t\\t    \\t//if arrSelected is not present then all Items are selected\\r\\n\\t\\t\\t\\t    \\tif(arrSelected)\\r\\n\\t\\t\\t\\t    \\t{\\r\\n\\t\\t\\t\\t    \\t\\titemPrev = arrSelected.find(findItem);\\r\\n\\t\\t\\t\\t    \\t\\tif(itemPrev)\\r\\n\\t\\t\\t\\t    \\t\\t{\\r\\n\\t\\t\\t\\t    \\t\\t\\titem[\\\"selected\\\"] = itemPrev[\\\"selected\\\"];\\r\\n\\t\\t\\t\\t    \\t\\t}\\r\\n\\t\\t\\t\\t    \\t\\telse\\r\\n\\t\\t\\t\\t    \\t\\t{\\r\\n\\t\\t\\t\\t    \\t\\t\\titem[\\\"selected\\\"] = false;\\r\\n\\t\\t\\t\\t    \\t\\t}\\r\\n\\t\\t\\t\\t    \\t}\\r\\n\\t\\t\\t\\t    \\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrReturn;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setDefaultDatePicker = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__nsGrid.__components)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGrid.__components = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__nsGrid.__components[\\\"datePicker\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar dateComp = function()\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar setting = null;\\r\\n\\t\\t\\t\\t\\tvar div = null;\\r\\n\\t\\t\\t\\t\\tvar objDate = null;\\r\\n\\t\\t\\t\\t    var self = this;\\r\\n\\t\\t\\t\\t    var util = new NSUtil();\\r\\n\\t\\t\\t\\t    \\r\\n\\t\\t\\t\\t    var init = function(config) \\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\t\\tsetting = getParam(config);\\r\\n\\t\\t\\t\\t\\t\\tif(!setting)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tsetting = {};\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tsetting.dateOutputFormat = setting.dateOutputFormat ? setting.dateOutputFormat : \\\"MM/dd/yyyy\\\";\\r\\n\\t\\t\\t\\t\\t\\t//setting.placeHolder = setting.placeHolder ? setting.placeHolder : setting.dateOutputFormat;\\r\\n\\t\\t\\t\\t\\t\\tdiv = util.createDiv(null,\\\"nsGridDatePicker\\\"); \\r\\n\\t\\t\\t\\t\\t\\t//div.style.width = \\\"90%\\\";\\r\\n\\t\\t\\t\\t\\t\\tdiv.style.display = \\\"inline-block\\\";\\r\\n\\t\\t\\t\\t    };\\r\\n\\t\\t\\t\\t    \\r\\n\\t\\t\\t\\t    var getElement = function()\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\treturn div;\\r\\n\\t\\t\\t\\t    };\\r\\n\\t\\t\\t\\t    \\r\\n\\t\\t\\t\\t    var elementAdded = function()\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\tobjDate = new NSDatePicker(div,setting);\\r\\n\\t\\t\\t\\t\\t\\tutil.addEvent(div,NSDatePicker.DATE_SELECTED,function(event)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdateSelected(event.detail,false);\\r\\n\\t\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t\\t\\tutil.addEvent(div,NSDatePicker.INPUT_CHANGE,function(event)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdateSelected(event.detail,true);\\r\\n\\t\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t    };\\r\\n\\t\\t\\t\\t    \\r\\n\\t\\t\\t\\t    var dateSelected = function(date,isType)\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\tif(util.isUndefinedOrNull(setting.filterManually) || !setting.filterManually)\\r\\n\\t\\t\\t\\t    \\t{\\r\\n\\t\\t\\t\\t    \\t\\tsetting.dateSelectedHandler(isType);\\r\\n\\t\\t\\t\\t    \\t}\\r\\n\\t\\t\\t\\t    };\\r\\n\\t\\t\\t\\t    \\r\\n\\t\\t\\t\\t    var getDate = function()\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\treturn objDate.getSelectedDate();\\r\\n\\t\\t\\t\\t    };\\r\\n\\t\\t\\t\\t    \\r\\n\\t\\t\\t\\t    var setDate = function(date,fireEvent)\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\tobjDate.setSelectedDate(date,null,false);\\r\\n\\t\\t\\t\\t    };\\r\\n\\t\\t\\t\\t    \\r\\n\\t\\t\\t\\t    var getParam = function(param)\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\tif(!param)\\r\\n\\t\\t\\t\\t    \\t{\\r\\n\\t\\t\\t\\t    \\t\\tparam = {};\\r\\n\\t\\t\\t\\t    \\t}\\r\\n\\t\\t\\t\\t    \\t/*param = {\\r\\n\\t\\t\\t\\t    \\t\\tcssClass: param.cssClass || null,\\r\\n\\t\\t\\t\\t    \\t};*/\\r\\n\\t\\t\\t\\t    \\treturn param;\\r\\n\\t\\t\\t\\t    };\\r\\n\\t\\t\\t\\t    \\r\\n\\t\\t\\t\\t    self.init = init;\\r\\n\\t\\t\\t\\t    self.getElement = getElement;\\r\\n\\t\\t\\t\\t    self.elementAdded = elementAdded;\\r\\n\\t\\t\\t\\t    self.getDate = getDate;\\r\\n\\t\\t\\t\\t    self.setDate = setDate;\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tthis.__nsGrid.__components[\\\"datePicker\\\"] = dateComp;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__injectInNSGrid = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tNSGrid.FILTER_TYPE_DATE = \\\"date\\\";\\r\\n\\t\\t\\tNSGrid.ADVANCED_FILTER_TEXT = \\\"text\\\";\\r\\n\\t\\t\\tNSGrid.ADVANCED_FILTER_NUMBER = \\\"number\\\";\\r\\n\\t\\t\\tNSGrid.ADVANCED_FILTER_LIST = \\\"list\\\";\\r\\n\\t\\t\\tNSGrid.ADVANCED_FILTER_DATE = \\\"date\\\";\\r\\n\\t\\t};\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\treturn NSGridFilter;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSGridFilter\\\",NSGridFilter);var NSList = (function()\\r\\n{\\r\\n\\tfunction NSList(component,setting) \\r\\n\\t{\\r\\n\\t\\t//this.base.call(this);\\r\\n\\t\\tthis.ITEM_SELECTED = \\\"itemSelected\\\";\\r\\n\\t\\tthis.ITEM_UNSELECTED = \\\"itemUnselected\\\";\\r\\n\\t\\tthis.ITEM_NAVIGATED = \\\"itemNavigated\\\";\\r\\n\\t\\tthis.NAVIGATION_UP = \\\"up\\\";\\r\\n\\t\\tthis.NAVIGATION_DOWN = \\\"down\\\";\\r\\n\\t\\tthis.ITEM_DROPPING = \\\"itemDropping\\\";\\r\\n\\t\\tthis.ITEM_DROPPED = \\\"itemDropped\\\";\\r\\n\\t\\tthis.DRAG_STARTED = \\\"dragStarted\\\";\\r\\n\\t\\tthis.DRAGGING = \\\"dragging\\\";\\r\\n\\t\\tthis.DRAG_END = \\\"dragEnd\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__dataSource = null;\\r\\n\\t\\tthis.__labelField = \\\"label\\\";\\r\\n\\t\\tthis.__itemRenderer = null;\\r\\n\\t\\tthis.__templateID = null;\\r\\n\\t\\tthis.__setData = null;\\r\\n\\t\\tthis.__labelFunction = null;\\r\\n\\t\\tthis.__enableHierarchical = false;\\r\\n\\t\\tthis.__enableMouseHover = false;\\r\\n\\t\\tthis.__enableMouseHoverAnimation = false;\\r\\n\\t\\tthis.__disableHoverField = null;\\r\\n\\t\\tthis.__disableHoverFunction = null;\\r\\n\\t\\tthis.__enableKeyboardNavigation = false;\\r\\n\\t\\tthis.__enableMultipleSelection = false;\\r\\n\\t\\tthis.__enableCustomScrollBar = false;\\r\\n\\t\\tthis.__enableVirtualScroll = false;\\r\\n\\t\\tthis.__isDraggable = true;\\r\\n\\t\\tthis.__isDroppable = true;\\r\\n\\t\\tthis.__enableDragByHandle = false;\\r\\n\\t\\tthis.__dragHandlerClass = null;\\r\\n\\t\\tthis.__enableDragAfterHold = false;\\r\\n\\t\\tthis.__holdTime = 500;\\r\\n\\t\\tthis.__enableCloneMode = false;\\r\\n\\t\\tthis.__rowHeight = -1;\\r\\n\\t\\tthis.__noDataMessage = \\\"No matching records found\\\";\\r\\n\\t\\tthis.__enableContextMenu = false;\\r\\n\\t\\tthis.__enableVariableRowHeight = false;\\r\\n\\t\\tthis.__contextMenuProvider = null;\\r\\n\\t\\tthis.__contextMenuSetting = null;\\r\\n\\t\\tthis.__enableTruncateToFit = false;\\r\\n\\t\\tthis.__toolTipField = null;\\r\\n\\t\\tthis.__enableToolTipForTruncateText = false;\\r\\n\\t\\tthis.__toolTipRenderer = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__arrWrapper = null;\\r\\n\\t\\tthis.__arrInternalSource = null;\\r\\n\\t\\tthis.__arrFlatHierarchicalSource = [];\\r\\n\\t\\t\\r\\n\\t\\tthis.__divOuterContainer = null;\\r\\n\\t\\tthis.__divParentContainer = null;\\r\\n\\t\\tthis.__listContainer = null;\\r\\n\\t\\tthis.__scroller = null;\\r\\n\\t\\tthis.__scrollerSetting = {};\\r\\n\\t\\tthis.__customScrollBarSetting = {};\\r\\n\\t\\tthis.__customScrollBarTooltip = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__template = null;\\r\\n\\t\\tthis.__currentIndex = -1;\\r\\n\\t\\tthis.__selectedIndex = -1;\\r\\n\\t\\tthis.__navigationIndex = -1;\\r\\n\\t\\tthis.__selectedItem = null;\\r\\n\\t\\tthis.__selectedItems = [];\\t\\r\\n\\t\\tthis.__selectedIndexes = [];\\r\\n\\t\\tthis.__lastNavigationDirection = null;\\r\\n\\t\\tthis.__orignalItemKey = [];\\r\\n\\t\\t//for keyboard navigation\\r\\n\\t\\tthis.__pageSize = 0;\\r\\n\\t\\tthis.__scrollTarget = null;\\r\\n\\t\\tthis.__startArrayElement = -1;\\r\\n\\t\\tthis.__listItemHeight = 0;\\r\\n\\t\\t//for Virtual Scroll\\r\\n\\t\\tthis.__virtualScrollSetting = {};\\r\\n\\t\\tthis.__nsVirtualScroll = null; \\r\\n\\t\\tthis.__virtualRowHeight = 0;\\r\\n\\t\\t\\r\\n\\t\\tthis.__childField = \\\"children\\\";\\r\\n\\t\\tthis.__CLASS_GROUP_CELL = \\\"nsListGroupCell\\\";\\r\\n\\t\\tthis.__CLASS_CELL_CHILD = \\\"nsListCellChild\\\";\\r\\n\\t\\t\\r\\n\\t\\t//removing this.getID() as prefix as move functionality from one list to another would have different fields.\\r\\n\\t\\tthis.__fieldPrefix = \\\"ns_field\\\";\\r\\n\\t\\tthis.__fieldIndex =  this.__fieldPrefix + \\\"_item_index\\\";\\r\\n\\t\\tthis.__fieldVisibleIndex = this.__fieldPrefix + \\\"_item_visible_index\\\";\\r\\n\\t\\tthis.__fieldItem = this.__fieldPrefix + \\\"_item\\\";\\r\\n\\t\\tthis.__fieldDisableHover = this.__fieldPrefix + \\\"_disableHover\\\";\\r\\n\\t\\tthis.__fieldSelected = this.__fieldPrefix + \\\"_selected\\\";\\r\\n\\t\\tthis.__fieldHover = this.__fieldPrefix + \\\"_hover\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__fieldItemLevel = this.__fieldPrefix + \\\"_item_level\\\";\\r\\n\\t\\tthis.__fieldItemVisible = this.__fieldPrefix + \\\"_item_visible\\\";\\r\\n\\t\\tthis.__fieldParentIndex = this.__fieldPrefix + \\\"_parent_index\\\";\\r\\n\\t\\tthis.__fieldHasChild = this.__fieldPrefix + \\\"_item_hasChild\\\";\\r\\n\\t\\tthis.__fieldHasParent = this.__fieldPrefix + \\\"_item_hasParent\\\";\\r\\n\\t\\tthis.__fieldIsCollapsed = this.__fieldPrefix + \\\"_item_isCollapsed\\\";\\r\\n\\t\\tthis.__fieldItemArrow = this.__fieldPrefix + \\\"_item_arrow\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__isShiftPressed = false;\\r\\n\\t\\tthis.__isCtrlPressed = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.__objGrid = null;\\r\\n\\t\\tthis.__nsListFilter = null;\\r\\n\\t\\tthis.__nsListDragDrop = null;\\r\\n\\t\\tthis.__nsToolTipInElement = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__keyDownRef = null;\\r\\n\\t\\tthis.__keyUpRef = null;\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component);\\r\\n\\t};\\r\\n\\tnsExtendPrototype(NSContainerBase,NSList);\\r\\n\\tNSList.prototype.constructor = NSList;\\r\\n\\t\\r\\n\\tNSList.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t\\tthis.__initializePluggins();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t\\tthis.__objGrid.__addSVGInPage();\\r\\n\\t\\tthis.__setTemplate();\\r\\n\\t\\tthis.__objGrid.__initialize();\\r\\n\\t\\tthis.__addListenerForBody();\\r\\n\\t\\tif(this.__dataSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.dataSource(this.__dataSource);\\r\\n\\t\\t}\\r\\n\\t\\tif(!window[\\\"nsListMap\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\twindow[\\\"nsListMap\\\"] = {};\\r\\n\\t\\t}\\r\\n\\t\\twindow[\\\"nsListMap\\\"][this.getID()] = this;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__keyDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"keydown\\\",this.__keyDownRef);\\r\\n\\t\\t\\tthis.__keyDownRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__keyUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"keyup\\\",this.__keyUpRef);\\r\\n\\t\\t\\tthis.__keyUpRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__scroller)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__scroller.__destroyElements();\\r\\n\\t\\t\\tthis.__scroller = null;\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.base.componentResized.call(this,event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.expandAll = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableHierarchical)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__expandCollapseAll(false);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.collapseAll = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableHierarchical)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__expandCollapseAll(true);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setContextMenuSetting = function(contextMenuSetting)\\r\\n\\t{\\r\\n\\t\\tthis.__contextMenuSetting = contextMenuSetting;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tvar setting = this.__setting;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableHierarchical\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableHierarchical = Boolean.parse(setting[\\\"enableHierarchical\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableVirtualScroll\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableVirtualScroll = Boolean.parse(setting[\\\"enableVirtualScroll\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableDragDrop\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enableDragDrop = Boolean.parse(setting[\\\"enableDragDrop\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"isDraggable\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__isDraggable = Boolean.parse(setting[\\\"isDraggable\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"isDroppable\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__isDroppable = Boolean.parse(setting[\\\"isDroppable\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableDragByHandle\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableDragByHandle = Boolean.parse(setting[\\\"enableDragByHandle\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"dragHandlerClass\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dragHandlerClass = setting[\\\"dragHandlerClass\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableDragAfterHold\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableDragAfterHold = Boolean.parse(setting[\\\"enableDragAfterHold\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"holdTime\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__holdTime = parseInt(setting[\\\"holdTime\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableCloneMode\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableCloneMode = Boolean.parse(setting[\\\"enableCloneMode\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"labelField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__labelField = setting[\\\"labelField\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"itemRenderer\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__itemRenderer = setting[\\\"itemRenderer\\\"];\\r\\n\\t\\t\\t\\tthis.__itemRenderer = this.util.getFunction(this.__itemRenderer);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"template\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__templateID = setting[\\\"template\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"setData\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__setData = setting[\\\"setData\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"labelFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__labelFunction = setting[\\\"labelFunction\\\"];\\r\\n\\t\\t\\t\\tthis.__labelFunction = this.util.getFunction(this.__labelFunction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMultipleSelection\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMultipleSelection =  Boolean.parse(setting[\\\"enableMultipleSelection\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableCustomScrollBar\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableCustomScrollBar =  Boolean.parse(setting[\\\"enableCustomScrollBar\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableKeyboardNavigation\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableKeyboardNavigation =  Boolean.parse(setting[\\\"enableKeyboardNavigation\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMouseHover\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMouseHover =  Boolean.parse(setting[\\\"enableMouseHover\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMouseHoverAnimation\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMouseHoverAnimation =  Boolean.parse(setting[\\\"enableMouseHoverAnimation\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"disableHoverField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__disableHoverField = setting[\\\"disableHoverField\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"disableHoverFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__disableHoverFunction = setting[\\\"disableHoverFunction\\\"];\\r\\n\\t\\t\\t\\tthis.__disableHoverFunction = this.util.getFunction(this.__disableHoverFunction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"rowHeight\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__rowHeight =  parseInt(setting[\\\"rowHeight\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"noDataMessage\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__noDataMessage = setting[\\\"noDataMessage\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"dataSource\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dataSource = setting[\\\"dataSource\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"childField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__childField = setting[\\\"childField\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableContextMenu\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableContextMenu = Boolean.parse(setting[\\\"enableContextMenu\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"contextMenuProvider\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__contextMenuProvider =  setting[\\\"contextMenuProvider\\\"];\\r\\n\\t\\t\\t\\tthis.__contextMenuProvider = this.util.getFunction(this.__contextMenuProvider);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableVariableRowHeight\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableVariableRowHeight =  Boolean.parse(setting[\\\"enableVariableRowHeight\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"customScrollBarSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__customScrollBarSetting =  setting[\\\"customScrollBarSetting\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__customScrollBarSetting = {enableTooltip: false,toolTipLabelFunction: null,verticalScrollButtons: {enable: false},horizontalScrollButtons:{enable: false}};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"virtualScrollSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__virtualScrollSetting = setting[\\\"virtualScrollSetting\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__virtualScrollSetting = {pageSize: null,pagesRendered: null,enableScrollDelay: false,scrollInterval: null,resizeInterval: null,enableLoader: false,getLoaderComponent: null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.dataSource = function(source)\\r\\n\\t{\\r\\n\\t\\tthis.__dataSource = source;\\r\\n\\t\\tif(this.__listContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeAllChildren(this.__listContainer);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createStructure();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__dataSource && this.__dataSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__orignalItemKey = Object.keys(this.__dataSource[0]);\\r\\n\\t\\t\\tthis.__objGrid.dataSource();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__arrWrapper = [];\\r\\n\\t\\t\\tthis.__arrInternalSource = [];\\r\\n\\t\\t\\tthis.__updateTotalRecords(0);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__renderBody();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getOrignalItem = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item && this.__orignalItemKey && this.__orignalItemKey.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retItem = {};\\r\\n\\t\\t\\tvar key = null;\\r\\n\\t\\t\\tfor(var count = 0;count < this.__orignalItemKey.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tkey = this.__orignalItemKey[count];\\r\\n\\t\\t\\t\\tretItem[key] = item[key];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retItem;\\r\\n\\t\\t}\\r\\n\\t\\treturn item;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.addItems = function(arrItem)\\r\\n\\t{\\r\\n\\t\\tthis.__addItem(arrItem);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.addItemsAsChildren = function(item,arrChildren)\\r\\n\\t{\\r\\n\\t\\tthis.__objGrid.addItemsAsChildren(item,arrChildren);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.removeItems = function(arrObject)\\r\\n\\t{\\r\\n\\t\\tif(arrObject && arrObject.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrIndex = [];\\r\\n\\t\\t\\tif(this.util.isNumber(arrObject[0]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrIndex = arrObject;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (var count = 0;count < arrObject.length;count++)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\tvar item = arrObject[count];\\r\\n\\t\\t\\t\\t\\tif(item && item[this.__fieldIndex])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrIndex.push(item[this.__fieldIndex]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tarrIndex.sort();\\r\\n\\t   \\t \\tfor (var rowIndex = arrIndex.length - 1; rowIndex >= 0; rowIndex--)\\r\\n\\t\\t    {\\r\\n\\t   \\t \\t\\tvar index = arrIndex[rowIndex];\\r\\n\\t   \\t \\t\\tif(index > 0 && index < this.__arrInternalSource.length)\\r\\n\\t   \\t \\t\\t{\\r\\n\\t\\t   \\t \\t\\t//if virtual scroll or Pagination of type Page is enabled then do not remove rows\\r\\n\\t\\t   \\t \\t\\tif(!this.__enableVirtualScroll)\\r\\n\\t\\t   \\t \\t\\t{\\r\\n\\t\\t   \\t \\t\\t\\tthis.__listContainer.removeChild(this.__listContainer.childNodes[index]);\\r\\n\\t\\t   \\t \\t\\t}\\r\\n\\t\\t   \\t \\t\\tthis.__arrInternalSource.splice(index, 1);\\r\\n\\t\\t   \\t \\t\\tthis.__arrWrapper.splice(index, 1);\\r\\n\\t   \\t \\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t \\tthis.__updateTotalRecords();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.scrollToIndex = function(selectedIndex,animationRequired)\\r\\n\\t{\\r\\n\\t\\tselectedIndex = parseInt(selectedIndex);\\r\\n\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\tif(selectedIndex > -1 && source && selectedIndex < source.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(selectedIndex);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__enableCustomScrollBar)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar targetDimension = this.__virtualRowHeight * (selectedIndex - 1);\\r\\n\\t\\t\\t\\t\\t\\tthis.__setVirtualScroll_ScrollTop(targetDimension);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t//var item = this.__getVisibleItemByIndex(this.__arrInternalSource,selectedIndex);\\r\\n\\t\\t\\t\\t\\t\\tif(this.__nsVirtualScroll)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t//because in list index is index+1\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__nsVirtualScroll.scrollToIndex(selectedIndex - 1,animationRequired);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item[this.__fieldItem])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar targetDimension = item[this.__fieldItem].offsetTop;\\r\\n\\t\\t\\t\\t\\t\\tvar scrollTarget = this.__divOuterContainer;\\r\\n\\t\\t\\t\\t\\t\\tif(animationRequired)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar animation = new this.util.animation(scrollTarget,[\\r\\n\\t\\t\\t\\t       \\t  \\t    {\\r\\n\\t\\t\\t\\t       \\t  \\t      time: 500,\\r\\n\\t\\t\\t\\t       \\t  \\t      property:\\\"scrollTop\\\",\\r\\n\\t\\t\\t\\t       \\t  \\t      target: targetDimension,\\r\\n\\t\\t\\t\\t       \\t  \\t    }\\r\\n\\t\\t\\t\\t       \\t  \\t]);\\r\\n\\t\\t\\t\\t   \\t  \\t  \\tanimation.animate();\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tscrollTarget.scrollTop = targetDimension;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setSelectedItems = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__clearAllRowSelection(false);\\r\\n\\t\\t\\t\\tvar length = arrItems.length;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = arrItems[count];\\r\\n\\t\\t\\t\\t\\tindex = this.__getIndexByItem(item);\\r\\n\\t\\t\\t\\t\\tif(index > -1 && source && index < source.length)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__setIndex(index,true);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setSelectedItem = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tthis.setSelectedItems([arrItems]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setSelectedIndexes = function(arrSelectedIndex)\\r\\n\\t{\\r\\n\\t\\tif(arrSelectedIndex && arrSelectedIndex.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar length = arrSelectedIndex.length;\\r\\n\\t\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tindex = arrSelectedIndex[count];\\r\\n\\t\\t\\t\\t\\tif(index > -1 && source && index < source.length)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__setIndex(index,true);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setSelectedIndex = function(selectedIndex)\\r\\n\\t{\\r\\n\\t\\tthis.setSelectedIndexes([selectedIndex]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.unSelectItems = function(arrItems)\\r\\n\\t{\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.unSelectItem = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tthis.unSelectItems([arrItems]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.unSelectIndexes = function(arrSelectedIndex)\\r\\n\\t{\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.unSelectIndex = function(selectedIndex)\\r\\n\\t{\\r\\n\\t\\tthis.unSelectIndexes([selectedIndex]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getSelectedIndex = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedIndex;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getSelectedItem = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getSelectedIndexes = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedIndexes;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getSelectedItems = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedItems;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.deselectAll = function()\\r\\n\\t{\\r\\n\\t\\tthis.__clearAllRowSelection(true);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.filter = function(strData,setting,enableHighlighting,recordLimit)\\r\\n\\t{\\r\\n\\t\\tthis.__nsListFilter.filter(strData,setting,enableHighlighting,recordLimit);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.resetFilter = function()\\r\\n\\t{\\r\\n\\t\\tthis.__nsListFilter.reset();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.updateListItemByIndex = function(index)\\r\\n\\t{\\r\\n\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = this.__getListItemFromItem(item);\\r\\n\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = this.__getIndexByItem(item);\\r\\n\\t\\t\\t\\tthis.__updateListItemText(listItem,item,index);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__highlightDiv = function(divText)\\r\\n\\t{\\r\\n\\t\\tthis.__nsListFilter.__highlightDiv(divText);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__initializePluggins = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__objGrid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableHierarchical)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__objGrid = new NSHierarchicalList(this);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__objGrid = new NSFlatList(this);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__nsListFilter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsListFilter = new NSListFilter(this);\\r\\n\\t\\t\\tif(this.__enableDragDrop)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsListDragDrop = new NSListDragDrop(this);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__nsToolTipInElement = new this.util.nsToolTipInElement();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createStructure = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divOuterContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divOuterContainer = this.util.createDiv(this.getID() + \\\"container\\\",\\\"nsListOuterContainer\\\");\\r\\n\\t\\t\\tif(this.__enableHierarchical)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__divOuterContainer,\\\"nsListOuterContainerHierarchical\\\")\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__divOuterContainer.style.width = this.util.getStyleValue(this.__baseComponent,\\\"width\\\");\\r\\n\\t\\t\\t//this.__divOuterContainer.style.height = this.util.getStyleValue(this.__baseComponent,\\\"height\\\");\\r\\n\\t\\t\\tthis.addChild(this.__divOuterContainer);\\r\\n\\t\\t\\tthis.__divParentContainer = this.util.createDiv(this.getID() + \\\"parentContainer\\\",\\\"nsListParentContainer\\\");\\r\\n\\t\\t\\tthis.__divOuterContainer.appendChild(this.__divParentContainer);\\r\\n\\t\\t\\tthis.__listContainer = this.util.createElement(\\\"ul\\\",this.getID() + \\\"list\\\",\\\"nsListContainer\\\");\\r\\n\\t\\t\\tthis.__listContainer.style.minHeight = (this.__divOuterContainer.clientHeight - 10) + \\\"px\\\";\\r\\n\\t\\t\\tthis.__divParentContainer.appendChild(this.__listContainer);\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__divParentContainer,\\\"nsListBodyContainerVirtual\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__createCustomScroller();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\r\\n\\tNSList.prototype.__renderBody = function()\\r\\n\\t{\\r\\n\\t\\tthis.__navigationIndex = -1;\\r\\n\\t\\tif(this.__enableContextMenu)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeContextMenu();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setNSVirtualScroll(this.__arrInternalSource);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeAllChildren(this.__listContainer);\\r\\n\\t\\t\\tthis.__createList(this.__arrInternalSource,0,this.__arrInternalSource.length);\\r\\n\\t\\t\\t//5 is offset for number of rows\\r\\n\\t\\t\\tvar listItem = this.__getListItemByIndex(0);\\r\\n\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__listItemHeight = listItem.clientHeight;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__pageSize = (this.__divOuterContainer.clientHeight/this.__listItemHeight) - 5;\\r\\n\\t\\t\\tthis.__startArrayElement = 0;\\r\\n\\t\\t}\\r\\n\\t\\t//this.__listContainer.scrollTop = 0;\\r\\n\\t\\tif(this.__nsListDragDrop)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsListDragDrop.initialize();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setNSVirtualScroll = function(source)\\r\\n\\t{\\r\\n\\t\\tvar length = 0;\\r\\n\\t\\tif(source && source.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(source[count][this.__fieldItemVisible])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tlength++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__nsVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsVirtualScroll.dataSource(length);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__rowHeight > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__virtualRowHeight = this.__rowHeight;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__createList(this.__arrInternalSource,0,1);\\r\\n\\t\\t\\t\\t\\tvar item = this.__arrInternalSource[0];\\r\\n\\t\\t\\t\\t\\tvar listItem = item[this.__fieldItem];\\r\\n\\t\\t\\t\\t    this.__virtualRowHeight = listItem.offsetHeight;\\r\\n\\t\\t\\t\\t    listItem.parentNode.removeChild(listItem);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar setting = {scrollElement: this.__divOuterContainer,contentElement: this.__listContainer,itemTag: \\\"li\\\",totalLength: length,getItemComponent:this.__getItemComponentForVirtual.call(this),getEmptyItemComponent:this.__getEmptyItemComponentForVirtual.call(this)};\\r\\n\\t\\t\\t\\tvar virtualScrollSetting = this.__virtualScrollSetting;\\r\\n\\t\\t\\t\\tvar arrCopyFields = [\\\"pageSize\\\",\\\"pagesRendered\\\",\\\"enableScrollDelay\\\",\\\"scrollInterval\\\",\\\"resizeInterval\\\",\\\"enableLoader\\\",\\\"getLoaderComponent\\\"];\\r\\n\\t\\t\\t\\tvar field = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrCopyFields.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfield = arrCopyFields[count];\\r\\n\\t\\t\\t\\t\\tif(!this.util.isUndefinedOrNull(virtualScrollSetting[field]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetting[field] = virtualScrollSetting[field];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__nsVirtualScroll = new NSVirtualScroll(setting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getItemComponentForVirtual = function()\\r\\n\\t{\\r\\n\\t\\tvar list = this;\\r\\n\\t\\tvar CreateListItem = function(index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__index = index;\\r\\n\\t\\t\\tthis.__list =  list;\\r\\n\\t\\t\\tthis.__item = null;\\r\\n\\t\\t\\tthis.__listItem = null;\\r\\n\\t\\t};\\r\\n\\t\\tCreateListItem.prototype.getElement = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__list.__enableHierarchical)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__item = this.__list.__getVisibleItemByIndex(null,this.__index);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__item = this.__list.__arrInternalSource[this.__index];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__listItem = this.__list.__createListItem(this.__item,false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn this.__listItem;\\r\\n\\t\\t};\\r\\n\\t\\treturn CreateListItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getEmptyItemComponentForVirtual = function()\\r\\n\\t{\\r\\n\\t\\tvar list = this;\\r\\n\\t\\tvar CreateEmptyListItem = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__list =  list;\\r\\n\\t\\t\\tthis.__listItem = null;\\r\\n\\t\\t};\\r\\n\\t\\tCreateEmptyListItem.prototype.getElement = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__listItem = this.__list.__createNoDataRow.call(this.__list);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn this.__listItem;\\r\\n\\t\\t};\\r\\n\\t\\treturn CreateEmptyListItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createCustomScroller = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableCustomScrollBar && !this.__scroller)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting = {element: this.__divOuterContainer,enableCustomHandler: true,verticalScrollButtons:this.__customScrollBarSetting.verticalScrollButtons,horizontalScrollButtons:this.__customScrollBarSetting.horizontalScrollButtons};\\r\\n\\t\\t\\tfor (var key in setting) \\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\tthis.__scrollerSetting[key] = setting[key]; \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__scroller = new NSScroller(this.__scrollerSetting);\\r\\n\\t\\t\\tthis.util.addEvent(this.__scrollerSetting.element,NSScroller.SCROLLING,this.__customScrollHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(this.__scrollerSetting.element,NSScroller.SCROLL_END,this.__customScrollEndHandler.bind(this));\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__customScrollHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar virtualVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t//todo Virtual Scroll impl for Custom Scroll Bar\\r\\n\\t\\t};\\r\\n\\t\\tvar dataRefreshVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\tvar asyncLoadVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\tvar paginationVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\tvar normalVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__divOuterContainer.scrollTop = scrollPos;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar first,last;\\r\\n\\t\\t\\tvar arrRows = self.__listContainer.querySelectorAll(\\\"li\\\");\\r\\n\\t\\t\\tfor(var count = 0;count < arrRows.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar li = arrRows[count];\\r\\n\\t\\t\\t\\tif(isInViewport(li))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfirst = li;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(;count < arrRows.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar li = arrRows[count];\\r\\n\\t\\t\\t\\tif(!isInViewport(li))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tlast = li;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tconsole.log(first,last);\\r\\n\\t\\t};\\r\\n\\t\\tvar normalHorHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__divOuterContainer.scrollLeft = scrollPos;\\r\\n\\t\\t};\\r\\n\\t\\tvar isInViewport = function (elem) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(elem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t/*var distance = elem.getBoundingClientRect();\\r\\n\\t\\t\\t\\treturn (\\r\\n\\t\\t\\t\\t\\tdistance.top >= 0 &&\\r\\n\\t\\t\\t\\t\\tdistance.left >= 0 &&\\r\\n\\t\\t\\t\\t\\tdistance.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\\r\\n\\t\\t\\t\\t\\tdistance.right <= (window.innerWidth || document.documentElement.clientWidth)\\r\\n\\t\\t\\t\\t);*/\\r\\n\\t\\t\\t\\tconst rect = elem.getBoundingClientRect();\\r\\n\\t\\t\\t    const windowHeight = (window.innerHeight || document.documentElement.clientHeight);\\r\\n\\t\\t\\t    const windowWidth = (window.innerWidth || document.documentElement.clientWidth);\\r\\n\\r\\n\\t\\t\\t    const vertInView = (rect.top <= windowHeight) && ((rect.top + rect.height) >= 0);\\r\\n\\t\\t\\t    const horInView = (rect.left <= windowWidth) && ((rect.left + rect.width) >= 0);\\r\\n\\r\\n\\t\\t\\t    return (vertInView && horInView);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\tvar objCondition = {virtualScroll:{eligible:this.__enableVirtualScroll,verHandler:virtualVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tdataRefreshOnEnd:{eligible:this.__enableDataRefreshOnScrollEnd,verHandler:dataRefreshVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tasyncLoad:{eligible:this.__enableAsyncLoadPagination,verHandler:asyncLoadVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tpagination:{eligible:(this.__enablePagination && this.__isPaginationTypeScroll),verHandler:paginationVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tnormal:{eligible:true,verHandler:normalVerHandler,horHandler:normalHorHandler}\\r\\n\\t\\t\\t\\t\\t\\t   };\\r\\n\\t\\tvar eventItem = event;\\r\\n\\t\\tvar direction = eventItem.direction;\\r\\n\\t\\tvar scrollPos = eventItem.scrollPos;\\r\\n\\t\\tvar oldScrollPos = eventItem.oldScrollPos;\\r\\n\\t\\tvar orignalEvent = eventItem.orignalEvent;\\r\\n\\t\\tvar scrollBar = eventItem.scrollBar;\\r\\n\\t\\tvar position = eventItem.absoluteScrollBarPos;\\r\\n\\t\\tfor(var key in objCondition)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = objCondition[key];\\r\\n\\t\\t\\tif(item.eligible)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(direction == \\\"vertical\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item.verHandler)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(this.__customScrollBarSetting[\\\"enableTooltip\\\"] && !this.__customScrollBarTooltip)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__customScrollBarTooltip = this.util.createElement(\\\"span\\\",null,\\\"tooltiptext tooltip-left\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\tdocument.body.appendChild(this.__customScrollBarTooltip);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\titem.verHandler();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item.horHandler)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem.horHandler();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__customScrollEndHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__customScrollBarTooltip)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdocument.body.removeChild(this.__customScrollBarTooltip);\\r\\n\\t\\t\\tthis.__customScrollBarTooltip = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__customScrollTooltipPos = function(scrollbar,position,itemFrom,itemTo)\\r\\n\\t{\\r\\n\\t\\tif(this.__customScrollBarTooltip)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar toolTip = this.__customScrollBarTooltip;\\r\\n\\t\\t\\tvar css = {};\\r\\n\\t\\t\\t//5 for the triangle\\r\\n\\t\\t\\tcss.left = (position.x - toolTip.offsetWidth - 5) + \\\"px\\\";\\r\\n\\t\\t\\tcss.top = position.y + \\\"px\\\";\\r\\n\\t\\t\\tthis.util.css(toolTip,css);\\r\\n\\t\\t\\tif(this.__customScrollBarSetting.toolTipLabelFunction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolTip.innerHTML = this.__customScrollBarSetting.toolTipLabelFunction(itemFrom,itemTo);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolTip.innerHTML = \\\"Showing Record from index \\\" + itemFrom + \\\" to \\\" +  itemTo;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__virtualRowSelection = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__listContainer.children && this.__listContainer.children.length > 0 && this.__arrInternalSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = null;\\r\\n\\t\\t\\tvar index = null;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0; count < this.__listContainer.children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlistItem = this.__listContainer.children[count];\\r\\n\\t\\t\\t\\tindex = this.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\t\\titem = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\tif(item && this.__isMouseHoverAllowed(index))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item[this.__fieldSelected])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t//DONOT REPLACE WITH __markRowSelected\\r\\n\\t\\t\\t\\t\\t\\tthis.util.addStyleClass(listItem,\\\"nsListItemSelected\\\"); \\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t//DONOT REPLACE WITH __markRowUnselected\\r\\n\\t\\t\\t\\t\\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemSelected\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__virtualRowHover = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__listContainer.children && this.__listContainer.children.length > 0 && this.__arrInternalSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = null;\\r\\n\\t\\t\\tvar index = null;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0; count < this.__listContainer.children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlistItem = this.__listContainer.children[count];\\r\\n\\t\\t\\t\\tindex = this.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\t\\titem = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\t(item && item[this.__fieldHover]) ? this.util.addStyleClass(listItem,\\\"nsListItemHover\\\") : this.util.removeStyleClass(listItem,\\\"nsListItemHover\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setVirtualRowHoverField = function(indexToSet)\\r\\n\\t{\\r\\n\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t{\\r\\n\\t\\t\\tindexToSet = -1;\\r\\n\\t\\t}\\r\\n\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\tif(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0; count < source.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__fieldHover] = (item[this.__fieldIndex] === indexToSet); \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setVirtualRowHover = function(indexToSet)\\r\\n\\t{\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tindexToSet = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar item = this.__getVisibleItemByIndex(null,indexToSet);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__navigationIndex = indexToSet;\\r\\n\\t\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\tthis.__setVirtualRowHoverField(index);\\r\\n\\t\\t\\t\\tthis.__virtualRowHover();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setRowHover = function(indexToSet)\\r\\n\\t{\\r\\n\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t{\\r\\n\\t\\t\\tindexToSet = 0;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setVirtualRowHover(indexToSet);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tindexToSet = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__navigationIndex = indexToSet;\\r\\n\\t\\t\\tvar listItem = this.__getListItemFromContainer(this.__navigationIndex);\\r\\n\\t\\t\\tthis.util.addStyleClass(listItem,\\\"nsListItemHover\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createNoDataRow = function()\\r\\n\\t{\\r\\n\\t\\tvar listItem = this.util.createElement(\\\"li\\\",null,\\\"nsListNoRecordsFound\\\");\\r\\n\\t\\tlistItem.setAttribute(\\\"nsNoData\\\",\\\"true\\\");\\r\\n\\t\\tvar textNode = document.createTextNode(this.__noDataMessage);\\r\\n\\t\\tlistItem.appendChild(textNode);\\r\\n\\t\\treturn listItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__addListenerForBody = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__keyDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__keyDownRef = this.__keyDownHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"keydown\\\",this.__keyDownRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__keyUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__keyUpRef = this.__keyUpHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"keyup\\\",this.__keyUpRef);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createList = function(dataSet,startIndex,endIndex)\\r\\n\\t{\\r\\n\\t\\tif(dataSet && dataSet.length > 0)\\r\\n\\t    {\\r\\n\\t\\t\\tthis.__objGrid.__createList(dataSet,startIndex,endIndex);\\r\\n\\t    }\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__listContainer.appendChild(this.__createNoDataRow());\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createListAt = function(item,index,isResetIndex)\\r\\n\\t{\\r\\n\\t\\tif(item && index > -1)\\r\\n\\t    {\\r\\n\\t\\t\\tthis.__updateItem(item,index,true,isResetIndex);\\r\\n\\t\\t\\tvar listItem = this.__createListItem(item,false);\\r\\n\\t\\t\\tthis.__listContainer.insertBefore(listItem, this.__listContainer.childNodes[index]);\\r\\n\\t\\t\\treturn listItem;\\r\\n\\t    }\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateItem = function(item,index,isReset,isResetIndex)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isResetIndex || !item.hasOwnProperty(this.__fieldIndex))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldIndex] = index;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(isReset || !item.hasOwnProperty(this.__fieldDisableHover))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldDisableHover] = this.__isHoverDisabled(item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(isReset || !item.hasOwnProperty(this.__fieldSelected))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldSelected] = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createListItem = function(item,isAdd)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\t if(this.util.isUndefined(isAdd) || isAdd === null)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t isAdd = true;\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t var listItem = this.util.createElement(\\\"li\\\",null,\\\"nsListItem\\\");\\r\\n\\t\\t\\t this.__objGrid.__createListItem(listItem,item);\\r\\n\\t\\t\\t if(this.__enableMouseHover)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t this.util.addEvent(listItem,\\\"mouseover\\\",this.__itemMouseOverHandler.bind(this));\\r\\n\\t\\t\\t\\t this.util.addEvent(listItem,\\\"mouseout\\\",this.__itemMouseOutHandler.bind(this));\\r\\n\\t\\t\\t\\t if(this.__enableMouseHoverAnimation)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t this.util.addStyleClass(listItem,\\\"nsListItemAnimated\\\");\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t else\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t this.util.addStyleClass(listItem,\\\"nsListItemNormal\\\");\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t this.util.addEvent(listItem,\\\"click\\\",this.__itemClickHandler.bind(this));\\r\\n\\t\\t\\t this.__setListItemProperties(listItem,item);\\r\\n\\t\\t\\t if(isAdd)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t this.__listContainer.appendChild(listItem);\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t return listItem;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setListItemProperties = function(listItem,item)\\r\\n\\t{\\r\\n\\t\\tthis.__objGrid.__setListItemProperties(listItem,item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__addCellText = function(listItem,item,div)\\r\\n\\t{\\r\\n\\t\\tvar toolTipText = null;\\r\\n\\t\\tif(listItem && item && div)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__itemRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objRenderer = this.__itemRenderer(item,this.__labelField,item[this.__fieldIndex],item[this.__fieldDisableHover],listItem);\\r\\n\\t\\t\\t\\tif(objRenderer)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.util.isString(objRenderer))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar compBodySpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\t\\tcompBodySpan.innerHTML = objRenderer;\\r\\n\\t\\t\\t\\t\\t\\tdiv.appendChild(compBodySpan);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdiv.appendChild(objRenderer);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__template)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdiv.appendChild(this.__template.cloneNode(true));\\r\\n\\t\\t\\t\\tthis.__setDataInTemplateRenderer(div,item,listItem);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__labelFunction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar text = this.__labelFunction(item,this.__labelField);\\r\\n\\t\\t\\t\\tdiv.appendChild(document.createTextNode(text));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(item.hasOwnProperty(this.__labelField) && !this.util.isUndefined(item[this.__labelField]) && item[this.__labelField] != null)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar text = item[this.__labelField];\\r\\n\\t\\t\\t\\tdiv.appendChild(document.createTextNode(text));\\r\\n\\t\\t    }\\r\\n\\t\\t\\tthis.__highlightDiv(div);\\r\\n\\t\\t\\tif(this.__toolTipField)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolTipText = item[this.__toolTipField];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__toolTipRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolTipText = this.__toolTipRenderer(item,this.__labelField,item[this.__fieldIndex],item[this.__fieldDisableHover],listItem);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableTruncateToFit)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(div,\\\"nsListTruncateToFit\\\");\\r\\n\\t\\t\\t\\t//This condition is above so that toolTip and title are not set togeather\\r\\n\\t\\t\\t\\tif(!toolTipText || toolTipText === \\\"\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__enableToolTipForTruncateText)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\ttoolTipText = div.textContent;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdiv.setAttribute(\\\"title\\\",div.textContent);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(toolTipText && toolTipText !== \\\"\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsToolTipInElement.addToolTip(div,toolTipText);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setDataInTemplateRenderer = function(cellItem,data,listItem)\\r\\n\\t{\\r\\n\\t\\tif(cellItem && this.__setData)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setRendererProperties(cellItem);\\r\\n\\t\\t\\tthis.__setRendererInData(cellItem,data,listItem);\\r\\n\\t\\t\\t//IE bug\\r\\n\\t\\t\\tcellItem.data = data;\\r\\n\\t\\t\\tif(this.util.isFunction(this.__setData))\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar strParam = \\\"(cellItem,data,dataField,isDisabled,listItem)\\\"; \\r\\n\\t\\t    \\tif(this.util.isString(this.__setData))\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tvar base = this;\\r\\n\\t\\t    \\t\\tthis.util.callFunctionFromString(this.__setData + strParam,function(paramValue){\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"cellItem\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn cellItem;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"data\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn data;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"dataField\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn base.__labelField;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"isDisabled\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn data[base.__fieldDisableHover];\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"listItem\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn listItem;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\treturn paramValue;\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\telse\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.__setData(cellItem,data,this.__labelField,data[this.__fieldDisableHover],listItem);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setRendererInData = function(cellItem,data,listItem)\\r\\n\\t{\\r\\n\\t\\tif(cellItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compChild = null;\\r\\n\\t\\t\\tfor(var count = 0; count < cellItem.children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompChild = cellItem.children[count];\\r\\n\\t\\t\\t\\tif(compChild)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompChild.data = data;\\r\\n\\t\\t\\t\\t\\tcompChild.listItem = listItem;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//IE 9 Bug,you got to assign it back\\r\\n\\t\\t\\t\\t//listItem.children[count] = compChild;\\r\\n\\t\\t\\t\\tthis.__setRendererInData(compChild,data,listItem);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setRendererProperties = function(cellItem)\\r\\n\\t{\\r\\n\\t\\tif(cellItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compChild = null;\\r\\n\\t\\t\\tfor(var count = 0; count < cellItem.children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompChild = cellItem.children[count];\\r\\n\\t\\t\\t\\tvar grid = this;\\r\\n\\t\\t\\t\\tArray.prototype.slice.call(compChild.attributes).forEach(function(attribute) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t        if(grid.util.isFunction(attribute.value))\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar newValue = attribute.value + \\\"(this)\\\";\\r\\n\\t\\t\\t        \\tcompChild.removeAttribute(attribute.name);\\r\\n\\t\\t\\t\\t\\t\\tcompChild.setAttribute(attribute.name,newValue);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\tif(compChild)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(compChild.hasAttribute(\\\"accessor-name\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcellItem[compChild.getAttribute(\\\"accessor-name\\\")] = compChild;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__setRendererProperties(compChild);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setTemplate = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__templateID)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__template = this.util.getTemplate(this.__templateID);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isHoverDisabled = function(item)\\r\\n\\t{\\r\\n\\t\\tif(this.__disableHoverField)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn Boolean.parse(item[this.__disableHoverField]);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__disableHoverFunction)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn Boolean.parse(this.__disableHoverFunction(item,this.__fieldIndex));\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__itemClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t    var target = this.util.getTarget(event);\\r\\n\\t    target = this.util.findParent(target,\\\"li\\\");\\r\\n\\t    var index = this.__getIndexFromTarget(target);\\r\\n\\t    this.__setIndex(index,false);\\r\\n\\t    this.__lastNavigationDirection = null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setIndex = function(index,isMultiSelect)\\r\\n\\t{\\r\\n\\t\\tif(index > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisMultiSelect = Boolean.parse(isMultiSelect);\\r\\n\\t\\t\\tif (this.__isShiftPressed && this.__enableMultipleSelection)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__multiSectionHandler(index);\\r\\n\\t\\t    }\\r\\n\\t\\t    else if(isMultiSelect || (this.__isCtrlPressed && this.__enableMultipleSelection))\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tif(this.__isRowSelected(index))\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.__markRowUnselected(index);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\telse\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.__markRowSelected(index);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    }\\r\\n\\t\\t    else\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__clearAllRowSelection(false);\\r\\n\\t\\t    \\tthis.__markRowSelected(index);\\r\\n\\t\\t    } \\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__itemMouseOverHandler = function(event)\\r\\n\\t{\\r\\n\\t\\t var target = this.util.getTarget(event);\\r\\n\\t     target = this.util.findParent(target,\\\"li\\\");\\r\\n\\t     var index = this.__getIndexFromTarget(target);\\r\\n\\t     var item = this.__getItemByIndex(index);\\r\\n\\t     if(target && index > -1 && this.__isMouseHoverAllowed(index))\\r\\n\\t     {\\r\\n\\t    \\t this.util.addStyleClass(target,\\\"nsListItemHover\\\");\\r\\n\\t    \\t this.__navigationIndex = index;\\r\\n\\t    \\t this.util.dispatchEvent(this.__baseComponent,this.ITEM_NAVIGATED,item,{index:this.__navigationIndex});\\r\\n\\t     }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__itemMouseOutHandler = function(event)\\r\\n\\t{\\r\\n\\t\\t var target = this.util.getTarget(event);\\r\\n\\t     target = this.util.findParent(target,\\\"li\\\");\\r\\n\\t     if(target)\\r\\n\\t     {\\r\\n\\t    \\t this.util.removeStyleClass(target,\\\"nsListItemHover\\\");\\r\\n\\t     }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__keyDownHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tif(this.hasFocus())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isShiftPressed = event.shiftKey;\\r\\n\\t\\t\\tthis.__isCtrlPressed = event.ctrlKey;\\r\\n\\t\\t\\tvar isShiftCtrlPressed = this.__isShiftPressed || this.__isCtrlPressed;\\r\\n\\t\\t\\tvar keyCode = this.util.getKeyUnicode(event);\\r\\n\\t\\t\\tif(this.__enableKeyboardNavigation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\t\\t\\t//key Up\\r\\n\\t\\t\\t\\tif(keyCode === this.util.KEYCODE.UP && isShiftCtrlPressed && this.__enableMultipleSelection)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__lastNavigationDirection && this.__lastNavigationDirection === this.NAVIGATION_DOWN)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.NAVIGATION_UP);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(this.__selectedIndex != 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__selectedIndex--;\\r\\n\\t\\t\\t\\t\\t\\tthis.__navigationIndex--;\\r\\n\\t\\t\\t\\t\\t\\twhile(!this.__isMouseHoverAllowed(this.__selectedIndex))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__selectedIndex--;\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__navigationIndex--;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.NAVIGATION_UP);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//key down\\r\\n\\t\\t\\t\\telse if(keyCode === this.util.KEYCODE.DOWN && isShiftCtrlPressed && this.__enableMultipleSelection)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__lastNavigationDirection && this.__lastNavigationDirection === this.NAVIGATION_UP)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.NAVIGATION_DOWN);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(source && this.__selectedIndex != source.length - 1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__selectedIndex++;\\r\\n\\t\\t\\t\\t\\t\\tthis.__navigationIndex++;\\r\\n\\t\\t\\t\\t\\t\\twhile(!this.__isMouseHoverAllowed(this.__selectedIndex))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__selectedIndex++;\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__navigationIndex++;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.NAVIGATION_DOWN);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(keyCode === this.util.KEYCODE.UP)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(source && this.__navigationIndex === -1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__navigationIndex = source.length - 1;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(this.__navigationIndex > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardNavigationHandler(event,this.NAVIGATION_UP);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(keyCode === this.util.KEYCODE.DOWN)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t/*if(this.__navigationIndex === -1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__navigationIndex = 0;\\r\\n\\t\\t\\t\\t\\t}*/\\r\\n\\t\\t\\t\\t\\tif(source)//&& this.__navigationIndex < source.length\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardNavigationHandler(event,this.NAVIGATION_DOWN);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(keyCode === this.util.KEYCODE.ENTER)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__clearAllRowSelection(false);\\r\\n\\t\\t\\t\\t\\tvar listItem = this.__getkeyboardNavigationListItem();\\r\\n\\t\\t\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__markRowSelected(this.__getIndexFromTarget(listItem));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(keyCode === this.util.KEYCODE.SHIFT)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.makeBodyUnselectable();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__keyUpHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.util.getKeyUnicode(event) === this.util.KEYCODE.CTRL)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isCtrlPressed = false;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.getKeyUnicode(event) === this.util.KEYCODE.SHIFT)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isShiftPressed = false;\\r\\n\\t\\t\\tthis.util.makeBodySelectable();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__keyBoardNavigationHandler = function(event,direction)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar lastIndex = this.__navigationIndex;\\r\\n\\t\\tvar currentIndex = this.__navigationIndex;\\r\\n\\t\\t(direction === this.NAVIGATION_UP) ? currentIndex--:currentIndex++;\\r\\n\\t\\twhile(!this.__isMouseHoverAllowed(currentIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\t(direction === this.NAVIGATION_UP) ? currentIndex--:currentIndex++;\\r\\n\\t\\t}\\r\\n\\t\\tvar endHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__navigationIndex = currentIndex;\\r\\n\\t\\t\\tvar listItem = self.__getkeyboardNavigationListItem();\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar source = self.__objGrid.__getFlatSource();\\r\\n\\t\\t\\t\\tindex = self.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\t\\titem = self.__getItemByIndex(index, source);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tself.util.dispatchEvent(self.__baseComponent,self.ITEM_NAVIGATED,item,{index:index});\\r\\n\\t\\t\\tself.__lastNavigationDirection = null;\\r\\n\\t\\t};\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar virtualHandler = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//self.__setVirtualRowHover.call(self,index);\\r\\n\\t\\t\\t\\tvar item = self.__getVisibleItemByIndex.call(self,null,currentIndex);\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar index = item[self.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tself.__setVirtualRowHoverField.call(self,index);\\r\\n\\t\\t\\t\\t\\tself.__virtualRowHover.call(self);\\r\\n\\t\\t\\t\\t\\tendHandler();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tthis.scrollToIndex(currentIndex,false);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tsetTimeout(function()\\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\tvirtualHandler();\\r\\n\\t\\t\\t},0);\\r\\n\\t\\t\\t//this.__setVirtualRowHover(currentIndex);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = this.__getListItemFromContainer(lastIndex - this.__startArrayElement);\\r\\n\\t\\t\\tvar currentListItem = this.__getListItemFromContainer(currentIndex - this.__startArrayElement);\\r\\n\\t\\t\\t//var listItem = this.__getListItemByIndex(lastIndex - this.__startArrayElement);\\r\\n\\t\\t\\t//var currentListItem = this.__getListItemByIndex(currentIndex - this.__startArrayElement);\\r\\n\\t\\t\\tif(currentListItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemHover\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(currentListItem,\\\"nsListItemHover\\\");\\r\\n\\t\\t\\t\\tthis.__refreshScrollPosition(currentListItem,direction);\\r\\n\\t\\t\\t\\tendHandler();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tevent.preventDefault();\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__keyBoardSelectionHandler = function(event,direction)\\r\\n\\t{\\r\\n\\t\\tif(this.__isRowSelected(this.__selectedIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__markRowUnselected(this.__selectedIndex);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__markRowSelected(this.__selectedIndex);\\r\\n\\t\\t}\\r\\n\\t\\tif(direction === this.NAVIGATION_DOWN)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.scrollToIndex(this.__selectedIndex,false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(Math.floor(this.__selectedIndex % this.__pageSize) === 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar listItem = this.__getListItemByIndex(this.__selectedIndex);\\r\\n\\t\\t\\t\\tthis.__refreshScrollPosition(listItem,this.NAVIGATION_DOWN);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse if(direction === this.NAVIGATION_UP)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.scrollToIndex(this.__selectedIndex,false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar listItem = this.__getListItemByIndex(this.__selectedIndex);\\r\\n\\t\\t\\t\\tthis.__refreshScrollPosition(listItem,this.NAVIGATION_UP);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__lastNavigationDirection = direction;\\r\\n\\t\\tevent.preventDefault();\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__refreshScrollPosition = function(listItem,direction)\\r\\n\\t{\\r\\n\\t\\tif(!this.__isElementInView(listItem))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__scrollToListItem(listItem);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isElementInView = function(listItem)\\r\\n\\t{\\r\\n\\t\\tvar cellBottom = 0;\\r\\n\\t    var parentBottom = 0;\\r\\n\\t    var cellTop = 0;\\r\\n\\t    var parentTop = 0;\\r\\n\\t\\tif(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar scrollParent = this.__divOuterContainer;\\r\\n\\t\\t\\tvar listChild = listItem.querySelector(\\\".nsListChild\\\");\\r\\n\\t\\t\\tif(scrollParent && listChild)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cellRect = listChild.getBoundingClientRect();\\r\\n\\t            parentTop = 0;\\r\\n\\t            var rectScrollParent = scrollParent.getBoundingClientRect();\\r\\n\\t            parentBottom = rectScrollParent.height;\\r\\n\\t            cellTop =  cellRect.top - rectScrollParent.top;\\r\\n\\t            cellBottom = cellTop + cellRect.height;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn cellBottom <= parentBottom && cellTop >= parentTop;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__scrollToListItem = function(listItem)\\r\\n\\t{\\r\\n\\t\\tif(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rectCell = listItem.getBoundingClientRect();\\r\\n\\t\\t\\tvar rectParentContainer = this.__divParentContainer.getBoundingClientRect();\\r\\n\\t        var scrollTop = rectCell.top - rectParentContainer.top;\\r\\n\\t        this.__divOuterContainer.scrollTop = scrollTop;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getkeyboardNavigationListItem = function()\\r\\n\\t{\\r\\n\\t\\tvar listItem = null;\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem = this.__listContainer.querySelector(\\\".nsListItemHover\\\");\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem = this.__getListItemFromContainer(this.__navigationIndex);\\r\\n\\t\\t}\\r\\n\\t\\treturn listItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isMouseHoverAllowed = function(index)\\r\\n\\t{\\r\\n\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn !item[this.__fieldDisableHover];\\r\\n\\t\\t}\\r\\n\\t\\treturn true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__markRowSelected= function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1)\\r\\n\\t    {\\r\\n\\t        if(!this.__isRowSelected(index))\\r\\n\\t        {\\r\\n\\t        \\tthis.__setMultiSelectedVars(index,true);\\r\\n\\t            this.__setValuesForSelectedRow(index);\\r\\n\\t        \\tif(this.__enableVirtualScroll)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tthis.__virtualRowSelection();\\r\\n\\t        \\t}\\r\\n\\t        \\telse\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar listItem = this.__getListItemByIndex(index);\\r\\n\\t            \\tthis.util.addStyleClass(listItem,\\\"nsListItemSelected\\\"); \\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__markRowUnselected = function(index)\\r\\n\\t{\\r\\n\\t    if(this.__isRowSelected(index) && this.__isMouseHoverAllowed(index))\\r\\n\\t    {\\r\\n\\t    \\tvar isUnselected = this.__setMultiSelectedVars(index,false);\\r\\n\\t        if(isUnselected)\\r\\n\\t        {\\r\\n\\t        \\tthis.__setValuesForUnselectedRow(index);\\r\\n\\t        }\\r\\n\\t        if(this.__enableVirtualScroll)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tthis.__virtualRowSelection();\\r\\n\\t    \\t}\\r\\n\\t    \\telse\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tvar listItem = this.__getListItemByIndex(index);\\r\\n\\t    \\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemSelected\\\");\\r\\n\\t    \\t}\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setValuesForSelectedRow = function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1 && this.__isMouseHoverAllowed(index))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldSelected] = true;\\r\\n\\t\\t\\t    this.__selectedIndex = index;\\r\\n\\t\\t\\t    this.__navigationIndex = index;\\r\\n\\t\\t\\t    this.util.dispatchEvent(this.__baseComponent,this.ITEM_SELECTED,item,{index:index});\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setValuesForUnselectedRow = function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1 && this.__isMouseHoverAllowed(index))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldSelected] = false;\\r\\n\\t\\t    \\tthis.util.dispatchEvent(this.__baseComponent,this.ITEM_UNSELECTED,item,{index:index});\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__clearAllRowSelection = function(setIndexVariables)\\r\\n\\t{\\r\\n\\t\\tvar size = this.__selectedIndexes.length;\\r\\n\\t    for (var count = size - 1; count >= 0 ; count--)\\r\\n\\t    {\\r\\n\\t    \\tvar index = this.__selectedIndexes[count];\\r\\n\\t        this.__markRowUnselected(index);\\r\\n\\t    }\\r\\n\\t    this.__setMultiSelectedVars(-1,true);\\r\\n\\t    if(setIndexVariables)\\r\\n\\t    {\\r\\n\\t    \\tthis.__selectedIndex = -1;\\r\\n\\t        this.__navigationIndex = -1;\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__multiSectionHandler = function(lastIndex)\\r\\n\\t{\\r\\n\\t\\t if(lastIndex < 0)\\r\\n\\t\\t {\\r\\n\\t\\t\\t return;\\r\\n\\t\\t }\\r\\n\\t\\t if (this.__selectedIndexes.length === 0)\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.__isRowSelected(lastIndex);\\r\\n\\t\\t     return;\\r\\n\\t\\t }\\r\\n\\t\\t var firstIndex = this.__selectedIndexes[this.__selectedIndexes.length - 1];\\r\\n\\t\\t if(lastIndex === firstIndex)\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.__markRowUnselected(lastIndex);\\r\\n\\t\\t\\t return;\\r\\n\\t\\t }\\r\\n\\t\\t var isDown = lastIndex > firstIndex;\\r\\n\\t\\t var isSelection = !this.__isRowSelected(lastIndex);\\r\\n\\t\\t var counter = firstIndex;\\r\\n\\t\\t do\\r\\n\\t\\t {\\r\\n\\t\\t\\t  counter = isDown ? (counter + 1) : (counter - 1);\\r\\n\\t\\t\\t  if (isSelection)\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  this.__markRowSelected(counter);\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  else\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  this.__markRowUnselected(counter);\\r\\n\\t\\t\\t  }\\r\\n\\t\\t }\\r\\n\\t\\t while(counter != lastIndex);\\t \\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setMultiSelectedVars = function(index,add)\\r\\n\\t{\\r\\n\\t\\tif(index === -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__selectedItems = [];\\t\\r\\n\\t\\t\\tthis.__selectedIndexes = [];\\t\\r\\n\\t\\t}\\r\\n\\t\\telse if(add)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar data = this.__getItemByIndex(index);\\r\\n\\t\\t\\tthis.__selectedItems.push(data);\\r\\n\\t\\t\\tthis.__selectedIndexes.push(index);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isUnselected = false;\\r\\n\\t\\t\\tfor (var count= 0; count < this.__selectedIndexes.length ; count++)\\r\\n\\t        {\\r\\n\\t            if (this.__selectedIndexes[count] === index)\\r\\n\\t            {\\r\\n\\t                this.__selectedItems.splice(count,1);\\r\\n\\t                this.__selectedIndexes.splice(count,1);\\r\\n\\t                isUnselected = true;\\r\\n\\t                break;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t\\t\\treturn isUnselected;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\treturn true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isRowSelected= function(index)\\r\\n\\t{\\r\\n\\t    if(index > -1)\\r\\n\\t    {\\r\\n\\t    \\tvar item = this.__getItemByIndex(index);\\r\\n\\t    \\tif(item)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn item[this.__fieldSelected];\\r\\n\\t    \\t}\\r\\n\\t    }   \\r\\n\\t    return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\t/******************************************************Start of Context Menu*************************************************************/\\r\\n\\tNSList.prototype.__initializeContextMenu = function()\\r\\n\\t{\\r\\n\\t\\t//if(!this.__contextMenu)\\r\\n\\t\\t//{\\r\\n\\t\\t\\tvar contextMenuSetting = {parent:this.__listContainer,isContextMenu:true,createRunTime:true,sourceProvider:this.__getContextMenuDataProvider.bind(this),targetType:\\\"LI\\\"};\\r\\n\\t\\t\\tif(this.__contextMenuSetting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var key in this.__contextMenuSetting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t//grid setting should not be overriden by the users\\r\\n\\t\\t\\t\\t\\tif(!contextMenuSetting[key])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcontextMenuSetting[key] = this.__contextMenuSetting[key];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__contextMenu = new NSMenu(contextMenuSetting);\\r\\n\\t\\t//}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getContextMenuDataProvider = function(listItem)\\r\\n\\t{\\r\\n\\t\\tif(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem = this.util.findParent(listItem,\\\"LI\\\");\\r\\n\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = this.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\tif(item && this.__contextMenuProvider) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn this.__contextMenuProvider(item,index);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t/******************************************************End of Context Menu*************************************************************/\\r\\n\\t/******************************Custom Function *************************************/\\r\\n\\tNSList.prototype.__getIndexFromTarget = function(target)\\r\\n\\t{\\r\\n\\t\\tif(target)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn parseInt(target.getAttribute(\\\"ns-index\\\"));\\r\\n\\t\\t}\\r\\n\\t\\treturn -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getListItemFromItem = function(item)\\r\\n\\t{\\r\\n\\t\\tvar listItem = null;\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem = item[this.__fieldItem];\\r\\n\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t//below case is true if row reference has been removed due to virtual scroll \\r\\n\\t\\t\\tvar listItemRawIndex = this.__getListItemRawIndex(listItem); \\r\\n\\t\\t\\tif(!listItem || listItemRawIndex === -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrListItem = this.__listContainer.querySelectorAll('[ns-index=\\\"' + index + '\\\"]');\\r\\n\\t\\t\\t\\tif(arrListItem && arrListItem.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tlistItem = arrListItem[0];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn listItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getListItemByIndex = function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1)\\r\\n\\t    {\\r\\n\\t    \\tvar item = this.__getItemByIndex(index);\\r\\n\\t    \\tif(item)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn item[this.__fieldItem];\\r\\n\\t    \\t}\\r\\n\\t    }   \\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getListItemFromContainer = function(index)\\r\\n\\t{\\r\\n\\t\\tif(this.__listContainer.children.length > index)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__listContainer.children[index];\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getItemByIndex = function(indexToFind,source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__objGrid.__getFlatSource();\\r\\n\\t\\t}\\r\\n\\t\\tif(source && source.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldIndex] === indexToFind)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getIndexByItem = function(itemToFind,source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__objGrid.__getFlatSource();\\r\\n\\t\\t}\\r\\n\\t\\tif(itemToFind && source && source.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldIndex] === itemToFind[this.__fieldIndex])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__addItem = function(arrItem,atIndex)\\r\\n\\t{\\r\\n\\t\\tvar flatSource = this.__objGrid.__getFlatSource();\\r\\n\\t\\tif(this.util.isUndefined(atIndex) || atIndex === null)\\r\\n\\t\\t{\\r\\n\\t\\t\\tatIndex = flatSource.length;\\r\\n\\t\\t}\\r\\n\\t\\tif(arrItem && arrItem.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__listContainer && this.__listContainer.children && this.__listContainer.children.length > 0 && this.__listContainer.children.length < 3)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < this.__listContainer.children.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar listItem = this.__listContainer.children[count];\\r\\n\\t\\t\\t\\t\\tif(listItem.hasAttribute(\\\"nsNoData\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__listContainer.removeChild(listItem);\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__addRemoveRowCallInternal)\\r\\n\\t   \\t \\t{\\r\\n\\t\\t\\t\\tthis.__objGrid.__setWrapperSource(arrItem,atIndex,-1,0,true);\\r\\n\\t   \\t \\t};\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar length = arrItem.length;\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrItem[count];\\r\\n\\t\\t\\t\\tindex = atIndex + count;\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__dataSource.splice(index, 0, item);\\r\\n\\t\\t\\t\\t\\tthis.__arrWrapper.splice(index, 0, item);\\r\\n\\t\\t\\t\\t\\tthis.__arrInternalSource.splice(index, 0, item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t/*flatSource = this.__objGrid.__getFlatSource();\\r\\n\\t\\t\\tthis.__updateSourceIndex(flatSource);*/\\r\\n\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrItem[count];\\r\\n\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__createListAt(item,item[this.__fieldIndex]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__moveItem = function(arrItem,toIndex)\\r\\n\\t{\\r\\n\\t\\tif(arrItem && arrItem.length > 0 && !this.util.isUndefined(toIndex) && toIndex !== null)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar length = arrItem.length;\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\tvar fromIndex = -1;\\r\\n\\t\\t\\tvar listContainer = this.__listContainer;\\r\\n\\t\\t\\tvar listItem = null;\\r\\n\\t\\t\\tfor(var count = length - 1;count >= 0;count--)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrItem[count];\\r\\n\\t\\t\\t\\tindex = toIndex + count;\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfromIndex = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tthis.util.moveArrayItem(this.__dataSource,fromIndex,index);\\r\\n\\t\\t\\t\\t\\tthis.util.moveArrayItem(this.__arrWrapper,fromIndex,index);\\r\\n\\t\\t\\t\\t\\tthis.util.moveArrayItem(this.__arrInternalSource,fromIndex,index);\\r\\n\\t\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t// donot use item[this.__fieldItem] for getting listItem as after de-serialization the reference get lost \\r\\n\\t\\t\\t\\t\\t\\t// hence getting the item back from dataSource\\r\\n\\t\\t\\t\\t\\t\\titem = this.__getItemByIndex(fromIndex);\\r\\n\\t\\t\\t\\t\\t\\tlistItem = item[this.__fieldItem];\\r\\n\\t\\t\\t\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(listItem.parentNode === listContainer)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tlistContainer.removeChild(listItem);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tindex = (index === 0) ? index : (index - 1);\\r\\n\\t\\t\\t\\t\\t\\t\\tlistContainer.insertBefore(listItem, listContainer.children[index]);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateSourceIndex = function(source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar listItem = null;\\r\\n\\t\\tvar length = source.length;\\r\\n\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = source[count];\\r\\n\\t\\t\\tvar index = this.__enableHierarchical ? (count + 1) : count;\\r\\n\\t\\t\\titem[this.__fieldIndex] = index;\\r\\n\\t\\t\\tlistItem = item[this.__fieldItem];\\r\\n\\t\\t\\tif(listItem && this.util.isElementOfType(listItem,\\\"li\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\t\\tvar compArrow = listItem.querySelector(\\\".nsListArrow\\\");\\r\\n\\t\\t\\t\\tif(compArrow)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompArrow.setAttribute(\\\"ns-parent-row-count\\\",index);\\r\\n\\t\\t\\t\\t\\tvar arrowID = this.getID() + \\\"compArrow\\\" + index;\\r\\n\\t\\t\\t\\t\\tcompArrow.setAttribute(\\\"id\\\",arrowID);\\r\\n\\t\\t\\t\\t\\tvar compSvg = compArrow.querySelector(\\\"svg\\\");\\r\\n\\t\\t\\t\\t\\tif(compSvg)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar svgID = arrowID + \\\"svg\\\";\\r\\n\\t\\t\\t\\t\\t\\tcompSvg.setAttribute(\\\"id\\\",svgID);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar compUse = compArrow.querySelector(\\\"use\\\");\\r\\n\\t\\t\\t\\t\\tif(compUse)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar useID = arrowID + \\\"use\\\";\\r\\n\\t\\t\\t\\t\\t\\tcompUse.setAttribute(\\\"id\\\",useID);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createArrow = function(item,parentRowCount,parentElement,isCollapsed)\\r\\n\\t{\\r\\n\\t\\t if(parentElement)\\r\\n\\t\\t {\\r\\n\\t\\t\\t var cellArrowParent = this.util.createDiv(null,\\\"nsListArrowParent\\\");\\r\\n\\t\\t\\t var arrowID = this.getID() + \\\"compArrow\\\" + parentRowCount;\\r\\n\\t\\t\\t var compArrow = this.util.createDiv(arrowID,\\\"nsListArrow\\\");\\r\\n\\t\\t\\t compArrow.style.paddingTop = \\\"3px\\\";\\r\\n\\t\\t\\t compArrow.setAttribute(\\\"ns-parent-row-count\\\",parentRowCount);\\r\\n\\t\\t\\t \\r\\n\\t\\t\\t var objSVG = new NSSvg();\\r\\n\\t\\t\\t this.__objGrid.__createArrow(compArrow,objSVG,arrowID,isCollapsed);\\r\\n\\t\\t\\t this.util.addEvent(compArrow,\\\"click\\\",this.__arrowClickHandler.bind(this));\\r\\n\\t\\t\\t cellArrowParent.appendChild(compArrow);\\r\\n\\t\\t\\t parentElement.appendChild(cellArrowParent);\\r\\n\\t\\t\\t item[this.__fieldItemArrow] = compArrow;\\r\\n\\t\\t\\t return compArrow;\\r\\n\\t\\t }\\r\\n\\t\\t return null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setArrowDirection = function(compArrow,isCollapsed)\\r\\n\\t{\\r\\n\\t\\tif(compArrow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = compArrow.getAttribute(\\\"id\\\") + \\\"use\\\";\\r\\n\\t\\t\\tthis.__objGrid.__setArrowDirection(objSVG,useID,isCollapsed);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isArrowCollapsed = function(compArrow)\\r\\n\\t{\\r\\n\\t\\tif(compArrow && compArrow.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rowIndex = parseInt(compArrow.getAttribute(\\\"ns-parent-row-count\\\"));\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn item[this.__fieldIsCollapsed];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__arrowClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"DIV\\\");\\r\\n\\t\\tif(target && target.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rowIndex = target.getAttribute(\\\"ns-parent-row-count\\\");\\r\\n\\t\\t\\tvar isCollapse = this.__isArrowCollapsed(target);\\r\\n\\t\\t\\trowIndex = parseInt(rowIndex);\\r\\n\\t\\t\\tif(rowIndex > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t\\tif(item[this.__childField]  && item[this.__childField].length > 0)\\r\\n\\t\\t        {\\r\\n\\t\\t\\t\\t\\tthis.__showHideRow(rowIndex,target,!isCollapse);\\r\\n\\t\\t        }\\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__objGrid.__handleOnDemandClick(item,event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__expandCollapseAll = function(isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(!this.__enableVirtualScroll && this.__getTotalListItems() < this.__totalRecords)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.warning(\\\"nsList\\\",\\\"Please let all the items to render.\\\");\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t}\\r\\n\\t\\tvar dataSource = this.__arrInternalSource;\\r\\n\\t\\tif(dataSource && dataSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__expandCollapseAllVirtual(dataSource,isCollapse);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__expandCollapseAllNormal(dataSource,isCollapse);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__expandCollapseAllNormal = function(dataSource,isCollapse)\\r\\n\\t{\\r\\n\\t\\tfor(var count = 0;count < dataSource.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t//setting __fieldIsCollapsed here assuming that __showHideAllArrows() will be called after this function\\r\\n\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\tif(parseInt(item[this.__fieldItemLevel]) > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar row = item[this.__fieldItem];\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__showHideAllArrows(isCollapse);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__expandCollapseAllVirtual = function(dataSource,isCollapse)\\r\\n\\t{\\r\\n\\t\\tfor(var count = 0;count < dataSource.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t//setting __fieldIsCollapsed here assuming that __showHideAllArrows() will be called after this function\\r\\n\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\tif(parseInt(item[this.__fieldItemLevel]) > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__showHideAllArrows(isCollapse);\\r\\n\\t\\tthis.__updateVisibleIndex(null,0);\\r\\n\\t\\tthis.__setNSVirtualScroll(this.__arrInternalSource);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__showHideRow = function(rowIndex,compArrow,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(rowIndex > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\tif(!compArrow)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompArrow = this.__getArrow(item[this.__fieldIndex]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar rowLevel = parseInt(item[this.__fieldItemLevel]);\\r\\n\\t\\t\\tvar arrChildItems = [];\\r\\n\\t\\t\\tif(item && item[this.__fieldHasChild])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar startIndex = 0;\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrChildItems = this.__arrInternalSource;\\r\\n\\t\\t\\t\\t\\tstartIndex = rowIndex;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrChildItems = this.__getImmediateChildItems(arrChildItems, item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__showHideRowVirtual(item,arrChildItems,startIndex,rowLevel,isCollapse);\\r\\n\\t\\t\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\t\\t\\t//this.__updateItemInSource(item);\\r\\n\\t\\t\\t\\t\\tthis.__setNSVirtualScroll(this.__arrInternalSource);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__showHideRowNormal(item,arrChildItems,startIndex,rowLevel,isCollapse);\\r\\n\\t\\t\\t\\t\\tthis.__setArrowDirection(compArrow,isCollapse);\\r\\n\\t\\t\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__showHideRowNormal = function(item,arrChildItems,startIndex,rowLevel,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(arrChildItems && arrChildItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retIndex = this.__getActualIndex(arrChildItems,startIndex);\\r\\n\\t\\t\\t\\tif(retIndex !== startIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstartIndex = (retIndex + 1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar rowItem = null;\\r\\n\\t\\t\\tfor(var count = startIndex;count < arrChildItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowItem = arrChildItems[count];\\r\\n\\t\\t\\t\\tvar row = rowItem[this.__fieldItem];\\r\\n\\t\\t\\t\\tif(!row)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow = this.__createListAt(rowItem,rowItem[this.__fieldIndex] - 1,false);\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItem] = row;\\r\\n\\t\\t\\t\\t\\tthis.__updateSourceIndex();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(rowLevel >= parseInt(rowItem[this.__fieldItemLevel]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t\\tif(rowItem[this.__fieldHasChild])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\trowItem[this.__fieldIsCollapsed] = true;\\r\\n\\t\\t\\t\\t\\t\\tif(rowItem[this.__fieldItemArrow])\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar divArrow = rowItem[this.__fieldItemArrow];\\r\\n\\t\\t\\t\\t\\t\\t\\tif(divArrow)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tthis.__setArrowDirection(divArrow,true);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__showHideRowVirtual = function(item,arrChildItems,startIndex,rowLevel,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(arrChildItems && arrChildItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retIndex = this.__getActualIndex(arrChildItems,startIndex);\\r\\n\\t\\t\\t\\tif(retIndex !== startIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstartIndex = (retIndex + 1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(var count = startIndex;count < arrChildItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar rowItem = arrChildItems[count];\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(rowLevel >= parseInt(rowItem[this.__fieldItemLevel]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t\\tif(rowItem[this.__fieldHasChild])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\trowItem[this.__fieldIsCollapsed] = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\tthis.__updateVisibleIndex(null,index - 1);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__showHideAllArrows = function(isCollapse)\\r\\n\\t{\\r\\n\\t\\tvar arrDivs = this.__getAllArrows();\\r\\n\\t\\tif(arrDivs && arrDivs.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrDivs.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar div = arrDivs[count];\\r\\n\\t\\t\\t\\tif(div && div.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__setArrowDirection(div,isCollapse);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getAllItems = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__objGrid.__getFlatSource();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateListItemText = function(listItem,item,index)\\r\\n\\t{\\r\\n\\t\\treturn this.__objGrid.__updateListItemText(listItem,item,index);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getImmediateChildItems = function(arrItems,item)\\r\\n\\t{\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = [];\\r\\n\\t\\t}\\r\\n\\t\\tif(item && item[this.__fieldHasChild])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChild = this.__arrInternalSource;\\r\\n\\t\\t\\tvar rowLevel = parseInt(item[this.__fieldItemLevel]);\\r\\n\\t\\t\\tvar startIndex = item[this.__fieldIndex];\\r\\n\\t\\t\\tvar retIndex = this.__getActualIndex(arrChild,startIndex);\\r\\n\\t\\t\\tif(retIndex !== startIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstartIndex = (retIndex + 1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = arrChild.length;\\r\\n\\t\\t\\tfor(var count = startIndex;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar itemChild = arrChild[count];\\r\\n\\t\\t\\t\\tvar childRowLevel = parseInt(itemChild[this.__fieldItemLevel]);\\r\\n\\t\\t\\t\\tif(rowLevel >= childRowLevel)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif((rowLevel + 1) === childRowLevel)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrItems.push(itemChild);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn arrItems;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//generally used for Filter condition\\r\\n\\tNSList.prototype.__getActualIndex = function(arrChild,startIndex,addCompareOne)\\r\\n\\t{\\r\\n\\t\\t//(startIndex + 1) as __fieldIndex starts from 1\\r\\n\\t\\t//if(arrChild && arrChild.length < startIndex || arrChild[startIndex][this.__fieldIndex] !== (startIndex + 1))\\r\\n\\t\\tif(arrChild && arrChild.length > startIndex && arrChild[startIndex][this.__fieldIndex] !== (startIndex + 1))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compareIndex = startIndex;\\r\\n\\t\\t\\tif(addCompareOne)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompareIndex += 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar rowItem = null;\\r\\n\\t\\t\\tfor(var count = 0;count < arrChild.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowItem = arrChild[count];\\r\\n\\t\\t\\t\\tif(rowItem[this.__fieldIndex] === compareIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn count;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn startIndex;\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSList.prototype.__getAllChildItems = function(arrItems,item)\\r\\n\\t{\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = [];\\r\\n\\t\\t}\\r\\n\\t\\tif(item && item[this.__fieldHasChild])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChild = this.__arrInternalSource;\\r\\n\\t\\t\\tvar rowLevel = parseInt(item[this.__fieldItemLevel]);\\r\\n\\t\\t\\tvar startIndex = item[this.__fieldIndex];\\r\\n\\t\\t\\tvar length = arrChild.length;\\r\\n\\t\\t\\tfor(var count = startIndex;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar itemChild = arrChild[count];\\r\\n\\t\\t\\t\\tif(rowLevel >= parseInt(itemChild[this.__fieldItemLevel]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tarrItems.push(itemChild);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn arrItems;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getAllVisibleItems = function()\\r\\n\\t{\\r\\n\\t\\tvar totalRecords = 0;\\r\\n\\t\\tvar arrItems = this.__getAllItems();\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrItems[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldItemVisible])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttotalRecords += 1;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn totalRecords;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getFirstVisibleItemBeforeIndex = function(itemIndex)\\r\\n\\t{\\r\\n\\t\\tvar arrItems = this.__getAllItems();\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retIndex = this.__getActualIndex(arrItems,itemIndex);\\r\\n\\t\\t\\tif(retIndex !== itemIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titemIndex = (retIndex + 1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(var count = itemIndex;count >= 0;count--)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrItems[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldItemVisible] && item[this.__fieldVisibleIndex] > -1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getVisibleItemByIndex = function(source,index)\\r\\n\\t{\\r\\n\\t\\tvar arrItems = source;\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this; \\r\\n\\t\\t\\tvar findItem = function(itemCompare)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t return (itemCompare[self.__fieldVisibleIndex] === (index + 1));\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\treturn arrItems.find(findItem);\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateVisibleIndex = function(source,fromIndex)\\r\\n\\t{\\r\\n\\t\\tvar arrItems = source;\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isUndefinedOrNull(fromIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\tfromIndex = 0;\\r\\n\\t\\t}\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar visibleRowIndex = 1;\\r\\n\\t\\t\\tif(fromIndex > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar visibleItem = this.__getFirstVisibleItemBeforeIndex(fromIndex);\\r\\n\\t\\t\\t\\tif(visibleItem)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvisibleRowIndex = visibleItem[this.__fieldVisibleIndex];\\r\\n\\t\\t\\t\\t\\tfromIndex = visibleItem[this.__fieldIndex] - 1;\\r\\n\\t\\t\\t\\t\\tvar retIndex = this.__getActualIndex(arrItems,fromIndex,true);\\r\\n\\t\\t\\t\\t\\tif(retIndex !== fromIndex)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tfromIndex = retIndex;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = arrItems.length;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = fromIndex; count < length; count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrItems[count];\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item[this.__fieldItemVisible])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = visibleRowIndex;\\r\\n\\t\\t\\t\\t\\t\\tvisibleRowIndex++;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = -1;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateVisibleIndexByListItem = function(source,arrAllItems)\\r\\n\\t{\\r\\n\\t\\tif(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItems = arrAllItems;\\r\\n\\t\\t\\tif(!arrItems)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrItems = this.__getAllItems();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = source.length;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar objVisibleIndex = {};\\r\\n\\t\\t\\tfor(var count = 0; count < length; count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tobjVisibleIndex[index] = \\\"NSList\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlength = arrItems.length;\\r\\n\\t\\t\\t\\titem = null;\\r\\n\\t\\t\\t\\tvar visibleRowIndex = 1;\\r\\n\\t\\t\\t\\tfor(var count = 0; count < length; count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = arrItems[count];\\r\\n\\t\\t\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tif(this.util.isUndefinedOrNull(objVisibleIndex[index]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = -1;\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = visibleRowIndex;\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t\\t\\tvisibleRowIndex++;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateIndexForAllItems = function(source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tvar length = source.length;\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tfor(var count = 0; count < length; count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = source[count];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldIndex] = count;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getArrow = function(rowCount)\\r\\n\\t{\\r\\n\\t\\tvar arrDivs = this.__getAllArrows();\\r\\n\\t\\tif(arrDivs && arrDivs.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrDivs.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar div = arrDivs[count];\\r\\n\\t\\t\\t\\tif(div && div.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar rowParentCount = div.getAttribute(\\\"ns-parent-row-count\\\");\\r\\n\\t\\t\\t\\t\\tif(rowParentCount && rowParentCount == rowCount)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn div;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getAllArrows = function(divParent)\\r\\n\\t{\\r\\n\\t\\tif(!divParent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdivParent = this.__listContainer;\\r\\n\\t\\t}\\r\\n\\t\\treturn divParent.querySelectorAll(\\\".nsListArrow\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getTotalListItems = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__listContainer && this.__listContainer.children)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__listContainer.children.length;\\r\\n\\t\\t}\\r\\n\\t\\treturn 0;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateTotalRecords = function(totalCount)\\r\\n\\t{\\r\\n\\t\\tif(this.util.isUndefined(totalCount) || totalCount === null)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttotalCount = this.__arrInternalSource.length; \\r\\n\\t\\t}\\r\\n\\t\\tthis.__totalRecords = totalCount;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getListItemRawIndex = function(listItem)\\r\\n\\t{\\r\\n\\t\\tif(listItem && listItem.parentNode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar index = [].slice.call(listItem.parentNode.children).indexOf(listItem);\\r\\n\\t\\t\\treturn index;\\r\\n\\t\\t}\\r\\n\\t\\treturn -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__checkForVirtualMode = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enablePagination)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableVirtualScroll = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setVirtualScroll_ScrollTop = function(scrollTop)\\r\\n\\t{\\r\\n\\t\\tif(this.__enableCustomScrollBar)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__scroller)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__scroller.setScrollTop(scrollTop);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar NSFlatList = function(nsList)\\r\\n\\t{\\r\\n\\t\\tthis.__nsList = nsList;\\r\\n\\t\\tthis.util = nsList.util;\\r\\n\\t\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.dataSource = function(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsList.__arrWrapper = this.__nsList.__dataSource.slice(0);\\r\\n\\t\\t\\tthis.__setWrapperSource(this.__nsList.__arrWrapper,0,-1,0,true);\\r\\n\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrWrapper.slice(0);\\r\\n\\t\\t\\tthis.__nsList.__updateTotalRecords();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.addItemsAsChildren = function(item,arrChildren)\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setWrapperSource = function(source,offset,parentIndex,level,setFieldIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!offset)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\toffset = 0;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar length = source.length;\\r\\n\\t\\t\\t\\tvar count = 0;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar index = -1; \\r\\n\\t\\t\\t\\tfor (count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\tindex = offset + count;\\r\\n\\t\\t\\t\\t\\tthis.__setItemProperty(item,index,setFieldIndex);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__createList= function(dataSet,startIndex,endIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t    for(var count = startIndex; count < endIndex; count++)\\r\\n\\t\\t     {\\r\\n\\t    \\t\\titem = dataSet[count];\\r\\n\\t    \\t\\tindex =  item[this.__nsList.__fieldIndex];\\r\\n\\t    \\t\\tthis.__nsList.__updateItem(item,index);\\r\\n\\t    \\t\\tthis.__nsList.__createListItem(item);\\r\\n\\t\\t     }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createListItem = function(listItem,item)\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__addSVGInPage = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__setListItemProperties = function(listItem,item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(listItem && item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = item[this.__nsList.__fieldIndex];\\r\\n\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldItem] = listItem;\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(listItem);\\r\\n\\t\\t\\t\\tvar divCell = this.util.createDiv(null,\\\"nsListChild\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(divCell,this.__nsList.__CLASS_CELL_CHILD);\\r\\n\\t\\t\\t\\tlistItem.appendChild(divCell);\\r\\n\\t\\t\\t\\tthis.__nsList.__addCellText(listItem,item,divCell);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__updateListItemText = function(listItem,item,index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(listItem && item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(listItem);\\r\\n\\t\\t\\t\\tthis.__setListItemProperties(listItem,item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__getFlatSource= function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__nsList.__arrWrapper;\\r\\n\\t\\t};\\r\\n\\t\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\t\\tthis.__setItemProperty = function(item,rowIndex,setFieldIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(setFieldIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldIndex] = rowIndex;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldVisibleIndex] = rowIndex + 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__resetListItem = function(listItem,index,item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem.style.display = \\\"\\\";\\r\\n\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemSelected\\\");\\r\\n\\t\\t\\tthis.__nsList.__updateItem(item,index);\\r\\n\\t\\t\\tthis.__setListItemProperties(listItem,item);\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar NSHierarchicalList = function(nsList)\\r\\n\\t{\\r\\n\\t\\tthis.__nsList = nsList;\\r\\n\\t\\tthis.util = nsList.util;\\r\\n\\t\\tthis.__ARROW_COLLAPSE_PATH = \\\"M 0 9.99994L 6.10352e-005 -3.05176e-005L 5 5.00006L 0 9.99994 Z\\\";\\r\\n\\t\\tthis.__ARROW_EXPANDED_PATH = \\\"M 0 3.05176e-005L 9.99994 9.15527e-005L 4.99988 5.00003L 0 3.05176e-005 Z\\\";\\r\\n\\t\\tthis.__CLASS_ARROW = \\\"nsListArrowFill\\\";\\r\\n\\t\\tthis.__rowCounter = -1;\\r\\n\\t\\tthis.__enableOnDemandHierarchy = false;\\r\\n\\t\\tthis.__onDemandChildDetectionField = \\\"hasChildren\\\";\\r\\n\\t\\tthis.__onDemandChildFetchCallback = null;\\r\\n\\t\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting = this.__nsList.__setting;\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableOnDemandHierarchy\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableOnDemandHierarchy = Boolean.parse(setting[\\\"enableOnDemandHierarchy\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableOnDemandHierarchy)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(setting.hasOwnProperty(\\\"onDemandChildDetectionField\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__onDemandChildDetectionField = setting[\\\"onDemandChildDetectionField\\\"];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(setting.hasOwnProperty(\\\"onDemandChildFetchCallback\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__onDemandChildFetchCallback = setting[\\\"onDemandChildFetchCallback\\\"];\\r\\n\\t\\t\\t\\t\\tthis.__onDemandChildFetchCallback = this.util.getFunction(this.__onDemandChildFetchCallback);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__onDemandChildDetectionField)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.throwNSError(\\\"NSList\\\",\\\"Value for onDemandChildDetectionField is not valid\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__onDemandChildFetchCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.throwNSError(\\\"NSList\\\",\\\"Value for onDemandChildFetchCallback is not valid\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.warning(\\\"NSList\\\",\\\"As enableVirtualScroll is true so OnDemandHierarchy will have no impact.\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.dataSource = function(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsList.__arrWrapper = this.__nsList.__dataSource.slice(0);\\r\\n\\t\\t\\tthis.__setWrapperSource(this.__nsList.__arrWrapper,0,-1,0,true,true,true);\\r\\n\\t\\t\\tthis.__nsList.__updateTotalRecords(this.__rowCounter);\\r\\n\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrFlatHierarchicalSource.slice(0);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.addItemsAsChildren = function(item,arrChildren)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item && arrChildren && arrChildren.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!item[this.__nsList.__childField])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__childField] = [];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem[this.__nsList.__childField].push.apply(item[this.__nsList.__childField], arrChildren);\\r\\n\\t\\t\\t\\tthis.__setWrapperSource(this.__nsList.__arrWrapper,0,-1,0,true,false,false);\\r\\n\\t\\t\\t\\tthis.__nsList.__updateTotalRecords(this.__rowCounter);\\r\\n\\t\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrFlatHierarchicalSource.slice(0);\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldIsCollapsed] = false;\\r\\n\\t\\t   \\t\\tvar listItem = this.__nsList.__getListItemFromItem(item);\\r\\n\\t\\t   \\t\\tvar rowIndex = this.__nsList.__getIndexByItem(item);\\r\\n\\t\\t   \\t\\tthis.__nsList.__showHideRow(rowIndex,null,false);\\r\\n\\t\\t   \\t\\tconsole.log(this.__nsList.__arrFlatHierarchicalSource);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setWrapperSource = function(source,offset,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(level === 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(!offset)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\toffset = 0;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__nsList.__arrFlatHierarchicalSource = [];\\r\\n\\t\\t\\t\\t\\tthis.__rowCounter = offset;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar length = source.length;\\r\\n\\t\\t\\t\\tvar count = 0;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tfor (count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\tthis.__rowCounter++;\\r\\n\\t\\t\\t\\t\\tthis.__nsList.__arrFlatHierarchicalSource.push(item);\\r\\n\\t\\t\\t\\t\\tthis.__setItemProperty(item,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__createList= function(dataSet,startIndex,endIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t    for(var count = startIndex; count < endIndex; count++)\\r\\n\\t\\t    {\\r\\n\\t    \\t\\titem = dataSet[count];\\r\\n\\t    \\t\\tif(item)\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tindex =  item[this.__nsList.__fieldIndex];\\r\\n\\t        \\t\\tthis.__nsList.__updateItem(item,index);\\r\\n\\t        \\t\\tthis.__nsList.__createListItem(item);\\r\\n\\t    \\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createListItem = function(listItem,item)\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__addSVGInPage = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tobjSVG.addPath(\\\"svgListArrowDown\\\",this.__ARROW_EXPANDED_PATH,\\\"0 0 16 16\\\");\\r\\n\\t\\t\\tobjSVG.addPath(\\\"svgListArrowRight\\\",this.__ARROW_COLLAPSE_PATH,\\\"0 0 16 16\\\");\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__setListItemProperties = function(listItem,item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(listItem && item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = item[this.__nsList.__fieldIndex];\\r\\n\\t\\t\\t\\tvar level = item[this.__nsList.__fieldItemLevel];\\r\\n\\t\\t\\t\\tvar parentIndex = item[this.__nsList.__fieldParentIndex];\\r\\n\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-level\\\",level);\\r\\n\\t\\t\\t\\tif(item[this.__nsList.__fieldHasParent])\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-parent-index\\\",parentIndex);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldItem] = listItem;\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(listItem);\\r\\n\\t\\t\\t\\tvar divCell = this.util.createDiv(null,\\\"nsListChild\\\");\\r\\n\\t\\t\\t\\tlistItem.appendChild(divCell);\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tvar hierarchicalPadding = 0;\\r\\n\\t\\t\\t\\tvar divText = null;\\r\\n\\t\\t\\t\\tif(item && item.hasOwnProperty(this.__nsList.__labelField) && item[this.__nsList.__labelField])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t        if((item[this.__nsList.__childField]  && item[this.__nsList.__childField].length > 0) || (this.__isOnDemandHasChildren(item)))\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tthis.util.addStyleClass(divCell,this.__nsList.__CLASS_GROUP_CELL);\\r\\n\\t\\t\\t        \\tthis.__nsList.__createArrow(item,index,divCell,item[this.__nsList.__fieldIsCollapsed]);\\r\\n\\t\\t\\t        \\tvar cellText = this.util.createDiv(null,this.__nsList.__CLASS_CELL_CHILD);\\r\\n\\t\\t\\t        \\tthis.util.addStyleClass(cellText,\\\"nsListGroupCellText\\\");\\r\\n\\t\\t\\t        \\tcellText.style.verticalAlign = \\\"top\\\";\\r\\n\\t\\t\\t        \\tdivText = cellText;\\r\\n\\t\\t\\t        \\tdivCell.appendChild(cellText);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        else\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tthis.util.addStyleClass(divCell,this.__nsList.__CLASS_CELL_CHILD);\\r\\n\\t\\t\\t        \\tdivText = divCell;\\r\\n\\t\\t\\t        \\t//24 = 16(Arrow Width) + 6(Arrow Parent Padding) + 2(divCell horizontalGap between elements shown in debugger)\\r\\n\\t\\t\\t        \\thierarchicalPadding = 24;\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        this.__nsList.__addCellText(listItem,item,divText);\\r\\n\\t\\t        \\tif(level === 0)\\r\\n\\t\\t        \\t{\\r\\n\\t\\t        \\t\\tlistItem.style.paddingLeft = \\\"1px\\\";\\r\\n\\t\\t        \\t}\\r\\n\\t\\t        \\telse\\r\\n\\t\\t        \\t{\\r\\n\\t\\t        \\t\\tvar paddingLeft = (10 * level) + hierarchicalPadding;\\r\\n\\t\\t        \\t\\tlistItem.style.paddingLeft = paddingLeft + \\\"px\\\";\\r\\n\\t\\t        \\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__updateListItemText = function(listItem,item,index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(listItem && item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(listItem);\\r\\n\\t\\t\\t\\tthis.__setListItemProperties(listItem,item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__getFlatSource= function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__nsList.__arrFlatHierarchicalSource;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleOnDemandClick = function(item,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item && this.__isOnDemandHasChildren(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__onDemandChildFetchCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\t\\tvar rowLevel = item[this.__nsList.__fieldItemLevel];\\r\\n\\t\\t\\t\\t\\tvar rowIndex = this.__nsList.__getIndexByItem(item);\\r\\n\\t\\t\\t\\t\\tthis.__onDemandChildFetchCallback(item,rowIndex,rowLevel,event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\t\\tthis.__setItemProperty = function(item,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isUndefinedOrNull(setIsCollapsed))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsetIsCollapsed = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.util.isUndefinedOrNull(setItemVisible))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsetItemVisible = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar totalRowCount = this.__rowCounter;\\r\\n\\t\\t\\t\\tif(setFieldIndex || this.util.isUndefinedOrNull(item[this.__nsList.__fieldIndex]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldIndex] = totalRowCount;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldVisibleIndex] = totalRowCount;\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldItemLevel] = level;\\r\\n\\t\\t\\t\\tvar hasChild = false;\\r\\n\\t\\t\\t\\tif(item.hasOwnProperty(this.__nsList.__childField) && item[this.__nsList.__childField] && item[this.__nsList.__childField].length > 0)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\thasChild = true;\\r\\n\\t\\t\\t    \\tthis.__setWrapperSource(item[this.__nsList.__childField],0,totalRowCount,level + 1,setFieldIndex,setIsCollapsed,setItemVisible);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldParentIndex] = parentIndex;\\r\\n\\t\\t\\t\\tif(parentIndex > -1)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldHasParent] = true;\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldHasParent] = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldHasChild] = hasChild;\\r\\n\\t\\t\\t\\tif(setItemVisible || this.util.isUndefinedOrNull(item[this.__nsList.__fieldItemVisible]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(setIsCollapsed || this.util.isUndefinedOrNull(item[this.__nsList.__fieldIsCollapsed]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldIsCollapsed] = this.__isOnDemandHasChildren(item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createArrow = function(compArrow,objSVG,arrowID,isCollapsed)\\r\\n\\t\\t{\\r\\n\\t\\t\\t var svg = objSVG.addSVG(compArrow,arrowID + \\\"svg\\\",this.__CLASS_ARROW,null,null,null,null,null,null,true);\\r\\n\\t\\t\\t if(isCollapsed)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t objSVG.addUse(svg,arrowID + \\\"use\\\",null,\\\"#svgListArrowRight\\\");\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t else\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t objSVG.addUse(svg,arrowID + \\\"use\\\",null,\\\"#svgListArrowDown\\\");\\r\\n\\t\\t\\t }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__setArrowDirection = function(objSVG,useID,isCollapsed)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCollapsed)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#svgListArrowRight\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#svgListArrowDown\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__resetListItem = function(listItem,index,item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem.style.display = \\\"\\\";\\r\\n\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemSelected\\\");\\r\\n\\t\\t\\tthis.__nsList.__updateItem(item,index);\\r\\n\\t\\t\\tthis.__setListItemProperties(listItem,item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isOnDemandHasChildren = function(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (this.__enableOnDemandHierarchy && item[this.__onDemandChildDetectionField]);\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar NSListFilter = function(nsList)\\r\\n\\t{\\r\\n\\t\\tthis.__nsList = nsList;\\r\\n\\t\\t\\r\\n\\t\\tthis.util = nsList.util;\\r\\n\\t\\tthis.__filteredColumn = [];\\r\\n\\t\\tthis.__config = {};\\r\\n\\t\\tthis.__nsDragDrop = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.filter = function(strData,filterSetting,enableHighlighting,recordLimit)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!filterSetting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfilterSetting = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(enableHighlighting))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tenableHighlighting = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar config = {\\r\\n\\t\\t\\t\\t\\tcaseSensitive: this.util.isUndefinedOrNull(filterSetting[\\\"caseSensitive\\\"]) ? false : Boolean.parse(filterSetting[\\\"caseSensitive\\\"]),\\r\\n\\t\\t\\t\\t\\tmultiline: this.util.isUndefinedOrNull(filterSetting[\\\"multiline\\\"]) ? false : Boolean.parse(filterSetting[\\\"multiline\\\"]),\\r\\n\\t\\t\\t\\t\\tmatchType: filterSetting[\\\"matchType\\\"] || new NSFilter().CONTAINS\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar filter = {};\\r\\n\\t\\t\\tvar setting = {};\\r\\n\\t\\t\\tvar field = this.__nsList.__labelField;\\r\\n\\t\\t\\tfilter[field] = strData;\\r\\n\\t\\t\\tsetting[field] = {caseSensitive:config[\\\"caseSensitive\\\"],multiline:config[\\\"multiline\\\"],matchType:config[\\\"matchType\\\"]};\\r\\n\\t\\t\\tif(filter && Object.keys(filter).length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__handleFiltering(filter,setting,enableHighlighting,recordLimit);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__resetFiltering();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.reset = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__resetFiltering();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleFiltering = function(filter,setting,enableHighlighting,recordLimit)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__filteredColumn = [];\\r\\n\\t\\t\\tif(filter)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\t var field = this.__nsList.__labelField;\\r\\n\\t\\t\\t\\t var source = this.__nsList.__arrWrapper;\\r\\n\\t\\t\\t\\t var isHierarchical = false;\\r\\n\\t\\t\\t\\t if(this.__nsList.__enableHierarchical)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t isHierarchical = true;\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t   \\t var nsFilter = new NSFilter(source,filter,setting,recordLimit,isHierarchical,this.__nsList.__childField);\\r\\n\\t\\t\\t   \\t this.__nsList.__arrInternalSource = nsFilter.execute();\\r\\n\\t\\t\\t   \\t if(enableHighlighting)\\r\\n\\t\\t\\t   \\t {\\r\\n\\t\\t\\t   \\t\\tfor(var key in filter) \\r\\n\\t\\t  \\t        {\\r\\n\\t\\t  \\t        \\tthis.__filteredColumn.push({field:key,text:filter[key]});\\r\\n\\t\\t  \\t        }\\r\\n\\t\\t\\t   \\t }\\r\\n\\t\\t\\t   \\t if(isHierarchical)\\r\\n\\t\\t\\t   \\t {\\r\\n\\t\\t\\t   \\t\\tthis.__nsList.__objGrid.__setWrapperSource(this.__nsList.__arrInternalSource,0,-1,0,false);\\r\\n\\t\\t\\t   \\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrFlatHierarchicalSource.slice(0); \\r\\n\\t\\t\\t   \\t }\\r\\n\\t\\t\\t   \\t this.__nsList.__updateTotalRecords();\\r\\n\\t\\t\\t   \\t this.__nsList.__renderBody();\\r\\n\\t\\t\\t   \\t this.__nsList.__updateVisibleIndexByListItem(this.__nsList.__arrInternalSource);\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__resetFiltering = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsList.__dataSource)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrWrapper.slice(0);\\r\\n\\t\\t\\t\\tthis.__filteredColumn = [];\\r\\n\\t\\t\\t\\tif(this.__nsList.__enableHierarchical)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsList.__objGrid.__setWrapperSource(this.__nsList.__arrInternalSource,0,-1,0,false);\\r\\n\\t\\t\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrFlatHierarchicalSource.slice(0); \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__nsList.__updateTotalRecords();\\r\\n\\t\\t\\t\\tthis.__nsList.__renderBody();\\r\\n\\t\\t\\t\\tthis.__nsList.__updateVisibleIndexByListItem(this.__nsList.__arrInternalSource);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__highlightDiv = function(divText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar length = this.__filteredColumn.length;\\r\\n\\t\\t\\tfor (var count = 0; count < length; count++) \\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar text = this.__filteredColumn[count].text;\\r\\n\\t\\t\\t\\tthis.util.highlightText(divText,text,\\\"nsTextHighlight\\\");\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar NSListDragDrop = function(nsList)\\r\\n\\t{\\r\\n\\t\\tthis.__nsList = nsList;\\r\\n\\t\\tthis.util = nsList.util;\\r\\n\\t\\t\\r\\n\\t\\tthis.__disableDraggableFunction = null;\\r\\n\\t\\tthis.__disableDropableFunction = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar container = this.__nsList.__listContainer;\\r\\n\\t\\t\\tvar setting = {container:container,childNodeType:\\\"LI\\\",isContainerDraggable:this.__nsList.__isDraggable,isContainerDroppable:this.__nsList.__isDroppable,\\r\\n\\t\\t\\t\\t\\t\\t   enableDragByHandle:this.__nsList.__enableDragByHandle,dragHandlerClass:this.__nsList.__dragHandlerClass,\\r\\n\\t\\t\\t\\t\\t\\t   enableDragAfterHold:this.__nsList.__enableDragAfterHold,enableCloneMode:this.__nsList.__enableCloneMode,holdTime:this.__nsList.__holdTime,createCloneCallback:this.__createClone.bind(this),\\r\\n\\t\\t\\t\\t\\t\\t   createPlaceholderCallback:this.__createPlaceholder.bind(this),nodeDroppableCallback:this.__isListItemDroppable.bind(this),\\r\\n\\t\\t\\t\\t\\t\\t   nodeDraggableCallback:this.__isListItemDraggable.bind(this),insertNodeCallback:this.__insertListItemHandler.bind(this),\\r\\n\\t\\t\\t\\t\\t\\t   moveNodeCallback:this.__moveListItemHandler.bind(this),removeNodeCallback:this.__removeListItemHandler.bind(this)};\\r\\n\\t\\t\\tthis.__nsDragDrop = new NSDragDrop(setting);\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.ITEM_DROPPING,this.__itemDroppingHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.ITEM_DROPPED,this.__itemDroppedHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.DRAG_STARTING,this.__dragStartingHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.DRAG_STARTED,this.__dragStartHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.DRAGGING,this.__draggingHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.DRAG_END,this.__dragEndHandler.bind(this));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting = this.__nsList.__setting;\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"disableDraggableFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__disableDraggableFunction = setting[\\\"disableDraggableFunction\\\"];\\r\\n\\t\\t\\t\\tthis.__disableDraggableFunction = this.util.getFunction(this.__disableDraggableFunction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"disableDropableFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__disableDropableFunction = setting[\\\"disableDropableFunction\\\"];\\r\\n\\t\\t\\t\\tthis.__disableDropableFunction = this.util.getFunction(this.__disableDropableFunction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dragStartingHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = event.node;\\r\\n\\t\\t\\tvar arrItems = this.__getSelectedItems(listItem);\\r\\n\\t\\t\\tvar data = {parentID:this.__nsList.__listContainer.getAttribute(\\\"id\\\"),arrItems:arrItems};\\r\\n\\t\\t\\tthis.__nsDragDrop.setDragData(data);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dragStartHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = event.node;\\r\\n\\t\\t\\tvar data = this.__nsDragDrop.getDragData();\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.DRAG_STARTED,arrItems,{items:arrItems});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__draggingHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listData = event.item;\\r\\n\\t\\t\\tvar data = this.__nsDragDrop.getDragData();\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tlistData.arrItems = arrItems;\\r\\n\\t \\t    this.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.DRAGGING,listData,{item:listData});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dragEndHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar data = this.__nsDragDrop.getDragData();\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t \\t    this.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.DRAG_END,arrItems,{items:arrItems});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__itemDroppingHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cancelled = this.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.ITEM_DROPPING,event.item,{item:event.item},true,true);\\r\\n\\t\\t\\tif(cancelled)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__itemDroppedHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.ITEM_DROPPED,event.item,{item:event.item},true,false);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createClone = function(listItem,containerConfiguration)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listContainer = this.__nsList.__listContainer.cloneNode(false);\\r\\n\\t\\t\\tvar data = this.__nsDragDrop.getDragData();\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tvar clonedNode = null;\\r\\n\\t\\t\\t//make a clone only when clone Mode is ON or the list is not droppable\\r\\n\\t\\t\\tif(this.__nsList.__enableCloneMode || !this.__nsList.__isDroppable)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrItems.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tclonedNode = arrItems[count][this.__nsList.__fieldItem].cloneNode(true);\\r\\n\\t\\t\\t\\t\\tclonedNode.setAttribute(\\\"id\\\",\\\"comp\\\" + listContainer.id + \\\"ClonedNode\\\" + count);\\r\\n\\t\\t\\t\\t\\tlistContainer.appendChild(clonedNode);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrItems.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tclonedNode = arrItems[count][this.__nsList.__fieldItem];\\r\\n\\t\\t\\t\\t\\tlistContainer.appendChild(clonedNode);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tlistContainer.style.width = containerConfiguration.width + \\\"px\\\";\\r\\n\\t\\t\\treturn listContainer;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createPlaceholder = function(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = this.util.createElement(\\\"li\\\",null,\\\"nsListEmptyItem\\\");\\r\\n\\t\\t\\tlistItem.innerHTML = \\\"<div class='nsListEmptyChild'>&nbsp;</div>\\\";\\r\\n\\t\\t\\treturn listItem;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isListItemDroppable = function(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemFromTarget(listItem);\\r\\n\\t\\t\\treturn this.__isItemDroppable(listItem,item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isListItemDraggable = function(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemFromTarget(listItem);\\r\\n\\t\\t\\treturn this.__isItemDraggable(listItem,item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__insertListItemHandler = function(container,newListItem,index,currentListItem,data)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tthis.__nsList.__addItem(arrItems,index);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__moveListItemHandler = function(container,newListItem,index,currentListItem,data)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tthis.__nsList.__moveItem(arrItems,index);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__removeListItemHandler = function(container,listItem,data)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getSelectedItems = function(target)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar list = this.__nsList;\\r\\n\\t\\t\\tvar listContainer = list.__listContainer;\\r\\n\\t\\t\\tvar index = parseInt(list.__getIndexFromTarget(target));\\r\\n\\t\\t\\tvar item = list.__getItemByIndex(index);\\r\\n\\t\\t\\tvar arrItems = [];\\r\\n\\t\\t\\tvar arrSelectedItems = list.getSelectedItems();\\r\\n\\t\\t\\tvar itemSelected = false; \\r\\n\\t\\t\\tif(arrSelectedItems && arrSelectedItems.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tempItem = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrSelectedItems.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttempItem = this.__cloneItem(arrSelectedItems[count]);\\r\\n\\t\\t\\t\\t\\tif(tempItem[list.__fieldIndex] === item[list.__fieldIndex])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titemSelected = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tarrItems.push(tempItem);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!itemSelected || !arrItems || arrItems.length === 0 || !arrItems[0])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tempItem = this.__cloneItem(item);\\r\\n\\t\\t\\t\\tarrItems = [tempItem];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrItems;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__cloneItem = function(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar list = this.__nsList;\\r\\n\\t\\t\\tvar tempItem = null;\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttempItem = this.util.cloneObject(item);\\r\\n\\t\\t\\t\\tif(list.__enableHierarchical && tempItem[list.__childField] && tempItem[list.__childField].length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrChild = tempItem[list.__childField];\\r\\n\\t\\t\\t\\t\\tvar length = arrChild.length;\\r\\n\\t\\t\\t\\t\\tvar childItem = null;\\r\\n\\t\\t\\t\\t\\tvar tempChildItem = null;\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tchildItem = arrChild[count];\\r\\n\\t\\t\\t\\t\\t\\ttempChildItem = this.__cloneItem(childItem);\\r\\n\\t\\t\\t\\t\\t\\tif(tempChildItem)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\ttempItem[list.__childField][count] = tempChildItem;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn tempItem;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getItemFromTarget = function(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar itemIndex = this.__nsList.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\treturn this.__nsList.__getItemByIndex(itemIndex);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isItemDraggable = function(listItem,item) \\r\\n\\t    {\\r\\n\\t\\t\\tvar retValue = true;\\r\\n\\t\\t\\tif(this.__disableDraggableFunction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = this.__disableDraggableFunction(item,this.__nsList.__labelField,item[this.__nsList.__fieldIndex],item[this.__nsList.__fieldDisableHover],listItem);\\r\\n\\t\\t\\t\\tretValue = !retValue;\\r\\n\\t\\t\\t}\\r\\n\\t    \\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isItemDroppable = function(event) \\r\\n\\t    {\\r\\n\\t\\t\\tvar retValue = true;\\r\\n\\t\\t\\tif(this.__disableDropableFunction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\t\\ttarget = this.util.findParent(target,\\\"li\\\");\\r\\n\\t\\t\\t\\tvar index = this.__nsList.__getIndexFromTarget(target);\\r\\n\\t\\t\\t\\tvar item = this.__nsList.__getItemByIndex(index);\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue = this.__disableDropableFunction(item,this.__nsList.__labelField,item[this.__nsList.__fieldIndex],item[this.__nsList.__fieldDisableHover],target);\\r\\n\\t\\t\\t\\t\\tretValue = !retValue;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t    \\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\treturn NSList;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSList\\\",NSList);\\r\\n\\\"use strict\\\";\\r\\nvar NSGrid = (function()\\r\\n{\\r\\n\\tfunction NSGrid(component,setting) \\r\\n\\t{\\r\\n\\t\\t//this.base.call(this);\\r\\n\\t\\tthis.GRID_TYPE_HIERARCHICAL = \\\"hierarchical\\\";\\r\\n\\t\\tthis.GRID_TYPE_GROUP = \\\"group\\\";\\r\\n\\t\\tthis.GRID_TYPE_NORMAL = \\\"normal\\\";\\r\\n\\t\\tthis.GRID_TYPE_MASTER_DETAIL = \\\"masterdetail\\\";\\r\\n\\t\\tthis.PAGINATION_TYPE_SCROLL = \\\"scroll\\\";\\r\\n\\t\\tthis.PAGINATION_TYPE_PAGES = \\\"pages\\\";\\r\\n\\t\\tthis.PAGINATION_MODE_AUTO = \\\"auto\\\";\\r\\n\\t\\tthis.PAGINATION_MODE_MANUAL = \\\"manual\\\";\\r\\n\\t\\tthis.RESPONSIVE_MODE_STACK = \\\"stack\\\";\\r\\n\\t\\tthis.RESPONSIVE_MODE_COLUMN_TOGGLE = \\\"columnToggle\\\";\\r\\n\\t\\tthis.MULTICOLUMN_KEY_SHIFT = \\\"shift\\\";\\r\\n\\t\\tthis.MULTICOLUMN_KEY_CTRL = \\\"ctrl\\\";\\r\\n\\t\\tthis.MULTICOLUMN_KEY_ALT = \\\"alt\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.NAVIGATION_UP = \\\"up\\\";\\r\\n\\t\\tthis.NAVIGATION_DOWN = \\\"down\\\";\\r\\n\\t\\t\\r\\n\\t\\t//this.initializeDOM(ns.NSDATAGRID_CSS);\\r\\n\\t\\t\\r\\n\\t\\tthis.__OUTER_CONTAINER_ID = \\\"divDataSet\\\";\\r\\n\\t\\tthis.__TITLE_CONTAINER_ID = \\\"divTitleBar\\\";\\r\\n\\t\\tthis.__TABLE_HEADER_CONTAINER_WRAPPER_ID = \\\"divHeaderContainerWrapper\\\";\\r\\n\\t\\tthis.__TABLE_BODY_CONTAINER_WRAPPER_ID = \\\"divBodyContainerWrapper\\\";\\r\\n\\t\\tthis.__TABLE_FOOTER_CONTAINER_WRAPPER_ID = \\\"divFooterContainerWrapper\\\";\\r\\n\\t\\tthis.__TABLE_LEFT_HEADER_CONTAINER_ID = \\\"divLeftHeaderContainer\\\";\\r\\n\\t\\tthis.__TABLE_LEFT_HEADER_ID = \\\"tblLeftHeader\\\";\\r\\n\\t\\tthis.__TABLE_LEFT_BODY_CONTAINER_ID = \\\"divLeftBodyContainer\\\";\\r\\n\\t\\tthis.__TABLE_LEFT_BODY_ID = \\\"tblLeftBody\\\";\\r\\n\\t\\tthis.__TABLE_LEFT_FOOTER_CONTAINER_ID = \\\"divLeftFooterContainer\\\";\\r\\n\\t\\tthis.__TABLE_LEFT_FOOTER_ID = \\\"tblLeftFooter\\\";\\r\\n\\t\\tthis.__TABLE_CENTER_HEADER_CONTAINER_ID = \\\"divCenterHeaderContainer\\\";\\r\\n\\t\\tthis.__TABLE_CENTER_HEADER_ID = \\\"tblCenterHeader\\\";\\r\\n\\t\\tthis.__TABLE_CENTER_BODY_CONTAINER_ID = \\\"divCenterBodyContainer\\\";\\r\\n\\t\\tthis.__TABLE_CENTER_BODY_ID = \\\"tblCenterBody\\\";\\r\\n\\t\\tthis.__TABLE_CENTER_FOOTER_CONTAINER_ID = \\\"divCenterFooterContainer\\\";\\r\\n\\t\\tthis.__TABLE_CENTER_FOOTER_ID = \\\"tblCenterFooter\\\";\\r\\n\\t\\tthis.__TABLE_RIGHT_HEADER_CONTAINER_ID = \\\"divRightHeaderContainer\\\";\\r\\n\\t\\tthis.__TABLE_RIGHT_HEADER_ID = \\\"tblRightHeader\\\";\\r\\n\\t\\tthis.__TABLE_RIGHT_BODY_CONTAINER_ID = \\\"divRightBodyContainer\\\";\\r\\n\\t\\tthis.__TABLE_RIGHT_BODY_ID = \\\"tblRightBody\\\";\\r\\n\\t\\tthis.__TABLE_RIGHT_FOOTER_CONTAINER_ID = \\\"divRightFooterContainer\\\";\\r\\n\\t\\tthis.__TABLE_RIGHT_FOOTER_ID = \\\"tblRightFooter\\\";\\r\\n\\t\\tthis.__PAGINATION_CONTROL_ID = \\\"divPagination\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__CLASS_TABLE = \\\"nsDataGridTable\\\";\\r\\n\\t\\tthis.__CLASS_TITLEBAR = \\\"nsDataGridTitleBar\\\";\\r\\n\\t\\tthis.__CLASS_TABLE_HEADER_CELL = \\\"nsDataGridHeader\\\";\\r\\n\\t\\tthis.__CLASS_TABLE_HEADER_DROPPABLE_CELL = \\\"nsDataGridDroppableHeader\\\";\\r\\n\\t\\tthis.__CLASS_BODY_CONTAINER = \\\"nsDataGridBodyContainer\\\";\\r\\n\\t\\tthis.__CLASS_ODD_ROW = \\\"nsDataGridOddRow\\\";\\r\\n\\t\\tthis.__CLASS_EVEN_ROW = \\\"nsDataGridEvenRow\\\";\\r\\n\\t\\tthis.__CLASS_SELECTED_ROW = \\\"nsDataGridSelection\\\";\\r\\n\\t\\tthis.__CLASS_GROUP_CELL = \\\"nsGroupCell\\\";\\r\\n\\t\\tthis.__CLASS_CELL_CHILD = \\\"nsCellChild\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__DEFAULT_COLUMN_WIDTH = 100;\\r\\n\\t\\tthis.__INFINITE_SCROLL_PADDING = 40;\\r\\n\\t\\tthis.__INFINITE_SCROLL_INITIAL_LOAD = 250;\\r\\n\\t\\t\\r\\n\\t\\tthis.__columns = [];\\r\\n\\t\\tthis.__orignalColumns = [];\\r\\n\\t\\tthis.__orignalItemKey = [];\\r\\n\\t\\tthis.__navigationIndex = -1;\\r\\n\\t\\tthis.__selectedIndex = -1;\\r\\n\\t\\tthis.__selectedItem = null;\\r\\n\\t\\tthis.__selectedIndexes = [];\\r\\n\\t\\tthis.__selectedItems = [];\\r\\n\\t\\tthis.__lastNavigationDirection = null;\\r\\n\\t\\r\\n\\t\\tthis.__title = null;\\r\\n\\t\\tthis.__type = this.GRID_TYPE_NORMAL;\\r\\n\\t\\tthis.__dataSource = null;\\r\\n\\t\\tthis.__arrColumns = null;\\r\\n\\t\\tthis.__context = window;\\r\\n\\t\\tthis.__enableHierarchical = false;\\r\\n\\t\\tthis.__enableGrouping = false;\\r\\n\\t\\tthis.__enableMasterDetail = false;\\r\\n\\t\\tthis.__enableMouseHover = false;\\r\\n\\t\\tthis.__mouseHoverColor = \\\"#CCCCCC\\\";\\r\\n\\t\\tthis.__enableColumnMouseHover = false;\\r\\n\\t\\tthis.__enableMultipleSelection = false;\\r\\n\\t\\tthis.__enableKeyboardNavigation = false;\\r\\n\\t\\tthis.__enableCustomScrollBar = false;\\r\\n\\t\\tthis.__columnResizable = false;\\r\\n\\t\\tthis.__columnDraggable = false;\\r\\n\\t\\tthis.__columnSortable = true;\\r\\n\\t\\tthis.__columnAutoSize = false;\\r\\n\\t\\tthis.__enableContextMenu = false;\\r\\n\\t\\tthis.__enableVariableRowHeight = false;\\r\\n\\t\\tthis.__enableFilter = false;\\r\\n\\t\\tthis.__filterFunction = null;\\r\\n\\t\\tthis.__hierarchyFilterChildrenFunction = null;\\r\\n\\t\\tthis.__enableAdvancedFilter = false;\\r\\n\\t\\tthis.__enableToolTipForTruncateText = false;\\r\\n\\t\\tthis.__childField = \\\"children\\\";\\r\\n\\t\\tthis.__rowKeyField = null;\\r\\n\\t\\tthis.__isParentRowField = \\\"ns-isParentRow\\\";\\r\\n\\t\\tthis.__groupByField = null;\\r\\n\\t\\tthis.__columnMinWidth = 50;\\r\\n\\t\\tthis.__pageSize = 50;\\r\\n\\t\\tthis.__rowHeight = -1;\\r\\n\\t\\tthis.__noDataMessage = \\\"No matching records found\\\";\\r\\n\\t\\t//stores initial Column Count \\r\\n\\t\\tthis.__initialColumnCount = 0;\\r\\n\\t\\tthis.__initialTableWidth = 0;\\r\\n\\t\\tthis.__enablePagination = false;\\r\\n\\t\\tthis.__enableVirtualScroll = false;\\r\\n\\t\\tthis.__enableDataRefreshOnScrollEnd = false;\\r\\n\\t\\tthis.__enableServerCall = false;\\r\\n\\t\\tthis.__enableExport = false;\\r\\n\\t\\tthis.__enableResponsive = false;\\r\\n\\t\\tthis.__enableColumnSetting = false;\\r\\n\\t\\tthis.__enableRowSelection = true;\\r\\n\\t\\tthis.__enableCellSelection = false;\\r\\n\\t\\tthis.__enableMultiCellSelection = false;\\r\\n\\t\\tthis.__enableMultiSort = false;\\r\\n\\t\\tthis.__enableEditable = false;\\r\\n\\t\\tthis.__showExpandCollapseIcon = true;\\r\\n\\t\\tthis.__isPopUp = false; \\r\\n\\t\\tthis.__isPaginationTypeScroll = true;\\r\\n\\t\\tthis.__isPaginationModeAuto = true;\\r\\n\\t\\t\\r\\n\\t\\tthis.__isResponsiveModeStack = true;\\r\\n\\t\\tthis.__isResponsiveModeColumnToggle = false;\\r\\n\\t\\tthis.__totalRecords = 0;\\r\\n\\t\\tthis.__contextMenuProvider = null;\\r\\n\\t\\tthis.__contextMenuSetting = null;\\r\\n\\t\\tthis.__responsiveMode = this.RESPONSIVE_MODE_STACK;\\r\\n\\t\\tthis.__paginationFetchRecordCallBack = null;\\r\\n\\t\\tthis.__eventDispatcher = null;\\r\\n\\t\\tthis.__heightOffset = null;\\r\\n\\t\\tthis.__editorSetting = null;\\r\\n\\t\\t//for Virtual Scroll\\r\\n\\t\\tthis.__virtualScrollSetting = {};\\r\\n\\t\\tthis.__nsVirtualScroll = null; \\r\\n\\t\\tthis.__virtualRowHeight = 0;\\r\\n\\t\\t//for DataRefreshOnScrollEnd\\r\\n\\t\\tthis.__dataRefreshfireDelay = 100;\\r\\n\\t\\t\\r\\n\\t\\tthis.__scrollOffsetPosition = 0;\\r\\n\\t\\tthis.__componentResizingInterval = -1;\\r\\n\\t\\tthis.__divPagination = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__divOuterContainer = null;\\r\\n\\t\\tthis.__divTableWrapper = null;\\r\\n\\t\\tthis.__divTableHeaderContainerWrapper = null;\\r\\n\\t\\tthis.__divTableBodyContainerWrapper = null;\\r\\n\\t\\tthis.__divTableFooterContainerWrapper = null;\\r\\n\\t\\tthis.__divCenterTableHeaderContainer = null;\\r\\n\\t\\tthis.__tblCenterHeader = null;\\r\\n\\t\\tthis.__tblCenterHeaderBody = null;\\r\\n\\t\\tthis.__divCenterTableBodyContainer = null;\\r\\n\\t\\tthis.__tblCenterBody = null;\\r\\n\\t\\tthis.__tblCenterBodyBody = null;\\r\\n\\t\\tthis.__divCenterTableFooterContainer = null;\\r\\n\\t\\tthis.__tblCenterFooter = null;\\r\\n\\t\\tthis.__tblCenterFooterBody = null;\\r\\n\\t\\t//stores whether mouse is on GridLine\\r\\n\\t\\tthis.__onGridLine = false;\\r\\n\\t\\tthis.__addRemoveRowCallInternal = false;\\r\\n\\t\\tthis.__lastBodyCellFocus = null;\\r\\n\\t\\tthis.__isColumnResizing = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.__bodyScrollPos = 0;\\r\\n\\t\\t//for Page type Pagination\\r\\n\\t\\tthis.__nsPagination = null;\\r\\n\\t\\t//for Infinite Scroll Pagination\\r\\n\\t\\tthis.__bottomPercentageForAddRows = 15;\\r\\n\\t\\tthis.__processArrayAsync = null;\\r\\n\\t\\tthis.__rowsRendered = false;\\r\\n\\t\\tthis.__stopScroll = false;\\r\\n\\t\\tthis.__lastScrollPos = [0,0];\\r\\n\\t\\t//for Fixed Column \\r\\n\\t\\tthis.__leftFixedColumn = 0;\\r\\n\\t\\tthis.__rightFixedColumn = 0;\\r\\n\\t\\tthis.__enableFixedColumnAnimation = false;\\r\\n\\t\\tthis.__arrFixedLeftCells = [];\\r\\n\\t\\tthis.__arrFixedRightCells = [];\\r\\n\\t\\tthis.__fixedTimerTimeout = -1;\\r\\n\\t\\tthis.__enableFooter = false;\\r\\n\\t\\tthis.__tableRectFixedColumn = null;\\r\\n\\t\\t//for Row Mover\\r\\n\\t\\tthis.__enableRowMove = false;\\r\\n\\t\\tthis.__isSameTableMove = false;\\r\\n\\t\\tthis.__rowMoverDropEndHandler = null;\\r\\n\\t\\t//flag to figure out that text of cell is cached or not\\r\\n\\t\\t//generally for IE this should be true to improve performance except when we are using Virtual scrolling\\r\\n\\t\\tthis.__renderInCachedMode = false;\\r\\n\\t\\tthis.__customClass = {};\\r\\n\\t\\t//for Multicolumn Sort\\r\\n\\t\\tthis.__multiColumnKey = this.MULTICOLUMN_KEY_SHIFT;\\r\\n\\t\\tthis.__isMultiColumnKeyPressed = false;\\r\\n\\t\\tthis.__dateComponent = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__headerExtraRowCount = 0;\\r\\n\\t\\t\\r\\n\\t\\tthis.__loader = null;\\r\\n\\t\\tthis.__scroller = null;\\r\\n\\t\\tthis.__scrollerSetting = {};\\r\\n\\t\\tthis.__groupCollection = null;\\r\\n\\t\\tthis.__groupSource = null;\\r\\n\\t\\tthis.__contextMenu = null;\\r\\n\\t\\tthis.__exportMenu = null;\\r\\n\\t\\tthis.__exportFileName = null;\\r\\n\\t\\tthis.__exportMenuDataSource = [{id: 0,title: 'XLS',iconHTML: '<i class=\\\"fa fa-file-excel-o fa-lg\\\"></i>'},\\r\\n\\t\\t                               {id: 1,title: 'CSV',iconHTML: '<i class=\\\"fa fa-file-excel-o fa-lg\\\"></i>',separatorBelow:true},\\r\\n\\t\\t                               {id: 2,title: 'DOC',iconHTML: '<i class=\\\"fa fa-file-word-o fa-lg\\\"></i>'},\\r\\n\\t\\t                               {id: 3,title: 'TEXT',iconHTML: '<i class=\\\"fa fa-file-text-o fa-lg\\\"></i>',separatorBelow:true},\\r\\n\\t\\t                               {id: 4,title: 'XML',iconHTML: '<i class=\\\"fa fa-file-code-o fa-lg\\\"></i>'},\\r\\n\\t\\t                               {id: 5,title: 'JSON',iconHTML: '<i class=\\\"fa fa-file-o\\\" fa-lg></i>',separatorBelow:true},\\r\\n\\t\\t                               {id: 6,title: 'PDF',iconHTML: '<i class=\\\"fa fa-file-pdf-o fa-lg\\\"></i>'},\\r\\n\\t\\t                               {id: 7,title: 'IMAGE',iconHTML: '<i class=\\\"fa fa-file-picture-o fa-lg\\\"></i>',separatorBelow:true},\\r\\n\\t\\t                               {id: 8,title: 'XLSX',iconHTML: '<i class=\\\"fa fa-file-excel-o fa-lg\\\"></i>'},\\r\\n\\t\\t                               {id: 9,title: 'DOCX',iconHTML: '<i class=\\\"fa fa-file-word-o fa-lg\\\"></i>'}];\\r\\n\\t\\tthis.__imgUtil = null;\\r\\n\\t\\tthis.__arrWrapper = null;\\r\\n\\t\\tthis.__arrInternalSource = null;\\r\\n\\t\\tthis.__arrFlatHierarchicalSource = [];\\r\\n\\t\\tthis.__arrFilteredGroupedSource = [];\\r\\n\\t\\t// This flag stops componentResized code to be called first time \\r\\n\\t\\tthis.__isComponentResizedCallCorrect = false;\\r\\n\\t\\tthis.__customScrollBarSetting = {};\\r\\n\\t\\t//Custom Scrollbar Tooltip\\r\\n\\t\\tthis.__enableScrollBarTip = false;\\r\\n\\t\\tthis.__scrollBarTipLabelFunction = null;\\r\\n\\t\\tthis.__divScrollTipContainer = null;\\r\\n\\t\\tthis.__divScrollTipText = null;\\r\\n\\t\\tthis.__scrollTipInterval = null;\\r\\n\\t\\t //queue up the functions not called as Creation Complete called later\\r\\n\\t\\tthis.__queueFunc = [];\\r\\n\\t\\t//if columns total width is less than parent still Table will fill all the width if this flag is true \\r\\n\\t\\tthis.__fillParentWidth = true;\\r\\n\\t\\tthis.__enableAutoResize = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.__fieldPrefix = \\\"ns_field\\\";\\r\\n\\t\\tthis.__fieldIndex = this.__fieldPrefix + \\\"_row_index\\\";\\r\\n\\t\\tthis.__fieldVisibleIndex = this.__fieldPrefix + \\\"_row_visible_index\\\";\\r\\n\\t\\tthis.__fieldRow = this.__fieldPrefix + \\\"_row\\\";\\r\\n\\t\\tthis.__fieldRowHtml = this.__fieldPrefix + \\\"_row\\\";\\r\\n\\t\\tthis.__fieldRowLevel = this.__fieldPrefix + \\\"_row_level\\\";\\r\\n\\t\\tthis.__fieldRowVisible = this.__fieldPrefix + \\\"_row_visible\\\";\\r\\n\\t\\tthis.__fieldRowHover = this.__fieldPrefix + \\\"_row_hover\\\";\\r\\n\\t\\tthis.__fieldParentIndex = this.__fieldPrefix + \\\"_parent_index\\\";\\r\\n\\t\\tthis.__fieldHasChild = this.__fieldPrefix + \\\"_row_hasChild\\\";\\r\\n\\t\\tthis.__fieldHasParent = this.__fieldPrefix + \\\"_row_hasParent\\\";\\r\\n\\t\\tthis.__fieldIsCollapsed = this.__fieldPrefix + \\\"_row_isCollapsed\\\";\\r\\n\\t\\tthis.__fieldRowArrow = this.__fieldPrefix + \\\"row_arrow\\\";\\r\\n\\t\\tthis.__fieldCellText = this.__fieldPrefix + \\\"cell_text\\\";\\r\\n\\t\\tthis.__fieldSelected = this.__fieldPrefix + \\\"_selected\\\";\\r\\n\\t\\tthis.__fieldColIndex = this.__fieldPrefix + \\\"_col_index\\\";\\r\\n\\t\\tthis.__fieldColSortedAsc = this.__fieldPrefix + \\\"_col_sorted_asc\\\";\\r\\n\\t\\tthis.__fieldColVisible = this.__fieldPrefix + \\\"_col_visible\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__isShiftPressed = false;\\r\\n\\t\\tthis.__isCtrlPressed = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.__synchronizeTablesRef = null;\\r\\n\\t\\tthis.__divCenterTableBodyMouseUpRef = null;\\r\\n\\t\\tthis.__bodyScrollRef = null;\\r\\n\\t\\tthis.__keyDownRef = null;\\r\\n\\t\\tthis.__keyUpRef = null;\\r\\n\\t\\tthis.__tableCellNavigatorEventRef = null;\\r\\n\\t\\tthis.__tableCellSelectionEventRef = null;\\r\\n\\t\\t\\r\\n\\t\\t//mobile touch events\\r\\n\\t\\tthis.__enableTouchEvents = true;\\r\\n\\t\\tthis.__objTouchEvents = new Map();\\r\\n\\t\\t\\r\\n\\t\\tthis.__objGrid = null;\\r\\n\\t\\tthis.__nsGridColumnMove = null;\\r\\n\\t\\tthis.__nsGridColumnResize = null;\\r\\n\\t\\tthis.__nsGridSort = null;\\r\\n\\t\\tthis.__nsGridFilter = null;\\r\\n\\t\\tthis.__nsGridKeyboard = null;\\r\\n\\t\\tthis.__nsToolTipInElement = null;\\r\\n\\t\\tthis.__nsTableCellNavigator = null;\\r\\n\\t\\tthis.__nsCellSelection = null;\\r\\n\\t\\tthis.__multiCellSelectionSetting = null;\\r\\n\\t\\tthis.__icons = {menu:null,filter:null,sortAscending:null,sortDescending:null,columnMove:null,exportButton:null,columnSetting:null,rowExpanded:null,rowCollapsed:null};\\r\\n\\t\\tthis.__nsGridEditor = null;\\r\\n\\t\\tthis.__nsPopUpColumnSetting = null;\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component,true);\\r\\n\\t};\\r\\n\\tnsExtendPrototype(NSContainerBase,NSGrid);\\r\\n\\tNSGrid.prototype.constructor = NSGrid;\\r\\n\\t\\r\\n\\tNSGrid.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__setFields();\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t\\tthis.__initializePluggins();\\r\\n\\t\\tthis.__setGridType();\\r\\n\\t\\tthis.__objGrid.__initialize();\\r\\n\\t\\tthis.__addListenerForBody();\\r\\n\\t\\tthis.__setPaginationType();\\r\\n\\t\\tthis.__setPaginationMode();\\r\\n\\t\\tthis.__setResponsiveMode();\\r\\n\\t\\tthis.__checkForVirtualMode();\\r\\n\\t\\tthis.__addSVGInPage();\\r\\n\\t\\tthis.__addStyleInDOM();\\r\\n\\t\\tif(this.__arrColumns)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.setColumn(this.__arrColumns);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__dataSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.dataSource(this.__dataSource);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__queueFunc && this.__queueFunc.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = this.__queueFunc.length - 1;count > -1;count--)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__queueFunc[count]();\\r\\n\\t\\t\\t\\tthis.__queueFunc.splice(count, 1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tif(setProperty)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setting[attrName] = newVal;\\r\\n\\t\\t\\tthis.__objGrid.propertyChange(attrName, oldVal, newVal, setProperty);\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.blurHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tthis.base.blurHandler.call(this);\\r\\n\\t\\tthis.__dispatchInternalEvent(\\\"blur\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.componentResized = function(event,force) \\r\\n\\t{\\r\\n\\t\\t//console.log(\\\"In Grid componentResized\\\");\\r\\n\\t\\tif(this.__enableAutoResize || force)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__isComponentResizedCallCorrect || this.__isPopUp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar baseMeasurement = this.__baseComponent.getBoundingClientRect();\\r\\n\\t\\t\\t\\tif(!this.__lastBaseMeasurement || this.__lastBaseMeasurement.height !== baseMeasurement.height || this.__lastBaseMeasurement.width !== baseMeasurement.width)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t//if (this.__componentResizingInterval != -1)\\r\\n\\t\\t\\t\\t\\t//{\\r\\n\\t\\t\\t\\t\\t\\tclearTimeout(this.__componentResizingInterval);\\r\\n\\t\\t\\t\\t\\t\\tthis.__componentResizingInterval = -1;\\r\\n\\t\\t\\t\\t\\t//}\\r\\n\\t\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\t\\tif(this.util.hasStyleClass(this.__baseComponent,\\\"nsMobileStackGrid\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__componentResizingInterval = setTimeout(\\r\\n\\t\\t\\t\\t\\t\\tfunction()\\r\\n\\t\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\t\\tself.__componentResizingInterval = -1;\\r\\n\\t\\t\\t\\t\\t\\t\\tif(self.__divOuterContainer)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tconsole.log(\\\"In Resize\\\" + self.__tblCenterBody.style.width);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tself.__setComponentHeight.bind(self)();\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tself.__setOuterContainerMeasurement.bind(self)();\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar scrollBarWidth = self.util.getScrollBarWidth(self.__getVerticalScrollableContainer());\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar width = self.__divOuterContainer.getBoundingClientRect().width - scrollBarWidth;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tself.__setTableWidth.call(self,width);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tself.__setBodyMeasurement();\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tself.__lastBaseMeasurement = self.__baseComponent.getBoundingClientRect();\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t},500);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__componentResizingInterval = setTimeout(\\r\\n\\t\\t\\t\\t\\t\\tfunction()\\r\\n\\t\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\t\\tself.__componentResizingInterval = -1;\\r\\n\\t\\t\\t\\t\\t\\t\\tself.reRender.call(self);\\r\\n\\t\\t\\t\\t\\t\\t\\tself.base.componentResized.call(self,event);\\r\\n\\t\\t\\t\\t\\t\\t},500);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__isComponentResizedCallCorrect = true;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.setHeightOffset = function(offset)\\r\\n\\t{\\r\\n\\t\\tthis.__heightOffset = offset;\\r\\n\\t\\tthis.__setComponentHeight();\\r\\n\\t\\tthis.reRender();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tvar setting = this.__setting;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"nsTitle\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__title = this.getAttribute(\\\"nsTitle\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"type\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__type = this.getAttribute(\\\"type\\\");\\r\\n\\t\\t\\t\\tif(!this.__type)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__type = this.GRID_TYPE_NORMAL;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"context\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__context = this.getAttribute(\\\"context\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableMouseHover\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMouseHover = Boolean.parse(this.getAttribute(\\\"enableMouseHover\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"mouseHoverColor\\\") && this.getAttribute(\\\"mouseHoverColor\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__mouseHoverColor = this.getAttribute(\\\"mouseHoverColor\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableMultipleSelection\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMultipleSelection = Boolean.parse(this.getAttribute(\\\"enableMultipleSelection\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableKeyboardNavigation\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableKeyboardNavigation =  Boolean.parse(this.getAttribute(\\\"enableKeyboardNavigation\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableColumnMouseHover\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableColumnMouseHover =  Boolean.parse(this.getAttribute(\\\"enableColumnMouseHover\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"childField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__childField = this.getAttribute(\\\"childField\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"rowKeyField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__rowKeyField = this.getAttribute(\\\"rowKeyField\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__rowKeyField = this.__fieldIndex;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"groupByField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__groupByField = this.getAttribute(\\\"groupByField\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"columnMinWidth\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__columnMinWidth = this.getAttribute(\\\"columnMinWidth\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableCustomScrollBar\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableCustomScrollBar =  Boolean.parse(this.getAttribute(\\\"enableCustomScrollBar\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"customScrollBarSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__scrollerSetting = this.getAttribute(\\\"customScrollBarSetting\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"columnResizable\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__columnResizable =  Boolean.parse(this.getAttribute(\\\"columnResizable\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"columnDraggable\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__columnDraggable = Boolean.parse(this.getAttribute(\\\"columnDraggable\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"columnAutoSize\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__columnAutoSize = Boolean.parse(this.getAttribute(\\\"columnAutoSize\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"columnSortable\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__columnSortable = Boolean.parse(this.getAttribute(\\\"columnSortable\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enablePagination\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enablePagination = Boolean.parse(this.getAttribute(\\\"enablePagination\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"paginationType\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__paginationType = this.getAttribute(\\\"paginationType\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"paginationMode\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__paginationMode =  this.getAttribute(\\\"paginationMode\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableAsyncLoadPagination\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableAsyncLoadPagination = Boolean.parse(this.getAttribute(\\\"enableAsyncLoadPagination\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"pageSize\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__pageSize = parseInt(this.getAttribute(\\\"pageSize\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"totalRecords\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__totalRecords =  parseInt(this.getAttribute(\\\"totalRecords\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"paginationFetchRecordCallBack\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__paginationFetchRecordCallBack =  this.getAttribute(\\\"paginationFetchRecordCallBack\\\");\\r\\n\\t\\t\\t\\tthis.__paginationFetchRecordCallBack = this.util.getFunction(this.__paginationFetchRecordCallBack);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableContextMenu\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableContextMenu = Boolean.parse(this.getAttribute(\\\"enableContextMenu\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"contextMenuProvider\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__contextMenuProvider =  this.getAttribute(\\\"contextMenuProvider\\\");\\r\\n\\t\\t\\t\\tthis.__contextMenuProvider = this.util.getFunction(this.__contextMenuProvider);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableFilter\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableFilter = Boolean.parse(this.getAttribute(\\\"enableFilter\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"filterFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__filterFunction = this.getAttribute(\\\"filterFunction\\\");\\r\\n\\t\\t\\t\\tthis.__filterFunction = this.util.getFunction(this.__filterFunction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"hierarchyFilterChildrenFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__hierarchyFilterChildrenFunction = this.getAttribute(\\\"hierarchyFilterChildrenFunction\\\");\\r\\n\\t\\t\\t\\tthis.__hierarchyFilterChildrenFunction = this.util.getFunction(this.__hierarchyFilterChildrenFunction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableAdvancedFilter\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableAdvancedFilter = Boolean.parse(this.getAttribute(\\\"enableAdvancedFilter\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableVirtualScroll\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableVirtualScroll = Boolean.parse(this.getAttribute(\\\"enableVirtualScroll\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableDataRefreshOnScrollEnd\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableDataRefreshOnScrollEnd = Boolean.parse(this.getAttribute(\\\"enableDataRefreshOnScrollEnd\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"dataRefreshfireDelay\\\") && parseInt(this.getAttribute(\\\"dataRefreshfireDelay\\\")) > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dataRefreshfireDelay = parseInt(this.getAttribute(\\\"dataRefreshfireDelay\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"bottomPercentageForAddRows\\\") && parseInt(this.getAttribute(\\\"bottomPercentageForAddRows\\\") > 0))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__bottomPercentageForAddRows = parseInt(this.getAttribute(\\\"bottomPercentageForAddRows\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableServerCall\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableServerCall = Boolean.parse(this.getAttribute(\\\"enableServerCall\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"rowHeight\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__rowHeight =  parseInt(this.getAttribute(\\\"rowHeight\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableColumnSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableColumnSetting =  Boolean.parse(this.getAttribute(\\\"enableColumnSetting\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableExport\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableExport =  Boolean.parse(this.getAttribute(\\\"enableExport\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"exportFileName\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__exportFileName = this.getAttribute(\\\"exportFileName\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableResponsive\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableResponsive =  Boolean.parse(this.getAttribute(\\\"enableResponsive\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableRowSelection\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableRowSelection =  Boolean.parse(this.getAttribute(\\\"enableRowSelection\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableCellSelection\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableCellSelection =  Boolean.parse(this.getAttribute(\\\"enableCellSelection\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableMultiCellSelection\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMultiCellSelection =  Boolean.parse(this.getAttribute(\\\"enableMultiCellSelection\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"responsiveMode\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__responsiveMode = this.getAttribute(\\\"responsiveMode\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"noDataMessage\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__noDataMessage = this.getAttribute(\\\"noDataMessage\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"leftFixedColumn\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__leftFixedColumn =  parseInt(this.getAttribute(\\\"leftFixedColumn\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"rightFixedColumn\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__rightFixedColumn =  parseInt(this.getAttribute(\\\"rightFixedColumn\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableFixedColumnAnimation\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableFixedColumnAnimation =  Boolean.parse(this.getAttribute(\\\"enableFixedColumnAnimation\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableRowMove\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableRowMove =  Boolean.parse(this.getAttribute(\\\"enableRowMove\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"isSameTableMove\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__isSameTableMove =  Boolean.parse(this.getAttribute(\\\"isSameTableMove\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"rowMoverDropEndHandler\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__rowMoverDropEndHandler = this.getAttribute(\\\"rowMoverDropEndHandler\\\");\\r\\n\\t\\t\\t\\tthis.__rowMoverDropEndHandler = this.util.getFunction(this.__rowMoverDropEndHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"renderInCachedMode\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__renderInCachedMode =  Boolean.parse(this.getAttribute(\\\"renderInCachedMode\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableVariableRowHeight\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableVariableRowHeight =  Boolean.parse(this.getAttribute(\\\"enableVariableRowHeight\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableToolTipForTruncateText\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableToolTipForTruncateText =  Boolean.parse(this.getAttribute(\\\"enableToolTipForTruncateText\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"heightOffset\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__heightOffset =  this.getAttribute(\\\"heightOffset\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableMultiSort\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMultiSort =  Boolean.parse(this.getAttribute(\\\"enableMultiSort\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableEditable\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableEditable =  Boolean.parse(this.getAttribute(\\\"enableEditable\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"editorSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__editorSetting =  this.getAttribute(\\\"editorSetting\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"multiColumnKey\\\") && this.getAttribute(\\\"multiColumnKey\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__multiColumnKey =  this.getAttribute(\\\"multiColumnKey\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableFooter\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableFooter =  Boolean.parse(this.getAttribute(\\\"enableFooter\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"dataSource\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dataSource = this.getAttribute(\\\"dataSource\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"columns\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__arrColumns = this.getAttribute(\\\"columns\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"headerExtraRowCount\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__headerExtraRowCount = parseInt(this.getAttribute(\\\"headerExtraRowCount\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"customClass\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__customClass = this.getAttribute(\\\"customClass\\\");\\r\\n\\t\\t\\t\\tif(!this.__customClass)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__customClass = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"theme\\\") && this.getAttribute(\\\"theme\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__theme = this.getAttribute(\\\"theme\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"showExpandCollapseIcon\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__showExpandCollapseIcon = this.util.isUndefinedOrNull(this.getAttribute(\\\"showExpandCollapseIcon\\\")) ? true : Boolean.parse(this.getAttribute(\\\"showExpandCollapseIcon\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"dateComponent\\\") && this.getAttribute(\\\"dateComponent\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dateComponent = this.getAttribute(\\\"dateComponent\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//isPopUp should be true if the grid is used in cases like autocomplete so that componentResized is called multiple times so that width is adjusted properly\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"isPopUp\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__isPopUp =  Boolean.parse(this.getAttribute(\\\"isPopUp\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//eventDispatcher to support different frameworks \\r\\n\\t\\t\\tif(this.hasAttribute(\\\"eventDispatcher\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__eventDispatcher =  this.getAttribute(\\\"eventDispatcher\\\");\\r\\n\\t\\t\\t\\tthis.__eventDispatcher = this.util.getFunction(this.__eventDispatcher);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"multiCellSelectionSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__multiCellSelectionSetting = this.getAttribute(\\\"multiCellSelectionSetting\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__multiCellSelectionSetting = {scrollableElement:null,enableFillHandle:false,enableKeyboardNavigation:true,enableCopy:true,enablePaste:true,cellClass:null,areaClass:null,areaClassLeft:null,areaClassRight:null,areaClassTop:null,areaClassBottom:null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"icons\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__icons =  this.getAttribute(\\\"icons\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableTouchEvents\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableTouchEvents = Boolean.parse(this.getAttribute(\\\"enableTouchEvents\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"enableAutoResize\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableAutoResize = Boolean.parse(this.getAttribute(\\\"enableAutoResize\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"fillParentWidth\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__fillParentWidth = Boolean.parse(this.getAttribute(\\\"fillParentWidth\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"customScrollBarSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__customScrollBarSetting = this.getAttribute(\\\"customScrollBarSetting\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__customScrollBarSetting = {verticalScrollButtons: {enable: true},horizontalScrollButtons:{enable: true}};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"virtualScrollSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__virtualScrollSetting = this.getAttribute(\\\"virtualScrollSetting\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__virtualScrollSetting = {pageSize: null,pagesRendered: null,enableScrollDelay: false,scrollInterval: null,resizeInterval: null,enableLoader: false,getLoaderComponent: null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.hasAttribute(\\\"components\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__components = this.getAttribute(\\\"components\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__components = {datePicker: null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.hasAttribute(\\\"enableScrollBarTip\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enableScrollBarTip =  Boolean.parse(this.getAttribute(\\\"enableScrollBarTip\\\"));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.hasAttribute(\\\"scrollBarTipLabelFunction\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__scrollBarTipLabelFunction = this.getAttribute(\\\"scrollBarTipLabelFunction\\\");\\r\\n\\t\\t\\t\\t\\tthis.__scrollBarTipLabelFunction = this.util.getFunction(this.__scrollBarTipLabelFunction);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.hasAttribute = function(attributeName)\\r\\n\\t{\\r\\n\\t\\treturn (this.__setting.hasOwnProperty(attributeName) || this.__setting.hasOwnProperty(attributeName.toLowerCase()));\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.getAttribute = function(attributeName)\\r\\n\\t{\\r\\n\\t\\tvar value = this.__setting[attributeName];\\r\\n\\t\\tif(this.util.isUndefined(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvalue = this.__setting[attributeName.toLowerCase()];\\r\\n\\t\\t}\\r\\n\\t\\treturn value;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.deviceViewChanged = function(conditionTrue,queryIndex,query) \\r\\n\\t{\\r\\n\\t\\tqueryIndex = parseInt(queryIndex);\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar refresh = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(self.__nsVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__nsVirtualScroll.refresh(true);\\r\\n\\t\\t\\t\\tself.__divCenterTableBodyContainer.scrollTop = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tif(this.__isResponsiveModeStack)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(conditionTrue)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsMobileStackGrid\\\");\\r\\n\\t\\t\\t\\trefresh();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__baseComponent,\\\"nsMobileStackGrid\\\");\\r\\n\\t\\t\\t\\trefresh();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.componentResized(null,true);\\r\\n\\t\\t}\\r\\n\\t\\telse if(this.__isResponsiveModeColumnToggle)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar className = \\\"nsMobileColumnToggleGrid\\\";\\r\\n\\t\\t\\tvar postFix = \\\"\\\";\\r\\n\\t\\t\\tswitch(queryIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase 0:\\r\\n\\t\\t\\t\\t\\tpostFix = \\\">960\\\";\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase 1:\\r\\n\\t\\t\\t\\t\\tpostFix = \\\"960\\\";\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase 2:\\r\\n\\t\\t\\t\\t\\tpostFix = \\\"800\\\";\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase 3:\\r\\n\\t\\t\\t\\t\\tpostFix = \\\"640\\\";\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase 4:\\r\\n\\t\\t\\t\\t\\tpostFix = \\\"480\\\";\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase 5:\\r\\n\\t\\t\\t\\t\\tpostFix = \\\"320\\\";\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar reset = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.util.removeStyleClass(self.__baseComponent,\\\"nsMobileColumnToggleGrid960\\\");\\r\\n\\t\\t\\t\\tself.util.removeStyleClass(self.__baseComponent,\\\"nsMobileColumnToggleGrid800\\\");\\r\\n\\t\\t\\t\\tself.util.removeStyleClass(self.__baseComponent,\\\"nsMobileColumnToggleGrid640\\\");\\r\\n\\t\\t\\t\\tself.util.removeStyleClass(self.__baseComponent,\\\"nsMobileColumnToggleGrid480\\\");\\r\\n\\t\\t\\t\\tself.util.removeStyleClass(self.__baseComponent,\\\"nsMobileColumnToggleGrid320\\\");\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(postFix)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treset();\\r\\n\\t\\t\\t\\tif(postFix != \\\">960\\\" && conditionTrue)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,className + postFix);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\trefresh();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.deviceViewChanged.call(this,conditionTrue,query);\\r\\n\\t};\\r\\n\\t\\r\\n\\t//call this function when outer container width or height changes and enableAutoResize is false\\r\\n\\tNSGrid.prototype.reRender = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__divOuterContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setComponentHeight();\\r\\n\\t\\t\\tthis.__setOuterContainerMeasurement();\\r\\n\\t\\t\\t//done the below so that if the width of cell is in % then it will take its corresponding value after resize\\r\\n\\t\\t\\tthis.__setTableWidth(null);\\r\\n\\t\\t\\tthis.__renderBody(false);\\r\\n\\t\\t\\tthis.__lastBaseMeasurement = this.__baseComponent.getBoundingClientRect();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.getGridState = function()\\r\\n\\t{\\r\\n\\t\\tvar data = {};\\r\\n\\t\\tdata.columns = this.__columns;\\r\\n\\t\\treturn data;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//setState name conflicts with react setState method\\r\\n\\tNSGrid.prototype.setGridState = function(data)\\r\\n\\t{\\r\\n\\t\\tif(data)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(data[\\\"columns\\\"] && data[\\\"columns\\\"].length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__createColumnProvider(data[\\\"columns\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.setColumn = function(arrColumns)\\r\\n\\t{\\r\\n\\t\\t//moving __initializePluggins here to ensure that the Pluggins are downloaded and then they are initialized\\r\\n\\t\\tthis.__initializePluggins();\\r\\n\\t\\tif(arrColumns && arrColumns.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__orignalColumns = arrColumns;\\r\\n\\t\\t\\tthis.__objGrid.__checkForAdditionalColumns();\\r\\n\\t\\t\\tthis.__processPinnedColumn();\\r\\n\\t\\t\\tfor(var count = 0;count < this.__orignalColumns.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = this.__orignalColumns[count];\\r\\n\\t\\t\\t\\t//reset column visibility initially\\r\\n\\t\\t\\t\\tthis.__setColumnVisibility(count,true,item);\\r\\n\\t\\t\\t\\tthis.__processColumnObject(item,count);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__orignalColumns = [];\\r\\n\\t\\t}\\r\\n\\t\\tthis.__columns = this.__orignalColumns.slice(0);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.setContextMenuSetting = function(contextMenuSetting)\\r\\n\\t{\\r\\n\\t\\tthis.__contextMenuSetting = contextMenuSetting;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.dataSource = function(source,isReset)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefined(source))\\r\\n\\t\\t{\\r\\n\\t\\t\\t//var start = new Date().getTime();\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(isReset))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tisReset = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__dataSource = source;\\r\\n\\t\\t\\tif(this.__isCreationCompleted)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__rowsRendered = false;\\r\\n\\t\\t\\t\\tif(isReset)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__setComponentHeight();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__resetPluggins();\\r\\n\\t\\t\\t\\tthis.__createStructure();\\r\\n\\t\\t\\t\\tthis.__callPlugginsInitialize();\\r\\n\\t\\t\\t\\tthis.__addColumnPseudoStyle();\\r\\n\\t\\t\\t\\tif(this.__dataSource && this.__dataSource.length > 0 && this.__dataSource[0])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__orignalItemKey = Object.keys(this.__dataSource[0]);\\r\\n\\t\\t\\t\\t\\tthis.__objGrid.dataSource();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__arrWrapper = [];\\r\\n\\t\\t\\t\\t\\tthis.__arrInternalSource = [];\\r\\n\\t\\t\\t\\t\\tthis.__updateTotalRecords(0);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__setMeasurement();\\r\\n\\t\\t\\t\\tif(isReset)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsGridSort.reset();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__setHeaderSortFunction();\\r\\n\\t\\t\\t\\tif(isReset || !this.__processDefaultSort())\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__renderBody(false);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__handleHiddenColumn();\\r\\n\\t\\t\\t\\tthis.__addRowHeightInDOM();\\r\\n\\t\\t\\t\\t//setTimeout(function(){ self.__dispatchEvent(NSGrid.GRID_RENDERED); }, 700);\\r\\n\\t\\t\\t\\tif(this.__enableAutoResize)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.attachResizeListener();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__objGrid.afterGridRendered();\\r\\n\\t\\t\\t\\tthis.__dispatchEvent(NSGrid.GRID_RENDERED);\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t/*var end = new Date().getTime();\\r\\n\\t\\t\\t\\tvar time = end - start;\\r\\n\\t\\t\\t\\tconsole.debug('Execution time: ' + (time / 1000.0));*/\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//always add as the first item so that when execute we can start from end and remove the elements\\r\\n\\t\\t\\t\\tthis.__queueFunc.splice(0, 0, this.dataSource.bind(this,source,isReset));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__dataSource;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.getOrignalItem = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item && this.__orignalItemKey && this.__orignalItemKey.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retItem = {};\\r\\n\\t\\t\\tvar key = null;\\r\\n\\t\\t\\tfor(var count = 0;count < this.__orignalItemKey.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tkey = this.__orignalItemKey[count];\\r\\n\\t\\t\\t\\tif(!this.util.startsWith(key,this.__fieldPrefix))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretItem[key] = item[key];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retItem;\\r\\n\\t\\t}\\r\\n\\t\\treturn item;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.addRows = function(source)\\r\\n\\t{\\r\\n\\t\\tthis.__stopScroll = true;\\r\\n\\t\\tif(source && source.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar startIndex = this.__arrInternalSource.length;\\r\\n\\t\\t\\tif(!this.__addRemoveRowCallInternal)\\r\\n\\t   \\t \\t{\\r\\n\\t\\t\\t\\tthis.__objGrid.__setWrapperSource(source,startIndex,-1,0,true);\\r\\n\\t   \\t \\t}\\r\\n\\t\\t\\t//this logic might be wrong for filtered result or sorted list\\r\\n\\t\\t\\tthis.__arrInternalSource = this.__arrInternalSource.concat(source);\\r\\n\\t\\t\\tthis.__createBodyBody(this.__arrInternalSource,startIndex,this.__arrInternalSource.length);\\r\\n\\t   \\t \\tif(!this.__addRemoveRowCallInternal)\\r\\n\\t   \\t \\t{\\r\\n\\t   \\t \\t\\tthis.__arrWrapper = this.__arrWrapper.concat(source);\\r\\n\\t   \\t \\t\\tthis.__updateTotalRecords();\\r\\n\\t   \\t \\t}\\r\\n\\t   \\t \\tthis.__addRemoveRowCallInternal = false;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__stopScroll = false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.removeRows = function(arrIndex)\\r\\n\\t{\\r\\n\\t\\tif(!this.__enableHierarchical && !this.__enableGrouping && !this.__enableMasterDetail && arrIndex && arrIndex.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrIndex.sort();\\r\\n\\t   \\t \\tfor (var rowIndex = arrIndex.length - 1; rowIndex >= 0; rowIndex--)\\r\\n\\t\\t    {\\r\\n\\t   \\t \\t\\tvar index = arrIndex[rowIndex];\\r\\n\\t   \\t \\t\\tif(index > 0 && index < this.__arrInternalSource.length)\\r\\n\\t   \\t \\t\\t{\\r\\n\\t\\t   \\t \\t\\t//if virtual scroll or Pagination of type Page is enabled then do not remove rows\\r\\n\\t\\t   \\t \\t\\tif(!(this.__enableVirtualScroll || (this.__enablePagination && !this.__isPaginationTypeScroll)))\\r\\n\\t\\t   \\t \\t\\t{\\r\\n\\t\\t   \\t \\t\\t\\tthis.__tblCenterBodyBody.deleteRow(index);\\r\\n\\t\\t   \\t \\t\\t}\\r\\n\\t\\t   \\t \\t\\tthis.__arrInternalSource.splice(index, 1);\\r\\n\\t\\t   \\t \\t\\tthis.__arrWrapper.splice(index, 1);\\r\\n\\t   \\t \\t\\t}\\r\\n\\t\\t    }\\r\\n\\t   \\t \\tif(!this.__addRemoveRowCallInternal)\\r\\n\\t\\t \\t{\\r\\n\\t\\t \\t\\tthis.__updateTotalRecords();\\r\\n\\t\\t \\t}\\r\\n\\t\\t \\tthis.__addRemoveRowCallInternal = false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.groupBy = function(groupByField)\\r\\n\\t{\\r\\n\\t\\tif(this.__enableGrouping && groupByField && groupByField.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__setting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__setting[\\\"groupByField\\\"] = groupByField;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.propertyChange(\\\"groupByField\\\",this.__groupByField,groupByField,true);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.expandAll = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableHierarchical || this.__enableGrouping || this.__enableMasterDetail)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__expandCollapseAll(false);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.collapseAll = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableHierarchical || this.__enableGrouping || this.__enableMasterDetail)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__expandCollapseAll(true);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.expandByRow = function(element,rowIndex)\\r\\n\\t{\\r\\n\\t\\tthis.expandCollapseByRow(element,rowIndex,false);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.collapseByRow = function(element,rowIndex)\\r\\n\\t{\\r\\n\\t\\tthis.expandCollapseByRow(element,rowIndex,true);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.expandByKeyField = function(keyFieldValue) \\r\\n\\t{\\r\\n\\t\\tthis.expandCollapseByKeyField(keyFieldValue,false);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.collapseByKeyField = function(keyFieldValue) \\r\\n\\t{\\r\\n\\t\\tthis.expandCollapseByKeyField(keyFieldValue,true);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.expandCollapseByKeyField = function(keyFieldValue,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(keyFieldValue))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemBykeyField(keyFieldValue);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = this.__getIndexByItem(item);\\r\\n\\t\\t\\t\\tthis.expandCollapseByRow(null,index,isCollapse);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.expandCollapseByRow = function(element,rowIndex,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\telement = this.util.findParent(element,\\\"TR\\\");\\r\\n\\t\\t\\tif(element)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowIndex = parseInt(element.getAttribute(\\\"ns-index\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(rowIndex > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(isCollapse)) {\\r\\n\\t\\t\\t\\tisCollapse = this.__isRowCollapsed(null,rowIndex);\\r\\n\\t\\t\\t\\tisCollapse = !isCollapse;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\trowIndex = parseInt(rowIndex);\\r\\n\\t\\t\\tthis.__showHideRow(rowIndex,element,isCollapse);\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\tthis.__objGrid.arrowClickHandler(item,isCollapse);\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.warning(\\\"NSGrid\\\",\\\"Row Index starts with index 1.\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.getRowInfo = function(row)\\r\\n\\t{\\r\\n\\t\\tif(row)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objInfo = {};\\r\\n\\t\\t\\tobjInfo.rowIndex = parseInt(row.getAttribute(\\\"ns-index\\\"));\\r\\n\\t\\t\\tobjInfo.rowLevel = parseInt(row.getAttribute(\\\"ns-level\\\"));\\r\\n\\t\\t\\tobjInfo.rowParentIndex = parseInt(row.getAttribute(\\\"ns-parent-index\\\"));\\r\\n\\t\\t\\tobjInfo.item = this.__getItemByIndex(objInfo.rowIndex);\\r\\n\\t\\t\\tobjInfo.rowOrignalIndex = objInfo.item[this.__fieldVisibleIndex];\\r\\n\\t\\t\\treturn objInfo;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.getCellInfo = function(cell)\\r\\n\\t{\\r\\n\\t\\tif(cell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objInfo = {};\\r\\n\\t\\t\\tvar row = this.util.findParent(cell,\\\"TR\\\");\\r\\n\\t\\t\\tif(row)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjInfo = this.getRowInfo(row);\\r\\n\\t\\t\\t\\tobjInfo.row = row;\\r\\n\\t\\t\\t\\tobjInfo.cellIndex = cell.cellIndex;\\r\\n\\t\\t\\t\\treturn objInfo;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.getItemInfo = function(objItem)\\r\\n\\t{\\r\\n\\t\\tvar objReturn = null;\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(objItem))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar target = null;\\r\\n\\t\\t\\tvar event = this.util.getEvent(objItem);\\r\\n\\t\\t\\tif(event)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttarget = this.util.getTarget(event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttarget = objItem;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(target && this.util.isElement(target))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isElementOfType(target,\\\"TR\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjReturn = this.getRowInfo(target);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(this.util.isElementOfType(\\\"TD\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjReturn = this.getCellInfo(target);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttarget = this.util.findParent(target,\\\"TD\\\");\\r\\n\\t\\t\\t\\t\\tobjReturn = this.getCellInfo(target);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isNumber(objItem))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = parseInt(objItem);\\r\\n\\t\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t/*if(item[this.__fieldRow])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tobjReturn = this.getRowInfo(item[this.__fieldRow]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{*/\\r\\n\\t\\t\\t\\t\\t\\tobjReturn = {};\\r\\n\\t\\t\\t\\t\\t\\tobjReturn.rowIndex = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t\\t\\tobjReturn.rowOrignalIndex = item[this.__fieldVisibleIndex];\\r\\n\\t\\t\\t\\t\\t\\tobjReturn.rowLevel = item[this.__fieldRowLevel];\\r\\n\\t\\t\\t\\t\\t\\tobjReturn.rowParentIndex = item[this.__fieldParentIndex];\\r\\n\\t\\t\\t\\t\\t\\tobjReturn.parentItem = this.__getItemByIndex(objReturn.rowParentIndex);\\r\\n\\t\\t\\t\\t\\t\\tobjReturn.item = item;\\r\\n\\t\\t\\t\\t\\t//}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if (this.util.isObject(objItem) && objItem.hasOwnProperty(this.__fieldIndex)) \\r\\n\\t\\t\\t{\\r\\n            \\tvar objReturn = {};\\r\\n                objReturn.rowIndex = objItem[this.__fieldIndex];\\r\\n                objReturn.rowOrignalIndex = objItem[this.__fieldVisibleIndex];\\r\\n                objReturn.rowLevel = objItem[this.__fieldRowLevel];\\r\\n                objReturn.rowParentIndex = objItem[this.__fieldParentIndex];\\r\\n                objReturn.item = objItem;\\r\\n            }\\r\\n\\t\\t}\\r\\n\\t\\treturn objReturn;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.getItemInfoByKeyField = function(keyFieldValue)\\r\\n\\t{\\r\\n\\t\\tvar objReturn = null;\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(keyFieldValue))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemBykeyField(keyFieldValue);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjReturn = this.getItemInfo(item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn objReturn;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.cascadeValues = function(event,callBack)\\r\\n\\t{\\r\\n\\t\\tif(this.__enableGrouping)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar control = this.util.getTarget(event);\\r\\n\\t\\t\\tvar cell = this.util.findParent(control,\\\"TD\\\");\\r\\n\\t\\t\\tvar objCellInfo = this.getCellInfo(cell);\\r\\n\\t\\t\\tvar row = objCellInfo.row;\\r\\n\\t\\t\\tvar cellIndex = objCellInfo.cellIndex;\\r\\n\\t\\t\\tvar colItem = this.__columns[cellIndex];\\r\\n\\t\\t\\tvar dataField = colItem.dataField;\\r\\n\\t\\t\\tvar cascadeValue = this.util.getControlValue(control);\\r\\n\\t\\t\\tvar flatSource = this.__objGrid.__getFlatSource();\\r\\n\\t\\t\\tvar rowIndex = objCellInfo.rowIndex;\\r\\n\\t\\t\\tvar retIndex = this.__getActualIndex(flatSource,rowIndex);\\r\\n\\t\\t\\tif(retIndex !== rowIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowIndex = (retIndex + 1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar groupItem = objCellInfo[\\\"item\\\"];//flatSource[rowIndex];\\r\\n\\t\\t\\tif(groupItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tgroupItem[dataField] = cascadeValue;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(var count = rowIndex;count < flatSource.length;count ++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = flatSource[count];\\r\\n\\t\\t\\t\\tvar childRow = item[this.__fieldRow];\\r\\n\\t\\t\\t\\tif(item[this.__fieldRowLevel] !== objCellInfo.rowLevel)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar isSetValue = false;\\r\\n\\t                var setValue = null;\\r\\n\\t                if(childRow && item[this.__fieldRowVisible])\\r\\n\\t                {\\r\\n\\t                   var childCell = childRow.cells[cellIndex];\\r\\n\\t                   if(childCell.getElementsByTagName(control.tagName).length > 0)\\r\\n\\t                   {\\r\\n\\t                      var childControl = childCell.getElementsByTagName(control.tagName)[0];\\r\\n\\t                      if(childControl)\\r\\n\\t                      {\\r\\n\\t                             if(callBack)\\r\\n\\t                             {\\r\\n\\t                                callBack(control,childControl,item,dataField,cellIndex,colItem,childCell,row);\\r\\n\\t                                isSetValue = false;\\r\\n\\t                             }\\r\\n\\t                             else\\r\\n\\t                             {\\r\\n\\t                                setValue = this.util.setControlValue(childControl,cascadeValue);\\r\\n\\t                                isSetValue = true;\\r\\n\\t                             }\\r\\n\\t                      }\\r\\n\\t                   }\\r\\n\\t                   else if(callBack)\\r\\n\\t\\t               {\\r\\n\\t\\t                  callBack(control,null,item,dataField,cellIndex,colItem,null,row);\\r\\n\\t\\t                  isSetValue = false;\\r\\n\\t\\t               }\\r\\n\\t\\t               else\\r\\n\\t\\t               {\\r\\n\\t\\t            \\t  setValue = cascadeValue;\\r\\n\\t\\t                  isSetValue = true;\\r\\n\\t\\t               }\\r\\n\\t                }\\r\\n\\t                else if(callBack)\\r\\n\\t                {\\r\\n\\t                    callBack(control,null,item,dataField,cellIndex,colItem,null,row);\\r\\n\\t                    isSetValue = false;\\r\\n\\t                }\\r\\n\\t                else\\r\\n\\t                {\\r\\n\\t                   setValue = cascadeValue;\\r\\n\\t                   isSetValue = true;\\r\\n\\t                }\\r\\n\\t                if(isSetValue)\\r\\n\\t                {\\r\\n\\t                   item[dataField] = setValue;\\r\\n\\t                }\\r\\n\\t                this.updateItemInDataSource(item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.setFontSize = function(fontSize)\\r\\n\\t{\\r\\n\\t\\tif(this.__tblCenterHeader)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__tblCenterHeader.style.fontSize = fontSize;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__tblCenterBody)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__tblCenterBody.style.fontSize = fontSize;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//assuming column is added at last\\r\\n\\t//if reposition then use swapColumn\\r\\n\\tNSGrid.prototype.addColumn = function(objColumn)\\r\\n\\t{\\r\\n\\t\\tif(objColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__processColumnObject(objColumn,this.__columns.length);\\r\\n\\t\\t\\tif(!this.__isColumnExist(objColumn[\\\"dataField\\\"]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__editColumnArray(\\\"add\\\",objColumn);\\r\\n\\t\\t\\t\\tvar headerRow = this.__getHeaderHeaderRow(this.__tblCenterHeader);\\r\\n\\t\\t\\t\\tif(headerRow)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar headerBodyRow = this.__getHeaderBodyRow(this.__tblCenterHeader);\\r\\n\\t\\t\\t\\t\\tvar rendererRow = this.__getHeaderFilterRow(this.__tblCenterHeader);\\r\\n\\t\\t\\t\\t\\tif(headerBodyRow)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__createHeaderColGroup(objColumn);\\r\\n\\t\\t\\t\\t\\t\\tthis.__createHeaderHeaderCell(objColumn,headerRow);\\r\\n\\t\\t\\t\\t\\t    this.__createHeaderBodyCell(objColumn,headerBodyRow,rendererRow,this.__columns.length - 1);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar bodyRow = this.__getBodyHeaderRow(this.__tblCenterBody);\\r\\n\\t\\t    \\tif(bodyRow)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\tvar arrRows = this.__getBodyBodyRow(this.__tblCenterBody);\\r\\n\\t\\t    \\t\\tif(arrRows && arrRows.length > 0)\\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\tvar arrItems = this.__arrInternalSource;\\r\\n\\t\\t\\t    \\t\\tthis.__createBodyColGroup(objColumn);\\r\\n\\t\\t\\t    \\t\\tthis.__createBodyHeaderCell(objColumn,bodyRow);\\r\\n\\t\\t\\t    \\t\\tvar row = null;\\r\\n\\t\\t\\t    \\t\\tvar item = null;\\r\\n\\t\\t\\t    \\t\\tfor (var rowCount = 0; rowCount < arrRows.length; rowCount++) \\r\\n\\t\\t\\t    \\t\\t{\\r\\n\\t\\t\\t    \\t\\t\\trow = arrRows[rowCount];\\r\\n\\t\\t\\t    \\t\\t\\titem = arrItems[rowCount];\\r\\n\\t\\t\\t    \\t\\t\\tvar colIndex = this.__columns.length - 1;\\r\\n\\t\\t\\t    \\t\\t\\tvar cell = this.__createBodyRowCell(row,colIndex,true);\\r\\n\\t\\t\\t    \\t\\t\\tthis.__setBodyCellProperty(row,cell,item,objColumn,colIndex,-1,0,true);\\r\\n\\t\\t\\t    \\t    }\\r\\n\\t\\t    \\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__alignTables(false);\\r\\n\\t\\t\\t\\tthis.__setHeaderSortFunctionForItem(objColumn);\\r\\n\\t\\t\\t\\tthis.__addColumnPseudoStyle();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.showColumn(objColumn[\\\"dataField\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.warning(\\\"NSGrid\\\",\\\"Please pass valid Column object to be added.\\\");\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//programmatic method to call deviceViewChanged\\r\\n\\tNSGrid.prototype.changeDeviceView = function(conditionTrue)\\r\\n\\t{\\r\\n\\t\\tthis.deviceViewChanged(conditionTrue);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.hideColumn = function(column)\\r\\n\\t{\\r\\n\\t\\tvar index = this.__getColumnIndexForSwapOrRemove(column);\\r\\n\\t\\tif(index > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__isColumnValidForSwapOrRemove(index,\\\"hidden\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//this.__removeHeaderCell(index);\\r\\n\\t\\t\\t\\t//this.__removeBodyColumn(index);\\r\\n\\t\\t\\t\\t//this.__removeFooterColumn(index);\\r\\n\\t\\t\\t\\tthis.__editColumnArray(\\\"hide\\\",index);\\r\\n\\t\\t\\t\\tthis.__setColumnVisibility(index,false);\\r\\n\\t\\t\\t\\tthis.__alignTables(false);\\r\\n\\t\\t\\t\\tthis.__addColumnPseudoStyle();\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.showColumn = function(column)\\r\\n\\t{\\r\\n\\t\\tvar index = this.__getColumnIndexForSwapOrRemove(column);\\r\\n\\t\\tif(index > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__editColumnArray(\\\"show\\\",index);\\r\\n\\t\\t\\tthis.__setColumnVisibility(index,true,column);\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.swapColumns = function(sourceColumn,destinationColumn)\\r\\n\\t{\\r\\n\\t\\tvar sourceIndex = this.__getColumnIndexForSwapOrRemove(sourceColumn);\\r\\n\\t\\tvar destinationIndex = this.__getColumnIndexForSwapOrRemove(destinationColumn);\\r\\n\\t\\tif(sourceIndex > -1 && destinationIndex > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar sourceValid = this.__isColumnValidForSwapOrRemove(sourceIndex,\\\"swapped\\\");\\r\\n\\t\\t\\tvar destinationValid = this.__isColumnValidForSwapOrRemove(destinationIndex,\\\"swapped\\\");\\r\\n\\t\\t\\tif(sourceValid && destinationValid)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__swapOrMoveHeaderCell(\\\"swap\\\",sourceIndex,destinationIndex);\\r\\n\\t\\t\\t\\tthis.__swapOrMoveBodyCell(\\\"swap\\\",sourceIndex,destinationIndex);\\r\\n\\t\\t\\t\\tthis.__swapOrMoveFooterCell(\\\"swap\\\",sourceIndex,destinationIndex);\\r\\n\\t\\t\\t\\tthis.__alignTables(false);\\r\\n\\t\\t\\t\\tthis.__columns[sourceIndex][this.__fieldColIndex] = destinationIndex;\\r\\n\\t\\t\\t\\tthis.__columns[destinationIndex][this.__fieldColIndex] = sourceIndex;\\r\\n\\t\\t\\t\\tthis.util.swapArrayItems(this.__columns,sourceIndex,destinationIndex);\\r\\n\\t\\t\\t\\tthis.__addColumnPseudoStyle();\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.moveColumn = function(column,toIndex)\\r\\n\\t{\\r\\n\\t\\tvar sourceIndex = this.__getColumnIndexForSwapOrRemove(column);\\r\\n\\t\\ttoIndex = this.__getColumnIndexForSwapOrRemove(toIndex);\\r\\n\\t\\tif(sourceIndex > -1 && toIndex > -1 && sourceIndex !== toIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar sourceValid = this.__isColumnValidForSwapOrRemove(sourceIndex,\\\"moved\\\");\\r\\n\\t\\t\\tvar destinationValid = this.__isColumnValidForSwapOrRemove(toIndex,\\\"moved\\\");\\r\\n\\t\\t\\tif(sourceValid && destinationValid)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__swapOrMoveHeaderCell(\\\"move\\\",sourceIndex,toIndex);\\r\\n\\t\\t\\t\\tthis.__swapOrMoveBodyCell(\\\"move\\\",sourceIndex,toIndex);\\r\\n\\t\\t\\t\\tthis.__swapOrMoveFooterCell(\\\"move\\\",sourceIndex,toIndex);\\r\\n\\t\\t\\t\\tvar currentColumn = this.__columns[toIndex];\\r\\n\\t\\t\\t\\tvar direction = \\\"no\\\";\\r\\n\\t\\t\\t\\tif((currentColumn && currentColumn.pinned) || this.__columns[sourceIndex].pinned)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__columns[sourceIndex].pinned = null;\\r\\n\\t\\t\\t\\t\\tif(currentColumn.pinned)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdirection = currentColumn.pinned;\\r\\n\\t\\t\\t\\t\\t\\tthis.__columns[sourceIndex].pinned = currentColumn.pinned;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__updateFixedColCounts();\\r\\n\\t\\t\\t\\t\\tthis.__createFixedRows();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__alignTables(false);\\r\\n\\t\\t\\t\\t//this.__setFixedCellsPosition();\\r\\n\\t\\t\\t\\tthis.__columns[sourceIndex][this.__fieldColIndex] = toIndex;\\r\\n\\t\\t\\t\\tthis.util.moveArrayItem(this.__columns,sourceIndex,toIndex);\\r\\n\\t\\t\\t\\tvar smallIndex = Math.min(sourceIndex,toIndex);\\r\\n\\t\\t\\t\\tfor(var count = smallIndex;count < this.__columns.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__columns[count][this.__fieldColIndex] = count;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__addColumnPseudoStyle();\\r\\n\\t\\t\\t\\tthis.__updateColumnClassForFixedColumns(toIndex,direction);\\r\\n\\t\\t\\t\\tthis.__addStyleForFixedColumns();\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.sortBy = function(column,isAscending)\\r\\n\\t{\\r\\n\\t\\tvar index = this.__getColumnIndexForSwapOrRemove(column);\\r\\n\\t\\tvar headerBodyRow = this.__getHeaderBodyRow(this.__tblCenterHeader);\\r\\n\\t\\tif(index > -1 && headerBodyRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrHeaderCells = headerBodyRow.cells;\\r\\n\\t\\t\\tvar cell = arrHeaderCells[index];\\r\\n\\t\\t    var columnDetail = this.__getColumnObject(cell.getAttribute(\\\"currentColumnIndex\\\"));\\r\\n\\t\\t    this.__nsGridSort.handle(cell,columnDetail,false,isAscending);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.autoResizeColumn = function(column)\\r\\n\\t{\\r\\n\\t\\tvar index = this.__getColumnIndexForSwapOrRemove(column);\\r\\n\\t\\tthis.__nsGridColumnResize.autoResize(index);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.pinColumn = function(column,direction)\\r\\n\\t{\\r\\n\\t\\tvar index = this.__getColumnIndexForSwapOrRemove(column);\\r\\n\\t\\tvar columnDetail = this.__getColumnObject(index);\\r\\n\\t\\tif(columnDetail)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(columnDetail.pinned != direction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar toIndex = -1;\\r\\n\\t\\t\\t\\tswitch(direction)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcase \\\"left\\\":\\r\\n\\t\\t\\t\\t\\t\\tfor(var count = 0;count < this.__columns.length;count++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(this.__columns[count].pinned != \\\"left\\\")\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\ttoIndex = count;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase \\\"right\\\":\\r\\n\\t\\t\\t\\t\\t\\t//this.__columns = this.__orignalColumns.slice(0);\\r\\n\\t\\t\\t\\t\\t\\tfor(var count = this.__columns.length - 1;count > -1;count--)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(this.__columns[count].pinned != \\\"right\\\")\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\ttoIndex = count;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar update = false;\\r\\n\\t\\t\\t\\tif(toIndex > -1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.moveColumn(index,toIndex)) {\\r\\n\\t\\t\\t\\t\\t\\tupdate = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse {\\r\\n\\t\\t\\t\\t\\tupdate = true;\\r\\n\\t\\t\\t\\t\\ttoIndex = index;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(update) {\\r\\n\\t\\t\\t\\t\\tcolumnDetail.pinned = direction;\\r\\n\\t\\t\\t\\t\\tthis.__updateFixedColCounts();\\r\\n\\t\\t\\t\\t\\tthis.__createFixedRows();\\r\\n\\t\\t\\t\\t\\t//this.__setFixedCellsPosition();\\r\\n\\t\\t\\t\\t\\tthis.__updateColumnClassForFixedColumns(toIndex,direction);\\r\\n\\t\\t\\t\\t\\tthis.__addStyleForFixedColumns();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.updateRowByIndex = function(index)\\r\\n\\t{\\r\\n\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar row = this.__getRowFromItem(item);\\r\\n\\t\\t\\tif(row)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cells = row.cells;\\r\\n\\t\\t\\t\\tfor (var colIndex = 0; colIndex < this.__columns.length; colIndex++)\\r\\n\\t\\t        {\\r\\n\\t\\t\\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t        \\tvar colItem = this.__columns[colIndex];\\r\\n\\t\\t        \\tthis.__updateCellText(row,cell,item,colItem,index,colIndex);\\r\\n\\t\\t        }\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.updateRowByKeyField = function(keyFieldValue)\\r\\n\\t{\\r\\n\\t\\tvar item = this.__getItemBykeyField(keyFieldValue);\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar row = this.__getRowFromItem(item);\\r\\n\\t\\t\\tif(row && parseInt(row.getAttribute(\\\"ns-index\\\")) === item[this.__fieldIndex])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cells = row.cells;\\r\\n\\t\\t\\t\\tfor (var colIndex = 0; colIndex < this.__columns.length; colIndex++)\\r\\n\\t\\t        {\\r\\n\\t\\t\\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t        \\tvar colItem = this.__columns[colIndex];\\r\\n\\t\\t        \\tthis.__updateCellText(row,cell,item,colItem,item[this.__fieldIndex],colIndex);\\r\\n\\t\\t        }\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.updateCellByIndex = function(index,dataField)\\r\\n\\t{\\r\\n\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\tvar colItem = this.__getColumnObjectByDataField(dataField);\\r\\n\\t\\tif(item && colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar colIndex = colItem[this.__fieldColIndex];\\r\\n\\t\\t\\tvar row = this.__getRowFromItem(item);\\r\\n\\t\\t\\tif(row)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cells = row.cells;\\r\\n\\t\\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t\\t\\tthis.__updateCellText(row,cell,item,colItem,index,colIndex);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.updateCellByKeyField = function(keyFieldValue,dataField)\\r\\n\\t{\\r\\n\\t\\tvar item = this.__getItemBykeyField(keyFieldValue);\\r\\n\\t\\tvar colItem = this.__getColumnObjectByDataField(dataField);\\r\\n\\t\\tif(item && colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar colIndex = colItem[this.__fieldColIndex];\\r\\n\\t\\t\\tvar row = this.__getRowFromItem(item);\\r\\n\\t\\t\\tif(row)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cells = row.cells;\\r\\n\\t\\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t\\t\\tthis.__updateCellText(row,cell,item,colItem,item[this.__fieldIndex],colIndex);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.updateItemInDataSource = function(item)\\r\\n\\t{\\r\\n\\t\\tthis.__updateItemInSource(item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.getGroupedSource = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__arrFilteredGroupedSource;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.setSelectedItems = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar source = this.__getAllItems();\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__clearAllRowSelection(true);\\r\\n\\t\\t\\t\\tvar length = arrItems.length;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = arrItems[count];\\r\\n\\t\\t\\t\\t\\tindex = this.__getIndexByItem(item);\\r\\n\\t\\t\\t\\t\\tif(index > -1 && source && index < source.length)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__setIndex(index,true);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.addSelectedItems = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar source = this.__getAllItems();\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar length = arrItems.length;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = arrItems[count];\\r\\n\\t\\t\\t\\t\\tindex = this.__getIndexByItem(item);\\r\\n\\t\\t\\t\\t\\tif(index > -1 && source)// && index < source.length\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__setIndex(index,true);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.removeSelectedItems = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar source = this.__getAllItems();\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar length = arrItems.length;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = arrItems[count];\\r\\n\\t\\t\\t\\t\\tindex = this.__getIndexByItem(item);\\r\\n\\t\\t\\t\\t\\tif(index > -1 && source)// && index < source.length\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__markRowUnselected(index);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.setSelectedItem = function(item)\\r\\n\\t{\\r\\n\\t\\tthis.setSelectedItems([item]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.setSelectedIndexes = function(arrSelectedIndex)\\r\\n\\t{\\r\\n\\t\\tif(arrSelectedIndex && arrSelectedIndex.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar source = this.__getAllItems();\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar length = arrSelectedIndex.length;\\r\\n\\t\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tindex = arrSelectedIndex[count];\\r\\n\\t\\t\\t\\t\\tif(index > -1 && source && index < source.length)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__setIndex(index,true);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.setSelectedIndex = function(selectedIndex)\\r\\n\\t{\\r\\n\\t\\tthis.setSelectedIndexes([selectedIndex]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.unSelectItems = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tthis.removeSelectedItems(arrItems);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.unSelectItem = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tthis.unSelectItems([arrItems]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.unSelectIndexes = function(arrSelectedIndex)\\r\\n\\t{\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.unSelectIndex = function(selectedIndex)\\r\\n\\t{\\r\\n\\t\\tthis.unSelectIndexes([selectedIndex]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.getSelectedIndex = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedIndex;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.getSelectedItem = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.getSelectedIndexes = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedIndexes;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.getSelectedItems = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedItems;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.deselectAll = function()\\r\\n\\t{\\r\\n\\t\\tthis.__clearAllRowSelection(true);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.filter = function(filter,setting,enableHighlighting,recordLimit)\\r\\n\\t{\\r\\n\\t\\tthis.__nsGridFilter.__handleFiltering(filter,setting,enableHighlighting,recordLimit);\\r\\n\\t\\tthis.__nsGridFilter.setFiltersInControls(filter);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.resetFilters = function()\\r\\n\\t{\\r\\n\\t\\tthis.__nsGridFilter.clearFilters();\\r\\n\\t\\tthis.__nsGridFilter.resetFilters();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.getFilteredData = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__arrInternalSource;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.highlightText = function(dataField,text)\\r\\n\\t{\\r\\n\\t\\tvar colItem = this.__getColumnObjectByDataField(dataField);\\r\\n\\t\\tif(colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar index = colItem[this.__fieldColIndex];\\r\\n\\t\\t\\tvar arrRows = this.__tblCenterBodyBody.rows;\\r\\n\\t\\t\\tvar length = arrRows.length;\\r\\n\\t\\t\\tfor(var rowIndex = 0; rowIndex < length; rowIndex++)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar cell = arrRows[rowIndex].cells[index];\\r\\n\\t\\t\\t\\tif(cell)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar divText = cell.querySelector(\\\".\\\" + this.__CLASS_CELL_CHILD);\\r\\n\\t\\t\\t\\t\\tif(divText)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.util.unHighlightText(divText,\\\"nsTextHighlight\\\");\\r\\n\\t\\t\\t\\t\\t\\tthis.util.highlightText(divText,text,\\\"nsTextHighlight\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.unHighlightText = function()\\r\\n\\t{\\r\\n\\t\\tvar arrRows = this.__tblCenterBodyBody.rows;\\r\\n\\t\\tvar length = arrRows.length;\\r\\n\\t\\tfor(var rowIndex = 0; rowIndex < length; rowIndex++)\\r\\n\\t    {\\r\\n\\t\\t\\tvar colLength = this.__columns.length;\\r\\n\\t\\t\\tfor(var colIndex = 0; colIndex < colLength; colIndex++)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar cell = arrRows[rowIndex].cells[colIndex];\\r\\n\\t\\t\\t\\tif(cell)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar divText = cell.querySelector(\\\".\\\" + this.__CLASS_CELL_CHILD);\\r\\n\\t\\t\\t\\t\\tif(divText)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.util.unHighlightText(divText,\\\"nsTextHighlight\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    }\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\t//call this function if the Grid has Fixed Columns and the header calculation is not perfect due to external elements\\r\\n\\t//call this function after all the elements are rendered by javascript\\r\\n\\tNSGrid.prototype.fixFixedHeader = function()\\r\\n\\t{\\r\\n\\t\\tthis.__renderBody(false);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.setSelectedRows = function(arrIndex)\\r\\n\\t{\\r\\n\\t\\t/*if(arrIndex && arrIndex.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrIndex.sort();\\r\\n\\t   \\t \\tfor (var rowIndex = arrIndex.length - 1; rowIndex >= 0; rowIndex--)\\r\\n\\t\\t    {\\r\\n\\t   \\t \\t\\tvar index = arrIndex[rowIndex];\\r\\n\\t   \\t \\t\\tif(index > 0 && index < this.__arrInternalSource.length)\\r\\n\\t   \\t \\t\\t{\\r\\n\\t\\t   \\t \\t\\t//if virtual scroll or Pagination of type Page is enabled then do not remove rows\\r\\n\\t\\t   \\t \\t\\tif(!(this.__enableVirtualScroll || (this.__enablePagination && !this.__isPaginationTypeScroll)))\\r\\n\\t\\t   \\t \\t\\t{\\r\\n\\t\\t   \\t \\t\\t\\tthis.__tblCenterBodyBody.deleteRow(index);\\r\\n\\t\\t   \\t \\t\\t}\\r\\n\\t\\t   \\t \\t\\tthis.__arrInternalSource.splice(index, 1);\\r\\n\\t\\t   \\t \\t\\tthis.__arrWrapper.splice(index, 1);\\r\\n\\t   \\t \\t\\t}\\r\\n\\t\\t    }\\r\\n\\t   \\t \\tif(!this.__addRemoveRowCallInternal)\\r\\n\\t\\t \\t{\\r\\n\\t\\t \\t\\tthis.__updateTotalRecords();\\r\\n\\t\\t \\t}\\r\\n\\t\\t \\tthis.__addRemoveRowCallInternal = false;\\r\\n\\t\\t}*/\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.scrollToIndex = function(selectedIndex,animationRequired)\\r\\n\\t{\\r\\n\\t\\tselectedIndex = parseInt(selectedIndex);\\r\\n\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\tif(selectedIndex > -1 && source && selectedIndex < source.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(selectedIndex);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__enableCustomScrollBar)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar targetDimension = this.__virtualRowHeight * selectedIndex;\\r\\n\\t\\t\\t\\t\\t\\tthis.__setCustomScrollBarScrollTop(targetDimension);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(this.__nsVirtualScroll)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t//because in list index is index+1\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__nsVirtualScroll.scrollToIndex(selectedIndex,animationRequired);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar targetDimension = -1;\\r\\n\\t\\t\\t\\t\\tif(item[this.__fieldRowHtml])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\ttargetDimension = (item[this.__fieldRowHtml].offsetTop);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar scrollTarget = this.__divCenterTableBodyContainer;\\r\\n\\t\\t\\t\\t\\tif(animationRequired)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar animation = new this.util.animation(scrollTarget,[\\r\\n\\t\\t\\t       \\t  \\t    {\\r\\n\\t\\t\\t       \\t  \\t      time: 500,\\r\\n\\t\\t\\t       \\t  \\t      property:\\\"scrollTop\\\",\\r\\n\\t\\t\\t       \\t  \\t      target: targetDimension,\\r\\n\\t\\t\\t       \\t  \\t    }\\r\\n\\t\\t\\t       \\t  \\t]);\\r\\n\\t\\t\\t   \\t  \\t  \\tanimation.animate();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tscrollTarget.scrollTop = targetDimension;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.setNoDataMessage = function(message)\\r\\n\\t{\\r\\n\\t\\tif(message && message.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__noDataMessage = message;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.renderHeaderExtraRows = function()\\r\\n\\t{\\r\\n\\t\\tthis.__createHeaderExtraRows();\\r\\n\\t};\\r\\n\\t\\r\\n\\t//Editor related public functions\\r\\n\\t\\r\\n\\t/*\\r\\n\\t * for editType = cell \\r\\n\\t * combination can be this.editByIndex(cellIndex,rowIndex),this.editByIndex(rowIndex,dataField)\\r\\n\\t * \\r\\n\\t * for editType = row \\r\\n\\t * combination can be this.editByIndex(rowIndex)\\r\\n\\t * \\r\\n\\t */\\r\\n\\tNSGrid.prototype.editByIndex = function(index,dataField)\\r\\n\\t{\\r\\n\\t\\tif(this.util.isUndefinedOrNull(dataField))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsGridEditor.edit(index);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsGridEditor.edit(dataField,index);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t/*\\r\\n\\t * for editType = cell \\r\\n\\t * combination can be this.editByKeyField(keyFieldValue,dataField)\\r\\n\\t * \\r\\n\\t * for editType = row \\r\\n\\t * combination can be this.editByKeyField(keyFieldValue)\\r\\n\\t * \\r\\n\\t */\\r\\n\\tNSGrid.prototype.editByKeyField = function(keyFieldValue,dataField)\\r\\n\\t{\\r\\n\\t\\tvar item = this.__getItemBykeyField(keyFieldValue);\\r\\n\\t\\tvar rowIndex = this.__getIndexByItem(item);\\r\\n\\t\\tthis.editByIndex(rowIndex,dataField);\\r\\n\\t};\\r\\n\\t\\r\\n\\t/*\\r\\n\\t * for editType = cell \\r\\n\\t * combination can be this.editByItem(item,dataField)\\r\\n\\t * \\r\\n\\t * for editType = row \\r\\n\\t * combination can be this.editByItem(item)\\r\\n\\t * \\r\\n\\t */\\r\\n\\tNSGrid.prototype.editByItem = function(item,dataField)\\r\\n\\t{\\r\\n\\t\\tvar rowIndex = this.__getIndexByItem(item);\\r\\n\\t\\tthis.editByIndex(rowIndex,dataField);\\r\\n\\t};\\r\\n\\t\\r\\n\\t/*\\r\\n\\t * for editType = cell \\r\\n\\t * combination can be this.editStopByIndex(cellIndex,rowIndex,isCancel),this.editStopByIndex(rowIndex,dataField,isCancel)\\r\\n\\t * \\r\\n\\t * for editType = row \\r\\n\\t * combination can be this.editStopByIndex(rowIndex,null,isCancel)\\r\\n\\t * \\r\\n\\t */\\r\\n\\tNSGrid.prototype.editStopByIndex = function(index,dataField,isCancel)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tisCancel = Boolean.parse(isCancel);\\r\\n\\t\\tvar callLater = function(param1,param2)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCancel)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__nsGridEditor.cancelEdit(param1,param2);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__nsGridEditor.saveEdit(param1,param2);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tif(this.util.isUndefinedOrNull(dataField))\\r\\n\\t\\t{\\r\\n\\t\\t\\tcallLater(index);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tcallLater(dataField,index);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t/*\\r\\n\\t * for editType = cell \\r\\n\\t * combination can be this.editStopByKeyField(keyFieldValue,dataField,isCancel)\\r\\n\\t * \\r\\n\\t * for editType = row \\r\\n\\t * combination can be this.editStopByKeyField(keyFieldValue,null,isCancel)\\r\\n\\t * \\r\\n\\t */\\r\\n\\tNSGrid.prototype.editStopByKeyField = function(keyFieldValue,dataField,isCancel)\\r\\n\\t{\\r\\n\\t\\tvar item = this.__getItemBykeyField(keyFieldValue);\\r\\n\\t\\tvar rowIndex = this.__getIndexByItem(item);\\r\\n\\t\\tthis.editStopByIndex(rowIndex,dataField,isCancel);\\r\\n\\t};\\r\\n\\t\\r\\n\\t/*\\r\\n\\t * for editType = cell \\r\\n\\t * combination can be this.editStopByItem(item,dataField,isCancel)\\r\\n\\t * \\r\\n\\t * for editType = row \\r\\n\\t * combination can be this.editStopByItem(item,null,isCancel)\\r\\n\\t * \\r\\n\\t */\\r\\n\\tNSGrid.prototype.editStopByItem = function(item,dataField,isCancel)\\r\\n\\t{\\r\\n\\t\\tvar rowIndex = this.__getIndexByItem(item);\\r\\n\\t\\tthis.editStopByIndex(rowIndex,dataField,isCancel);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.getEditorInstances = function(element,dataField)\\r\\n\\t{\\r\\n\\t\\tif(this.__nsGridEditor)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(dataField))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn this.__nsGridEditor.getEditorInstances(element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGridEditor.getEditorInstances(dataField,element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.addItemsAsChildren = function(item,arrChildren)\\r\\n\\t{\\r\\n\\t\\tthis.__objGrid.addItemsAsChildren(item,arrChildren);\\r\\n\\t};\\r\\n\\t//end of editor related public functions\\r\\n\\t\\r\\n\\tNSGrid.prototype.removeComponent = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__scroller)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__scroller.remove();\\r\\n\\t\\t\\tthis.__scroller = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__contextMenu)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__contextMenu.remove();\\r\\n\\t\\t\\tthis.__contextMenu = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__exportMenu)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__exportMenu.remove();\\r\\n\\t\\t\\tthis.__exportMenu = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__bodyScrollRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(this.__getVerticalScrollableContainer(),\\\"scroll\\\",this.__bodyScrollRef);\\r\\n\\t\\t\\tthis.__bodyScrollRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__synchronizeTablesRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(this.__getHorizontalScrollableContainer(),\\\"scroll\\\",this.__synchronizeTablesRef);\\r\\n\\t\\t\\tthis.__synchronizeTablesRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__divCenterTableBodyMouseUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mouseup\\\",this.__divCenterTableBodyMouseUpRef);\\r\\n\\t\\t\\tthis.__divCenterTableBodyMouseUpRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__keyDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document.body,\\\"keydown\\\",this.__keyDownRef);\\r\\n\\t\\t\\tthis.__keyDownRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__keyUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document.body,\\\"keyup\\\",this.__keyUpRef);\\r\\n\\t\\t\\tthis.__keyUpRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__nsGridFilter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsGridFilter.remove();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__nsPopUpColumnSetting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsPopUpColumnSetting.remove();\\r\\n\\t\\t\\tthis.__nsPopUpColumnSetting = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__nsVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsVirtualScroll.destroy();\\r\\n\\t\\t\\tthis.__nsVirtualScroll = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__divOuterContainer && this.__divOuterContainer.parentElement) {\\r\\n\\t\\t\\tthis.__divOuterContainer.parentElement.removeChild(this.__divOuterContainer);\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setFields = function()\\r\\n\\t{\\r\\n\\t\\tvar id = this.getID();\\r\\n\\t\\tthis.__fieldPrefix = \\\"ns_field\\\";\\r\\n\\t\\tthis.__fieldIndex = this.__fieldPrefix + \\\"_row_index\\\" + id;\\r\\n\\t\\tthis.__fieldVisibleIndex = this.__fieldPrefix + \\\"_row_visible_index\\\" + id;\\r\\n\\t\\tthis.__fieldRow = this.__fieldPrefix + \\\"_row\\\" + id;\\r\\n\\t\\tthis.__fieldRowHtml = this.__fieldPrefix + \\\"_row\\\" + id;\\r\\n\\t\\tthis.__fieldRowLevel = this.__fieldPrefix + \\\"_row_level\\\" + id;\\r\\n\\t\\tthis.__fieldRowVisible = this.__fieldPrefix + \\\"_row_visible\\\" + id;\\r\\n\\t\\tthis.__fieldRowHover = this.__fieldPrefix + \\\"_row_hover\\\" + id;\\r\\n\\t\\tthis.__fieldParentIndex = this.__fieldPrefix + \\\"_parent_index\\\" + id;\\r\\n\\t\\tthis.__fieldHasChild = this.__fieldPrefix + \\\"_row_hasChild\\\" + id;\\r\\n\\t\\tthis.__fieldHasParent = this.__fieldPrefix + \\\"_row_hasParent\\\" + id;\\r\\n\\t\\tthis.__fieldIsCollapsed = this.__fieldPrefix + \\\"_row_isCollapsed\\\" + id;\\r\\n\\t\\tthis.__fieldRowArrow = this.__fieldPrefix + \\\"row_arrow\\\" + id;\\r\\n\\t\\tthis.__fieldCellText = this.__fieldPrefix + \\\"cell_text\\\" + id;\\r\\n\\t\\tthis.__fieldSelected = this.__fieldPrefix + \\\"_selected\\\" + id;\\r\\n\\t\\tthis.__fieldColIndex = this.__fieldPrefix + \\\"_col_index\\\" + id;\\r\\n\\t\\tthis.__fieldColSortedAsc = this.__fieldPrefix + \\\"_col_sorted_asc\\\" + id;\\r\\n\\t\\tthis.__fieldColVisible = this.__fieldPrefix + \\\"_col_visible\\\" + id;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__processColumnObject = function(objColumn,index)\\r\\n\\t{\\r\\n\\t\\tif(objColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tobjColumn[this.__fieldColIndex] = index;\\r\\n\\t\\t\\tif(objColumn.hasOwnProperty(\\\"width\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar widthUnit = this.util.getDimensionUnit(objColumn[\\\"width\\\"]);\\r\\n\\t\\t\\t\\tif(widthUnit === 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjColumn[\\\"width\\\"] = objColumn[\\\"width\\\"] + \\\"px\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__columnSortable)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"sortable\\\"] = this.util.isUndefinedOrNull(objColumn[\\\"sortable\\\"]) ? true : Boolean.parse(objColumn[\\\"sortable\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tobjColumn[\\\"sortDescending\\\"] = Boolean.parse(objColumn[\\\"sortDescending\\\"]);\\r\\n\\t\\t\\tobjColumn[\\\"truncateToFit\\\"] = Boolean.parse(objColumn[\\\"truncateToFit\\\"]);\\r\\n\\t\\t\\tobjColumn[\\\"headerTruncateToFit\\\"] = Boolean.parse(objColumn[\\\"headerTruncateToFit\\\"]);\\r\\n\\t\\t\\tobjColumn[\\\"sortField\\\"] = objColumn[\\\"sortField\\\"] ? objColumn[\\\"sortField\\\"] :  objColumn[\\\"dataField\\\"];\\r\\n\\t\\t\\tif(this.__columnResizable)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(objColumn.hasOwnProperty(\\\"resizable\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjColumn[\\\"resizable\\\"] = Boolean.parse(objColumn[\\\"resizable\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjColumn[\\\"resizable\\\"] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"resizable\\\"] = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__columnDraggable)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(objColumn.hasOwnProperty(\\\"draggable\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjColumn[\\\"draggable\\\"] = Boolean.parse(objColumn[\\\"draggable\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjColumn[\\\"draggable\\\"] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"draggable\\\"] = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__columnAutoSize && objColumn[\\\"resizable\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(objColumn.hasOwnProperty(\\\"autoSize\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjColumn[\\\"autoSize\\\"] = Boolean.parse(objColumn[\\\"autoSize\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjColumn[\\\"autoSize\\\"] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"autoSize\\\"] = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(objColumn.hasOwnProperty(\\\"showMenu\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"showMenu\\\"] = Boolean.parse(objColumn[\\\"showMenu\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"showMenu\\\"] = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(objColumn.hasOwnProperty(\\\"minWidth\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"minWidth\\\"] = this.util.getDimensionAsNumber(null,objColumn[\\\"minWidth\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"minWidth\\\"] = this.__columnMinWidth;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(objColumn.hasOwnProperty(\\\"groupRenderer\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"groupRenderer\\\"] = this.util.getFunction(objColumn[\\\"groupRenderer\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//itemRendrer property gets precedence over template\\r\\n\\t\\t\\tif(objColumn.hasOwnProperty(\\\"itemRenderer\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"itemRenderer\\\"] = this.util.getFunction(objColumn[\\\"itemRenderer\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(objColumn.hasOwnProperty(\\\"template\\\") && objColumn[\\\"template\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//setData should be before template for checking\\r\\n\\t\\t\\t\\tif(objColumn.hasOwnProperty(\\\"setData\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjColumn[\\\"setData\\\"] = this.util.getFunction(objColumn[\\\"setData\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tobjColumn.templateRenderer = this.util.getTemplate(objColumn[\\\"template\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(objColumn.hasOwnProperty(\\\"labelFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"labelFunction\\\"] = this.util.getFunction(objColumn[\\\"labelFunction\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(objColumn.hasOwnProperty(\\\"headerRenderer\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"headerRenderer\\\"] = this.util.getFunction(objColumn[\\\"headerRenderer\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(objColumn.hasOwnProperty(\\\"headerTemplate\\\") && objColumn[\\\"headerTemplate\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn.headerTemplate = this.util.getTemplate(objColumn[\\\"headerTemplate\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!objColumn.hasOwnProperty(\\\"toolTipField\\\") && objColumn.hasOwnProperty(\\\"toolTipRenderer\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"toolTipRenderer\\\"] = this.util.getFunction(objColumn[\\\"toolTipRenderer\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(objColumn.hasOwnProperty(\\\"extraRowHeaderRenderer\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"extraRowHeaderRenderer\\\"] = this.util.getFunction(objColumn[\\\"extraRowHeaderRenderer\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(objColumn.hasOwnProperty(\\\"footerRenderer\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"footerRenderer\\\"] = this.util.getFunction(objColumn[\\\"footerRenderer\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(objColumn.hasOwnProperty(\\\"exportGetBodyTextFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"exportGetBodyTextFunction\\\"] = this.util.getFunction(objColumn[\\\"exportGetBodyTextFunction\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(objColumn.hasOwnProperty(\\\"exportGetFooterTextFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"exportGetFooterTextFunction\\\"] = this.util.getFunction(objColumn[\\\"exportGetFooterTextFunction\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(objColumn.hasOwnProperty(\\\"excelStyleHeaderFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"excelStyleHeaderFunction\\\"] = this.util.getFunction(objColumn[\\\"excelStyleHeaderFunction\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(objColumn.hasOwnProperty(\\\"excelStyleBodyFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"excelStyleBodyFunction\\\"] = this.util.getFunction(objColumn[\\\"excelStyleBodyFunction\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(objColumn.hasOwnProperty(\\\"excelStyleFooterFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"excelStyleFooterFunction\\\"] = this.util.getFunction(objColumn[\\\"excelStyleFooterFunction\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__isResponsiveModeColumnToggle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!objColumn.hasOwnProperty(\\\"priority\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjColumn.priority = 6;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tobjColumn.priority = parseInt(objColumn.priority);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar isColumnFixed = this.__isColumnFixed(index);\\r\\n\\t\\t\\tif(!isColumnFixed)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(objColumn.hasOwnProperty(\\\"hideable\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjColumn[\\\"hideable\\\"] = Boolean.parse(objColumn[\\\"hideable\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjColumn[\\\"hideable\\\"] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn[\\\"hideable\\\"] = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__processIconsInColumn(objColumn);\\r\\n\\t\\t\\tthis.__nsGridFilter.processColumnObject(objColumn);\\r\\n\\t\\t\\tthis.__nsGridEditor.processColumnObject(objColumn);\\r\\n\\t\\t}\\r\\n\\t\\treturn objColumn;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__processPinnedColumn = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__orignalColumns && this.__orignalColumns.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < this.__leftFixedColumn;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__orignalColumns[count].pinned = \\\"left\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(var count = this.__orignalColumns.length - 1,colCount = 0;count > -1 && colCount < this.__rightFixedColumn;count--,colCount++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__orignalColumns[count].pinned = \\\"right\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar arrLeft = [];\\r\\n\\t\\t\\tvar arrCenter = [];\\r\\n\\t\\t\\tvar arrRight = [];\\r\\n\\t\\t\\tfor(var count = 0;count < this.__orignalColumns.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__orignalColumns[count].pinned)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__orignalColumns[count].pinned == \\\"left\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrLeft.push(this.__orignalColumns[count]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if(this.__orignalColumns[count].pinned == \\\"right\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrRight.push(this.__orignalColumns[count]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrCenter.push(this.__orignalColumns[count]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrCenter.push(this.__orignalColumns[count]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__orignalColumns = arrLeft.concat(arrCenter).concat(arrRight); \\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__updateFixedColCounts = function()\\r\\n\\t{\\r\\n\\t\\tthis.__leftFixedColumn = 0;\\r\\n\\t\\tthis.__rightFixedColumn = 0;\\r\\n\\t\\tfor(var count = 0;count < this.__columns.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__columns[count].pinned)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__columns[count].pinned == \\\"left\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__leftFixedColumn++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(this.__columns[count].pinned == \\\"right\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__rightFixedColumn++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__processIconsInColumn = function(objColumn)\\r\\n\\t{\\r\\n\\t\\tif(objColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar itemIcons = objColumn[\\\"icons\\\"];\\r\\n\\t\\t\\tvar icons = null;\\r\\n\\t\\t\\tif(itemIcons)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ticons = {};\\r\\n\\t\\t\\t\\ticons.menu = itemIcons[\\\"menu\\\"] || this.__icons[\\\"menu\\\"];\\r\\n\\t\\t\\t\\ticons.filter = itemIcons[\\\"filter\\\"] || this.__icons[\\\"filter\\\"];\\r\\n\\t\\t\\t\\ticons.sortAscending = itemIcons[\\\"sortAscending\\\"] || this.__icons[\\\"sortAscending\\\"];\\r\\n\\t\\t\\t\\ticons.sortDescending = itemIcons[\\\"sortDescending\\\"] || this.__icons[\\\"sortDescending\\\"];\\r\\n\\t\\t\\t\\ticons.columnMove = itemIcons[\\\"columnMove\\\"] || this.__icons[\\\"columnMove\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__icons)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ticons = this.util.cloneObject(this.__icons,true);\\r\\n\\t\\t\\t\\tdelete icons.exportButton;\\r\\n\\t\\t\\t\\tdelete icons.rowExpanded;\\r\\n\\t\\t\\t\\tdelete icons.rowCollapsed;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(icons)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn.icons = icons;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__isColumnExist = function(dataField)\\r\\n\\t{\\r\\n\\t\\tif(dataField && this.__columns && this.__columns.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0; count < this.__columns.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objColumn = this.__columns[count];\\r\\n\\t\\t\\t\\tif(objColumn[\\\"dataField\\\"] == dataField)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createStructure = function()\\r\\n\\t{\\r\\n\\t\\tvar divOuterContainer = this.__createOuterContainer();\\r\\n\\t\\tvar divTitleBar = this.__createTitleBar(divOuterContainer);\\r\\n\\t\\tthis.__createTableStructure(divOuterContainer);\\r\\n\\t\\tif(divTitleBar && this.__title && this.__title.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar spanTitle = divTitleBar.firstChild;\\r\\n\\t\\t\\tvar body = document.body || document.getElementsByTagName('body')[0];\\r\\n\\t\\t\\tvar bodyPaddingLeft = this.util.getDimensionAsNumber(body,this.util.getStyleValue(body,\\\"padding-left\\\"));\\r\\n\\t\\t\\tvar bodyPaddingTop = this.util.getDimensionAsNumber(body,this.util.getStyleValue(body,\\\"padding-top\\\"));\\r\\n\\t\\t\\tvar bodyMarginLeft = this.util.getDimensionAsNumber(body,this.util.getStyleValue(body,\\\"margin-left\\\"));\\r\\n\\t\\t\\tvar bodyMarginTop = this.util.getDimensionAsNumber(body,this.util.getStyleValue(body,\\\"margin-top\\\"));\\r\\n\\t\\t\\tvar paddingLeft = this.util.getDimensionAsNumber(this.__baseComponent,this.util.getStyleValue(this.__baseComponent,\\\"padding-left\\\"));\\r\\n\\t\\t\\tvar paddingTop = this.util.getDimensionAsNumber(this.__baseComponent,this.util.getStyleValue(this.__baseComponent,\\\"padding-top\\\"));\\r\\n\\t\\t\\tvar marginLeft = this.util.getDimensionAsNumber(this.__baseComponent,this.util.getStyleValue(this.__baseComponent,\\\"margin-left\\\"));\\r\\n\\t\\t\\tvar marginTop = this.util.getDimensionAsNumber(this.__baseComponent,this.util.getStyleValue(this.__baseComponent,\\\"margin-top\\\"));\\r\\n\\t\\t\\tvar setting = {offsetX:(-1 * (bodyPaddingLeft + bodyMarginLeft + paddingLeft + marginLeft)),offsetY:(-1 * (bodyPaddingTop + bodyMarginTop + paddingTop + marginTop))};\\r\\n\\t\\t\\tthis.util.addAnimatedLineOnHover(spanTitle,setting);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__createCustomScroller();\\r\\n\\t\\tthis.__createScrollTip();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createOuterContainer = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__divOuterContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.removeComponent();\\r\\n\\t\\t\\tthis.__divOuterContainer = null;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__divOuterContainer = this.util.createDiv(this.getID() + this.__OUTER_CONTAINER_ID,\\\"nsDataGridContainer\\\");\\r\\n\\t\\tthis.__applyTheme(this.__divOuterContainer,\\\"nsDataGridContainer\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__divOuterContainer,\\\"outerContainer\\\");\\r\\n\\t\\tthis.__setOuterContainerMeasurement();\\r\\n\\t\\tthis.addChild(this.__divOuterContainer);\\r\\n\\t\\treturn this.__divOuterContainer;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setOuterContainerMeasurement = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__divOuterContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar width = this.util.getStyleValue(this.__baseComponent,\\\"width\\\");\\r\\n\\t\\t\\tvar height = this.util.getStyleValue(this.__baseComponent,\\\"height\\\");\\r\\n\\t\\t\\tvar rectBase = this.__baseComponent.getBoundingClientRect();\\r\\n\\t\\t\\tif(rectBase.width > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\twidth = rectBase.width + \\\"px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(rectBase.height > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\theight = rectBase.height + \\\"px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__divOuterContainer.style.width = width;\\r\\n\\t\\t\\tthis.__divOuterContainer.style.height = height;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createTitleBar= function(parentElement)\\r\\n\\t{\\r\\n\\t\\tif(parentElement && ((this.__title && this.__title.length > 0) || this.__enableExport || this.__enableColumnSetting))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar divTitleBar = this.util.createDiv(this.getID() + this.__TITLE_CONTAINER_ID,this.__CLASS_TITLEBAR);\\r\\n\\t\\t\\tthis.util.addStyleClass(divTitleBar,\\\"nsDataGridTitleBarTheme\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(divTitleBar,\\\"titleBar\\\");\\r\\n\\t\\t\\tif(this.__title && this.__title.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar spanTitle = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\tvar titleText = document.createTextNode(this.__title);\\r\\n\\t\\t\\t\\tspanTitle.appendChild(titleText);\\r\\n\\t\\t\\t\\tdivTitleBar.appendChild(spanTitle);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar spanRight = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\tspanRight.style.float = \\\"right\\\";\\r\\n\\t\\t\\tdivTitleBar.appendChild(spanRight);\\r\\n\\t\\t\\tif(this.__enableColumnSetting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar spanExport = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\tspanExport.style.cursor = \\\"pointer\\\";\\r\\n\\t\\t\\t\\tif(this.__icons.columnSetting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tspanExport.innerHTML = this.__icons.columnSetting;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\t\\t\\tvar exportID = new NSSvgShapes().__COLUMNSETTING_ICON_ID;\\r\\n\\t\\t\\t\\t\\tvar svg = objSVG.addSVG(spanExport,exportID + \\\"exportsvg\\\",\\\"nsColumnSetting\\\");\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(svg,\\\"nsColumnSettingTheme\\\");\\r\\n\\t\\t\\t\\t\\tobjSVG.addUse(svg,exportID + \\\"use\\\",null,\\\"#\\\" + exportID);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tspanRight.appendChild(spanExport);\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tthis.util.addEvent(spanExport,\\\"click\\\",function(event){\\r\\n\\t\\t\\t\\t\\tself.__createColumnSettingUI.call(self,spanExport,event);\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableExport)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar spanExport = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\tspanExport.style.paddingLeft = \\\"5px\\\";\\r\\n\\t\\t\\t\\tspanExport.style.cursor = \\\"pointer\\\";\\r\\n\\t\\t\\t\\tif(this.__icons.exportButton)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tspanExport.innerHTML = this.__icons.exportButton;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\t\\t\\tvar exportID = new NSSvgShapes().__EXPORT_ICON_ID;\\r\\n\\t\\t\\t\\t\\tvar svg = objSVG.addSVG(spanExport,exportID + \\\"exportsvg\\\",\\\"nsExportIcon\\\");\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(svg,\\\"nsExportIconTheme\\\");\\r\\n\\t\\t\\t\\t\\tobjSVG.addUse(svg,exportID + \\\"use\\\",null,\\\"#\\\" + exportID);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tspanRight.appendChild(spanExport);\\r\\n\\t\\t\\t\\tif(!this.__exportMenu)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar exportMenuSetting = {parent:spanExport,dataSource:this.__exportMenuDataSource,isContextMenu:false,createRunTime:false,eventType:\\\"click\\\",defaultHandler:this.__exportHandler.bind(this),\\r\\n\\t\\t\\t\\t\\t\\t\\tposition:this.util.POS_BOTTOMLEFT};\\r\\n\\t\\t\\t\\t\\tthis.__exportMenu = new NSMenu(exportMenuSetting);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tparentElement.appendChild(divTitleBar);\\r\\n\\t\\t\\treturn divTitleBar;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createColumnSettingUI = function(parentElement,event)\\r\\n\\t{\\r\\n\\t\\tif(!this.__nsPopUpColumnSetting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar itemRenderer = function(item,labelField,fieldIndex,isDisabled,listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar divRenderer = self.util.createElement(\\\"span\\\",null,\\\"nsFilterListRenderer\\\");\\r\\n\\t\\t\\t\\t\\tvar label = self.util.createElement(\\\"label\\\");\\r\\n\\t\\t\\t\\t\\tvar checkBox = self.util.createElement(\\\"input\\\",null,\\\"nsFilterListRendererCheckBox\\\");\\r\\n\\t\\t\\t\\t\\tcheckBox.setAttribute(\\\"type\\\",\\\"checkbox\\\");\\r\\n\\t\\t\\t\\t\\tvar visible = item[this.__fieldColVisible];\\r\\n\\t\\t\\t\\t\\tif(self.util.isUndefinedOrNull(visible))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvisible = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tcheckBox.checked = visible;\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(checkBox,\\\"click\\\",checkBoxClickHandler.bind(self,item));\\r\\n\\t\\t\\t\\t\\tlabel.style.fontWeight = \\\"400\\\";\\r\\n\\t\\t\\t\\t\\tlabel.style.cursor = \\\"pointer\\\";\\r\\n\\t\\t\\t\\t\\tcheckBox.style.marginRight = \\\"5px\\\";\\r\\n\\t\\t\\t\\t\\tlabel.appendChild(checkBox);\\r\\n\\t\\t\\t\\t\\tlabel.appendChild(document.createTextNode(item[\\\"headerText\\\"] || item[\\\"dataField\\\"]));\\r\\n\\t\\t\\t\\t\\tdivRenderer.appendChild(label);\\r\\n\\t\\t\\t\\t\\treturn divRenderer;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar checkBoxClickHandler = function(item,event)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar target = self.util.getTarget(event);\\r\\n\\t\\t\\t\\tvar checked = target.checked;\\r\\n\\t\\t\\t\\tvar index = this.__getColumnIndexByObject(item);\\r\\n\\t\\t\\t\\tvar counter = 0;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrSource.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(self.util.isUndefinedOrNull(arrSource[count][this.__fieldColVisible]) || arrSource[count][this.__fieldColVisible])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcounter++;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar strMsg = \\\"Atleast 1 Column should be selected in Column Configuration\\\";\\r\\n\\t\\t\\t\\tif(counter == 1 && !checked)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttarget.checked = !checked;\\r\\n\\t\\t\\t\\t\\tconsole.log(strMsg);\\r\\n\\t\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem[this.__fieldColVisible] = checked;\\r\\n\\t\\t\\t\\tthis.__setColumnVisibility(index,checked,item);\\r\\n\\t\\t\\t\\t//if(checked)\\r\\n\\t\\t\\t\\t//{\\r\\n\\t\\t\\t\\t\\tself.__alignTables(true);\\r\\n\\t\\t\\t\\t\\tself.__addStyleForFixedColumns();\\r\\n\\t\\t\\t\\t\\t//self.__setFixedCellsPosition();\\r\\n\\t\\t\\t\\t//}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar popUpSetting = {id:this.getID() + \\\"columnSettingContainer\\\",type:\\\"div\\\",width:275,position:this.util.POS_BOTTOMLEFT,closeOnOutsideClick:true,hideOrRemoveOnOutsideClick:\\\"hide\\\",closeRequired:true};\\r\\n\\t\\t\\tthis.__nsPopUpColumnSetting = new this.util.nsPopUp(popUpSetting);\\r\\n\\t\\t\\tthis.__nsPopUpColumnSetting.create();\\r\\n\\t\\t\\tvar popUp = this.__nsPopUpColumnSetting.getPopUp();\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.util.addEvent(popUp,\\\"click\\\",function(event){\\r\\n\\t\\t\\t\\tevent = self.util.getEvent(event);\\r\\n\\t\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t\\t});\\r\\n\\t\\t\\tvar divList = this.util.createDiv();\\r\\n\\t\\t\\tvar lstColumn = this.util.createElement(\\\"div\\\",null,\\\"nsFilterList\\\");\\r\\n\\t\\t\\tlstColumn.style.height = \\\"300px\\\";\\r\\n\\t\\t\\tdivList.appendChild(lstColumn);\\r\\n\\t\\t\\tpopUp.appendChild(divList);\\r\\n\\t\\t\\tvar arrSource = this.__getColumnSettingSource();\\r\\n\\t\\t\\tvar setting = {labelField:\\\"label\\\",enableVirtualScroll:false,enableDragDrop:false,enableDragByHandle:false,enableMultipleSelection:true,enableKeyboardNavigation:false,\\r\\n\\t\\t\\t\\t\\t   customScrollerRequired:false,enableMouseHover:true,enableMouseHoverAnimation:false,itemRenderer:itemRenderer.bind(this)};\\r\\n\\t\\t\\tsetting[\\\"dataSource\\\"] = arrSource;\\r\\n\\t\\t\\tvar objNSList = new NSList(lstColumn,setting);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__nsPopUpColumnSetting.show();\\r\\n\\t\\tthis.__nsPopUpColumnSetting.placePopUp(event);\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getColumnSettingSource = function()\\r\\n\\t{\\r\\n\\t\\tvar arrSource = [];\\r\\n\\t\\tfor(var count = 0;count < this.__columns.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objColumn = this.__columns[count];\\r\\n\\t\\t\\tif(objColumn[\\\"hideable\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrSource.push(objColumn);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn arrSource;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createTableStructure= function(parentElement)\\r\\n\\t{\\r\\n\\t\\tif(parentElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divTableWrapper = this.util.createDiv(this.getID() + \\\"TableWrapper\\\",\\\"nsTableWrapper\\\");\\r\\n\\t\\t\\tparentElement.appendChild(this.__divTableWrapper);\\r\\n\\t\\t\\tthis.__divTableHeaderContainerWrapper = this.util.createDiv(this.getID() + this.__TABLE_HEADER_CONTAINER_WRAPPER_ID,\\\"nsGridHeaderContainer\\\");\\r\\n\\t\\t\\tthis.__divTableWrapper.appendChild(this.__divTableHeaderContainerWrapper);\\r\\n\\t\\t\\tthis.__divTableBodyContainerWrapper = this.util.createDiv(this.getID() + this.__TABLE_BODY_CONTAINER_WRAPPER_ID,\\\"nsGridBodyContainer\\\");\\r\\n\\t\\t\\tthis.__divTableWrapper.appendChild(this.__divTableBodyContainerWrapper);\\r\\n\\t\\t\\tthis.__divTableFooterContainerWrapper = this.util.createDiv(this.getID() + this.__TABLE_FOOTER_CONTAINER_WRAPPER_ID,\\\"nsGridFooterContainer\\\");\\r\\n\\t\\t\\tthis.__divTableWrapper.appendChild(this.__divTableFooterContainerWrapper);\\r\\n\\t\\t\\tthis.__createHeader();\\r\\n\\t\\t\\tthis.__createBody();\\r\\n\\t\\t\\tthis.__createFooter();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createPaginationControl= function(parentElement)\\r\\n\\t{\\r\\n\\t\\tif(parentElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__divPagination)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(this.__divPagination);\\r\\n\\t\\t\\t\\tthis.__divPagination.parentElement.removeChild(this.__divPagination);\\r\\n\\t\\t\\t\\tthis.__divPagination = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__divPagination = this.util.createDiv(this.getID() + this.__PAGINATION_CONTROL_ID,\\\"nsGridPagination\\\");\\r\\n\\t\\t\\tparentElement.appendChild(this.__divPagination);\\r\\n\\t\\t\\tvar setting = {\\r\\n\\t\\t\\t\\t\\tparent:this.__divPagination,\\r\\n\\t\\t\\t\\t\\ttotalRecords : this.__totalRecords,\\r\\n\\t\\t\\t\\t\\tpageSize : this.__pageSize,\\r\\n\\t\\t\\t\\t\\t//containerStyle:\\\"pagination\\\",\\r\\n\\t\\t\\t\\t\\t//activeStyle:\\\"active\\\",\\r\\n\\t\\t\\t\\t\\t//disabledStyle:\\\"disabled\\\",\\r\\n\\t\\t\\t\\t\\ttextFirst:\\\"Home\\\",\\r\\n\\t\\t\\t\\t\\ttextLast:\\\"Last\\\",\\r\\n\\t\\t\\t\\t\\ttextPrev:\\\"Prev\\\",\\r\\n\\t\\t\\t\\t\\ttextNext:\\\"Next\\\",\\r\\n\\t\\t\\t\\t\\tshowFirstLast:true\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tthis.__nsPagination = new NSPagination(setting);\\r\\n\\t\\t\\tthis.__nsPagination.util.addEvent(this.__divPagination,this.__nsPagination.PAGE_CHANGE,this.__pageChangeHandler.bind(this));\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__pageChangeHandler= function(event)\\r\\n\\t{\\r\\n\\t\\tif(!event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = {oldIndex:0,newIndex:1,fromRecord:0,toRecord:this.__pageSize - 1};\\r\\n\\t\\t}\\r\\n\\t\\tconsole.log(\\\"OldPage::\\\" + event.oldIndex + \\\",NewPage::\\\" + event.newIndex);\\r\\n\\t\\tif(this.__paginationFetchRecordCallBack && this.__totalRecords > event.fromRecord)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__paginationFetchRecordCallBack(event.fromRecord,event.toRecord,this.__pageSize);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t/******************************Header Creation *************************************/\\r\\n\\tNSGrid.prototype.__createHeader = function()\\r\\n\\t{\\r\\n\\t\\tthis.__divCenterTableHeaderContainer = this.__createHeaderContainer(this.__divTableHeaderContainerWrapper,this.__divCenterTableHeaderContainer,this.getID() + this.__TABLE_CENTER_HEADER_CONTAINER_ID,this.getID() + this.__TABLE_CENTER_HEADER_ID);\\r\\n\\t\\tthis.__tblCenterHeader = this.__divCenterTableHeaderContainer.firstChild;\\r\\n\\t\\tvar divHeaderCorner = this.util.createDiv(null,\\\"nsHeaderBarCorner\\\");\\r\\n\\t\\tthis.__divTableHeaderContainerWrapper.appendChild(divHeaderCorner);\\r\\n\\t\\tthis.__createHeaderRows();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createHeaderContainer= function(tableContainer,headerContainer,containerID,tableID)\\r\\n\\t{\\r\\n\\t\\tif(headerContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\theaderContainer.parentNode.removeChild(headerContainer);\\r\\n\\t\\t}\\r\\n\\t\\theaderContainer = this.__createTableAndParent(containerID,\\\"nsDataGridHeaderContainer\\\",tableID);\\r\\n\\t\\ttableContainer.appendChild(headerContainer);\\r\\n\\t\\treturn headerContainer;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createHeaderRows= function()\\r\\n\\t{\\r\\n\\t\\tif(this.__tblCenterHeader && this.__columns && this.__columns.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar header = this.__tblCenterHeader.createTHead();\\r\\n\\t\\t\\tvar headerRow = header.insertRow(-1);\\r\\n\\t\\t    headerRow.style.height = \\\"auto\\\";\\r\\n\\t\\t    this.__tblCenterHeaderBody = document.createElement(\\\"tbody\\\");\\r\\n\\t\\t\\tthis.__tblCenterHeader.appendChild(this.__tblCenterHeaderBody);\\r\\n\\t\\t    var bodyRow = this.__tblCenterHeaderBody.insertRow(-1);\\r\\n\\t\\t    this.util.addStyleClass(bodyRow,\\\"nsGridHeaderRow\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(bodyRow,\\\"headerRow\\\");\\r\\n\\t\\t    var rendererRow = this.__tblCenterHeaderBody.insertRow(-1);\\r\\n\\t\\t    this.util.addStyleClass(rendererRow,\\\"nsGridFilterRow\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(rendererRow,\\\"filterRow\\\");\\r\\n\\t\\t    for (var colIndex = 0; colIndex < this.__columns.length; colIndex++)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar colItem = this.__columns[colIndex];\\r\\n\\t\\t    \\tthis.__createHeaderColGroup(colItem);\\r\\n\\t\\t        this.__createHeaderHeaderCell(colItem,headerRow);\\r\\n\\t\\t        this.__createHeaderBodyCell(colItem,bodyRow,rendererRow,colIndex);\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createHeaderExtraRows = function()\\r\\n\\t{\\r\\n\\t\\tvar headerBodyRow = this.__getHeaderBodyRow(this.__tblCenterHeader);\\r\\n\\t\\tif(this.__headerExtraRowCount > 0 && headerBodyRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrExtraRow = this.__getHeaderExtraRow(this.__tblCenterHeader);\\r\\n\\t\\t\\tif(arrExtraRow && arrExtraRow.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (var rowIndex = arrExtraRow.length - 1; rowIndex > -1; rowIndex--)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\tthis.__tblCenterHeader.deleteRow(arrExtraRow[rowIndex].rowIndex);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor (var rowIndex = 0; rowIndex < this.__headerExtraRowCount; rowIndex++)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar extraRow = this.__tblCenterHeaderBody.insertRow(-1);\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(extraRow,\\\"nsHeaderExtraRow\\\");\\r\\n\\t\\t\\t\\tthis.__applyCustomClass(extraRow,\\\"extraHeaderRow\\\");\\r\\n\\t\\t\\t\\tthis.__applyCustomClass(extraRow,\\\"extraHeaderRow\\\" + rowIndex);\\r\\n\\t\\t\\t\\tfor (var colIndex = 0; colIndex < this.__columns.length; colIndex++)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\tthis.__createHeaderExtraCell(this.__columns[colIndex],extraRow,rowIndex,colIndex);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createHeaderColGroup = function(colItem)\\r\\n\\t{\\r\\n\\t\\tif(colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar colgroup = document.createElement(\\\"colgroup\\\");\\r\\n\\t\\t\\tcolgroup.setAttribute(\\\"id\\\",this.getID() + \\\"HeaderColGroup\\\" + colItem.dataField);\\r\\n\\t\\t\\tthis.util.addStyleClass(colgroup,\\\"nsGridColGroup\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(colgroup,\\\"nsGridColGroupHeader\\\");\\r\\n\\t\\t\\tthis.__tblCenterHeader.appendChild(colgroup);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createHeaderHeaderCell = function(colItem,headerRow)\\r\\n\\t{\\r\\n\\t\\tif(colItem && headerRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar headerCell = headerRow.insertCell(-1);\\r\\n\\t\\t\\tthis.util.addStyleClass(headerCell,\\\"nsGridCell\\\");\\r\\n\\t\\t\\theaderCell.style.padding = \\\"0px\\\"; \\r\\n\\t\\t\\theaderCell.style.width = colItem[\\\"width\\\"]; \\r\\n\\t\\t\\tthis.__addPriorityClassInCell(headerCell,colItem);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createHeaderExtraCell = function(colItem,extraHeaderRow,rowIndex,colIndex)\\r\\n\\t{\\r\\n\\t\\tif(colItem && extraHeaderRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar extraHeaderCell = extraHeaderRow.insertCell(-1);\\r\\n\\t\\t\\tvar colID = this.getID() + \\\"colExtra\\\" + colItem[\\\"dataField\\\"] + rowIndex + colIndex;\\r\\n\\t\\t\\textraHeaderCell.setAttribute(\\\"id\\\",colID);\\r\\n\\t\\t\\tthis.util.addStyleClass(extraHeaderCell,\\\"nsGridCell\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(extraHeaderCell,\\\"nsDataGridHeaderRenderer\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(extraHeaderCell,\\\"nsDataGridHeaderRendererTheme\\\");\\r\\n\\t\\t\\tthis.__addStyleForFixedCell(extraHeaderCell,colIndex);\\r\\n\\t\\t\\t//this.__nsGridFilter.addFilterRenderer(rendererRow,rendererCell,colItem,index,colID);\\r\\n\\t\\t\\tthis.__addPriorityClassInCell(extraHeaderCell,colItem);\\r\\n\\t\\t\\tvar divHeaderRendererContainer = this.util.createDiv(null); \\r\\n\\t\\t\\textraHeaderCell.appendChild(divHeaderRendererContainer);\\r\\n\\t\\t\\tvar itemRenderer = colItem[\\\"extraRowHeaderRenderer\\\"];\\r\\n\\t\\t\\tif(itemRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objRenderer = itemRenderer(colItem[\\\"dataField\\\"],colItem,this.__arrFilteredGroupedSource,rowIndex,colIndex,extraHeaderCell,extraHeaderRow);\\r\\n\\t\\t\\t\\tvar callback = function(objRenderer)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(objRenderer)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(this.util.isString(objRenderer))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar compSpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\tcompSpan.innerHTML = objRenderer;\\r\\n\\t\\t\\t\\t\\t\\t\\tdivHeaderRendererContainer.appendChild(compSpan);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdivHeaderRendererContainer.appendChild(objRenderer);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.util.resolveFunctionOrPromise(objRenderer,callback.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createHeaderBodyCell = function(colItem,bodyRow,rendererRow,index)\\r\\n\\t{\\r\\n\\t\\tif(colItem && bodyRow && rendererRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar bodyCell = bodyRow.insertCell(-1);\\r\\n\\t\\t\\tvar colID = this.getID() + \\\"ColHeader\\\" + colItem[\\\"dataField\\\"];\\r\\n\\t\\t\\tbodyCell.setAttribute(\\\"id\\\",colID);\\r\\n\\t\\t\\tthis.util.addStyleClass(bodyCell , \\\"nsGridCell\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(bodyCell , this.__CLASS_TABLE_HEADER_CELL);\\r\\n\\t\\t\\tthis.util.addStyleClass(bodyCell , \\\"nsDataGridHeaderTheme\\\");\\r\\n\\t\\t\\tthis.__addStyleForFixedCell(bodyCell,index);\\r\\n\\t\\t\\tthis.__applyCustomClass(bodyCell,\\\"headerCell\\\");\\r\\n\\t\\t\\tbodyCell.setAttribute(\\\"orignalColumnIndex\\\",index);\\r\\n\\t\\t    bodyCell.setAttribute(\\\"currentColumnIndex\\\",index);\\r\\n\\t\\t    \\r\\n\\t        this.util.addEvent(bodyCell,\\\"click\\\",this.__headerClickHandler.bind(this));\\r\\n\\t        this.util.addEvent(bodyCell,\\\"mouseover\\\",this.__headerMouseOverHandler.bind(this));\\r\\n\\t        this.util.addEvent(bodyCell,\\\"mouseout\\\",this.__headerMouseOutHandler.bind(this));\\r\\n\\t        this.util.addEvent(bodyCell,\\\"mousedown\\\",this.__headerMouseDownHandler.bind(this));\\r\\n\\t        \\r\\n\\t        var divCell = this.util.createDiv(colID + \\\"container\\\",\\\"nsDataGridHeaderCellContainer\\\"); \\r\\n\\t        bodyCell.appendChild(divCell);\\r\\n\\t        if(colItem[\\\"draggable\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t        \\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(bodyCell , this.__CLASS_TABLE_HEADER_DROPPABLE_CELL);\\r\\n\\t\\t\\t\\tvar divMove = this.util.createDiv(colID + \\\"move\\\",\\\"nsHeaderMove\\\");\\r\\n\\t\\t\\t\\tif(this.__getColumnCustomIcon(colItem,\\\"columnMove\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdivMove.innerHTML = this.__getColumnCustomIcon(colItem,\\\"columnMove\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar iconID = new NSSvgShapes().__MOVE_ICON_ID;\\r\\n\\t\\t\\t\\t\\tvar svg = objSVG.addSVG(divMove,divMove.id + iconID + \\\"svg\\\",\\\"nsMoveIcon\\\",null,null,null,null,null,null,false);\\r\\n\\t\\t\\t\\t\\tobjSVG.addUse(svg,divMove.id + \\\"use\\\",null,\\\"#\\\" + iconID);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tdivCell.appendChild(divMove);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar divText = this.util.createDiv(colID + \\\"text\\\");\\r\\n\\t\\t\\tdivCell.appendChild(divText);\\r\\n\\t\\t\\tthis.__addHeaderRenderer(divText,colItem,index);\\r\\n\\t\\t\\tif(colItem.hasOwnProperty(\\\"sortable\\\") && colItem[\\\"sortable\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar divSorting = this.util.createDiv(colID + \\\"SortContainer\\\",\\\"nsGridSortContainer\\\");\\r\\n\\t\\t\\t\\tdivCell.appendChild(divSorting);\\r\\n\\t\\t\\t\\tif(!this.__isSortingIconCustom(colItem))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar divSortAsc = this.util.createDiv(colID + \\\"SortAsc\\\",\\\"nsSortAsc\\\"); \\r\\n\\t\\t\\t\\t\\tdivSorting.appendChild(divSortAsc);\\r\\n\\t\\t\\t\\t\\tvar divSortSpacer = this.util.createDiv(colID + \\\"SortSpacer\\\",\\\"nsSortSpacer\\\"); \\r\\n\\t\\t\\t\\t\\tdivSorting.appendChild(divSortSpacer);\\r\\n\\t\\t\\t\\t\\tvar divSortDesc = this.util.createDiv(colID + \\\"SortDesc\\\",\\\"nsSortDesc\\\"); \\r\\n\\t\\t\\t\\t\\tdivSorting.appendChild(divSortDesc);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(colItem[\\\"showMenu\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\t\\tvar arrMenu = this.__getHeaderMenuDataProvider(bodyCell);\\r\\n\\t\\t\\t\\tif(arrMenu && arrMenu.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar divMenuContainer = this.util.createDiv(colID + \\\"MenuContainer\\\");\\r\\n\\t\\t\\t\\t\\tif(this.__getColumnCustomIcon(colItem,\\\"menu\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdivMenuContainer.innerHTML = this.__getColumnCustomIcon(colItem,\\\"menu\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar svg = objSVG.addSVG(divMenuContainer,colID + \\\"menusvg\\\",\\\"nsMenuArrowSVG\\\",null,null,null,null,null,null,true);\\r\\n\\t\\t\\t\\t\\t\\tobjSVG.addUse(svg,colID + \\\"use\\\",\\\"nsMenuUse\\\",\\\"#svgCircleDownArrow\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tdivCell.appendChild(divMenuContainer);\\r\\n\\t\\t\\t\\t\\tvar menuSetting = {parent:divMenuContainer,isContextMenu:false,createRunTime:false,dataSource:arrMenu,targetType:\\\"TD\\\"\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t,defaultHandler:this.__headerMenuHandler.bind(this),eventHandler:this.__headerMenuClickHandler.bind(this)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t,position:this.util.POS_BOTTOMRIGHT};\\r\\n\\t\\t\\t\\t\\t//place the menu for 2nd last and last column to bottom right\\r\\n\\t\\t\\t\\t\\tif(index === this.__columns.length - 1 || index === this.__columns.length - 2)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tmenuSetting.position = this.util.POS_BOTTOMLEFT;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar headerMenu = new NSMenu(menuSetting);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__nsGridColumnResize.addResizeIndicator(bodyRow,bodyCell,divCell,colItem,colID);\\r\\n\\t\\t\\tvar rendererCell = rendererRow.insertCell(-1);\\r\\n\\t\\t\\tthis.util.addStyleClass(rendererCell,\\\"nsGridCell\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(rendererCell,\\\"nsDataGridHeaderRenderer\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(rendererCell,\\\"nsDataGridHeaderRendererTheme\\\");\\r\\n\\t\\t\\tthis.__addStyleForFixedCell(rendererCell,index);\\r\\n\\t\\t\\tthis.__applyCustomClass(rendererCell,\\\"filterCell\\\");\\r\\n\\t\\t\\tthis.__nsGridFilter.addFilterRenderer(rendererRow,rendererCell,colItem,index,colID);\\r\\n\\t\\t\\tthis.__addPriorityClassInCell(bodyCell,colItem);\\r\\n\\t\\t\\tthis.__addPriorityClassInCell(rendererCell,colItem);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__addHeaderRenderer = function(div,colItem,colIndex)\\r\\n\\t{\\r\\n\\t\\tif(colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar templateRenderer = colItem[\\\"headerTemplate\\\"];\\r\\n\\t\\t\\tvar itemRenderer = colItem[\\\"headerRenderer\\\"];\\r\\n\\t\\t\\tif(itemRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objRenderer = itemRenderer(colItem,colIndex);\\r\\n\\t\\t\\t\\tvar callback = function(objRenderer)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(objRenderer)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(this.util.isString(objRenderer))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar compSpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\tcompSpan.innerHTML = objRenderer;\\r\\n\\t\\t\\t\\t\\t\\t\\tdiv.appendChild(compSpan);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdiv.appendChild(objRenderer);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.util.resolveFunctionOrPromise(objRenderer,callback.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(templateRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdiv.appendChild(templateRenderer.cloneNode(true));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(div,\\\"nsHeaderText\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(div,\\\"nsHeaderTextTheme\\\");\\r\\n\\t\\t\\t\\tvar headerText = \\\" \\\";\\r\\n\\t\\t\\t\\tif(colItem.hasOwnProperty(\\\"headerText\\\") && colItem[\\\"headerText\\\"])\\r\\n\\t\\t        {\\r\\n\\t\\t        \\theaderText = colItem[\\\"headerText\\\"];\\r\\n\\t\\t        }\\r\\n\\t\\t\\t\\tvar headerTextNode = document.createTextNode(headerText);\\r\\n\\t\\t\\t\\tdiv.appendChild(headerTextNode);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(colItem[\\\"headerTruncateToFit\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(div,\\\"nsTruncateToFit\\\");\\r\\n\\t\\t\\t\\tif(this.__enableToolTipForTruncateText)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsToolTipInElement.addToolTip(div,div.textContent);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdiv.setAttribute(\\\"title\\\",div.textContent);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setHeaderSortFunction = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__arrWrapper && this.__arrWrapper.length > 0)\\r\\n\\t    {\\r\\n\\t\\t\\tif(this.__columns && this.__columns.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar dataSource = this.__getAllItems();\\r\\n\\t\\t        for(var colIndex = 0; colIndex < this.__columns.length; colIndex++)\\r\\n\\t\\t        {\\r\\n\\t\\t        \\tvar colItem = this.__columns[colIndex];\\r\\n\\t\\t        \\tthis.__setHeaderSortFunctionForItem(colItem,dataSource);\\r\\n\\t\\t        }\\r\\n\\t\\t\\t}\\r\\n\\t    } \\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setHeaderSortFunctionForItem = function(colItem,dataSource)\\r\\n\\t{\\r\\n\\t\\tif(colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(colItem.hasOwnProperty(\\\"sortField\\\") && colItem[\\\"sortField\\\"] && colItem.hasOwnProperty(\\\"sortable\\\") && colItem[\\\"sortable\\\"] === true)\\r\\n\\t    \\t{\\r\\n\\t\\t\\t\\t//In case of addColumn() dataSource will be null \\r\\n\\t\\t\\t\\tif(!dataSource)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdataSource = this.__getAllItems();\\r\\n\\t\\t\\t\\t}\\r\\n\\t    \\t\\tvar item = null;\\r\\n\\t    \\t\\tfor(var count = 0; count < dataSource.length; count++)\\r\\n\\t            {\\r\\n\\t                 item = dataSource[count][colItem[\\\"sortField\\\"]];\\r\\n\\t                 if(!this.util.isUndefined(item) && item != null && item != \\\"\\\")\\r\\n\\t                 {\\r\\n\\t                \\t break;\\r\\n\\t                 }\\r\\n\\t            }\\r\\n\\t    \\t\\tif(!this.util.isUndefined(item) && item != null && item != \\\"\\\")\\r\\n\\t            {\\r\\n\\t            \\tcolItem.sortFunction = this.__nsGridSort.determineSortFunction(item,colItem);\\r\\n\\t            }\\r\\n\\t            else\\r\\n\\t            {\\r\\n\\t            \\tcolItem.sortFunction = \\\"__sortCaseInsensitive\\\";\\r\\n\\t            }\\r\\n\\t    \\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__removeHeaderCell = function(colIndex)\\r\\n\\t{\\r\\n\\t\\tif(colIndex > -1 && colIndex < this.__columns.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar headerRow = this.__getHeaderHeaderRow(this.__tblCenterHeader);\\r\\n\\t\\t\\tif(headerRow)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\theaderRow.deleteCell(colIndex);\\r\\n\\t\\t\\t\\tvar headerBodyRow = this.__getHeaderBodyRow(this.__tblCenterHeader);\\r\\n\\t\\t\\t\\tvar rendererRow = this.__getHeaderFilterRow(this.__tblCenterHeader);\\r\\n\\t\\t\\t\\theaderBodyRow ? headerBodyRow.deleteCell(colIndex) : null;\\r\\n\\t\\t\\t\\trendererRow ? rendererRow.deleteCell(colIndex) : null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__swapOrMoveHeaderCell = function(functionality,sourceIndex,destinationIndex)\\r\\n\\t{\\r\\n\\t\\tif(this.__isColumnIndexValid(sourceIndex) && this.__isColumnIndexValid(destinationIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar headerRow = this.__getHeaderHeaderRow(this.__tblCenterHeader);\\r\\n\\t\\t\\tif(headerRow)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrRows = this.__getBodyBodyRow(this.__tblCenterHeader);\\r\\n\\t    \\t\\tif(arrRows && arrRows.length > 0)\\r\\n\\t    \\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrHeaderCells = headerRow.cells;\\r\\n\\t\\t\\t\\t\\tthis.__swapCell(arrHeaderCells[sourceIndex],arrHeaderCells[destinationIndex]);\\r\\n\\t\\t\\t\\t\\tfor (var rowIndex = 0; rowIndex < arrRows.length; rowIndex++)\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\t\\tvar arrCells = arrRows[rowIndex].cells;\\r\\n\\t\\t\\t\\t\\t\\tif(rowIndex === 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells[sourceIndex].setAttribute(\\\"currentColumnIndex\\\",destinationIndex);\\r\\n\\t\\t\\t\\t\\t\\t\\tarrCells[destinationIndex].setAttribute(\\\"currentColumnIndex\\\",sourceIndex);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(functionality === \\\"swap\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__swapCell(arrCells[sourceIndex],arrCells[destinationIndex]);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__moveCell(arrCells[sourceIndex],destinationIndex);\\r\\n\\t\\t\\t\\t\\t\\t\\tif(rowIndex === 0)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar smallIndex = Math.min(sourceIndex,destinationIndex);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tfor(var count = smallIndex;count < arrCells.length;count++)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tarrCells[count].setAttribute(\\\"currentColumnIndex\\\",count);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__removeHeader = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__tblCenterHeader && this.__tblCenterHeader.tHead)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__tblCenterHeader.deleteTHead();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__tblCenterHeader.tBodies && this.__tblCenterHeader.tBodies.length > 0)\\r\\n\\t    {\\r\\n\\t    \\tthis.__tblCenterHeader.removeChild(this.__tblCenterHeader.tBodies[0]);\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t/******************************End of Header Creation *************************************/\\r\\n\\t/******************************Footer Creation **********************************************/\\r\\n\\tNSGrid.prototype.__createFooter = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableFooter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divCenterTableFooterContainer = this.__createFooterContainer(this.__divTableFooterContainerWrapper,this.__divCenterTableFooterContainer,this.getID() + this.__TABLE_CENTER_FOOTER_CONTAINER_ID,this.getID() + this.__TABLE_CENTER_FOOTER_ID);\\r\\n\\t\\t\\tthis.__tblCenterFooter = this.__divCenterTableFooterContainer.firstChild;\\r\\n\\t\\t\\tvar divFooterCorner = this.util.createDiv(null,\\\"nsFooterBarCorner\\\");\\r\\n\\t\\t\\tthis.__divCenterTableFooterContainer.appendChild(divFooterCorner);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createFooterContainer= function(tableContainer,footerContainer,containerID,tableID)\\r\\n\\t{\\r\\n\\t\\tif(footerContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfooterContainer.parentNode.removeChild(footerContainer);\\r\\n\\t\\t}\\r\\n\\t\\tfooterContainer = this.__createTableAndParent(containerID,\\\"nsDataGridFooterContainer\\\",tableID);\\r\\n\\t\\ttableContainer.appendChild(footerContainer);\\r\\n\\t\\treturn footerContainer;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createFooterRows = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableFooter && this.__tblCenterFooter && this.__columns && this.__columns.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeAllChildren(this.__tblCenterFooter);\\r\\n\\t\\t\\tvar footer = this.__tblCenterFooter.createTHead();\\r\\n\\t\\t\\tvar footerRow = footer.insertRow(-1);\\r\\n\\t\\t    footerRow.style.height = \\\"auto\\\";\\r\\n\\t\\t    this.__tblCenterFooterBody = document.createElement(\\\"tbody\\\");\\r\\n\\t\\t\\tthis.__tblCenterFooter.appendChild(this.__tblCenterFooterBody);\\r\\n\\t\\t    var bodyRow = this.__tblCenterFooterBody.insertRow(-1);\\r\\n\\t\\t    this.util.addStyleClass(bodyRow,\\\"nsGridFooterRow\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(bodyRow,\\\"footerRow\\\");\\r\\n\\t\\t    for (var colIndex = 0; colIndex < this.__columns.length; colIndex++)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar colItem = this.__columns[colIndex];\\r\\n\\t\\t    \\tthis.__createFooterColGroup(colItem);\\r\\n\\t\\t        this.__createFooterHeaderCell(colItem,footerRow);\\r\\n\\t\\t        this.__createFooterBodyCell(colItem,bodyRow,0,colIndex);\\r\\n\\t\\t    }\\r\\n\\t\\t    this.__createFixedFooterRow(footerRow);\\r\\n\\t\\t    var arrRows = this.__tblCenterFooterBody.rows;\\r\\n\\t\\t    for (var rowIndex = 0; rowIndex < arrRows.length; rowIndex++)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\t this.__createFixedFooterRow(arrRows[rowIndex]);\\r\\n\\t\\t    }\\r\\n\\t\\t    if(this.__enableCustomScrollBar && this.__scroller)\\r\\n\\t\\t\\t{\\r\\n\\t\\t    \\tthis.__divTableFooterContainerWrapper.style.height = null;\\r\\n\\t\\t\\t\\tthis.__divTableFooterContainerWrapper.style.height = (2 * this.__divTableFooterContainerWrapper.offsetHeight) + \\\"px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createFooterColGroup = function(colItem)\\r\\n\\t{\\r\\n\\t\\tif(colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar colgroup = document.createElement(\\\"colgroup\\\");\\r\\n\\t\\t\\tcolgroup.setAttribute(\\\"id\\\",this.getID() + \\\"FooterColGroup\\\" + colItem.dataField);\\r\\n\\t\\t\\tthis.util.addStyleClass(colgroup,\\\"nsGridColGroup\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(colgroup,\\\"nsGridColGroupFooter\\\");\\r\\n\\t\\t\\tthis.__tblCenterFooter.appendChild(colgroup);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createFooterHeaderCell = function(colItem,headerRow)\\r\\n\\t{\\r\\n\\t\\tif(colItem && headerRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar footerCell = headerRow.insertCell(-1);\\r\\n\\t\\t\\tthis.util.addStyleClass(footerCell,\\\"nsGridCell\\\");\\r\\n\\t\\t\\tfooterCell.style.padding = \\\"0px\\\"; \\r\\n\\t\\t\\tfooterCell.style.width = colItem[\\\"width\\\"]; \\r\\n\\t\\t\\tthis.__addPriorityClassInCell(footerCell,colItem);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createFooterBodyCell = function(colItem,bodyRow,rowIndex,colIndex)\\r\\n\\t{\\r\\n\\t\\tif(colItem && bodyRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar bodyCell = bodyRow.insertCell(-1);\\r\\n\\t\\t\\tvar colID = this.getID() + \\\"ColFooter\\\" + colItem[\\\"dataField\\\"];\\r\\n\\t\\t\\tbodyCell.setAttribute(\\\"id\\\",colID);\\r\\n\\t\\t\\tthis.util.addStyleClass(bodyCell , \\\"nsGridCell\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(bodyCell , \\\"nsDataGridFooter\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(bodyCell , \\\"nsDataGridFooterTheme\\\");\\r\\n\\t\\t\\tthis.__addStyleForFixedCell(bodyCell,colIndex);\\r\\n\\t\\t\\tthis.__applyCustomClass(bodyCell,\\\"footerCell\\\");\\r\\n\\t\\t\\tbodyCell.setAttribute(\\\"orignalColumnIndex\\\",colIndex);\\r\\n\\t\\t    bodyCell.setAttribute(\\\"currentColumnIndex\\\",colIndex);\\r\\n\\t\\t    \\r\\n\\t        /*this.util.addEvent(bodyCell,\\\"click\\\",this.__headerClickHandler.bind(this));\\r\\n\\t        this.util.addEvent(bodyCell,\\\"mouseover\\\",this.__headerMouseOverHandler.bind(this));\\r\\n\\t        this.util.addEvent(bodyCell,\\\"mouseout\\\",this.__headerMouseOutHandler.bind(this));\\r\\n\\t        this.util.addEvent(bodyCell,\\\"mousedown\\\",this.__headerMouseDownHandler.bind(this));*/\\r\\n\\t        \\r\\n\\t        var divCell = this.util.createDiv(colID + \\\"container\\\",\\\"nsDataGridFooterCellContainer\\\"); \\r\\n\\t        bodyCell.appendChild(divCell);\\r\\n\\t\\t\\tvar divText = this.util.createDiv(colID + \\\"text\\\");\\r\\n\\t\\t\\tdivCell.appendChild(divText);\\r\\n\\t\\t\\tvar itemRenderer = colItem[\\\"footerRenderer\\\"];\\r\\n\\t\\t\\tif(itemRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objRenderer = itemRenderer(colItem[\\\"dataField\\\"],colItem,this.__arrFilteredGroupedSource,rowIndex,colIndex,bodyCell,bodyRow);\\r\\n\\t\\t\\t\\tvar callback = function(objRenderer)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(objRenderer)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(this.util.isString(objRenderer))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar compSpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\tcompSpan.innerHTML = objRenderer;\\r\\n\\t\\t\\t\\t\\t\\t\\tdivText.appendChild(compSpan);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdivText.appendChild(objRenderer);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.util.resolveFunctionOrPromise(objRenderer,callback.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__addPriorityClassInCell(bodyCell,colItem);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__removeFooterColumn= function(colIndex)\\r\\n\\t{\\r\\n\\t\\tif(colIndex > -1 && colIndex < this.__columns.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar bodyRow = this.__getBodyHeaderRow(this.__tblCenterFooter);\\r\\n\\t\\t\\tif(bodyRow)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar arrRows = this.__getBodyBodyRow(this.__tblCenterFooter);\\r\\n\\t\\t    \\tif(arrRows && arrRows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\tbodyRow.deleteCell(colIndex);\\r\\n\\t\\t    \\t\\tvar row = null;\\r\\n\\t\\t    \\t\\tfor (var rowCount = 0; rowCount < arrRows.length; rowCount++) \\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\trow = arrRows[rowCount];\\r\\n\\t\\t    \\t\\t\\trow.deleteCell(colIndex);\\r\\n\\t\\t    \\t    }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__swapOrMoveFooterCell = function(functionality,sourceIndex,destinationIndex)\\r\\n\\t{\\r\\n\\t\\tif(this.__isColumnIndexValid(sourceIndex) && this.__isColumnIndexValid(destinationIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar bodyRow = this.__getBodyHeaderRow(this.__tblCenterFooter);\\r\\n\\t\\t\\tif(bodyRow)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrRows = this.__getBodyBodyRow(this.__tblCenterFooter);\\r\\n\\t\\t\\t\\tif(arrRows && arrRows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrHeaderCells = bodyRow.cells;\\r\\n\\t\\t\\t\\t\\tif(functionality === \\\"swap\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__swapCell(arrHeaderCells[sourceIndex],arrHeaderCells[destinationIndex]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__moveCell(arrHeaderCells[sourceIndex],destinationIndex);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\tvar row = null;\\r\\n\\t\\t    \\t\\tvar arrBodyCells = [];\\r\\n\\t\\t    \\t\\tfor (var rowCount = 0; rowCount < arrRows.length; rowCount++) \\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\trow = arrRows[rowCount];\\r\\n\\t\\t    \\t\\t\\tarrBodyCells = row.cells;\\r\\n\\t\\t    \\t\\t\\tif(functionality === \\\"swap\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\t\\t\\tthis.__swapCell(arrBodyCells[sourceIndex],arrBodyCells[destinationIndex]);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__moveCell(arrBodyCells[sourceIndex],destinationIndex);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t    }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\t/******************************End of Footer Creation *************************************/\\r\\n\\t/******************************Body Creation **********************************************/\\r\\n\\tNSGrid.prototype.__createBody = function()\\r\\n\\t{\\t\\r\\n\\t\\tthis.__divCenterTableBodyContainer = this.__createTableAndParent(this.getID() + this.__TABLE_CENTER_BODY_CONTAINER_ID,this.__CLASS_BODY_CONTAINER,this.getID() + this.__TABLE_CENTER_BODY_ID);\\r\\n\\t\\tif(this.__enableFooter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__divCenterTableBodyContainer,\\\"nsDataGridBodyContainerWithFooter\\\");\\r\\n\\t\\t}\\r\\n\\t\\tthis.__divTableBodyContainerWrapper.appendChild(this.__divCenterTableBodyContainer);\\r\\n\\t\\tthis.__tblCenterBody = this.__divCenterTableBodyContainer.firstChild;\\r\\n\\t\\tvar header = this.__tblCenterBody.createTHead();\\r\\n\\t    this.__tblCenterBodyBody =  document.createElement(\\\"tbody\\\");\\r\\n\\t\\tthis.__tblCenterBody.appendChild(this.__tblCenterBodyBody);\\r\\n\\t\\tif(!this.__enableVirtualScroll && this.__enablePagination && this.__isPaginationTypeScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__bodyScrollRef = this.__bodyScrollHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(this.__getVerticalScrollableContainer(),\\\"scroll\\\",this.__bodyScrollRef);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__objGrid.__createBody();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__renderBody = function(fromSort,fromFilter)\\r\\n\\t{\\r\\n\\t\\tvar isReset = fromSort || fromFilter;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tif(this.__processArrayAsync)\\r\\n\\t    {\\r\\n\\t\\t\\tthis.__processArrayAsync.stop();\\r\\n\\t    }\\r\\n\\t\\tvar resetTable = function(tblData)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(tblData)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttblData.deleteTHead();\\r\\n\\t\\t\\t    if(tblData.tBodies && tblData.tBodies.length > 0)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\ttblData.removeChild(tblData.tBodies[0]);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tself.__navigationIndex = -1;\\r\\n\\t\\t};\\r\\n\\t\\tvar createBody = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn document.createElement(\\\"tbody\\\");\\r\\n\\t\\t};\\r\\n\\t\\tvar addBodyInTable = function(tblData,tblBody)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(tblData && tblBody)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttblData.appendChild(tblBody);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t//for some reason the body is to be destroyed so that row we store in items is not stale\\r\\n\\t\\t// need to fix this\\r\\n\\t\\tif(!this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tresetTable(this.__tblCenterBody);\\r\\n\\t\\t\\tthis.__tblCenterBodyBody = createBody();\\r\\n\\t\\t\\tif(this.__divCenterTableBodyContainer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divCenterTableBodyContainer.scrollTop = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t    this.__lastScrollPos = [0,0];\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableContextMenu)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeContextMenu();\\r\\n\\t\\t}\\r\\n\\t\\tthis.__createBodyHeader();\\r\\n\\t\\tthis.__createHeaderExtraRows();\\r\\n\\t\\tthis.__createFixedHeaderRows();\\r\\n\\t\\tthis.__createFooterRows();\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setNSVirtualScroll(this.__arrInternalSource);\\r\\n\\t\\t}\\r\\n\\t\\telse if(this.__enablePagination && this.__isPaginationTypeScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\taddBodyInTable(this.__tblCenterBody,this.__tblCenterBodyBody);\\r\\n\\t\\t\\tvar source = this.__arrInternalSource.slice(0);\\r\\n\\t\\t\\tvar resetInternalSource = false;\\r\\n\\t\\t\\tif(this.__isPaginationModeAuto || this.__rowsRendered)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__arrInternalSource = source.slice(0,this.__INFINITE_SCROLL_INITIAL_LOAD);\\r\\n\\t\\t\\t\\tresetInternalSource = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__createBodyBody(this.__arrInternalSource,0,this.__arrInternalSource.length);\\r\\n\\t\\t\\tif(resetInternalSource) {\\r\\n\\t\\t\\t\\tthis.__arrInternalSource = source.slice(0);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif((this.__isPaginationModeAuto || this.__rowsRendered) && this.__enableAsyncLoadPagination && this.__totalRecords > this.__getTotalRows()) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__arrInternalSource = source.slice(0);//this.__objGrid.__setSourceForAsync();\\r\\n\\t\\t\\t\\tthis.__processArrayAsync = new this.util.processArrayAsync(this.__arrInternalSource,this.__createRowAsync,20,this.__asyncSourceCompleteHandler,this);\\r\\n\\t\\t\\t\\tthis.__processArrayAsync.start(this.__getTotalRows());\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse if(this.__enablePagination && !this.__isPaginationTypeScroll && this.__isPaginationModeAuto)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createBodyBody(this.__arrInternalSource,0,this.__pageSize);\\r\\n\\t\\t\\taddBodyInTable(this.__tblCenterBody,this.__tblCenterBodyBody);\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createBodyBody(this.__arrInternalSource,0,this.__arrInternalSource.length);\\r\\n\\t\\t\\taddBodyInTable(this.__tblCenterBody,this.__tblCenterBodyBody);\\r\\n\\t\\t}\\r\\n\\t\\tif(!fromSort)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enablePagination && !this.__isPaginationTypeScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__createPaginationControl(this.__divOuterContainer);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__setBodyMeasurement();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enablePagination && !this.__isPaginationTypeScroll && this.__isPaginationModeAuto)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__arrInternalSource && this.__arrInternalSource.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divPagination ? this.__divPagination.style.display = \\\"\\\" : null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__divPagination ? this.__divPagination.style.display = \\\"none\\\" : null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__alignTables(isReset);\\r\\n\\t\\t//this.__setFixedCellsPosition();\\r\\n\\t\\tif(this.__enableRowMove)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting = {table:this.__tblCenterBody,isSameTableMove:this.__isSameTableMove,dragEndHandler:this.__rowMoverDropEndHandler};\\r\\n\\t\\t\\tvar rowMover = new NSTableRowMover(setting);\\r\\n\\t\\t}\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tif(this.__enableCellSelection)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsTableCellNavigator)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsTableCellNavigator.destroy();\\r\\n\\t\\t\\t\\tif(this.__tableCellNavigatorEventRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(self.__tblCenterBody,NSTableCellNavigator.CELL_SELECTED,this.__tableCellNavigatorEventRef);\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(self.__tblCenterBody,NSTableCellNavigator.CELL_UNSELECTED,this.__tableCellNavigatorEventRef);\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(self.__tblCenterBody,NSTableCellNavigator.CELL_SELECTABLE,this.__tableCellNavigatorEventRef);\\r\\n\\t\\t\\t\\t\\tthis.__tableCellNavigatorEventRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__nsTableCellNavigator = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar keyNavigationValid = function(event,cell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn self.__nsGridEditor.isOtherKeyNavigationValid(event,cell);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tthis.__nsTableCellNavigator = new NSTableCellNavigator(self.__tblCenterBody,{keyNavigationValid:keyNavigationValid});\\r\\n\\t\\t\\tthis.__tableCellNavigatorEventRef = this.__tableCellNavigatorEventHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(self.__tblCenterBody,NSTableCellNavigator.CELL_SELECTED,this.__tableCellNavigatorEventRef);\\r\\n\\t\\t\\tthis.util.addEvent(self.__tblCenterBody,NSTableCellNavigator.CELL_UNSELECTED,this.__tableCellNavigatorEventRef);\\r\\n\\t\\t\\tthis.util.addEvent(self.__tblCenterBody,NSTableCellNavigator.CELL_SELECTABLE,this.__tableCellNavigatorEventRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableMultiCellSelection)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsCellSelection)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsCellSelection.destroy();\\r\\n\\t\\t\\t\\tif(this.__tableCellSelectionEventRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(self.__tblCenterBody,NSCellSelection.SELECTION_START,this.__tableCellSelectionEventRef);\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(self.__tblCenterBody,NSCellSelection.SELECTION_END,this.__tableCellSelectionEventRef);\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(self.__tblCenterBody,NSCellSelection.SET_CELL_VALUE,this.__tableCellSelectionEventRef);\\r\\n\\t\\t\\t\\t\\tthis.__tableCellSelectionEventRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__nsCellSelection = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar editors = [];\\r\\n\\t\\t\\tfor (var colIndex = 0; colIndex < this.__columns.length; colIndex++)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar colItem = this.__columns[colIndex];\\r\\n\\t\\t\\t\\tif(colItem[\\\"multiSelectionEditor\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\teditors.push({type:NSCellSelection.EDITORS[colItem[\\\"multiSelectionEditor\\\"]]});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\teditors.push({type:NSCellSelection.EDITORS[NSGrid.MULTI_SELECTION_EDITORS_TEXT]});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t\\tvar setting = this.__multiCellSelectionSetting; \\r\\n\\t\\t\\tsetting.editors = editors;\\r\\n\\t\\t\\tthis.__nsCellSelection = new NSCellSelection(self.__tblCenterBody,setting);\\r\\n\\t\\t\\tthis.__tableCellSelectionEventRef = this.__tableCellSelectionEventHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(self.__tblCenterBody,NSCellSelection.SELECTION_START,this.__tableCellSelectionEventRef);\\r\\n\\t\\t\\tthis.util.addEvent(self.__tblCenterBody,NSCellSelection.SELECTION_END,this.__tableCellSelectionEventRef);\\r\\n\\t\\t\\tthis.util.addEvent(self.__tblCenterBody,NSCellSelection.SET_CELL_VALUE,this.__tableCellSelectionEventRef);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__addMediaQueries();\\r\\n\\t\\tthis.__addStyleForFixedColumns();\\r\\n\\t\\t//this.__updateFixedColumnsForAllTables();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setNSVirtualScroll = function(source)\\r\\n\\t{\\r\\n\\t\\tvar length = 0;\\r\\n\\t\\tif(source && source.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(source[count][this.__fieldRowVisible])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tlength++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__nsVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsVirtualScroll.dataSource(length);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tvar pageChangedHandler = function(page) {\\r\\n\\t\\t\\t\\t\\t//self.__updateStickyColumns(self.__tblCenterBody);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar setting = {scrollElement: this.__divCenterTableBodyContainer,contentElement: this.__tblCenterBodyBody,itemTag: \\\"tr\\\",totalLength: length,getItemComponent:this.__getRowComponentForVirtual.call(this),\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tgetEmptyItemComponent:this.__getEmptyRowComponentForVirtual.call(this),pageChanged: pageChangedHandler};\\r\\n\\t\\t\\t\\tvar virtualScrollSetting = this.__virtualScrollSetting;\\r\\n\\t\\t\\t\\tvar arrCopyFields = [\\\"pageSize\\\",\\\"pagesRendered\\\",\\\"enableScrollDelay\\\",\\\"scrollInterval\\\",\\\"resizeInterval\\\",\\\"enableLoader\\\",\\\"getLoaderComponent\\\"];\\r\\n\\t\\t\\t\\tvar field = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrCopyFields.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfield = arrCopyFields[count];\\r\\n\\t\\t\\t\\t\\tif(!this.util.isUndefinedOrNull(virtualScrollSetting[field]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetting[field] = virtualScrollSetting[field];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__nsVirtualScroll = new NSVirtualScroll(setting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__tblCenterBodyBody)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__tblCenterBodyBody.innerHTML = \\\"\\\";\\r\\n\\t\\t\\t\\tthis.__tblCenterBodyBody.appendChild(this.__createNoDataRow());\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getRowComponentForVirtual = function()\\r\\n\\t{\\r\\n\\t\\tvar grid = this;\\r\\n\\t\\tvar CreateRow = function(index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__index = index;\\r\\n\\t\\t\\tthis.__grid =  grid;\\r\\n\\t\\t\\tthis.__item = null;\\r\\n\\t\\t\\tthis.__row = null;\\r\\n\\t\\t};\\r\\n\\t\\tCreateRow.prototype.getElement = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__row)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__grid.__type == this.__grid.GRID_TYPE_NORMAL)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__item = this.__grid.__arrInternalSource[this.__index];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__item = this.__grid.__getVisibleItemByIndex(null,this.__index);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__row = this.__grid.__createBodyRow(this.__item,false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn this.__row;\\r\\n\\t\\t};\\r\\n\\t\\treturn CreateRow;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getEmptyRowComponentForVirtual = function()\\r\\n\\t{\\r\\n\\t\\tvar grid = this;\\r\\n\\t\\tvar CreateEmptyRow = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__grid = grid;\\r\\n\\t\\t\\tthis.__row = null;\\r\\n\\t\\t};\\r\\n\\t\\tCreateEmptyRow.prototype.getElement = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__row)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__row = this.__grid.__createNoDataRow.call(this.__grid);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn this.__row;\\r\\n\\t\\t};\\r\\n\\t\\treturn CreateEmptyRow;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createCustomScroller = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableCustomScrollBar && !this.__scroller)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting = {verticalElement:this.__getVerticalScrollableContainer(),horizontalElement:this.__getHorizontalScrollableContainer(),enableCustomHandler: true,verticalScrollButtons:this.__customScrollBarSetting.verticalScrollButtons,horizontalScrollButtons:this.__customScrollBarSetting.horizontalScrollButtons,enableMoveOnClick: true};\\r\\n\\t\\t\\tfor (var key in setting) \\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\tthis.__scrollerSetting[key] = setting[key]; \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__scroller = new NSScroller(this.__scrollerSetting);\\r\\n\\t\\t\\tvar customScrollHandler = this.__customScrollHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(this.__scrollerSetting.verticalElement,NSScroller.SCROLLING,customScrollHandler);\\r\\n\\t\\t\\tif(this.__scrollerSetting.verticalElement != this.__scrollerSetting.horizontalElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addEvent(this.__scrollerSetting.horizontalElement,NSScroller.SCROLLING,customScrollHandler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__customScrollHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar virtualVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t//self.__setVirtualScroll.bind(self)(scrollPos,event);\\r\\n\\t\\t};\\r\\n\\t\\tvar dataRefreshVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\tvar asyncLoadVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\tvar paginationVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\tvar normalVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__getVerticalScrollableContainer().scrollTop = scrollPos;\\r\\n\\t\\t};\\r\\n\\t\\tvar normalHorHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__getHorizontalScrollableContainer().scrollLeft = scrollPos;\\r\\n\\t\\t};\\r\\n\\t\\tvar objCondition = {virtualScroll:{eligible:this.__enableVirtualScroll,verHandler:virtualVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tdataRefreshOnEnd:{eligible:this.__enableDataRefreshOnScrollEnd,verHandler:dataRefreshVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tasyncLoad:{eligible:this.__enableAsyncLoadPagination,verHandler:asyncLoadVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tpagination:{eligible:(this.__enablePagination && this.__isPaginationTypeScroll),verHandler:paginationVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tnormal:{eligible:true,verHandler:normalVerHandler,horHandler:normalHorHandler}\\r\\n\\t\\t\\t\\t\\t\\t   };\\r\\n\\t\\tvar eventItem = event;\\r\\n\\t\\tvar direction = eventItem.direction;\\r\\n\\t\\tvar scrollPos = eventItem.scrollPos;\\r\\n\\t\\tvar oldScrollPos = eventItem.oldScrollPos;\\r\\n\\t\\tfor(var key in objCondition)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = objCondition[key];\\r\\n\\t\\t\\tif(item.eligible)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(direction == \\\"vertical\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item.verHandler)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem.verHandler();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item.horHandler)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem.horHandler();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createScrollTip = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__enableScrollBarTip && !this.__divScrollTipContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divScrollTipContainer = this.util.createDiv(this.getID() + \\\"ScrollTipContainer\\\",\\\"nsGridScrollTipContainer\\\");\\r\\n\\t\\t\\tthis.__divScrollTipText = this.util.createDiv(this.getID() + \\\"ScrollTipText\\\",\\\"nsGridScrollTipText\\\");\\r\\n\\t\\t\\tthis.__divScrollTipContainer.appendChild(this.__divScrollTipText);\\r\\n\\t\\t\\tvar divTri = this.util.createDiv(this.getID() + \\\"ScrollTipTriangle\\\",\\\"nsGridScrollTipTriangle\\\");\\r\\n\\t\\t\\tthis.__divScrollTipContainer.appendChild(divTri);\\r\\n\\t\\t\\tthis.addChild(this.__divScrollTipContainer);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createRowAsync= function(item,index,array)\\r\\n\\t{\\r\\n\\t\\tthis.__objGrid.__createRowAsync(item,index,array);\\r\\n\\t\\tconsole.log(index + \\\" rendererd\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__asyncSourceCompleteHandler= function()\\r\\n\\t{\\r\\n\\t\\tconsole.log(\\\"CompleteHandler\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createBodyHeader= function()\\r\\n\\t{\\r\\n\\t\\tif(this.__tblCenterBody)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//for some reason this method is called multiple times on load so checking if colgroup is already created or not\\r\\n\\t\\t\\tvar isColGroupCreated = false;\\r\\n\\t\\t\\tif(this.__columns && this.__columns.length > 0 && document.getElementById(this.getID() + \\\"BodyColGroup\\\" + this.__columns[0].dataField))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tisColGroupCreated = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//In case of Virtual scroll thead will be present\\r\\n\\t\\t\\tvar header = this.__tblCenterBody.querySelector(\\\"thead\\\");\\r\\n\\t\\t\\tif(!header)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\theader = this.__tblCenterBody.createTHead();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar headerRow = header.insertRow(-1);\\r\\n\\t\\t    headerRow.style.height = \\\"auto\\\";\\r\\n\\t\\t    for (var colIndex = 0; colIndex < this.__columns.length; colIndex++)\\r\\n\\t\\t    {\\r\\n\\t\\t        var colItem = this.__columns[colIndex];\\r\\n\\t\\t        if(!isColGroupCreated)\\r\\n\\t\\t        {\\r\\n\\t\\t        \\tthis.__createBodyColGroup(colItem);\\r\\n\\t\\t        }\\r\\n\\t\\t        this.__createBodyHeaderCell(colItem,headerRow);\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createBodyColGroup = function(colItem)\\r\\n\\t{\\r\\n\\t\\tif(colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar colgroup = document.createElement(\\\"colgroup\\\");\\r\\n\\t\\t\\tcolgroup.setAttribute(\\\"id\\\",this.getID() + \\\"BodyColGroup\\\" + colItem.dataField);\\r\\n\\t\\t\\tthis.util.addStyleClass(colgroup,\\\"nsGridColGroup\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(colgroup,\\\"nsGridColGroupBody\\\");\\r\\n\\t\\t\\tthis.__tblCenterBody.appendChild(colgroup);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createBodyHeaderCell= function(colItem,headerRow)\\r\\n\\t{\\r\\n\\t\\tif(colItem && headerRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar headerCell = headerRow.insertCell(-1);\\r\\n\\t\\t\\tthis.util.addStyleClass(headerCell,\\\"nsGridCell\\\");\\r\\n\\t\\t\\theaderCell.style.width = (colItem[\\\"width\\\"]);\\r\\n\\t\\t    headerCell.style.height = \\\"0px\\\";\\r\\n\\t\\t    headerCell.style.padding = \\\"0px\\\";\\r\\n\\t\\t    this.__addPriorityClassInCell(headerCell,colItem);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__resetDataInBody= function(fromIndex,toIndex,fromRowIndex,useVisibleIndex)\\r\\n\\t{\\r\\n\\t\\tthis.__objGrid.__resetDataInBody(fromIndex,toIndex,fromRowIndex,useVisibleIndex);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createBodyBody= function(dataSet,startIndex,endIndex,callAsync)\\r\\n\\t{\\r\\n\\t\\tthis.__stopScroll = true;\\r\\n\\t    if(dataSet && dataSet.length > 0)\\r\\n\\t    {\\r\\n\\t    \\tthis.__objGrid.__createBodyBody(dataSet,startIndex,endIndex);\\r\\n\\t    }\\r\\n\\t    else\\r\\n\\t    {\\r\\n\\t    \\tthis.__tblCenterBodyBody.appendChild(this.__createNoDataRow());\\r\\n\\t    }\\r\\n\\t    this.__stopScroll = false;\\r\\n\\t    if(callAsync && this.__processArrayAsync)\\r\\n\\t    {\\r\\n\\t    \\tthis.__processArrayAsync.start(this.__getTotalRows());\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setBodyRowProperty = function(row,item,rowIndex)\\r\\n\\t{\\r\\n\\t\\tif(row && item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__enableVariableRowHeight)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__rowHeight > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.height = this.__rowHeight + \\\"px\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(this.__virtualRowHeight > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.height = this.__virtualRowHeight + \\\"px\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.height = \\\"auto\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__enableColumnMouseHover)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    var className = ((rowIndex % 2) === 0) ? this.__CLASS_EVEN_ROW : this.__CLASS_ODD_ROW;\\r\\n\\t\\t\\t    this.util.addStyleClass(row,\\\"nsGridRow \\\" + className);\\r\\n\\t\\t\\t}\\r\\n\\t\\t    if(this.__enableMouseHover)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.util.addEvent(row,\\\"mouseover\\\",this.__rowMouseHover.bind(this));\\r\\n\\t\\t\\t    this.util.addEvent(row,\\\"mouseout\\\",this.__rowMouseOut.bind(this));\\r\\n\\t\\t    }\\r\\n\\t\\t    this.util.addEvent(row,\\\"click\\\",this.__rowClickHandler.bind(this));\\r\\n\\t\\t    this.util.addEvent(row,\\\"dblclick\\\",this.__rowDblClickHandler.bind(this));\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createBodyRow = function(item,isAdd)\\r\\n\\t{\\r\\n\\t\\treturn this.__objGrid.__createRow(item,null,isAdd);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createBodyRowAt = function(item,index)\\r\\n\\t{\\r\\n\\t\\tif(item && index > -1)\\r\\n\\t    {\\r\\n\\t\\t\\treturn this.__objGrid.__createRow(item,index);\\r\\n\\t    }\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createBodyRowCell= function(row,colIndex,createDiv)\\r\\n\\t{\\r\\n\\t\\tvar cell =  row.insertCell(-1);\\r\\n    \\tthis.util.addStyleClass(cell,\\\"nsGridCell\\\");\\r\\n    \\tthis.util.addStyleClass(cell , \\\"nsBodyDataGridCell\\\");\\r\\n    \\tthis.util.addStyleClass(cell , \\\"nsBodyDataGridCellTheme\\\");\\r\\n    \\tthis.__addStyleForFixedCell(cell,colIndex);\\r\\n    \\tthis.__applyCustomClass(cell,\\\"bodyCell\\\");\\r\\n    \\tif(colIndex === 0)\\r\\n    \\t{\\r\\n    \\t\\tthis.__applyCustomClass(cell,\\\"firstBodyColumn\\\");\\r\\n    \\t}\\r\\n    \\telse\\r\\n    \\t{\\r\\n    \\t\\tthis.__applyCustomClass(cell,\\\"nonFirstBodyColumn\\\");\\r\\n    \\t}\\r\\n\\t\\tif(createDiv)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cellDiv = this.util.createDiv(null);\\r\\n\\t\\t    cell.appendChild(cellDiv);\\r\\n\\t\\t}\\r\\n\\t    return cell;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setBodyCellProperties= function(cell)\\r\\n\\t{\\r\\n\\t\\tif(cell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar handler = this.__bodyCellEventHandler.bind(this);\\r\\n\\t\\t\\tif(this.__enableColumnMouseHover)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addEvent(cell,\\\"mouseover\\\",handler);\\r\\n\\t\\t\\t\\tthis.util.addEvent(cell,\\\"mouseleave\\\",handler);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.addEvent(cell,\\\"click\\\",handler);\\r\\n\\t\\t\\tthis.util.addEvent(cell,\\\"dblclick\\\",handler);\\r\\n\\t\\t\\t//this.__setClassForFixedColumn(cell);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setBodyCellProperty = function(row,cell,item,colItem,colIndex,parentIndex,level,isReset)\\r\\n\\t{\\r\\n\\t\\tvar hierarchicalPadding = 0;\\r\\n\\t\\tif(colItem && colItem.hasOwnProperty(\\\"dataField\\\") && colItem[\\\"dataField\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cellDiv = cell.firstChild;\\r\\n\\t        if((this.__enableHierarchical || this.__enableGrouping || this.__enableMasterDetail) && colIndex == 0 && item.hasOwnProperty(this.__childField) && item[this.__childField]  && item[this.__childField].length > 0)\\r\\n\\t        {\\r\\n\\t        \\tthis.util.addStyleClass(cellDiv,this.__CLASS_GROUP_CELL);\\r\\n\\t        \\tvar isCollapsed = false;\\r\\n\\t        \\tif(!isReset && item.hasOwnProperty(this.__fieldIsCollapsed))\\r\\n\\t \\t        {\\r\\n\\t        \\t\\tisCollapsed = item[this.__fieldIsCollapsed];\\r\\n\\t \\t        }\\r\\n\\t        \\t//this.__createArrow(parentIndex,cellDiv,isCollapsed);\\r\\n\\t        \\tvar cellText = this.util.createDiv(null,this.__CLASS_CELL_CHILD);\\r\\n\\t        \\tcellText.style.verticalAlign = \\\"top\\\";\\r\\n\\t        \\tthis.__addCellText(row,item,cellText,colItem,colIndex);\\r\\n\\t        \\tcellDiv.appendChild(cellText);\\r\\n\\t        }\\r\\n\\t        else\\r\\n\\t        {\\r\\n\\t        \\tthis.util.addStyleClass(cellDiv,this.__CLASS_CELL_CHILD);\\r\\n\\t        \\tthis.__addCellText(row,item,cellDiv,colItem,colIndex);\\r\\n\\t        \\t//24 = 16(Arrow Width) + 6(Arrow Parent Padding) + 2(cellDiv horizontalGap between elements shown in debugger)\\r\\n\\t        \\thierarchicalPadding = 24;\\r\\n\\t        }\\r\\n\\t        if(colIndex == 0)\\r\\n\\t        {\\r\\n\\t        \\tif(this.__enableHierarchical || this.__enableMasterDetail)\\r\\n\\t            {\\r\\n\\t            \\tif(level === 0)\\r\\n\\t            \\t{\\r\\n\\t            \\t\\tcell.style.paddingLeft = \\\"1px\\\";\\r\\n\\t            \\t}\\r\\n\\t            \\telse\\r\\n\\t            \\t{\\r\\n\\t            \\t\\tvar paddingLeft = (10 * level) + hierarchicalPadding;\\r\\n\\t            \\t\\tcell.style.paddingLeft = paddingLeft + \\\"px\\\";\\r\\n\\t            \\t}\\r\\n\\t            }\\r\\n\\t        \\telse if(this.__enableGrouping)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tif(level === 0)\\r\\n\\t        \\t\\t{\\r\\n\\t        \\t\\t\\tcell.style.paddingLeft = \\\"1px\\\";\\r\\n\\t        \\t\\t}\\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t\\tthis.__addPriorityClassInCell(cell,colItem);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__removeBodyColumn= function(colIndex)\\r\\n\\t{\\r\\n\\t\\tif(colIndex > -1 && colIndex < this.__columns.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar bodyRow = this.__getBodyHeaderRow(this.__tblCenterBody);\\r\\n\\t\\t\\tif(bodyRow)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar arrRows = this.__getBodyBodyRow(this.__tblCenterBody);\\r\\n\\t\\t    \\tif(arrRows && arrRows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\tbodyRow.deleteCell(colIndex);\\r\\n\\t\\t    \\t\\tvar row = null;\\r\\n\\t\\t    \\t\\tfor (var rowCount = 0; rowCount < arrRows.length; rowCount++) \\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\trow = arrRows[rowCount];\\r\\n\\t\\t    \\t\\t\\trow.deleteCell(colIndex);\\r\\n\\t\\t    \\t    }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__swapOrMoveBodyCell = function(functionality,sourceIndex,destinationIndex)\\r\\n\\t{\\r\\n\\t\\tif(this.__isColumnIndexValid(sourceIndex) && this.__isColumnIndexValid(destinationIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar bodyRow = this.__getBodyHeaderRow(this.__tblCenterBody);\\r\\n\\t\\t\\tif(bodyRow)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrRows = this.__getBodyBodyRow(this.__tblCenterBody);\\r\\n\\t\\t\\t\\tif(arrRows && arrRows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrHeaderCells = bodyRow.cells;\\r\\n\\t\\t\\t\\t\\tif(functionality === \\\"swap\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__swapCell(arrHeaderCells[sourceIndex],arrHeaderCells[destinationIndex]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__moveCell(arrHeaderCells[sourceIndex],destinationIndex);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\tvar row = null;\\r\\n\\t\\t    \\t\\tvar arrBodyCells = [];\\r\\n\\t\\t    \\t\\tfor (var rowCount = 0; rowCount < arrRows.length; rowCount++) \\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\trow = arrRows[rowCount];\\r\\n\\t\\t    \\t\\t\\tarrBodyCells = row.cells;\\r\\n\\t\\t    \\t\\t\\tif(functionality === \\\"swap\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\t\\t\\tthis.__swapCell(arrBodyCells[sourceIndex],arrBodyCells[destinationIndex]);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__moveCell(arrBodyCells[sourceIndex],destinationIndex);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t    }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createArrow = function(item,parentRowCount,parentElement,isCollapsed,colItem)\\r\\n\\t{\\r\\n\\t\\t if(parentElement && this.__showExpandCollapseIcon)\\r\\n\\t\\t {\\r\\n\\t\\t\\t var cellArrowParent = this.util.createDiv(null,\\\"nsArrowParent\\\");\\r\\n\\t\\t\\t var arrowID = this.getID() + \\\"compArrow\\\" + parentRowCount;\\r\\n\\t\\t\\t var compArrow = this.util.createDiv(arrowID,\\\"nsArrow\\\");\\r\\n\\t\\t\\t //compArrow.style.paddingTop = \\\"3px\\\";\\r\\n\\t\\t\\t compArrow.setAttribute(\\\"ns-parent-row-count\\\",parentRowCount);\\r\\n\\t\\t\\t \\r\\n\\t\\t\\t var objSVG = new NSSvg();\\r\\n\\t\\t\\t this.__objGrid.__createArrow(compArrow,objSVG,arrowID,isCollapsed,item,colItem);\\r\\n\\t\\t\\t this.util.addEvent(compArrow,\\\"click\\\",this.__arrowClickHandler.bind(this));\\r\\n\\t\\t\\t cellArrowParent.appendChild(compArrow);\\r\\n\\t\\t\\t parentElement.appendChild(cellArrowParent);\\r\\n\\t\\t\\t item[this.__fieldRowArrow] = compArrow;\\r\\n\\t\\t\\t return compArrow;\\r\\n\\t\\t }\\r\\n\\t\\t return null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setArrowDirection = function(compArrow,isCollapsed)\\r\\n\\t{\\r\\n\\t\\tif(compArrow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar parent = this.util.findParent(compArrow,\\\"TD\\\");\\r\\n\\t\\t\\tvar colIndex = parseInt(parent.getAttribute(\\\"currentColumnIndex\\\"));\\r\\n\\t\\t\\tvar colItem = this.__getColumnObject(colIndex);\\r\\n\\t\\t\\tthis.__objGrid.__setArrowDirection(compArrow,isCollapsed,colItem);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__isArrowCollapsed = function(compArrow)\\r\\n\\t{\\r\\n\\t\\tif(compArrow && compArrow.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rowIndex = parseInt(compArrow.getAttribute(\\\"ns-parent-row-count\\\"));\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn item[this.__fieldIsCollapsed];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__isRowCollapsed = function(element,rowIndex)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\telement = this.util.findParent(element,\\\"TR\\\");\\r\\n\\t\\t\\tif(element)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowIndex = parseInt(element.getAttribute(\\\"ns-index\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(rowIndex > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn item[this.__fieldIsCollapsed];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createNoDataRow = function()\\r\\n\\t{\\r\\n\\t\\tvar row = document.createElement(\\\"tr\\\");\\r\\n\\t\\tthis.util.addStyleClass(row,\\\"nsNoRecordsFound\\\");\\r\\n\\t\\trow.style.height = \\\"auto\\\";\\r\\n\\t\\tvar cell = row.insertCell(-1);\\r\\n\\t\\tcell.setAttribute(\\\"colspan\\\",this.__columns.length);\\r\\n\\t\\tvar textNode = document.createTextNode(this.__noDataMessage);\\r\\n\\t\\tcell.appendChild(textNode);\\r\\n\\t\\treturn row;\\r\\n\\t};\\r\\n\\t/******************************Fixed Column ***************************************/\\r\\n\\tNSGrid.prototype.__createFixedRows = function()\\r\\n\\t{\\r\\n\\t\\tthis.__createFixedHeaderRows();\\r\\n\\t\\tthis.__createFixedBodyRows();\\r\\n\\t\\tthis.__createFixedFooterRows();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createFixedHeaderRows = function()\\r\\n\\t{\\r\\n\\t\\tthis.__arrFixedLeftCells = [];\\r\\n\\t\\tthis.__arrFixedRightCells = [];\\r\\n\\t\\tvar centerHeaderHeaderCells = [];\\r\\n\\t\\tvar centerHeaderBodyCells = [];\\r\\n\\t\\tvar centerHeaderRendererCells = [];\\r\\n\\t\\tvar centerBodyHeaderCells = []; \\r\\n\\t\\tvar arrExtraHeaderCells = [];\\r\\n\\t\\tvar centerHeaderRow = this.__getHeaderHeaderRow(this.__tblCenterHeader);\\r\\n\\t\\tif(centerHeaderRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcenterHeaderHeaderCells = centerHeaderRow.cells;\\r\\n\\t\\t}\\r\\n\\t\\tvar centerBodyRow = this.__getHeaderBodyRow(this.__tblCenterHeader);\\r\\n\\t\\tif(centerBodyRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcenterHeaderBodyCells = centerBodyRow.cells;\\r\\n\\t\\t\\tvar centerRendererRow = this.__getHeaderFilterRow(this.__tblCenterHeader);\\r\\n\\t\\t\\tcenterHeaderRendererCells = centerRendererRow ? centerRendererRow.cells : null;\\r\\n\\t\\t\\tvar arrExtraRow = this.__getHeaderExtraRow(this.__tblCenterHeader);\\r\\n\\t\\t\\tif(arrExtraRow && arrExtraRow.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (var rowIndex = 0; rowIndex < arrExtraRow.length; rowIndex++)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\tvar row = arrExtraRow[rowIndex];\\r\\n\\t\\t\\t\\t\\tarrExtraHeaderCells.push(row.cells);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar centerHeaderRow =  this.__getBodyHeaderRow(this.__tblCenterBody);\\r\\n\\t\\tif(centerHeaderRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcenterBodyHeaderCells = centerHeaderRow.cells;\\r\\n\\t\\t}\\r\\n\\t\\tvar setCellProperties = this.__setFixedCellProperties.bind(this);\\r\\n\\t\\tvar setCells = function(arrFixed,startIndex,endIndex,isLeftDirection)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor (var colIndex = startIndex; colIndex < endIndex; colIndex++)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar headerHeaderCell = centerHeaderHeaderCells[colIndex];\\r\\n\\t\\t    \\tsetCellProperties(arrFixed,headerHeaderCell,isLeftDirection);\\r\\n\\t\\t    \\tvar headerBodyCell = centerHeaderBodyCells[colIndex];\\r\\n\\t\\t    \\tsetCellProperties(arrFixed,headerBodyCell,isLeftDirection);\\r\\n\\t\\t    \\tvar headerRendererCell = centerHeaderRendererCells[colIndex];\\r\\n\\t\\t    \\tsetCellProperties(arrFixed,headerRendererCell,isLeftDirection);\\r\\n\\t\\t    \\tvar bodyHeaderCell = centerBodyHeaderCells[colIndex];\\r\\n\\t\\t    \\tsetCellProperties(arrFixed,bodyHeaderCell,isLeftDirection);\\r\\n\\t\\t    \\tfor (var rowIndex = 0; rowIndex < arrExtraHeaderCells.length; rowIndex++)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t    \\t\\tvar extraCell = arrExtraHeaderCells[rowIndex][colIndex];\\r\\n\\t\\t\\t    \\tsetCellProperties(arrFixed,extraCell,isLeftDirection);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\tthis.__callFixedArrayCallback.bind(this)(setCells);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createFixedBodyRows = function()\\r\\n\\t{\\r\\n\\t\\tvar headerRow = this.__getBodyHeaderRow(this.__tblCenterBody);\\r\\n\\t\\tif(headerRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createFixedBodyRow(headerRow);\\r\\n\\t\\t}\\r\\n\\t\\tvar arrRows = this.__getBodyBodyRow(this.__tblCenterBody);\\r\\n\\t\\tif(arrRows && arrRows.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0; count < arrRows.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar row = arrRows[count];\\r\\n\\t\\t\\t\\tthis.__createFixedBodyRow(row);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createFixedBodyRow = function(row)\\r\\n\\t{\\r\\n\\t\\t/*var centerBodyBodyCells = row.cells;\\r\\n\\t\\tvar setCellProperties = this.__setFixedCellProperties.bind(this);\\r\\n\\t\\tvar setCells = function(arrFixed,startIndex,endIndex,isLeftDirection)\\r\\n\\t\\t{\\r\\n\\t\\t    for (var colIndex = startIndex; colIndex < endIndex; colIndex++)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar fixedCell = centerBodyBodyCells[colIndex];\\r\\n\\t\\t    \\tsetCellProperties(arrFixed,fixedCell,isLeftDirection);\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\tthis.__callFixedArrayCallback.bind(this)(setCells);*/\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createFixedFooterRows = function()\\r\\n\\t{\\r\\n\\t\\tvar headerRow = this.__getBodyHeaderRow(this.__tblCenterFooter);\\r\\n\\t\\tif(headerRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createFixedFooterRow(headerRow);\\r\\n\\t\\t}\\r\\n\\t\\tvar arrRows = this.__getBodyBodyRow(this.__tblCenterFooter);\\r\\n\\t\\tif(arrRows && arrRows.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0; count < arrRows.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar row = arrRows[count];\\r\\n\\t\\t\\t\\tthis.__createFixedFooterRow(row);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createFixedFooterRow = function(row)\\r\\n\\t{\\r\\n\\t\\t/*var centerBodyBodyCells = row.cells;\\r\\n\\t\\tvar setCellProperties = this.__setFixedCellProperties.bind(this);\\r\\n\\t\\tvar setCells = function(arrFixed,startIndex,endIndex,isLeftDirection)\\r\\n\\t\\t{\\r\\n\\t\\t    for (var colIndex = startIndex; colIndex < endIndex; colIndex++)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar fixedCell = centerBodyBodyCells[colIndex];\\r\\n\\t\\t    \\tsetCellProperties(arrFixed,fixedCell,isLeftDirection);\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\tthis.__callFixedArrayCallback.bind(this)(setCells);*/\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__callFixedArrayCallback = function(callBack)\\r\\n\\t{\\r\\n\\t\\t/*if(this.__leftFixedColumn > 0 && this.__columns && this.__columns.length > this.__leftFixedColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcallBack(this.__arrFixedLeftCells,0,this.__leftFixedColumn,true);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__rightFixedColumn > 0 && this.__columns && this.__columns.length > this.__rightFixedColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcallBack(this.__arrFixedRightCells,this.__columns.length - this.__rightFixedColumn,this.__columns.length,false);\\r\\n\\t\\t}*/\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setFixedCellProperties = function(arrFixed,cell,isLeftDirection)\\r\\n\\t{\\r\\n\\t\\t/*this.__setFixedBackground(cell);\\r\\n\\t\\tthis.util.addStyleClass(cell,\\\"nsFixedDataGridCell\\\");\\r\\n\\t\\tif(isLeftDirection && cell.cellIndex === (this.__leftFixedColumn - 1))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsFixedLeftLastCell\\\");\\r\\n\\t\\t}\\r\\n\\t\\telse if(!isLeftDirection && cell.cellIndex === (this.__columns.length - this.__rightFixedColumn))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsFixedRightFirstCell\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableFixedColumnAnimation)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsFixedDataGridCellAnimate\\\");\\r\\n\\t\\t}*/\\r\\n\\t\\tarrFixed.push(cell);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setFixedBackground = function(cell) \\r\\n\\t{\\r\\n\\t\\tvar row = cell.parentNode;\\r\\n\\t\\tvar cellBackground = this.util.getStyleValue(cell,\\\"background-color\\\",false);\\r\\n\\t\\tcellBackground = (cellBackground == \\\"transparent\\\" || cellBackground == \\\"rgba(0, 0, 0, 0)\\\") ? null : cellBackground;\\r\\n\\t\\r\\n\\t\\tvar rowBackground = this.util.getStyleValue(row,\\\"background-color\\\",false);\\r\\n\\t\\trowBackground = (rowBackground == \\\"transparent\\\" || rowBackground == \\\"rgba(0, 0, 0, 0)\\\") ? null : rowBackground;\\r\\n\\t\\r\\n\\t\\tvar background = rowBackground ? rowBackground : \\\"white\\\";\\r\\n\\t\\tbackground = cellBackground ? cellBackground : background;\\r\\n\\t\\t\\r\\n\\t\\tcell.style.backgroundColor = background;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setFixedCellsPosition = function()\\r\\n\\t{\\r\\n\\t\\t/*var divBodyContainer = this.__getVerticalScrollableContainer();\\r\\n\\t\\tvar divHorContainer = this.__getHorizontalScrollableContainer();\\r\\n\\t\\tvar scrollWidth = divHorContainer.scrollWidth;\\r\\n\\t\\tvar clientWidth = divHorContainer.clientWidth;\\r\\n\\t\\tvar scrollHeight = divBodyContainer.scrollHeight;\\r\\n\\t\\tvar clientHeight = divBodyContainer.clientHeight;\\r\\n\\t\\tvar top = divBodyContainer.scrollTop;\\r\\n\\t\\tvar left = divHorContainer.scrollLeft;\\r\\n\\t\\tvar right = scrollWidth - clientWidth - left;\\r\\n\\t\\tfor(var count = 0;count < this.__arrFixedLeftCells.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cell = this.__arrFixedLeftCells[count];\\r\\n\\t\\t\\tcell.style.right = null; \\r\\n\\t\\t\\tcell.style.left = left + \\\"px\\\";\\r\\n\\t\\t}\\r\\n\\t\\tfor(var count = 0;count < this.__arrFixedRightCells.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cell = this.__arrFixedRightCells[count];\\r\\n\\t\\t\\tcell.style.left = null;\\r\\n\\t\\t\\tcell.style.right = right + \\\"px\\\";\\r\\n\\t\\t}*/\\r\\n\\t};\\r\\n\\t\\r\\n\\t/*NSGrid.prototype.__setClassForFixedColumn = function(cell)\\r\\n\\t{\\r\\n\\t\\tthis.__setFixedBackground(cell);\\r\\n\\t\\tthis.util.addStyleClass(cell,\\\"nsFixedDataGridCell\\\");\\r\\n\\t\\tif(this.__leftFixedColumn > 0 && this.__columns && this.__columns.length > this.__leftFixedColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(cell.cellIndex === (this.__leftFixedColumn - 1))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsFixedLeftLastCell\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__rightFixedColumn > 0 && this.__columns && this.__columns.length > this.__rightFixedColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(cell.cellIndex === (this.__columns.length - this.__rightFixedColumn))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsFixedRightFirstCell\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t}*/\\r\\n\\t\\r\\n\\tNSGrid.prototype.__updateFixedColumnsForAllTables = function() \\r\\n\\t{\\r\\n\\t\\tthis.__updateStickyColumns(this.__tblCenterHeader);\\r\\n\\t\\tthis.__updateStickyColumns(this.__tblCenterBody);\\r\\n\\t\\tthis.__updateStickyColumns(this.__tblCenterFooter);\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSGrid.prototype.__updateStickyColumns = function(table,recalculate) \\r\\n\\t{\\r\\n\\t\\tvar arrRows = this.__getBodyBodyRow(table);\\r\\n\\t\\tif(arrRows && arrRows.length) {\\r\\n\\t\\t\\tvar stickyStartStates = this.__getFixedColumnIndicatorArray(\\\"Left\\\",recalculate);\\r\\n\\t\\t\\tvar stickyEndStates = this.__getFixedColumnIndicatorArray(\\\"Right\\\",recalculate);\\r\\n\\t\\t\\tvar row = arrRows[0];\\r\\n\\t\\t\\tvar cellWidths = this.__getCellWidths(row, recalculate);\\r\\n\\t\\t\\tvar startPositions = this.__getStickyStartColumnPositions(cellWidths, stickyStartStates);\\r\\n\\t\\t\\tvar endPositions = this.__getStickyEndColumnPositions(cellWidths, stickyEndStates);\\r\\n\\r\\n\\t\\t\\tvar lastStickyStart = stickyStartStates.lastIndexOf(true);\\r\\n\\t\\t\\tvar firstStickyEnd = stickyEndStates.indexOf(true);\\r\\n\\t\\t\\tfor(var rowIndex = 0;rowIndex < arrRows.length;rowIndex++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trow = arrRows[rowIndex];\\r\\n\\t\\t\\t\\tvar arrCells = row.cells;\\r\\n\\t\\t        for (var cellIndex = 0;cellIndex < arrCells.length;cellIndex++) \\r\\n\\t\\t        {\\r\\n\\t\\t        \\tconst cell = arrCells[cellIndex]\\r\\n\\t\\t        \\tif (stickyStartStates[cellIndex]) \\r\\n\\t\\t        \\t{\\r\\n\\t\\t        \\t\\tthis.__addStickyStyle(cell,\\\"Left\\\",startPositions[cellIndex],cellIndex === lastStickyStart);\\r\\n\\t\\t        \\t\\tthis.__setFixedBackground(cell);\\r\\n\\t\\t        \\t}\\r\\n\\t\\t        \\tif (stickyEndStates[cellIndex]) \\r\\n\\t\\t        \\t{\\r\\n\\t\\t        \\t\\tthis.__addStickyStyle(cell,\\\"Right\\\", endPositions[cellIndex],cellIndex === firstStickyEnd);\\r\\n\\t\\t        \\t\\tthis.__setFixedBackground(cell);\\r\\n\\t\\t        \\t}\\r\\n\\t\\t        }\\r\\n\\t\\t     }\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getFixedColumnIndicatorArray = function(direction,recalculate) \\r\\n\\t{\\r\\n\\t\\tvar fieldName = \\\"__cachedFixed\\\" + direction + \\\"Indicator\\\";\\r\\n\\t\\tvar arrIndicator = this[fieldName];\\r\\n\\t\\tvar directionLower = direction.toLowerCase();\\r\\n\\t\\tif(!recalculate && arrIndicator && arrIndicator.length) {\\r\\n\\t\\t\\treturn arrIndicator;\\r\\n\\t\\t}\\r\\n\\t\\tvar arrRet = [];\\r\\n\\t\\tfor(var count = 0; count < this.__columns.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objColumn = this.__columns[count];\\r\\n\\t\\t\\tif(objColumn.pinned && objColumn.pinned == directionLower) {\\r\\n\\t\\t\\t\\tarrRet.push(true);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse {\\r\\n\\t\\t\\t\\tarrRet.push(false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis[fieldName] = arrRet;\\r\\n\\t\\treturn arrRet;\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getCellWidths = function(row,recalculate)\\r\\n\\t{\\r\\n\\t\\tif(!recalculate && this.__cachedCellWidths && this.__cachedCellWidths.length) {\\r\\n\\t\\t\\treturn this.__cachedCellWidths;\\r\\n\\t\\t}\\r\\n\\t\\tvar cellWidths = [];\\r\\n\\t    var firstRowCells = row.children;\\r\\n\\t    for (var i = 0; i < firstRowCells.length; i++) {\\r\\n\\t      var cell = firstRowCells[i];\\r\\n\\t      cellWidths.push(cell.getBoundingClientRect().width);\\r\\n\\t    }\\r\\n\\t    this.__cachedCellWidths = cellWidths;\\r\\n\\t    return cellWidths;\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getStickyStartColumnPositions = function(widths,stickyStates)\\r\\n\\t{\\r\\n\\t    var positions = [];\\r\\n\\t    var nextPosition = 0;\\r\\n\\t\\r\\n\\t    for (var i = 0; i < widths.length; i++) {\\r\\n\\t      if (stickyStates[i]) {\\r\\n\\t        positions[i] = nextPosition;\\r\\n\\t        nextPosition += widths[i];\\r\\n\\t      }\\r\\n\\t    }\\r\\n\\t\\r\\n\\t    return positions;\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getStickyEndColumnPositions = function(widths,stickyStates)\\r\\n\\t{\\r\\n\\t\\tvar positions = [];\\r\\n\\t\\tvar nextPosition = 0;\\r\\n\\r\\n\\t    for (var i = widths.length; i > 0; i--) {\\r\\n\\t      if (stickyStates[i]) {\\r\\n\\t        positions[i] = nextPosition;\\r\\n\\t        nextPosition += widths[i];\\r\\n\\t      }\\r\\n\\t    }\\r\\n\\r\\n\\t    return positions;\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSGrid.prototype.__addStickyStyle = function(element,direction,dirValue,isBorderElement) \\r\\n    {\\r\\n\\t\\tvar directionLower = direction.toLowerCase();\\r\\n\\t    element.classList.add(\\\"nsFixedDataGridCell\\\");\\r\\n\\t    if (isBorderElement) {\\r\\n\\t    \\telement.classList.add(\\\"nsFixed\\\" + direction + \\\"LastCell\\\");\\r\\n\\t    }\\r\\n\\t    element.style[directionLower] = dirValue + \\\"px\\\";\\r\\n\\t    //element.style.zIndex = this._getCalculatedZIndex(element);\\r\\n\\t    /*if (this._needsPositionStickyOnElement) {\\r\\n\\t      element.style.cssText += 'position: -webkit-sticky; position: sticky; ';\\r\\n\\t    }*/\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSGrid.prototype.__isColumnFixed = function(index)\\r\\n\\t{\\r\\n\\t\\treturn ((index < this.__leftFixedColumn) || ((this.__orignalColumns.length - this.__rightFixedColumn) <= index));\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__isFixedColumnApplied = function()\\r\\n\\t{\\r\\n\\t\\treturn ((this.__leftFixedColumn > 0) || (this.__rightFixedColumn > 0));\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__addStyleForFixedCell = function(cell,colIndex)\\r\\n\\t{\\r\\n\\t\\tvar isColumnFixed = this.__isColumnFixed(colIndex);\\r\\n\\t\\tif(isColumnFixed) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsFixedDataGridCell\\\");\\r\\n\\t\\t\\tif(colIndex === (this.__leftFixedColumn - 1))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsFixedLeftLastCell\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(colIndex === (this.__columns.length - this.__rightFixedColumn))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsFixedRightFirstCell\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSGrid.prototype.__updateColumnClassForFixedColumns = function(index,direction)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar refreshCellClass = function(arrRows) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(arrRows && arrRows.length) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrRows.length;count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar cell = arrRows[count].cells[index];\\r\\n\\t\\t\\t\\t\\tif(direction == \\\"left\\\" || direction == \\\"right\\\") \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tself.util.addStyleClass(cell,\\\"nsFixedDataGridCell\\\");\\r\\n\\t\\t\\t\\t\\t\\tself.util.addStyleClass(cell,\\\"nsFixedDataGridCell\\\" + self.util.toCamelCase(direction));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tself.util.removeStyleClass(cell,\\\"nsFixedDataGridCell\\\");\\r\\n\\t\\t\\t\\t\\t\\tself.util.removeStyleClass(cell,\\\"nsFixedDataGridCellLeft\\\");\\r\\n\\t\\t\\t\\t\\t\\tself.util.removeStyleClass(cell,\\\"nsFixedDataGridCellRight\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__tblCenterHeaderBody) {\\r\\n\\t\\t\\tvar arrHeaderRows = this.__tblCenterHeaderBody.rows;\\r\\n\\t\\t\\trefreshCellClass(arrHeaderRows);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__tblCenterBodyBody) {\\r\\n\\t\\t\\tvar arrBodyRows = this.__tblCenterBodyBody.rows;\\r\\n\\t\\t\\trefreshCellClass(arrBodyRows);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__tblCenterFooterBody) {\\r\\n\\t\\t\\tvar arrFooterRows = this.__tblCenterFooterBody.rows;\\r\\n\\t\\t\\trefreshCellClass(arrFooterRows);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__updateColumnClassForFixedLastColumns();\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSGrid.prototype.__updateColumnClassForFixedLastColumns = function()\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar leftIndex = this.__leftFixedColumn - 1;\\r\\n\\t\\tvar rightIndex = this.__columns.length - this.__rightFixedColumn;\\r\\n\\t\\t\\r\\n\\t\\tvar resetCellClassByCon = function(con) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(con) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrCell = con.querySelectorAll(\\\".nsFixedLeftLastCell\\\");\\r\\n\\t\\t\\t\\tif(arrCell && arrCell.length) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < arrCell.length;count++) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar cell = arrCell[count];\\r\\n\\t\\t\\t\\t\\t\\tself.util.removeStyleClass(cell,\\\"nsFixedLeftLastCell\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tarrCell = con.querySelectorAll(\\\".nsFixedRightFirstCell\\\");\\r\\n\\t\\t\\t\\tif(arrCell && arrCell.length) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < arrCell.length;count++) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar cell = arrCell[count];\\r\\n\\t\\t\\t\\t\\t\\tself.util.removeStyleClass(cell,\\\"nsFixedRightFirstCell\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tvar refreshCellInRow = function(row) {\\r\\n\\t\\t\\tif(row) {\\r\\n\\t\\t\\t\\tif(row.cells.length > leftIndex) {\\r\\n\\t\\t\\t\\t\\tvar cell = row.cells[leftIndex];\\r\\n\\t\\t\\t\\t\\tself.util.addStyleClass(cell,\\\"nsFixedLeftLastCell\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(row.cells.length > rightIndex) {\\r\\n\\t\\t\\t\\t\\tvar cell = row.cells[rightIndex];\\r\\n\\t\\t\\t\\t\\tself.util.addStyleClass(cell,\\\"nsFixedRightFirstCell\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tvar refreshCellClass = function(arrRows) {\\r\\n\\t\\t\\tif(arrRows && arrRows.length) {\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrRows.length;count++) {\\r\\n\\t\\t\\t\\t\\trefreshCellInRow(arrRows[count]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tvar refreshCellInVirtual = function(row) {\\r\\n\\t\\t\\tresetCellClassByCon(row);\\r\\n\\t\\t\\trefreshCellInRow(row);\\r\\n\\t\\t\\treturn row;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tif(this.__isFixedColumnApplied()) {\\r\\n\\t\\t\\tif(this.__tblCenterHeaderBody) {\\r\\n\\t\\t\\t\\tresetCellClassByCon(this.__tblCenterHeaderBody);\\r\\n\\t\\t\\t\\tvar arrHeaderRows = this.__tblCenterHeaderBody.rows;\\r\\n\\t\\t\\t\\trefreshCellClass(arrHeaderRows);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__tblCenterBodyBody) {\\r\\n\\t\\t\\t\\tresetCellClassByCon(this.__tblCenterBodyBody);\\r\\n\\t\\t\\t\\tvar arrBodyRows = this.__tblCenterBodyBody.rows;\\r\\n\\t\\t\\t\\trefreshCellClass(arrBodyRows);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__tblCenterFooterBody) {\\r\\n\\t\\t\\t\\tresetCellClassByCon(this.__tblCenterFooterBody);\\r\\n\\t\\t\\t\\tvar arrFooterRows = this.__tblCenterFooterBody.rows;\\r\\n\\t\\t\\t\\trefreshCellClass(arrFooterRows);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__nsVirtualScroll) {\\r\\n\\t\\t\\t\\tthis.__nsVirtualScroll.updateItems(refreshCellInVirtual);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSGrid.prototype.__addStyleForFixedColumns = function()\\r\\n\\t{\\r\\n\\t\\tvar styleId = \\\"nsGridFixedColumnStyle\\\";\\r\\n\\t\\tvar arrStyle = [];\\r\\n\\t\\tvar table = this.__tblCenterHeader;\\r\\n\\t\\tvar arrRows = this.__getBodyBodyRow(table);\\r\\n\\t\\tif(arrRows && arrRows.length && this.__columns) {\\r\\n\\t\\t\\tvar styleTemplate = \\\".nsGridHeaderRow > .nsGridCell:nth-child(###index###),.nsGridFilterRow > .nsGridCell:nth-child(###index###),\\\" +\\r\\n\\t\\t\\t\\t\\t\\\".nsHeaderExtraRow > .nsGridCell:nth-child(###index###),.nsGridRow > .nsGridCell:nth-child(###index###),\\\" +\\r\\n\\t\\t\\t\\t\\t\\\".nsGridFooterRow > .nsGridCell:nth-child(###index###) {\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\\"    ###pos###;\\\\r\\\\n\\\" +\\r\\n\\t\\t\\t\\t\\t\\\"}\\\"\\r\\n\\t\\t\\tvar tableRect = table.getBoundingClientRect();\\r\\n\\t\\t\\t//|| tableRect.x > 0\\r\\n\\t\\t\\tif(!this.__tableRectFixedColumn) {\\r\\n\\t\\t\\t\\tthis.__tableRectFixedColumn = tableRect;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse {\\r\\n\\t\\t\\t\\ttableRect = this.__tableRectFixedColumn;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar row = arrRows[1];\\r\\n\\t\\t\\tvar arrCells = row.cells;\\r\\n\\t\\t\\tif(this.__leftFixedColumn > 0 && this.__columns.length > this.__leftFixedColumn)\\r\\n    \\t\\t{\\r\\n\\t\\t        for (var cellIndex = 0;cellIndex < arrCells.length;cellIndex++) \\r\\n\\t\\t        {\\r\\n\\t\\t        \\tvar cell = arrCells[cellIndex];\\r\\n\\t\\t        \\tvar cellRect = cell.getBoundingClientRect();\\r\\n\\t    \\t\\t\\tif(cell.cellIndex < this.__leftFixedColumn)\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t    var left = cellRect.x - tableRect.x;\\r\\n\\t    \\t\\t\\t    var cellStyle = styleTemplate.replace(/###index###/g,cell.cellIndex + 1);\\r\\n\\t    \\t\\t\\t    cellStyle = cellStyle.replace(\\\"###pos###\\\",\\\"left: \\\" + left + \\\"px\\\");\\r\\n\\t    \\t\\t\\t    arrStyle.push(cellStyle);\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t\\telse \\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tbreak;\\r\\n\\t    \\t\\t\\t}\\r\\n\\t\\t        }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__rightFixedColumn > 0 && this.__columns.length > this.__rightFixedColumn)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar totalWidth = 0;\\r\\n\\t\\t\\t\\tvar startingRightColIndex = this.__columns.length - this.__rightFixedColumn;\\r\\n\\t\\t\\t\\tfor (var cellIndex = arrCells.length - 1;cellIndex > -1;cellIndex--) \\r\\n\\t\\t        {\\r\\n\\t\\t        \\tvar cell = arrCells[cellIndex];\\r\\n\\t\\t        \\tvar cellRect = cell.getBoundingClientRect();\\r\\n\\t\\t        \\tif(cell.cellIndex >= startingRightColIndex)\\r\\n\\t    \\t\\t\\t{\\r\\n\\t\\t        \\t\\tvar right = 0;\\r\\n\\t    \\t\\t\\t\\tif(cellIndex !== arrCells.length - 1) \\r\\n\\t    \\t\\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\t\\tright = totalWidth;\\r\\n\\t    \\t\\t\\t\\t}\\r\\n\\t    \\t\\t\\t\\ttotalWidth += cellRect.width;\\r\\n\\t    \\t\\t\\t\\tvar cellStyle = styleTemplate.replace(/###index###/g,cell.cellIndex + 1);\\r\\n\\t    \\t\\t\\t    cellStyle = cellStyle.replace(\\\"###pos###\\\",\\\"right: \\\" + right + \\\"px\\\");\\r\\n\\t    \\t\\t\\t    arrStyle.push(cellStyle);\\r\\n\\t    \\t\\t\\t}\\r\\n\\t\\t        \\telse \\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tbreak;\\r\\n\\t    \\t\\t\\t}\\r\\n\\t\\t        }\\r\\n\\t\\t\\t}\\r\\n\\t        var styleElement = document.querySelector(\\\"#\\\" + styleId);\\r\\n\\t        if (styleElement) {\\r\\n\\t          styleElement.parentNode.removeChild(styleElement);\\r\\n\\t        }\\r\\n\\t        this.util.addStylesToHead(styleId,arrStyle);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\t/******************************End of Fixed Column logic **************************/\\r\\n\\t/******************************Event Listeners *************************************/\\r\\n\\t\\r\\n\\tNSGrid.prototype.__arrowClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"DIV\\\");\\r\\n\\t\\tif(target && target.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rowIndex = target.getAttribute(\\\"ns-parent-row-count\\\");\\r\\n\\t\\t\\tvar isCollapse = this.__isArrowCollapsed(target);\\r\\n\\t\\t\\trowIndex = parseInt(rowIndex);\\r\\n\\t\\t\\tif(rowIndex > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t\\tif(item[this.__childField]  && item[this.__childField].length > 0)\\r\\n\\t\\t        {\\r\\n\\t\\t\\t\\t\\tthis.__showHideRow(rowIndex,target,!isCollapse);\\r\\n\\t\\t        }\\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__objGrid.__handleOnDemandClick(item,event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__objGrid.arrowClickHandler(item,!isCollapse);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__headerClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__onGridLine)\\r\\n\\t\\t{\\r\\n\\t\\t\\t return;\\r\\n\\t\\t}\\r\\n\\t     var target = this.util.getTarget(event);\\r\\n\\t     //adding the below condition so that if we add a span or a font and click on it then we should navigate till we find the header object\\r\\n\\t     target = this.util.findParent(target,\\\"TD\\\");\\r\\n\\t     var columnDetail = this.__getColumnObject(target.getAttribute(\\\"currentColumnIndex\\\"));\\r\\n\\t     this.__nsGridSort.handle(target,columnDetail,this.__isMultiColumnKeyPressed);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__headerMouseOverHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"TD\\\");\\r\\n\\t\\tthis.__headerMouseMoveRef = this.__headerMouseMoveHandler.bind(this);\\r\\n\\t\\tthis.util.addEvent(target,\\\"mousemove\\\",this.__headerMouseMoveRef);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__headerMouseOutHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target =  this.util.getTarget(event);\\r\\n\\t\\ttarget =  this.util.findParent(target,\\\"TD\\\");\\r\\n\\t\\tthis.__onGridLine = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.util.removeEvent(target,\\\"mousemove\\\",this.__headerMouseMoveRef);\\r\\n\\t\\tthis.__headerMouseMoveRef = null;\\r\\n\\t\\t/*this.util.removeEvent(target,\\\"mousedown\\\",this.__headerMouseDownRef);\\r\\n\\t\\tthis.__headerMouseDownRef = null;*/\\r\\n\\t\\t\\r\\n\\t\\tthis.util.removeStyleClass(target,\\\"nsResizeHandleActive\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__headerMouseMoveHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"TD\\\");\\r\\n\\t\\tif(target)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objColumn = this.__getColumnObject(target.getAttribute(\\\"currentColumnIndex\\\"));\\r\\n\\t\\t\\t//var offset = this.util.getEventPosition(event);\\r\\n\\t\\t\\tif(objColumn && objColumn[\\\"resizable\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar posEvent = this.util.getEventPosition(event,this.__divCenterTableHeaderContainer);\\r\\n\\t\\t\\t\\tif(this.__isMouseOnElement(target,posEvent.left,posEvent.top))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(target,\\\"nsResizeHandleActive\\\");\\r\\n\\t\\t\\t\\t\\tthis.__onGridLine = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeStyleClass(target,\\\"nsResizeHandleActive\\\");\\r\\n\\t\\t\\t\\t\\tthis.__onGridLine = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__headerMouseDownHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t    var target = this.util.getTarget(event);\\r\\n\\t    target = this.util.findParent(target,\\\"TD\\\");\\r\\n\\t    if(target)\\r\\n\\t\\t{\\r\\n\\t    \\tvar objColumn = this.__getColumnObject(target.getAttribute(\\\"currentColumnIndex\\\"));\\r\\n\\t\\t    if(objColumn)\\r\\n\\t\\t\\t{\\r\\n\\t\\t    \\tif(objColumn[\\\"resizable\\\"])\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\t//this.__nsGridColumnResize.startResize(event,target);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tif(objColumn[\\\"draggable\\\"])\\r\\n\\t\\t    \\t{\\r\\n\\t\\t\\t\\t   this.__nsGridColumnMove.handle(event,target);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__headerMenuClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\t event = this.util.getEvent(event);\\r\\n\\t     event.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__bodyCellEventHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t    target = this.util.findParent(target,\\\"TD\\\");\\r\\n\\t    if(target)\\r\\n\\t    {\\r\\n\\t    \\tvar index = target.cellIndex;\\r\\n\\t\\t\\tswitch(event.type)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase \\\"mouseover\\\":\\r\\n\\t\\t\\t\\t\\tvar colGroup = document.getElementById(this.getID() + \\\"BodyColGroup\\\" + this.__columns[index].dataField);\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(colGroup,\\\"nsGridCellHover\\\");\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"mouseleave\\\":\\r\\n\\t\\t\\t\\t\\tvar colGroup = document.getElementById(this.getID() + \\\"BodyColGroup\\\" + this.__columns[index].dataField);\\r\\n\\t\\t\\t\\t\\tthis.util.removeStyleClass(colGroup,\\\"nsGridCellHover\\\");\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"click\\\":\\r\\n\\t\\t\\t\\t\\t/*if(this.__lastBodyCellFocus)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.util.removeStyleClass(this.__lastBodyCellFocus,\\\"nsCellFocus\\\");\\r\\n\\t\\t\\t\\t\\t\\tif(this.__enableCellSelection)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar row = this.util.findParent(this.__lastBodyCellFocus,\\\"TR\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\tvar rowIndex = this.__getIndexFromRow(this.__lastBodyCellFocus);\\r\\n\\t\\t\\t\\t\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__dispatchEvent(NSGrid.CELL_UNSELECTED,item,{cellIndex:this.__lastBodyCellFocus.cellIndex,rowIndex:rowIndex,item:item,cell:this.__lastBodyCellFocus,row:row});\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tthis.__lastBodyCellFocus = null;\\r\\n\\t\\t\\t\\t\\t}*/\\r\\n\\t\\t\\t\\t\\tvar row = this.util.findParent(target,\\\"TR\\\");\\r\\n\\t\\t\\t\\t    var rowIndex = this.__getIndexFromRow(row);\\r\\n\\t\\t\\t\\t    var item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t\\t    this.__dispatchEvent(NSGrid.CELL_CLICKED,item,{cellIndex:index,rowIndex:rowIndex,item:item,cell:target,row:row});\\r\\n\\t\\t\\t\\t    /*if(this.__enableCellSelection)\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\tthis.util.addStyleClass(target,\\\"nsCellFocus\\\");\\r\\n\\t\\t\\t\\t\\t\\tthis.__dispatchEvent(NSGrid.CELL_SELECTED,item,{cellIndex:index,rowIndex:rowIndex,item:item,cell:target,row:row});\\r\\n\\t\\t\\t\\t\\t\\tthis.__lastBodyCellFocus = target;\\r\\n\\t\\t\\t\\t    }*/\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase \\\"dblclick\\\":\\r\\n\\t\\t\\t\\t\\tvar row = this.util.findParent(target,\\\"TR\\\");\\r\\n\\t\\t\\t\\t    var rowIndex = this.__getIndexFromRow(row);\\r\\n\\t\\t\\t\\t    var item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t\\t    this.__dispatchEvent(NSGrid.CELL_DOUBLE_CLICKED,item,{cellIndex:index,rowIndex:rowIndex,item:item,cell:target,row:row});\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getHeaderMenuDataProvider = function(target)\\r\\n\\t{\\r\\n\\t\\tvar source = [];\\r\\n\\t\\tif(target)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttarget = this.util.findParent(target,\\\"TD\\\");\\r\\n\\t\\t\\tvar objColumn = this.__getColumnObject(target.getAttribute(\\\"currentColumnIndex\\\"));\\r\\n\\t\\t\\tvar colIndex = objColumn[this.__fieldColIndex];\\r\\n\\t\\t\\tif(objColumn)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(objColumn[\\\"sortable\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsource.push({id:\\\"sort\\\",title: \\\"Sort\\\",children:[{id:\\\"sortAsc\\\",title: \\\"Ascending\\\"},{id:\\\"sortDesc\\\",title: \\\"Descending\\\"}]});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(objColumn[\\\"draggable\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsource.push({id:\\\"pin\\\",title: \\\"Pin\\\",children:[{id:\\\"pinLeft\\\",title: \\\"Left\\\"},{id:\\\"pinRight\\\",title: \\\"Right\\\"},{id:\\\"pinNo\\\",title: \\\"No Pin\\\"}]});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(objColumn[\\\"hideable\\\"] && this.__isColumnValidForSwapOrRemove(colIndex))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsource.push({id:\\\"hideColumn\\\",title: \\\"Hide Column\\\"});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(objColumn[\\\"autoSize\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsource.push({id:\\\"autoSize\\\",title: \\\"Autosize Column\\\"});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn source;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__headerMenuHandler = function(target,item)\\r\\n\\t{\\r\\n\\t\\tif(target && item)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttarget = this.util.findParent(target,\\\"TD\\\");\\r\\n\\t\\t\\tvar objColumn = this.__getColumnObject(target.getAttribute(\\\"currentColumnIndex\\\"));\\r\\n\\t\\t\\tif(objColumn)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar colIndex = objColumn[this.__fieldColIndex];\\r\\n\\t\\t\\t\\tswitch(item[\\\"id\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcase \\\"sortAsc\\\":\\r\\n\\t\\t\\t\\t\\t\\tthis.sortBy(colIndex,true);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase \\\"sortDesc\\\":\\r\\n\\t\\t\\t\\t\\t\\tthis.sortBy(colIndex,false);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase \\\"hideColumn\\\":\\r\\n\\t\\t\\t\\t\\t\\tthis.hideColumn(colIndex);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase \\\"autoSize\\\":\\r\\n\\t\\t\\t\\t\\t\\tthis.autoResizeColumn(colIndex);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase \\\"pinLeft\\\":\\r\\n\\t\\t\\t\\t\\t\\tthis.pinColumn(colIndex,\\\"left\\\");\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase \\\"pinRight\\\":\\r\\n\\t\\t\\t\\t\\t\\tthis.pinColumn(colIndex,\\\"right\\\");\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase \\\"pinNo\\\":\\r\\n\\t\\t\\t\\t\\t\\tthis.pinColumn(colIndex,\\\"no\\\");\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__rowMouseHover = function(event)\\r\\n\\t{\\r\\n\\t\\t event = this.util.getEvent(event);\\r\\n\\t     var target = this.util.getTarget(event);\\r\\n\\t     target = this.util.findParent(target,\\\"TR\\\");\\r\\n\\t\\t var index = this.__getIndexFromRow(target);\\r\\n\\t\\t if(target && index > -1 && this.__isMouseHoverAllowed(index))\\r\\n\\t     {\\r\\n\\t\\t\\t this.util.addStyleClass(target,\\\"nsRowHover\\\");\\r\\n\\t\\t\\t this.__navigationIndex = index;\\r\\n\\t\\t\\t var item = this.__getItemByIndex(index);\\r\\n\\t\\t\\t this.__dispatchEvent(NSGrid.ROW_NAVIGATED,item,{rowIndex:index,item:item,row:target});\\r\\n\\t     }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__rowMouseOut = function(event)\\r\\n\\t{\\r\\n\\t\\t var target = this.util.getTarget(event);\\r\\n\\t\\t target = this.util.findParent(target,\\\"TR\\\");\\r\\n\\t     if(target)\\r\\n\\t     {\\r\\n\\t    \\t this.util.removeStyleClass(target,\\\"nsRowHover\\\");\\r\\n\\t     }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__rowClickHandler= function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t    var target = this.util.getTarget(event);\\r\\n\\t    target = this.util.findParent(target,\\\"TR\\\");\\r\\n\\t    var index = this.__getIndexFromRow(target);\\r\\n\\t    var item = this.__getItemByIndex(index);\\r\\n\\t\\tthis.__dispatchEvent(NSGrid.ROW_CLICKED,item,{rowIndex:index,item:item,row:target});\\r\\n\\t\\tif(this.__enableRowSelection)\\r\\n\\t\\t{\\r\\n\\t\\t    this.__setIndex(index,false);\\r\\n\\t\\t}\\r\\n\\t    this.__lastNavigationDirection = null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__rowDblClickHandler= function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t    var target = this.util.getTarget(event);\\r\\n\\t    target = this.util.findParent(target,\\\"TR\\\");\\r\\n\\t    var index = this.__getIndexFromRow(target);\\r\\n\\t    var item = this.__getItemByIndex(index);\\r\\n\\t\\tthis.__dispatchEvent(NSGrid.ROW_DOUBLE_CLICKED,item,{rowIndex:index,item:item,row:target});\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setIndex = function(index,isMultiSelect)\\r\\n\\t{\\r\\n\\t\\tif(index > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisMultiSelect = Boolean.parse(isMultiSelect);\\r\\n\\t\\t\\tif (this.__isShiftPressed && this.__enableMultipleSelection)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__multiSectionHandler(index);\\r\\n\\t\\t    }\\r\\n\\t\\t    else if(isMultiSelect || (this.__isCtrlPressed && this.__enableMultipleSelection))\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tif(this.__isRowSelected(index))\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.__markRowUnselected(index);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\telse\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.__markRowSelected(index);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    }\\r\\n\\t\\t    else\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__clearAllRowSelection(false);\\r\\n\\t\\t    \\tthis.__markRowSelected(index);\\r\\n\\t\\t    } \\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__bodyScrollHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\tif(this.__stopScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttarget.scrollLeft = this.__lastScrollPos[0];\\r\\n\\t\\t\\ttarget.scrollTop = this.__lastScrollPos[1];\\r\\n\\t\\t\\tconsole.log(this.__stopScroll);\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t}\\r\\n\\t\\tvar scrollPos = target.scrollTop;\\r\\n\\t\\tvar scrollValue = (target.scrollHeight * this.__bottomPercentageForAddRows) /100;\\r\\n\\t\\tif(scrollPos > this.__bodyScrollPos)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif((target.scrollHeight - scrollPos) < scrollValue)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tif((this.__isPaginationModeAuto || this.__rowsRendered) && this.__enableAsyncLoadPagination)\\r\\n\\t\\t        {\\r\\n\\t\\t\\t\\t\\tif(this.__totalRecords > this.__getTotalRows())\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(this.__processArrayAsync)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__processArrayAsync.stop();\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tvar totalRows = this.__getTotalRows();\\r\\n\\t\\t\\t\\t\\t\\tthis.__createBodyBody(this.__arrInternalSource,totalRows,totalRows + 20,true);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t        }\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar fromRecord =  this.__getTotalRows();\\r\\n\\t\\t\\t\\t\\tif(fromRecord === this.__totalRecords)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__rowsRendered = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar toRecord = fromRecord +  this.__pageSize - 1;\\r\\n\\t\\t\\t\\t\\t\\ttoRecord = (toRecord < this.__totalRecords) ? toRecord : ((toRecord === this.__totalRecords) ? this.__totalRecords - 1 : this.__totalRecords);\\r\\n\\t\\t\\t\\t\\t\\tthis.__paginationFetchRecordCallBack(fromRecord,toRecord,this.__pageSize);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t\\tthis.__lastScrollPos = [target.scrollLeft,target.scrollTop];\\r\\n\\t\\tthis.__bodyScrollPos = target.scrollTop;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__infiniteScrollEnabler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\tvar scrollPos = target.scrollTop;\\r\\n\\t\\tvar itemToBegin = 0;\\r\\n\\t\\tvar tableTop = 0; \\r\\n\\t    if(scrollPos > this.__scrollOffsetPosition)\\r\\n\\t    {\\r\\n\\t    \\ttableTop = scrollPos - this.__scrollOffsetPosition;\\r\\n\\t    \\titemToBegin = Math.ceil(tableTop/this.__virtualRowHeight);\\r\\n\\t    }\\r\\n\\t    else\\r\\n\\t    {\\r\\n\\t    \\ttableTop = 0;\\r\\n\\t    \\titemToBegin = 0;\\r\\n\\t    }\\r\\n\\t    return (itemToBegin <= this.__getTotalRows());\\r\\n\\t};\\r\\n\\t\\r\\n\\t/******************************End of Event Listeners*************************************/\\r\\n\\t\\r\\n\\t/******************************************************Start of Selection Functions*************************************************************/\\r\\n\\tNSGrid.prototype.__isMouseHoverAllowed = function(index)\\r\\n\\t{\\r\\n\\t\\t/*var item = this.__getItemByIndex(index);\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn !item[this.__fieldDisableHover];\\r\\n\\t\\t}*/\\r\\n\\t\\treturn true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__markRowSelected= function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1)\\r\\n\\t    {\\r\\n\\t        if(!this.__isRowSelected(index))\\r\\n\\t        {\\r\\n\\t        \\tthis.__setMultiSelectedVars(index,true);\\r\\n\\t            this.__setValuesForSelectedRow(index);\\r\\n\\t        \\tif(this.__enableVirtualScroll)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tthis.__virtualRowSelection();\\r\\n\\t        \\t}\\r\\n\\t        \\telse\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar row = this.__getRowByIndex(index);\\r\\n\\t            \\tthis.util.addStyleClass(row,this.__CLASS_SELECTED_ROW); \\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__markRowUnselected= function(index)\\r\\n\\t{\\r\\n\\t\\tif(this.__isRowSelected(index) && this.__isMouseHoverAllowed(index))\\r\\n\\t    {\\r\\n\\t    \\tvar isUnselected = this.__setMultiSelectedVars(index,false);\\r\\n\\t        if(isUnselected)\\r\\n\\t        {\\r\\n\\t        \\tthis.__setValuesForUnselectedRow(index);\\r\\n\\t        }\\r\\n\\t        if(this.__enableVirtualScroll)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tthis.__virtualRowSelection();\\r\\n\\t    \\t}\\r\\n\\t    \\telse\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tvar row = this.__getRowByIndex(index);\\r\\n\\t    \\t\\tthis.util.removeStyleClass(row,this.__CLASS_SELECTED_ROW);\\r\\n\\t    \\t}\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setValuesForSelectedRow = function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1 && this.__isMouseHoverAllowed(index))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldSelected] = true;\\r\\n\\t\\t\\t    this.__selectedIndex = index;\\r\\n\\t\\t\\t    this.__navigationIndex = index;\\r\\n\\t\\t\\t    this.__dispatchEvent(NSGrid.ROW_SELECTED,item,{index:index});\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setValuesForUnselectedRow = function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1 && this.__isMouseHoverAllowed(index))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldSelected] = false;\\r\\n\\t\\t\\t\\tthis.__dispatchEvent(NSGrid.ROW_UNSELECTED,item,{index:index});\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__virtualRowSelection = function()\\r\\n\\t{\\r\\n\\t\\tvar arrRows = this.__getAllBodyRows();\\r\\n\\t\\tif(arrRows && arrRows.length > 0 && this.__arrInternalSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar row = null;\\r\\n\\t\\t\\tvar index = null;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0; count < arrRows.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trow = arrRows[count];\\r\\n\\t\\t\\t\\tindex = this.__getIndexFromRow(row);\\r\\n\\t\\t\\t\\titem = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\tif(item && this.__isMouseHoverAllowed(index))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item[this.__fieldSelected])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t//DONOT REPLACE WITH __markRowSelected\\r\\n\\t\\t\\t\\t\\t\\tthis.util.addStyleClass(row,this.__CLASS_SELECTED_ROW); \\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t//DONOT REPLACE WITH __markRowUnselected\\r\\n\\t\\t\\t\\t\\t\\tthis.util.removeStyleClass(row,this.__CLASS_SELECTED_ROW);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__clearAllRowSelection= function(setIndexVariables)\\r\\n\\t{\\r\\n\\t\\tvar size = this.__selectedIndexes.length;\\r\\n\\t    for (var count = size - 1; count >= 0 ; count--)\\r\\n\\t    {\\r\\n\\t    \\tvar index = this.__selectedIndexes[count];\\r\\n\\t        this.__markRowUnselected(index);\\r\\n\\t    }\\r\\n\\t    this.__setMultiSelectedVars(-1,true);\\r\\n\\t    if(setIndexVariables)\\r\\n\\t    {\\r\\n\\t    \\tthis.__selectedIndex = -1;\\r\\n\\t        this.__navigationIndex = -1;\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__tableCellNavigatorEventHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tswitch(event.type)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcase NSTableCellNavigator.CELL_SELECTED:\\r\\n\\t\\t\\t\\tvar cell = event.cell;\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsCellFocus\\\");\\r\\n\\t\\t\\t\\tvar row = event.row;\\r\\n\\t\\t\\t    var rowIndex = this.__getIndexFromRow(row);\\r\\n\\t\\t\\t    var item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t    this.__dispatchEvent(NSGrid.CELL_SELECTED,item,{cellIndex:event.cellIndex,rowIndex:rowIndex,item:item,cell:cell,row:row});\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase NSTableCellNavigator.CELL_UNSELECTED:\\r\\n\\t\\t\\t\\tvar cell = event.cell;\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(cell,\\\"nsCellFocus\\\");\\r\\n\\t\\t\\t\\tvar row = event.row;\\r\\n\\t\\t\\t\\tvar rowIndex = this.__getIndexFromRow(row);\\r\\n\\t\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t\\tthis.__dispatchEvent(NSGrid.CELL_UNSELECTED,item,{cellIndex:event.cellIndex,rowIndex:rowIndex,item:item,cell:cell,row:row});\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase NSTableCellNavigator.CELL_SELECTABLE:\\r\\n\\t\\t\\t\\t//var cell = event.cell;\\r\\n\\t\\t\\t\\t//var row = event.row;\\t\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__tableCellSelectionEventHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tswitch(event.type)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcase NSCellSelection.SELECTION_START:\\r\\n\\t\\t\\t\\tconsole.debug(\\\"Selection Started\\\");\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase NSCellSelection.SELECTION_END:\\r\\n\\t\\t\\t\\tconsole.debug(\\\"Selection Ended with cells \\\" + event.selectedCells);\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase NSCellSelection.SET_CELL_VALUE:\\r\\n\\t\\t\\t\\tvar cellIndex = event.cellIndex;\\r\\n\\t\\t\\t\\tvar cell = event.cell;\\r\\n\\t\\t\\t\\tvar row = event.row;\\r\\n\\t\\t\\t\\tvar dataToBeSet = event.dataToBeSet;\\r\\n\\t\\t\\t\\tvar rowIndex = this.__getIndexFromRow(row);\\r\\n\\t\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t\\tvar headerBodyRow = this.__getHeaderBodyRow(this.__tblCenterHeader);\\r\\n\\t\\t\\t\\tif(headerBodyRow)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar headerCell = headerBodyRow.cells[cellIndex];\\r\\n\\t\\t\\t\\t\\tvar columnDetail = this.__getColumnObject(headerCell.getAttribute(\\\"currentColumnIndex\\\"));\\r\\n\\t\\t\\t\\t\\tif(item && columnDetail)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[columnDetail[\\\"dataField\\\"]] = dataToBeSet;\\r\\n\\t\\t\\t\\t\\t\\tthis.updateItemInDataSource(item);\\r\\n\\t\\t\\t\\t\\t\\tthis.__updateCellText(row,cell,item,columnDetail,rowIndex,columnDetail[self.__fieldColIndex]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\t\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__resetPluggins = function()\\r\\n\\t{\\r\\n\\t\\t//this.__nsGridSort.resetVariables();\\r\\n\\t\\t//this.__nsGridColumnMove = new NSGridColumnMove(this);\\r\\n\\t\\tif(this.__nsGridFilter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsGridFilter.resetVariables();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__nsGridEditor)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsGridEditor.resetVariables();\\r\\n\\t\\t}\\r\\n\\t\\t//this.__nsToolTipInElement = new this.util.nsToolTipInElement();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__callPlugginsInitialize = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__nsGridEditor)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsGridEditor.initialize();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__multiSectionHandler= function(lastIndex)\\r\\n\\t{\\r\\n\\t\\t if(!lastIndex)\\r\\n\\t\\t {\\r\\n\\t\\t\\t return;\\r\\n\\t\\t }\\r\\n\\t\\t if (this.__selectedItems.length === 0)\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.__isRowSelected(lastIndex);\\r\\n\\t\\t     return;\\r\\n\\t\\t }\\r\\n\\t\\t var firstIndex = this.__selectedIndexes[this.__selectedIndexes.length - 1];\\r\\n\\t\\t if(lastIndex === firstIndex)\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.__markRowUnselected(lastIndex);\\r\\n\\t\\t\\t return;\\r\\n\\t\\t }\\r\\n\\t\\t var isDown = lastIndex > firstIndex;\\r\\n\\t\\t var isSelection = !this.__isRowSelected(lastIndex);\\r\\n\\t\\t var counter = firstIndex;\\r\\n\\t\\t do\\r\\n\\t\\t {\\r\\n\\t\\t\\t  counter = isDown ? (counter + 1) : (counter - 1);\\r\\n\\t\\t\\t  if (isSelection)\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  this.__markRowSelected(counter);\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  else\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  this.__markRowUnselected(counter);\\r\\n\\t\\t\\t  }\\r\\n\\t\\t }\\r\\n\\t\\t while(counter != lastIndex);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setMultiSelectedVars = function(index,add)\\r\\n\\t{\\r\\n\\t\\tif(index === -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__selectedItems = [];\\t\\r\\n\\t\\t\\tthis.__selectedIndexes = [];\\t\\r\\n\\t\\t}\\r\\n\\t\\telse if(add)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar data = this.__getItemByIndex(index);\\r\\n\\t\\t\\tthis.__selectedItems.push(data);\\r\\n\\t\\t\\tthis.__selectedIndexes.push(index);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isUnselected = false;\\r\\n\\t\\t\\tfor (var count= 0; count < this.__selectedIndexes.length ; count++)\\r\\n\\t        {\\r\\n\\t            if (this.__selectedIndexes[count] === index)\\r\\n\\t            {\\r\\n\\t                this.__selectedItems.splice(count,1);\\r\\n\\t                this.__selectedIndexes.splice(count,1);\\r\\n\\t                isUnselected = true;\\r\\n\\t                break;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t\\t\\treturn isUnselected;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\treturn true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__isRowSelected= function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1)\\r\\n\\t    {\\r\\n\\t    \\tvar item = this.__getItemByIndex(index);\\r\\n\\t    \\tif(item)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn item[this.__fieldSelected];\\r\\n\\t    \\t}\\r\\n\\t    }   \\r\\n\\t    return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setVisibilityOfColumn = function(index,isVisible)\\r\\n\\t{\\r\\n\\t\\tvar style;\\r\\n\\t    if (isVisible) \\r\\n\\t    {\\r\\n\\t    \\tstyle = \\\"\\\";\\r\\n\\t    }\\r\\n\\t    else\\r\\n\\t    {\\r\\n\\t    \\tstyle = \\\"none\\\";\\r\\n\\t    }\\r\\n\\t\\tvar rows = this.__tblCenterHeader.getElementsByTagName(\\\"tr\\\");\\r\\n\\t\\tfor (var count = 0; count < rows.length;count++) \\r\\n\\t\\t{\\r\\n\\t\\t     var cells = rows[count].cells;\\r\\n\\t\\t     if(cells.length > index)\\r\\n\\t\\t     {\\r\\n\\t\\t    \\t cells[index].style.display = style;\\r\\n\\t\\t     }\\r\\n\\t\\t     else\\r\\n\\t\\t     {\\r\\n\\t\\t    \\t return;\\r\\n\\t\\t     }\\r\\n\\t\\t}\\r\\n\\t\\trows = this.__tblCenterBody.getElementsByTagName(\\\"tr\\\");\\r\\n\\t\\tfor (var count = 0; count < rows.length;count++) \\r\\n\\t\\t{\\r\\n\\t\\t     var cells = rows[count].cells;\\r\\n\\t\\t     cells[index].style.display = style;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__keyDownHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.hasFocus())\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tif(this.__enableMultiSort)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__isMultiColumnKeyPressed = event[this.__multiColumnKey + \\\"Key\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__isShiftPressed = event.shiftKey;\\r\\n\\t\\t\\tthis.__isCtrlPressed = event.ctrlKey;\\r\\n\\t\\t\\tvar isShiftCtrlPressed = this.__isShiftPressed || this.__isCtrlPressed;\\r\\n\\t\\t\\tvar keyCode = this.util.getKeyUnicode(event);\\r\\n\\t\\t\\tif(this.__enableKeyboardNavigation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGridKeyboard.keyDownHandler(event,keyCode);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(keyCode === this.util.KEYCODE.SHIFT)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.makeBodyUnselectable();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__keyUpHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.util.getKeyUnicode(event) === this.util.KEYCODE.CTRL)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isCtrlPressed = false;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.getKeyUnicode(event) === this.util.KEYCODE.SHIFT)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isShiftPressed = false;\\r\\n\\t\\t\\tthis.util.makeBodySelectable();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.getKeyUnicode(event) === this.util.KEYCODE[this.__multiColumnKey.toUpperCase()] && this.__enableMultiSort)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isMultiColumnKeyPressed = false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t/******************************************************End of Selection Functions*************************************************************/\\r\\n\\t/******************************************************Start of Filter Logic*************************************************************/\\r\\n\\tNSGrid.prototype.__highlightDiv = function(divText,colIndex)\\r\\n\\t{\\r\\n\\t\\tthis.__nsGridFilter.__highlightDiv(divText,colIndex);\\r\\n\\t};\\r\\n\\t/******************************************************End of Filter Logic*************************************************************/\\r\\n\\t/******************************************************Start of Context Menu*************************************************************/\\r\\n\\t\\r\\n\\tNSGrid.prototype.__initializeContextMenu = function()\\r\\n\\t{\\r\\n\\t\\t//if(!this.__contextMenu)\\r\\n\\t\\t//{\\r\\n\\t\\t\\tvar contextMenuSetting = {parent:this.__tblCenterBody,isContextMenu:true,createRunTime:true,sourceProvider:this.__getContextMenuDataProvider.bind(this),targetType:\\\"TD\\\"};\\r\\n\\t\\t\\tif(this.__contextMenuSetting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var key in this.__contextMenuSetting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t//grid setting should not be overriden by the users\\r\\n\\t\\t\\t\\t\\tif(!contextMenuSetting[key])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcontextMenuSetting[key] = this.__contextMenuSetting[key];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__contextMenu = new NSMenu(contextMenuSetting);\\r\\n\\t\\t//}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getContextMenuDataProvider = function(cell)\\r\\n\\t{\\r\\n\\t\\tif(cell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcell = this.util.findParent(cell,\\\"TD\\\");\\r\\n\\t\\t\\tif(cell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar row = this.util.findParent(cell,\\\"TR\\\");\\r\\n\\t\\t\\t\\tif(row)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar index = parseInt(row.getAttribute(\\\"ns-index\\\"));\\r\\n\\t\\t\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\t\\tif(item && this.__contextMenuProvider) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn this.__contextMenuProvider(item,cell.cellIndex,index);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t/******************************************************End of Context Menu*************************************************************/\\r\\n\\t/******************************Custom Function *************************************/\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createTableAndParent = function(containerID,containerStyle,tableID)\\r\\n\\t{\\r\\n\\t\\tvar divTableContainer = this.util.createDiv(containerID,containerStyle); \\r\\n\\t\\tvar table = document.createElement(\\\"TABLE\\\");\\r\\n\\t\\ttable.setAttribute(\\\"id\\\",tableID);\\r\\n\\t\\tthis.util.addStyleClass(table , this.__CLASS_TABLE);\\r\\n\\t\\tthis.util.addStyleClass(table , \\\"nsDataGridTableTheme\\\");\\r\\n\\t\\tdivTableContainer.appendChild(table);\\r\\n\\t\\treturn divTableContainer;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setMeasurement = function()\\r\\n\\t{\\r\\n\\t\\tthis.__bodyScrollPos = 0;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__addListenerForBody = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__keyDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__keyDownRef = this.__keyDownHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"keydown\\\",this.__keyDownRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__keyUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__keyUpRef = this.__keyUpHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"keyup\\\",this.__keyUpRef);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setBodyMeasurement = function()\\r\\n\\t{\\r\\n\\t\\tvar divTitleBar = this.util.getElement(this.getID() + this.__TITLE_CONTAINER_ID);\\r\\n\\t\\tvar divPagination = this.util.getElement(this.getID() + this.__PAGINATION_CONTROL_ID);\\r\\n\\t\\tvar topHeight = this.__divCenterTableHeaderContainer.offsetHeight;\\r\\n\\t\\tif(divTitleBar)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttopHeight += divTitleBar.offsetHeight;\\r\\n\\t\\t}\\r\\n\\t\\tif(divPagination)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttopHeight += divPagination.offsetHeight;\\r\\n\\t\\t}\\r\\n\\t\\tvar containerHeight = this.__divOuterContainer.offsetHeight;\\r\\n\\t\\tvar containerWidth = this.__divOuterContainer.offsetWidth;\\r\\n\\t\\tvar bodyContainerHeight = containerHeight - topHeight;\\r\\n\\t\\tthis.__divCenterTableBodyContainer.style.height = bodyContainerHeight + \\\"px\\\";\\r\\n\\t\\tvar scrollBarWidth = this.util.getScrollBarWidth(this.__divCenterTableBodyContainer);\\r\\n\\t\\tthis.__divCenterTableHeaderContainer.style.width = (this.__divCenterTableBodyContainer.offsetWidth - scrollBarWidth) + \\\"px\\\";\\r\\n\\t\\tthis.__initialTableWidth = containerWidth - scrollBarWidth;\\r\\n\\t\\tif(!this.__synchronizeTablesRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__synchronizeTablesRef = this.__synchronizeTables.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(this.__getHorizontalScrollableContainer(),\\\"scroll\\\",this.__synchronizeTablesRef);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__alignTables = function(fromSort)\\r\\n\\t{\\r\\n\\t\\tvar getCells = function(tbl)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(tbl && tbl.tHead && tbl.tHead.rows.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn tbl.tHead.rows[0].cells;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn [];\\r\\n\\t\\t};\\r\\n\\t\\tvar setCellWidth = function(arrCells,index,setWidth)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrCells[index].style.width = setWidth + \\\"px\\\";\\r\\n\\t\\t};\\r\\n\\t\\tvar headerCells = getCells(this.__tblCenterHeader);\\r\\n\\t\\tvar bodyCells = getCells(this.__tblCenterBody);\\r\\n\\t\\tvar footerCells = getCells(this.__tblCenterFooter);\\r\\n\\t\\tif(headerCells && headerCells.length > 0 && bodyCells && bodyCells.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar totalWidth = 0;\\r\\n\\t\\t\\tvar count = 0;\\r\\n\\t\\t\\tvar widthToBeSet = 0;\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar setWidths = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttotalWidth += widthToBeSet;\\r\\n\\t\\t\\t\\tsetCellWidth(headerCells,count,widthToBeSet);\\r\\n\\t\\t\\t\\tsetCellWidth(bodyCells,count,widthToBeSet);\\r\\n\\t\\t\\t\\t(footerCells && footerCells.length > 0) ? setCellWidth(footerCells,count,widthToBeSet) : null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar setTotalCellWidth = function(arrCells)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(count = 0;count < arrCells.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar cell = arrCells[count];\\r\\n\\t\\t\\t\\t\\tvar item = self.__columns[count];\\r\\n\\t\\t\\t\\t\\twidthToBeSet = self.util.getDimensionAsNumber(cell,cell.style.width);\\r\\n\\t\\t\\t\\t\\tif(widthToBeSet === 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\twidthToBeSet = cell.getBoundingClientRect().width;//cell.offsetWidth;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(!item.hasOwnProperty(self.__fieldColVisible) || item[self.__fieldColVisible])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetWidths();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(fromSort)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetTotalCellWidth(headerCells);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetTotalCellWidth(bodyCells);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__fillParentWidth && this.__initialTableWidth > totalWidth)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttotalWidth = this.__initialTableWidth;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__setTableWidth(totalWidth); \\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__synchronizeTables = function(event) \\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t//if(this.__scroller)\\r\\n\\t\\t//{\\r\\n\\t\\t//\\tthis.__divCenterTableHeaderContainer.scrollLeft = event.scrollLeft;\\r\\n\\t\\t//}\\r\\n\\t\\t//else\\r\\n\\t\\t//{\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tthis.__divCenterTableHeaderContainer.scrollLeft = target.scrollLeft;\\r\\n\\t\\t\\t(target != this.__divCenterTableBodyContainer) ? this.__divCenterTableBodyContainer.scrollLeft = target.scrollLeft : null;\\r\\n\\t\\t\\t//console.log(target.id + \\\",\\\" + target.scrollLeft + \\\",\\\" + this.__divCenterTableHeaderContainer.scrollLeft);\\r\\n\\t\\t\\t//console.log(target.scrollLeft + \\\",\\\" + );\\r\\n\\t\\t//}\\r\\n\\t\\tif(this.__enableFixedColumnAnimation)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__fixedTimerTimeout != -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tclearTimeout(this.__fixedTimerTimeout);\\r\\n\\t\\t\\t\\tthis.__fixedTimerTimeout = -1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.__fixedTimerTimeout = setTimeout(function()\\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\t//self.__setFixedCellsPosition.bind(self)();\\r\\n\\t\\t\\t},250);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t//this.__setFixedCellsPosition();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setTableWidth = function(totalWidth) \\r\\n\\t{\\r\\n\\t\\tvar setWidth = function(tbl)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttbl ? tbl.style.width = totalWidth : null;\\r\\n\\t\\t};\\r\\n\\t\\tif(this.util.isUndefinedOrNull(totalWidth))\\r\\n\\t\\t{\\r\\n\\t\\t\\ttotalWidth = null;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\ttotalWidth = totalWidth + \\\"px\\\";\\r\\n\\t\\t}\\r\\n\\t\\tsetWidth(this.__tblCenterHeader);\\r\\n\\t\\tsetWidth(this.__tblCenterBody);\\r\\n\\t\\tsetWidth(this.__tblCenterFooter);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__expandCollapseAll = function(isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(!this.__enableVirtualScroll && this.__getTotalRows() < this.__totalRecords)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.warning(\\\"NSGrid\\\",\\\"Please let all the rows to render.\\\");\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t}\\r\\n\\t\\tvar dataSource = this.__arrInternalSource;\\r\\n\\t\\tif(dataSource && dataSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__setCustomScrollBarScrollTop(0);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__getVerticalScrollableContainer())\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__getVerticalScrollableContainer().scrollTop = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t    this.__lastScrollPos = [0,0];\\r\\n\\t\\t    this.__lastScrollPosition = 0;\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__expandCollapseAllVirtual(dataSource,isCollapse);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__expandCollapseAllNormal(dataSource,isCollapse);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__expandCollapseAllNormal = function(dataSource,isCollapse)\\r\\n\\t{\\r\\n\\t\\tfor(var count = 0;count < dataSource.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t//setting __fieldIsCollapsed here assuming that __showHideAllArrows() will be called after this function\\r\\n\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\tif(parseInt(item[this.__fieldRowLevel]) > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar row = item[this.__fieldRow];\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\t\\titem[this.__fieldRowVisible] = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\t\\titem[this.__fieldRowVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__objGrid.expandCollapseHandler(item,isCollapse);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__showHideAllArrows(isCollapse);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__expandCollapseAllVirtual = function(dataSource,isCollapse)\\r\\n\\t{\\r\\n\\t\\tfor(var count = 0;count < dataSource.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t//setting __fieldIsCollapsed here assuming that __showHideAllArrows() will be called after this function\\r\\n\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\tif(parseInt(item[this.__fieldRowLevel]) > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__fieldRowVisible] = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__fieldRowVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//this.__objGrid.expandCollapseHandler(item,isCollapse);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__showHideAllArrows(isCollapse);\\r\\n\\t\\tthis.__updateVisibleIndex(null,0);\\r\\n\\t\\tthis.__setNSVirtualScroll(this.__arrInternalSource);\\r\\n\\t\\tfor(var count = 0;count < dataSource.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\tthis.__objGrid.expandCollapseHandler(item,isCollapse);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__showHideRow = function(rowIndex,compArrow,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(rowIndex > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\tif(!compArrow)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompArrow = this.__getArrow(item[this.__fieldIndex]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar rowLevel = parseInt(item[this.__fieldRowLevel]);\\r\\n\\t\\t\\tvar arrChildItems = [];\\r\\n\\t\\t\\tif(item && item[this.__fieldHasChild])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar startIndex = 0;\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrChildItems = this.__arrInternalSource;\\r\\n\\t\\t\\t\\t\\tstartIndex = rowIndex;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrChildItems = this.__getImmediateChildItems(arrChildItems, item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__showHideRowVirtual(item,arrChildItems,startIndex,rowLevel,isCollapse);\\r\\n\\t\\t\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\t\\t\\t//this.__updateItemInSource(item);\\r\\n\\t\\t\\t\\t\\tthis.__setNSVirtualScroll(this.__arrInternalSource);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__showHideRowNormal(item,arrChildItems,startIndex,rowLevel,isCollapse);\\r\\n\\t\\t\\t\\t\\tthis.__setArrowDirection(compArrow,isCollapse);\\r\\n\\t\\t\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__showHideRowNormal = function(item,arrChildItems,startIndex,rowLevel,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(arrChildItems && arrChildItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retIndex = this.__getActualIndex(arrChildItems,startIndex);\\r\\n\\t\\t\\t\\tif(retIndex !== startIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstartIndex = (retIndex + 1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar rowItem = null;\\r\\n\\t\\t\\tfor(var count = startIndex;count < arrChildItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowItem = arrChildItems[count];\\r\\n\\t\\t\\t\\tvar row = rowItem[this.__fieldRowHtml];\\r\\n\\t\\t\\t\\tif(!row)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__createBodyRowAt(rowItem,rowItem[this.__fieldIndex]);\\r\\n\\t\\t\\t\\t\\trow = rowItem[this.__fieldRowHtml];\\r\\n\\t\\t\\t\\t\\tthis.__updateSourceIndex();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(rowLevel >= parseInt(rowItem[this.__fieldRowLevel]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldRowVisible] = false;\\r\\n\\t\\t\\t\\t\\tif(rowItem[this.__fieldHasChild])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\trowItem[this.__fieldIsCollapsed] = true;\\r\\n\\t\\t\\t\\t\\t\\tif(rowItem[this.__fieldRowArrow])\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar divArrow = rowItem[this.__fieldRowArrow];\\r\\n\\t\\t\\t\\t\\t\\t\\tif(divArrow)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tthis.__setArrowDirection(divArrow,true);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldRowVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__showHideRowVirtual = function(item,arrChildItems,startIndex,rowLevel,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(arrChildItems && arrChildItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retIndex = this.__getActualIndex(arrChildItems,startIndex);\\r\\n\\t\\t\\t\\tif(retIndex !== startIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstartIndex = (retIndex + 1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar rowItem = null;\\r\\n\\t\\t\\tfor(var count = startIndex;count < arrChildItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowItem = arrChildItems[count];\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(rowLevel >= parseInt(rowItem[this.__fieldRowLevel]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldRowVisible] = false;\\r\\n\\t\\t\\t\\t\\tif(rowItem[this.__fieldHasChild])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\trowItem[this.__fieldIsCollapsed] = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldRowVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t//this.__updateVisibleIndex(null,index - 1);\\r\\n\\t\\t\\t//done the below for MasterDetail Grid .. if there is an issue in Hierarchical or Grouping Grid while filtering then use a callback to get the index like afterFilter which we will override only for MasterDetailGrid with the below condition\\r\\n\\t\\t\\t//var sendIndex = (index % 2) == 0 ? index : index - 1;\\r\\n\\t\\t\\t//this.__updateVisibleIndex(null,sendIndex);\\r\\n\\t\\t\\tthis.__updateVisibleIndex(null,index);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__showHideAllArrows = function(isCollapse)\\r\\n\\t{\\r\\n\\t\\tvar arrDivs = this.__getAllArrows();\\r\\n\\t\\tif(arrDivs && arrDivs.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrDivs.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar div = arrDivs[count];\\r\\n\\t\\t\\t\\tif(div && div.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__setArrowDirection(div,isCollapse);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__isNodeLastParent = function(item)\\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tif(item && item[this.__fieldHasChild])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChildItems = item[this.__childField];\\r\\n\\t\\t\\tif(arrChildItems && arrChildItems.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar hasChild = false;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrChildItems.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar rowItem = arrChildItems[count];\\r\\n\\t\\t\\t\\t\\tif(rowItem && rowItem[this.__fieldHasChild])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\thasChild = true;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!hasChild)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__updateSourceIndex = function(source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar row = null;\\r\\n\\t\\tvar length = source.length;\\r\\n\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = source[count];\\r\\n\\t\\t\\tvar index = (this.__enableHierarchical || this.__enableGrouping || this.__enableMasterDetail) ? (count + 1) : count;\\r\\n\\t\\t\\titem[this.__fieldIndex] = index;\\r\\n\\t\\t\\trow = item[this.__fieldRowHtml];\\r\\n\\t\\t\\tif(row && this.util.isElementOfType(row,\\\"tr\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trow.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\t\\tvar compArrow = row.querySelector(\\\".nsArrow\\\");\\r\\n\\t\\t\\t\\tif(compArrow)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompArrow.setAttribute(\\\"ns-parent-row-count\\\",index);\\r\\n\\t\\t\\t\\t\\tvar arrowID = this.getID() + \\\"compArrow\\\" + index;\\r\\n\\t\\t\\t\\t\\tcompArrow.setAttribute(\\\"id\\\",arrowID);\\r\\n\\t\\t\\t\\t\\tvar compSvg = compArrow.querySelector(\\\"svg\\\");\\r\\n\\t\\t\\t\\t\\tif(compSvg)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar svgID = arrowID + \\\"svg\\\";\\r\\n\\t\\t\\t\\t\\t\\tcompSvg.setAttribute(\\\"id\\\",svgID);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar compUse = compArrow.querySelector(\\\"use\\\");\\r\\n\\t\\t\\t\\t\\tif(compUse)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar useID = arrowID + \\\"use\\\";\\r\\n\\t\\t\\t\\t\\t\\tcompUse.setAttribute(\\\"id\\\",useID);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__applyCustomClass = function(element,type)\\r\\n\\t{\\r\\n\\t\\tif(this.__customClass && element && type)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar itemProperty = {\\\"outerContainer\\\":{property:\\\"outerContainer\\\",defaultValue:null},\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\\"titleBar\\\":{property:\\\"titleBar\\\",defaultValue:null},\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\\"headerRow\\\":{property:\\\"headerRow\\\",defaultValue:null},\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\\"headerCell\\\":{property:\\\"headerCell\\\",defaultValue:null},\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\\"filterRow\\\":{property:\\\"filterRow\\\",defaultValue:null},\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\\"filterCell\\\":{property:\\\"filterCell\\\",defaultValue:null},\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\\"bodyRow\\\":{property:\\\"bodyRow\\\",defaultValue:null},\\r\\n\\t\\t\\t\\t\\t\\t\\t    //for Hierarchies and Grouping grid\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\\"firstBodyColumn\\\":{property:\\\"firstBodyColumn\\\",defaultValue:null},\\r\\n\\t\\t\\t\\t\\t\\t\\t    \\\"nonFirstBodyColumn\\\":{property:\\\"nonFirstBodyColumn\\\",defaultValue:null}\\r\\n\\t\\t\\t\\t\\t\\t\\t   };\\r\\n\\t\\t\\tif(itemProperty[type])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__customClass[itemProperty[type][\\\"property\\\"]])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(element,this.__customClass[itemProperty[type][\\\"property\\\"]]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(itemProperty[type][\\\"defaultValue\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(element,itemProperty[type][\\\"defaultValue\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__addCellText = function(row,item,div,colItem,colIndex)\\r\\n\\t{\\r\\n\\t\\tif(item && div && colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar dataField = colItem[\\\"dataField\\\"];\\r\\n\\t\\t\\tvar templateRenderer = colItem[\\\"templateRenderer\\\"];\\r\\n\\t\\t\\tvar setData = colItem[\\\"setData\\\"];\\r\\n\\t\\t\\tvar itemRenderer = colItem[\\\"itemRenderer\\\"];\\r\\n\\t\\t\\tvar labelFunction = colItem[\\\"labelFunction\\\"];\\r\\n\\t\\t\\tvar groupRenderer = colItem[\\\"groupRenderer\\\"];\\r\\n\\t\\t\\tvar truncateToFit = colItem[\\\"truncateToFit\\\"];\\r\\n\\t\\t\\tvar toolTipField = colItem[\\\"toolTipField\\\"];\\r\\n\\t\\t\\tvar toolTipRenderer = colItem[\\\"toolTipRenderer\\\"];\\r\\n\\t\\t\\tvar toolTipText = null;\\r\\n\\t\\t\\tvar isGroupedParent = (this.__enableGrouping && item[this.__isParentRowField]);\\r\\n\\t\\t\\t//for Grouping\\r\\n\\t\\t\\tif(isGroupedParent && groupRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrAllChildItems = this.__getAllChildItemsForGroup(null,item);\\r\\n\\t\\t\\t\\tvar objRenderer = groupRenderer(item,dataField,item[this.__fieldIndex],colIndex,row,item[this.__childField],item[this.__objGrid.__childrenCountField],arrAllChildItems,parseInt(item[this.__fieldRowLevel]) + 1);\\r\\n\\t\\t\\t\\tvar callback = function(objRenderer)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(objRenderer)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(this.util.isString(objRenderer))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar compBodySpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\tcompBodySpan.innerHTML = objRenderer;\\r\\n\\t\\t\\t\\t\\t\\t\\tdiv.appendChild(compBodySpan);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdiv.appendChild(objRenderer);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.util.resolveFunctionOrPromise(objRenderer,callback.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(!isGroupedParent && itemRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objRenderer = itemRenderer(item,dataField,item[this.__fieldIndex],colIndex,row);\\r\\n\\t\\t\\t\\tvar callback = function(objRenderer)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(objRenderer)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(this.util.isString(objRenderer))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar compBodySpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\tcompBodySpan.innerHTML = objRenderer;\\r\\n\\t\\t\\t\\t\\t\\t\\tdiv.appendChild(compBodySpan);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdiv.appendChild(objRenderer);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.util.resolveFunctionOrPromise(objRenderer,callback.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(!isGroupedParent && templateRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdiv.appendChild(templateRenderer.cloneNode(true));\\r\\n\\t\\t\\t\\tthis.__setDataInTemplateRenderer(div,item,dataField,setData,colItem,row);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(!isGroupedParent && labelFunction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar text = labelFunction(item,dataField,colItem);\\r\\n\\t\\t\\t\\tdiv.appendChild(document.createTextNode(text));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(item.hasOwnProperty(dataField) && !this.util.isUndefined(item[dataField]) && item[dataField] != null)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar text = item[dataField];\\r\\n\\t\\t\\t\\tdiv.appendChild(document.createTextNode(text));\\r\\n\\t\\t    }\\r\\n\\t\\t\\telse if(dataField)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar text = null;\\r\\n\\t\\t\\t\\tif(dataField.includes(\\\".\\\")) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttext = this.util.getValueByKeys(item,dataField);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(item.hasOwnProperty(dataField)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttext = item[dataField];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(text)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdiv.appendChild(document.createTextNode(text));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t\\tthis.__highlightDiv(div,colIndex);\\r\\n\\t\\t\\tif(toolTipField)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolTipText = item[toolTipField];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(toolTipRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolTipText = toolTipRenderer(item,dataField,item[this.__fieldIndex],colIndex,row);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(truncateToFit)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(div,\\\"nsTruncateToFit\\\");\\r\\n\\t\\t\\t\\t//This condition is above so that toolTip and title are not set togeather\\r\\n\\t\\t\\t\\tif(!toolTipText || toolTipText === \\\"\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__enableToolTipForTruncateText)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\ttoolTipText = div.textContent;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdiv.setAttribute(\\\"title\\\",div.textContent);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar callback = function(toolTipText)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(toolTipText && toolTipText !== \\\"\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsToolTipInElement.addToolTip(div,toolTipText);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tthis.util.resolveFunctionOrPromise(toolTipText,callback.bind(this));\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__updateCellText = function(row,cell,item,colItem,rowIndex,colIndex)\\r\\n\\t{\\r\\n\\t\\tthis.__objGrid.__updateCellText(row,cell,item,colItem,rowIndex,colIndex);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setDataInTemplateRenderer = function(cellItem,data,dataField,setData,colItem,row)\\r\\n\\t{\\r\\n\\t\\tif(cellItem && setData)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setRendererProperties(cellItem);\\r\\n\\t\\t\\tthis.__setRendererInData(cellItem,data,row);\\r\\n\\t\\t\\t//IE bug\\r\\n\\t\\t\\tcellItem.data = data;\\r\\n\\t\\t\\tif(this.util.isFunction(setData))\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar strParam = \\\"(cellItem,data,dataField,colItem,row)\\\"; \\r\\n\\t\\t    \\tif(this.util.isString(setData))\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.util.callFunctionFromString(setData + strParam,function(paramValue){\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"cellItem\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn cellItem;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"data\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn data;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"dataField\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn dataField;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"colItem\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn colItem;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"row\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn row;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\treturn paramValue;\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\telse\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tsetData(cellItem,data,dataField,colItem,row);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setRendererInData = function(cellItem,data,row)\\r\\n\\t{\\r\\n\\t\\tif(cellItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compChild = null;\\r\\n\\t\\t\\tfor(var count = 0; count < cellItem.children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompChild = cellItem.children[count];\\r\\n\\t\\t\\t\\tif(compChild)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompChild.data = data;\\r\\n\\t\\t\\t\\t\\tcompChild.row = row;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//IE 9 Bug,you got to assign it back\\r\\n\\t\\t\\t\\t//listItem.children[count] = compChild;\\r\\n\\t\\t\\t\\tthis.__setRendererInData(compChild,data,row);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setRendererProperties = function(cellItem)\\r\\n\\t{\\r\\n\\t\\tif(cellItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compChild = null;\\r\\n\\t\\t\\tfor(var count = 0; count < cellItem.children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompChild = cellItem.children[count];\\r\\n\\t\\t\\t\\tvar grid = this;\\r\\n\\t\\t\\t\\tArray.prototype.slice.call(compChild.attributes).forEach(function(attribute) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t        if(grid.util.isFunction(attribute.value))\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar newValue = attribute.value + \\\"(this)\\\";\\r\\n\\t\\t\\t        \\tcompChild.removeAttribute(attribute.name);\\r\\n\\t\\t\\t\\t\\t\\tcompChild.setAttribute(attribute.name,newValue);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\tif(compChild)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(compChild.hasAttribute(\\\"accessor-name\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcellItem[compChild.getAttribute(\\\"accessor-name\\\")] = compChild;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__setRendererProperties(compChild);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__calculateCellExpectedHeight = function(templateRenderer)\\r\\n\\t{\\r\\n\\t\\tvar retHeight =  -1;\\r\\n\\t\\tif(templateRenderer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar tempRenderer = templateRenderer.cloneNode(true);\\r\\n\\t\\t\\ttempRenderer.removeAttribute(\\\"id\\\");\\r\\n\\t\\t\\tthis.addChild(tempRenderer);\\r\\n\\t\\t\\tretHeight = tempRenderer.offsetHeight;\\r\\n\\t\\t\\tif(retHeight <= 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretHeight = this.util.getDimensionAsNumber(tempRenderer,tempRenderer.style.height);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.deleteChild(tempRenderer);\\r\\n\\t\\t}\\r\\n\\t\\treturn retHeight;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setRowHover = function(indexToSet)\\r\\n\\t{\\r\\n\\t\\tif(this.__nsGridKeyboard)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsGridKeyboard.__setRowHover(indexToSet);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getAllItems = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__objGrid.__getFlatSource();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__isCellEditable = function(objColumn,item,cell,cellIndex,row,rowIndex)\\r\\n\\t{\\r\\n\\t\\treturn this.__objGrid.__isCellEditable(objColumn,item,cell,cellIndex,row,rowIndex);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getImmediateChildItems = function(arrItems,item)\\r\\n\\t{\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = [];\\r\\n\\t\\t}\\r\\n\\t\\tif(item && item[this.__fieldHasChild])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChild = this.__arrInternalSource;\\r\\n\\t\\t\\tvar rowLevel = parseInt(item[this.__fieldRowLevel]);\\r\\n\\t\\t\\tvar startIndex = item[this.__fieldIndex];\\r\\n\\t\\t\\tvar retIndex = this.__getActualIndex(arrChild,startIndex);\\r\\n\\t\\t\\tif(retIndex !== startIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstartIndex = (retIndex + 1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t/*//for Filter condition\\r\\n\\t\\t\\t//(startIndex + 1) as __fieldIndex starts from 1\\r\\n\\t\\t\\tif(arrChild.length < startIndex || arrChild[startIndex][this.__fieldIndex] !== (startIndex + 1))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar rowItem = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrChild.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trowItem = arrChild[count];\\r\\n\\t\\t\\t\\t\\tif(rowItem[this.__fieldIndex] === startIndex)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tstartIndex = (count + 1);\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t\\t//end of Filter condition\\r\\n\\t\\t\\tvar length = arrChild.length;\\r\\n\\t\\t\\tfor(var count = startIndex;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar itemChild = arrChild[count];\\r\\n\\t\\t\\t\\tvar childRowLevel = parseInt(itemChild[this.__fieldRowLevel]);\\r\\n\\t\\t\\t\\tif(rowLevel >= childRowLevel)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif((rowLevel + 1) === childRowLevel)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrItems.push(itemChild);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn arrItems;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//generally used for Filter condition\\r\\n\\tNSGrid.prototype.__getActualIndex = function(arrChild,startIndex,addCompareOne)\\r\\n\\t{\\r\\n\\t\\t//(startIndex + 1) as __fieldIndex starts from 1\\r\\n\\t\\t//if(arrChild && arrChild.length < startIndex || arrChild[startIndex][this.__fieldIndex] !== (startIndex + 1))\\r\\n\\t\\tif(arrChild && arrChild.length > startIndex && arrChild[startIndex][this.__fieldIndex] !== (startIndex + 1))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compareIndex = startIndex;\\r\\n\\t\\t\\tif(addCompareOne)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompareIndex += 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar rowItem = null;\\r\\n\\t\\t\\tfor(var count = 0;count < arrChild.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowItem = arrChild[count];\\r\\n\\t\\t\\t\\tif(rowItem[this.__fieldIndex] === compareIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn count;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn startIndex;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getAllChildItems = function(arrItems,item)\\r\\n\\t{\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = [];\\r\\n\\t\\t}\\r\\n\\t\\tif(item && item[this.__fieldHasChild])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChild = this.__arrInternalSource;\\r\\n\\t\\t\\tvar rowLevel = parseInt(item[this.__fieldRowLevel]);\\r\\n\\t\\t\\tvar startIndex = item[this.__fieldIndex];\\r\\n\\t\\t\\tvar length = arrChild.length;\\r\\n\\t\\t\\tfor(var count = startIndex;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar itemChild = arrChild[count];\\r\\n\\t\\t\\t\\tif(rowLevel >= parseInt(itemChild[this.__fieldRowLevel]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tarrItems.push(itemChild);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn arrItems;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getAllChildItemsForGroup = function(arrItems,item)\\r\\n\\t{\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = [];\\r\\n\\t\\t}\\r\\n\\t\\tif(item && item[this.__fieldHasChild])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChild = this.__arrInternalSource;\\r\\n\\t\\t\\tvar rowLevel = parseInt(item[this.__fieldRowLevel]);\\r\\n\\t\\t\\tvar startIndex = item[this.__fieldIndex];\\r\\n\\t\\t\\tvar length = arrChild.length;\\r\\n\\t\\t\\tfor(var count = startIndex;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar itemChild = arrChild[count];\\r\\n\\t\\t\\t\\tvar hasChild = itemChild[this.__fieldHasChild];\\r\\n\\t\\t\\t\\tif(rowLevel >= parseInt(itemChild[this.__fieldRowLevel]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//in group collection we are giving values for rows which are not generated by grid\\r\\n\\t\\t\\t\\tif(!hasChild)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrItems.push(itemChild);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn arrItems;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getAllVisibleItems = function()\\r\\n\\t{\\r\\n\\t\\tvar totalRecords = 0;\\r\\n\\t\\tvar arrItems = this.__getAllItems();\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrItems[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldRowVisible])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttotalRecords += 1;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn totalRecords;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getFirstVisibleItemBeforeIndex = function(itemIndex)\\r\\n\\t{\\r\\n\\t\\tvar arrItems = this.__getAllItems();\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retIndex = this.__getActualIndex(arrItems,itemIndex);\\r\\n\\t\\t\\tif(retIndex !== itemIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titemIndex = (retIndex + 1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t/*if(arrItems.length < itemIndex || arrItems[itemIndex][this.__fieldIndex] !== (itemIndex + 1))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar rowItem = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrItems.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trowItem = arrItems[count];\\r\\n\\t\\t\\t\\t\\tif(rowItem[this.__fieldIndex] === itemIndex)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titemIndex = (count + 1);\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t\\tfor(var count = itemIndex;count >= 0;count--)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrItems[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldRowVisible] && item[this.__fieldVisibleIndex] > -1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getVisibleItemByIndex = function(source,index)\\r\\n\\t{\\r\\n\\t\\tvar arrItems = source;\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this; \\r\\n\\t\\t\\tvar findItem = function(itemCompare)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t return (itemCompare[self.__fieldVisibleIndex] === (index + 1));\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\treturn arrItems.find(findItem);\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__updateVisibleIndex = function(source,fromIndex)\\r\\n\\t{\\r\\n\\t\\tvar arrItems = source;\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isUndefinedOrNull(fromIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\tfromIndex = 0;\\r\\n\\t\\t}\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar visibleRowIndex = 1;\\r\\n\\t\\t\\tif(fromIndex > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar visibleItem = this.__getFirstVisibleItemBeforeIndex(fromIndex);\\r\\n\\t\\t\\t\\tif(visibleItem)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvisibleRowIndex = visibleItem[this.__fieldVisibleIndex];\\r\\n\\t\\t\\t\\t\\tfromIndex = visibleItem[this.__fieldIndex] - 1;\\r\\n\\t\\t\\t\\t\\tvar retIndex = this.__getActualIndex(arrItems,fromIndex,true);\\r\\n\\t\\t\\t\\t\\tif(retIndex !== fromIndex)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tfromIndex = retIndex;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t/*//for Filter condition\\r\\n\\t\\t\\t\\t\\t//(startIndex + 1) as __fieldIndex starts from 1\\r\\n\\t\\t\\t\\t\\tif(arrItems.length < fromIndex || arrItems[fromIndex][this.__fieldIndex] !== (fromIndex + 1))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar rowItem = null;\\r\\n\\t\\t\\t\\t\\t\\tfor(var count = 0;count < arrItems.length;count++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\trowItem = arrItems[count];\\r\\n\\t\\t\\t\\t\\t\\t\\tif(rowItem[this.__fieldIndex] === (fromIndex + 1))\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tfromIndex = count;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t//end of Filter condition*/\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = arrItems.length;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = fromIndex; count < length; count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrItems[count];\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item[this.__fieldRowVisible])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = visibleRowIndex;\\r\\n\\t\\t\\t\\t\\t\\tvisibleRowIndex++;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = -1;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__updateVisibleIndexByRow = function(source,arrAllItems)\\r\\n\\t{\\r\\n\\t\\tif(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItems = arrAllItems;\\r\\n\\t\\t\\tif(!arrItems)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrItems = this.__getAllItems();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = source.length;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar objVisibleIndex = {};\\r\\n\\t\\t\\tfor(var count = 0; count < length; count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tobjVisibleIndex[index] = item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlength = arrItems.length;\\r\\n\\t\\t\\t\\titem = null;\\r\\n\\t\\t\\t\\tvar visibleRowIndex = 1;\\r\\n\\t\\t\\t\\tfor(var count = 0; count < length; count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = arrItems[count];\\r\\n\\t\\t\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tif(this.util.isUndefinedOrNull(objVisibleIndex[index]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = -1;\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldRowVisible] = false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = visibleRowIndex;\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldRowVisible] = true;\\r\\n\\t\\t\\t\\t\\t\\tobjVisibleIndex[index][this.__fieldVisibleIndex] = visibleRowIndex;\\r\\n\\t\\t\\t\\t\\t\\tobjVisibleIndex[index][this.__fieldRowVisible] = true;\\r\\n\\t\\t\\t\\t\\t\\tvisibleRowIndex++;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getArrow = function(rowCount)\\r\\n\\t{\\r\\n\\t\\tvar arrDivs = this.__getAllArrows();\\r\\n\\t\\tif(arrDivs && arrDivs.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrDivs.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar div = arrDivs[count];\\r\\n\\t\\t\\t\\tif(div && div.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar rowParentCount = div.getAttribute(\\\"ns-parent-row-count\\\");\\r\\n\\t\\t\\t\\t\\tif(rowParentCount && rowParentCount == rowCount)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn div;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getAllArrows = function(divParent)\\r\\n\\t{\\r\\n\\t\\tif(!divParent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdivParent = this.__tblCenterBody;\\r\\n\\t\\t}\\r\\n\\t\\treturn divParent.querySelectorAll(\\\".nsArrow\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getAllBodyRows = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__tblCenterBodyBody && this.__tblCenterBodyBody.rows)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__tblCenterBodyBody.rows;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getTotalRows = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__tblCenterBodyBody && this.__tblCenterBodyBody.rows)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__tblCenterBodyBody.rows.length;\\r\\n\\t\\t}\\r\\n\\t\\treturn 0;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getIndexFromRow = function(row)\\r\\n\\t{\\r\\n\\t\\tif(row)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn parseInt(row.getAttribute(\\\"ns-index\\\"));\\r\\n\\t\\t}\\r\\n\\t\\treturn -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getRowFromItem = function(item)\\r\\n\\t{\\r\\n\\t\\tvar row = null;\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\trow = item[this.__fieldRow];\\r\\n\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t//below case is true if row reference has been removed due to virtual scroll \\r\\n\\t\\t\\tif(!row || row.rowIndex === -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrRows = this.__tblCenterBodyBody.querySelectorAll('[ns-index=\\\"' + index + '\\\"]');\\r\\n\\t\\t\\t\\tif(arrRows && arrRows.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow = arrRows[0];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn row;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getRowByIndex = function(index)\\r\\n\\t{\\r\\n\\t\\tvar row = null;\\r\\n\\t\\tif(index > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\trow = this.__getRowFromItem(item);\\r\\n\\t\\t}\\r\\n\\t\\treturn row;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getRowFromContainer = function(index)\\r\\n\\t{\\r\\n\\t\\tvar arrRows = this.__getBodyBodyRow(this.__tblCenterBody);\\r\\n\\t\\tif(this.__hasBodyRows() && arrRows.length > index)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn arrRows[index];\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__hasBodyRows = function()\\r\\n\\t{\\r\\n\\t\\tvar arrRows = this.__getBodyBodyRow(this.__tblCenterBody);\\r\\n\\t\\tif(arrRows && arrRows.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getItemByIndex = function(indexToFind,source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__objGrid.__getFlatSource();\\r\\n\\t\\t}\\r\\n\\t\\tif(source && source.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldIndex] === indexToFind)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getItemBykeyField = function(keyFieldValue,source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__objGrid.__getFlatSource();\\r\\n\\t\\t}\\r\\n\\t\\tif(source && source.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__rowKeyField] === keyFieldValue)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getIndexByItem = function(itemToFind,source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tif(itemToFind && source && source.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldIndex] === itemToFind[this.__fieldIndex])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getColumnObject = function(index,arrColumn)\\r\\n\\t{\\r\\n\\t\\tif(!arrColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrColumn = this.__columns;\\r\\n\\t\\t}\\r\\n\\t\\tindex = parseInt(index);\\r\\n\\t\\tif(arrColumn && index > -1 && index < arrColumn.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0;count < arrColumn.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrColumn[count];\\r\\n\\t\\t\\t\\tif(item[this.__fieldColIndex] === index)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getColumnIndexByObject = function(objColumn,arrColumn)\\r\\n\\t{\\r\\n\\t\\tif(!arrColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrColumn = this.__columns;\\r\\n\\t\\t}\\r\\n\\t\\tif(arrColumn && objColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrColumn.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(arrColumn[count][this.__fieldColIndex] === objColumn[this.__fieldColIndex])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn count;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getColumnObjectByDataField = function(dataField,arrColumn)\\r\\n\\t{\\r\\n\\t\\tif(!arrColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrColumn = this.__columns;\\r\\n\\t\\t}\\r\\n\\t\\tif(arrColumn && dataField)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrColumn.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrColumn[count];\\r\\n\\t\\t\\t\\tif(item[\\\"dataField\\\"] === dataField)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getColumnIndexForSwapOrRemove = function(column,arrColumn)\\r\\n\\t{\\r\\n\\t\\tif(!arrColumn)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrColumn = this.__columns;\\r\\n\\t\\t}\\r\\n\\t\\tvar index = -1;\\r\\n\\t\\t//checking below like this because column = 0 then column will return false;\\r\\n\\t\\tif(!this.util.isUndefined(column) && column != null)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isNumber(column) && arrColumn && column < arrColumn.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tindex = column;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isString(column))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrColumn.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = arrColumn[count];\\r\\n\\t\\t\\t\\t\\tif(item[\\\"dataField\\\"] === column)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tindex = count;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.warning(\\\"NSGrid\\\",\\\"Please pass valid column information.\\\");\\r\\n\\t\\t}\\r\\n\\t\\treturn index;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__isColumnValidForSwapOrRemove = function(columnIndex,operation)\\r\\n\\t{\\r\\n\\t\\tif(this.__isColumnIndexValid(columnIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\tif((this.__enableHierarchical && columnIndex === 0) || (this.__enableGrouping && (columnIndex === 0 || this.__columns[columnIndex][\\\"dataField\\\"] === this.__groupByField)) \\r\\n\\t\\t\\t\\t\\t|| (this.__enableMasterDetail && columnIndex === 0))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(operation)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.warning(\\\"NSGrid\\\",\\\"This column cannot be \\\" + operation + \\\".\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__swapCell = function(sourceCell,destinationCell)\\r\\n\\t{\\r\\n\\t\\tif(sourceCell && destinationCell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar destinationCellIndex = destinationCell.cellIndex;\\r\\n\\t\\t\\tthis.__moveCell(destinationCell,sourceCell.cellIndex);\\r\\n\\t\\t\\tthis.__moveCell(sourceCell,destinationCellIndex);\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__moveCell = function(fromCell,toIndex)\\r\\n\\t{\\r\\n\\t\\tif(fromCell && toIndex > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar row = fromCell.parentNode;\\r\\n\\t\\t\\trow.removeChild(fromCell);\\r\\n\\t\\t\\trow.insertBefore(fromCell,row.cells[toIndex]);\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__createColumnProvider = function(arrColumns)\\r\\n\\t{\\r\\n\\t\\tif(arrColumns && arrColumns.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar hasColumnProviderChanged = this.__hasColumnProviderChanged(arrColumns);\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar getOrignalColumnInfo = function(dataField)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (var count = 0;count < self.__orignalColumns.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar colOrigItem = self.__orignalColumns[count];\\r\\n\\t\\t\\t\\t\\tif(colOrigItem[\\\"dataField\\\"] === dataField)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn colOrigItem;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tthis.__columns = [];\\r\\n\\t\\t\\tfor (var count = 0;count < arrColumns.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objColumn = arrColumns[count];\\r\\n\\t\\t\\t\\tvar columnInfo = getOrignalColumnInfo(objColumn[\\\"dataField\\\"]);\\r\\n\\t\\t\\t\\tif(columnInfo)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(objColumn.hasOwnProperty(this.__fieldColSortedAsc) && objColumn[this.__fieldColSortedAsc] != null)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcolumnInfo[this.__fieldColSortedAsc] = objColumn[this.__fieldColSortedAsc];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(objColumn.hasOwnProperty(this.__fieldColIndex) && objColumn[this.__fieldColIndex] != null)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcolumnInfo[this.__fieldColIndex] = objColumn[this.__fieldColIndex];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(objColumn.hasOwnProperty(this.__fieldColVisible) && objColumn[this.__fieldColVisible] != null)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcolumnInfo[this.__fieldColVisible] = objColumn[this.__fieldColVisible];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(!hasColumnProviderChanged && objColumn.hasOwnProperty(\\\"width\\\") && objColumn[\\\"width\\\"] != null)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcolumnInfo[\\\"width\\\"] = objColumn[\\\"width\\\"];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar index = columnInfo[this.__fieldColIndex];\\r\\n\\t\\t\\t\\t\\tif(this.__columns[index])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__columns.splice(index, 0, columnInfo);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__columns[index] = columnInfo;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__columns = this.__orignalColumns.slice(0);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__hasColumnProviderChanged = function(arrColumns)\\r\\n\\t{\\r\\n\\t\\tif(!arrColumns || !this.__orignalColumns || this.__orignalColumns.length !== arrColumns.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\tvar length = this.__orignalColumns.length;\\r\\n\\t\\tvar count = 0;\\r\\n\\t\\tfor(count = 0;count < length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar colItem = this.__orignalColumns[count];\\r\\n\\t\\t\\tfor(var innerCount = 0;innerCount < length;innerCount++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(colItem[\\\"dataField\\\"] === arrColumns[innerCount][\\\"dataField\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn (count !== length);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__processDefaultSort = function()\\r\\n\\t{\\r\\n\\t\\tfor(var count = 0; count < this.__columns.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objColumn = this.__columns[count];\\r\\n\\t\\t\\tif(objColumn.hasOwnProperty(this.__fieldColSortedAsc) && objColumn[this.__fieldColSortedAsc] != null)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar headerBodyRow = this.__getHeaderBodyRow(this.__tblCenterHeader);\\r\\n\\t\\t\\t\\tvar arrHeaderCells = headerBodyRow.cells;\\r\\n\\t\\t\\t\\tvar cell = arrHeaderCells[count];\\r\\n\\t\\t\\t\\tthis.__nsGridSort.handle(cell,objColumn,false,objColumn[this.__fieldColSortedAsc]);\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__editColumnArray = function(mode,item)\\r\\n\\t{\\r\\n\\t\\t//item should be column object\\r\\n\\t\\tif(mode === \\\"add\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__columns[this.__columns.length] = item;\\r\\n\\t\\t\\tthis.__orignalColumns[this.__orignalColumns.length] = item;\\r\\n\\t\\t}\\r\\n\\t\\telse if(mode === \\\"swap\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t\\t//item should be column index\\r\\n\\t\\telse if(mode === \\\"hide\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar colItem = this.__columns[item];\\r\\n\\t\\t\\tcolItem[this.__fieldColVisible] = false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(mode === \\\"show\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar colItem = this.__columns[item];\\r\\n\\t\\t\\tcolItem[this.__fieldColVisible] = true;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__isColumnIndexValid = function(columnIndex)\\r\\n\\t{\\r\\n\\t\\tif(columnIndex > -1 && columnIndex < this.__columns.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__isMouseOnElement = function(element, currentX, currentY)\\r\\n\\t{\\r\\n\\t\\tvar offset = this.util.getCumulativeOffset(element);\\r\\n\\t\\treturn (currentY >= offset.y &&\\r\\n\\t\\t\\t\\tcurrentY <  offset.y + element.offsetHeight &&\\r\\n\\t            currentX >= offset.x + element.offsetWidth - 5 &&\\r\\n\\t            currentX <  offset.x + element.offsetWidth);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__updateTotalRecords = function(totalCount)\\r\\n\\t{\\r\\n\\t\\tif(!totalCount)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttotalCount = this.__arrInternalSource.length; \\r\\n\\t\\t}\\r\\n\\t\\t//update total Rows if no server side call and pagination mode is manual\\r\\n\\t\\tif(!(this.__enableServerCall || (this.__enablePagination && !this.__isPaginationModeAuto)) || this.__rowsRendered)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__totalRecords = totalCount;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__addPriorityClassInCell = function(cell,colItem)\\r\\n\\t{\\r\\n\\t\\tif(this.__isResponsiveModeColumnToggle && cell && colItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(cell,\\\"column-priority-\\\" + colItem[\\\"priority\\\"]);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setGridType = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__type === this.GRID_TYPE_HIERARCHICAL)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__enableHierarchical = true;\\r\\n\\t\\t\\tthis.__objGrid = new NSHierarchicalGrid(this,this.util);\\r\\n\\t\\t}\\r\\n\\t\\telse if(this.__type === this.GRID_TYPE_GROUP)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__enableGrouping = true;\\r\\n\\t\\t\\tthis.__objGrid = new NSGroupingGrid(this,this.util);\\r\\n\\t\\t}\\r\\n\\t\\telse if(this.__type === this.GRID_TYPE_MASTER_DETAIL)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__enableMasterDetail = true;\\r\\n\\t\\t\\tthis.__objGrid = new NSMasterDetailGrid(this,this.util);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objGrid = new NSFlatGrid(this,this.util);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__callFunctionInsideGridType = function(functionName,...args)\\r\\n\\t{\\r\\n\\t\\tthis.util.callFunctionOfObject(this.__objGrid,functionName,...args);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setPaginationType = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__paginationType || this.__paginationType === this.PAGINATION_TYPE_SCROLL)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isPaginationTypeScroll = true;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isPaginationTypeScroll = false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setPaginationMode = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__paginationMode || this.__paginationMode === this.PAGINATION_MODE_AUTO)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isPaginationModeAuto = true;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isPaginationModeAuto = false;\\r\\n\\t\\t}\\r\\n\\t\\tif(!(this.__isPaginationTypeScroll && this.__isPaginationModeAuto))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__enableAsyncLoadPagination = false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setResponsiveMode = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableResponsive)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__responsiveMode || this.__responsiveMode === this.RESPONSIVE_MODE_STACK)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__isResponsiveModeStack = true;\\r\\n\\t\\t\\t\\tthis.__isResponsiveModeColumnToggle = false;\\r\\n\\t\\t\\t\\tthis.__arrQueries = [\\\"only screen and (max-width: 760px),(min-device-width: 768px) and (max-device-width: 1024px)\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__arrQueries = [\\\"only screen and (min-width: 960px)\\\",\\r\\n\\t\\t\\t\\t                     \\\"only screen and (max-width: 960px) and (min-width: 800px)\\\",\\r\\n\\t\\t\\t\\t                     \\\"only screen and (max-width: 800px) and (min-width: 640px)\\\",\\r\\n\\t\\t\\t\\t                     \\\"only screen and (max-width: 640px) and (min-width: 480px)\\\",\\r\\n\\t\\t\\t\\t                     \\\"only screen and (max-width: 480px) and (min-width: 320px)\\\",\\r\\n\\t\\t\\t\\t                     \\\"only screen and (max-width: 320px)\\\"];\\r\\n\\t\\t\\t\\tthis.__isResponsiveModeColumnToggle = true;\\r\\n\\t\\t\\t\\tthis.__isResponsiveModeStack = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isResponsiveModeColumnToggle = false;\\r\\n\\t\\t\\tthis.__isResponsiveModeStack = false;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__checkForVirtualMode = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\t/*if(this.__enableHierarchical || this.__enableGrouping)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableVirtualScroll = false;\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t\\tif(this.__enablePagination)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableVirtualScroll = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setCustomScrollBarScrollTop = function(scrollTop)\\r\\n\\t{\\r\\n\\t\\tif(this.__enableCustomScrollBar)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__scroller)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__scroller.setScrollTop(scrollTop);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getHorizontalScrollableContainer = function() \\r\\n\\t{\\r\\n\\t\\tvar container = this.__enableFooter ? this.__divCenterTableFooterContainer : this.__divCenterTableBodyContainer;\\r\\n\\t\\treturn container;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getVerticalScrollableContainer = function() \\r\\n\\t{\\r\\n\\t\\tvar container = this.__divCenterTableBodyContainer;\\r\\n\\t\\treturn container;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__addSVGInPage = function()\\r\\n\\t{\\r\\n\\t\\tif(typeof NSSvg != 'undefined')\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar svgShapes = new NSSvgShapes();\\r\\n\\t\\t\\t//for header Menu\\r\\n\\t\\t\\tvar circleDownArrowID = \\\"svgCircleDownArrow\\\";\\r\\n\\t\\t\\tvar groupDown = objSVG.createGroup(circleDownArrowID + \\\"group\\\");\\r\\n\\t\\t\\tvar circle = objSVG.createCircle(circleDownArrowID + \\\"circle\\\",8,8,8,null);\\r\\n\\t\\t\\tgroupDown.appendChild(circle);\\r\\n\\t\\t\\tvar polygon = objSVG.createPolygon(circleDownArrowID + \\\"polygon\\\",\\\"2,5.5 14,5.5 8,11.5\\\",\\\"nsMenuArrow\\\");\\r\\n\\t\\t\\tgroupDown.appendChild(polygon);\\r\\n\\t\\t\\tobjSVG.addElementInSymbol(circleDownArrowID,\\\"0 0 16 16\\\",groupDown);\\r\\n\\t\\t\\tif(this.__enableExport)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addExportInPage();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableColumnSetting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addColumnSettingIcon();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableFilter)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsvgShapes.addFilterIcon();\\r\\n\\t\\t\\t\\tsvgShapes.addSearchIcon();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__objGrid.__addSVGInPage(objSVG);\\r\\n\\t\\t\\tsvgShapes.addMoveIcon();\\r\\n\\t\\t\\tsvgShapes.addLeftIcon();\\r\\n\\t\\t\\tsvgShapes.addRightIcon();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.warning(\\\"NSGrid\\\",\\\"NSSvg has not been included so the icons might not appear\\\");\\r\\n\\t\\t}\\r\\n\\t\\tthis.__imgUtil = new this.util.image();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__addStyleInDOM = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableMouseHover)\\r\\n\\t    {\\r\\n\\t\\t\\t//this.util.addCSSClassInDOM([\\\"#\\\" + this.getID() + \\\" .nsGridRow:hover > td\\\"],[\\\"background-color: \\\" + this.__mouseHoverColor + \\\"!important;\\\"]);\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__addRowHeightInDOM = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__enableVariableRowHeight)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rowHeight = null;\\r\\n\\t\\t\\tif(this.__rowHeight > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowHeight = this.__rowHeight + \\\"px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__virtualRowHeight > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowHeight = this.__virtualRowHeight + \\\"px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(rowHeight)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tthis.util.addCSSClassInDOM([\\\"#\\\" + this.getID() + \\\" .nsBodyDataGridCell > div\\\"],[\\\"max-height:\\\" + rowHeight + \\\";\\\"]);\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__initializePluggins = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__nsGridSort)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsGridSort = new NSGridSort(this);\\r\\n\\t\\t\\tthis.__nsGridColumnMove = new NSGridColumnMove(this);\\r\\n\\t\\t\\tthis.__nsGridFilter = new NSGridFilter(this);\\r\\n\\t\\t\\tthis.__nsGridColumnResize = new NSGridColumnResize(this);\\r\\n\\t\\t\\tthis.__nsGridEditor = new NSGridEditor(this);\\r\\n\\t\\t\\tthis.__nsToolTipInElement = new this.util.nsToolTipInElement();\\r\\n\\t\\t\\tif(this.__enableKeyboardNavigation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsGridKeyboard = new NSGridKeyboard(this);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getCellDetailsForEditing = function(item,dataField)\\r\\n\\t{\\r\\n\\t\\tif(this.__nsGridEditor)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar colItem = this.__getColumnObjectByDataField(dataField);\\r\\n\\t\\t\\t\\tif(colItem)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar colIndex = colItem[this.__fieldColIndex];\\r\\n\\t\\t\\t\\t\\tvar row = this.__getRowFromItem(item);\\r\\n\\t\\t\\t\\t\\tif(row)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar cells = row.cells;\\r\\n\\t\\t\\t\\t\\t\\tvar cell = cells[colIndex];\\r\\n\\t\\t\\t\\t\\t\\treturn {cell: cell,item: item};\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__handleHiddenColumn = function()\\r\\n\\t{\\r\\n\\t\\tvar length = this.__columns.length;\\r\\n\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objColumn = this.__columns[count];\\r\\n\\t\\t\\tif(objColumn[this.__fieldColVisible] === false)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__setColumnVisibility(count,false,objColumn);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setColumnVisibility = function(index,isVisible,item)\\r\\n\\t{\\r\\n\\t\\tvar headerColGroupID = null;\\r\\n\\t\\tvar bodyColGroupID = null;\\r\\n\\t\\tvar objColumn = null;\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isString(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn = this.__getColumnObjectByDataField(item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isNumber(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn = this.__getColumnObject(item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjColumn = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(objColumn)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\theaderColGroupID = this.getID() + \\\"HeaderColGroup\\\" + objColumn.dataField;\\r\\n\\t\\t\\t\\tbodyColGroupID = this.getID() + \\\"BodyColGroup\\\" + objColumn.dataField;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(isVisible)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeCSSClassInDOM([\\\"#\\\" + this.getID() + \\\" :nth-child(\\\" + (index + 1) +\\\").nsGridCell\\\"]);\\r\\n\\t\\t\\tif(objColumn)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeCSSClassInDOM([\\\"#\\\" + headerColGroupID + \\\", #\\\" + bodyColGroupID]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addCSSClassInDOM([\\\"#\\\" + this.getID() + \\\" :nth-child(\\\" + (index + 1) +\\\").nsGridCell\\\"],[\\\"display:none;\\\"]);\\r\\n\\t\\t\\tif(objColumn)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addCSSClassInDOM([\\\"#\\\" + headerColGroupID + \\\", #\\\" + bodyColGroupID],[\\\"display:none;\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__addColumnPseudoStyle = function()\\r\\n\\t{\\r\\n\\t\\tvar arrClass = [];\\r\\n\\t\\tvar arrCSSText = [];\\r\\n\\t\\tvar headerBodyRow = this.__getHeaderBodyRow(this.__tblCenterHeader);\\r\\n\\t\\tif(headerBodyRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar headerCells = headerBodyRow.cells;\\r\\n\\t\\t\\tvar colIndex = 0;\\r\\n\\t\\t\\tvar cell = null;\\r\\n\\t        for(colIndex = 0; colIndex < headerCells.length; colIndex++)\\r\\n\\t        {\\r\\n\\t        \\tcell = headerCells[colIndex];\\r\\n\\t        \\tarrClass.push(\\\"#\\\" + this.getID() + \\\".nsMobileStackGrid td:nth-of-type(\\\" + (colIndex + 1) + \\\"):before\\\");\\r\\n\\t        \\tvar text = cell.textContent.trim();\\r\\n\\t        \\tif(text && text.length > 0)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\ttext = text + \\\": \\\";\\r\\n\\t        \\t}\\r\\n\\t        \\tarrCSSText.push(\\\"content: '\\\" + text + \\\"';\\\");\\r\\n\\t        }\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.addCSSClassInDOM(arrClass,arrCSSText,false);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__updateItemInSource = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__updateItemInArray(this.__dataSource,item);\\r\\n\\t\\t\\tthis.__updateItemInArray(this.__arrWrapper,item);\\r\\n\\t\\t\\tthis.__updateItemInArray(this.__arrInternalSource,item);\\r\\n\\t\\t\\tthis.__updateItemInArray(this.__arrFlatHierarchicalSource,item,true);\\r\\n\\t\\t\\tthis.__updateItemInArray(this.__arrFilteredGroupedSource,item);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__updateItemInArray = function(source,item,excludeChildren)\\r\\n\\t{\\r\\n\\t\\tvar isFound = false;\\r\\n\\t\\tif(source && source.length > 0 && item)\\r\\n\\t\\t{\\r\\n\\t\\t\\texcludeChildren = Boolean.parse(excludeChildren);\\r\\n\\t\\t\\tvar length = source.length;\\r\\n\\t\\t\\tvar tempItem = {};\\r\\n\\t\\t\\tvar arrChildItems = [];\\r\\n\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttempItem = source[count];\\r\\n\\t\\t\\t\\tif(tempItem[this.__fieldIndex] === item[this.__fieldIndex])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsource[count] = item;\\r\\n\\t\\t\\t\\t\\tisFound = true;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif((this.__enableHierarchical || this.__enableGrouping || this.__enableMasterDetail) && !excludeChildren)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrChildItems = tempItem[this.__childField];\\r\\n\\t\\t\\t\\t\\tif(arrChildItems && arrChildItems.length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tisFound = this.__updateItemInArray(arrChildItems,item,excludeChildren);\\r\\n\\t\\t\\t\\t\\t\\tif(isFound)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn isFound;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__setComponentHeight = function()\\r\\n\\t{\\r\\n\\t\\tvar offset = this.util.getNumber(this.__heightOffset);\\r\\n\\t\\tif(offset > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compHeight = this.util.getBodyDimension().height;\\r\\n\\t\\t\\tthis.__baseComponent.style.height = (compHeight - offset) + \\\"px\\\";\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//to get header row which has column width\\r\\n\\tNSGrid.prototype.__getHeaderHeaderRow = function(table)\\r\\n\\t{\\r\\n\\t\\tvar headerRow = null;\\r\\n\\t\\tif(table && table.tHead && table.tHead.rows && table.tHead.rows.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\theaderRow = table.tHead.rows[0];\\r\\n\\t\\t}\\r\\n\\t\\treturn headerRow;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//to get header row which has column header Name\\r\\n\\tNSGrid.prototype.__getHeaderBodyRow = function(table)\\r\\n\\t{\\r\\n\\t\\tvar headerBodyRow = null;\\r\\n\\t\\tif(table)\\r\\n\\t\\t{\\r\\n\\t\\t\\theaderBodyRow = table.querySelector(\\\".nsGridHeaderRow\\\");\\r\\n\\t\\t}\\r\\n\\t\\treturn headerBodyRow;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getHeaderFilterRow = function(table)\\r\\n\\t{\\r\\n\\t\\tvar headerFilterRow = null;\\r\\n\\t\\tif(table)\\r\\n\\t\\t{\\r\\n\\t\\t\\theaderFilterRow = table.querySelector(\\\".nsGridFilterRow\\\");\\r\\n\\t\\t}\\r\\n\\t\\treturn headerFilterRow;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getHeaderExtraRow = function(table)\\r\\n\\t{\\r\\n\\t\\tvar arrExtraRows = null;\\r\\n\\t\\tif(table)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrExtraRows = table.querySelectorAll(\\\".nsHeaderExtraRow\\\");\\r\\n\\t\\t}\\r\\n\\t\\treturn arrExtraRows;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//to get body row which has column width\\r\\n\\tNSGrid.prototype.__getBodyHeaderRow = function(table)\\r\\n\\t{\\r\\n\\t\\tvar bodyRow = null;\\r\\n\\t\\tif(table && table.tHead && table.tHead.rows && table.tHead.rows.length > 0)\\r\\n\\t    {\\r\\n\\t\\t\\tbodyRow = table.tHead.rows[0];\\r\\n\\t\\t}\\r\\n\\t\\treturn bodyRow;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getBodyBodyRow = function(table)\\r\\n\\t{\\r\\n\\t\\tvar arrRows = null;\\r\\n\\t\\tif(table && table.tBodies && table.tBodies.length > 0 && table.tBodies[0].rows && table.tBodies[0].rows.length > 0)\\r\\n\\t\\t{\\r\\n    \\t\\tarrRows = table.tBodies[0].rows;\\r\\n\\t\\t}\\r\\n\\t\\treturn arrRows;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getCustomIcon = function(iconField)\\r\\n\\t{\\r\\n\\t\\tif(this.__icons && this.__icons[iconField])\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__icons[iconField];\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getColumnCustomIcon = function(colItem,iconField)\\r\\n\\t{\\r\\n\\t\\tif(colItem && colItem.icons && colItem.icons[iconField])\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn colItem.icons[iconField];\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__isSortingIconCustom = function(colItem)\\r\\n\\t{\\r\\n\\t\\tif(this.__getColumnCustomIcon(colItem,\\\"sortAscending\\\") && this.__getColumnCustomIcon(colItem,\\\"sortDescending\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__isRowExpansionIconCustom = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__getCustomIcon(\\\"rowExpanded\\\") && this.__getCustomIcon(\\\"rowCollapsed\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getViewportHeight = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__divTableHeaderContainerWrapper.offsetHeight + this.__divTableBodyContainerWrapper.offsetHeight + this.__divTableFooterContainerWrapper.offsetHeight;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__dispatchEvent = function(eventType,data,param,bubbles,cancelable)\\r\\n\\t{\\r\\n\\t\\tif(this.__eventDispatcher)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__eventDispatcher(eventType,data,param,bubbles,cancelable);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,eventType,data,param,bubbles,cancelable);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__dispatchInternalEvent = function(eventType,data,param,bubbles,cancelable)\\r\\n\\t{\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,this.__getInternalEvent(eventType),data,param,bubbles,cancelable);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__listenInternalEvent = function(eventType,callback)\\r\\n\\t{\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,this.__getInternalEvent(eventType),function(event){\\r\\n\\t\\t\\tcallback(event,event.detail);\\r\\n\\t\\t});\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__getInternalEvent = function(eventType)\\r\\n\\t{\\r\\n\\t\\treturn \\\"__\\\" + eventType;\\r\\n\\t};\\r\\n\\t/******************************End of Custom Function *************************************/\\r\\n\\t/******************************Touch Related Function *************************************/\\r\\n\\tNSGrid.prototype.__addTouchEvent = function(element)\\r\\n\\t{\\r\\n\\t\\tvar objTouch = null;\\r\\n\\t\\tif(element && this.__enableTouchEvents)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__objTouchEvents.has(element))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjTouch = this.__objTouchEvents.get(element);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjTouch = new NSTouchToMouse(element);\\r\\n\\t\\t\\t\\tthis.__objTouchEvents.set(element,objTouch);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn objTouch;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.__removeTouchEvent = function(element)\\r\\n\\t{\\r\\n\\t\\tvar objTouch = null;\\r\\n\\t\\tif(element && this.__enableTouchEvents)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__objTouchEvents.has(element))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t/*objTouch = this.__objTouchEvents.get(element);\\r\\n\\t\\t\\t\\tthis.__objTouchEvents.delete(objTouch);*/\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn objTouch;\\r\\n\\t};\\r\\n\\t\\r\\n\\t/******************************End of Touch Related Function *************************************/\\r\\n\\t/******************************Loader Related Function *************************************/\\r\\n\\tNSGrid.prototype.showLoader = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__loader)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__loader = new this.util.loader(this.__divOuterContainer);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__loader.show();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSGrid.prototype.hideLoader = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__loader)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__loader.hide();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t/******************************End of Loader Related Function *************************************/\\r\\n\\t/******************************Start of Export Related Function *************************************/\\r\\n\\tNSGrid.prototype.__exportHandler = function(target,item)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__exportFileName || this.__exportFileName === \\\"\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__exportFileName = \\\"Download\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar nsExport = new NSExport(this,this.__exportFileName);\\r\\n\\t\\t\\tswitch (item.id) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    case 0:\\r\\n\\t\\t\\t    \\tvar setting = {type:\\\"xls\\\",event:null,sheetName:this.__exportFileName,element:null,properties:item};\\r\\n\\t\\t\\t    \\tnsExport.excel(setting);\\r\\n\\t\\t\\t        break;\\r\\n\\t\\t\\t    case 1:\\r\\n\\t\\t\\t    \\tnsExport.csv();\\r\\n\\t\\t\\t        break;\\r\\n\\t\\t\\t    case 2:\\r\\n\\t\\t\\t    \\tvar setting = {type:\\\"doc\\\",event:null,orientation:null,element:null};\\r\\n\\t\\t\\t    \\tnsExport.word(setting);\\r\\n\\t\\t\\t        break;\\r\\n\\t\\t\\t    case 3:\\r\\n\\t\\t\\t    \\tnsExport.text();\\r\\n\\t\\t\\t        break;\\r\\n\\t\\t\\t    case 4:\\r\\n\\t\\t\\t    \\tnsExport.xml();\\r\\n\\t\\t\\t        break;\\r\\n\\t\\t\\t    case 5:\\r\\n\\t\\t\\t    \\tnsExport.json();\\r\\n\\t\\t\\t        break;\\r\\n\\t\\t\\t    case 6:\\r\\n\\t\\t\\t    \\tnsExport.pdf();\\r\\n\\t\\t\\t        break;\\r\\n\\t\\t\\t    case 7:\\r\\n\\t\\t\\t    \\tnsExport.image();\\r\\n\\t\\t\\t        break;\\r\\n\\t\\t\\t    case 8:\\r\\n\\t\\t\\t    \\tvar setting = {type:\\\"xlsx\\\",event:null,sheetName:this.__exportFileName,element:null,properties:item};\\r\\n\\t\\t\\t    \\tnsExport.excel(setting);\\r\\n\\t\\t\\t        break;\\r\\n\\t\\t\\t    case 9:\\r\\n\\t\\t\\t    \\tvar setting = {type:\\\"doc\\\",event:null,orientation:null,element:null};\\r\\n\\t\\t\\t    \\tnsExport.word(setting);\\r\\n\\t\\t\\t        break;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//Events\\r\\n\\tNSGrid.GRID_RENDERED = \\\"gridRendered\\\";\\r\\n\\tNSGrid.ROW_SELECTED = \\\"rowSelected\\\";\\r\\n\\tNSGrid.ROW_UNSELECTED = \\\"rowUnselected\\\";\\r\\n\\tNSGrid.ROW_CLICKED = \\\"rowClicked\\\";\\r\\n\\tNSGrid.ROW_DOUBLE_CLICKED = \\\"rowDoubleClicked\\\";\\r\\n\\tNSGrid.ROW_NAVIGATED = \\\"rowNavigated\\\";\\r\\n\\tNSGrid.CELL_SELECTED = \\\"cellSelected\\\";\\r\\n\\tNSGrid.CELL_UNSELECTED = \\\"cellUnselected\\\";\\r\\n\\tNSGrid.CELL_CLICKED = \\\"cellClicked\\\";\\r\\n\\tNSGrid.CELL_DOUBLE_CLICKED = \\\"cellDoubleClicked\\\";\\r\\n\\tNSGrid.SORT_CHANGING = \\\"sortChanging\\\";\\r\\n\\tNSGrid.SORT_CHANGED = \\\"sortChanged\\\";\\r\\n\\tNSGrid.ADVANCED_FILTER_CLOSING = \\\"advancedFilterClosing\\\";\\r\\n\\tNSGrid.FILTER_CHANGING = \\\"filterChanging\\\";\\r\\n\\tNSGrid.FILTER_CHANGED = \\\"filterChanged\\\";\\r\\n\\tNSGrid.FILTER_RESETTED = \\\"filterResetted\\\";\\r\\n\\tNSGrid.COLUMN_RESIZING = \\\"columnResizing\\\";\\r\\n\\tNSGrid.COLUMN_RESIZED = \\\"columnResized\\\";\\r\\n\\tNSGrid.COLUMN_MOVING = \\\"columnMoving\\\";\\r\\n\\tNSGrid.COLUMN_MOVED = \\\"columnMoved\\\";\\r\\n\\tNSGrid.MULTI_SELECTION_EDITORS_TEXT = \\\"TEXT\\\";\\r\\n\\tNSGrid.MULTI_SELECTION_EDITORS_TEXTAREA = \\\"TEXTAREA\\\";\\r\\n\\tNSGrid.EDITOR_CELL_VALUE_CHANGED = \\\"editorCellValueChanged\\\";\\r\\n\\t\\r\\n\\t\\r\\n\\t//Editors\\r\\n\\tNSGrid.EDITOR_EDITTYPE_CELL = \\\"cell\\\";\\r\\n\\tNSGrid.EDITOR_EDITTYPE_ROW = \\\"row\\\";\\r\\n\\tNSGrid.EDITOR_EDITING_SINGLECLICK = \\\"singleClick\\\";\\r\\n\\tNSGrid.EDITOR_EDITING_DOUBLECLICK = \\\"doubleClick\\\";\\r\\n\\tNSGrid.EDITOR_EDITING_NOCLICK = \\\"noClick\\\";\\r\\n\\tNSGrid.EDITOR_TYPE_TEXT = \\\"text\\\";\\r\\n\\tNSGrid.EDITOR_TYPE_TEXTAREA = \\\"textArea\\\";\\r\\n\\tNSGrid.EDITOR_TYPE_CUSTOM = \\\"custom\\\";\\r\\n\\t\\r\\n\\tNSGrid.FILTER_TYPE_DATE = \\\"date\\\";\\r\\n\\tNSGrid.ADVANCED_FILTER_TEXT = \\\"text\\\";\\r\\n\\tNSGrid.ADVANCED_FILTER_NUMBER = \\\"number\\\";\\r\\n\\tNSGrid.ADVANCED_FILTER_LIST = \\\"list\\\";\\r\\n\\tNSGrid.ADVANCED_FILTER_DATE = \\\"date\\\";\\r\\n\\t\\r\\n\\t\\r\\n\\treturn NSGrid;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSGrid\\\",NSGrid);\";","export const NSListCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\nvar svgRef = require('./nsSVG.min.js');\\r\\nvar NSSvg = svgRef.NSSvg;\\r\\nvar NSSvgShapes = svgRef.NSSvgShapes;\\r\\nvar plugginsRef = require('./nsPluggins.min.js');\\r\\nvar nsTextEditor = plugginsRef.nsTextEditor;\\r\\nvar nsTextAreaEditor = plugginsRef.nsTextAreaEditor;\\r\\nvar NSCellSelection = plugginsRef.NSCellSelection;\\r\\nvar NSTableCellNavigator = plugginsRef.NSTableCellNavigator;\\r\\nvar dateutilRef = require('./nsDateUtil.min.js');\\r\\nvar NSDateUtil = dateutilRef.NSDateUtil;\\r\\n\\r\\n\\t\\t}\\r\\nvar NSDragDrop = (function()\\r\\n{\\r\\n\\tvar NSDragDrop = function(setting)\\r\\n\\t{\\r\\n\\t\\tthis.ITEM_DROPPING = \\\"itemDropping\\\";\\r\\n\\t\\tthis.ITEM_DROPPED = \\\"itemDropped\\\";\\r\\n\\t\\tthis.DRAG_STARTING = \\\"dragStarting\\\";\\r\\n\\t\\tthis.DRAG_STARTED = \\\"dragStarted\\\";\\r\\n\\t\\tthis.DRAGGING = \\\"dragging\\\";\\r\\n\\t\\tthis.DRAG_END = \\\"dragEnd\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__id = null;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\tthis.__data = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__parentContainerType = null;\\r\\n\\t\\tthis.__divMovable = null;\\r\\n\\t\\tthis.__compPlaceholder = null;\\r\\n\\t\\tthis.__itemPosition = null;\\r\\n\\t\\tthis.__objSelectedItem = {scrollableContainer:null,containment:null};\\r\\n\\t\\tthis.__lastTarget = null;\\r\\n\\t\\tthis.__isDragging = false;\\r\\n\\t\\tthis.__holdTimeoutInterval = -1;\\r\\n\\t\\tthis.__documentMouseMoveRef = null;\\r\\n\\t\\tthis.__documentMouseUpRef = null;\\r\\n\\t\\tthis.__documentMouseMoveHoldRef = null;\\r\\n\\t\\tthis.__documentMouseUpHoldRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.remove = function() \\r\\n\\t{ \\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.setDragData = function(data) \\r\\n\\t{ \\r\\n\\t\\tthis.__data = data;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.getDragData = function() \\r\\n\\t{ \\r\\n\\t\\treturn this.__data;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__initialize = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\tcontainer: this.__setting[\\\"container\\\"] || null,\\r\\n\\t\\t\\t\\t\\tchildNodeType: this.__setting[\\\"childNodeType\\\"] || null,\\r\\n\\t\\t\\t\\t\\tisContainerDraggable:(this.util.isUndefinedOrNull(this.__setting[\\\"isContainerDraggable\\\"]) ? true : Boolean.parse(this.__setting[\\\"isContainerDraggable\\\"])),\\r\\n\\t\\t\\t\\t\\tisContainerDroppable:(this.util.isUndefinedOrNull(this.__setting[\\\"isContainerDroppable\\\"]) ? true : Boolean.parse(this.__setting[\\\"isContainerDroppable\\\"])),\\r\\n\\t\\t\\t\\t\\tenableDragByHandle: Boolean.parse(this.__setting[\\\"enableDragByHandle\\\"]),\\r\\n\\t\\t\\t\\t\\tdragHandlerClass: this.__setting[\\\"dragHandlerClass\\\"] || \\\"nsDragHandler\\\",\\r\\n\\t\\t\\t\\t\\tenableDragAfterHold: Boolean.parse(this.__setting[\\\"enableDragAfterHold\\\"]),\\r\\n\\t\\t\\t\\t\\tenableCloneMode: Boolean.parse(this.__setting[\\\"enableCloneMode\\\"]),\\r\\n\\t\\t\\t\\t\\tholdTime:(this.util.isUndefinedOrNull(this.__setting[\\\"holdTime\\\"]) ? 500 : parseInt(this.__setting[\\\"holdTime\\\"])),\\r\\n\\t\\t\\t\\t\\tcreateCloneCallback: (this.__setting[\\\"createCloneCallback\\\"] ? this.util.getFunction(this.__setting[\\\"createCloneCallback\\\"]) : null),\\r\\n\\t\\t\\t\\t\\tcreatePlaceholderCallback: (this.__setting[\\\"createPlaceholderCallback\\\"] ? this.util.getFunction(this.__setting[\\\"createPlaceholderCallback\\\"]) : null),\\r\\n\\t\\t\\t\\t\\tnodeDroppableCallback: (this.__setting[\\\"nodeDroppableCallback\\\"] ? this.util.getFunction(this.__setting[\\\"nodeDroppableCallback\\\"]) : null),\\r\\n\\t\\t\\t\\t\\tnodeDraggableCallback: (this.__setting[\\\"containerDroppableCallback\\\"] ? this.util.getFunction(this.__setting[\\\"containerDroppableCallback\\\"]) : null),\\r\\n\\t\\t\\t\\t\\tinsertNodeCallback: (this.__setting[\\\"insertNodeCallback\\\"] ? this.util.getFunction(this.__setting[\\\"insertNodeCallback\\\"]) : null),\\r\\n\\t\\t\\t\\t\\tmoveNodeCallback: (this.__setting[\\\"moveNodeCallback\\\"] ? this.util.getFunction(this.__setting[\\\"moveNodeCallback\\\"]) : null),\\r\\n\\t\\t\\t\\t\\tremoveNodeCallback: (this.__setting[\\\"removeNodeCallback\\\"] ? this.util.getFunction(this.__setting[\\\"removeNodeCallback\\\"]) : null),\\r\\n\\t\\t\\t\\t\\tnodeDragHoverClass: this.__setting[\\\"nodeDragHoverClass\\\"] || \\\"nsNodeDragHover\\\",\\r\\n\\t\\t\\t\\t\\tnodeDraggingClass: this.__setting[\\\"nodeDraggingClass\\\"] || \\\"nsNodeDraggingClass\\\"\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(this.__config.container && this.__config.childNodeType)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__parentContainerType = this.__config.container.tagName;\\r\\n\\t\\t\\t\\tthis.__prepareContainer();\\r\\n\\t\\t\\t\\tthis.__initializeChildren();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__initializeChildren = function()\\r\\n\\t{\\r\\n\\t\\tvar arrChildNode = this.__config.container.getElementsByTagName(this.__config.childNodeType);\\r\\n\\t\\tvar childNode = null;\\r\\n\\t\\tfor (var count = 0; count < arrChildNode.length; count++) \\r\\n\\t\\t{\\r\\n\\t\\t\\tchildNode = arrChildNode[count];\\r\\n\\t\\t\\tthis.__prepareChildNode(childNode,count);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__prepareContainer = function()\\r\\n\\t{\\r\\n\\t\\tvar container = this.__config.container;\\r\\n\\t\\tvar nsObject = {};\\r\\n\\t\\tnsObject.id = this.__getID(); \\r\\n\\t\\tnsObject.isDraggable = this.__config.isContainerDraggable;\\r\\n\\t\\tnsObject.isDroppable = this.__config.isContainerDroppable;\\r\\n\\t\\tnsObject.insertNode = this.__insertNode.bind(this);\\r\\n\\t\\tnsObject.moveNode = this.__moveNode.bind(this);\\r\\n\\t\\tnsObject.removeNode = this.__removeNode.bind(this);\\r\\n\\t\\tcontainer.nsObject = nsObject;\\r\\n\\t\\tvar draggableClass = nsObject.isDraggable ? \\\"nsDraggableContainer\\\" : \\\"nsNonDraggableContainer\\\";\\r\\n\\t\\tvar droppableClass = nsObject.isDroppable ? \\\"nsDroppableContainer\\\" : \\\"nsNonDroppableContainer\\\";\\r\\n\\t\\tthis.util.addStyleClass(container,draggableClass);\\t\\r\\n\\t\\tthis.util.addStyleClass(container,droppableClass);\\r\\n\\t\\tvar containerWebNode = this.util.getWebComponentElement(container);\\r\\n\\t\\tcontainerWebNode.nsObject = nsObject;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__prepareChildNode = function(childNode,index)\\r\\n\\t{\\r\\n\\t\\tvar isDragEnabled = this.__isNodeDraggable(childNode);\\r\\n\\t\\tvar isDropEnabled = this.__isNodeDroppable(childNode);\\r\\n\\t\\tvar nsObject = {};\\r\\n\\t\\tnsObject.parent = this.__config.container;\\r\\n\\t\\tnsObject.index = index;\\r\\n\\t\\tthis.util.removeStyleClass(childNode,this.__config.nodeDragHoverClass);\\r\\n\\t\\tif(isDragEnabled) \\r\\n\\t\\t{\\r\\n\\t\\t\\tnsObject.position = this.util.getOffSet(childNode);\\r\\n\\t\\t\\tthis.util.addStyleClass(childNode,\\\"nsNodeDragEnabled\\\");\\t\\r\\n\\t\\t\\tif(this.__config.enableDragByHandle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar handle = childNode.querySelector(\\\".\\\" + this.__config.dragHandlerClass);\\r\\n\\t\\t\\t\\tif(handle)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(handle,\\\"mousedown\\\",this.__childMouseDownHandler.bind(this));\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(handle,\\\"touchstart\\\",this.__childMouseDownHandler.bind(this));\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(childNode,\\\"mousedown\\\",this.__dragStartPreventHandler.bind(this));\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(childNode,\\\"touchstart\\\",this.__dragStartPreventHandler.bind(this));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__config.enableDragAfterHold)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addEvent(childNode,\\\"mousedown\\\",this.__childHoldMouseDownHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.util.addEvent(childNode,\\\"touchstart\\\",this.__childHoldMouseDownHandler.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addEvent(childNode,\\\"mousedown\\\",this.__childMouseDownHandler.bind(this));\\r\\n\\t\\t\\t\\tthis.util.addEvent(childNode,\\\"touchstart\\\",this.__childMouseDownHandler.bind(this));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(childNode,\\\"nsNodeDragDisable\\\");\\t\\t\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t\\tnsObject.dragEnabled = isDragEnabled;\\r\\n\\t\\tnsObject.dropEnabled = isDropEnabled;\\r\\n\\t\\tchildNode.nsObject = nsObject;\\r\\n\\t\\tvar childWebNode = this.util.getWebComponentElement(childNode);\\r\\n\\t\\tchildWebNode.nsObject = nsObject;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__childHoldMouseDownHandler= function(event)\\r\\n\\t{\\r\\n\\t\\tthis.__clearHoldTime();\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tthis.__holdTimeoutInterval = setTimeout(function () {\\r\\n\\t         self.__childMouseDownHandler.bind(self)(event);\\r\\n\\t       },this.__config.holdTime);\\r\\n\\t\\tthis.__addDocumentHoldListener();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__documentMouseMoveHoldHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tthis.__clearHoldTime();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__documentMouseUpHoldHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tthis.__clearHoldTime();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__childMouseDownHandler= function(event)\\r\\n\\t{\\r\\n\\t\\tif(!this.__isDragging)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__clearHoldTime();\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t    var target = this.util.getTarget(event);\\r\\n\\t\\t    target = this.util.findParent(target,this.__config.childNodeType);\\r\\n\\t\\t    if(target && target[\\\"nsObject\\\"] && target[\\\"nsObject\\\"][\\\"dragEnabled\\\"] && target[\\\"nsObject\\\"][\\\"parent\\\"] \\r\\n\\t\\t    \\t&& target[\\\"nsObject\\\"][\\\"parent\\\"][\\\"nsObject\\\"] && target[\\\"nsObject\\\"][\\\"parent\\\"][\\\"nsObject\\\"][\\\"isDraggable\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t    \\tvar cancelled = this.util.dispatchEvent(this.__config.container,this.DRAG_STARTING,{node:target},{node:target},true,true);\\r\\n\\t\\t \\t\\tif(!cancelled)\\r\\n\\t\\t \\t\\t{\\r\\n\\t\\t\\t    \\tthis.__isDragging = true;\\r\\n\\t\\t\\t    \\tthis.__addDocumentListener();\\r\\n\\t\\t\\t    \\t//TODO: Find parent with scroll\\r\\n\\t\\t\\t    \\tthis.__objSelectedItem.scrollableContainer = document.documentElement;\\r\\n\\t\\t\\t    \\t//TODO: Find parent for containment\\r\\n\\t\\t\\t    \\tthis.__objSelectedItem.containment = document.body;\\r\\n\\t\\t\\t    \\tthis.__itemPosition = this.__positionStarted(event,target,this.__objSelectedItem.scrollableContainer);\\r\\n\\t\\t\\t\\t    this.util.makeBodyUnselectable();\\r\\n\\t\\t\\t\\t    // remove text selection (Chrome, FF, Opera, Safari)\\r\\n\\t\\t\\t\\t    if (window.getSelection) \\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\t\\twindow.getSelection().removeAllRanges();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t// IE8\\r\\n\\t\\t\\t\\t\\telse if (document.selection && document.selection.type === \\\"Text\\\") \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\ttry \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdocument.selection.empty();\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tcatch (error) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t    if(!this.__config.enableCloneMode)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__compPlaceholder = this.__createPlaceholder(target);\\r\\n\\t\\t\\t\\t\\t\\tthis.__compPlaceholder = this.util.getWebComponentElement(this.__compPlaceholder);\\r\\n\\t\\t\\t\\t\\t\\tthis.util.insertAfterElement(target,this.__compPlaceholder);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__divMovable = this.__cloneNode(target);\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(target,this.__config.nodeDraggingClass);\\r\\n\\t\\t\\t\\t\\tthis.__movePosition(event,this.__divMovable,this.__itemPosition,this.__objSelectedItem.containment,\\\"absolute\\\",this.__objSelectedItem.scrollableContainer);\\r\\n\\t\\t\\t\\t\\t//adding offset to movable component if enableDragAfterHold is true so that users see that a clone has been created\\r\\n\\t\\t\\t\\t\\tif(this.__config.enableDragAfterHold)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar rectMovable = this.__divMovable.getBoundingClientRect();\\r\\n\\t\\t\\t\\t\\t\\tthis.__divMovable.style.left = (rectMovable.left + 5) + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t\\tthis.__divMovable.style.top = (rectMovable.top + 5) + \\\"px\\\";\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.util.dispatchEvent(this.__config.container,this.DRAG_STARTED,target,{item:target});\\r\\n\\t\\t\\t\\t\\t//assuming data has been set as this is last step before dragging starts\\r\\n\\t\\t\\t\\t\\ttarget[\\\"nsObject\\\"][\\\"data\\\"] = this.util.cloneObject(this.__data);\\r\\n\\t\\t\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t \\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__documentMouseMoveHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__divMovable)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar orignalNode = null;\\r\\n\\t\\t\\tif(this.__divMovable[\\\"nsObject\\\"] && this.__divMovable[\\\"nsObject\\\"][\\\"orignalNode\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\torignalNode = this.__divMovable[\\\"nsObject\\\"][\\\"orignalNode\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar objTargetElement = this.__getTargetElementDetails(event,orignalNode);\\r\\n\\t\\t\\tvar targetX = objTargetElement.x;\\r\\n\\t\\t    var targetY = objTargetElement.y;\\r\\n\\t\\t    var targetElement = objTargetElement.element;\\r\\n\\t\\t    if(this.__lastTarget)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.util.removeStyleClass(this.__lastTarget,this.__config.nodeDragHoverClass);\\r\\n\\t\\t    }\\r\\n\\t\\t    this.__movePosition(event,this.__divMovable,this.__itemPosition, this.__objSelectedItem.containment,\\\"absolute\\\",this.__objSelectedItem.scrollableContainer);\\r\\n\\t\\t    if(targetElement && targetElement[\\\"nsObject\\\"] && targetElement[\\\"nsObject\\\"][\\\"parent\\\"] \\r\\n\\t    \\t\\t&& targetElement[\\\"nsObject\\\"][\\\"parent\\\"][\\\"nsObject\\\"] && targetElement[\\\"nsObject\\\"][\\\"parent\\\"][\\\"nsObject\\\"][\\\"isDroppable\\\"])\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar container = objTargetElement.parent;\\r\\n\\t\\t\\t    var objTargetNSObject = targetElement[\\\"nsObject\\\"];\\r\\n\\t\\t\\t    if(this.__config.enableCloneMode)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tthis.util.addStyleClass(targetElement,this.__config.nodeDragHoverClass);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    else\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tif (this.__lastTarget !== targetElement) \\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tvar placeholderIndex = this.__getPlaceHolderIndex(container);\\r\\n\\t\\t\\t\\t        if (placeholderIndex < 0) \\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\tthis.__insertBefore(targetElement);\\r\\n\\t\\t\\t\\t        } \\r\\n\\t\\t\\t\\t        else \\r\\n\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\tif (placeholderIndex <= objTargetNSObject.index) \\r\\n\\t\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t        \\t\\tthis.__insertAfter(targetElement);\\r\\n\\t\\t\\t\\t\\t        } \\r\\n\\t\\t\\t\\t\\t        else \\r\\n\\t\\t\\t\\t\\t        {\\r\\n\\t\\t\\t\\t\\t        \\tthis.__insertBefore(targetElement);\\r\\n\\t\\t\\t\\t\\t        }\\r\\n\\t\\t\\t\\t        }\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t    }\\r\\n\\t\\t    }\\r\\n\\t \\t    var data = {node:orignalNode,x:targetX,y:targetY,targetNode:targetElement};\\r\\n\\t \\t    this.util.dispatchEvent(this.__config.container,this.DRAGGING,data,{item:data});\\r\\n\\t\\t    this.util.preventDefault(event);\\r\\n\\t\\t    this.__lastTarget = targetElement;\\r\\n\\t\\t    return false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__documentMouseUpHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tthis.__removeDocumentListener();\\r\\n\\t\\tif(this.__divMovable)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar orignalNode = null;\\r\\n\\t\\t\\tvar nodeData = null;\\r\\n\\t\\t\\tif(this.__divMovable[\\\"nsObject\\\"] && this.__divMovable[\\\"nsObject\\\"][\\\"orignalNode\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\torignalNode = this.__divMovable[\\\"nsObject\\\"][\\\"orignalNode\\\"];\\r\\n\\t\\t\\t\\tif(orignalNode && orignalNode[\\\"nsObject\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tnodeData = orignalNode[\\\"nsObject\\\"][\\\"data\\\"];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar objTargetElement = null;\\r\\n\\t\\t\\tvar isPlaceholder = false;\\r\\n\\t\\t\\tif(this.__config.enableCloneMode)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjTargetElement = this.__getTargetElementDetails(event,orignalNode);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjTargetElement = this.__getPlaceholderDetails(event);\\r\\n\\t\\t\\t\\tisPlaceholder = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar targetX = objTargetElement.x;\\r\\n\\t\\t    var targetY = objTargetElement.y;\\r\\n\\t\\t    var hasElementChanged = false;\\r\\n\\t\\t    var targetElement = objTargetElement.element;\\r\\n\\t\\t    if(targetElement && (isPlaceholder || targetElement[\\\"nsObject\\\"] && targetElement[\\\"nsObject\\\"][\\\"parent\\\"] \\r\\n\\t\\t\\t\\t&& targetElement[\\\"nsObject\\\"][\\\"parent\\\"][\\\"nsObject\\\"] && targetElement[\\\"nsObject\\\"][\\\"parent\\\"][\\\"nsObject\\\"][\\\"isDroppable\\\"]))\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar container = objTargetElement.parent;\\r\\n\\t\\t    \\tif(container && container.tagName.toLowerCase() === \\\"tbody\\\")\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tcontainer = this.util.findParent(container,\\\"table\\\");\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tvar objTargetNSObject = null;\\r\\n\\t\\t    \\tvar targetIndex = -1;\\r\\n\\t\\t    \\tif(this.__config.enableCloneMode)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t    \\t\\tobjTargetNSObject = targetElement[\\\"nsObject\\\"];\\r\\n\\t\\t    \\t\\ttargetIndex = objTargetNSObject[\\\"index\\\"];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    \\telse\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\ttargetIndex = Array.prototype.indexOf.call(targetElement.parentNode.children,targetElement);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tvar item = (nodeData ? nodeData : {});\\r\\n\\t\\t    \\titem.targetNode = targetElement;\\r\\n\\t\\t    \\titem.node = orignalNode;\\r\\n\\t\\t    \\tif(container)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tvar cancelled = this.util.dispatchEvent(container,this.ITEM_DROPPING,item,{item:item},true,true);\\r\\n\\t\\t\\t \\t\\tif(!cancelled)\\r\\n\\t\\t\\t \\t\\t{\\r\\n\\t\\t\\t \\t\\t\\tif(orignalNode === targetElement)\\r\\n\\t\\t\\t \\t\\t\\t{\\r\\n\\t\\t\\t \\t\\t\\t\\thasElementChanged = false;\\r\\n\\t\\t\\t \\t\\t\\t\\tthis.__animateInvalidDrop(orignalNode);\\r\\n\\t\\t\\t \\t\\t\\t\\tconsole.debug(\\\"Item has not changed\\\");\\r\\n\\t\\t\\t \\t\\t\\t}\\r\\n\\t\\t\\t \\t\\t    if(this.__isSameContainer(container))\\r\\n\\t\\t\\t \\t\\t    {\\r\\n\\t\\t\\t \\t\\t    \\tif(orignalNode[\\\"nsObject\\\"][\\\"index\\\"] !== targetIndex)\\r\\n\\t\\t\\t \\t\\t    \\t{\\r\\n\\t\\t\\t \\t\\t    \\t\\tthis.__moveNode(orignalNode,targetIndex,targetElement,nodeData);\\r\\n\\t\\t\\t \\t\\t    \\t\\thasElementChanged = true;\\r\\n\\t\\t\\t \\t\\t    \\t}\\r\\n\\t\\t\\t \\t\\t    }\\r\\n\\t\\t\\t \\t\\t    else\\r\\n\\t\\t\\t \\t\\t    {\\r\\n\\t\\t\\t \\t\\t    \\tthis.__removeNode(orignalNode,nodeData);\\r\\n\\t\\t\\t \\t\\t    \\tif(container[\\\"nsObject\\\"] && container[\\\"nsObject\\\"][\\\"insertNode\\\"])\\r\\n\\t\\t\\t \\t\\t    \\t{\\r\\n\\t\\t\\t \\t\\t    \\t\\tcontainer[\\\"nsObject\\\"][\\\"insertNode\\\"](orignalNode,targetIndex,targetElement,nodeData);\\r\\n\\t\\t\\t \\t\\t    \\t}\\r\\n\\t\\t\\t \\t\\t    \\thasElementChanged = true;\\r\\n\\t\\t\\t \\t\\t    }\\r\\n\\t\\t\\t \\t\\t    this.util.dispatchEvent(container,this.ITEM_DROPPED,item,{item:item},true,false);\\r\\n\\t\\t\\t \\t\\t}\\r\\n\\t\\t\\t \\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t \\t\\t\\thasElementChanged = false;\\r\\n\\t\\t\\t \\t\\t\\tthis.__animateInvalidDrop(orignalNode);\\r\\n\\t\\t\\t\\t\\t\\tconsole.debug(\\\"Item drop was cancelled\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t    \\thasElementChanged = false;\\r\\n\\t\\t\\t\\t\\tthis.__animateInvalidDrop(orignalNode);\\r\\n\\t\\t\\t\\t\\tconsole.debug(\\\"Item was dropped at invalid location\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t    else\\r\\n\\t\\t\\t{\\r\\n\\t\\t    \\thasElementChanged = false;\\r\\n\\t\\t\\t\\tthis.__animateInvalidDrop(orignalNode);\\r\\n\\t\\t\\t\\tconsole.debug(\\\"Item was dropped at invalid location\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t    if(hasElementChanged)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__dragEndCleanUp();\\r\\n\\t\\t    }\\r\\n\\t\\t    this.util.dispatchEvent(this.__config.container,this.DRAG_END,orignalNode,{item:orignalNode},true,false);\\r\\n\\t\\t\\tthis.util.preventDefault(event);\\r\\n\\t\\t    event.stopPropagation();\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__dragEndCleanUp();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__dragStartPreventHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.util.preventDefault(event);\\r\\n\\t    event.stopPropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__addDocumentListener = function() \\r\\n\\t{\\r\\n\\t\\tif(!this.__documentMouseMoveRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__documentMouseMoveRef = this.__documentMouseMoveHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"mousemove\\\",this.__documentMouseMoveRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__documentMouseUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__documentMouseUpRef = this.__documentMouseUpHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"mouseup\\\",this.__documentMouseUpRef);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__removeDocumentListener = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__documentMouseMoveRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mousemove\\\",this.__documentMouseMoveRef);\\r\\n\\t\\t\\tthis.__documentMouseMoveRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__documentMouseUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mouseup\\\",this.__documentMouseUpRef);\\r\\n\\t\\t\\tthis.__documentMouseUpRef = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__addDocumentHoldListener = function() \\r\\n\\t{\\r\\n\\t\\tif(!this.__documentMouseMoveHoldRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__documentMouseMoveHoldRef = this.__documentMouseMoveHoldHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"mousemove\\\",this.__documentMouseMoveHoldRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__documentMouseUpHoldRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__documentMouseUpHoldRef = this.__documentMouseUpHoldHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"mouseup\\\",this.__documentMouseUpHoldRef);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__removeDocumentHoldListener = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__documentMouseMoveHoldRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mousemove\\\",this.__documentMouseMoveHoldRef);\\r\\n\\t\\t\\tthis.__documentMouseMoveHoldRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__documentMouseUpHoldRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"mouseup\\\",this.__documentMouseUpHoldRef);\\r\\n\\t\\t\\tthis.__documentMouseUpHoldRef = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__animateInvalidDrop = function(orignalNode)\\r\\n\\t{\\r\\n\\t\\tif(this.__divMovable && orignalNode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar transitionEndCallback = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.util.removeStyleClass(self.__divMovable,\\\"nsAnimateGhost\\\");\\r\\n\\t\\t\\t\\tself.__dragEndCleanUp();\\r\\n\\t\\t\\t\\tself.__resetChildren();\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(this.__config.enableCloneMode)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__divMovable,\\\"nsAnimateGhost\\\");\\r\\n\\t\\t\\t\\tvar transition = new this.util.transition(this.__divMovable,transitionEndCallback);\\r\\n\\t\\t    \\tvar objSourceNSObject = orignalNode[\\\"nsObject\\\"];\\r\\n\\t\\t    \\tthis.__divMovable.style.left = (objSourceNSObject.position.left) + \\\"px\\\";\\r\\n\\t\\t    \\tthis.__divMovable.style.top = (objSourceNSObject.position.top ) + \\\"px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttransitionEndCallback();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__resetChildren = function()\\r\\n\\t{\\r\\n\\t\\tvar arrChildNode = this.__config.container.getElementsByTagName(this.__config.childNodeType);\\r\\n\\t\\tvar childNode = null;\\r\\n\\t\\tfor (var count = 0; count < arrChildNode.length; count++) \\r\\n\\t\\t{\\r\\n\\t\\t\\tchildNode = arrChildNode[count];\\r\\n\\t\\t\\tthis.util.removeStyleClass(childNode,this.__config.nodeDragHoverClass);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__clearHoldTime = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__holdTimeoutInterval > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tclearTimeout(this.__holdTimeoutInterval);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__holdTimeoutInterval = -1;\\r\\n\\t\\tthis.__removeDocumentHoldListener();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__insertNode = function(node,index,currentElement,nodeData)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.insertNodeCallback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.insertNodeCallback(this.__config.container,node,index,currentElement,nodeData);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar container = this.__config.container;\\r\\n\\t\\t\\tif(this.__parentContainerType.toLowerCase() === \\\"table\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcurrentElement.parentNode.insertBefore(node,currentElement);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcontainer.insertBefore(node,currentElement);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__initializeChildren();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__moveNode = function(node,index,currentElement,nodeData)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.moveNodeCallback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.moveNodeCallback(this.__config.container,node,index,currentElement,nodeData);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar container = this.__config.container;\\r\\n\\t\\t\\tif(this.__parentContainerType.toLowerCase() === \\\"table\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcurrentElement.parentNode.insertBefore(node,currentElement);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//this.util.insertAfterElement(currentElement,node);\\r\\n\\t\\t\\t\\tcontainer.insertBefore(node,currentElement);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__initializeChildren();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__removeNode = function(node,nodeData)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.removeNodeCallback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.removeNodeCallback(this.__config.container,node,nodeData);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar container = this.__config.container;\\r\\n\\t\\t\\tif(this.__parentContainerType.toLowerCase() === \\\"table\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tnode.parentNode.removeChild(node);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//if not clone mode then element is already removed\\r\\n\\t\\t\\t\\tif(this.__config.enableCloneMode)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcontainer.removeChild(node);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__initializeChildren();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__getTargetElementDetails = function(event,orignalNode)\\r\\n\\t{\\r\\n\\t\\tvar targetX = event.pageX - document.documentElement.scrollLeft;\\r\\n\\t    var targetY = event.pageY - (window.pageYOffset || document.documentElement.scrollTop);\\r\\n\\t    var targetElement = document.elementFromPoint(targetX, targetY);\\r\\n\\t    var parent = null;\\r\\n\\t    var childNodeType = null;\\r\\n\\t    var arrElement = [];\\r\\n\\t    var prevElement = null;\\r\\n\\t    while(this.util.isElement(targetElement) && targetElement.tagName !== \\\"HTML\\\" && targetElement.tagName !== \\\"BODY\\\")\\r\\n\\t    {\\r\\n\\t    \\tif(targetElement === prevElement)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\t//console.log(\\\"Stop\\\");\\r\\n\\t    \\t}\\r\\n\\t    \\tprevElement = targetElement;\\r\\n\\t    \\t//console.log(targetElement.tagName + \\\",\\\" + targetElement.textContent);\\r\\n\\t    \\tif(targetElement.tagName === this.__config.childNodeType)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tchildNodeType = targetElement;\\r\\n\\t    \\t}\\r\\n\\t    \\telse if(this.__parentContainerType.toLowerCase() === \\\"table\\\")\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tchildNodeType = this.util.findParent(targetElement,this.__config.childNodeType);\\r\\n\\t    \\t\\tif(!childNodeType)\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tchildNodeType = this.util.findChild(targetElement,this.__config.childNodeType);\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t}\\r\\n\\t    \\tchildNodeType = this.util.getWebComponentElement(childNodeType);\\r\\n\\t    \\tif(childNodeType && childNodeType !== orignalNode && childNodeType[\\\"nsObject\\\"] && childNodeType[\\\"nsObject\\\"][\\\"dropEnabled\\\"])\\r\\n\\t    \\t{\\r\\n\\t    \\t\\ttargetElement = childNodeType;\\r\\n\\t    \\t\\tbreak;\\r\\n\\t    \\t}\\r\\n\\t    \\tarrElement.push({element:targetElement,display:targetElement.style.display});\\r\\n\\t    \\ttargetElement.style.display = \\\"none\\\";//pointerEvents = \\\"none\\\";\\r\\n\\t    \\t\\r\\n\\t    \\ttargetElement = document.elementFromPoint(targetX, targetY);\\r\\n\\t    }\\r\\n\\t    for(var count = 0;count < arrElement.length;count++)\\r\\n\\t    {\\r\\n\\t    \\tarrElement[count].element.style.display = arrElement[count].display;//pointerEvents = \\\"\\\";\\r\\n\\t    }\\r\\n\\t    if(!this.util.isElement(targetElement) || targetElement.tagName === \\\"HTML\\\")\\r\\n\\t    {\\r\\n\\t    \\ttargetElement = null;\\r\\n\\t    }\\r\\n\\t    if(targetElement)\\r\\n\\t    {\\r\\n\\t        if(!this.util.hasStyleClass(targetElement,this.__config.nodeDraggingClass))\\r\\n\\t    \\t{\\r\\n\\t        \\t//if not child then check parent\\r\\n\\t        \\tvar tmpTarget = targetElement.querySelector(\\\".\\\" + this.__config.nodeDraggingClass);\\r\\n\\t        \\tif(!tmpTarget)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\ttmpTarget = this.util.findParentBySelector(targetElement,\\\".\\\" + this.__config.nodeDraggingClass);\\r\\n\\t        \\t}\\r\\n\\t        \\tif(tmpTarget)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\ttargetElement = tmpTarget;\\r\\n\\t        \\t}\\r\\n\\t    \\t}\\r\\n\\t        if(targetElement[\\\"nsObject\\\"] && targetElement[\\\"nsObject\\\"][\\\"parent\\\"])\\r\\n\\t    \\t{\\r\\n\\t        \\tparent = targetElement[\\\"nsObject\\\"][\\\"parent\\\"];\\r\\n\\t    \\t}\\r\\n\\t    }\\r\\n\\t    return {element:targetElement,parent:parent,x:targetX,y:targetY};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__getPlaceholderDetails = function(event)\\r\\n\\t{\\r\\n\\t\\tvar targetX = event.pageX - document.documentElement.scrollLeft;\\r\\n\\t    var targetY = event.pageY - (window.pageYOffset || document.documentElement.scrollTop);\\r\\n\\t\\treturn {element:this.__compPlaceholder,parent:this.__compPlaceholder.parentNode,x:targetX,y:targetY};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__cloneNode = function(node)\\r\\n\\t{\\r\\n\\t\\tvar id = this.__getID();\\r\\n\\t\\tvar divMovable = this.util.createDiv(id + \\\"clonedItem\\\", \\\"nsDraggableCloneItem\\\");\\r\\n\\t\\tvar clonedNode = null;\\r\\n\\t\\tvar rectContainer = this.__config.container.getBoundingClientRect();\\r\\n\\t\\tif(this.__config.createCloneCallback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar containerConfiguration = {width:rectContainer.width,height:rectContainer.height};\\r\\n\\t\\t\\tclonedNode = this.__config.createCloneCallback(node,containerConfiguration);\\r\\n\\t\\t\\tclonedNode.setAttribute(\\\"id\\\",\\\"comp\\\" + id + \\\"ClonedNode\\\");\\r\\n\\t\\t\\tdivMovable.appendChild(clonedNode);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar container = this.__config.container.cloneNode(false);\\r\\n\\t\\t\\tcontainer.setAttribute(\\\"id\\\",\\\"comp\\\" + id + \\\"ClonedContainer\\\");\\r\\n\\t\\t\\tif(this.__config.enableCloneMode)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tclonedNode = node.cloneNode(true);\\r\\n\\t\\t\\t\\tclonedNode.setAttribute(\\\"id\\\",\\\"comp\\\" + id + \\\"ClonedNode\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tclonedNode = node;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcontainer.appendChild(clonedNode);\\r\\n\\t\\t\\tcontainer.style.width = rectContainer.width + \\\"px\\\";\\r\\n\\t\\t\\ttry\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivMovable.appendChild(container);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcatch(error)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.getWebComponentElement(divMovable).appendChild(container);\\r\\n\\t\\t\\t\\t//divMovable.appendChild(container);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tdocument.body.appendChild(divMovable);\\r\\n\\t\\tif (divMovable.setCapture) \\r\\n\\t\\t{\\r\\n\\t\\t\\tdivMovable.setCapture();\\r\\n\\t\\t}\\r\\n\\t\\tif(node.nsObject)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objCloned = {};//this.util.cloneObject(node.nsObject);\\r\\n\\t\\t\\tobjCloned.orignalNode = node;\\r\\n\\t\\t\\tdivMovable.nsObject = objCloned;\\r\\n\\t\\t\\tclonedNode.nsObject = objCloned;\\r\\n\\t\\t}\\r\\n\\t\\treturn divMovable;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__createPlaceholder = function(node) \\r\\n\\t{\\r\\n\\t\\tvar placeHolder = null;\\r\\n\\t\\tif(this.__config.createPlaceholderCallback)\\r\\n\\t\\t{\\r\\n\\t\\t\\tplaceHolder = this.__config.createPlaceholderCallback(node);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tplaceHolder = this.util.createElement(this.__config.childNodeType);\\r\\n\\t\\t\\tplaceHolder.className  = node.className;\\r\\n\\t\\t\\tthis.util.addStyleClass(placeHolder,\\\"nsDraggablePlaceholder\\\");\\r\\n\\t\\t\\tvar rect = node.getBoundingClientRect();\\r\\n\\t\\t\\tplaceHolder.style.width = rect.width + \\\"px\\\";\\r\\n\\t\\t\\tplaceHolder.style.height = rect.height + \\\"px\\\";\\r\\n\\t\\t}\\r\\n\\t\\treturn placeHolder;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__isNodeDraggable = function(node) \\r\\n\\t{\\r\\n\\t\\tvar retValue = true;\\r\\n\\t\\tif(node)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.nodeDraggableCallback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = this.__config.nodeDraggableCallback(node);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__isNodeDroppable = function(node) \\r\\n\\t{\\r\\n\\t\\tvar retValue = true;\\r\\n\\t\\tif(node)\\r\\n\\t\\t{\\r\\n\\t\\t\\tnode = this.util.findParent(node,this.__config.childNodeType);\\r\\n\\t\\t\\tif(this.__config.nodeDroppableCallback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = this.__config.nodeDroppableCallback(node);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__insertBefore = function(targetElement) \\r\\n\\t{\\r\\n\\t\\tif(this.__compPlaceholder && targetElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\t// Ensure the placeholder is visible in the target (unless it's a table row)\\r\\n\\t\\t    if (this.util.getStyleValue(this.__compPlaceholder,\\\"display\\\") !== 'table-row') \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__compPlaceholder.style.display = \\\"block\\\";\\r\\n\\t\\t    }\\r\\n\\t\\t    if(!this.__config.enableCloneMode)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\ttargetElement.parentNode.insertBefore(this.__compPlaceholder,targetElement);\\r\\n\\t\\t\\t    //dragItemInfo.moveTo(targetScope.sortableScope, targetScope.index());\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__insertAfter = function(targetElement) \\r\\n\\t{\\r\\n\\t\\tif(this.__compPlaceholder && targetElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\t// Ensure the placeholder is visible in the target (unless it's a table row)\\r\\n\\t\\t    if (this.util.getStyleValue(this.__compPlaceholder,\\\"display\\\") !== 'table-row') \\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__compPlaceholder.style.display = \\\"block\\\";\\r\\n\\t\\t    }\\r\\n\\t\\t    if(!this.__config.enableCloneMode)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.util.insertAfterElement(targetElement,this.__compPlaceholder);\\r\\n\\t\\t    \\t//dragItemInfo.moveTo(targetScope.sortableScope, targetScope.index() + 1);\\r\\n\\t\\t    }\\r\\n\\t\\t    \\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__getPlaceHolderIndex = function(targetElement) \\r\\n\\t{\\r\\n\\t\\tif(targetElement)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.hasStyleClass(targetElement,\\\"nsDraggablePlaceholder\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn 0;\\r\\n\\t\\t    }\\r\\n\\t\\t\\tvar arrChildNode = targetElement.getElementsByTagName(this.__config.childNodeType);\\r\\n\\t\\t\\tvar childNode = null;\\r\\n\\t\\t\\tfor (var count = 0; count < arrChildNode.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tchildNode = arrChildNode[count];\\r\\n\\t\\t\\t\\tif(this.util.hasStyleClass(childNode,\\\"nsDraggablePlaceholder\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn count;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t    return -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__isSameContainer = function(container) \\r\\n\\t{\\r\\n\\t\\tif(container && container.nsObject) \\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__config.container.nsObject[\\\"id\\\"] === container.nsObject[\\\"id\\\"];\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__dragEndCleanUp = function() \\r\\n\\t{\\r\\n\\t\\tthis.util.makeBodySelectable();\\r\\n\\t\\tthis.__isDragging = false;\\r\\n\\t\\tif(this.__divMovable)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__divMovable[\\\"nsObject\\\"] && this.__divMovable[\\\"nsObject\\\"][\\\"orignalNode\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar orignalNode = this.__divMovable[\\\"nsObject\\\"][\\\"orignalNode\\\"];\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(orignalNode,this.__config.nodeDragHoverClass);\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(orignalNode,this.__config.nodeDraggingClass);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__divMovable.parentNode.removeChild(this.__divMovable);\\r\\n\\t\\t\\tthis.__divMovable = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__lastTarget)\\r\\n\\t    {\\r\\n\\t    \\tthis.util.removeStyleClass(this.__lastTarget,this.__config.nodeDragHoverClass);\\r\\n\\t    \\tthis.__lastTarget = null;\\r\\n\\t    }\\r\\n\\t\\tif(this.__compPlaceholder)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__compPlaceholder.parentNode.removeChild(this.__compPlaceholder);\\r\\n\\t\\t\\tthis.__compPlaceholder = null;\\r\\n\\t\\t}\\r\\n\\t\\tthis.__itemPosition = null;\\r\\n\\t\\tthis.__objSelectedItem = {scrollableContainer:null,containment:null};\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__getOffset = function(element,scrollableContainer) \\r\\n\\t{\\r\\n\\t\\tvar boundingClientRect = element.getBoundingClientRect();\\r\\n\\t    if (!scrollableContainer) \\r\\n\\t    {\\r\\n\\t    \\tscrollableContainer = document.documentElement;\\r\\n\\t    }\\r\\n\\t    var retValue = { width: boundingClientRect.width || element.offsetWidth,\\r\\n\\t    \\theight: boundingClientRect.height || element.offsetHeight,\\r\\n\\t    \\ttop: boundingClientRect.top + (window.pageYOffset || scrollableContainer.scrollTop - scrollableContainer.offsetTop),\\r\\n\\t    \\tleft: boundingClientRect.left + (window.pageXOffset || scrollableContainer.scrollLeft - scrollableContainer.offsetLeft)\\r\\n\\t    };\\r\\n\\t    return retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__positionStarted = function(event,target,scrollableContainer) \\r\\n\\t{\\r\\n\\t\\tvar position = {};\\r\\n\\t\\tposition.offsetX = event.pageX - this.__getOffset(target, scrollableContainer).left;\\r\\n\\t\\tposition.offsetY = event.pageY - this.__getOffset(target, scrollableContainer).top;\\r\\n\\t\\tposition.startX = position.lastX = event.pageX;\\r\\n\\t\\tposition.startY = position.lastY = event.pageY;\\r\\n\\t\\tposition.nowX = position.nowY = position.distX = position.distY = position.dirAx = 0;\\r\\n\\t\\tposition.dirX = position.dirY = position.lastDirX = position.lastDirY = position.distAxX = position.distAxY = 0;\\r\\n\\t    return position;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__calculatePosition = function(position,event) \\r\\n\\t{\\r\\n\\t\\t position.lastX = position.nowX;\\r\\n\\t     position.lastY = position.nowY;\\r\\n\\t\\r\\n\\t     // mouse position this events\\r\\n\\t     position.nowX = event.pageX;\\r\\n\\t     position.nowY = event.pageY;\\r\\n\\t\\r\\n\\t     // distance mouse moved between events\\r\\n\\t     position.distX = position.nowX - position.lastX;\\r\\n\\t     position.distY = position.nowY - position.lastY;\\r\\n\\t\\r\\n\\t     // direction mouse was moving\\r\\n\\t     position.lastDirX = position.dirX;\\r\\n\\t     position.lastDirY = position.dirY;\\r\\n\\t\\r\\n\\t     // direction mouse is now moving (on both axis)\\r\\n\\t     position.dirX = position.distX === 0 ? 0 : position.distX > 0 ? 1 : -1;\\r\\n\\t     position.dirY = position.distY === 0 ? 0 : position.distY > 0 ? 1 : -1;\\r\\n\\t\\r\\n\\t     // axis mouse is now moving on\\r\\n\\t     var newAx = Math.abs(position.distX) > Math.abs(position.distY) ? 1 : 0;\\r\\n\\t\\r\\n\\t     // calc distance moved on this axis (and direction)\\r\\n\\t     if (position.dirAx !== newAx) \\r\\n\\t     {\\r\\n\\t       position.distAxX = 0;\\r\\n\\t       position.distAxY = 0;\\r\\n\\t     } \\r\\n\\t     else \\r\\n\\t     {\\r\\n\\t       position.distAxX += Math.abs(position.distX);\\r\\n\\t       if (position.dirX !== 0 && position.dirX !== position.lastDirX) \\r\\n\\t       {\\r\\n\\t         position.distAxX = 0;\\r\\n\\t       }\\r\\n\\t\\r\\n\\t       position.distAxY += Math.abs(position.distY);\\r\\n\\t       if (position.dirY !== 0 && position.dirY !== position.lastDirY) \\r\\n\\t       {\\r\\n\\t         position.distAxY = 0;\\r\\n\\t       }\\r\\n\\t     }\\r\\n\\t     position.dirAx = newAx;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__movePosition = function(event,element,position,container,cssPosition,scrollableContainer) \\r\\n\\t{\\r\\n\\t\\tvar bounds;\\r\\n\\t    var useRelative = (cssPosition === 'relative');\\r\\n\\t    element.x = event.pageX - position.offsetX;\\r\\n\\t    element.y = event.pageY - position.offsetY;\\r\\n\\t\\r\\n\\t    if (container) \\r\\n\\t    {\\r\\n\\t      bounds = this.__getOffset(container, scrollableContainer);\\r\\n\\t      if (useRelative) \\r\\n\\t      {\\r\\n\\t        // reduce positioning by bounds\\r\\n\\t        element.x -= bounds.left;\\r\\n\\t        element.y -= bounds.top;\\r\\n\\t\\r\\n\\t        // reset bounds\\r\\n\\t        bounds.left = 0;\\r\\n\\t        bounds.top = 0;\\r\\n\\t      }\\r\\n\\t\\r\\n\\t      if (element.x < bounds.left) \\r\\n\\t      {\\r\\n\\t    \\t  element.x = bounds.left;\\r\\n\\t      } \\r\\n\\t      else if (element.x >= bounds.width + bounds.left - this.__getOffset(element).width) \\r\\n\\t      {\\r\\n\\t    \\t  element.x = bounds.width + bounds.left - this.__getOffset(element).width;\\r\\n\\t      }\\r\\n\\t      if (element.y < bounds.top) \\r\\n\\t      {\\r\\n\\t    \\t  element.y = bounds.top;\\r\\n\\t      } \\r\\n\\t      else if (element.y >= bounds.height + bounds.top - this.__getOffset(element).height) \\r\\n\\t      {\\r\\n\\t    \\t  element.y = bounds.height + bounds.top - this.__getOffset(element).height;\\r\\n\\t      }\\r\\n\\t    }\\r\\n\\t    element.style.left = element.x + 'px';\\r\\n\\t    element.style.top = element.y + 'px';\\r\\n\\t    \\r\\n\\t    this.__calculatePosition(position, event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSDragDrop.prototype.__getID = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__id)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.container.hasAttribute(\\\"id\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = this.__config.container.getAttribute(\\\"id\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__config.container.hasAttribute(\\\"name\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = this.__config.container.getAttribute(\\\"name\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = \\\"comp\\\" + this.util.getUniqueId();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__id;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSDragDrop;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSDragDrop\\\",NSDragDrop);\\\"use strict\\\";\\r\\nvar NSFilter = (function()\\r\\n{\\r\\n\\tfunction NSFilter(data,filter,setting,recordLimit,isHierarchical,childField,filterFunction,hierarchyFilterChildren,arrIgnoreKeysInCloneDataSource) \\r\\n\\t{\\r\\n\\t\\tthis.EXACT = \\\"exact\\\";\\r\\n\\t\\tthis.STARTS_WITH = \\\"startsWith\\\";\\r\\n\\t\\tthis.ENDS_WITH = \\\"endsWith\\\";\\r\\n\\t\\tthis.CONTAINS = \\\"contains\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.IS_FOUND_FIELD = \\\"__nsFilter__found\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__data = data;\\r\\n\\t\\tthis.__filter = filter;\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__recordLimit = (parseInt(recordLimit) > 0) ? recordLimit : -1;\\r\\n\\t\\tthis.__isHierarchical = this.util.isUndefined(isHierarchical) ? false : Boolean.parse(isHierarchical);\\r\\n\\t\\tthis.__childField = childField ? childField : \\\"children\\\";\\r\\n\\t\\tthis.__filterFunction = filterFunction;\\r\\n\\t\\tthis.__hierarchyFilterChildren = hierarchyFilterChildren;\\r\\n\\t\\tthis.__arrIgnoreKeysInCloneDataSource = arrIgnoreKeysInCloneDataSource;\\r\\n\\t\\tthis.__ignoreSameLevelNode = true;\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSFilter.prototype.execute = function(data,filter,setting,recordLimit,isHierarchical,childField,filterFunction,hierarchyFilterChildren,arrIgnoreKeysInCloneDataSource) \\r\\n\\t{ \\r\\n\\t\\tdata = data ? data : this.__data;\\r\\n\\t\\tfilter = filter ? filter : this.__filter;\\r\\n\\t\\tsetting = setting ? setting : this.__setting;\\r\\n\\t\\trecordLimit = (parseInt(recordLimit) > 0) ? recordLimit : this.__recordLimit;\\r\\n\\t\\tisHierarchical = this.util.isUndefined(isHierarchical) ? Boolean.parse(this.__isHierarchical) : Boolean.parse(isHierarchical);\\r\\n\\t\\tchildField = childField ? childField : this.__childField;\\r\\n\\t\\tfilterFunction = filterFunction ? filterFunction : this.__filterFunction;\\r\\n\\t\\thierarchyFilterChildren = hierarchyFilterChildren ? hierarchyFilterChildren : this.__hierarchyFilterChildren;\\r\\n\\t\\tarrIgnoreKeysInCloneDataSource = this.util.isUndefinedOrNull(arrIgnoreKeysInCloneDataSource) ? this.__arrIgnoreKeysInCloneDataSource : arrIgnoreKeysInCloneDataSource;\\r\\n\\t\\tif(data && filter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar dataSource = data.slice(0);\\r\\n\\t\\t\\tvar arrFilter = [];\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar callFilterFunction = function(source,level,parentItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\t\\tfor (var count = 0; count < source.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\t\\tvar found = false;\\r\\n\\t\\t\\t\\t\\tif(isHierarchical && item[childField] && item[childField].length > 0 )\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrChild = callFilterFunction(item[childField],level + 1,item);\\r\\n\\t\\t\\t\\t\\t\\tif(arrChild && arrChild.length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tfound = true;\\r\\n\\t\\t\\t\\t\\t\\t\\tif(self.__ignoreSameLevelNode)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t            item[childField] = arrChild;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(!found && self.__filterItem(item,filter,setting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(isHierarchical && hierarchyFilterChildren)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar arrChildren = item[childField];\\r\\n\\t\\t\\t\\t\\t\\t\\tif(arrChildren && arrChildren.length > 0)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar childItem = null;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar childLength = arrChildren.length;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tfor(var childCount = childLength - 1;childCount > -1;childCount--)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tchildItem = arrChildren[childCount];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif(childItem)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(!hierarchyFilterChildren(childItem,childCount,childItem[self.IS_FOUND_FIELD],filter,setting,item))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tarrChildren.splice(childCount, 1);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tfound = true;\\r\\n\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t\\tif(!isHierarchical && recordLimit > 0 && arrReturn.length >= recordLimit)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//return false;\\r\\n\\t\\t\\t\\treturn arrReturn;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar callNonHierarchicalFilterFunction = function(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\t\\tfor (var count = 0; count < source.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\t\\tif(self.__filterItemNonHierarchical(item,filter,setting,filterFunction))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn arrReturn;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tdataSource = this.util.cloneObject(dataSource,isHierarchical,[],arrIgnoreKeysInCloneDataSource);\\r\\n\\t\\t\\tif(isHierarchical)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrFilter = callFilterFunction(dataSource,1,null);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrFilter = callNonHierarchicalFilterFunction(dataSource);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrFilter;\\r\\n\\t\\t}\\r\\n\\t\\treturn data;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterItemNonHierarchical = function(item,filter,setting,filterFunction) \\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tif(filterFunction)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = filterFunction(item,filter,setting);\\r\\n\\t\\t\\tthis.__setItem(item,retValue);\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t}\\r\\n\\t\\telse if(filter instanceof Function) \\r\\n\\t    {\\r\\n\\t\\t\\tretValue = filter(item,setting);\\r\\n\\t        this.__setItem(item,retValue);\\r\\n\\t        return retValue;\\r\\n\\t    }\\r\\n\\t    else if(filter instanceof Array) \\r\\n\\t    {\\r\\n\\t        for (var count = 0; count < filter.length; ++count) \\r\\n\\t        {\\r\\n\\t            if (this.__filterItemNonHierarchical(item,filter[count],setting,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\tthis.__setItem(item,true);\\r\\n\\t            \\treturn true;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    }\\r\\n\\t    else if(setting.type === \\\"date\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterDate(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if(typeof(item) === \\\"string\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterString(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if (item === item + 0 && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterNumeric(item,filter);\\r\\n\\t    }\\r\\n\\t    else if(typeof (filter) === \\\"object\\\") \\r\\n\\t    {\\r\\n\\t        for(var key in filter) \\r\\n\\t        {\\r\\n\\t        \\tvar tempSetting = {};\\r\\n\\t        \\tif(setting && setting[key])\\r\\n\\t        \\t{\\r\\n\\t        \\t\\ttempSetting = setting[key];\\r\\n\\t        \\t}\\r\\n\\t            if(!this.__filterItemNonHierarchical(item[key],filter[key],tempSetting,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\treturn false;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        this.__setItem(item,true);\\r\\n\\t        return true;\\r\\n\\t    }\\r\\n\\t\\tretValue = (filter == item);\\r\\n\\t    this.__setItem(item,retValue);\\r\\n\\t    return retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterItem = function(item,filter,setting,isHierarchical,childField,parentItem,filterFunction) \\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tif(filterFunction)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = filterFunction(item,filter,setting,isHierarchical,childField,parentItem);\\r\\n\\t\\t\\tthis.__setItem(item,retValue);\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t}\\r\\n\\t\\telse if(filter instanceof Function) \\r\\n\\t    {\\r\\n\\t\\t\\tretValue = filter(item,setting);\\r\\n\\t        this.__setItem(item,retValue);\\r\\n\\t        return retValue;\\r\\n\\t    }\\r\\n\\t    else if(filter instanceof Array) \\r\\n\\t    {\\r\\n\\t        for (var count = 0; count < filter.length; ++count) \\r\\n\\t        {\\r\\n\\t            if (this.__filterItem(item,filter[count],setting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\tthis.__setItem(item,true);\\r\\n\\t            \\treturn true;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    }\\r\\n\\t    else if(setting.type === \\\"date\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterDate(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if(typeof(item) === \\\"string\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterString(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if (item === item + 0 && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterNumeric(item,filter);\\r\\n\\t    }\\r\\n\\t    else if(typeof (filter) === \\\"object\\\") \\r\\n\\t    {\\r\\n\\t        for(var key in filter) \\r\\n\\t        {\\r\\n\\t        \\tif(isHierarchical && key === childField)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tcontinue;\\r\\n\\t        \\t}\\r\\n\\t        \\tvar tempSetting = {};\\r\\n\\t        \\tif(setting && setting[key])\\r\\n\\t        \\t{\\r\\n\\t        \\t\\ttempSetting = setting[key];\\r\\n\\t        \\t}\\r\\n\\t            if(!this.__filterItem(item[key],filter[key],tempSetting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\treturn false;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        this.__setItem(item,true);\\r\\n\\t        return true;\\r\\n\\t    }\\r\\n\\t\\tretValue = (filter == item);\\r\\n\\t    this.__setItem(item,retValue);\\r\\n\\t    return retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__setItem = function(item,isFound)\\r\\n\\t{\\r\\n\\t\\tif(item && typeof (item) === \\\"object\\\" && isFound)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem[this.IS_FOUND_FIELD] = true;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterNumeric= function(value,searchParam)\\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tvalue = parseFloat(value);\\r\\n\\t\\tif(!isNaN(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(/<=/.test(searchParam)) // first checks if there is an operator (<,>,<=,>=)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value <= parseFloat(searchParam.replace(/<=/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/>=/.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value >= parseFloat(searchParam.replace(/>=/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/</.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value < parseFloat(searchParam.replace(/</,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/>/.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value > parseFloat(searchParam.replace(/>/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value === parseFloat(searchParam));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterDate= function(value,searchParam,setting)\\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar matchValue = function(compareValue,opt)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compValue = false;\\r\\n\\t\\t\\tif(self.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar newVal = self.__getDate(value,setting.cellFormat);\\r\\n\\t\\t\\t\\tif(newVal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tnewVal.setHours(0, 0, 0, 0);\\r\\n\\t\\t\\t\\t\\tcompareValue.setHours(0, 0, 0, 0);\\r\\n\\t\\t\\t\\t\\tswitch(opt)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"equals\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() === newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"greaterThan\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() < newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"lessThan\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() > newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"notEqual\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() != newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.util.warning(\\\"NSFilter\\\",value + \\\" cannot be converted to date Object for given cell format\\\");\\r\\n\\t\\t\\t\\t\\tcompValue = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn compValue;\\r\\n\\t\\t};\\r\\n\\t\\tvar processDate = function(date,type)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compValue = false;\\r\\n\\t\\t\\tif(date && matchType1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!date || !Object.prototype.toString.call(date) === '[object Date]')\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(setting.comparator)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = setting.comparator(value,date,setting);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = matchValue(date,type);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn compValue;\\r\\n\\t\\t};\\r\\n\\t\\tif(setting.matchType1 || setting.matchType2)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar matchType1 = setting.matchType1;\\r\\n\\t\\t\\tvar firstDate = setting.firstDate;\\r\\n\\t\\t\\tvar operation = setting.operation;\\r\\n\\t\\t\\tvar matchType2 = setting.matchType2;\\r\\n\\t\\t\\tvar secondDate = setting.secondDate;\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(firstDate && secondDate && matchType1 && matchType2 && operation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar firstVal = processDate(firstDate,matchType1);\\r\\n\\t\\t\\t\\tvar secondVal = processDate(secondDate,matchType2);\\r\\n\\t\\t\\t\\tswitch(operation)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcase \\\"and\\\":\\r\\n\\t\\t\\t\\t\\t\\tretValue = (firstVal && secondVal);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase \\\"or\\\":\\r\\n\\t\\t\\t\\t\\t\\tretValue = (firstVal || secondVal);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(firstDate && matchType1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = processDate(firstDate,matchType1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(secondDate && matchType2)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = processDate(secondDate,matchType2);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!searchParam || !Object.prototype.toString.call(searchParam) === '[object Date]')\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(setting.comparator)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = setting.comparator(value,searchParam,setting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = matchValue(searchParam,\\\"equals\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterString= function(value,searchParam,setting)\\r\\n\\t{\\r\\n\\t\\tvar regExp = null;\\r\\n\\t\\tvar regExpModifier = \\\"g\\\";\\r\\n\\t\\tvar startWithChar = \\\"(^)\\\";\\r\\n\\t\\tvar endsWithChar = \\\"($)\\\";\\r\\n\\t\\tvar searchString = \\\"\\\";\\r\\n\\t\\tvar isCaseSensitive = false;\\r\\n\\t\\tvar isMultiline = false;\\r\\n\\t\\tvar matchType = this.CONTAINS;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisCaseSensitive = Boolean.parse(setting[\\\"caseSensitive\\\"]);\\r\\n\\t\\t\\tisMultiline = Boolean.parse(setting[\\\"multiline\\\"]);\\r\\n\\t\\t\\tmatchType = setting[\\\"matchType\\\"] ? setting[\\\"matchType\\\"] : matchType;\\r\\n\\t\\t}\\r\\n\\t\\tif(!isCaseSensitive)\\r\\n\\t\\t{\\r\\n\\t\\t\\tregExpModifier += \\\"i\\\";\\r\\n\\t\\t}\\r\\n\\t\\tif(isMultiline)\\r\\n\\t\\t{\\r\\n\\t\\t\\tregExpModifier += \\\"m\\\";\\r\\n\\t\\t}\\r\\n\\t\\tsearchParam = this.__removeSpecialCharacter(searchParam);\\r\\n\\t\\tif(matchType === this.EXACT)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = startWithChar + searchParam + endsWithChar;\\r\\n\\t\\t}\\r\\n\\t\\telse if(matchType === this.STARTS_WITH)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = startWithChar + searchParam;\\r\\n\\t\\t}\\r\\n\\t\\telse if(matchType === this.ENDS_WITH)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = searchParam + endsWithChar;\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = searchParam;\\r\\n\\t\\t}\\r\\n\\t\\tregExp = new RegExp(searchString,regExpModifier);\\r\\n\\t\\treturn regExp.test(value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__removeSpecialCharacter = function(text)\\r\\n\\t{\\r\\n\\t\\tfunction replaceEscape(char)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(text)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar exp = new RegExp(\\\"\\\\\\\\\\\" + char,\\\"g\\\");\\r\\n\\t\\t\\t\\ttext = text.replace(exp,\\\"\\\\\\\\\\\" + char);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar specialChar = ['\\\\\\\\','[','^','$','.','|','?','*','+','(',')'];\\r\\n\\t\\tfor(var count = 0;count < specialChar.length;count++) \\r\\n\\t\\t{\\r\\n\\t\\t\\treplaceEscape(specialChar[count]);\\r\\n\\t\\t}\\r\\n\\t\\treturn text;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//ref from : https://stackoverflow.com/questions/7445328/check-if-a-string-is-a-date-value\\r\\n\\tNSFilter.prototype.__getDate = function(value,arrFormat) \\r\\n\\t{\\r\\n\\t\\tif(value)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar dateFormat;\\r\\n\\t\\t    if (Object.prototype.toString.call(value) === '[object Date]') \\r\\n\\t\\t    {\\r\\n\\t\\t        return value;\\r\\n\\t\\t    }\\r\\n\\t\\t    if(arrFormat)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar dateUtil = new NSDateUtil();\\r\\n\\t\\t    \\tif(!this.util.isArray(arrFormat))\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tarrFormat = [arrFormat];\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tfor(var count = 0;count < arrFormat.length;count++)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tvar format = arrFormat[count];\\r\\n\\t\\t    \\t\\tvar date = dateUtil.parseString(value,format);\\r\\n\\t\\t    \\t\\tif(date)\\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\treturn date;\\r\\n\\t\\t    \\t\\t}\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    }\\r\\n\\t\\t    else\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tif (typeof value.replace === 'function') \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t        value.replace(/^\\\\s+|\\\\s+$/gm, '');\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    dateFormat = /(^\\\\d{1,4}[\\\\.|\\\\\\\\/|-]\\\\d{1,2}[\\\\.|\\\\\\\\/|-]\\\\d{1,4})(\\\\s*(?:0?[1-9]:[0-5]|1(?=[012])\\\\d:[0-5])\\\\d\\\\s*[ap]m)?$/;\\r\\n\\t\\t\\t    if(dateFormat.test(value))\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\treturn new Date(value);//Date.parse(value);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t    return null;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSFilter;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSFilter\\\",NSFilter); \\\"use strict\\\"; \\r\\nvar NSMenu = (function()\\r\\n{\\r\\n\\tfunction NSMenu(setting) \\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.DEFAULT_POSITION = this.util.POS_BOTTOMRIGHT;\\r\\n\\t\\t\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__id = null;\\r\\n\\t\\tthis.__popUp = null;\\r\\n\\t\\tthis.__nsPopUp = null;\\r\\n\\t\\tthis.__fieldItem = null;\\r\\n\\t\\tthis.__fieldItemChild = null;\\r\\n\\t\\tthis.__fieldChild = \\\"children\\\";\\r\\n\\t\\tthis.__isInternalCall = false;\\r\\n\\t\\tthis.__suppressDocumentHandler = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentClickRef = null;\\r\\n\\t\\tthis.__documentKeyUpRef = null;\\r\\n\\t\\tthis.__lastSelectedTarget = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSMenu.prototype.create = function (dataSource) \\r\\n\\t{ \\r\\n\\t\\tif(dataSource && (this.__config.createRunTime || this.__isInternalCall))\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__popUp)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.remove();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__isInternalCall = false;\\r\\n\\t\\t\\tthis.__config.dataSource = dataSource;\\r\\n\\t\\t\\tthis.__popUp = this.__createElement(true,this.__config.dataSource);\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__nsPopUp,\\\"nsMainMenu\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.remove = function () \\r\\n\\t{ \\r\\n\\t\\tif(this.__config.createRunTime || this.__isInternalCall)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isInternalCall = false;\\r\\n\\t\\t\\tthis.__nsPopUp.remove();\\r\\n\\t\\t\\tthis.__popUp = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.show = function (event) \\r\\n\\t{ \\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tthis.__nsPopUp.hideOtherNSPopUp();\\r\\n\\t\\tif(this.__config.createRunTime)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isInternalCall = true;\\r\\n\\t\\t\\tvar dataSource = null;\\r\\n\\t\\t\\tif(this.__config.sourceProvider)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdataSource = this.__config.sourceProvider(this.__lastSelectedTarget);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(dataSource && dataSource.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.create(dataSource);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.preventDefault(event);\\r\\n\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__nsPopUp.show();\\r\\n\\t\\tthis.__nsPopUp.placePopUp(event);\\r\\n\\t\\tif(!this.__documentClickRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__documentClickRef = this.__documentClickHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document.documentElement,\\\"click\\\", this.__documentClickRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__documentKeyUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__documentKeyUpRef = this.__documentKeyUpHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document.documentElement,\\\"keyup\\\", this.__documentKeyUpRef);\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.preventDefault(event);\\r\\n\\t};\\r\\n\\tNSMenu.prototype.hide = function() \\r\\n\\t{\\r\\n\\t\\tthis.__lastSelectedTarget = null;\\r\\n\\t\\tthis.__hideAllSubMenus();\\r\\n\\t\\tif(this.__config.createRunTime)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isInternalCall = true;\\r\\n\\t\\t\\tthis.remove();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsPopUp.hide();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__documentClickRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document.documentElement,\\\"click\\\", this.__documentClickRef, false);\\r\\n\\t\\t\\tthis.__documentClickRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__documentKeyUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document.documentElement,\\\"keyup\\\", this.__documentKeyUpRef, false);\\r\\n\\t\\t\\tthis.__documentKeyUpRef = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__initialize = function ()\\r\\n\\t{\\r\\n\\t\\tif(this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//eventHandler:extra eventHandler which developer wants to execute on the event i.e. click,customEvent etc\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\tparent: this.__setting[\\\"parent\\\"] || null,\\r\\n\\t\\t\\t\\t\\tdataSource: this.__setting[\\\"dataSource\\\"] || null,\\r\\n\\t\\t\\t\\t\\tisContextMenu: (this.util.isUndefined(this.__setting[\\\"isContextMenu\\\"]) || this.__setting[\\\"isContextMenu\\\"] === null) ? true : Boolean.parse(this.__setting[\\\"isContextMenu\\\"]),\\r\\n\\t\\t\\t\\t\\teventType: this.__setting[\\\"eventType\\\"] || \\\"click\\\",\\r\\n\\t\\t\\t\\t\\tcreateRunTime: (this.util.isUndefined(this.__setting[\\\"createRunTime\\\"]) || this.__setting[\\\"createRunTime\\\"] === null) ? false : Boolean.parse(this.__setting[\\\"createRunTime\\\"]),\\r\\n\\t\\t\\t\\t\\tsourceProvider: this.__setting[\\\"sourceProvider\\\"] || null,\\r\\n\\t\\t\\t\\t\\ttargetType: this.__setting[\\\"targetType\\\"] || null,\\r\\n\\t\\t\\t\\t\\tdefaultHandler: (this.__setting[\\\"defaultHandler\\\"] ? this.util.getFunction(this.__setting[\\\"defaultHandler\\\"]) : null),\\r\\n\\t\\t\\t\\t\\teventHandler: (this.__setting[\\\"eventHandler\\\"] ? this.util.getFunction(this.__setting[\\\"eventHandler\\\"]) : null),\\r\\n\\t\\t\\t\\t\\tposition: this.__setting[\\\"position\\\"] || this.DEFAULT_POSITION,\\r\\n\\t\\t\\t\\t\\twidth: parseInt(this.__setting[\\\"width\\\"]) || -1\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\tif(this.__config.parent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar popUpSetting = {id:this.__getID() + \\\"menu\\\",type:\\\"ul\\\",width:this.__config.width,position:this.__config.position};\\r\\n\\t\\t\\t\\tthis.__nsPopUp = new this.util.nsPopUp(popUpSetting);\\r\\n\\t\\t\\t\\tthis.__fieldItem = this.__getID() + \\\"_item\\\";\\r\\n\\t\\t\\t\\tthis.__fieldItemChild = this.__getID() + \\\"_child\\\";\\r\\n\\t\\t\\t\\tif(!this.__config.createRunTime)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__isInternalCall = true;\\r\\n\\t\\t\\t\\t\\tthis.create(this.__config.dataSource);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__config.isContextMenu)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__config.parent,\\\"contextmenu\\\", this.__parentContextMenuHandler.bind(this));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__config.parent,this.__config.eventType, this.__parentClickHandler.bind(this),false);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__createElement = function(isRoot,dataSource) \\r\\n\\t{\\r\\n\\t\\tvar parentNode = null;\\r\\n\\t\\tif(dataSource && dataSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isRoot)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparentNode = this.__nsPopUp.create();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparentNode = document.createElement(\\\"ul\\\"); \\r\\n\\t\\t\\t\\tthis.util.addStyleClass(parentNode,\\\"nsMenu\\\");\\r\\n\\t\\t\\t\\tif(this.__config.width > -1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tparentNode.style.width = this.__config.width + \\\"px\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor (var count = 0; count < dataSource.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t\\tthis.__createItem(item,parentNode);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn parentNode;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__createItem = function(item,parent)\\r\\n\\t{\\r\\n\\t\\tvar menuItem = null;\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tmenuItem = document.createElement(\\\"li\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(menuItem,\\\"nsMenuItem\\\");\\r\\n\\t\\t\\tif(item[\\\"header\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(menuItem,\\\"nsHeader\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(item[\\\"disabled\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(menuItem,\\\"nsDisabled\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar button = document.createElement(\\\"BUTTON\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(button,\\\"nsMenuButton\\\");\\r\\n\\t\\t\\tif(item[\\\"iconHTML\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar spanIcon = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(spanIcon,\\\"nsMenuAlign\\\");\\r\\n\\t\\t\\t\\tspanIcon.innerHTML = item[\\\"iconHTML\\\"];\\r\\n\\t\\t\\t\\tbutton.appendChild(spanIcon);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar spanText = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(spanText,\\\"nsMenuText\\\");\\r\\n\\t\\t\\tspanText.appendChild(document.createTextNode(item[\\\"title\\\"]));\\r\\n\\t\\t\\tbutton.appendChild(spanText);\\r\\n\\t\\t\\tmenuItem.appendChild(button);\\r\\n\\t\\t\\tthis.util.addEvent(menuItem,\\\"click\\\",this.__itemClickHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(menuItem,\\\"mouseenter\\\",this.__itemMouseOverHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(menuItem,\\\"mouseleave\\\",this.__itemMouseOutHandler.bind(this));\\r\\n\\t\\t\\tif(item[this.__fieldChild]) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(menuItem,\\\"nsSubMenu\\\");\\r\\n\\t\\t    \\tvar subMenu = this.__createElement(false,item[this.__fieldChild]);\\r\\n\\t\\t    \\tif(subMenu)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.util.addStyleClass(subMenu,\\\"nsSubMenuContainer\\\");\\r\\n\\t\\t\\t    \\tmenuItem.appendChild(subMenu);\\r\\n\\t\\t\\t    \\titem[this.__fieldItemChild] = subMenu;\\r\\n\\t\\t\\t    \\tmenuItem.setAttribute(\\\"hasChild\\\",true);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tmenuItem.setAttribute(\\\"hasChild\\\",false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(parent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparent.appendChild(menuItem);\\r\\n\\t\\t\\t\\tif(item[\\\"separatorBelow\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar lineMenuItem = document.createElement(\\\"li\\\");\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(lineMenuItem,\\\"nsMenuSeparator\\\");\\r\\n\\t\\t\\t\\t\\tparent.appendChild(lineMenuItem);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem[this.__fieldItem] = menuItem;\\r\\n\\t\\t}\\r\\n\\t\\treturn menuItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__itemClickHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"LI\\\");\\r\\n\\t\\tvar item = this.__getItem(target,this.__config.dataSource);\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar handler = null;\\r\\n\\t\\t\\tif(item[\\\"handler\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\thandler = this.util.getFunction(item[\\\"handler\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!handler)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\thandler = this.__config.defaultHandler;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(handler)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\thandler(this.__lastSelectedTarget,item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.hide();\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__itemMouseOverHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"LI\\\");\\r\\n\\t\\tif(target.getAttribute(\\\"hasChild\\\") === \\\"true\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItem(target,this.__config.dataSource);\\r\\n\\t\\t\\tif(item && item[this.__fieldItemChild])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar childMenu = item[this.__fieldItemChild];\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(childMenu,\\\"nsShowMenu\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__itemMouseOutHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"LI\\\");\\r\\n\\t\\tif(target.getAttribute(\\\"hasChild\\\") === \\\"true\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItem(target,this.__config.dataSource);\\r\\n\\t\\t\\tif(item && item[this.__fieldItemChild])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar childMenu = item[this.__fieldItemChild];\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(childMenu,\\\"nsShowMenu\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__documentClickHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t/*if(!this.__config.isContextMenu && this.__isParentPresent(event.target,this.__config.parent))\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t}*/\\r\\n\\t\\t//commenting this so that menu closes on click in Grid\\r\\n\\t\\t/*if(this.__suppressDocumentHandler)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__suppressDocumentHandler = false;\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t}*/\\r\\n\\t\\tthis.hide();\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSMenu.prototype.__documentKeyUpHandler = function(event) \\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tif(event.keyCode === this.util.KEYCODE.ESC) \\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.hide();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__parentContextMenuHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.eventHandler)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.eventHandler(event);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__setLastSelectedTarget(this.util.getTarget(event));\\r\\n\\t\\tthis.show(event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__parentClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.eventHandler)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.eventHandler(event);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__setLastSelectedTarget(this.util.getTarget(event));\\r\\n\\t\\t//below condition to make documentClickhandler aware that do not hide the menu,hence put only for click handler\\r\\n\\t\\tif(this.__config.eventType === \\\"click\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__suppressDocumentHandler = true;\\r\\n\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t}\\r\\n\\t\\tthis.show(event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__getItem = function(objItem,dataSource)\\r\\n\\t{\\r\\n\\t\\tif(objItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor (var count = 0; count < dataSource.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t\\tif(item[this.__fieldItem] == objItem)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(item.hasOwnProperty(this.__fieldChild))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar childItem = this.__getItem(objItem,item[this.__fieldChild]);\\r\\n\\t\\t\\t\\t\\tif(childItem)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn childItem;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__hideAllSubMenus = function()\\r\\n\\t{\\r\\n\\t\\tvar arrSubMenus = this.__popUp.querySelectorAll(\\\"ul\\\");\\r\\n\\t\\tif(arrSubMenus && arrSubMenus.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar subMenu = null;\\r\\n\\t\\t\\tfor(var count = 0;count < arrSubMenus.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsubMenu = arrSubMenus[count];\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(subMenu,\\\"nsShowMenu\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__setLastSelectedTarget = function(target)\\r\\n\\t{\\r\\n\\t\\tif(target && this.__config.targetType)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttarget = this.util.findParent(target,this.__config.targetType);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__lastSelectedTarget = target;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__getID = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__id)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.parent.hasAttribute(\\\"id\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = this.__config.parent.getAttribute(\\\"id\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__config.parent.hasAttribute(\\\"name\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = this.__config.parent.getAttribute(\\\"name\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__id = \\\"comp\\\" + this.util.getUniqueId();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__id;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSMenu.prototype.__isParentPresent =  function(node,parentNode) \\r\\n\\t{\\r\\n\\t\\twhile (node && node!== document.body)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(node.id === parentNode.id) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tnode = node.parentNode;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSMenu;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSMenu\\\",NSMenu); \\\"use strict\\\";\\r\\nvar NSVirtualScroll = (function()\\r\\n{\\r\\n\\tfunction NSVirtualScroll(setting) \\r\\n\\t{\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.util = null;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\tthis.__internal = {};\\r\\n\\t\\tthis.__objProp = {};\\r\\n\\t\\tthis.__objSelectedProp = {};\\r\\n\\t\\tthis.__domVariables = null;\\r\\n\\t\\tthis.__doc = null;\\r\\n\\t\\tthis.__win = null;\\r\\n\\t\\tthis.__scrollHandlerRef = null;\\r\\n\\t\\tthis.__resizeHandlerRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.dataSource = function(paramItems)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(paramItems))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar reInit = false;\\r\\n\\t\\t\\tif(!this.__internal.itemDimension)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treInit = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.util.isNumber(paramItems))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.totalLength = parseInt(paramItems);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isArray(paramItems))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.items = paramItems;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.totalLength = null;\\r\\n\\t\\t\\t\\tthis.__config.items = [paramItems];\\r\\n\\t\\t\\t}\\r\\n            this.__internal.objItemComp = {};\\r\\n            this.__internal.arrItem = [];\\r\\n\\t\\t\\tif(reInit)\\r\\n\\t\\t\\t{\\r\\n                var item = this.__getItemAt(0);\\r\\n\\t\\t\\t\\tthis.__internal.isItemHtml = this.util.isString(item);\\r\\n\\t\\t\\t\\tthis.__setSize();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar scrollElement = this.__config.scrollElement;\\r\\n\\t\\t\\tvar scrollPos = scrollElement[this.__objSelectedProp.scroll];\\r\\n\\t\\t\\tif(this.__internal.items && (this.__internal.items.length * this.__internal.itemDimension < scrollPos)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tscrollElement[this.__objSelectedProp.scroll] = 0;\\r\\n\\t\\t\\t\\tthis.__internal.lastPageNum = 0;\\r\\n\\t\\t    }\\r\\n\\t\\t\\tthis.__addItems();\\r\\n\\t\\t\\tscrollElement[this.__objSelectedProp.scroll] = scrollPos;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.refresh = function(isReset)\\r\\n\\t{\\r\\n\\t\\tvar currItemSize = this.__internal.itemDimension;\\r\\n\\t\\tthis.__setSize();\\r\\n\\t\\tvar newItemSize = this.__internal.itemDimension;\\r\\n\\t\\tif((currItemSize != newItemSize) || isReset)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar criteria = null;\\r\\n\\t\\t\\tif(this.__config.totalLength)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcriteria = this.__config.totalLength;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isArray(this.__config.items) && this.__config.items && this.__config.items.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcriteria = this.__config.items;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcriteria = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.dataSource(criteria);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.getScrollProgress = function()\\r\\n\\t{\\r\\n\\t\\tvar scrollPos = this.__internal.scrollPos;\\r\\n\\t\\tvar itemSize = this.__internal.itemDimension;\\r\\n\\t\\tvar totalSize = this.__internal.arrItem.length * itemSize;\\r\\n\\t\\tvar progress = ((scrollPos / totalSize) * 100) || 0;\\r\\n\\t\\treturn progress;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.appendItems = function(arrItem)\\r\\n\\t{\\r\\n\\t\\tthis.__addNewItems(arrItem,false);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.prependItems = function(arrItem)\\r\\n\\t{\\r\\n\\t\\tthis.__addNewItems(arrItem,true);\\r\\n\\t};\\r\\n\\t\\r\\n\\t//assuming that size of all rows are same\\r\\n\\t//if not same add offset\\r\\n\\t//if variable Row size and utility user has original scroll Position then set scrollPosition and pass index as null\\r\\n\\tNSVirtualScroll.prototype.scrollToIndex = function(index,animationRequired,offset,scrollPosition)\\r\\n\\t{\\r\\n\\t\\tvar arrItem = this.__internal.arrItem;\\r\\n\\t\\tif(arrItem && arrItem.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar scrollPos = null;\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(index) && index > -1 && index < arrItem.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\toffset = this.util.isUndefinedOrNull(offset) ? 0 : parseInt(offset);\\r\\n\\t\\t\\t\\tscrollPos = (this.__internal.itemDimension * index) + offset;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(!this.util.isUndefinedOrNull(scrollPosition))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\toffset = 0;\\r\\n\\t\\t\\t\\tscrollPos = scrollPosition;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.util.isUndefinedOrNull(scrollPos))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar scrollElement = this.__config.scrollElement;\\r\\n\\t\\t\\t\\tif(animationRequired)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar animation = new this.util.animation(scrollElement,[\\r\\n\\t\\t       \\t  \\t    {\\r\\n\\t\\t       \\t  \\t      time: 500,\\r\\n\\t\\t       \\t  \\t      property:this.__objSelectedProp.scroll,\\r\\n\\t\\t       \\t  \\t      target: scrollPos,\\r\\n\\t\\t       \\t  \\t    }\\r\\n\\t\\t       \\t  \\t]);\\r\\n\\t\\t   \\t  \\t  \\tanimation.animate();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tscrollElement[this.__objSelectedProp.scroll] = scrollPos;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//this function is used for updating items(dom elements) already generated \\r\\n\\tNSVirtualScroll.prototype.updateItems = function(updateCallback) \\r\\n\\t{\\r\\n\\t\\tif(this.__internal.arrItem && this.__internal.arrItem.length && updateCallback) \\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItem = this.__internal.arrItem;\\r\\n\\t\\t\\tfor(var count = 0;count < arrItem.length;count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrItem[count]; \\r\\n\\t\\t\\t\\titem = updateCallback(item);\\r\\n\\t\\t\\t\\tarrItem[count] = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__internal.arrItem = arrItem;\\r\\n\\t\\t\\tthis.__internal.origArrItem = this.__internal.arrItem;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.destroy = function()\\r\\n\\t{\\r\\n\\t\\tvar scrollElement = this.__config.scrollElement;\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tif(this.__internal.contentTabIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcontentElement.setAttribute(\\\"tabindex\\\",this.__internal.contentTabIndex);\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.removeStyleClass(scrollElement,\\\"nsVirtualScrollElement nsVirtualScrollElement\\\" + this.util.toCamelCase(this.__config.direction,true));\\r\\n\\t\\tthis.util.removeStyleClass(contentElement,\\\"nsVirtualScrollContent nsVirtualScrollContent\\\" + this.util.toCamelCase(this.__config.direction,true));\\r\\n\\t\\tif(this.__scrollHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(scrollElement,\\\"scroll\\\",this.__scrollHandlerRef);\\r\\n\\t\\t\\tthis.__scrollHandlerRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__resizeHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(this.__win,\\\"resize\\\",this.__resizeHandlerRef);\\r\\n\\t\\t\\tthis.__resizeHandlerRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__internal.divLoader)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__internal.divLoader.parentNode.removeChild(this.__internal.divLoader);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__initialize = function()\\r\\n\\t{\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tif(this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\tscrollElement: this.util.getElement(this.__setting[\\\"scrollElement\\\"]),\\r\\n\\t\\t\\t\\t\\tcontentElement: this.util.getElement(this.__setting[\\\"contentElement\\\"]),\\r\\n\\t\\t\\t\\t\\tdirection: this.__setting[\\\"direction\\\"] || NSVirtualScroll.DIRECTION_VERTICAL,\\r\\n\\t\\t\\t\\t\\titemTag: this.__setting[\\\"itemTag\\\"],\\r\\n\\t\\t\\t\\t\\tpageSize: parseInt(this.__setting[\\\"pageSize\\\"]) || 30,//number of items after the cache will be refreshed\\r\\n\\t\\t\\t\\t\\tpagesRendered: parseInt(this.__setting[\\\"pagesRendered\\\"]) || 3,//number of items(pageSize * pagesRendered) to be rendered\\r\\n\\t\\t\\t\\t\\titems: this.__setting[\\\"items\\\"],//array of items, can be html or nodes\\r\\n\\t\\t\\t\\t\\ttotalLength: parseInt(this.__setting[\\\"totalLength\\\"]) || 0,//either mention items or totalLength and itemCreateCallback\\r\\n\\t\\t\\t\\t\\tgetItemComponent: this.__setting[\\\"getItemComponent\\\"],\\r\\n\\t\\t\\t\\t\\tgetEmptyItemComponent: this.__setting[\\\"getEmptyItemComponent\\\"],\\r\\n\\t\\t\\t\\t\\tenableScrollDelay: Boolean.parse(this.__setting[\\\"enableScrollDelay\\\"]),//for Mobile device which are slow in rendering\\r\\n\\t\\t\\t\\t\\tscrollInterval: this.__setting[\\\"scrollInterval\\\"],\\r\\n\\t\\t\\t\\t\\tenableLoader: Boolean.parse(this.__setting[\\\"enableLoader\\\"]),\\r\\n\\t\\t\\t\\t\\tgetLoaderComponent: this.__setting[\\\"getLoaderComponent\\\"],\\r\\n\\t\\t\\t\\t\\tresizeInterval: parseInt(this.__setting[\\\"resizeInterval\\\"]) || 150,\\r\\n\\t\\t\\t\\t\\tscrollingProgress: this.__setting[\\\"scrollingProgress\\\"], //scrollingProgress callback while scrolling like  scrollingProgress(progress)\\r\\n\\t\\t\\t\\t\\tpageWillChange: this.__setting[\\\"pageWillChange\\\"], //pageWillChange callback before page change like  pageWillChange(oldPage,newPage)\\r\\n\\t\\t\\t\\t\\tpageChanged: this.__setting[\\\"pageChanged\\\"], //pageChanged callback before page change like  pageChanged(page)\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\tif(!this.__config.scrollElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSVirtualScroll\\\",\\\"scrollElement is not valid\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__config.contentElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.throwNSError(\\\"NSVirtualScroll\\\",\\\"contentElement is not valid\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__domVariables = this.util.getDomVariables();\\r\\n\\t\\t\\tthis.__doc = this.__domVariables.doc;\\r\\n\\t\\t\\tthis.__win = this.__domVariables.win;\\r\\n\\t\\t\\tif((!this.__config.items || this.__config.items.length == 0) && !this.__config.totalLength)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.items = this.__fetchChildren(contentElement);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__setProps();\\r\\n\\t\\t\\tthis.__setInternalVars();\\r\\n\\t\\t\\tthis.__create();\\r\\n\\t\\t\\tthis.__addListeners();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__setProps = function()\\r\\n\\t{\\r\\n\\t\\tthis.__objProp = {\\r\\n\\t\\t\\t    vertical: {\\r\\n\\t\\t\\t        direction:NSVirtualScroll.DIRECTION_VERTICAL,size: \\\"height\\\",offset: \\\"offsetHeight\\\",\\r\\n\\t\\t\\t        scroll: \\\"scrollTop\\\", scrollSize: \\\"scrollHeight\\\",paddingStart:\\\"paddingTop\\\",\\r\\n\\t\\t\\t        paddingEnd:\\\"paddingBottom\\\",marginStart:\\\"marginTop\\\",marginEnd:\\\"marginBottom\\\"\\r\\n\\t\\t\\t    },\\r\\n\\t\\t\\t    horizontal: {\\r\\n\\t\\t\\t        direction:NSVirtualScroll.DIRECTION_HORIZONTAL,size: \\\"width\\\",offset: \\\"offsetWidth\\\",\\r\\n\\t\\t\\t        scroll: \\\"scrollLeft\\\", scrollSize: \\\"scrollWidth\\\",paddingStart:\\\"paddingLeft\\\",\\r\\n\\t\\t\\t        paddingEnd:\\\"paddingRight\\\",marginStart:\\\"marginLeft\\\",marginEnd:\\\"marginRight\\\"\\r\\n\\t\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\tthis.__objSelectedProp = this.__objProp[\\\"vertical\\\"];\\r\\n\\t\\tif(this.__config.direction == NSVirtualScroll.DIRECTION_HORIZONTAL)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__objSelectedProp = this.__objProp[\\\"horizontal\\\"];\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//call this function only with init is needed\\r\\n\\tNSVirtualScroll.prototype.__setInternalVars = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__internal.itemDimension)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__config.contentElement.hasAttribute(\\\"tabindex\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__internal.contentTabIndex = this.__config.contentElement.getAttribute(\\\"tabindex\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__internal.scrollIntervalID = -1;\\r\\n\\t\\t\\tthis.__internal.resizeIntervalID = -1;\\r\\n\\t\\t\\tthis.__internal.scrollPos = -1;\\r\\n\\t\\t\\tthis.__internal.lastPageNum = -1;\\r\\n\\t\\t\\tthis.__internal.objItemComp = {};\\r\\n\\t\\t\\tthis.__internal.objCache = {};\\r\\n\\t\\t\\tthis.__internal.cssExtraItem = \\\"nsVirtualExtraItem\\\" + this.util.toCamelCase(this.__objSelectedProp.direction,true);\\r\\n\\t\\t\\tthis.__internal.isMobile = this.util.isMobile().any;\\r\\n\\t\\t\\tif(this.__config.enableScrollDelay && this.util.isUndefinedOrNull(this.__config.scrollInterval))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__config.scrollInterval = this.__internal.isMobile ? 300 : 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__internal.divLoader = null;\\r\\n\\t\\t\\tthis.__addLoader();\\r\\n\\t\\t\\tthis.__internal.pageSize = this.__config.pageSize;\\r\\n\\t\\t\\tthis.__internal.pagesRendered = this.__config.pagesRendered;\\r\\n\\t\\t\\tvar item = this.__getItemAt(0);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__internal.isItemHtml = this.util.isString(item);\\r\\n\\t\\t\\t\\tthis.__setSize();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__internal.itemDimension = 0;\\r\\n\\t\\t\\t\\tthis.__internal.pageDimension = 0;\\r\\n\\t\\t\\t\\tthis.__internal.itemsRendered = 0;\\r\\n\\t\\t\\t\\tthis.__internal.renderedSize = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__setSize = function()\\r\\n\\t{\\r\\n\\t\\tthis.__internal.itemDimension = this.__getItemSize();\\r\\n\\t\\tthis.__internal.pageDimension = this.__internal.itemDimension * this.__internal.pageSize;\\r\\n\\t\\tthis.__internal.itemsRendered = this.__internal.pageSize * this.__internal.pagesRendered;\\r\\n\\t\\tthis.__internal.renderedSize = this.__internal.pagesRendered * this.__internal.pageDimension;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__create = function()\\r\\n\\t{\\r\\n\\t\\tvar scrollElement = this.__config.scrollElement;\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tthis.util.addStyleClass(scrollElement,\\\"nsVirtualScrollElement nsVirtualScrollElement\\\" + this.util.toCamelCase(this.__config.direction,true));\\r\\n\\t\\tthis.util.addStyleClass(contentElement,\\\"nsVirtualScrollContent nsVirtualScrollContent\\\" + this.util.toCamelCase(this.__config.direction,true));\\r\\n\\t\\tcontentElement.setAttribute(\\\"tabindex\\\",0);\\r\\n\\t\\tif((this.__config.items && this.__config.items.length) || this.__config.totalLength)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar scrollPos = scrollElement[this.__objSelectedProp.scroll];\\r\\n\\t\\t\\tthis.__addItems();\\r\\n\\t\\t\\tscrollElement[this.__objSelectedProp.scroll] = scrollPos;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__addListeners = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__scrollHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__scrollHandlerRef = this.__config.enableScrollDelay ? this.__scrollHandlerWithDelay.bind(this) : this.__scrollHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(this.__config.scrollElement,\\\"scroll\\\",this.__scrollHandlerRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__resizeHandlerRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__resizeHandlerRef = this.__resizeHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(this.__win,\\\"resize\\\",this.__resizeHandlerRef);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__scrollHandlerWithDelay = function(event)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tclearTimeout(this.__internal.scrollIntervalID);\\r\\n\\t\\tthis.__internal.scrollIntervalID = setTimeout(function(){\\r\\n\\t\\t\\tself.__scrollHandler.call(self,event);\\r\\n\\t\\t},this.__config.scrollInterval);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__scrollHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tthis.__internal.scrollIntervalID = -1;\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar pageNumber = this.__getCurrentPageNum();\\r\\n\\t\\tvar lastPageNum = this.__internal.lastPageNum;\\r\\n\\t\\tthis.__internal.lastPageNum = pageNumber;\\r\\n\\t\\t/*console.log(\\\"lastPageNum::\\\" + lastPageNum + \\\" pageNumber::\\\" + pageNumber);*/\\r\\n\\t\\tif(lastPageNum != pageNumber)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//console.log(\\\"In Scroll\\\");\\r\\n\\t\\t\\tthis.__addItems();\\r\\n\\t\\t\\tthis.__fireCallback(\\\"scrollingProgress\\\",this.getScrollProgress());\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//not used for now\\r\\n\\tNSVirtualScroll.prototype.__isScrollingDown = function() {\\r\\n\\t\\t  var isScrollingDown = false;\\r\\n\\t\\t  var currentScrollPos = this.__config.scrollElement[this.__objSelectedProp.scroll];\\r\\n\\r\\n\\t\\t  if (currentScrollPos > this.__internal.prevScrollPos) {\\r\\n\\t\\t    isScrollingDown = true;\\r\\n\\t\\t  } else {\\r\\n\\t\\t    isScrollingDown = false;\\r\\n\\t\\t  }\\r\\n\\r\\n\\t\\t  this.__internal.prevScrollPos = currentScrollPos;\\r\\n\\t\\t  return isScrollingDown;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__resizeHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tclearTimeout(this.__internal.resizeIntervalID);\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tthis.__internal.resizeIntervalID = setTimeout(self.refresh.bind(self), this.__config.resizeInterval);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getItemSize = function()\\r\\n\\t{\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tvar isAdded = false;\\r\\n\\t\\tvar size = null;\\r\\n\\t\\tif(!contentElement.children.length)\\r\\n\\t\\t{\\r\\n            var itemHtml = this.__getItemAt(0);\\r\\n\\t\\t\\tthis.__setItemsInDom(itemHtml);\\r\\n\\t\\t\\tisAdded = true;\\r\\n\\t\\t}\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar length = contentElement.children.length;\\r\\n\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = contentElement.children[count];\\r\\n\\t\\t\\tif(!this.util.hasStyleClass(item,this.__internal.cssExtraItem))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__config.itemTag)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.itemTag = item.tagName.toLowerCase();\\r\\n\\t\\t}\\r\\n\\t\\tsize = item[this.__objSelectedProp.offset];\\r\\n\\t\\tif(this.__config.itemTag == \\\"tr\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar border = this.util.getStyleValue(contentElement,\\\"borderCollapse\\\");\\r\\n\\t\\t\\tif(border != \\\"collapse\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar borderSpacing = this.util.getStyleValue(contentElement,\\\"borderSpacing\\\");\\r\\n\\t\\t\\t\\tsize += this.__getInt(borderSpacing);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar marginStart = this.util.getStyleValue(item,this.__objSelectedProp.marginStart);\\r\\n\\t        var marginEnd = this.util.getStyleValue(item,this.__objSelectedProp.marginEnd);\\r\\n\\t        marginStart = this.__getInt(marginStart);\\r\\n\\t        marginEnd = this.__getInt(marginEnd);\\r\\n\\t        size += Math.max(marginStart, marginEnd);\\r\\n\\t\\t}\\r\\n\\t\\tif(isAdded)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setItemsInDom(null);\\r\\n\\t\\t}\\r\\n\\t\\treturn size;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__addItems = function()\\r\\n\\t{\\r\\n\\t\\tvar arrItem = this.__internal.arrItem || [];\\r\\n\\t\\tvar itemPage = this.__getPageData(arrItem,this.__getCurrentPageNum());\\r\\n\\t\\tvar hasPageContentChanged = this.__hasCacheChanged(\\\"data\\\",itemPage.arrItem);\\r\\n        var hasStartOffsetChanged = this.__hasCacheChanged(\\\"top\\\",itemPage.startOffset);\\r\\n        var hasEndOffsetChanged = this.__hasCacheChanged(\\\"bottom\\\",itemPage.endOffset);\\r\\n        var contentElement = this.__config.contentElement;\\r\\n        var arrSource = [];\\r\\n        if(hasPageContentChanged || hasStartOffsetChanged) \\r\\n        {\\r\\n            if(itemPage.startOffset) \\r\\n            {\\r\\n            \\tarrSource.push(this.__getExtraItem(\\\"nsVirtualTopItem\\\",itemPage.startOffset));\\r\\n            }\\r\\n            arrSource.push.apply(arrSource,itemPage.arrItem);\\r\\n            if(itemPage.endOffset) \\r\\n            {\\r\\n            \\tarrSource.push(this.__getExtraItem(\\\"nsVirtualBottomItem\\\",itemPage.endOffset));\\r\\n            }\\r\\n            this.__fireCallback(\\\"pageWillChange\\\",[this.__internal.currentItemPage,itemPage]);\\r\\n            this.__setItemsInDom(arrSource);\\r\\n            this.__handleTagAfterRender(itemPage);\\r\\n            this.__fireCallback(\\\"pageChanged\\\",[itemPage]);\\r\\n            this.__internal.currentItemPage = itemPage;\\r\\n        } \\r\\n        else if(hasEndOffsetChanged) \\r\\n        {\\r\\n        \\tcontentElement.lastChild.style[this.__objSelectedProp.size] = itemPage.endOffset + \\\"px\\\";\\r\\n        }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__setItemsInDom = function(arrItem,isAdd)\\r\\n\\t{\\r\\n\\t\\tthis.__setLoaderVisibility(true);\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tif(this.__internal.isItemHtml)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(arrItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar html = this.__convertArrayToString(arrItem);\\r\\n\\t\\t\\t\\tisAdd ? contentElement.innerHTML += html : contentElement.innerHTML = html;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tisAdd ? null : contentElement.innerHTML = \\\"\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!isAdd)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//IE Bug that when Html elements are added(i.e. when this.__internal.isItemHtml is false) you do contentElement.innerHTML = \\\"\\\" \\r\\n\\t\\t\\t\\t//then the items being rendered in this.__internal.arrItem also becomes empty\\r\\n\\t\\t\\t\\tif(this.__internal.isItemHtml)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcontentElement.innerHTML = \\\"\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\twhile(contentElement.firstChild) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcontentElement.removeChild(contentElement.lastChild);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(arrItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrItem = this.util.isArray(arrItem) ? arrItem : [arrItem];\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar length = arrItem.length;\\r\\n\\t\\t\\t\\tfor(var count =0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(arrItem[count]) {\\r\\n\\t\\t\\t\\t\\t\\titem = arrItem[count];\\r\\n\\t\\t\\t\\t\\t\\tthis.util.isString(item) ? contentElement.innerHTML += item : contentElement.appendChild(item);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__setLoaderVisibility(false);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getAllItems = function(fromIndex,toIndex)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.items && this.__config.items.length && this.__config.items.length > fromIndex)\\r\\n\\t\\t{\\r\\n            toIndex = this.__config.items.length > toIndex ? toIndex : this.__config.items.length - 1;\\r\\n            var arrCloned = this.__config.items.slice();\\r\\n\\t\\t\\tvar arrItem = arrCloned.splice(fromIndex,toIndex - fromIndex);\\r\\n\\t\\t\\treturn arrItem;\\r\\n\\t\\t}\\r\\n\\t\\telse if(this.__config.totalLength && this.__config.getItemComponent)\\r\\n\\t\\t{\\r\\n            fromIndex = this.__config.totalLength > fromIndex ? fromIndex : this.__config.totalLength - 1;\\r\\n            toIndex = this.__config.totalLength > toIndex ? toIndex : this.__config.totalLength - 1;\\r\\n            if(!this.__internal.arrItem) {\\r\\n\\t\\t\\t\\tthis.__internal.arrItem = [];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar arrItem = this.__internal.arrItem;\\r\\n            var arrRet = [];\\r\\n\\t\\t\\tfor(var count = fromIndex;count < toIndex + 1;count++)\\r\\n\\t\\t\\t{\\r\\n                if(arrItem.length > count && arrItem[count]) {\\r\\n                    arrRet.push(arrItem[count]);\\r\\n                }\\r\\n                else {\\r\\n                    var item = this.__getItemFromComponent(count);\\r\\n                    arrItem[count] = item;\\r\\n                    arrRet.push(item);\\r\\n                }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrRet;\\r\\n\\t\\t}\\r\\n\\t\\treturn [];\\r\\n\\t};\\r\\n\\r\\n    NSVirtualScroll.prototype.__getItemAt = function(index) \\r\\n    {\\r\\n        if(this.__config.items && this.__config.items.length && this.__config.items.length > index)\\r\\n\\t\\t{\\r\\n           return this.__config.items[index];\\r\\n\\t\\t}\\r\\n        else if(this.__config.arrItem && this.__config.arrItem.length && this.__config.arrItem.length > index && this.__config.arrItem[index])\\r\\n\\t\\t{\\r\\n           return this.__config.arrItem[index];\\r\\n\\t\\t}\\r\\n        else if(this.__config.totalLength > index && this.__config.getItemComponent) {\\r\\n           return this.__getItemFromComponent(index);\\r\\n        }\\r\\n        return null;\\r\\n    };\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getItemFromComponent = function(index)\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tif(this.__config.totalLength > index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar comp = new this.__config.getItemComponent(index);\\r\\n\\t\\t\\titem = comp.getElement();\\r\\n\\t\\t\\tthis.__internal.objItemComp[index.toString()] = comp;\\r\\n\\t\\t}\\r\\n\\t\\treturn item;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getPageData = function(arrItem,pageNum)\\r\\n\\t{\\r\\n\\t\\tvar internal = this.__internal;\\r\\n\\t\\tvar retItem = null;\\r\\n        if(this.__config.totalLength === 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretItem = {startOffset: 0,endOffset: 0,itemsBefore: 0,arrItem:[this.__getEmptyItem()]};\\r\\n\\t\\t}\\r\\n\\t\\t/*else if(arrItem.length < internal.pageSize)\\r\\n\\t\\t{\\r\\n            var startIndex = 0;\\r\\n\\t        var endIndex = internal.pageSize;\\r\\n            var arrRet = this.__getAllItems(startIndex,endIndex);\\r\\n\\t\\t\\tretItem = {startOffset: 0,endOffset: 0,itemsBefore: 0,arrItem:arrRet};\\r\\n\\t\\t}*/\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar startIndex = Math.max((internal.itemsRendered - internal.pageSize) * pageNum, 0);\\r\\n\\t        var endIndex = startIndex + internal.itemsRendered;\\r\\n            var totalLength = this.__getTotalLength();\\r\\n\\t        var startOffset = Math.max(startIndex * internal.itemDimension, 0);\\r\\n\\t        var endOffset = Math.max((totalLength - endIndex) * internal.itemDimension, 0);\\r\\n\\t        var itemsBefore = startIndex;\\r\\n\\t        if(startOffset < 1) \\r\\n\\t        {\\r\\n\\t        \\titemsBefore++;\\r\\n\\t        }\\r\\n\\t        var arrRet = this.__getAllItems(startIndex,endIndex);//arrItem.slice(startIndex,endIndex);\\r\\n\\t        retItem = {startOffset: startOffset,endOffset: endOffset,itemsBefore: itemsBefore,arrItem:arrRet};\\r\\n\\t\\t}\\r\\n\\t\\tconsole.log(retItem);\\r\\n\\t\\treturn retItem;\\r\\n\\t};\\r\\n\\r\\n    NSVirtualScroll.prototype.__getTotalLength = function() \\r\\n    {\\r\\n        if(this.__config.items && this.__config.items.length)\\r\\n\\t\\t{\\r\\n           return this.__config.items.length;\\r\\n\\t\\t}\\r\\n        else if(this.__config.totalLength && this.__config.getItemComponent) {\\r\\n           return this.__config.totalLength;\\r\\n        }\\r\\n        return 0;\\r\\n    };\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__addNewItems = function(arrNewItem,isPrepend)\\r\\n\\t{\\r\\n\\t\\tif(!this.util.isUndefinedOrNull(arrNewItem))\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrNewItem = this.util.isArray(arrNewItem) ? arrNewItem : [arrNewItem];\\r\\n\\t\\t\\tif(arrNewItem && arrNewItem.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrItem = [];\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrNewItem.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrItem.push(arrNewItem.items[count]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar arrExisting = this.__internal.arrItem;\\r\\n\\t\\t\\t\\tthis.__internal.arrItem = isPrepend ? arrItem.concat(arrExisting) : arrExisting.concat(arrItem);\\r\\n\\t\\t\\t\\tthis.__addItems();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__handleTagAfterRender = function(itemPage)\\r\\n\\t{\\r\\n\\t\\tvar contentElement = this.__config.contentElement;\\r\\n\\t\\tif(this.__config.itemTag == \\\"ol\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\tcontentElement.setAttribute(\\\"start\\\", itemPage.itemsBefore);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__fetchChildren = function(element)\\r\\n\\t{\\r\\n\\t\\tif(element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChildren = element.children;\\r\\n\\t\\t\\tvar arrRet = [];\\r\\n\\t\\t\\tvar length = arrChildren.length;\\r\\n\\t\\t\\tvar child = null;\\r\\n\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tchild = arrChildren[count];\\r\\n\\t\\t\\t\\tarrRet.push(this.__getItemHtml(child));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrRet;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__fireCallback = function(callbackName,args)\\r\\n\\t{\\r\\n\\t\\tif(this.__config[callbackName]) {\\r\\n\\t\\t\\tthis.__config[callbackName](args);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__hasCacheChanged = function(key,value)\\r\\n\\t{\\r\\n\\t\\tvar changed = (value != this.__internal.objCache[key]);\\r\\n\\t\\tthis.__internal.objCache[key] = value;\\r\\n\\t    return changed;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getCurrentPageNum = function()\\r\\n\\t{\\r\\n\\t\\tthis.__internal.scrollPos = this.__config.scrollElement[this.__objSelectedProp.scroll];\\r\\n\\t\\tvar pageNum = Math.floor(this.__internal.scrollPos / (this.__internal.renderedSize - this.__internal.pageDimension)) || 0;\\r\\n\\t\\t//console.log(this.__internal.scrollPos + \\\",\\\" + this.__internal.renderedSize + \\\",\\\" + this.__internal.pageDimension + \\\",\\\" + pageNum);\\r\\n\\t\\treturn pageNum;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getExtraItem = function(cssClass,size)\\r\\n\\t{\\r\\n\\t\\tvar item = this.util.createElement(this.__config.itemTag,null,this.__internal.cssExtraItem,this.__doc);\\r\\n\\t\\tcssClass && this.util.addStyleClass(item,cssClass);\\r\\n\\t\\tsize && (item.style[this.__objSelectedProp.size] = size + \\\"px\\\");\\r\\n\\t\\treturn (this.__internal.isItemHtml ? this.__getItemHtml(item) : item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getEmptyItem = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__config.getEmptyItemComponent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar comp = new this.__config.getEmptyItemComponent();\\r\\n\\t\\t\\treturn (this.__internal.isItemHtml ? this.__getItemHtml(comp.getElement()) : comp.getElement());\\r\\n\\t\\t}\\r\\n\\t\\tvar item = this.util.createElement(this.__config.itemTag,null,null,this.__doc);\\r\\n\\t\\tif(this.__config.itemTag == \\\"tr\\\")\\r\\n\\t\\t{\\r\\n\\t\\t\\titem.innerHTML = \\\"<td colSpan='1000'></td>\\\";\\r\\n\\t\\t}\\r\\n\\t\\treturn (this.__internal.isItemHtml ? this.__getItemHtml(item) : item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getItemHtml = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.util.isString(item) ? item : item.outerHTML;\\r\\n\\t\\t}\\r\\n\\t\\treturn \\\"\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__addLoader = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__config.enableLoader)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__internal.divLoader = this.util.createDiv(null,\\\"nsVirtualScrollLoader\\\");\\r\\n\\t\\t\\tvar divText = null;\\r\\n\\t\\t\\tif(this.__config.getLoaderComponent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar comp = new this.__config.getLoaderComponent();\\r\\n\\t\\t\\t\\tdivText = comp.getElement();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdivText = this.util.createDiv(null,\\\"nsVirtualScrollLoaderTextCon\\\");\\r\\n\\t\\t\\t\\tdivText.innerHTML = \\\"<b class=\\\\\\\"nsVirtualScrollLoaderText\\\\\\\">Rendering...</b>\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__internal.divLoader.appendChild(divText);\\r\\n\\t\\t\\tthis.__setLoaderVisibility(false);\\r\\n\\t\\t\\tthis.__config.scrollElement.appendChild(this.__internal.divLoader);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__setLoaderVisibility = function(isShow)\\r\\n\\t{\\r\\n\\t\\tif(this.__internal.divLoader)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__internal.divLoader.style.display = isShow ? \\\"\\\" : \\\"none\\\";\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__convertArrayToString = function(arrItem,separator)\\r\\n\\t{\\r\\n\\t\\tif(arrItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tseparator = separator ? separator : \\\"\\\";\\r\\n\\t\\t\\treturn this.util.isArray(arrItem) ? arrItem.join(separator) : arrItem;\\r\\n\\t\\t}\\r\\n\\t\\treturn \\\"\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.prototype.__getInt = function(value)\\r\\n\\t{\\r\\n\\t\\treturn parseInt(value,10) || 0;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSVirtualScroll.DIRECTION_VERTICAL = \\\"vertical\\\";\\r\\n\\tNSVirtualScroll.DIRECTION_HORIZONTAL = \\\"horizontal\\\";\\r\\n\\t\\r\\n\\treturn NSVirtualScroll;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSVirtualScroll\\\",NSVirtualScroll);\\r\\nvar NSList = (function()\\r\\n{\\r\\n\\tfunction NSList(component,setting) \\r\\n\\t{\\r\\n\\t\\t//this.base.call(this);\\r\\n\\t\\tthis.ITEM_SELECTED = \\\"itemSelected\\\";\\r\\n\\t\\tthis.ITEM_UNSELECTED = \\\"itemUnselected\\\";\\r\\n\\t\\tthis.ITEM_NAVIGATED = \\\"itemNavigated\\\";\\r\\n\\t\\tthis.NAVIGATION_UP = \\\"up\\\";\\r\\n\\t\\tthis.NAVIGATION_DOWN = \\\"down\\\";\\r\\n\\t\\tthis.ITEM_DROPPING = \\\"itemDropping\\\";\\r\\n\\t\\tthis.ITEM_DROPPED = \\\"itemDropped\\\";\\r\\n\\t\\tthis.DRAG_STARTED = \\\"dragStarted\\\";\\r\\n\\t\\tthis.DRAGGING = \\\"dragging\\\";\\r\\n\\t\\tthis.DRAG_END = \\\"dragEnd\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__dataSource = null;\\r\\n\\t\\tthis.__labelField = \\\"label\\\";\\r\\n\\t\\tthis.__itemRenderer = null;\\r\\n\\t\\tthis.__templateID = null;\\r\\n\\t\\tthis.__setData = null;\\r\\n\\t\\tthis.__labelFunction = null;\\r\\n\\t\\tthis.__enableHierarchical = false;\\r\\n\\t\\tthis.__enableMouseHover = false;\\r\\n\\t\\tthis.__enableMouseHoverAnimation = false;\\r\\n\\t\\tthis.__disableHoverField = null;\\r\\n\\t\\tthis.__disableHoverFunction = null;\\r\\n\\t\\tthis.__enableKeyboardNavigation = false;\\r\\n\\t\\tthis.__enableMultipleSelection = false;\\r\\n\\t\\tthis.__enableCustomScrollBar = false;\\r\\n\\t\\tthis.__enableVirtualScroll = false;\\r\\n\\t\\tthis.__isDraggable = true;\\r\\n\\t\\tthis.__isDroppable = true;\\r\\n\\t\\tthis.__enableDragByHandle = false;\\r\\n\\t\\tthis.__dragHandlerClass = null;\\r\\n\\t\\tthis.__enableDragAfterHold = false;\\r\\n\\t\\tthis.__holdTime = 500;\\r\\n\\t\\tthis.__enableCloneMode = false;\\r\\n\\t\\tthis.__rowHeight = -1;\\r\\n\\t\\tthis.__noDataMessage = \\\"No matching records found\\\";\\r\\n\\t\\tthis.__enableContextMenu = false;\\r\\n\\t\\tthis.__enableVariableRowHeight = false;\\r\\n\\t\\tthis.__contextMenuProvider = null;\\r\\n\\t\\tthis.__contextMenuSetting = null;\\r\\n\\t\\tthis.__enableTruncateToFit = false;\\r\\n\\t\\tthis.__toolTipField = null;\\r\\n\\t\\tthis.__enableToolTipForTruncateText = false;\\r\\n\\t\\tthis.__toolTipRenderer = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__arrWrapper = null;\\r\\n\\t\\tthis.__arrInternalSource = null;\\r\\n\\t\\tthis.__arrFlatHierarchicalSource = [];\\r\\n\\t\\t\\r\\n\\t\\tthis.__divOuterContainer = null;\\r\\n\\t\\tthis.__divParentContainer = null;\\r\\n\\t\\tthis.__listContainer = null;\\r\\n\\t\\tthis.__scroller = null;\\r\\n\\t\\tthis.__scrollerSetting = {};\\r\\n\\t\\tthis.__customScrollBarSetting = {};\\r\\n\\t\\tthis.__customScrollBarTooltip = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__template = null;\\r\\n\\t\\tthis.__currentIndex = -1;\\r\\n\\t\\tthis.__selectedIndex = -1;\\r\\n\\t\\tthis.__navigationIndex = -1;\\r\\n\\t\\tthis.__selectedItem = null;\\r\\n\\t\\tthis.__selectedItems = [];\\t\\r\\n\\t\\tthis.__selectedIndexes = [];\\r\\n\\t\\tthis.__lastNavigationDirection = null;\\r\\n\\t\\tthis.__orignalItemKey = [];\\r\\n\\t\\t//for keyboard navigation\\r\\n\\t\\tthis.__pageSize = 0;\\r\\n\\t\\tthis.__scrollTarget = null;\\r\\n\\t\\tthis.__startArrayElement = -1;\\r\\n\\t\\tthis.__listItemHeight = 0;\\r\\n\\t\\t//for Virtual Scroll\\r\\n\\t\\tthis.__virtualScrollSetting = {};\\r\\n\\t\\tthis.__nsVirtualScroll = null; \\r\\n\\t\\tthis.__virtualRowHeight = 0;\\r\\n\\t\\t\\r\\n\\t\\tthis.__childField = \\\"children\\\";\\r\\n\\t\\tthis.__CLASS_GROUP_CELL = \\\"nsListGroupCell\\\";\\r\\n\\t\\tthis.__CLASS_CELL_CHILD = \\\"nsListCellChild\\\";\\r\\n\\t\\t\\r\\n\\t\\t//removing this.getID() as prefix as move functionality from one list to another would have different fields.\\r\\n\\t\\tthis.__fieldPrefix = \\\"ns_field\\\";\\r\\n\\t\\tthis.__fieldIndex =  this.__fieldPrefix + \\\"_item_index\\\";\\r\\n\\t\\tthis.__fieldVisibleIndex = this.__fieldPrefix + \\\"_item_visible_index\\\";\\r\\n\\t\\tthis.__fieldItem = this.__fieldPrefix + \\\"_item\\\";\\r\\n\\t\\tthis.__fieldDisableHover = this.__fieldPrefix + \\\"_disableHover\\\";\\r\\n\\t\\tthis.__fieldSelected = this.__fieldPrefix + \\\"_selected\\\";\\r\\n\\t\\tthis.__fieldHover = this.__fieldPrefix + \\\"_hover\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__fieldItemLevel = this.__fieldPrefix + \\\"_item_level\\\";\\r\\n\\t\\tthis.__fieldItemVisible = this.__fieldPrefix + \\\"_item_visible\\\";\\r\\n\\t\\tthis.__fieldParentIndex = this.__fieldPrefix + \\\"_parent_index\\\";\\r\\n\\t\\tthis.__fieldHasChild = this.__fieldPrefix + \\\"_item_hasChild\\\";\\r\\n\\t\\tthis.__fieldHasParent = this.__fieldPrefix + \\\"_item_hasParent\\\";\\r\\n\\t\\tthis.__fieldIsCollapsed = this.__fieldPrefix + \\\"_item_isCollapsed\\\";\\r\\n\\t\\tthis.__fieldItemArrow = this.__fieldPrefix + \\\"_item_arrow\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__isShiftPressed = false;\\r\\n\\t\\tthis.__isCtrlPressed = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.__objGrid = null;\\r\\n\\t\\tthis.__nsListFilter = null;\\r\\n\\t\\tthis.__nsListDragDrop = null;\\r\\n\\t\\tthis.__nsToolTipInElement = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__keyDownRef = null;\\r\\n\\t\\tthis.__keyUpRef = null;\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component);\\r\\n\\t};\\r\\n\\tnsExtendPrototype(NSContainerBase,NSList);\\r\\n\\tNSList.prototype.constructor = NSList;\\r\\n\\t\\r\\n\\tNSList.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t\\tthis.__initializePluggins();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t\\tthis.__objGrid.__addSVGInPage();\\r\\n\\t\\tthis.__setTemplate();\\r\\n\\t\\tthis.__objGrid.__initialize();\\r\\n\\t\\tthis.__addListenerForBody();\\r\\n\\t\\tif(this.__dataSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.dataSource(this.__dataSource);\\r\\n\\t\\t}\\r\\n\\t\\tif(!window[\\\"nsListMap\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\twindow[\\\"nsListMap\\\"] = {};\\r\\n\\t\\t}\\r\\n\\t\\twindow[\\\"nsListMap\\\"][this.getID()] = this;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__keyDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"keydown\\\",this.__keyDownRef);\\r\\n\\t\\t\\tthis.__keyDownRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__keyUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeEvent(document,\\\"keyup\\\",this.__keyUpRef);\\r\\n\\t\\t\\tthis.__keyUpRef = null;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__scroller)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__scroller.__destroyElements();\\r\\n\\t\\t\\tthis.__scroller = null;\\r\\n\\t\\t}\\r\\n\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.base.componentResized.call(this,event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.expandAll = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableHierarchical)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__expandCollapseAll(false);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.collapseAll = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableHierarchical)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__expandCollapseAll(true);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setContextMenuSetting = function(contextMenuSetting)\\r\\n\\t{\\r\\n\\t\\tthis.__contextMenuSetting = contextMenuSetting;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tvar setting = this.__setting;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableHierarchical\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableHierarchical = Boolean.parse(setting[\\\"enableHierarchical\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableVirtualScroll\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableVirtualScroll = Boolean.parse(setting[\\\"enableVirtualScroll\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableDragDrop\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__enableDragDrop = Boolean.parse(setting[\\\"enableDragDrop\\\"]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"isDraggable\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__isDraggable = Boolean.parse(setting[\\\"isDraggable\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"isDroppable\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__isDroppable = Boolean.parse(setting[\\\"isDroppable\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableDragByHandle\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableDragByHandle = Boolean.parse(setting[\\\"enableDragByHandle\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"dragHandlerClass\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dragHandlerClass = setting[\\\"dragHandlerClass\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableDragAfterHold\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableDragAfterHold = Boolean.parse(setting[\\\"enableDragAfterHold\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"holdTime\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__holdTime = parseInt(setting[\\\"holdTime\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableCloneMode\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableCloneMode = Boolean.parse(setting[\\\"enableCloneMode\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"labelField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__labelField = setting[\\\"labelField\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"itemRenderer\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__itemRenderer = setting[\\\"itemRenderer\\\"];\\r\\n\\t\\t\\t\\tthis.__itemRenderer = this.util.getFunction(this.__itemRenderer);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"template\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__templateID = setting[\\\"template\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"setData\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__setData = setting[\\\"setData\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"labelFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__labelFunction = setting[\\\"labelFunction\\\"];\\r\\n\\t\\t\\t\\tthis.__labelFunction = this.util.getFunction(this.__labelFunction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMultipleSelection\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMultipleSelection =  Boolean.parse(setting[\\\"enableMultipleSelection\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableCustomScrollBar\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableCustomScrollBar =  Boolean.parse(setting[\\\"enableCustomScrollBar\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableKeyboardNavigation\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableKeyboardNavigation =  Boolean.parse(setting[\\\"enableKeyboardNavigation\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMouseHover\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMouseHover =  Boolean.parse(setting[\\\"enableMouseHover\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableMouseHoverAnimation\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableMouseHoverAnimation =  Boolean.parse(setting[\\\"enableMouseHoverAnimation\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"disableHoverField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__disableHoverField = setting[\\\"disableHoverField\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"disableHoverFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__disableHoverFunction = setting[\\\"disableHoverFunction\\\"];\\r\\n\\t\\t\\t\\tthis.__disableHoverFunction = this.util.getFunction(this.__disableHoverFunction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"rowHeight\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__rowHeight =  parseInt(setting[\\\"rowHeight\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"noDataMessage\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__noDataMessage = setting[\\\"noDataMessage\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"dataSource\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__dataSource = setting[\\\"dataSource\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"childField\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__childField = setting[\\\"childField\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableContextMenu\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableContextMenu = Boolean.parse(setting[\\\"enableContextMenu\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"contextMenuProvider\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__contextMenuProvider =  setting[\\\"contextMenuProvider\\\"];\\r\\n\\t\\t\\t\\tthis.__contextMenuProvider = this.util.getFunction(this.__contextMenuProvider);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableVariableRowHeight\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableVariableRowHeight =  Boolean.parse(setting[\\\"enableVariableRowHeight\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"customScrollBarSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__customScrollBarSetting =  setting[\\\"customScrollBarSetting\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__customScrollBarSetting = {enableTooltip: false,toolTipLabelFunction: null,verticalScrollButtons: {enable: false},horizontalScrollButtons:{enable: false}};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"virtualScrollSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__virtualScrollSetting = setting[\\\"virtualScrollSetting\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__virtualScrollSetting = {pageSize: null,pagesRendered: null,enableScrollDelay: false,scrollInterval: null,resizeInterval: null,enableLoader: false,getLoaderComponent: null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.dataSource = function(source)\\r\\n\\t{\\r\\n\\t\\tthis.__dataSource = source;\\r\\n\\t\\tif(this.__listContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeAllChildren(this.__listContainer);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createStructure();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__dataSource && this.__dataSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__orignalItemKey = Object.keys(this.__dataSource[0]);\\r\\n\\t\\t\\tthis.__objGrid.dataSource();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__arrWrapper = [];\\r\\n\\t\\t\\tthis.__arrInternalSource = [];\\r\\n\\t\\t\\tthis.__updateTotalRecords(0);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__renderBody();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getOrignalItem = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item && this.__orignalItemKey && this.__orignalItemKey.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retItem = {};\\r\\n\\t\\t\\tvar key = null;\\r\\n\\t\\t\\tfor(var count = 0;count < this.__orignalItemKey.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tkey = this.__orignalItemKey[count];\\r\\n\\t\\t\\t\\tretItem[key] = item[key];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn retItem;\\r\\n\\t\\t}\\r\\n\\t\\treturn item;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.addItems = function(arrItem)\\r\\n\\t{\\r\\n\\t\\tthis.__addItem(arrItem);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.addItemsAsChildren = function(item,arrChildren)\\r\\n\\t{\\r\\n\\t\\tthis.__objGrid.addItemsAsChildren(item,arrChildren);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.removeItems = function(arrObject)\\r\\n\\t{\\r\\n\\t\\tif(arrObject && arrObject.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrIndex = [];\\r\\n\\t\\t\\tif(this.util.isNumber(arrObject[0]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrIndex = arrObject;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor (var count = 0;count < arrObject.length;count++)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\tvar item = arrObject[count];\\r\\n\\t\\t\\t\\t\\tif(item && item[this.__fieldIndex])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrIndex.push(item[this.__fieldIndex]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tarrIndex.sort();\\r\\n\\t   \\t \\tfor (var rowIndex = arrIndex.length - 1; rowIndex >= 0; rowIndex--)\\r\\n\\t\\t    {\\r\\n\\t   \\t \\t\\tvar index = arrIndex[rowIndex];\\r\\n\\t   \\t \\t\\tif(index > 0 && index < this.__arrInternalSource.length)\\r\\n\\t   \\t \\t\\t{\\r\\n\\t\\t   \\t \\t\\t//if virtual scroll or Pagination of type Page is enabled then do not remove rows\\r\\n\\t\\t   \\t \\t\\tif(!this.__enableVirtualScroll)\\r\\n\\t\\t   \\t \\t\\t{\\r\\n\\t\\t   \\t \\t\\t\\tthis.__listContainer.removeChild(this.__listContainer.childNodes[index]);\\r\\n\\t\\t   \\t \\t\\t}\\r\\n\\t\\t   \\t \\t\\tthis.__arrInternalSource.splice(index, 1);\\r\\n\\t\\t   \\t \\t\\tthis.__arrWrapper.splice(index, 1);\\r\\n\\t   \\t \\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t \\tthis.__updateTotalRecords();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.scrollToIndex = function(selectedIndex,animationRequired)\\r\\n\\t{\\r\\n\\t\\tselectedIndex = parseInt(selectedIndex);\\r\\n\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\tif(selectedIndex > -1 && source && selectedIndex < source.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(selectedIndex);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__enableCustomScrollBar)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar targetDimension = this.__virtualRowHeight * (selectedIndex - 1);\\r\\n\\t\\t\\t\\t\\t\\tthis.__setVirtualScroll_ScrollTop(targetDimension);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t//var item = this.__getVisibleItemByIndex(this.__arrInternalSource,selectedIndex);\\r\\n\\t\\t\\t\\t\\t\\tif(this.__nsVirtualScroll)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t//because in list index is index+1\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__nsVirtualScroll.scrollToIndex(selectedIndex - 1,animationRequired);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item[this.__fieldItem])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar targetDimension = item[this.__fieldItem].offsetTop;\\r\\n\\t\\t\\t\\t\\t\\tvar scrollTarget = this.__divOuterContainer;\\r\\n\\t\\t\\t\\t\\t\\tif(animationRequired)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar animation = new this.util.animation(scrollTarget,[\\r\\n\\t\\t\\t\\t       \\t  \\t    {\\r\\n\\t\\t\\t\\t       \\t  \\t      time: 500,\\r\\n\\t\\t\\t\\t       \\t  \\t      property:\\\"scrollTop\\\",\\r\\n\\t\\t\\t\\t       \\t  \\t      target: targetDimension,\\r\\n\\t\\t\\t\\t       \\t  \\t    }\\r\\n\\t\\t\\t\\t       \\t  \\t]);\\r\\n\\t\\t\\t\\t   \\t  \\t  \\tanimation.animate();\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tscrollTarget.scrollTop = targetDimension;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setSelectedItems = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__clearAllRowSelection(false);\\r\\n\\t\\t\\t\\tvar length = arrItems.length;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = arrItems[count];\\r\\n\\t\\t\\t\\t\\tindex = this.__getIndexByItem(item);\\r\\n\\t\\t\\t\\t\\tif(index > -1 && source && index < source.length)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__setIndex(index,true);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setSelectedItem = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tthis.setSelectedItems([arrItems]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setSelectedIndexes = function(arrSelectedIndex)\\r\\n\\t{\\r\\n\\t\\tif(arrSelectedIndex && arrSelectedIndex.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar length = arrSelectedIndex.length;\\r\\n\\t\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tindex = arrSelectedIndex[count];\\r\\n\\t\\t\\t\\t\\tif(index > -1 && source && index < source.length)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__setIndex(index,true);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.setSelectedIndex = function(selectedIndex)\\r\\n\\t{\\r\\n\\t\\tthis.setSelectedIndexes([selectedIndex]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.unSelectItems = function(arrItems)\\r\\n\\t{\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.unSelectItem = function(arrItems)\\r\\n\\t{\\r\\n\\t\\tthis.unSelectItems([arrItems]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.unSelectIndexes = function(arrSelectedIndex)\\r\\n\\t{\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.unSelectIndex = function(selectedIndex)\\r\\n\\t{\\r\\n\\t\\tthis.unSelectIndexes([selectedIndex]);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getSelectedIndex = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedIndex;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getSelectedItem = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getSelectedIndexes = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedIndexes;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.getSelectedItems = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__selectedItems;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.deselectAll = function()\\r\\n\\t{\\r\\n\\t\\tthis.__clearAllRowSelection(true);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.filter = function(strData,setting,enableHighlighting,recordLimit)\\r\\n\\t{\\r\\n\\t\\tthis.__nsListFilter.filter(strData,setting,enableHighlighting,recordLimit);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.resetFilter = function()\\r\\n\\t{\\r\\n\\t\\tthis.__nsListFilter.reset();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.updateListItemByIndex = function(index)\\r\\n\\t{\\r\\n\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = this.__getListItemFromItem(item);\\r\\n\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = this.__getIndexByItem(item);\\r\\n\\t\\t\\t\\tthis.__updateListItemText(listItem,item,index);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__highlightDiv = function(divText)\\r\\n\\t{\\r\\n\\t\\tthis.__nsListFilter.__highlightDiv(divText);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__initializePluggins = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__objGrid)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableHierarchical)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__objGrid = new NSHierarchicalList(this);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__objGrid = new NSFlatList(this);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__nsListFilter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsListFilter = new NSListFilter(this);\\r\\n\\t\\t\\tif(this.__enableDragDrop)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsListDragDrop = new NSListDragDrop(this);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__nsToolTipInElement = new this.util.nsToolTipInElement();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createStructure = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divOuterContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divOuterContainer = this.util.createDiv(this.getID() + \\\"container\\\",\\\"nsListOuterContainer\\\");\\r\\n\\t\\t\\tif(this.__enableHierarchical)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__divOuterContainer,\\\"nsListOuterContainerHierarchical\\\")\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__divOuterContainer.style.width = this.util.getStyleValue(this.__baseComponent,\\\"width\\\");\\r\\n\\t\\t\\t//this.__divOuterContainer.style.height = this.util.getStyleValue(this.__baseComponent,\\\"height\\\");\\r\\n\\t\\t\\tthis.addChild(this.__divOuterContainer);\\r\\n\\t\\t\\tthis.__divParentContainer = this.util.createDiv(this.getID() + \\\"parentContainer\\\",\\\"nsListParentContainer\\\");\\r\\n\\t\\t\\tthis.__divOuterContainer.appendChild(this.__divParentContainer);\\r\\n\\t\\t\\tthis.__listContainer = this.util.createElement(\\\"ul\\\",this.getID() + \\\"list\\\",\\\"nsListContainer\\\");\\r\\n\\t\\t\\tthis.__listContainer.style.minHeight = (this.__divOuterContainer.clientHeight - 10) + \\\"px\\\";\\r\\n\\t\\t\\tthis.__divParentContainer.appendChild(this.__listContainer);\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__divParentContainer,\\\"nsListBodyContainerVirtual\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__createCustomScroller();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\r\\n\\tNSList.prototype.__renderBody = function()\\r\\n\\t{\\r\\n\\t\\tthis.__navigationIndex = -1;\\r\\n\\t\\tif(this.__enableContextMenu)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__initializeContextMenu();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setNSVirtualScroll(this.__arrInternalSource);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeAllChildren(this.__listContainer);\\r\\n\\t\\t\\tthis.__createList(this.__arrInternalSource,0,this.__arrInternalSource.length);\\r\\n\\t\\t\\t//5 is offset for number of rows\\r\\n\\t\\t\\tvar listItem = this.__getListItemByIndex(0);\\r\\n\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__listItemHeight = listItem.clientHeight;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__pageSize = (this.__divOuterContainer.clientHeight/this.__listItemHeight) - 5;\\r\\n\\t\\t\\tthis.__startArrayElement = 0;\\r\\n\\t\\t}\\r\\n\\t\\t//this.__listContainer.scrollTop = 0;\\r\\n\\t\\tif(this.__nsListDragDrop)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsListDragDrop.initialize();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setNSVirtualScroll = function(source)\\r\\n\\t{\\r\\n\\t\\tvar length = 0;\\r\\n\\t\\tif(source && source.length)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(source[count][this.__fieldItemVisible])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tlength++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__nsVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsVirtualScroll.dataSource(length);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__rowHeight > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__virtualRowHeight = this.__rowHeight;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__createList(this.__arrInternalSource,0,1);\\r\\n\\t\\t\\t\\t\\tvar item = this.__arrInternalSource[0];\\r\\n\\t\\t\\t\\t\\tvar listItem = item[this.__fieldItem];\\r\\n\\t\\t\\t\\t    this.__virtualRowHeight = listItem.offsetHeight;\\r\\n\\t\\t\\t\\t    listItem.parentNode.removeChild(listItem);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar setting = {scrollElement: this.__divOuterContainer,contentElement: this.__listContainer,itemTag: \\\"li\\\",totalLength: length,getItemComponent:this.__getItemComponentForVirtual.call(this),getEmptyItemComponent:this.__getEmptyItemComponentForVirtual.call(this)};\\r\\n\\t\\t\\t\\tvar virtualScrollSetting = this.__virtualScrollSetting;\\r\\n\\t\\t\\t\\tvar arrCopyFields = [\\\"pageSize\\\",\\\"pagesRendered\\\",\\\"enableScrollDelay\\\",\\\"scrollInterval\\\",\\\"resizeInterval\\\",\\\"enableLoader\\\",\\\"getLoaderComponent\\\"];\\r\\n\\t\\t\\t\\tvar field = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrCopyFields.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfield = arrCopyFields[count];\\r\\n\\t\\t\\t\\t\\tif(!this.util.isUndefinedOrNull(virtualScrollSetting[field]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetting[field] = virtualScrollSetting[field];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__nsVirtualScroll = new NSVirtualScroll(setting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getItemComponentForVirtual = function()\\r\\n\\t{\\r\\n\\t\\tvar list = this;\\r\\n\\t\\tvar CreateListItem = function(index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__index = index;\\r\\n\\t\\t\\tthis.__list =  list;\\r\\n\\t\\t\\tthis.__item = null;\\r\\n\\t\\t\\tthis.__listItem = null;\\r\\n\\t\\t};\\r\\n\\t\\tCreateListItem.prototype.getElement = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__list.__enableHierarchical)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__item = this.__list.__getVisibleItemByIndex(null,this.__index);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__item = this.__list.__arrInternalSource[this.__index];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__listItem = this.__list.__createListItem(this.__item,false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn this.__listItem;\\r\\n\\t\\t};\\r\\n\\t\\treturn CreateListItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getEmptyItemComponentForVirtual = function()\\r\\n\\t{\\r\\n\\t\\tvar list = this;\\r\\n\\t\\tvar CreateEmptyListItem = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__list =  list;\\r\\n\\t\\t\\tthis.__listItem = null;\\r\\n\\t\\t};\\r\\n\\t\\tCreateEmptyListItem.prototype.getElement = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__listItem = this.__list.__createNoDataRow.call(this.__list);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn this.__listItem;\\r\\n\\t\\t};\\r\\n\\t\\treturn CreateEmptyListItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createCustomScroller = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableCustomScrollBar && !this.__scroller)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting = {element: this.__divOuterContainer,enableCustomHandler: true,verticalScrollButtons:this.__customScrollBarSetting.verticalScrollButtons,horizontalScrollButtons:this.__customScrollBarSetting.horizontalScrollButtons};\\r\\n\\t\\t\\tfor (var key in setting) \\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\tthis.__scrollerSetting[key] = setting[key]; \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__scroller = new NSScroller(this.__scrollerSetting);\\r\\n\\t\\t\\tthis.util.addEvent(this.__scrollerSetting.element,NSScroller.SCROLLING,this.__customScrollHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(this.__scrollerSetting.element,NSScroller.SCROLL_END,this.__customScrollEndHandler.bind(this));\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__customScrollHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar virtualVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t//todo Virtual Scroll impl for Custom Scroll Bar\\r\\n\\t\\t};\\r\\n\\t\\tvar dataRefreshVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\tvar asyncLoadVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\tvar paginationVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\tvar normalVerHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__divOuterContainer.scrollTop = scrollPos;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar first,last;\\r\\n\\t\\t\\tvar arrRows = self.__listContainer.querySelectorAll(\\\"li\\\");\\r\\n\\t\\t\\tfor(var count = 0;count < arrRows.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar li = arrRows[count];\\r\\n\\t\\t\\t\\tif(isInViewport(li))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfirst = li;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(;count < arrRows.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar li = arrRows[count];\\r\\n\\t\\t\\t\\tif(!isInViewport(li))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tlast = li;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tconsole.log(first,last);\\r\\n\\t\\t};\\r\\n\\t\\tvar normalHorHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__divOuterContainer.scrollLeft = scrollPos;\\r\\n\\t\\t};\\r\\n\\t\\tvar isInViewport = function (elem) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(elem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t/*var distance = elem.getBoundingClientRect();\\r\\n\\t\\t\\t\\treturn (\\r\\n\\t\\t\\t\\t\\tdistance.top >= 0 &&\\r\\n\\t\\t\\t\\t\\tdistance.left >= 0 &&\\r\\n\\t\\t\\t\\t\\tdistance.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\\r\\n\\t\\t\\t\\t\\tdistance.right <= (window.innerWidth || document.documentElement.clientWidth)\\r\\n\\t\\t\\t\\t);*/\\r\\n\\t\\t\\t\\tconst rect = elem.getBoundingClientRect();\\r\\n\\t\\t\\t    const windowHeight = (window.innerHeight || document.documentElement.clientHeight);\\r\\n\\t\\t\\t    const windowWidth = (window.innerWidth || document.documentElement.clientWidth);\\r\\n\\r\\n\\t\\t\\t    const vertInView = (rect.top <= windowHeight) && ((rect.top + rect.height) >= 0);\\r\\n\\t\\t\\t    const horInView = (rect.left <= windowWidth) && ((rect.left + rect.width) >= 0);\\r\\n\\r\\n\\t\\t\\t    return (vertInView && horInView);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\tvar objCondition = {virtualScroll:{eligible:this.__enableVirtualScroll,verHandler:virtualVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tdataRefreshOnEnd:{eligible:this.__enableDataRefreshOnScrollEnd,verHandler:dataRefreshVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tasyncLoad:{eligible:this.__enableAsyncLoadPagination,verHandler:asyncLoadVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tpagination:{eligible:(this.__enablePagination && this.__isPaginationTypeScroll),verHandler:paginationVerHandler,horHandler:normalHorHandler},\\r\\n\\t\\t\\t\\t\\t\\t\\tnormal:{eligible:true,verHandler:normalVerHandler,horHandler:normalHorHandler}\\r\\n\\t\\t\\t\\t\\t\\t   };\\r\\n\\t\\tvar eventItem = event;\\r\\n\\t\\tvar direction = eventItem.direction;\\r\\n\\t\\tvar scrollPos = eventItem.scrollPos;\\r\\n\\t\\tvar oldScrollPos = eventItem.oldScrollPos;\\r\\n\\t\\tvar orignalEvent = eventItem.orignalEvent;\\r\\n\\t\\tvar scrollBar = eventItem.scrollBar;\\r\\n\\t\\tvar position = eventItem.absoluteScrollBarPos;\\r\\n\\t\\tfor(var key in objCondition)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = objCondition[key];\\r\\n\\t\\t\\tif(item.eligible)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(direction == \\\"vertical\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item.verHandler)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(this.__customScrollBarSetting[\\\"enableTooltip\\\"] && !this.__customScrollBarTooltip)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__customScrollBarTooltip = this.util.createElement(\\\"span\\\",null,\\\"tooltiptext tooltip-left\\\");\\r\\n\\t\\t\\t\\t\\t\\t\\tdocument.body.appendChild(this.__customScrollBarTooltip);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\titem.verHandler();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item.horHandler)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem.horHandler();\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__customScrollEndHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.__customScrollBarTooltip)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdocument.body.removeChild(this.__customScrollBarTooltip);\\r\\n\\t\\t\\tthis.__customScrollBarTooltip = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__customScrollTooltipPos = function(scrollbar,position,itemFrom,itemTo)\\r\\n\\t{\\r\\n\\t\\tif(this.__customScrollBarTooltip)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar toolTip = this.__customScrollBarTooltip;\\r\\n\\t\\t\\tvar css = {};\\r\\n\\t\\t\\t//5 for the triangle\\r\\n\\t\\t\\tcss.left = (position.x - toolTip.offsetWidth - 5) + \\\"px\\\";\\r\\n\\t\\t\\tcss.top = position.y + \\\"px\\\";\\r\\n\\t\\t\\tthis.util.css(toolTip,css);\\r\\n\\t\\t\\tif(this.__customScrollBarSetting.toolTipLabelFunction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolTip.innerHTML = this.__customScrollBarSetting.toolTipLabelFunction(itemFrom,itemTo);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolTip.innerHTML = \\\"Showing Record from index \\\" + itemFrom + \\\" to \\\" +  itemTo;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__virtualRowSelection = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__listContainer.children && this.__listContainer.children.length > 0 && this.__arrInternalSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = null;\\r\\n\\t\\t\\tvar index = null;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0; count < this.__listContainer.children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlistItem = this.__listContainer.children[count];\\r\\n\\t\\t\\t\\tindex = this.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\t\\titem = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\tif(item && this.__isMouseHoverAllowed(index))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item[this.__fieldSelected])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t//DONOT REPLACE WITH __markRowSelected\\r\\n\\t\\t\\t\\t\\t\\tthis.util.addStyleClass(listItem,\\\"nsListItemSelected\\\"); \\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t//DONOT REPLACE WITH __markRowUnselected\\r\\n\\t\\t\\t\\t\\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemSelected\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__virtualRowHover = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__listContainer.children && this.__listContainer.children.length > 0 && this.__arrInternalSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = null;\\r\\n\\t\\t\\tvar index = null;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0; count < this.__listContainer.children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlistItem = this.__listContainer.children[count];\\r\\n\\t\\t\\t\\tindex = this.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\t\\titem = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\t(item && item[this.__fieldHover]) ? this.util.addStyleClass(listItem,\\\"nsListItemHover\\\") : this.util.removeStyleClass(listItem,\\\"nsListItemHover\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setVirtualRowHoverField = function(indexToSet)\\r\\n\\t{\\r\\n\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t{\\r\\n\\t\\t\\tindexToSet = -1;\\r\\n\\t\\t}\\r\\n\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\tif(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0; count < source.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__fieldHover] = (item[this.__fieldIndex] === indexToSet); \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setVirtualRowHover = function(indexToSet)\\r\\n\\t{\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tindexToSet = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar item = this.__getVisibleItemByIndex(null,indexToSet);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__navigationIndex = indexToSet;\\r\\n\\t\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\tthis.__setVirtualRowHoverField(index);\\r\\n\\t\\t\\t\\tthis.__virtualRowHover();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setRowHover = function(indexToSet)\\r\\n\\t{\\r\\n\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t{\\r\\n\\t\\t\\tindexToSet = 0;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setVirtualRowHover(indexToSet);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(indexToSet))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tindexToSet = 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__navigationIndex = indexToSet;\\r\\n\\t\\t\\tvar listItem = this.__getListItemFromContainer(this.__navigationIndex);\\r\\n\\t\\t\\tthis.util.addStyleClass(listItem,\\\"nsListItemHover\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createNoDataRow = function()\\r\\n\\t{\\r\\n\\t\\tvar listItem = this.util.createElement(\\\"li\\\",null,\\\"nsListNoRecordsFound\\\");\\r\\n\\t\\tlistItem.setAttribute(\\\"nsNoData\\\",\\\"true\\\");\\r\\n\\t\\tvar textNode = document.createTextNode(this.__noDataMessage);\\r\\n\\t\\tlistItem.appendChild(textNode);\\r\\n\\t\\treturn listItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__addListenerForBody = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__keyDownRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__keyDownRef = this.__keyDownHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"keydown\\\",this.__keyDownRef);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__keyUpRef)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__keyUpRef = this.__keyUpHandler.bind(this);\\r\\n\\t\\t\\tthis.util.addEvent(document,\\\"keyup\\\",this.__keyUpRef);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createList = function(dataSet,startIndex,endIndex)\\r\\n\\t{\\r\\n\\t\\tif(dataSet && dataSet.length > 0)\\r\\n\\t    {\\r\\n\\t\\t\\tthis.__objGrid.__createList(dataSet,startIndex,endIndex);\\r\\n\\t    }\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__listContainer.appendChild(this.__createNoDataRow());\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createListAt = function(item,index,isResetIndex)\\r\\n\\t{\\r\\n\\t\\tif(item && index > -1)\\r\\n\\t    {\\r\\n\\t\\t\\tthis.__updateItem(item,index,true,isResetIndex);\\r\\n\\t\\t\\tvar listItem = this.__createListItem(item,false);\\r\\n\\t\\t\\tthis.__listContainer.insertBefore(listItem, this.__listContainer.childNodes[index]);\\r\\n\\t\\t\\treturn listItem;\\r\\n\\t    }\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateItem = function(item,index,isReset,isResetIndex)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isResetIndex || !item.hasOwnProperty(this.__fieldIndex))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldIndex] = index;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(isReset || !item.hasOwnProperty(this.__fieldDisableHover))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldDisableHover] = this.__isHoverDisabled(item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(isReset || !item.hasOwnProperty(this.__fieldSelected))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldSelected] = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createListItem = function(item,isAdd)\\r\\n\\t{\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\t if(this.util.isUndefined(isAdd) || isAdd === null)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t isAdd = true;\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t var listItem = this.util.createElement(\\\"li\\\",null,\\\"nsListItem\\\");\\r\\n\\t\\t\\t this.__objGrid.__createListItem(listItem,item);\\r\\n\\t\\t\\t if(this.__enableMouseHover)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t this.util.addEvent(listItem,\\\"mouseover\\\",this.__itemMouseOverHandler.bind(this));\\r\\n\\t\\t\\t\\t this.util.addEvent(listItem,\\\"mouseout\\\",this.__itemMouseOutHandler.bind(this));\\r\\n\\t\\t\\t\\t if(this.__enableMouseHoverAnimation)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t this.util.addStyleClass(listItem,\\\"nsListItemAnimated\\\");\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t else\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t this.util.addStyleClass(listItem,\\\"nsListItemNormal\\\");\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t this.util.addEvent(listItem,\\\"click\\\",this.__itemClickHandler.bind(this));\\r\\n\\t\\t\\t this.__setListItemProperties(listItem,item);\\r\\n\\t\\t\\t if(isAdd)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t this.__listContainer.appendChild(listItem);\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t return listItem;\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setListItemProperties = function(listItem,item)\\r\\n\\t{\\r\\n\\t\\tthis.__objGrid.__setListItemProperties(listItem,item);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__addCellText = function(listItem,item,div)\\r\\n\\t{\\r\\n\\t\\tvar toolTipText = null;\\r\\n\\t\\tif(listItem && item && div)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__itemRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objRenderer = this.__itemRenderer(item,this.__labelField,item[this.__fieldIndex],item[this.__fieldDisableHover],listItem);\\r\\n\\t\\t\\t\\tif(objRenderer)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.util.isString(objRenderer))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar compBodySpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\t\\tcompBodySpan.innerHTML = objRenderer;\\r\\n\\t\\t\\t\\t\\t\\tdiv.appendChild(compBodySpan);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdiv.appendChild(objRenderer);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__template)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tdiv.appendChild(this.__template.cloneNode(true));\\r\\n\\t\\t\\t\\tthis.__setDataInTemplateRenderer(div,item,listItem);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__labelFunction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar text = this.__labelFunction(item,this.__labelField);\\r\\n\\t\\t\\t\\tdiv.appendChild(document.createTextNode(text));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(item.hasOwnProperty(this.__labelField) && !this.util.isUndefined(item[this.__labelField]) && item[this.__labelField] != null)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar text = item[this.__labelField];\\r\\n\\t\\t\\t\\tdiv.appendChild(document.createTextNode(text));\\r\\n\\t\\t    }\\r\\n\\t\\t\\tthis.__highlightDiv(div);\\r\\n\\t\\t\\tif(this.__toolTipField)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolTipText = item[this.__toolTipField];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.__toolTipRenderer)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttoolTipText = this.__toolTipRenderer(item,this.__labelField,item[this.__fieldIndex],item[this.__fieldDisableHover],listItem);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableTruncateToFit)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(div,\\\"nsListTruncateToFit\\\");\\r\\n\\t\\t\\t\\t//This condition is above so that toolTip and title are not set togeather\\r\\n\\t\\t\\t\\tif(!toolTipText || toolTipText === \\\"\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__enableToolTipForTruncateText)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\ttoolTipText = div.textContent;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tdiv.setAttribute(\\\"title\\\",div.textContent);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(toolTipText && toolTipText !== \\\"\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsToolTipInElement.addToolTip(div,toolTipText);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setDataInTemplateRenderer = function(cellItem,data,listItem)\\r\\n\\t{\\r\\n\\t\\tif(cellItem && this.__setData)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setRendererProperties(cellItem);\\r\\n\\t\\t\\tthis.__setRendererInData(cellItem,data,listItem);\\r\\n\\t\\t\\t//IE bug\\r\\n\\t\\t\\tcellItem.data = data;\\r\\n\\t\\t\\tif(this.util.isFunction(this.__setData))\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar strParam = \\\"(cellItem,data,dataField,isDisabled,listItem)\\\"; \\r\\n\\t\\t    \\tif(this.util.isString(this.__setData))\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tvar base = this;\\r\\n\\t\\t    \\t\\tthis.util.callFunctionFromString(this.__setData + strParam,function(paramValue){\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"cellItem\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn cellItem;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"data\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn data;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"dataField\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn base.__labelField;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"isDisabled\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn data[base.__fieldDisableHover];\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif(paramValue === \\\"listItem\\\")\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn listItem;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\treturn paramValue;\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\telse\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.__setData(cellItem,data,this.__labelField,data[this.__fieldDisableHover],listItem);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setRendererInData = function(cellItem,data,listItem)\\r\\n\\t{\\r\\n\\t\\tif(cellItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compChild = null;\\r\\n\\t\\t\\tfor(var count = 0; count < cellItem.children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompChild = cellItem.children[count];\\r\\n\\t\\t\\t\\tif(compChild)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompChild.data = data;\\r\\n\\t\\t\\t\\t\\tcompChild.listItem = listItem;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//IE 9 Bug,you got to assign it back\\r\\n\\t\\t\\t\\t//listItem.children[count] = compChild;\\r\\n\\t\\t\\t\\tthis.__setRendererInData(compChild,data,listItem);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setRendererProperties = function(cellItem)\\r\\n\\t{\\r\\n\\t\\tif(cellItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compChild = null;\\r\\n\\t\\t\\tfor(var count = 0; count < cellItem.children.length; count++) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompChild = cellItem.children[count];\\r\\n\\t\\t\\t\\tvar grid = this;\\r\\n\\t\\t\\t\\tArray.prototype.slice.call(compChild.attributes).forEach(function(attribute) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t        if(grid.util.isFunction(attribute.value))\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tvar newValue = attribute.value + \\\"(this)\\\";\\r\\n\\t\\t\\t        \\tcompChild.removeAttribute(attribute.name);\\r\\n\\t\\t\\t\\t\\t\\tcompChild.setAttribute(attribute.name,newValue);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\tif(compChild)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(compChild.hasAttribute(\\\"accessor-name\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcellItem[compChild.getAttribute(\\\"accessor-name\\\")] = compChild;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__setRendererProperties(compChild);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setTemplate = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__templateID)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__template = this.util.getTemplate(this.__templateID);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isHoverDisabled = function(item)\\r\\n\\t{\\r\\n\\t\\tif(this.__disableHoverField)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn Boolean.parse(item[this.__disableHoverField]);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__disableHoverFunction)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn Boolean.parse(this.__disableHoverFunction(item,this.__fieldIndex));\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__itemClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t    var target = this.util.getTarget(event);\\r\\n\\t    target = this.util.findParent(target,\\\"li\\\");\\r\\n\\t    var index = this.__getIndexFromTarget(target);\\r\\n\\t    this.__setIndex(index,false);\\r\\n\\t    this.__lastNavigationDirection = null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setIndex = function(index,isMultiSelect)\\r\\n\\t{\\r\\n\\t\\tif(index > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisMultiSelect = Boolean.parse(isMultiSelect);\\r\\n\\t\\t\\tif (this.__isShiftPressed && this.__enableMultipleSelection)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__multiSectionHandler(index);\\r\\n\\t\\t    }\\r\\n\\t\\t    else if(isMultiSelect || (this.__isCtrlPressed && this.__enableMultipleSelection))\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tif(this.__isRowSelected(index))\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.__markRowUnselected(index);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\telse\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.__markRowSelected(index);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    }\\r\\n\\t\\t    else\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tthis.__clearAllRowSelection(false);\\r\\n\\t\\t    \\tthis.__markRowSelected(index);\\r\\n\\t\\t    } \\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__itemMouseOverHandler = function(event)\\r\\n\\t{\\r\\n\\t\\t var target = this.util.getTarget(event);\\r\\n\\t     target = this.util.findParent(target,\\\"li\\\");\\r\\n\\t     var index = this.__getIndexFromTarget(target);\\r\\n\\t     var item = this.__getItemByIndex(index);\\r\\n\\t     if(target && index > -1 && this.__isMouseHoverAllowed(index))\\r\\n\\t     {\\r\\n\\t    \\t this.util.addStyleClass(target,\\\"nsListItemHover\\\");\\r\\n\\t    \\t this.__navigationIndex = index;\\r\\n\\t    \\t this.util.dispatchEvent(this.__baseComponent,this.ITEM_NAVIGATED,item,{index:this.__navigationIndex});\\r\\n\\t     }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__itemMouseOutHandler = function(event)\\r\\n\\t{\\r\\n\\t\\t var target = this.util.getTarget(event);\\r\\n\\t     target = this.util.findParent(target,\\\"li\\\");\\r\\n\\t     if(target)\\r\\n\\t     {\\r\\n\\t    \\t this.util.removeStyleClass(target,\\\"nsListItemHover\\\");\\r\\n\\t     }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__keyDownHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tif(this.hasFocus())\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isShiftPressed = event.shiftKey;\\r\\n\\t\\t\\tthis.__isCtrlPressed = event.ctrlKey;\\r\\n\\t\\t\\tvar isShiftCtrlPressed = this.__isShiftPressed || this.__isCtrlPressed;\\r\\n\\t\\t\\tvar keyCode = this.util.getKeyUnicode(event);\\r\\n\\t\\t\\tif(this.__enableKeyboardNavigation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar source = this.__objGrid.__getFlatSource();\\r\\n\\t\\t\\t\\t//key Up\\r\\n\\t\\t\\t\\tif(keyCode === this.util.KEYCODE.UP && isShiftCtrlPressed && this.__enableMultipleSelection)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__lastNavigationDirection && this.__lastNavigationDirection === this.NAVIGATION_DOWN)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.NAVIGATION_UP);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(this.__selectedIndex != 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__selectedIndex--;\\r\\n\\t\\t\\t\\t\\t\\tthis.__navigationIndex--;\\r\\n\\t\\t\\t\\t\\t\\twhile(!this.__isMouseHoverAllowed(this.__selectedIndex))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__selectedIndex--;\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__navigationIndex--;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.NAVIGATION_UP);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//key down\\r\\n\\t\\t\\t\\telse if(keyCode === this.util.KEYCODE.DOWN && isShiftCtrlPressed && this.__enableMultipleSelection)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.__lastNavigationDirection && this.__lastNavigationDirection === this.NAVIGATION_UP)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.NAVIGATION_DOWN);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(source && this.__selectedIndex != source.length - 1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__selectedIndex++;\\r\\n\\t\\t\\t\\t\\t\\tthis.__navigationIndex++;\\r\\n\\t\\t\\t\\t\\t\\twhile(!this.__isMouseHoverAllowed(this.__selectedIndex))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__selectedIndex++;\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__navigationIndex++;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardSelectionHandler(event,this.NAVIGATION_DOWN);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(keyCode === this.util.KEYCODE.UP)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(source && this.__navigationIndex === -1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__navigationIndex = source.length - 1;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(this.__navigationIndex > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardNavigationHandler(event,this.NAVIGATION_UP);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(keyCode === this.util.KEYCODE.DOWN)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t/*if(this.__navigationIndex === -1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__navigationIndex = 0;\\r\\n\\t\\t\\t\\t\\t}*/\\r\\n\\t\\t\\t\\t\\tif(source)//&& this.__navigationIndex < source.length\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn this.__keyBoardNavigationHandler(event,this.NAVIGATION_DOWN);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(keyCode === this.util.KEYCODE.ENTER)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__clearAllRowSelection(false);\\r\\n\\t\\t\\t\\t\\tvar listItem = this.__getkeyboardNavigationListItem();\\r\\n\\t\\t\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__markRowSelected(this.__getIndexFromTarget(listItem));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(keyCode === this.util.KEYCODE.SHIFT)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.makeBodyUnselectable();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__keyUpHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tif(this.util.getKeyUnicode(event) === this.util.KEYCODE.CTRL)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isCtrlPressed = false;\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.getKeyUnicode(event) === this.util.KEYCODE.SHIFT)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__isShiftPressed = false;\\r\\n\\t\\t\\tthis.util.makeBodySelectable();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__keyBoardNavigationHandler = function(event,direction)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar lastIndex = this.__navigationIndex;\\r\\n\\t\\tvar currentIndex = this.__navigationIndex;\\r\\n\\t\\t(direction === this.NAVIGATION_UP) ? currentIndex--:currentIndex++;\\r\\n\\t\\twhile(!this.__isMouseHoverAllowed(currentIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\t(direction === this.NAVIGATION_UP) ? currentIndex--:currentIndex++;\\r\\n\\t\\t}\\r\\n\\t\\tvar endHandler = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__navigationIndex = currentIndex;\\r\\n\\t\\t\\tvar listItem = self.__getkeyboardNavigationListItem();\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar source = self.__objGrid.__getFlatSource();\\r\\n\\t\\t\\t\\tindex = self.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\t\\titem = self.__getItemByIndex(index, source);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tself.util.dispatchEvent(self.__baseComponent,self.ITEM_NAVIGATED,item,{index:index});\\r\\n\\t\\t\\tself.__lastNavigationDirection = null;\\r\\n\\t\\t};\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar virtualHandler = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//self.__setVirtualRowHover.call(self,index);\\r\\n\\t\\t\\t\\tvar item = self.__getVisibleItemByIndex.call(self,null,currentIndex);\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar index = item[self.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tself.__setVirtualRowHoverField.call(self,index);\\r\\n\\t\\t\\t\\t\\tself.__virtualRowHover.call(self);\\r\\n\\t\\t\\t\\t\\tendHandler();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tthis.scrollToIndex(currentIndex,false);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tsetTimeout(function()\\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t\\tvirtualHandler();\\r\\n\\t\\t\\t},0);\\r\\n\\t\\t\\t//this.__setVirtualRowHover(currentIndex);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = this.__getListItemFromContainer(lastIndex - this.__startArrayElement);\\r\\n\\t\\t\\tvar currentListItem = this.__getListItemFromContainer(currentIndex - this.__startArrayElement);\\r\\n\\t\\t\\t//var listItem = this.__getListItemByIndex(lastIndex - this.__startArrayElement);\\r\\n\\t\\t\\t//var currentListItem = this.__getListItemByIndex(currentIndex - this.__startArrayElement);\\r\\n\\t\\t\\tif(currentListItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemHover\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(currentListItem,\\\"nsListItemHover\\\");\\r\\n\\t\\t\\t\\tthis.__refreshScrollPosition(currentListItem,direction);\\r\\n\\t\\t\\t\\tendHandler();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tevent.preventDefault();\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__keyBoardSelectionHandler = function(event,direction)\\r\\n\\t{\\r\\n\\t\\tif(this.__isRowSelected(this.__selectedIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__markRowUnselected(this.__selectedIndex);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__markRowSelected(this.__selectedIndex);\\r\\n\\t\\t}\\r\\n\\t\\tif(direction === this.NAVIGATION_DOWN)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.scrollToIndex(this.__selectedIndex,false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(Math.floor(this.__selectedIndex % this.__pageSize) === 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar listItem = this.__getListItemByIndex(this.__selectedIndex);\\r\\n\\t\\t\\t\\tthis.__refreshScrollPosition(listItem,this.NAVIGATION_DOWN);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse if(direction === this.NAVIGATION_UP)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.scrollToIndex(this.__selectedIndex,false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar listItem = this.__getListItemByIndex(this.__selectedIndex);\\r\\n\\t\\t\\t\\tthis.__refreshScrollPosition(listItem,this.NAVIGATION_UP);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__lastNavigationDirection = direction;\\r\\n\\t\\tevent.preventDefault();\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__refreshScrollPosition = function(listItem,direction)\\r\\n\\t{\\r\\n\\t\\tif(!this.__isElementInView(listItem))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__scrollToListItem(listItem);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isElementInView = function(listItem)\\r\\n\\t{\\r\\n\\t\\tvar cellBottom = 0;\\r\\n\\t    var parentBottom = 0;\\r\\n\\t    var cellTop = 0;\\r\\n\\t    var parentTop = 0;\\r\\n\\t\\tif(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar scrollParent = this.__divOuterContainer;\\r\\n\\t\\t\\tvar listChild = listItem.querySelector(\\\".nsListChild\\\");\\r\\n\\t\\t\\tif(scrollParent && listChild)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cellRect = listChild.getBoundingClientRect();\\r\\n\\t            parentTop = 0;\\r\\n\\t            var rectScrollParent = scrollParent.getBoundingClientRect();\\r\\n\\t            parentBottom = rectScrollParent.height;\\r\\n\\t            cellTop =  cellRect.top - rectScrollParent.top;\\r\\n\\t            cellBottom = cellTop + cellRect.height;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn cellBottom <= parentBottom && cellTop >= parentTop;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__scrollToListItem = function(listItem)\\r\\n\\t{\\r\\n\\t\\tif(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rectCell = listItem.getBoundingClientRect();\\r\\n\\t\\t\\tvar rectParentContainer = this.__divParentContainer.getBoundingClientRect();\\r\\n\\t        var scrollTop = rectCell.top - rectParentContainer.top;\\r\\n\\t        this.__divOuterContainer.scrollTop = scrollTop;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getkeyboardNavigationListItem = function()\\r\\n\\t{\\r\\n\\t\\tvar listItem = null;\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem = this.__listContainer.querySelector(\\\".nsListItemHover\\\");\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem = this.__getListItemFromContainer(this.__navigationIndex);\\r\\n\\t\\t}\\r\\n\\t\\treturn listItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isMouseHoverAllowed = function(index)\\r\\n\\t{\\r\\n\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn !item[this.__fieldDisableHover];\\r\\n\\t\\t}\\r\\n\\t\\treturn true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__markRowSelected= function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1)\\r\\n\\t    {\\r\\n\\t        if(!this.__isRowSelected(index))\\r\\n\\t        {\\r\\n\\t        \\tthis.__setMultiSelectedVars(index,true);\\r\\n\\t            this.__setValuesForSelectedRow(index);\\r\\n\\t        \\tif(this.__enableVirtualScroll)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tthis.__virtualRowSelection();\\r\\n\\t        \\t}\\r\\n\\t        \\telse\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tvar listItem = this.__getListItemByIndex(index);\\r\\n\\t            \\tthis.util.addStyleClass(listItem,\\\"nsListItemSelected\\\"); \\r\\n\\t        \\t}\\r\\n\\t        }\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__markRowUnselected = function(index)\\r\\n\\t{\\r\\n\\t    if(this.__isRowSelected(index) && this.__isMouseHoverAllowed(index))\\r\\n\\t    {\\r\\n\\t    \\tvar isUnselected = this.__setMultiSelectedVars(index,false);\\r\\n\\t        if(isUnselected)\\r\\n\\t        {\\r\\n\\t        \\tthis.__setValuesForUnselectedRow(index);\\r\\n\\t        }\\r\\n\\t        if(this.__enableVirtualScroll)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tthis.__virtualRowSelection();\\r\\n\\t    \\t}\\r\\n\\t    \\telse\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tvar listItem = this.__getListItemByIndex(index);\\r\\n\\t    \\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemSelected\\\");\\r\\n\\t    \\t}\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setValuesForSelectedRow = function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1 && this.__isMouseHoverAllowed(index))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldSelected] = true;\\r\\n\\t\\t\\t    this.__selectedIndex = index;\\r\\n\\t\\t\\t    this.__navigationIndex = index;\\r\\n\\t\\t\\t    this.util.dispatchEvent(this.__baseComponent,this.ITEM_SELECTED,item,{index:index});\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setValuesForUnselectedRow = function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1 && this.__isMouseHoverAllowed(index))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldSelected] = false;\\r\\n\\t\\t    \\tthis.util.dispatchEvent(this.__baseComponent,this.ITEM_UNSELECTED,item,{index:index});\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__clearAllRowSelection = function(setIndexVariables)\\r\\n\\t{\\r\\n\\t\\tvar size = this.__selectedIndexes.length;\\r\\n\\t    for (var count = size - 1; count >= 0 ; count--)\\r\\n\\t    {\\r\\n\\t    \\tvar index = this.__selectedIndexes[count];\\r\\n\\t        this.__markRowUnselected(index);\\r\\n\\t    }\\r\\n\\t    this.__setMultiSelectedVars(-1,true);\\r\\n\\t    if(setIndexVariables)\\r\\n\\t    {\\r\\n\\t    \\tthis.__selectedIndex = -1;\\r\\n\\t        this.__navigationIndex = -1;\\r\\n\\t    }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__multiSectionHandler = function(lastIndex)\\r\\n\\t{\\r\\n\\t\\t if(lastIndex < 0)\\r\\n\\t\\t {\\r\\n\\t\\t\\t return;\\r\\n\\t\\t }\\r\\n\\t\\t if (this.__selectedIndexes.length === 0)\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.__isRowSelected(lastIndex);\\r\\n\\t\\t     return;\\r\\n\\t\\t }\\r\\n\\t\\t var firstIndex = this.__selectedIndexes[this.__selectedIndexes.length - 1];\\r\\n\\t\\t if(lastIndex === firstIndex)\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.__markRowUnselected(lastIndex);\\r\\n\\t\\t\\t return;\\r\\n\\t\\t }\\r\\n\\t\\t var isDown = lastIndex > firstIndex;\\r\\n\\t\\t var isSelection = !this.__isRowSelected(lastIndex);\\r\\n\\t\\t var counter = firstIndex;\\r\\n\\t\\t do\\r\\n\\t\\t {\\r\\n\\t\\t\\t  counter = isDown ? (counter + 1) : (counter - 1);\\r\\n\\t\\t\\t  if (isSelection)\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  this.__markRowSelected(counter);\\r\\n\\t\\t\\t  }\\r\\n\\t\\t\\t  else\\r\\n\\t\\t\\t  {\\r\\n\\t\\t\\t\\t  this.__markRowUnselected(counter);\\r\\n\\t\\t\\t  }\\r\\n\\t\\t }\\r\\n\\t\\t while(counter != lastIndex);\\t \\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setMultiSelectedVars = function(index,add)\\r\\n\\t{\\r\\n\\t\\tif(index === -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__selectedItems = [];\\t\\r\\n\\t\\t\\tthis.__selectedIndexes = [];\\t\\r\\n\\t\\t}\\r\\n\\t\\telse if(add)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar data = this.__getItemByIndex(index);\\r\\n\\t\\t\\tthis.__selectedItems.push(data);\\r\\n\\t\\t\\tthis.__selectedIndexes.push(index);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar isUnselected = false;\\r\\n\\t\\t\\tfor (var count= 0; count < this.__selectedIndexes.length ; count++)\\r\\n\\t        {\\r\\n\\t            if (this.__selectedIndexes[count] === index)\\r\\n\\t            {\\r\\n\\t                this.__selectedItems.splice(count,1);\\r\\n\\t                this.__selectedIndexes.splice(count,1);\\r\\n\\t                isUnselected = true;\\r\\n\\t                break;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t\\t\\treturn isUnselected;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\treturn true;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isRowSelected= function(index)\\r\\n\\t{\\r\\n\\t    if(index > -1)\\r\\n\\t    {\\r\\n\\t    \\tvar item = this.__getItemByIndex(index);\\r\\n\\t    \\tif(item)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn item[this.__fieldSelected];\\r\\n\\t    \\t}\\r\\n\\t    }   \\r\\n\\t    return false;\\r\\n\\t};\\r\\n\\t\\r\\n\\t/******************************************************Start of Context Menu*************************************************************/\\r\\n\\tNSList.prototype.__initializeContextMenu = function()\\r\\n\\t{\\r\\n\\t\\t//if(!this.__contextMenu)\\r\\n\\t\\t//{\\r\\n\\t\\t\\tvar contextMenuSetting = {parent:this.__listContainer,isContextMenu:true,createRunTime:true,sourceProvider:this.__getContextMenuDataProvider.bind(this),targetType:\\\"LI\\\"};\\r\\n\\t\\t\\tif(this.__contextMenuSetting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var key in this.__contextMenuSetting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t//grid setting should not be overriden by the users\\r\\n\\t\\t\\t\\t\\tif(!contextMenuSetting[key])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcontextMenuSetting[key] = this.__contextMenuSetting[key];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__contextMenu = new NSMenu(contextMenuSetting);\\r\\n\\t\\t//}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getContextMenuDataProvider = function(listItem)\\r\\n\\t{\\r\\n\\t\\tif(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem = this.util.findParent(listItem,\\\"LI\\\");\\r\\n\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = this.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\tif(item && this.__contextMenuProvider) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn this.__contextMenuProvider(item,index);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t/******************************************************End of Context Menu*************************************************************/\\r\\n\\t/******************************Custom Function *************************************/\\r\\n\\tNSList.prototype.__getIndexFromTarget = function(target)\\r\\n\\t{\\r\\n\\t\\tif(target)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn parseInt(target.getAttribute(\\\"ns-index\\\"));\\r\\n\\t\\t}\\r\\n\\t\\treturn -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getListItemFromItem = function(item)\\r\\n\\t{\\r\\n\\t\\tvar listItem = null;\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem = item[this.__fieldItem];\\r\\n\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t//below case is true if row reference has been removed due to virtual scroll \\r\\n\\t\\t\\tvar listItemRawIndex = this.__getListItemRawIndex(listItem); \\r\\n\\t\\t\\tif(!listItem || listItemRawIndex === -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrListItem = this.__listContainer.querySelectorAll('[ns-index=\\\"' + index + '\\\"]');\\r\\n\\t\\t\\t\\tif(arrListItem && arrListItem.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tlistItem = arrListItem[0];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn listItem;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getListItemByIndex = function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1)\\r\\n\\t    {\\r\\n\\t    \\tvar item = this.__getItemByIndex(index);\\r\\n\\t    \\tif(item)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn item[this.__fieldItem];\\r\\n\\t    \\t}\\r\\n\\t    }   \\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getListItemFromContainer = function(index)\\r\\n\\t{\\r\\n\\t\\tif(this.__listContainer.children.length > index)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__listContainer.children[index];\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getItemByIndex = function(indexToFind,source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__objGrid.__getFlatSource();\\r\\n\\t\\t}\\r\\n\\t\\tif(source && source.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldIndex] === indexToFind)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getIndexByItem = function(itemToFind,source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__objGrid.__getFlatSource();\\r\\n\\t\\t}\\r\\n\\t\\tif(itemToFind && source && source.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldIndex] === itemToFind[this.__fieldIndex])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__addItem = function(arrItem,atIndex)\\r\\n\\t{\\r\\n\\t\\tvar flatSource = this.__objGrid.__getFlatSource();\\r\\n\\t\\tif(this.util.isUndefined(atIndex) || atIndex === null)\\r\\n\\t\\t{\\r\\n\\t\\t\\tatIndex = flatSource.length;\\r\\n\\t\\t}\\r\\n\\t\\tif(arrItem && arrItem.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__listContainer && this.__listContainer.children && this.__listContainer.children.length > 0 && this.__listContainer.children.length < 3)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < this.__listContainer.children.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar listItem = this.__listContainer.children[count];\\r\\n\\t\\t\\t\\t\\tif(listItem.hasAttribute(\\\"nsNoData\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__listContainer.removeChild(listItem);\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__addRemoveRowCallInternal)\\r\\n\\t   \\t \\t{\\r\\n\\t\\t\\t\\tthis.__objGrid.__setWrapperSource(arrItem,atIndex,-1,0,true);\\r\\n\\t   \\t \\t};\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar length = arrItem.length;\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrItem[count];\\r\\n\\t\\t\\t\\tindex = atIndex + count;\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__dataSource.splice(index, 0, item);\\r\\n\\t\\t\\t\\t\\tthis.__arrWrapper.splice(index, 0, item);\\r\\n\\t\\t\\t\\t\\tthis.__arrInternalSource.splice(index, 0, item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t/*flatSource = this.__objGrid.__getFlatSource();\\r\\n\\t\\t\\tthis.__updateSourceIndex(flatSource);*/\\r\\n\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrItem[count];\\r\\n\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__createListAt(item,item[this.__fieldIndex]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__moveItem = function(arrItem,toIndex)\\r\\n\\t{\\r\\n\\t\\tif(arrItem && arrItem.length > 0 && !this.util.isUndefined(toIndex) && toIndex !== null)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar length = arrItem.length;\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t\\tvar fromIndex = -1;\\r\\n\\t\\t\\tvar listContainer = this.__listContainer;\\r\\n\\t\\t\\tvar listItem = null;\\r\\n\\t\\t\\tfor(var count = length - 1;count >= 0;count--)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrItem[count];\\r\\n\\t\\t\\t\\tindex = toIndex + count;\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfromIndex = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tthis.util.moveArrayItem(this.__dataSource,fromIndex,index);\\r\\n\\t\\t\\t\\t\\tthis.util.moveArrayItem(this.__arrWrapper,fromIndex,index);\\r\\n\\t\\t\\t\\t\\tthis.util.moveArrayItem(this.__arrInternalSource,fromIndex,index);\\r\\n\\t\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t// donot use item[this.__fieldItem] for getting listItem as after de-serialization the reference get lost \\r\\n\\t\\t\\t\\t\\t\\t// hence getting the item back from dataSource\\r\\n\\t\\t\\t\\t\\t\\titem = this.__getItemByIndex(fromIndex);\\r\\n\\t\\t\\t\\t\\t\\tlistItem = item[this.__fieldItem];\\r\\n\\t\\t\\t\\t\\t\\tif(listItem)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(listItem.parentNode === listContainer)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tlistContainer.removeChild(listItem);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tindex = (index === 0) ? index : (index - 1);\\r\\n\\t\\t\\t\\t\\t\\t\\tlistContainer.insertBefore(listItem, listContainer.children[index]);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateSourceIndex = function(source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tvar listItem = null;\\r\\n\\t\\tvar length = source.length;\\r\\n\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = source[count];\\r\\n\\t\\t\\tvar index = this.__enableHierarchical ? (count + 1) : count;\\r\\n\\t\\t\\titem[this.__fieldIndex] = index;\\r\\n\\t\\t\\tlistItem = item[this.__fieldItem];\\r\\n\\t\\t\\tif(listItem && this.util.isElementOfType(listItem,\\\"li\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\t\\tvar compArrow = listItem.querySelector(\\\".nsListArrow\\\");\\r\\n\\t\\t\\t\\tif(compArrow)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompArrow.setAttribute(\\\"ns-parent-row-count\\\",index);\\r\\n\\t\\t\\t\\t\\tvar arrowID = this.getID() + \\\"compArrow\\\" + index;\\r\\n\\t\\t\\t\\t\\tcompArrow.setAttribute(\\\"id\\\",arrowID);\\r\\n\\t\\t\\t\\t\\tvar compSvg = compArrow.querySelector(\\\"svg\\\");\\r\\n\\t\\t\\t\\t\\tif(compSvg)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar svgID = arrowID + \\\"svg\\\";\\r\\n\\t\\t\\t\\t\\t\\tcompSvg.setAttribute(\\\"id\\\",svgID);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar compUse = compArrow.querySelector(\\\"use\\\");\\r\\n\\t\\t\\t\\t\\tif(compUse)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar useID = arrowID + \\\"use\\\";\\r\\n\\t\\t\\t\\t\\t\\tcompUse.setAttribute(\\\"id\\\",useID);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__createArrow = function(item,parentRowCount,parentElement,isCollapsed)\\r\\n\\t{\\r\\n\\t\\t if(parentElement)\\r\\n\\t\\t {\\r\\n\\t\\t\\t var cellArrowParent = this.util.createDiv(null,\\\"nsListArrowParent\\\");\\r\\n\\t\\t\\t var arrowID = this.getID() + \\\"compArrow\\\" + parentRowCount;\\r\\n\\t\\t\\t var compArrow = this.util.createDiv(arrowID,\\\"nsListArrow\\\");\\r\\n\\t\\t\\t compArrow.style.paddingTop = \\\"3px\\\";\\r\\n\\t\\t\\t compArrow.setAttribute(\\\"ns-parent-row-count\\\",parentRowCount);\\r\\n\\t\\t\\t \\r\\n\\t\\t\\t var objSVG = new NSSvg();\\r\\n\\t\\t\\t this.__objGrid.__createArrow(compArrow,objSVG,arrowID,isCollapsed);\\r\\n\\t\\t\\t this.util.addEvent(compArrow,\\\"click\\\",this.__arrowClickHandler.bind(this));\\r\\n\\t\\t\\t cellArrowParent.appendChild(compArrow);\\r\\n\\t\\t\\t parentElement.appendChild(cellArrowParent);\\r\\n\\t\\t\\t item[this.__fieldItemArrow] = compArrow;\\r\\n\\t\\t\\t return compArrow;\\r\\n\\t\\t }\\r\\n\\t\\t return null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setArrowDirection = function(compArrow,isCollapsed)\\r\\n\\t{\\r\\n\\t\\tif(compArrow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tvar useID = compArrow.getAttribute(\\\"id\\\") + \\\"use\\\";\\r\\n\\t\\t\\tthis.__objGrid.__setArrowDirection(objSVG,useID,isCollapsed);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__isArrowCollapsed = function(compArrow)\\r\\n\\t{\\r\\n\\t\\tif(compArrow && compArrow.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rowIndex = parseInt(compArrow.getAttribute(\\\"ns-parent-row-count\\\"));\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn item[this.__fieldIsCollapsed];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__arrowClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\ttarget = this.util.findParent(target,\\\"DIV\\\");\\r\\n\\t\\tif(target && target.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rowIndex = target.getAttribute(\\\"ns-parent-row-count\\\");\\r\\n\\t\\t\\tvar isCollapse = this.__isArrowCollapsed(target);\\r\\n\\t\\t\\trowIndex = parseInt(rowIndex);\\r\\n\\t\\t\\tif(rowIndex > -1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\t\\tif(item[this.__childField]  && item[this.__childField].length > 0)\\r\\n\\t\\t        {\\r\\n\\t\\t\\t\\t\\tthis.__showHideRow(rowIndex,target,!isCollapse);\\r\\n\\t\\t        }\\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__objGrid.__handleOnDemandClick(item,event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tevent.stopImmediatePropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__expandCollapseAll = function(isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(!this.__enableVirtualScroll && this.__getTotalListItems() < this.__totalRecords)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.warning(\\\"nsList\\\",\\\"Please let all the items to render.\\\");\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t}\\r\\n\\t\\tvar dataSource = this.__arrInternalSource;\\r\\n\\t\\tif(dataSource && dataSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__expandCollapseAllVirtual(dataSource,isCollapse);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__expandCollapseAllNormal(dataSource,isCollapse);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__expandCollapseAllNormal = function(dataSource,isCollapse)\\r\\n\\t{\\r\\n\\t\\tfor(var count = 0;count < dataSource.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t//setting __fieldIsCollapsed here assuming that __showHideAllArrows() will be called after this function\\r\\n\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\tif(parseInt(item[this.__fieldItemLevel]) > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar row = item[this.__fieldItem];\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__showHideAllArrows(isCollapse);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__expandCollapseAllVirtual = function(dataSource,isCollapse)\\r\\n\\t{\\r\\n\\t\\tfor(var count = 0;count < dataSource.length;count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t//setting __fieldIsCollapsed here assuming that __showHideAllArrows() will be called after this function\\r\\n\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\tif(parseInt(item[this.__fieldItemLevel]) > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.__showHideAllArrows(isCollapse);\\r\\n\\t\\tthis.__updateVisibleIndex(null,0);\\r\\n\\t\\tthis.__setNSVirtualScroll(this.__arrInternalSource);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__showHideRow = function(rowIndex,compArrow,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(rowIndex > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemByIndex(rowIndex);\\r\\n\\t\\t\\tif(!compArrow)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompArrow = this.__getArrow(item[this.__fieldIndex]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar rowLevel = parseInt(item[this.__fieldItemLevel]);\\r\\n\\t\\t\\tvar arrChildItems = [];\\r\\n\\t\\t\\tif(item && item[this.__fieldHasChild])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar startIndex = 0;\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrChildItems = this.__arrInternalSource;\\r\\n\\t\\t\\t\\t\\tstartIndex = rowIndex;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrChildItems = this.__getImmediateChildItems(arrChildItems, item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__showHideRowVirtual(item,arrChildItems,startIndex,rowLevel,isCollapse);\\r\\n\\t\\t\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\t\\t\\t//this.__updateItemInSource(item);\\r\\n\\t\\t\\t\\t\\tthis.__setNSVirtualScroll(this.__arrInternalSource);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__showHideRowNormal(item,arrChildItems,startIndex,rowLevel,isCollapse);\\r\\n\\t\\t\\t\\t\\tthis.__setArrowDirection(compArrow,isCollapse);\\r\\n\\t\\t\\t\\t\\titem[this.__fieldIsCollapsed] = isCollapse;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__showHideRowNormal = function(item,arrChildItems,startIndex,rowLevel,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(arrChildItems && arrChildItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retIndex = this.__getActualIndex(arrChildItems,startIndex);\\r\\n\\t\\t\\t\\tif(retIndex !== startIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstartIndex = (retIndex + 1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar rowItem = null;\\r\\n\\t\\t\\tfor(var count = startIndex;count < arrChildItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowItem = arrChildItems[count];\\r\\n\\t\\t\\t\\tvar row = rowItem[this.__fieldItem];\\r\\n\\t\\t\\t\\tif(!row)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow = this.__createListAt(rowItem,rowItem[this.__fieldIndex] - 1,false);\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItem] = row;\\r\\n\\t\\t\\t\\t\\tthis.__updateSourceIndex();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(rowLevel >= parseInt(rowItem[this.__fieldItemLevel]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"none\\\";\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t\\tif(rowItem[this.__fieldHasChild])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\trowItem[this.__fieldIsCollapsed] = true;\\r\\n\\t\\t\\t\\t\\t\\tif(rowItem[this.__fieldItemArrow])\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar divArrow = rowItem[this.__fieldItemArrow];\\r\\n\\t\\t\\t\\t\\t\\t\\tif(divArrow)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tthis.__setArrowDirection(divArrow,true);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow.style.display = \\\"\\\";\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__showHideRowVirtual = function(item,arrChildItems,startIndex,rowLevel,isCollapse)\\r\\n\\t{\\r\\n\\t\\tif(arrChildItems && arrChildItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retIndex = this.__getActualIndex(arrChildItems,startIndex);\\r\\n\\t\\t\\t\\tif(retIndex !== startIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstartIndex = (retIndex + 1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(var count = startIndex;count < arrChildItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar rowItem = arrChildItems[count];\\r\\n\\t\\t\\t\\tif(isCollapse)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(rowLevel >= parseInt(rowItem[this.__fieldItemLevel]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t\\tif(rowItem[this.__fieldHasChild])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\trowItem[this.__fieldIsCollapsed] = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trowItem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\tthis.__updateVisibleIndex(null,index - 1);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__showHideAllArrows = function(isCollapse)\\r\\n\\t{\\r\\n\\t\\tvar arrDivs = this.__getAllArrows();\\r\\n\\t\\tif(arrDivs && arrDivs.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrDivs.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar div = arrDivs[count];\\r\\n\\t\\t\\t\\tif(div && div.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__setArrowDirection(div,isCollapse);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getAllItems = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__objGrid.__getFlatSource();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateListItemText = function(listItem,item,index)\\r\\n\\t{\\r\\n\\t\\treturn this.__objGrid.__updateListItemText(listItem,item,index);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getImmediateChildItems = function(arrItems,item)\\r\\n\\t{\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = [];\\r\\n\\t\\t}\\r\\n\\t\\tif(item && item[this.__fieldHasChild])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChild = this.__arrInternalSource;\\r\\n\\t\\t\\tvar rowLevel = parseInt(item[this.__fieldItemLevel]);\\r\\n\\t\\t\\tvar startIndex = item[this.__fieldIndex];\\r\\n\\t\\t\\tvar retIndex = this.__getActualIndex(arrChild,startIndex);\\r\\n\\t\\t\\tif(retIndex !== startIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstartIndex = (retIndex + 1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = arrChild.length;\\r\\n\\t\\t\\tfor(var count = startIndex;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar itemChild = arrChild[count];\\r\\n\\t\\t\\t\\tvar childRowLevel = parseInt(itemChild[this.__fieldItemLevel]);\\r\\n\\t\\t\\t\\tif(rowLevel >= childRowLevel)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif((rowLevel + 1) === childRowLevel)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrItems.push(itemChild);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn arrItems;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//generally used for Filter condition\\r\\n\\tNSList.prototype.__getActualIndex = function(arrChild,startIndex,addCompareOne)\\r\\n\\t{\\r\\n\\t\\t//(startIndex + 1) as __fieldIndex starts from 1\\r\\n\\t\\t//if(arrChild && arrChild.length < startIndex || arrChild[startIndex][this.__fieldIndex] !== (startIndex + 1))\\r\\n\\t\\tif(arrChild && arrChild.length > startIndex && arrChild[startIndex][this.__fieldIndex] !== (startIndex + 1))\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compareIndex = startIndex;\\r\\n\\t\\t\\tif(addCompareOne)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompareIndex += 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar rowItem = null;\\r\\n\\t\\t\\tfor(var count = 0;count < arrChild.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowItem = arrChild[count];\\r\\n\\t\\t\\t\\tif(rowItem[this.__fieldIndex] === compareIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn count;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn startIndex;\\r\\n\\t};\\r\\n\\t\\r\\n\\t\\r\\n\\tNSList.prototype.__getAllChildItems = function(arrItems,item)\\r\\n\\t{\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = [];\\r\\n\\t\\t}\\r\\n\\t\\tif(item && item[this.__fieldHasChild])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChild = this.__arrInternalSource;\\r\\n\\t\\t\\tvar rowLevel = parseInt(item[this.__fieldItemLevel]);\\r\\n\\t\\t\\tvar startIndex = item[this.__fieldIndex];\\r\\n\\t\\t\\tvar length = arrChild.length;\\r\\n\\t\\t\\tfor(var count = startIndex;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar itemChild = arrChild[count];\\r\\n\\t\\t\\t\\tif(rowLevel >= parseInt(itemChild[this.__fieldItemLevel]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tarrItems.push(itemChild);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn arrItems;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getAllVisibleItems = function()\\r\\n\\t{\\r\\n\\t\\tvar totalRecords = 0;\\r\\n\\t\\tvar arrItems = this.__getAllItems();\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrItems[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldItemVisible])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttotalRecords += 1;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn totalRecords;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getFirstVisibleItemBeforeIndex = function(itemIndex)\\r\\n\\t{\\r\\n\\t\\tvar arrItems = this.__getAllItems();\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retIndex = this.__getActualIndex(arrItems,itemIndex);\\r\\n\\t\\t\\tif(retIndex !== itemIndex)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titemIndex = (retIndex + 1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(var count = itemIndex;count >= 0;count--)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = arrItems[count];\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldItemVisible] && item[this.__fieldVisibleIndex] > -1)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getVisibleItemByIndex = function(source,index)\\r\\n\\t{\\r\\n\\t\\tvar arrItems = source;\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this; \\r\\n\\t\\t\\tvar findItem = function(itemCompare)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t return (itemCompare[self.__fieldVisibleIndex] === (index + 1));\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\treturn arrItems.find(findItem);\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateVisibleIndex = function(source,fromIndex)\\r\\n\\t{\\r\\n\\t\\tvar arrItems = source;\\r\\n\\t\\tif(!arrItems)\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrItems = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tif(this.util.isUndefinedOrNull(fromIndex))\\r\\n\\t\\t{\\r\\n\\t\\t\\tfromIndex = 0;\\r\\n\\t\\t}\\r\\n\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar visibleRowIndex = 1;\\r\\n\\t\\t\\tif(fromIndex > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar visibleItem = this.__getFirstVisibleItemBeforeIndex(fromIndex);\\r\\n\\t\\t\\t\\tif(visibleItem)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvisibleRowIndex = visibleItem[this.__fieldVisibleIndex];\\r\\n\\t\\t\\t\\t\\tfromIndex = visibleItem[this.__fieldIndex] - 1;\\r\\n\\t\\t\\t\\t\\tvar retIndex = this.__getActualIndex(arrItems,fromIndex,true);\\r\\n\\t\\t\\t\\t\\tif(retIndex !== fromIndex)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tfromIndex = retIndex;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = arrItems.length;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = fromIndex; count < length; count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrItems[count];\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(item[this.__fieldItemVisible])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = visibleRowIndex;\\r\\n\\t\\t\\t\\t\\t\\tvisibleRowIndex++;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = -1;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateVisibleIndexByListItem = function(source,arrAllItems)\\r\\n\\t{\\r\\n\\t\\tif(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItems = arrAllItems;\\r\\n\\t\\t\\tif(!arrItems)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrItems = this.__getAllItems();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar length = source.length;\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar objVisibleIndex = {};\\r\\n\\t\\t\\tfor(var count = 0; count < length; count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tobjVisibleIndex[index] = \\\"NSList\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(arrItems && arrItems.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tlength = arrItems.length;\\r\\n\\t\\t\\t\\titem = null;\\r\\n\\t\\t\\t\\tvar visibleRowIndex = 1;\\r\\n\\t\\t\\t\\tfor(var count = 0; count < length; count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = arrItems[count];\\r\\n\\t\\t\\t\\t\\tvar index = item[this.__fieldIndex];\\r\\n\\t\\t\\t\\t\\tif(this.util.isUndefinedOrNull(objVisibleIndex[index]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = -1;\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldVisibleIndex] = visibleRowIndex;\\r\\n\\t\\t\\t\\t\\t\\titem[this.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t\\t\\tvisibleRowIndex++;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateIndexForAllItems = function(source)\\r\\n\\t{\\r\\n\\t\\tif(!source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsource = this.__getAllItems();\\r\\n\\t\\t}\\r\\n\\t\\tvar length = source.length;\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tfor(var count = 0; count < length; count++)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = source[count];\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem[this.__fieldIndex] = count;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getArrow = function(rowCount)\\r\\n\\t{\\r\\n\\t\\tvar arrDivs = this.__getAllArrows();\\r\\n\\t\\tif(arrDivs && arrDivs.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < arrDivs.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar div = arrDivs[count];\\r\\n\\t\\t\\t\\tif(div && div.hasAttribute(\\\"ns-parent-row-count\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar rowParentCount = div.getAttribute(\\\"ns-parent-row-count\\\");\\r\\n\\t\\t\\t\\t\\tif(rowParentCount && rowParentCount == rowCount)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn div;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getAllArrows = function(divParent)\\r\\n\\t{\\r\\n\\t\\tif(!divParent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdivParent = this.__listContainer;\\r\\n\\t\\t}\\r\\n\\t\\treturn divParent.querySelectorAll(\\\".nsListArrow\\\");\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getTotalListItems = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__listContainer && this.__listContainer.children)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__listContainer.children.length;\\r\\n\\t\\t}\\r\\n\\t\\treturn 0;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__updateTotalRecords = function(totalCount)\\r\\n\\t{\\r\\n\\t\\tif(this.util.isUndefined(totalCount) || totalCount === null)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttotalCount = this.__arrInternalSource.length; \\r\\n\\t\\t}\\r\\n\\t\\tthis.__totalRecords = totalCount;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__getListItemRawIndex = function(listItem)\\r\\n\\t{\\r\\n\\t\\tif(listItem && listItem.parentNode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar index = [].slice.call(listItem.parentNode.children).indexOf(listItem);\\r\\n\\t\\t\\treturn index;\\r\\n\\t\\t}\\r\\n\\t\\treturn -1;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__checkForVirtualMode = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__enablePagination)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableVirtualScroll = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSList.prototype.__setVirtualScroll_ScrollTop = function(scrollTop)\\r\\n\\t{\\r\\n\\t\\tif(this.__enableCustomScrollBar)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__scroller)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__scroller.setScrollTop(scrollTop);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar NSFlatList = function(nsList)\\r\\n\\t{\\r\\n\\t\\tthis.__nsList = nsList;\\r\\n\\t\\tthis.util = nsList.util;\\r\\n\\t\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.dataSource = function(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsList.__arrWrapper = this.__nsList.__dataSource.slice(0);\\r\\n\\t\\t\\tthis.__setWrapperSource(this.__nsList.__arrWrapper,0,-1,0,true);\\r\\n\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrWrapper.slice(0);\\r\\n\\t\\t\\tthis.__nsList.__updateTotalRecords();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.addItemsAsChildren = function(item,arrChildren)\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setWrapperSource = function(source,offset,parentIndex,level,setFieldIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!offset)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\toffset = 0;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar length = source.length;\\r\\n\\t\\t\\t\\tvar count = 0;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tvar index = -1; \\r\\n\\t\\t\\t\\tfor (count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\tindex = offset + count;\\r\\n\\t\\t\\t\\t\\tthis.__setItemProperty(item,index,setFieldIndex);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__createList= function(dataSet,startIndex,endIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t    for(var count = startIndex; count < endIndex; count++)\\r\\n\\t\\t     {\\r\\n\\t    \\t\\titem = dataSet[count];\\r\\n\\t    \\t\\tindex =  item[this.__nsList.__fieldIndex];\\r\\n\\t    \\t\\tthis.__nsList.__updateItem(item,index);\\r\\n\\t    \\t\\tthis.__nsList.__createListItem(item);\\r\\n\\t\\t     }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createListItem = function(listItem,item)\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__addSVGInPage = function()\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__setListItemProperties = function(listItem,item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(listItem && item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = item[this.__nsList.__fieldIndex];\\r\\n\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldItem] = listItem;\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(listItem);\\r\\n\\t\\t\\t\\tvar divCell = this.util.createDiv(null,\\\"nsListChild\\\");\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(divCell,this.__nsList.__CLASS_CELL_CHILD);\\r\\n\\t\\t\\t\\tlistItem.appendChild(divCell);\\r\\n\\t\\t\\t\\tthis.__nsList.__addCellText(listItem,item,divCell);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__updateListItemText = function(listItem,item,index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(listItem && item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(listItem);\\r\\n\\t\\t\\t\\tthis.__setListItemProperties(listItem,item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__getFlatSource= function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__nsList.__arrWrapper;\\r\\n\\t\\t};\\r\\n\\t\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\t\\tthis.__setItemProperty = function(item,rowIndex,setFieldIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(setFieldIndex)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldIndex] = rowIndex;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldVisibleIndex] = rowIndex + 1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__resetListItem = function(listItem,index,item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem.style.display = \\\"\\\";\\r\\n\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemSelected\\\");\\r\\n\\t\\t\\tthis.__nsList.__updateItem(item,index);\\r\\n\\t\\t\\tthis.__setListItemProperties(listItem,item);\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar NSHierarchicalList = function(nsList)\\r\\n\\t{\\r\\n\\t\\tthis.__nsList = nsList;\\r\\n\\t\\tthis.util = nsList.util;\\r\\n\\t\\tthis.__ARROW_COLLAPSE_PATH = \\\"M 0 9.99994L 6.10352e-005 -3.05176e-005L 5 5.00006L 0 9.99994 Z\\\";\\r\\n\\t\\tthis.__ARROW_EXPANDED_PATH = \\\"M 0 3.05176e-005L 9.99994 9.15527e-005L 4.99988 5.00003L 0 3.05176e-005 Z\\\";\\r\\n\\t\\tthis.__CLASS_ARROW = \\\"nsListArrowFill\\\";\\r\\n\\t\\tthis.__rowCounter = -1;\\r\\n\\t\\tthis.__enableOnDemandHierarchy = false;\\r\\n\\t\\tthis.__onDemandChildDetectionField = \\\"hasChildren\\\";\\r\\n\\t\\tthis.__onDemandChildFetchCallback = null;\\r\\n\\t\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting = this.__nsList.__setting;\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"enableOnDemandHierarchy\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__enableOnDemandHierarchy = Boolean.parse(setting[\\\"enableOnDemandHierarchy\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__enableOnDemandHierarchy)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(setting.hasOwnProperty(\\\"onDemandChildDetectionField\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__onDemandChildDetectionField = setting[\\\"onDemandChildDetectionField\\\"];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(setting.hasOwnProperty(\\\"onDemandChildFetchCallback\\\"))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__onDemandChildFetchCallback = setting[\\\"onDemandChildFetchCallback\\\"];\\r\\n\\t\\t\\t\\t\\tthis.__onDemandChildFetchCallback = this.util.getFunction(this.__onDemandChildFetchCallback);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__onDemandChildDetectionField)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.throwNSError(\\\"NSList\\\",\\\"Value for onDemandChildDetectionField is not valid\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__onDemandChildFetchCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.throwNSError(\\\"NSList\\\",\\\"Value for onDemandChildFetchCallback is not valid\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__enableVirtualScroll)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.warning(\\\"NSList\\\",\\\"As enableVirtualScroll is true so OnDemandHierarchy will have no impact.\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.dataSource = function(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsList.__arrWrapper = this.__nsList.__dataSource.slice(0);\\r\\n\\t\\t\\tthis.__setWrapperSource(this.__nsList.__arrWrapper,0,-1,0,true,true,true);\\r\\n\\t\\t\\tthis.__nsList.__updateTotalRecords(this.__rowCounter);\\r\\n\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrFlatHierarchicalSource.slice(0);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.addItemsAsChildren = function(item,arrChildren)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item && arrChildren && arrChildren.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!item[this.__nsList.__childField])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__childField] = [];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem[this.__nsList.__childField].push.apply(item[this.__nsList.__childField], arrChildren);\\r\\n\\t\\t\\t\\tthis.__setWrapperSource(this.__nsList.__arrWrapper,0,-1,0,true,false,false);\\r\\n\\t\\t\\t\\tthis.__nsList.__updateTotalRecords(this.__rowCounter);\\r\\n\\t\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrFlatHierarchicalSource.slice(0);\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldIsCollapsed] = false;\\r\\n\\t\\t   \\t\\tvar listItem = this.__nsList.__getListItemFromItem(item);\\r\\n\\t\\t   \\t\\tvar rowIndex = this.__nsList.__getIndexByItem(item);\\r\\n\\t\\t   \\t\\tthis.__nsList.__showHideRow(rowIndex,null,false);\\r\\n\\t\\t   \\t\\tconsole.log(this.__nsList.__arrFlatHierarchicalSource);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setWrapperSource = function(source,offset,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(level === 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(!offset)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\toffset = 0;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tthis.__nsList.__arrFlatHierarchicalSource = [];\\r\\n\\t\\t\\t\\t\\tthis.__rowCounter = offset;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar length = source.length;\\r\\n\\t\\t\\t\\tvar count = 0;\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tfor (count = 0; count < length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\tthis.__rowCounter++;\\r\\n\\t\\t\\t\\t\\tthis.__nsList.__arrFlatHierarchicalSource.push(item);\\r\\n\\t\\t\\t\\t\\tthis.__setItemProperty(item,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__createList= function(dataSet,startIndex,endIndex)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tvar index = -1;\\r\\n\\t\\t    for(var count = startIndex; count < endIndex; count++)\\r\\n\\t\\t    {\\r\\n\\t    \\t\\titem = dataSet[count];\\r\\n\\t    \\t\\tif(item)\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tindex =  item[this.__nsList.__fieldIndex];\\r\\n\\t        \\t\\tthis.__nsList.__updateItem(item,index);\\r\\n\\t        \\t\\tthis.__nsList.__createListItem(item);\\r\\n\\t    \\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createListItem = function(listItem,item)\\r\\n\\t\\t{\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__addSVGInPage = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objSVG = new NSSvg();\\r\\n\\t\\t\\tobjSVG.addPath(\\\"svgListArrowDown\\\",this.__ARROW_EXPANDED_PATH,\\\"0 0 16 16\\\");\\r\\n\\t\\t\\tobjSVG.addPath(\\\"svgListArrowRight\\\",this.__ARROW_COLLAPSE_PATH,\\\"0 0 16 16\\\");\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__setListItemProperties = function(listItem,item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(listItem && item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = item[this.__nsList.__fieldIndex];\\r\\n\\t\\t\\t\\tvar level = item[this.__nsList.__fieldItemLevel];\\r\\n\\t\\t\\t\\tvar parentIndex = item[this.__nsList.__fieldParentIndex];\\r\\n\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-level\\\",level);\\r\\n\\t\\t\\t\\tif(item[this.__nsList.__fieldHasParent])\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\tlistItem.setAttribute(\\\"ns-parent-index\\\",parentIndex);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldItem] = listItem;\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(listItem);\\r\\n\\t\\t\\t\\tvar divCell = this.util.createDiv(null,\\\"nsListChild\\\");\\r\\n\\t\\t\\t\\tlistItem.appendChild(divCell);\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tvar hierarchicalPadding = 0;\\r\\n\\t\\t\\t\\tvar divText = null;\\r\\n\\t\\t\\t\\tif(item && item.hasOwnProperty(this.__nsList.__labelField) && item[this.__nsList.__labelField])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t        if((item[this.__nsList.__childField]  && item[this.__nsList.__childField].length > 0) || (this.__isOnDemandHasChildren(item)))\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tthis.util.addStyleClass(divCell,this.__nsList.__CLASS_GROUP_CELL);\\r\\n\\t\\t\\t        \\tthis.__nsList.__createArrow(item,index,divCell,item[this.__nsList.__fieldIsCollapsed]);\\r\\n\\t\\t\\t        \\tvar cellText = this.util.createDiv(null,this.__nsList.__CLASS_CELL_CHILD);\\r\\n\\t\\t\\t        \\tthis.util.addStyleClass(cellText,\\\"nsListGroupCellText\\\");\\r\\n\\t\\t\\t        \\tcellText.style.verticalAlign = \\\"top\\\";\\r\\n\\t\\t\\t        \\tdivText = cellText;\\r\\n\\t\\t\\t        \\tdivCell.appendChild(cellText);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        else\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\tthis.util.addStyleClass(divCell,this.__nsList.__CLASS_CELL_CHILD);\\r\\n\\t\\t\\t        \\tdivText = divCell;\\r\\n\\t\\t\\t        \\t//24 = 16(Arrow Width) + 6(Arrow Parent Padding) + 2(divCell horizontalGap between elements shown in debugger)\\r\\n\\t\\t\\t        \\thierarchicalPadding = 24;\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t        this.__nsList.__addCellText(listItem,item,divText);\\r\\n\\t\\t        \\tif(level === 0)\\r\\n\\t\\t        \\t{\\r\\n\\t\\t        \\t\\tlistItem.style.paddingLeft = \\\"1px\\\";\\r\\n\\t\\t        \\t}\\r\\n\\t\\t        \\telse\\r\\n\\t\\t        \\t{\\r\\n\\t\\t        \\t\\tvar paddingLeft = (10 * level) + hierarchicalPadding;\\r\\n\\t\\t        \\t\\tlistItem.style.paddingLeft = paddingLeft + \\\"px\\\";\\r\\n\\t\\t        \\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__updateListItemText = function(listItem,item,index)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(listItem && item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeAllChildren(listItem);\\r\\n\\t\\t\\t\\tthis.__setListItemProperties(listItem,item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__getFlatSource= function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__nsList.__arrFlatHierarchicalSource;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleOnDemandClick = function(item,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item && this.__isOnDemandHasChildren(item))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__onDemandChildFetchCallback)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\t\\tvar rowLevel = item[this.__nsList.__fieldItemLevel];\\r\\n\\t\\t\\t\\t\\tvar rowIndex = this.__nsList.__getIndexByItem(item);\\r\\n\\t\\t\\t\\t\\tthis.__onDemandChildFetchCallback(item,rowIndex,rowLevel,event);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t/********************************Common Functions for Grid ****************************************/\\r\\n\\t\\tthis.__setItemProperty = function(item,parentIndex,level,setFieldIndex,setIsCollapsed,setItemVisible)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isUndefinedOrNull(setIsCollapsed))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsetIsCollapsed = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.util.isUndefinedOrNull(setItemVisible))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tsetItemVisible = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar totalRowCount = this.__rowCounter;\\r\\n\\t\\t\\t\\tif(setFieldIndex || this.util.isUndefinedOrNull(item[this.__nsList.__fieldIndex]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldIndex] = totalRowCount;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldVisibleIndex] = totalRowCount;\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldItemLevel] = level;\\r\\n\\t\\t\\t\\tvar hasChild = false;\\r\\n\\t\\t\\t\\tif(item.hasOwnProperty(this.__nsList.__childField) && item[this.__nsList.__childField] && item[this.__nsList.__childField].length > 0)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\thasChild = true;\\r\\n\\t\\t\\t    \\tthis.__setWrapperSource(item[this.__nsList.__childField],0,totalRowCount,level + 1,setFieldIndex,setIsCollapsed,setItemVisible);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldParentIndex] = parentIndex;\\r\\n\\t\\t\\t\\tif(parentIndex > -1)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldHasParent] = true;\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldHasParent] = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\titem[this.__nsList.__fieldHasChild] = hasChild;\\r\\n\\t\\t\\t\\tif(setItemVisible || this.util.isUndefinedOrNull(item[this.__nsList.__fieldItemVisible]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldItemVisible] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(setIsCollapsed || this.util.isUndefinedOrNull(item[this.__nsList.__fieldIsCollapsed]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[this.__nsList.__fieldIsCollapsed] = this.__isOnDemandHasChildren(item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createArrow = function(compArrow,objSVG,arrowID,isCollapsed)\\r\\n\\t\\t{\\r\\n\\t\\t\\t var svg = objSVG.addSVG(compArrow,arrowID + \\\"svg\\\",this.__CLASS_ARROW,null,null,null,null,null,null,true);\\r\\n\\t\\t\\t if(isCollapsed)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t objSVG.addUse(svg,arrowID + \\\"use\\\",null,\\\"#svgListArrowRight\\\");\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t else\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t objSVG.addUse(svg,arrowID + \\\"use\\\",null,\\\"#svgListArrowDown\\\");\\r\\n\\t\\t\\t }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__setArrowDirection = function(objSVG,useID,isCollapsed)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(isCollapsed)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#svgListArrowRight\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjSVG.changeUseHref(useID,\\\"#svgListArrowDown\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__resetListItem = function(listItem,index,item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tlistItem.style.display = \\\"\\\";\\r\\n\\t\\t\\tlistItem.setAttribute(\\\"ns-index\\\",index);\\r\\n\\t\\t\\tthis.util.removeStyleClass(listItem,\\\"nsListItemSelected\\\");\\r\\n\\t\\t\\tthis.__nsList.__updateItem(item,index);\\r\\n\\t\\t\\tthis.__setListItemProperties(listItem,item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isOnDemandHasChildren = function(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn (this.__enableOnDemandHierarchy && item[this.__onDemandChildDetectionField]);\\r\\n\\t\\t};\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar NSListFilter = function(nsList)\\r\\n\\t{\\r\\n\\t\\tthis.__nsList = nsList;\\r\\n\\t\\t\\r\\n\\t\\tthis.util = nsList.util;\\r\\n\\t\\tthis.__filteredColumn = [];\\r\\n\\t\\tthis.__config = {};\\r\\n\\t\\tthis.__nsDragDrop = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.filter = function(strData,filterSetting,enableHighlighting,recordLimit)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!filterSetting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfilterSetting = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(enableHighlighting))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tenableHighlighting = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar config = {\\r\\n\\t\\t\\t\\t\\tcaseSensitive: this.util.isUndefinedOrNull(filterSetting[\\\"caseSensitive\\\"]) ? false : Boolean.parse(filterSetting[\\\"caseSensitive\\\"]),\\r\\n\\t\\t\\t\\t\\tmultiline: this.util.isUndefinedOrNull(filterSetting[\\\"multiline\\\"]) ? false : Boolean.parse(filterSetting[\\\"multiline\\\"]),\\r\\n\\t\\t\\t\\t\\tmatchType: filterSetting[\\\"matchType\\\"] || new NSFilter().CONTAINS\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar filter = {};\\r\\n\\t\\t\\tvar setting = {};\\r\\n\\t\\t\\tvar field = this.__nsList.__labelField;\\r\\n\\t\\t\\tfilter[field] = strData;\\r\\n\\t\\t\\tsetting[field] = {caseSensitive:config[\\\"caseSensitive\\\"],multiline:config[\\\"multiline\\\"],matchType:config[\\\"matchType\\\"]};\\r\\n\\t\\t\\tif(filter && Object.keys(filter).length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__handleFiltering(filter,setting,enableHighlighting,recordLimit);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__resetFiltering();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.reset = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__resetFiltering();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleFiltering = function(filter,setting,enableHighlighting,recordLimit)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__filteredColumn = [];\\r\\n\\t\\t\\tif(filter)\\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\t var field = this.__nsList.__labelField;\\r\\n\\t\\t\\t\\t var source = this.__nsList.__arrWrapper;\\r\\n\\t\\t\\t\\t var isHierarchical = false;\\r\\n\\t\\t\\t\\t if(this.__nsList.__enableHierarchical)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t isHierarchical = true;\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t   \\t var nsFilter = new NSFilter(source,filter,setting,recordLimit,isHierarchical,this.__nsList.__childField);\\r\\n\\t\\t\\t   \\t this.__nsList.__arrInternalSource = nsFilter.execute();\\r\\n\\t\\t\\t   \\t if(enableHighlighting)\\r\\n\\t\\t\\t   \\t {\\r\\n\\t\\t\\t   \\t\\tfor(var key in filter) \\r\\n\\t\\t  \\t        {\\r\\n\\t\\t  \\t        \\tthis.__filteredColumn.push({field:key,text:filter[key]});\\r\\n\\t\\t  \\t        }\\r\\n\\t\\t\\t   \\t }\\r\\n\\t\\t\\t   \\t if(isHierarchical)\\r\\n\\t\\t\\t   \\t {\\r\\n\\t\\t\\t   \\t\\tthis.__nsList.__objGrid.__setWrapperSource(this.__nsList.__arrInternalSource,0,-1,0,false);\\r\\n\\t\\t\\t   \\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrFlatHierarchicalSource.slice(0); \\r\\n\\t\\t\\t   \\t }\\r\\n\\t\\t\\t   \\t this.__nsList.__updateTotalRecords();\\r\\n\\t\\t\\t   \\t this.__nsList.__renderBody();\\r\\n\\t\\t\\t   \\t this.__nsList.__updateVisibleIndexByListItem(this.__nsList.__arrInternalSource);\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__resetFiltering = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__nsList.__dataSource)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrWrapper.slice(0);\\r\\n\\t\\t\\t\\tthis.__filteredColumn = [];\\r\\n\\t\\t\\t\\tif(this.__nsList.__enableHierarchical)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__nsList.__objGrid.__setWrapperSource(this.__nsList.__arrInternalSource,0,-1,0,false);\\r\\n\\t\\t\\t\\t\\tthis.__nsList.__arrInternalSource = this.__nsList.__arrFlatHierarchicalSource.slice(0); \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__nsList.__updateTotalRecords();\\r\\n\\t\\t\\t\\tthis.__nsList.__renderBody();\\r\\n\\t\\t\\t\\tthis.__nsList.__updateVisibleIndexByListItem(this.__nsList.__arrInternalSource);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\tthis.__highlightDiv = function(divText)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar length = this.__filteredColumn.length;\\r\\n\\t\\t\\tfor (var count = 0; count < length; count++) \\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar text = this.__filteredColumn[count].text;\\r\\n\\t\\t\\t\\tthis.util.highlightText(divText,text,\\\"nsTextHighlight\\\");\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\tvar NSListDragDrop = function(nsList)\\r\\n\\t{\\r\\n\\t\\tthis.__nsList = nsList;\\r\\n\\t\\tthis.util = nsList.util;\\r\\n\\t\\t\\r\\n\\t\\tthis.__disableDraggableFunction = null;\\r\\n\\t\\tthis.__disableDropableFunction = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar container = this.__nsList.__listContainer;\\r\\n\\t\\t\\tvar setting = {container:container,childNodeType:\\\"LI\\\",isContainerDraggable:this.__nsList.__isDraggable,isContainerDroppable:this.__nsList.__isDroppable,\\r\\n\\t\\t\\t\\t\\t\\t   enableDragByHandle:this.__nsList.__enableDragByHandle,dragHandlerClass:this.__nsList.__dragHandlerClass,\\r\\n\\t\\t\\t\\t\\t\\t   enableDragAfterHold:this.__nsList.__enableDragAfterHold,enableCloneMode:this.__nsList.__enableCloneMode,holdTime:this.__nsList.__holdTime,createCloneCallback:this.__createClone.bind(this),\\r\\n\\t\\t\\t\\t\\t\\t   createPlaceholderCallback:this.__createPlaceholder.bind(this),nodeDroppableCallback:this.__isListItemDroppable.bind(this),\\r\\n\\t\\t\\t\\t\\t\\t   nodeDraggableCallback:this.__isListItemDraggable.bind(this),insertNodeCallback:this.__insertListItemHandler.bind(this),\\r\\n\\t\\t\\t\\t\\t\\t   moveNodeCallback:this.__moveListItemHandler.bind(this),removeNodeCallback:this.__removeListItemHandler.bind(this)};\\r\\n\\t\\t\\tthis.__nsDragDrop = new NSDragDrop(setting);\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.ITEM_DROPPING,this.__itemDroppingHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.ITEM_DROPPED,this.__itemDroppedHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.DRAG_STARTING,this.__dragStartingHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.DRAG_STARTED,this.__dragStartHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.DRAGGING,this.__draggingHandler.bind(this));\\r\\n\\t\\t\\tthis.util.addEvent(container,this.__nsDragDrop.DRAG_END,this.__dragEndHandler.bind(this));\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar setting = this.__nsList.__setting;\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"disableDraggableFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__disableDraggableFunction = setting[\\\"disableDraggableFunction\\\"];\\r\\n\\t\\t\\t\\tthis.__disableDraggableFunction = this.util.getFunction(this.__disableDraggableFunction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"disableDropableFunction\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__disableDropableFunction = setting[\\\"disableDropableFunction\\\"];\\r\\n\\t\\t\\t\\tthis.__disableDropableFunction = this.util.getFunction(this.__disableDropableFunction);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dragStartingHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = event.node;\\r\\n\\t\\t\\tvar arrItems = this.__getSelectedItems(listItem);\\r\\n\\t\\t\\tvar data = {parentID:this.__nsList.__listContainer.getAttribute(\\\"id\\\"),arrItems:arrItems};\\r\\n\\t\\t\\tthis.__nsDragDrop.setDragData(data);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dragStartHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = event.node;\\r\\n\\t\\t\\tvar data = this.__nsDragDrop.getDragData();\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.DRAG_STARTED,arrItems,{items:arrItems});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__draggingHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listData = event.item;\\r\\n\\t\\t\\tvar data = this.__nsDragDrop.getDragData();\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tlistData.arrItems = arrItems;\\r\\n\\t \\t    this.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.DRAGGING,listData,{item:listData});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dragEndHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar data = this.__nsDragDrop.getDragData();\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t \\t    this.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.DRAG_END,arrItems,{items:arrItems});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__itemDroppingHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cancelled = this.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.ITEM_DROPPING,event.item,{item:event.item},true,true);\\r\\n\\t\\t\\tif(cancelled)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__itemDroppedHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__nsList.__baseComponent,this.__nsList.ITEM_DROPPED,event.item,{item:event.item},true,false);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createClone = function(listItem,containerConfiguration)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listContainer = this.__nsList.__listContainer.cloneNode(false);\\r\\n\\t\\t\\tvar data = this.__nsDragDrop.getDragData();\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tvar clonedNode = null;\\r\\n\\t\\t\\t//make a clone only when clone Mode is ON or the list is not droppable\\r\\n\\t\\t\\tif(this.__nsList.__enableCloneMode || !this.__nsList.__isDroppable)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrItems.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tclonedNode = arrItems[count][this.__nsList.__fieldItem].cloneNode(true);\\r\\n\\t\\t\\t\\t\\tclonedNode.setAttribute(\\\"id\\\",\\\"comp\\\" + listContainer.id + \\\"ClonedNode\\\" + count);\\r\\n\\t\\t\\t\\t\\tlistContainer.appendChild(clonedNode);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrItems.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tclonedNode = arrItems[count][this.__nsList.__fieldItem];\\r\\n\\t\\t\\t\\t\\tlistContainer.appendChild(clonedNode);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tlistContainer.style.width = containerConfiguration.width + \\\"px\\\";\\r\\n\\t\\t\\treturn listContainer;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createPlaceholder = function(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar listItem = this.util.createElement(\\\"li\\\",null,\\\"nsListEmptyItem\\\");\\r\\n\\t\\t\\tlistItem.innerHTML = \\\"<div class='nsListEmptyChild'>&nbsp;</div>\\\";\\r\\n\\t\\t\\treturn listItem;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isListItemDroppable = function(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemFromTarget(listItem);\\r\\n\\t\\t\\treturn this.__isItemDroppable(listItem,item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isListItemDraggable = function(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = this.__getItemFromTarget(listItem);\\r\\n\\t\\t\\treturn this.__isItemDraggable(listItem,item);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__insertListItemHandler = function(container,newListItem,index,currentListItem,data)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tthis.__nsList.__addItem(arrItems,index);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__moveListItemHandler = function(container,newListItem,index,currentListItem,data)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrItems = data.arrItems;\\r\\n\\t\\t\\tthis.__nsList.__moveItem(arrItems,index);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__removeListItemHandler = function(container,listItem,data)\\r\\n\\t\\t{\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getSelectedItems = function(target)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar list = this.__nsList;\\r\\n\\t\\t\\tvar listContainer = list.__listContainer;\\r\\n\\t\\t\\tvar index = parseInt(list.__getIndexFromTarget(target));\\r\\n\\t\\t\\tvar item = list.__getItemByIndex(index);\\r\\n\\t\\t\\tvar arrItems = [];\\r\\n\\t\\t\\tvar arrSelectedItems = list.getSelectedItems();\\r\\n\\t\\t\\tvar itemSelected = false; \\r\\n\\t\\t\\tif(arrSelectedItems && arrSelectedItems.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tempItem = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrSelectedItems.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttempItem = this.__cloneItem(arrSelectedItems[count]);\\r\\n\\t\\t\\t\\t\\tif(tempItem[list.__fieldIndex] === item[list.__fieldIndex])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titemSelected = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tarrItems.push(tempItem);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!itemSelected || !arrItems || arrItems.length === 0 || !arrItems[0])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tempItem = this.__cloneItem(item);\\r\\n\\t\\t\\t\\tarrItems = [tempItem];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrItems;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__cloneItem = function(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar list = this.__nsList;\\r\\n\\t\\t\\tvar tempItem = null;\\r\\n\\t\\t\\tif(item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\ttempItem = this.util.cloneObject(item);\\r\\n\\t\\t\\t\\tif(list.__enableHierarchical && tempItem[list.__childField] && tempItem[list.__childField].length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrChild = tempItem[list.__childField];\\r\\n\\t\\t\\t\\t\\tvar length = arrChild.length;\\r\\n\\t\\t\\t\\t\\tvar childItem = null;\\r\\n\\t\\t\\t\\t\\tvar tempChildItem = null;\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tchildItem = arrChild[count];\\r\\n\\t\\t\\t\\t\\t\\ttempChildItem = this.__cloneItem(childItem);\\r\\n\\t\\t\\t\\t\\t\\tif(tempChildItem)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\ttempItem[list.__childField][count] = tempChildItem;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn tempItem;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getItemFromTarget = function(listItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar itemIndex = this.__nsList.__getIndexFromTarget(listItem);\\r\\n\\t\\t\\treturn this.__nsList.__getItemByIndex(itemIndex);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isItemDraggable = function(listItem,item) \\r\\n\\t    {\\r\\n\\t\\t\\tvar retValue = true;\\r\\n\\t\\t\\tif(this.__disableDraggableFunction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = this.__disableDraggableFunction(item,this.__nsList.__labelField,item[this.__nsList.__fieldIndex],item[this.__nsList.__fieldDisableHover],listItem);\\r\\n\\t\\t\\t\\tretValue = !retValue;\\r\\n\\t\\t\\t}\\r\\n\\t    \\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isItemDroppable = function(event) \\r\\n\\t    {\\r\\n\\t\\t\\tvar retValue = true;\\r\\n\\t\\t\\tif(this.__disableDropableFunction)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\t\\ttarget = this.util.findParent(target,\\\"li\\\");\\r\\n\\t\\t\\t\\tvar index = this.__nsList.__getIndexFromTarget(target);\\r\\n\\t\\t\\t\\tvar item = this.__nsList.__getItemByIndex(index);\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue = this.__disableDropableFunction(item,this.__nsList.__labelField,item[this.__nsList.__fieldIndex],item[this.__nsList.__fieldDisableHover],target);\\r\\n\\t\\t\\t\\t\\tretValue = !retValue;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t    \\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\treturn NSList;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSList\\\",NSList);\\r\\n\";","export const NSNavigationCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\nvar svgRef = require('./nsSVG.min.js');\\r\\nvar NSSvg = svgRef.NSSvg;\\r\\nvar NSSvgShapes = svgRef.NSSvgShapes;\\r\\nvar plugginsRef = require('./nsPluggins.min.js');\\r\\nvar nsTextEditor = plugginsRef.nsTextEditor;\\r\\nvar nsTextAreaEditor = plugginsRef.nsTextAreaEditor;\\r\\nvar NSCellSelection = plugginsRef.NSCellSelection;\\r\\nvar NSTableCellNavigator = plugginsRef.NSTableCellNavigator;\\r\\nvar dateutilRef = require('./nsDateUtil.min.js');\\r\\nvar NSDateUtil = dateutilRef.NSDateUtil;\\r\\n\\r\\n\\t\\t}\\r\\n\\\"use strict\\\";\\r\\nvar NSFilter = (function()\\r\\n{\\r\\n\\tfunction NSFilter(data,filter,setting,recordLimit,isHierarchical,childField,filterFunction,hierarchyFilterChildren,arrIgnoreKeysInCloneDataSource) \\r\\n\\t{\\r\\n\\t\\tthis.EXACT = \\\"exact\\\";\\r\\n\\t\\tthis.STARTS_WITH = \\\"startsWith\\\";\\r\\n\\t\\tthis.ENDS_WITH = \\\"endsWith\\\";\\r\\n\\t\\tthis.CONTAINS = \\\"contains\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.IS_FOUND_FIELD = \\\"__nsFilter__found\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__data = data;\\r\\n\\t\\tthis.__filter = filter;\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.__recordLimit = (parseInt(recordLimit) > 0) ? recordLimit : -1;\\r\\n\\t\\tthis.__isHierarchical = this.util.isUndefined(isHierarchical) ? false : Boolean.parse(isHierarchical);\\r\\n\\t\\tthis.__childField = childField ? childField : \\\"children\\\";\\r\\n\\t\\tthis.__filterFunction = filterFunction;\\r\\n\\t\\tthis.__hierarchyFilterChildren = hierarchyFilterChildren;\\r\\n\\t\\tthis.__arrIgnoreKeysInCloneDataSource = arrIgnoreKeysInCloneDataSource;\\r\\n\\t\\tthis.__ignoreSameLevelNode = true;\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSFilter.prototype.execute = function(data,filter,setting,recordLimit,isHierarchical,childField,filterFunction,hierarchyFilterChildren,arrIgnoreKeysInCloneDataSource) \\r\\n\\t{ \\r\\n\\t\\tdata = data ? data : this.__data;\\r\\n\\t\\tfilter = filter ? filter : this.__filter;\\r\\n\\t\\tsetting = setting ? setting : this.__setting;\\r\\n\\t\\trecordLimit = (parseInt(recordLimit) > 0) ? recordLimit : this.__recordLimit;\\r\\n\\t\\tisHierarchical = this.util.isUndefined(isHierarchical) ? Boolean.parse(this.__isHierarchical) : Boolean.parse(isHierarchical);\\r\\n\\t\\tchildField = childField ? childField : this.__childField;\\r\\n\\t\\tfilterFunction = filterFunction ? filterFunction : this.__filterFunction;\\r\\n\\t\\thierarchyFilterChildren = hierarchyFilterChildren ? hierarchyFilterChildren : this.__hierarchyFilterChildren;\\r\\n\\t\\tarrIgnoreKeysInCloneDataSource = this.util.isUndefinedOrNull(arrIgnoreKeysInCloneDataSource) ? this.__arrIgnoreKeysInCloneDataSource : arrIgnoreKeysInCloneDataSource;\\r\\n\\t\\tif(data && filter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar dataSource = data.slice(0);\\r\\n\\t\\t\\tvar arrFilter = [];\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar callFilterFunction = function(source,level,parentItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\t\\tfor (var count = 0; count < source.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\t\\tvar found = false;\\r\\n\\t\\t\\t\\t\\tif(isHierarchical && item[childField] && item[childField].length > 0 )\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar arrChild = callFilterFunction(item[childField],level + 1,item);\\r\\n\\t\\t\\t\\t\\t\\tif(arrChild && arrChild.length > 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tfound = true;\\r\\n\\t\\t\\t\\t\\t\\t\\tif(self.__ignoreSameLevelNode)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t            item[childField] = arrChild;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(!found && self.__filterItem(item,filter,setting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(isHierarchical && hierarchyFilterChildren)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar arrChildren = item[childField];\\r\\n\\t\\t\\t\\t\\t\\t\\tif(arrChildren && arrChildren.length > 0)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar childItem = null;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tvar childLength = arrChildren.length;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tfor(var childCount = childLength - 1;childCount > -1;childCount--)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tchildItem = arrChildren[childCount];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif(childItem)\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(!hierarchyFilterChildren(childItem,childCount,childItem[self.IS_FOUND_FIELD],filter,setting,item))\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tarrChildren.splice(childCount, 1);\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tfound = true;\\r\\n\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t\\tif(!isHierarchical && recordLimit > 0 && arrReturn.length >= recordLimit)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//return false;\\r\\n\\t\\t\\t\\treturn arrReturn;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar callNonHierarchicalFilterFunction = function(source)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\t\\tfor (var count = 0; count < source.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = source[count];\\r\\n\\t\\t\\t\\t\\tif(self.__filterItemNonHierarchical(item,filter,setting,filterFunction))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tarrReturn.push(item);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn arrReturn;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tdataSource = this.util.cloneObject(dataSource,isHierarchical,[],arrIgnoreKeysInCloneDataSource);\\r\\n\\t\\t\\tif(isHierarchical)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrFilter = callFilterFunction(dataSource,1,null);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrFilter = callNonHierarchicalFilterFunction(dataSource);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrFilter;\\r\\n\\t\\t}\\r\\n\\t\\treturn data;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterItemNonHierarchical = function(item,filter,setting,filterFunction) \\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tif(filterFunction)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = filterFunction(item,filter,setting);\\r\\n\\t\\t\\tthis.__setItem(item,retValue);\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t}\\r\\n\\t\\telse if(filter instanceof Function) \\r\\n\\t    {\\r\\n\\t\\t\\tretValue = filter(item,setting);\\r\\n\\t        this.__setItem(item,retValue);\\r\\n\\t        return retValue;\\r\\n\\t    }\\r\\n\\t    else if(filter instanceof Array) \\r\\n\\t    {\\r\\n\\t        for (var count = 0; count < filter.length; ++count) \\r\\n\\t        {\\r\\n\\t            if (this.__filterItemNonHierarchical(item,filter[count],setting,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\tthis.__setItem(item,true);\\r\\n\\t            \\treturn true;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    }\\r\\n\\t    else if(setting.type === \\\"date\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterDate(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if(typeof(item) === \\\"string\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterString(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if (item === item + 0 && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterNumeric(item,filter);\\r\\n\\t    }\\r\\n\\t    else if(typeof (filter) === \\\"object\\\") \\r\\n\\t    {\\r\\n\\t        for(var key in filter) \\r\\n\\t        {\\r\\n\\t        \\tvar tempSetting = {};\\r\\n\\t        \\tif(setting && setting[key])\\r\\n\\t        \\t{\\r\\n\\t        \\t\\ttempSetting = setting[key];\\r\\n\\t        \\t}\\r\\n\\t            if(!this.__filterItemNonHierarchical(item[key],filter[key],tempSetting,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\treturn false;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        this.__setItem(item,true);\\r\\n\\t        return true;\\r\\n\\t    }\\r\\n\\t\\tretValue = (filter == item);\\r\\n\\t    this.__setItem(item,retValue);\\r\\n\\t    return retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterItem = function(item,filter,setting,isHierarchical,childField,parentItem,filterFunction) \\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tif(filterFunction)\\r\\n\\t\\t{\\r\\n\\t\\t\\tretValue = filterFunction(item,filter,setting,isHierarchical,childField,parentItem);\\r\\n\\t\\t\\tthis.__setItem(item,retValue);\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t}\\r\\n\\t\\telse if(filter instanceof Function) \\r\\n\\t    {\\r\\n\\t\\t\\tretValue = filter(item,setting);\\r\\n\\t        this.__setItem(item,retValue);\\r\\n\\t        return retValue;\\r\\n\\t    }\\r\\n\\t    else if(filter instanceof Array) \\r\\n\\t    {\\r\\n\\t        for (var count = 0; count < filter.length; ++count) \\r\\n\\t        {\\r\\n\\t            if (this.__filterItem(item,filter[count],setting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\tthis.__setItem(item,true);\\r\\n\\t            \\treturn true;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        return false;\\r\\n\\t    }\\r\\n\\t    else if(setting.type === \\\"date\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterDate(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if(typeof(item) === \\\"string\\\" && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterString(item,filter,setting);\\r\\n\\t    }\\r\\n\\t    else if (item === item + 0 && filter)\\r\\n\\t    {\\r\\n\\t        return this.__filterNumeric(item,filter);\\r\\n\\t    }\\r\\n\\t    else if(typeof (filter) === \\\"object\\\") \\r\\n\\t    {\\r\\n\\t        for(var key in filter) \\r\\n\\t        {\\r\\n\\t        \\tif(isHierarchical && key === childField)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tcontinue;\\r\\n\\t        \\t}\\r\\n\\t        \\tvar tempSetting = {};\\r\\n\\t        \\tif(setting && setting[key])\\r\\n\\t        \\t{\\r\\n\\t        \\t\\ttempSetting = setting[key];\\r\\n\\t        \\t}\\r\\n\\t            if(!this.__filterItem(item[key],filter[key],tempSetting,isHierarchical,childField,parentItem,filterFunction))\\r\\n\\t            {\\r\\n\\t            \\treturn false;\\r\\n\\t            }\\r\\n\\t        }\\r\\n\\t        this.__setItem(item,true);\\r\\n\\t        return true;\\r\\n\\t    }\\r\\n\\t\\tretValue = (filter == item);\\r\\n\\t    this.__setItem(item,retValue);\\r\\n\\t    return retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__setItem = function(item,isFound)\\r\\n\\t{\\r\\n\\t\\tif(item && typeof (item) === \\\"object\\\" && isFound)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem[this.IS_FOUND_FIELD] = true;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterNumeric= function(value,searchParam)\\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tvalue = parseFloat(value);\\r\\n\\t\\tif(!isNaN(value))\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(/<=/.test(searchParam)) // first checks if there is an operator (<,>,<=,>=)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value <= parseFloat(searchParam.replace(/<=/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/>=/.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value >= parseFloat(searchParam.replace(/>=/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/</.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value < parseFloat(searchParam.replace(/</,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(/>/.test(searchParam))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value > parseFloat(searchParam.replace(/>/,\\\"\\\")));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = (value === parseFloat(searchParam));\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterDate= function(value,searchParam,setting)\\r\\n\\t{\\r\\n\\t\\tvar retValue = false;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar matchValue = function(compareValue,opt)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compValue = false;\\r\\n\\t\\t\\tif(self.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcompValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar newVal = self.__getDate(value,setting.cellFormat);\\r\\n\\t\\t\\t\\tif(newVal)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tnewVal.setHours(0, 0, 0, 0);\\r\\n\\t\\t\\t\\t\\tcompareValue.setHours(0, 0, 0, 0);\\r\\n\\t\\t\\t\\t\\tswitch(opt)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"equals\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() === newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"greaterThan\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() < newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"lessThan\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() > newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\tcase \\\"notEqual\\\":\\r\\n\\t\\t\\t\\t\\t\\t\\tif (compareValue.getTime() != newVal.getTime()) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t            }\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.util.warning(\\\"NSFilter\\\",value + \\\" cannot be converted to date Object for given cell format\\\");\\r\\n\\t\\t\\t\\t\\tcompValue = false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn compValue;\\r\\n\\t\\t};\\r\\n\\t\\tvar processDate = function(date,type)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar compValue = false;\\r\\n\\t\\t\\tif(date && matchType1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!date || !Object.prototype.toString.call(date) === '[object Date]')\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(setting.comparator)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = setting.comparator(value,date,setting);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcompValue = matchValue(date,type);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn compValue;\\r\\n\\t\\t};\\r\\n\\t\\tif(setting.matchType1 || setting.matchType2)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar matchType1 = setting.matchType1;\\r\\n\\t\\t\\tvar firstDate = setting.firstDate;\\r\\n\\t\\t\\tvar operation = setting.operation;\\r\\n\\t\\t\\tvar matchType2 = setting.matchType2;\\r\\n\\t\\t\\tvar secondDate = setting.secondDate;\\r\\n\\t\\t\\tif(this.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(firstDate && secondDate && matchType1 && matchType2 && operation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar firstVal = processDate(firstDate,matchType1);\\r\\n\\t\\t\\t\\tvar secondVal = processDate(secondDate,matchType2);\\r\\n\\t\\t\\t\\tswitch(operation)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcase \\\"and\\\":\\r\\n\\t\\t\\t\\t\\t\\tretValue = (firstVal && secondVal);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase \\\"or\\\":\\r\\n\\t\\t\\t\\t\\t\\tretValue = (firstVal || secondVal);\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(firstDate && matchType1)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = processDate(firstDate,matchType1);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(secondDate && matchType2)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = processDate(secondDate,matchType2);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!searchParam || !Object.prototype.toString.call(searchParam) === '[object Date]')\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(setting.comparator)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = setting.comparator(value,searchParam,setting);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse if(this.util.isUndefinedOrNull(value))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tretValue = matchValue(searchParam,\\\"equals\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn retValue;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__filterString= function(value,searchParam,setting)\\r\\n\\t{\\r\\n\\t\\tvar regExp = null;\\r\\n\\t\\tvar regExpModifier = \\\"g\\\";\\r\\n\\t\\tvar startWithChar = \\\"(^)\\\";\\r\\n\\t\\tvar endsWithChar = \\\"($)\\\";\\r\\n\\t\\tvar searchString = \\\"\\\";\\r\\n\\t\\tvar isCaseSensitive = false;\\r\\n\\t\\tvar isMultiline = false;\\r\\n\\t\\tvar matchType = this.CONTAINS;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tisCaseSensitive = Boolean.parse(setting[\\\"caseSensitive\\\"]);\\r\\n\\t\\t\\tisMultiline = Boolean.parse(setting[\\\"multiline\\\"]);\\r\\n\\t\\t\\tmatchType = setting[\\\"matchType\\\"] ? setting[\\\"matchType\\\"] : matchType;\\r\\n\\t\\t}\\r\\n\\t\\tif(!isCaseSensitive)\\r\\n\\t\\t{\\r\\n\\t\\t\\tregExpModifier += \\\"i\\\";\\r\\n\\t\\t}\\r\\n\\t\\tif(isMultiline)\\r\\n\\t\\t{\\r\\n\\t\\t\\tregExpModifier += \\\"m\\\";\\r\\n\\t\\t}\\r\\n\\t\\tsearchParam = this.__removeSpecialCharacter(searchParam);\\r\\n\\t\\tif(matchType === this.EXACT)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = startWithChar + searchParam + endsWithChar;\\r\\n\\t\\t}\\r\\n\\t\\telse if(matchType === this.STARTS_WITH)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = startWithChar + searchParam;\\r\\n\\t\\t}\\r\\n\\t\\telse if(matchType === this.ENDS_WITH)\\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = searchParam + endsWithChar;\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tsearchString = searchParam;\\r\\n\\t\\t}\\r\\n\\t\\tregExp = new RegExp(searchString,regExpModifier);\\r\\n\\t\\treturn regExp.test(value);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSFilter.prototype.__removeSpecialCharacter = function(text)\\r\\n\\t{\\r\\n\\t\\tfunction replaceEscape(char)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(text)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar exp = new RegExp(\\\"\\\\\\\\\\\" + char,\\\"g\\\");\\r\\n\\t\\t\\t\\ttext = text.replace(exp,\\\"\\\\\\\\\\\" + char);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tvar specialChar = ['\\\\\\\\','[','^','$','.','|','?','*','+','(',')'];\\r\\n\\t\\tfor(var count = 0;count < specialChar.length;count++) \\r\\n\\t\\t{\\r\\n\\t\\t\\treplaceEscape(specialChar[count]);\\r\\n\\t\\t}\\r\\n\\t\\treturn text;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//ref from : https://stackoverflow.com/questions/7445328/check-if-a-string-is-a-date-value\\r\\n\\tNSFilter.prototype.__getDate = function(value,arrFormat) \\r\\n\\t{\\r\\n\\t\\tif(value)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar dateFormat;\\r\\n\\t\\t    if (Object.prototype.toString.call(value) === '[object Date]') \\r\\n\\t\\t    {\\r\\n\\t\\t        return value;\\r\\n\\t\\t    }\\r\\n\\t\\t    if(arrFormat)\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tvar dateUtil = new NSDateUtil();\\r\\n\\t\\t    \\tif(!this.util.isArray(arrFormat))\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tarrFormat = [arrFormat];\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tfor(var count = 0;count < arrFormat.length;count++)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tvar format = arrFormat[count];\\r\\n\\t\\t    \\t\\tvar date = dateUtil.parseString(value,format);\\r\\n\\t\\t    \\t\\tif(date)\\r\\n\\t\\t    \\t\\t{\\r\\n\\t\\t    \\t\\t\\treturn date;\\r\\n\\t\\t    \\t\\t}\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    }\\r\\n\\t\\t    else\\r\\n\\t\\t    {\\r\\n\\t\\t    \\tif (typeof value.replace === 'function') \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t        value.replace(/^\\\\s+|\\\\s+$/gm, '');\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    dateFormat = /(^\\\\d{1,4}[\\\\.|\\\\\\\\/|-]\\\\d{1,2}[\\\\.|\\\\\\\\/|-]\\\\d{1,4})(\\\\s*(?:0?[1-9]:[0-5]|1(?=[012])\\\\d:[0-5])\\\\d\\\\s*[ap]m)?$/;\\r\\n\\t\\t\\t    if(dateFormat.test(value))\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\treturn new Date(value);//Date.parse(value);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t    }\\r\\n\\t\\t}\\r\\n\\t    return null;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSFilter;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSFilter\\\",NSFilter);\\\"use strict\\\";\\r\\nvar NSFloatingLabel = (function()\\r\\n{\\r\\n\\tfunction NSFloatingLabel(setting) \\r\\n\\t{\\r\\n\\t\\tvar config = null;\\r\\n\\t\\t\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar util = null;\\r\\n\\t\\t\\r\\n\\t\\tvar container = null;\\r\\n\\t\\tvar conContainer = null;\\r\\n\\t\\tvar control = null;\\r\\n\\t\\tvar label = null;\\r\\n\\t\\tvar id = null;\\r\\n\\t\\tvar parentElement = null;\\r\\n\\t\\tvar isTxtBoxID = false;\\r\\n\\t\\tvar typeCssClass = null;\\r\\n        \\r\\n        var initialize = function()\\r\\n    \\t{\\r\\n    \\t\\tutil = new NSUtil();\\r\\n    \\t\\tif(!setting)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tsetting = {};\\r\\n    \\t\\t}\\r\\n    \\t\\tconfig = {\\r\\n    \\t\\t\\t\\tcontainer: setting[\\\"container\\\"],\\r\\n    \\t\\t\\t\\tcontrol: setting[\\\"control\\\"],\\r\\n    \\t\\t\\t\\tlabel: setting[\\\"label\\\"],\\r\\n    \\t\\t\\t\\tcontrolType: setting[\\\"controlType\\\"] || (setting.control ? setting.control.nodeName.toLowerCase() : null) || \\\"input\\\",\\r\\n    \\t\\t\\t\\tinputType: setting[\\\"inputType\\\"] || \\\"text\\\",// used when controlType is \\\"input\\\"\\r\\n    \\t\\t\\t\\tposition: setting[\\\"position\\\"] ? (setting[\\\"position\\\"].charAt(0).toUpperCase() + setting[\\\"position\\\"].slice(1)) : \\\"Top\\\",\\r\\n    \\t\\t\\t\\ttopPosition: setting[\\\"topPosition\\\"] ? (setting[\\\"topPosition\\\"].charAt(0).toUpperCase() + setting[\\\"topPosition\\\"].slice(1)) : \\\"Middle\\\",\\r\\n    \\t\\t\\t\\ttheme: setting[\\\"theme\\\"] ? (setting[\\\"theme\\\"].charAt(0).toUpperCase() + setting[\\\"theme\\\"].slice(1)) : \\\"White\\\"\\r\\n    \\t\\t};\\r\\n    \\t\\tif(!config.container && !config.control)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tutil.throwNSError(\\\"NSFloatingLabel\\\",\\\"Enter a valid container or a control\\\");\\r\\n    \\t\\t}\\r\\n    \\t\\tif(!config.label || !config.label.length)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tutil.throwNSError(\\\"NSFloatingLabel\\\",\\\"Enter a valid Label\\\");\\r\\n    \\t\\t}\\r\\n    \\t\\tif(!setting.customClass)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tsetting.customClass = {};\\r\\n    \\t\\t}\\r\\n    \\t\\tconfig.customClass = {container:setting.customClass[\\\"container\\\"],control:setting.customClass[\\\"control\\\"],controlFocus:setting.customClass[\\\"controlFocus\\\"],\\r\\n    \\t\\t\\t\\t\\t\\t\\t  label:setting.customClass[\\\"label\\\"]};\\r\\n    \\t\\tsetTypeCssClass();\\r\\n    \\t\\tcreateComponent();\\r\\n    \\t\\tsetTheme(config.theme);\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar createComponent = function()\\r\\n    \\t{\\r\\n    \\t\\tcontrol = config.control;\\r\\n    \\t\\tvar txtID = null;\\r\\n    \\t\\tif(control)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\ttxtID = getID();\\r\\n    \\t\\t\\tif(!isTxtBoxID)\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\ttxtID = txtID + \\\"Txt\\\";\\r\\n    \\t\\t\\t\\tcontrol.setAttribute(\\\"id\\\",txtID);\\r\\n    \\t\\t\\t\\tcontrol.setAttribute(\\\"name\\\",txtID);\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t\\tcontainer = util.createElement(\\\"div\\\",getID() + \\\"Container\\\",getContainerClass());\\r\\n    \\t\\t\\tparentElement = control.parentElement;\\r\\n    \\t\\t\\tparentElement.insertBefore(container,control);\\r\\n    \\t\\t}\\r\\n    \\t\\telse\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tcontainer = config.container;\\r\\n    \\t\\t\\tutil.addStyleClass(container,getContainerClass());\\r\\n    \\t\\t\\ttxtID = getID() + \\\"TxtLabel\\\";\\r\\n    \\t\\t\\tcontrol = util.createElement(config.controlType,txtID,null);\\r\\n    \\t\\t\\tif(config.controlType == \\\"input\\\")\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tcontrol.setAttribute(\\\"type\\\",config.inputType);\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t\\tcontrol.setAttribute(\\\"name\\\",txtID);\\r\\n    \\t\\t}\\r\\n    \\t\\tcontrol.setAttribute(\\\"placeholder\\\",config.label);\\r\\n    \\t\\tconContainer = util.createElement(\\\"div\\\",getID() + \\\"ConContainer\\\",\\\"nsFloatingLabelConatiner\\\");\\r\\n    \\t\\tutil.addStyleClass(control,\\\"nsFloatingLabelControl \\\" + ((config.controlType == \\\"input\\\") ? \\\"nsFloatingLabelInput\\\" : \\\"nsFloatingLabelTextArea\\\"));\\r\\n    \\t\\tutil.addEvent(control,\\\"focus\\\",controlFocusListener);\\r\\n    \\t\\tutil.addEvent(control,\\\"blur\\\",controlBlurListener);\\r\\n    \\t\\tutil.addEvent(control,\\\"change input blur reset\\\",controlEventListener);\\r\\n    \\t\\tconContainer.appendChild(control);\\r\\n    \\t\\tapplyCustomClass(container,\\\"container\\\");\\r\\n    \\t\\tapplyCustomClass(control,\\\"control\\\");\\r\\n    \\t\\tlabel = util.createElement(\\\"label\\\",txtID + \\\"Label\\\",\\\"nsFloatingLabelLabel\\\");\\r\\n    \\t\\tlabel.setAttribute(\\\"for\\\",txtID);\\r\\n    \\t\\tlabel.innerHTML = config.label;\\r\\n    \\t\\tapplyCustomClass(label,\\\"label\\\");\\r\\n    \\t\\tconContainer.appendChild(label);\\r\\n    \\t\\tcontainer.appendChild(conContainer);\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar controlFocusListener = function(event)\\r\\n    \\t{\\r\\n    \\t\\tevent = util.getEvent(event);\\r\\n    \\t\\tcontrolEventListener(event);\\r\\n    \\t\\tutil.addStyleClass(container,\\\"nsFloatingLabelFocus\\\");\\r\\n    \\t\\tutil.addStyleClass(control,\\\"nsFloatingLabelControlFocus\\\");\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar controlBlurListener = function(event)\\r\\n    \\t{\\r\\n    \\t\\tevent = util.getEvent(event);\\r\\n    \\t\\tcontrolEventListener(event);\\r\\n    \\t\\tutil.removeStyleClass(container,\\\"nsFloatingLabelFocus\\\");\\r\\n    \\t\\tutil.removeStyleClass(control,\\\"nsFloatingLabelControlFocus\\\");\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar controlEventListener = function(event)\\r\\n    \\t{\\r\\n    \\t\\tevent = util.getEvent(event);\\r\\n    \\t\\tmanageFocusCss((control.value && control.value.length) ? true : false);\\r\\n    \\t\\tredispatchEvent(event);\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar manageFocusCss = function(isSet)\\r\\n    \\t{\\r\\n    \\t\\tisSet ? addFocusCss() : removeFocusCss();\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar addFocusCss = function()\\r\\n    \\t{\\r\\n    \\t\\tutil.addStyleClass(container,\\\"nsFloatingLabelActive\\\");\\r\\n    \\t\\tutil.addStyleClass(control,typeCssClass);\\r\\n\\t\\t\\tapplyCustomClass(control,\\\"controlFocus\\\");\\r\\n\\t\\t\\tapplyCustomClass(label,\\\"label\\\");\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar removeFocusCss = function()\\r\\n    \\t{\\r\\n    \\t\\tutil.removeStyleClass(container,\\\"nsFloatingLabelActive\\\");\\r\\n    \\t\\tutil.removeStyleClass(control,typeCssClass);\\r\\n\\t\\t\\tremoveCustomClass(control,\\\"controlFocus\\\");\\r\\n\\t\\t\\tremoveCustomClass(label,\\\"label\\\");\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar getContainerClass = function()\\r\\n    \\t{\\r\\n    \\t\\tvar retValue = \\\"nsFloatingLabel nsFloatingLabel\\\" + config.position;\\r\\n    \\t\\tif(config.position == \\\"Top\\\")\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tretValue += \\\" nsFloatingLabel\\\" + config.position + config.topPosition;\\r\\n    \\t\\t}\\r\\n    \\t\\treturn retValue;\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar getID = function()\\r\\n    \\t{\\r\\n    \\t\\tif(!id)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tif(config.control && (config.control.hasAttribute(\\\"id\\\") || config.control.hasAttribute(\\\"name\\\")))\\r\\n        \\t\\t{\\r\\n    \\t\\t\\t\\tid = config.control.getAttribute(\\\"id\\\") || config.control.getAttribute(\\\"name\\\");\\r\\n    \\t\\t\\t\\tisTxtBoxID = true;\\r\\n        \\t\\t}\\r\\n        \\t\\telse if(config.container && (config.container.hasAttribute(\\\"id\\\") || config.container.hasAttribute(\\\"name\\\")))\\r\\n        \\t\\t{\\r\\n        \\t\\t\\tid = config.container.getAttribute(\\\"id\\\") || config.container.getAttribute(\\\"name\\\");\\r\\n        \\t\\t}\\r\\n    \\t\\t\\telse\\r\\n    \\t\\t\\t{\\r\\n    \\t\\t\\t\\tid = \\\"comp\\\" + util.getUniqueId();\\r\\n    \\t\\t\\t}\\r\\n    \\t\\t}\\r\\n    \\t\\treturn id;\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar applyCustomClass = function(element,type)\\r\\n    \\t{\\r\\n    \\t\\tif(element && type && config.customClass[type])\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tutil.addStyleClass(element,config.customClass[type]);\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar removeCustomClass = function(element,type)\\r\\n    \\t{\\r\\n    \\t\\tif(element && type && config.customClass[type])\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tutil.removeStyleClass(element,config.customClass[type]);\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar setTypeCssClass = function()\\r\\n    \\t{\\r\\n    \\t\\tvar controlType = null;\\r\\n    \\t\\tswitch(config.controlType.toLowerCase())\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tcase \\\"input\\\":\\r\\n    \\t\\t\\t\\tcontrolType = \\\"Input\\\";\\r\\n    \\t\\t\\tbreak;\\r\\n    \\t\\t\\tcase \\\"textarea\\\":\\r\\n    \\t\\t\\t\\tcontrolType = \\\"TextArea\\\";\\r\\n        \\t\\tbreak;\\r\\n        \\t\\tdefault:\\r\\n        \\t\\t\\tcontrolType = \\\"Input\\\";\\r\\n        \\t\\tbreak;\\r\\n    \\t\\t}\\r\\n    \\t\\ttypeCssClass = \\\"nsFloatingLabel\\\" + controlType + \\\"Active\\\";\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar redispatchEvent = function(event)\\r\\n    \\t{\\r\\n    \\t\\t//control is not given but container is given as input\\r\\n    \\t\\tif(!parentElement)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tutil.redispatchEvent(container,event);\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar setAttribute = function(prop,value)\\r\\n    \\t{\\r\\n    \\t\\tcontrol.setAttribute(prop,value);\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar getAttribute = function(prop)\\r\\n    \\t{\\r\\n    \\t\\treturn control.getAttribute(prop);\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar value = function(value)\\r\\n    \\t{\\r\\n    \\t\\tif(!util.isUndefined(value))\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tcontrol.value = value;\\r\\n    \\t\\t}\\r\\n    \\t\\treturn control.value;\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar getControl = function()\\r\\n    \\t{\\r\\n    \\t\\treturn control;\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar setTheme = function(theme) \\r\\n    \\t{\\r\\n    \\t\\tif(container && config.theme)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tutil.removeStyleClass(container,\\\"nsFloatingLabel\\\" + config.theme);\\r\\n    \\t\\t\\tconfig.theme = theme;\\r\\n    \\t\\t\\tutil.addStyleClass(container,\\\"nsFloatingLabel\\\" + config.theme);\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tvar destroy = function() \\r\\n    \\t{\\r\\n    \\t\\tif(container && control)\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tif(parentElement)\\r\\n        \\t\\t{\\r\\n        \\t\\t\\tparentElement.insertBefore(control,container);\\r\\n        \\t\\t\\tcontainer.parentElement.removeChild(container);\\r\\n        \\t\\t\\tcontainer = null;\\r\\n        \\t\\t\\tif(!isTxtBoxID)\\r\\n        \\t\\t\\t{\\r\\n        \\t\\t\\t\\tcontrol.setAttribute(\\\"id\\\",null);\\r\\n        \\t\\t\\t\\tcontrol.setAttribute(\\\"name\\\",null);\\r\\n        \\t\\t\\t}\\r\\n        \\t\\t}\\r\\n    \\t\\t}\\r\\n    \\t\\telse\\r\\n    \\t\\t{\\r\\n    \\t\\t\\tconContainer.parentElement.removeChild(conContainer);\\r\\n    \\t\\t}\\r\\n    \\t};\\r\\n    \\t\\r\\n    \\tinitialize();\\r\\n    \\t\\r\\n    \\tself.value = value;\\r\\n    \\tself.getAttribute = getAttribute;\\r\\n    \\tself.setAttribute = setAttribute;\\r\\n    \\tself.setTheme = setTheme;\\r\\n    \\tself.getControl = getControl;\\r\\n    \\tself.destroy = destroy;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSFloatingLabel;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSFloatingLabel\\\",NSFloatingLabel);var NSNavigation = (function()\\r\\n{\\r\\n\\tfunction NSNavigation(component,setting) \\r\\n\\t{\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\t\\r\\n\\t\\tthis.__navigationContainerParent = null;\\r\\n\\t\\tthis.__navigationContainer = null;\\r\\n\\t\\tthis.__conSearch = null;\\r\\n\\t\\tthis.__txtSearch = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\tthis.__domVar = null;\\r\\n\\t\\tthis.__selectedParentMenuItem = null;\\r\\n\\t\\tthis.__selectedMenu = null;\\r\\n\\t\\tthis.__selectedMenuItem = null;\\r\\n\\t\\tthis.__isNavOpen = false;\\r\\n\\t\\tthis.__dynamicContainer = null;\\r\\n\\t\\tthis.__isDataHierarchical = false;\\r\\n\\t\\tthis.__nsFloatingLabel = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__fieldPrefix = \\\"__ns_nav_field\\\";\\r\\n\\t\\tthis.__fieldIsOpen = this.__fieldPrefix + \\\"_open\\\";\\r\\n\\t\\tthis.__fieldElement = this.__fieldPrefix + \\\"_element\\\";\\r\\n\\t\\tthis.__fieldChildContainer = this.__fieldPrefix + \\\"_childcontainer\\\";\\r\\n\\t\\tthis.__fieldChildMenuIconContainer = this.__fieldPrefix + \\\"_menuiconcontainer\\\";\\r\\n\\t\\tthis.__fieldParentMenuItem = this.__fieldPrefix + \\\"_parentmenuitem\\\";\\r\\n\\t\\t\\r\\n\\t\\tthis.__headerItem = null;\\r\\n\\t\\tthis.__headerItemHeight = 0;\\r\\n\\t\\tthis.__interval = null;\\r\\n\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component);\\r\\n\\t};\\r\\n\\t\\r\\n\\tnsExtendPrototype(NSContainerBase,NSNavigation);\\r\\n\\tNSNavigation.prototype.constructor = NSNavigation;\\r\\n\\t\\r\\n\\tNSNavigation.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__domVar = this.util.getDomVariables();\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t\\tif(this.__config.dataSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.dataSource(this.__config.dataSource);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.base.componentResized.call(this,event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.isNavOpen = function()\\r\\n\\t{\\r\\n\\t\\treturn this.__isNavOpen;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.toggleNavigation = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__isNavOpen)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.closeNavigation();\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.openNavigation();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.openNavigation = function()\\r\\n\\t{\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSNavigation.NAVIGATION_OPEN_START);\\r\\n\\t\\tthis.util.removeStyleClass(this.__config.containerElement,\\\"nsNavCollapsed\\\");\\r\\n\\t\\tthis.__isNavOpen = true;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar transitionEndCallback = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__resizeContentContainer();\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSNavigation.NAVIGATION_OPEN_END);\\r\\n\\t\\t};\\r\\n\\t\\tvar transition = new this.util.transition(this.__baseComponent,transitionEndCallback.bind(this));\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.closeNavigation = function()\\r\\n\\t{\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSNavigation.NAVIGATION_CLOSE_START);\\r\\n\\t\\tthis.util.addStyleClass(this.__config.containerElement,\\\"nsNavCollapsed\\\");\\r\\n\\t\\tthis.__isNavOpen = false;\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar transitionEndCallback = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tself.__resizeContentContainer();\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSNavigation.NAVIGATION_CLOSE_END);\\r\\n\\t\\t};\\r\\n\\t\\tvar transition = new this.util.transition(this.__baseComponent,transitionEndCallback.bind(this));\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.getItemByField = function(field,value,source)\\r\\n\\t{\\r\\n\\t\\treturn this.__getItemByField(field,value,source);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.selectMenu = function(itemOrElement)\\r\\n\\t{\\r\\n\\t\\tvar item = null;\\r\\n\\t\\tif(this.util.isElement(itemOrElement))\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = this.__getItemByElement(itemOrElement);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\titem = itemOrElement;\\r\\n\\t\\t}\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__handleSelectedMenu(item);\\r\\n\\t\\t\\tthis.__invokeMenuClickHandler(item,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.dataSource = function(source)\\r\\n\\t{\\r\\n\\t\\tif(source) {\\r\\n\\t\\t\\tthis.__config.dataSource = source;\\r\\n\\t\\t\\tthis.__config.orignalDataSource = this.__config.dataSource ? this.__config.dataSource.slice(0) : [];\\r\\n\\t\\t\\tthis.__isDataHierarchical = false;\\r\\n\\t\\t\\tif(source && source.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < source.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem = source[count];\\r\\n\\t\\t\\t\\t\\tif(this.__hasChildren(item))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.__isDataHierarchical = true;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__renderItems();\\r\\n\\t\\t}\\r\\n\\t\\treturn this.__config.dataSource;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.setTheme = function(theme)\\r\\n\\t{\\r\\n\\t\\tthis.base.setTheme.call(this,theme);\\r\\n\\t\\tif(this.__nsFloatingLabel)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__nsFloatingLabel.setTheme(theme);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.collapse = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item && item[this.__fieldElement] && this.__hasChildren(item) && item[this.__fieldIsOpen])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.util.removeStyleClass(item[this.__fieldElement],\\\"nsNavItemOpen\\\");\\r\\n\\t\\t\\tthis.util.removeStyleClass(item[this.__fieldElement],\\\"nsNavItemActive\\\");\\r\\n\\t\\t\\tif(item[this.__fieldChildContainer])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__config.enableAnimation)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.slideUp(item[this.__fieldChildContainer],20,function(element){\\r\\n\\t\\t\\t\\t\\t\\tself.util.removeStyleClass(item[self.__fieldChildContainer],\\\"nsNavSubNavContainerVisible\\\");\\r\\n\\t\\t\\t\\t\\t\\titem[self.__fieldChildMenuIconContainer].innerHTML = self.__config.iconMenuCollapsed;\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeStyleClass(item[this.__fieldChildContainer],\\\"nsNavSubNavContainerVisible\\\");\\r\\n\\t\\t\\t\\t\\titem[this.__fieldChildMenuIconContainer].innerHTML = this.__config.iconMenuCollapsed;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem[this.__fieldIsOpen] = false;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.expand = function(item)\\r\\n\\t{\\r\\n\\t\\tif(item && item[this.__fieldElement] && this.__hasChildren(item) && !item[this.__fieldIsOpen])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tthis.util.addStyleClass(item[this.__fieldElement],\\\"nsNavItemOpen\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(item[this.__fieldElement],\\\"nsNavItemActive\\\");\\r\\n\\t\\t\\tif(item[this.__fieldChildContainer])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__config.enableAnimation)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.slideDown(item[this.__fieldChildContainer],20,function(element){\\r\\n\\t\\t\\t\\t\\t\\tself.util.addStyleClass(item[self.__fieldChildContainer],\\\"nsNavSubNavContainerVisible\\\");\\r\\n\\t\\t\\t\\t\\t\\titem[self.__fieldChildMenuIconContainer].innerHTML = self.__config.iconMenuExpanded;\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(item[this.__fieldChildContainer],\\\"nsNavSubNavContainerVisible\\\");\\r\\n\\t\\t\\t\\t\\titem[this.__fieldChildMenuIconContainer].innerHTML = this.__config.iconMenuExpanded;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem[this.__fieldIsOpen] = true;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setting = {};\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__setting[\\\"customClass\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setting[\\\"customClass\\\"] = {};\\r\\n\\t\\t}\\r\\n\\t\\tthis.__config = {\\r\\n\\t\\t\\tcontainerElement: this.__setting[\\\"containerElement\\\"] || this.__domVar.doc.body,\\r\\n\\t\\t\\telementsBeforeMenu: this.__setting[\\\"elementsBeforeMenu\\\"] || null,\\r\\n\\t\\t\\tpageHeaderContainer: this.__setting[\\\"pageHeaderContainer\\\"] || null,\\r\\n\\t\\t\\tpageContentContainer: this.__setting[\\\"pageContentContainer\\\"] || null,\\r\\n\\t\\t\\theader: this.__setting[\\\"header\\\"] || null,\\r\\n\\t\\t\\tshowCollapseIcon: this.util.isUndefinedOrNull(this.__setting[\\\"showCollapseIcon\\\"]) ? true : Boolean.parse(this.__setting[\\\"showCollapseIcon\\\"]),\\r\\n\\t\\t\\ticonCollapse: this.__setting[\\\"iconCollapse\\\"] || \\\"<i class='fa fa-bars pull-right'></i>\\\",\\r\\n\\t\\t\\tdataSource: this.__setting[\\\"dataSource\\\"] || null,\\r\\n\\t\\t\\ttitleField: this.__setting[\\\"titleField\\\"] || \\\"title\\\",\\r\\n\\t\\t\\tchildField: this.__setting[\\\"childField\\\"] || \\\"children\\\",\\r\\n\\t\\t\\ticonPosition: this.__setting[\\\"iconPosition\\\"] || \\\"left\\\",\\r\\n\\t\\t\\ticonMenuExpanded: this.__setting[\\\"iconMenuExpanded\\\"] || ((this.__setting[\\\"iconPosition\\\"] === 'right') ? \\\"<i class='ns-icon ns-navigation-arrow-down'></i>\\\" : \\\"<i class='ns-icon ns-navigation-arrow-down'></i>\\\"),\\r\\n\\t\\t\\ticonMenuCollapsed: this.__setting[\\\"iconMenuCollapsed\\\"] || ((this.__setting[\\\"iconPosition\\\"] === 'right') ? \\\"<i class='ns-icon ns-navigation-arrow-left'></i>\\\" : \\\"<i class='ns-icon ns-navigation-arrow-right'></i>\\\"),\\r\\n\\t\\t\\tcontext: this.__setting[\\\"context\\\"] || this.__domVar.win,\\r\\n\\t\\t\\tcollapseLeftOffset: parseInt(this.__setting[\\\"collapseLeftOffset\\\"]) || 0,\\r\\n\\t\\t\\tcollapseTopOffset: parseInt(this.__setting[\\\"collapseTopOffset\\\"]) || 0,\\r\\n\\t\\t\\tisPositionAbsolute: this.util.isUndefinedOrNull(this.__setting[\\\"isPositionAbsolute\\\"]) ? true : Boolean.parse(this.__setting[\\\"isPositionAbsolute\\\"]),\\r\\n\\t\\t\\textraAttribute: this.__setting[\\\"extraAttribute\\\"],// to set link for Angular 2 or other framework attributes\\r\\n\\t\\t\\tenableAnimation: Boolean.parse(this.__setting[\\\"enableAnimation\\\"]),\\r\\n\\t\\t\\tenableFilter: this.util.isUndefinedOrNull(this.__setting[\\\"enableFilter\\\"]) ? true : Boolean.parse(this.__setting[\\\"enableFilter\\\"]),\\r\\n\\t\\t\\tfilterConfig: this.__setting[\\\"filterConfig\\\"] || {},\\r\\n\\t\\t\\tcustomClass:{navContainer:this.__setting.customClass[\\\"navContainer\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  menuContainer:this.__setting.customClass[\\\"menuContainer\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  headerMenu:this.__setting.customClass[\\\"headerMenu\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  menu:this.__setting.customClass[\\\"menu\\\"] || null,\\r\\n\\t\\t\\t\\t\\t  selectedParentMenu:this.__setting.customClass[\\\"selectedParentMenu\\\"] || \\\"nsNavParentSelectedMenu\\\",\\r\\n\\t\\t\\t\\t\\t  selectedMenu:this.__setting.customClass[\\\"selectedMenu\\\"] || \\\"nsNavSelectedMenu\\\"}\\r\\n\\t\\t};\\r\\n\\t\\t//same as nsFloatingLabel properties except interval\\r\\n\\t\\tvar filterConfig = this.__config.filterConfig;\\r\\n\\t\\tfilterConfig.interval = this.util.isUndefinedOrNull(filterConfig[\\\"interval\\\"]) ? 500 : parseInt(filterConfig[\\\"interval\\\"]);\\r\\n\\t\\tfilterConfig.label = filterConfig[\\\"label\\\"] || \\\"Filter\\\";\\r\\n\\t\\tthis.__createStructure();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__renderItems = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__navigationContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrChildren = this.__navigationContainer.children;\\r\\n\\t\\t\\tif(arrChildren && arrChildren.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar length = arrChildren.length;\\r\\n\\t\\t\\t\\tvar child = null;\\r\\n\\t\\t\\t\\tfor(var count = length - 1;count > -1 ;count--)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchild = arrChildren[count];\\r\\n\\t\\t\\t\\t\\tif(child && this.util.hasStyleClass(child,\\\"nsNavigationItem\\\"))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tchild.parentElement.removeChild(child);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//this.util.removeAllChildren(this.__navigationContainer);\\r\\n\\t\\t\\t//this.__createHeader(this.__navigationContainer);\\r\\n\\t\\t\\t//this.__createSearchComponents(this.__navigationContainer);\\r\\n\\t\\t\\tthis.__createItems(this.__config.dataSource,this.__navigationContainer,1,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__createStructure = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__navigationContainerParent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeAllChildren(this.__navigationContainerParent);\\r\\n\\t\\t\\tthis.__navigationContainerParent = null;\\r\\n\\t\\t\\tthis.__navigationContainer = null;\\r\\n\\t\\t}\\r\\n\\t\\tthis.openNavigation();\\r\\n\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsNavMainContainer\\\");\\r\\n\\t\\tthis.__applyTheme(this.__baseComponent,\\\"nsNavMainContainer\\\");\\r\\n\\t\\tif(this.__config.isPositionAbsolute)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsNavMainContainerAbsolute\\\");\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.addEvent(this.__baseComponent,\\\"mouseleave\\\",this.__parentMouseEventHandler.bind(this,null,\\\"mouseleave\\\"));\\r\\n\\t\\t//header start\\r\\n\\t\\tthis.__navigationHeaderParent = this.util.createDiv(this.getID() + \\\"HeaderParent\\\",\\\"nsNavHeaderParent\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__navigationHeaderParent,\\\"navHeader\\\");\\r\\n\\t\\tthis.__navigationHeader = this.util.createElement(\\\"ul\\\",this.getID() + \\\"Header\\\",\\\"nsNavHeader\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__navigationHeader,\\\"menuHeader\\\");\\r\\n\\t\\tthis.__addElementsBeforeMenu(this.__navigationHeaderParent);\\r\\n\\t\\tthis.__createHeader(this.__navigationHeader);\\r\\n\\t\\tthis.__createSearchComponents(this.__navigationHeader);\\r\\n\\t\\tthis.__navigationHeaderParent.appendChild(this.__navigationHeader);\\r\\n\\t\\t//header end\\r\\n\\t\\t//body start\\r\\n\\t\\tthis.__navigationContainerParent = this.util.createDiv(this.getID() + \\\"ContainerParent\\\",\\\"nsNavContainerParent\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__navigationContainerParent,\\\"navContainer\\\");\\r\\n\\t\\tthis.__navigationContainer = this.util.createElement(\\\"ul\\\",this.getID() + \\\"Container\\\",\\\"nsNavContainer nsNavContainerIcon\\\" + this.util.toCamelCase(this.__config.iconPosition,true));\\r\\n\\t\\tthis.__applyCustomClass(this.__navigationContainer,\\\"menuContainer\\\");\\r\\n\\t\\tthis.__navigationContainerParent.appendChild(this.__navigationContainer);\\r\\n\\t\\t//body end\\r\\n\\t\\t//Footer start\\r\\n\\t\\tthis.__navigationFooterParent = this.util.createDiv(this.getID() + \\\"FooterParent\\\",\\\"nsNavHeaderFooter\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__navigationFooterParent,\\\"navFooter\\\");\\r\\n\\t\\t//Footer end\\r\\n\\t\\tif(this.__config.pageHeaderContainer && this.__config.pageHeaderContainer.offsetHeight > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__baseComponent.style.marginTop = this.__config.pageHeaderContainer.offsetHeight + \\\"px\\\";\\r\\n\\t\\t}\\r\\n\\t\\tthis.__baseComponent.appendChild(this.__navigationHeaderParent);\\r\\n\\t\\tthis.__baseComponent.appendChild(this.__navigationContainerParent);\\r\\n\\t\\tthis.__baseComponent.appendChild(this.__navigationFooterParent);\\r\\n\\t\\tthis.__headerItemHeight = this.__headerItem ? this.__headerItem.offsetHeight : 0;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__addElementsBeforeMenu = function(parent)\\r\\n\\t{\\r\\n\\t\\tif(parent && this.__config.elementsBeforeMenu && this.__config.elementsBeforeMenu.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar length = this.__config.elementsBeforeMenu.length;\\r\\n\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar element = this.__config.elementsBeforeMenu[count];\\r\\n\\t\\t\\t\\tif(element)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tparent.appendChild(element);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__createHeader = function(parent)\\r\\n\\t{\\r\\n\\t\\tthis.__headerItem = this.util.createElement(\\\"li\\\",null,\\\"nsNavTitle\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__headerItem,\\\"headerMenu\\\");\\r\\n\\t\\tif(this.__config.header)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar span = this.util.createElement(\\\"span\\\",null,\\\"nsNavHeaderTitle\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(span,\\\"nsNavNonVisibleIcon\\\");\\r\\n\\t\\t\\tspan.appendChild(this.__domVar.doc.createTextNode(this.__config.header));\\r\\n\\t\\t\\tthis.__headerItem.appendChild(span);\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__config.showCollapseIcon)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar spanIcon = this.util.createElement(\\\"span\\\",null,\\\"nsNavVisibleIcon\\\");\\r\\n\\t\\t\\tspanIcon.innerHTML = this.__config.iconCollapse;\\r\\n\\t\\t\\tthis.util.addEvent(spanIcon,\\\"click\\\",this.__toggleIconClickHandler.bind(this));\\r\\n\\t\\t\\tthis.__headerItem.appendChild(spanIcon);\\r\\n\\t\\t}\\r\\n\\t\\tparent.appendChild(this.__headerItem);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__createSearchComponents = function(parent)\\r\\n\\t{\\r\\n\\t\\tif(this.__config.enableFilter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__conSearch = this.util.createElement(\\\"li\\\",this.getID() + \\\"SearchContainer\\\",\\\"nsNavSearchContainer\\\");\\r\\n\\t\\t\\tparent.appendChild(this.__conSearch);\\r\\n\\t\\t\\tvar filterConfig = this.__config.filterConfig;\\r\\n\\t\\t\\tfilterConfig.container = this.__conSearch;\\r\\n\\t\\t\\tthis.__nsFloatingLabel = new NSFloatingLabel(filterConfig);\\r\\n\\t\\t\\tthis.util.addEvent(this.__conSearch,\\\"input\\\",this.__txtSearchChangeHandler.bind(this));\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__txtSearchChangeHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tclearTimeout(this.__interval);\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tthis.__interval = setTimeout(function(){\\r\\n\\t\\t\\t\\tself.__filterRecord.call(self,self.__nsFloatingLabel.value());\\r\\n\\t\\t\\t}, this.__config.filterConfig.interval);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__createItems = function(arrItem,parent,level,parentMenuItem)\\r\\n\\t{\\r\\n\\t\\tif(arrItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.util.isArray(arrItem))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrItem = [arrItem];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar item = {};\\r\\n\\t\\t\\tfor(var count = 0;count < arrItem.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrItem[count];\\r\\n\\t\\t\\t\\tif(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar li = this.__createItem(item,level,parentMenuItem);\\r\\n\\t\\t\\t\\t\\tparent.appendChild(li);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\t//While Changing this function, see if this change is applicable in __createDynamicItem function\\r\\n\\tNSNavigation.prototype.__createItem = function(item,level,parentMenuItem)\\r\\n\\t{\\r\\n\\t\\tvar li = this.util.createElement(\\\"li\\\",null,\\\"nsNavigationItem\\\");\\r\\n\\t\\tthis.__applyCustomClass(li,\\\"menu\\\");\\r\\n\\t\\tli.setAttribute(\\\"ns-Nav-Level\\\",level);\\r\\n\\t\\tif(item[\\\"cssClass\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(li,item[\\\"cssClass\\\"]);\\r\\n\\t\\t}\\r\\n\\t\\tif(level == 1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addEvent(li,\\\"mouseenter\\\",this.__parentMouseEventHandler.bind(this,item,\\\"mouseenter\\\"));\\r\\n\\t\\t\\t//this.util.addEvent(li,\\\"mouseleave\\\",this.__parentMouseEventHandler.bind(this,item,\\\"mouseleave\\\"));\\r\\n\\t\\t\\t//this.util.addEvent(li,\\\"click\\\",this.__parentMouseEventHandler.bind(this,item,\\\"mouseenter\\\"));\\r\\n\\t\\t}\\r\\n\\t\\titem[this.__fieldElement] = li;\\r\\n\\t\\titem[this.__fieldIsOpen] = false;\\r\\n\\t\\tif(item[\\\"disabled\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(li,\\\"nsNavigationItemDisabled\\\");\\r\\n\\t\\t}\\r\\n\\t\\tvar anchor = this.util.createElement(\\\"a\\\",null);\\r\\n\\t\\tli.appendChild(anchor);\\r\\n\\t\\tif(item[\\\"iconBeforeHtml\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar spanIcon = this.util.createElement(\\\"span\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(spanIcon);\\r\\n\\t\\t\\tspanIcon.innerHTML = item[\\\"iconBeforeHtml\\\"];\\r\\n\\t\\t\\tvar icon = spanIcon.firstChild;\\r\\n\\t\\t\\tanchor.appendChild(icon);\\r\\n\\t\\t\\tanchor.appendChild(this.__domVar.doc.createTextNode(\\\"\\\\u00A0\\\"));\\r\\n\\t\\t}\\r\\n\\t\\tvar spanText = this.util.createElement(\\\"span\\\",null,\\\"nsNavMenuText\\\");\\r\\n\\t\\tthis.util.addStyleClass(spanText,\\\"nsNavNonVisibleIcon\\\");\\r\\n\\t\\tspanText.appendChild(this.__domVar.doc.createTextNode(item[this.__config.titleField]));\\r\\n\\t\\tanchor.appendChild(spanText);\\r\\n\\t\\tif(item[\\\"iconAfterHtml\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar spanIcon = this.util.createElement(\\\"span\\\");\\r\\n\\t\\t\\tspanIcon.innerHTML = item[\\\"iconAfterHtml\\\"];\\r\\n\\t\\t\\tvar icon = spanIcon.firstChild;\\r\\n\\t\\t\\tanchor.appendChild(icon);\\r\\n\\t\\t}\\r\\n\\t\\tvar hasChildren = false;\\r\\n\\t\\tif(this.__hasChildren(item))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addEvent(anchor,\\\"click\\\",this.__parentMenuClickHandler.bind(this,item));\\r\\n\\t\\t\\tthis.util.addStyleClass(li,\\\"nsNavItemParent\\\");\\r\\n\\t\\t\\tanchor.setAttribute(\\\"href\\\",\\\"javascript:void(0)\\\");\\r\\n\\t\\t\\tvar spanIcon = this.util.createElement(\\\"span\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(spanIcon,\\\"nsNavNonVisibleIcon\\\");\\r\\n\\t\\t\\tspanIcon.innerHTML = this.__config.iconMenuExpanded;\\r\\n\\t\\t\\tif(this.__config.iconPosition == \\\"left\\\")\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tanchor.insertBefore(spanIcon,anchor.firstChild);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(spanIcon,\\\"nsNavContainerPullRight\\\");\\r\\n\\t\\t\\t\\tanchor.appendChild(spanIcon);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar ul = this.util.createElement(\\\"ul\\\",null,\\\"nsNavSubNavContainer\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(ul,\\\"nsNavNonVisibleIcon\\\");\\r\\n\\t\\t\\tif(this.__config.enableAnimation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(ul,\\\"nsNavSubNavAnimate\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tli.appendChild(ul);\\r\\n\\t\\t\\titem[this.__fieldChildMenuIconContainer] = spanIcon;\\r\\n\\t\\t\\titem[this.__fieldChildContainer] = ul;\\r\\n\\t\\t\\tthis.__createItems(item[this.__config.childField],ul,level + 1,item);\\r\\n\\t\\t\\thasChildren = true;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setLink(anchor,item[\\\"link\\\"]);\\r\\n\\t\\t\\tthis.__setExtraAttrubtesForLink(anchor,item);\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.addEvent(anchor,\\\"click\\\",this.__menuClickHandler.bind(this,item,li,hasChildren));\\r\\n\\t\\tif(level > 1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(li,\\\"nsNavigationChildItem\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(parentMenuItem)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem[this.__fieldParentMenuItem] = parentMenuItem;\\r\\n\\t\\t}\\r\\n\\t\\tif(item[\\\"selected\\\"] && !item[\\\"disabled\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__selectMenu(item,li,false);\\r\\n\\t\\t\\tthis.__invokeMenuClickHandler(item,li);\\r\\n\\t\\t}\\r\\n\\t\\tif(hasChildren && item[\\\"expanded\\\"] && !item[\\\"disabled\\\"])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__selectMenu(item,li,true);\\r\\n\\t\\t}\\r\\n\\t\\treturn li;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__invokeMenuClickHandler = function(item,li)\\r\\n\\t{\\r\\n\\t\\tli = li || item[this.__fieldElement];\\r\\n\\t\\tif(li)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar anchor = li.querySelector(\\\"a\\\");\\r\\n\\t\\t\\tif(anchor)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tanchor.click();\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__selectMenu = function(item,li,isExpandOnly)\\r\\n\\t{\\r\\n\\t\\tif(!li && item && item[this.__fieldElement])\\r\\n\\t\\t{\\r\\n\\t\\t\\tli = item[this.__fieldElement];\\r\\n\\t\\t}\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar parentMenuItem = item[this.__fieldParentMenuItem];\\r\\n\\t\\t\\tif(isExpandOnly)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparentMenuItem = item;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(li)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__handleSelectedMenu(item,li);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tparentMenuItem = item[this.__fieldParentMenuItem];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\twhile (parentMenuItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(parentMenuItem[this.__fieldElement])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.addStyleClass(parentMenuItem[this.__fieldElement],\\\"nsNavItemOpen\\\");\\r\\n\\t\\t\\t\\t\\tif(parentMenuItem[this.__fieldChildContainer])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tthis.util.addStyleClass(parentMenuItem[this.__fieldChildContainer],\\\"nsNavSubNavContainerVisible\\\");\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tparentMenuItem[this.__fieldIsOpen] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tparentMenuItem = parentMenuItem[this.__fieldParentMenuItem];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__menuClickHandler = function(item,li,hasChildren,event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tif(!hasChildren)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__handleSelectedMenu(item,li);\\r\\n\\t\\t\\tif(item[\\\"click\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (typeof item[\\\"click\\\"] === \\\"string\\\" || item[\\\"click\\\"] instanceof String)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(this.util.isFunction(item[\\\"click\\\"]))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem[\\\"click\\\"] = this.__config.context[item[\\\"click\\\"]];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(item[\\\"click\\\"] && this.util.isFunction(item[\\\"click\\\"]))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\titem[\\\"click\\\"](event,item,li);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t//dont remove it as it is used in React as the page refreshed on click\\r\\n\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\tevent.stopPropagation();\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__toggleIconClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tthis.__destroyDynamicItem();\\r\\n\\t\\tthis.toggleNavigation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__parentMenuClickHandler = function(item,event)\\r\\n\\t{\\r\\n\\t\\tif(item && item[this.__fieldElement])\\r\\n\\t\\t{\\r\\n\\t\\t\\titem[this.__fieldIsOpen] ? this.collapse(item) : this.expand(item);\\r\\n\\t\\t\\tthis.__selectedParentMenuItem = item;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__parentMouseEventHandler = function(item,eventType,event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t//for some reason event.type is coming as load so passing eventType to listener\\r\\n\\t\\tswitch(eventType)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcase \\\"mouseenter\\\":\\r\\n\\t\\t\\t\\tif(item && item[this.__fieldElement] && !this.__isNavOpen)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__createDynamicItem(item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//this.util.addStyleClass(item[this.__fieldElement],\\\"nsNavParentHover\\\");\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase \\\"mouseleave\\\":\\r\\n\\t\\t\\t\\tthis.__destroyDynamicItem();\\r\\n\\t\\t\\t\\t//this.util.removeStyleClass(item[this.__fieldElement],\\\"nsNavParentHover\\\");\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__filterRecord = function(searchText)\\r\\n\\t{\\r\\n\\t\\t if(searchText && searchText.length > 0)\\r\\n\\t\\t {\\r\\n\\t\\t\\t var field = this.__config.titleField;\\r\\n\\t\\t\\t var filter = {};\\r\\n\\t\\t\\t filter[field] = searchText;\\r\\n\\t\\t\\t var setting = {};\\r\\n\\t\\t\\t setting[field] = {caseSensitive:false,multiline:false,matchType:new NSFilter().CONTAINS};\\r\\n\\t\\t\\t this.__handleFiltering(filter,setting);\\r\\n\\t\\t }\\r\\n\\t\\t else\\r\\n\\t\\t {\\r\\n\\t\\t\\t this.__resetFiltering();\\r\\n\\t\\t }\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__resizeContentContainer = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__config.pageContentContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__config.pageContentContainer.style.marginLeft = this.__baseComponent.offsetWidth + \\\"px\\\";\\t\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__getTopOffset = function()\\r\\n\\t{\\r\\n\\t\\tvar offset = 0;\\r\\n\\t\\tif(this.__config.elementsBeforeMenu && this.__config.elementsBeforeMenu.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar length = this.__config.elementsBeforeMenu.length;\\r\\n\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar element = this.__config.elementsBeforeMenu[count];\\r\\n\\t\\t\\t\\tif(element)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\toffset += element.offsetHeight;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__isNavOpen)\\r\\n\\t\\t{\\r\\n\\t\\t\\toffset += this.__headerItemHeight;\\r\\n\\t\\t}\\r\\n\\t\\treturn offset;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__handleFiltering = function(filter,setting,recordLimit)\\r\\n\\t{\\r\\n\\t\\tvar eventParam = {filter:filter,setting:setting,recordLimit:recordLimit};\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSNavigation.FILTER_CHANGING,eventParam,eventParam);\\r\\n\\t\\tthis.__filteredColumn = [];\\r\\n\\t\\tif(filter)\\r\\n\\t    {\\r\\n\\t\\t\\t var isHierarchical = this.__isDataHierarchical;\\r\\n\\t\\t\\t this.__config.dataSource = this.__config.orignalDataSource.slice(0);\\r\\n\\t\\t\\t var source = this.__config.dataSource;\\r\\n\\t\\t   \\t var nsFilter = new NSFilter(source,filter,setting,recordLimit,isHierarchical,this.__config.childField,null,null,[\\\"__ns_nav_field_parentmenuitem\\\"]);//this.__nsGrid.__filterFunction,this.__nsGrid.__hierarchyFilterChildrenFunction\\r\\n\\t\\t   \\t this.__config.dataSource = nsFilter.execute();\\r\\n\\t\\t   \\t this.__renderItems();\\r\\n\\t\\t   \\t this.util.dispatchEvent(this.__baseComponent,NSNavigation.FILTER_CHANGED,eventParam,eventParam);\\r\\n\\t    }\\r\\n\\t};\\r\\n\\r\\n\\tNSNavigation.prototype.__resetFiltering = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__config.orignalDataSource)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSNavigation.FILTER_CHANGING,null,null);\\r\\n\\t\\t\\tthis.__config.dataSource = this.__config.orignalDataSource.slice(0);\\r\\n\\t\\t\\tthis.__renderItems();\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSNavigation.FILTER_CHANGED,null,null);\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSNavigation.FILTER_RESETTED,null,null);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__createDynamicItem = function(item)\\r\\n\\t{\\r\\n\\t\\tthis.__destroyDynamicItem();\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar createChild = function(item,parent,level)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar li = self.util.createElement(\\\"li\\\",null,\\\"nsNavDynamicMenuItem\\\");\\r\\n\\t\\t\\tif(item[\\\"cssClass\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.util.addStyleClass(li,item[\\\"cssClass\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar anchor = self.util.createElement(\\\"a\\\",null);\\r\\n\\t\\t\\tli.appendChild(anchor);\\r\\n\\t\\t\\tif(item[\\\"iconBeforeHtml\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar spanIcon = self.util.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\tself.util.addStyleClass(spanIcon);\\r\\n\\t\\t\\t\\tspanIcon.innerHTML = item[\\\"iconBeforeHtml\\\"];\\r\\n\\t\\t\\t\\tvar icon = spanIcon.firstChild;\\r\\n\\t\\t\\t\\tanchor.appendChild(icon);\\r\\n\\t\\t\\t\\tanchor.appendChild(self.__domVar.doc.createTextNode(\\\"\\\\u00A0\\\"));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar spanText = self.util.createElement(\\\"span\\\",null,\\\"nsNavDynamicMenuText\\\");\\r\\n\\t\\t\\tspanText.appendChild(self.__domVar.doc.createTextNode(item[self.__config.titleField]));\\r\\n\\t\\t\\tanchor.appendChild(spanText);\\r\\n\\t\\t\\tif(item[\\\"iconAfterHtml\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar spanIcon = self.util.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\tspanIcon.innerHTML = item[\\\"iconAfterHtml\\\"];\\r\\n\\t\\t\\t\\tvar icon = spanIcon.firstChild;\\r\\n\\t\\t\\t\\tanchor.appendChild(icon);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar hasChildren = false;\\r\\n\\t\\t\\tif(self.__hasChildren(item))\\r\\n\\t\\t\\t//if(item[self.__config.childField] && item[self.__config.childField].length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tanchor.setAttribute(\\\"href\\\",\\\"javascript:void(0)\\\");\\r\\n\\t\\t\\t\\tvar spanIcon = self.util.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\tself.util.addStyleClass(spanIcon,\\\"nsNavNonVisibleIcon\\\");\\r\\n\\t\\t\\t\\tspanIcon.innerHTML = self.__config.iconMenuExpanded;\\r\\n\\t\\t\\t\\tif(self.__config.iconPosition == \\\"left\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tanchor.insertBefore(spanIcon,anchor.firstChild);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.util.addStyleClass(spanIcon,\\\"nsNavContainerPullRight\\\");\\r\\n\\t\\t\\t\\t\\tanchor.appendChild(spanIcon);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tcreateChildren(item[self.__config.childField],li,level + 1);\\r\\n\\t\\t\\t\\thasChildren = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.__setLink(anchor,item[\\\"link\\\"]);\\r\\n\\t\\t\\t\\tself.__setExtraAttrubtesForLink(anchor,item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tself.util.addEvent(anchor,\\\"click\\\",self.__menuClickHandler.bind(self,item,li,hasChildren));\\r\\n\\t\\t\\tif(item[\\\"disabled\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.util.addStyleClass(li,\\\"nsNavigationItemDisabled\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(parent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tparent.appendChild(li);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn {li:li,anchor:anchor,hasChildren:hasChildren};\\r\\n\\t\\t};\\r\\n\\t\\tvar createChildren = function(arrItems,parent,level)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar ul = self.util.createElement(\\\"ul\\\",null,\\\"nsNavDynamicSubMenuCont\\\");\\r\\n\\t\\t\\tfor(var count = 0;count < arrItems.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item  = arrItems[count];\\r\\n\\t\\t\\t\\tcreateChild(item,ul,level);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tparent.appendChild(ul);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dynamicContainer = this.util.createDiv(this.getID() + \\\"DynamicContainer\\\",\\\"nsNavDynamicContainer\\\");\\r\\n\\t\\tvar spanText = this.util.createElement(\\\"span\\\",null,\\\"nsNavDynamicMenuText\\\");\\r\\n\\t\\tthis.__dynamicContainer.appendChild(spanText);\\r\\n\\t\\tif(this.__hasChildren(item))\\r\\n\\t\\t{\\r\\n\\t\\t\\tspanText.appendChild(this.__domVar.doc.createTextNode(item[this.__config.titleField]));\\r\\n\\t\\t\\tcreateChildren(item[this.__config.childField],this.__dynamicContainer,1);\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(spanText,\\\"nsNavDynamicSubMenuCont\\\");\\r\\n\\t\\t\\tcreateChild(item,spanText,1);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__baseComponent.appendChild(this.__dynamicContainer);\\r\\n\\t\\tvar topOffset = this.__getTopOffset();\\r\\n\\t\\tvar rect = item[this.__fieldElement].getBoundingClientRect();\\r\\n\\t\\tthis.__dynamicContainer.style.top = (rect.top + this.__config.collapseTopOffset - topOffset) + \\\"px\\\"; \\r\\n\\t\\tthis.__dynamicContainer.style.left = (rect.left + this.__navigationContainer.offsetWidth + this.__config.collapseLeftOffset) + \\\"px\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__destroyDynamicItem = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__dynamicContainer && this.__dynamicContainer.parentNode)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__dynamicContainer.parentNode.removeChild(this.__dynamicContainer);\\r\\n\\t\\t\\tthis.__dynamicContainer = null;\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__handleSelectedMenu = function(item,li)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar selectDeselectParent = function(menuItem,isSelect)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(menuItem)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar parentMenuItem = menuItem[self.__fieldParentMenuItem];\\r\\n\\t\\t\\t\\tvar func = isSelect ? self.util.addStyleClass : self.util.removeStyleClass;\\r\\n\\t\\t\\t\\twhile (parentMenuItem)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(parentMenuItem[self.__fieldElement])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tfunc.bind(self.util)(parentMenuItem[self.__fieldElement],self.__config.customClass.selectedParentMenu);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tparentMenuItem = parentMenuItem[self.__fieldParentMenuItem];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tif(!li && item && item[this.__fieldElement])\\r\\n\\t\\t{\\r\\n\\t\\t\\tli = item[this.__fieldElement];\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__selectedMenu)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.removeStyleClass(this.__selectedMenu,this.__config.customClass.selectedMenu);\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSNavigation.NAVIGATION_MENU_DESELECTED,this.__selectedMenuItem,{item:this.__selectedMenuItem,menu:this.__selectedMenu});\\r\\n\\t\\t\\tselectDeselectParent(this.__selectedMenuItem,false);\\r\\n\\t\\t\\tthis.__selectedMenu = null;\\r\\n\\t\\t\\tthis.__selectedMenuItem = null;\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.addStyleClass(li,this.__config.customClass.selectedMenu);\\r\\n\\t\\tselectDeselectParent(item,true);\\r\\n\\t\\tthis.__selectedMenu = li;\\r\\n\\t\\tthis.__selectedMenuItem = item;\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSNavigation.NAVIGATION_MENU_SELECTED,item,{item:item,menu:li});\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__resetVariables = function()\\r\\n\\t{\\r\\n\\t\\tthis.__selectedParentMenuItem = null;\\r\\n\\t\\tthis.__selectedMenu = null;\\r\\n\\t\\tthis.__selectedMenuItem = null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__applyCustomClass = function(element,type)\\r\\n\\t{\\r\\n\\t\\tif(element && type && this.__config.customClass[type])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(element,this.__config.customClass[type]);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__getItemByElement = function(li,source)\\r\\n\\t{\\r\\n\\t\\tvar arrSource = [];\\r\\n\\t\\tif(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isArray(source))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrSource = source;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrSource = [source];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrSource = this.__config.dataSource;\\r\\n\\t\\t}\\r\\n\\t\\tif(li && arrSource && arrSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0;count < arrSource.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrSource[count];\\r\\n\\t\\t\\t\\tif(item[this.__fieldElement] == li)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__hasChildren(item))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar retItem = this.__getItemByElement(li,item[this.__config.childField]);\\r\\n\\t\\t\\t\\t\\tif(retItem)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn retItem;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__getItemByField = function(field,value,source)\\r\\n\\t{\\r\\n\\t\\tvar arrSource = [];\\r\\n\\t\\tif(source)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.util.isArray(source))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrSource = source;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrSource = [source];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\tarrSource = this.__config.dataSource;\\r\\n\\t\\t}\\r\\n\\t\\tif(arrSource && arrSource.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0;count < arrSource.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = arrSource[count];\\r\\n\\t\\t\\t\\tif(item[field] == value)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__hasChildren(item))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar retItem = this.__getItemByField(field,value,item[this.__config.childField]);\\r\\n\\t\\t\\t\\t\\tif(retItem)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn retItem;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__hasChildren = function(item)\\r\\n\\t{\\r\\n\\t\\treturn (item[this.__config.childField] && item[this.__config.childField].length > 0);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__setLink = function(anchor,link)\\r\\n\\t{\\r\\n\\t\\tif(link)\\r\\n\\t\\t{\\r\\n\\t\\t\\tanchor.setAttribute(\\\"href\\\",link);\\r\\n\\t\\t\\tif(this.__config[\\\"extraAttribute\\\"])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tanchor.setAttribute(this.__config[\\\"extraAttribute\\\"],link);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\telse \\r\\n\\t\\t{\\r\\n\\t\\t\\tanchor.setAttribute(\\\"href\\\",\\\"javascript:void(0)\\\");\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.prototype.__setExtraAttrubtesForLink = function(anchor,item) {\\r\\n\\t\\tif(item.attributes) {\\r\\n\\t\\t\\tfor (var prop in item.attributes) {\\r\\n\\t\\t\\t    if (item.attributes.hasOwnProperty(prop)) {\\r\\n\\t\\t\\t        anchor.setAttribute(prop,item.attributes[prop]);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSNavigation.NAVIGATION_OPEN_START = \\\"navigationOpenStart\\\";\\r\\n\\tNSNavigation.NAVIGATION_OPEN_END = \\\"navigationOpenEnd\\\";\\r\\n\\tNSNavigation.NAVIGATION_CLOSE_START = \\\"navigationCloseStart\\\";\\r\\n\\tNSNavigation.NAVIGATION_CLOSE_END = \\\"navigationCloseEnd\\\";\\r\\n\\tNSNavigation.NAVIGATION_MENU_SELECTED = \\\"navigationMenuSelected\\\";\\r\\n\\tNSNavigation.NAVIGATION_MENU_DESELECTED = \\\"navigationMenuDeselected\\\";\\r\\n\\tNSNavigation.FILTER_CHANGING = \\\"filterChanging\\\";\\r\\n\\tNSNavigation.FILTER_CHANGED = \\\"filterChanged\\\";\\r\\n\\tNSNavigation.FILTER_RESETTED = \\\"filterResetted\\\";\\r\\n\\t\\r\\n\\treturn NSNavigation;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSNavigation\\\",NSNavigation);\";","export const NSPlugginsCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\n\\r\\n\\t\\t}\\r\\nvar nsTextEditor = (function()\\r\\n{\\r\\n\\tfunction nsTextEditor(setting,util) \\r\\n\\t{\\r\\n\\t    var input;\\r\\n\\t    var defaultValue;\\r\\n\\t    var self = this;\\r\\n\\t    var prevHtml = null;\\r\\n\\t    \\r\\n\\t    this.init = function() \\r\\n\\t    {\\r\\n\\t    \\tprevHtml = setting.container.innerHTML;\\r\\n\\t    \\tsetting.container.innerHTML = \\\"\\\";\\r\\n\\t    \\tinput = util.createElement(\\\"input\\\",null,\\\"nsTextEditor\\\"); \\r\\n\\t    \\tsetting.container.appendChild(input);\\r\\n\\t    \\tutil.addEvent(input,\\\"keydown\\\",this.handleKeyDown);\\r\\n\\t    \\tutil.addEvent(input,\\\"click\\\",function(event){\\r\\n\\t    \\t\\tevent = util.getEvent(event);\\r\\n\\t    \\t\\tself.setFocus();\\r\\n\\t    \\t\\tevent.stopPropagation();\\r\\n\\t    \\t\\tevent.stopImmediatePropagation();\\r\\n\\t    \\t\\tevent.preventDefault();\\r\\n\\t    \\t});\\r\\n\\t    \\tdefaultValue = setting.defaultValue;\\r\\n\\t      \\tinput.value = defaultValue;\\r\\n\\t      \\tinput.focus();\\r\\n\\t      \\tinput.select();\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.handleKeyDown = function(event) \\r\\n\\t    {\\r\\n\\t    \\tevent = util.getEvent(event);\\r\\n\\t    \\tvar keyCode = util.KEYCODE;\\r\\n\\t    \\tif (event.keyCode == keyCode.LEFT && event.keyCode == keyCode.RIGHT) \\r\\n\\t      \\t{\\r\\n\\t    \\t\\tevent.stopImmediatePropagation();\\r\\n\\t      \\t} \\r\\n\\t      \\tif (event.keyCode == keyCode.ENTER) \\r\\n\\t      \\t{\\r\\n\\t        \\tself.save();\\r\\n\\t      \\t}\\r\\n\\t      \\telse if (event.keyCode == keyCode.TAB) \\r\\n\\t      \\t{\\r\\n\\t      \\t\\tself.save();\\r\\n\\t      \\t\\tevent.preventDefault();\\r\\n\\t      \\t}\\r\\n\\t      \\telse if (event.keyCode == keyCode.ESC) \\r\\n\\t      \\t{\\r\\n\\t        \\tself.cancel();\\r\\n\\t        \\tevent.preventDefault();\\r\\n\\t      \\t} \\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.save = function() \\r\\n\\t    {\\r\\n\\t      \\tsetting.commitChanges(self.getValue());\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.cancel = function() \\r\\n\\t    {\\r\\n\\t      \\tinput.value = defaultValue;\\r\\n\\t      \\tsetting.cancelChanges();\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.destroy = function() \\r\\n\\t    {\\r\\n\\t    \\tif(input && input.parentNode)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tinput.parentNode.removeChild(input);\\r\\n\\t    \\t}\\r\\n\\t    \\tsetting.container.innerHTML = prevHtml;\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.getValue = function() \\r\\n\\t    {\\r\\n\\t      \\treturn input.value;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.setFocus = function()\\r\\n\\t    {\\r\\n\\t    \\tinput.focus();\\r\\n\\t    \\t//setTimeout(function(){input.selectionStart = input.selectionEnd = 10000; }, 0);\\r\\n\\t    \\tinput.selectionEnd = input.selectionStart = input.value.length;\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.hasValueChanged = function() \\r\\n\\t    {\\r\\n\\t      \\treturn (!(input.value == \\\"\\\" && defaultValue == null)) && (input.value != defaultValue);\\r\\n\\t    };\\r\\n\\t\\t\\r\\n\\t    this.validate = function() \\r\\n\\t    {\\r\\n\\t    \\tif(setting.validator)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn setting.validator(input.value);\\r\\n\\t    \\t}\\r\\n\\t      \\treturn {isValid:true,message:null};\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.init();\\r\\n\\t};\\r\\n\\treturn nsTextEditor;\\r\\n})();\\r\\nnsModuleExport(this,\\\"nsTextEditor\\\",nsTextEditor);\\r\\n\\r\\nvar nsTextAreaEditor = (function()\\r\\n{\\r\\n\\tfunction nsTextAreaEditor(setting,util) \\r\\n\\t{\\r\\n\\t    var input, wrapper;\\r\\n\\t    var defaultValue;\\r\\n\\t    var self = this;\\r\\n\\t\\t\\r\\n\\t    this.init = function () \\r\\n\\t    {\\r\\n\\t      \\tvar container = document.body;\\r\\n\\t      \\twrapper = util.createDiv(null,\\\"nsTextAreaEditor\\\");\\r\\n\\t      \\tinput = util.createElement(\\\"textarea\\\",null,\\\"nsTextArea\\\"); \\r\\n\\t      \\tinput.setAttribute(\\\"hidefocus\\\",true);\\r\\n\\t      \\tinput.setAttribute(\\\"rows\\\",5);\\r\\n\\t      \\tutil.addEvent(input,\\\"keydown\\\",this.handleKeyDown);\\r\\n\\t      \\twrapper.appendChild(input);\\r\\n\\t      \\twrapper.appendChild(document.createElement(\\\"br\\\"));\\r\\n\\t      \\tvar buttonWrapper = util.createDiv(null);\\r\\n\\t      \\tbuttonWrapper.style.textAlign = \\\"right\\\";\\r\\n\\t      \\twrapper.appendChild(buttonWrapper);\\r\\n\\t      \\tvar btnSave = util.createElement(\\\"button\\\");\\r\\n\\t      \\tbtnSave.appendChild(document.createTextNode(\\\"Save\\\"));\\r\\n\\t      \\tutil.addEvent(btnSave,\\\"click\\\",this.save);\\r\\n\\t      \\tbuttonWrapper.appendChild(btnSave);\\r\\n\\t      \\tbuttonWrapper.appendChild(document.createTextNode(\\\" \\\"));\\r\\n\\t      \\tvar btnCancel = util.createElement(\\\"button\\\");\\r\\n\\t      \\tbtnCancel.appendChild(document.createTextNode(\\\"Cancel\\\"));\\r\\n\\t      \\tbuttonWrapper.appendChild(btnCancel);\\r\\n\\t      \\tutil.addEvent(btnCancel,\\\"click\\\",this.cancel);\\r\\n\\t      \\tcontainer.appendChild(wrapper);\\t\\r\\n\\t      \\tself.position(setting.position);\\r\\n\\t      \\tdefaultValue = setting.defaultValue;\\r\\n\\t      \\tinput.value = defaultValue;\\r\\n\\t      \\tinput.focus();\\r\\n\\t      \\tinput.select();\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.handleKeyDown = function(event) \\r\\n\\t    {\\r\\n\\t    \\tevent = util.getEvent(event);\\r\\n\\t    \\tvar keyCode = util.KEYCODE;\\r\\n\\t      \\tif (event.keyCode == keyCode.ENTER && event.ctrlKey) \\r\\n\\t      \\t{\\r\\n\\t        \\tself.save();\\r\\n\\t      \\t} \\r\\n\\t      \\telse if (event.keyCode == keyCode.ESC) \\r\\n\\t      \\t{\\r\\n\\t        \\tself.cancel();\\r\\n\\t        \\tevent.preventDefault();\\r\\n\\t      \\t} \\r\\n\\t      \\telse if (event.keyCode == keyCode.TAB) \\r\\n\\t      \\t{\\r\\n\\t      \\t\\tself.cancel();\\r\\n\\t      \\t\\tevent.preventDefault();\\r\\n\\t      \\t}\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.save = function () \\r\\n\\t    {\\r\\n\\t      \\tsetting.commitChanges(self.getValue());\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.cancel = function () \\r\\n\\t    {\\r\\n\\t      \\tinput.value = defaultValue;\\r\\n\\t      \\tsetting.cancelChanges();\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.position = function(position) \\r\\n\\t    {\\r\\n\\t      \\twrapper.style.top = (position.top - 5) + \\\"px\\\";\\r\\n\\t      \\twrapper.style.left = (position.left - 5) + \\\"px\\\";\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.destroy = function() \\r\\n\\t    {\\r\\n\\t    \\twrapper.parentNode.removeChild(wrapper);\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.getValue = function() \\r\\n\\t    {\\r\\n\\t      \\treturn input.value;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    this.setFocus = function()\\r\\n\\t    {\\r\\n\\t    \\tinput.focus();\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.hasValueChanged = function() \\r\\n\\t    {\\r\\n\\t      \\treturn (!(input.value == \\\"\\\" && defaultValue == null)) && (input.value != defaultValue);\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.validate = function() \\r\\n\\t    {\\r\\n\\t    \\tif(setting.validator)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn setting.validator(input.value);\\r\\n\\t    \\t}\\r\\n\\t      \\treturn {isValid:true,message:null};\\r\\n\\t    };\\r\\n\\t\\r\\n\\t    this.init();\\r\\n\\t}\\r\\n\\treturn nsTextAreaEditor;\\r\\n})();\\r\\nnsModuleExport(this,\\\"nsTextAreaEditor\\\",nsTextAreaEditor);\\r\\n\\r\\nvar NSCellSelection = (function()\\r\\n{\\r\\n\\tvar NSCellSelection = function(table,setting)\\r\\n\\t{\\r\\n\\t\\tthis.__table = table;\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__tblBody = null;\\r\\n\\t\\tthis.__scrollableElement = null;\\r\\n\\t\\tthis.__config = null;\\r\\n\\t\\tthis.__initDone = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.__hasFocus = false;\\r\\n\\t\\tthis.__range = null;\\r\\n\\t\\tthis.__deltaX = 0;\\r\\n\\t\\tthis.__deltaY = 0;\\r\\n\\t\\tthis.__selectedCell = null;\\r\\n\\t\\tthis.__lastDirection = null;\\r\\n\\t\\tthis.__handle = null;\\r\\n\\t\\tthis.__lastEditor = null;\\r\\n\\t\\tthis.__isHandleDragged = false;\\r\\n\\t\\t\\r\\n\\t\\tthis.__tblMouseDownRef = null;\\r\\n\\t\\tthis.__tblMouseMoveRef = null;\\r\\n\\t\\tthis.__tblClickRef = null;\\r\\n\\t\\tthis.__tbldblClickRef = null;\\r\\n\\t\\tthis.__documentMouseDownRef = null;\\r\\n\\t\\tthis.__documentMouseUpRef = null;\\r\\n\\t\\tthis.__documentMouseMoveRef = null;\\r\\n\\t\\tthis.__documentKeyEventRef = null;\\r\\n\\t\\tthis.__documentCopyRef = null;\\r\\n\\t\\tthis.__documentPasteRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__table && this.__table.tBodies && this.__table.tBodies.length > 0 && this.__table.tBodies[0].rows.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(this.__table,\\\"nsSelectionTable\\\");\\r\\n\\t\\t\\t\\tthis.__tblBody = this.__table.tBodies[0];\\r\\n\\t\\t\\t\\tif(!this.__setting)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__setting = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tthis.__config = {\\r\\n\\t\\t\\t\\t\\t\\tscrollableElement: this.__setting[\\\"scrollableElement\\\"] || this.__table.parentNode,\\r\\n\\t\\t\\t\\t\\t\\tenableFillHandle: Boolean.parse(this.__setting[\\\"enableFillHandle\\\"]),\\r\\n\\t\\t\\t\\t\\t\\tenableKeyboardNavigation: Boolean.parse(this.__setting[\\\"enableKeyboardNavigation\\\"]),\\r\\n\\t\\t\\t\\t\\t\\tenableCopy: Boolean.parse(this.__setting[\\\"enableCopy\\\"]),\\r\\n\\t\\t\\t\\t\\t\\tenablePaste: Boolean.parse(this.__setting[\\\"enablePaste\\\"]),\\r\\n\\t\\t\\t\\t\\t\\tcellClass: this.__setting[\\\"cellClass\\\"] || \\\"nsCell\\\",\\r\\n\\t\\t\\t\\t\\t\\tareaClass: this.__setting[\\\"areaClass\\\"] || \\\"nsArea\\\",\\r\\n\\t\\t\\t\\t\\t\\teditors: this.__setting[\\\"editors\\\"] || []\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tthis.__config[\\\"areaClassLeft\\\"] = this.__setting[\\\"areaClassLeft\\\"] || (this.__config.areaClass + \\\"-left\\\");\\r\\n\\t\\t\\t\\tthis.__config[\\\"areaClassRight\\\"] = this.__setting[\\\"areaClassRight\\\"] || (this.__config.areaClass + \\\"-right\\\");\\r\\n\\t\\t\\t\\tthis.__config[\\\"areaClassTop\\\"] = this.__setting[\\\"areaClassTop\\\"] || (this.__config.areaClass + \\\"-top\\\");\\r\\n\\t\\t\\t\\tthis.__config[\\\"areaClassBottom\\\"] = this.__setting[\\\"areaClassBottom\\\"] || (this.__config.areaClass + \\\"-bottom\\\");\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tvar colLength = this.__tblBody.rows[0].cells.length;\\r\\n\\t\\t\\t\\tvar editors = this.__config.editors;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < colLength;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(editors.length > count)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar editor = editors[count] || {};\\r\\n\\t\\t\\t\\t\\t\\tif(!editor.type && !editor.customEditor)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\teditors.push({\\\"type\\\":NSCellSelection.EDITORS.TEXT});\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\teditors.push({\\\"type\\\":NSCellSelection.EDITORS.TEXT});\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__scrollableElement = this.__config.scrollableElement;\\r\\n\\t\\t\\t\\tthis.__range = {cursor:null,start:null,topLeft:null,bottomRight:null};\\r\\n\\t\\t\\t\\tif(this.__config.enableFillHandle)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__createHandle();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__tblMouseDownRef && !this.__config.enableFillHandle)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__tblMouseDownRef = this.__tblMouseDownHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__table,\\\"mousedown\\\", this.__tblMouseDownRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__tblClickRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__tblClickRef = this.__tblClickHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__table,\\\"click\\\", this.__tblClickRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__tbldblClickRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__tbldblClickRef = this.__tbldblClickHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__table,\\\"dblclick\\\", this.__tbldblClickRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__documentMouseDownRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__documentMouseDownRef = this.__documentMouseDownHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document,\\\"mousedown\\\", this.__documentMouseDownRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__documentKeyEventRef && this.__config.enableKeyboardNavigation)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__documentKeyEventRef = this.__documentKeyEventHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document,\\\"keypress\\\", this.__documentKeyEventRef);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document,\\\"keyup\\\", this.__documentKeyEventRef);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document,\\\"keydown\\\", this.__documentKeyEventRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__documentCopyRef && this.__config.enableCopy)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__documentCopyRef = this.__documentCopyHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document,\\\"copy\\\", this.__documentCopyRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__documentPasteRef && this.__config.enablePaste)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__documentPasteRef = this.__documentPasteHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document,\\\"paste\\\", this.__documentPasteRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__initDone = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getSelectedRows = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\tif(this.__range.cursor) \\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar range = this.__range;\\r\\n\\t\\t\\t\\tvar arrRows = this.__tblBody.rows;\\r\\n\\t\\t\\t\\tvar length = range.bottomRight.row;\\r\\n\\t\\t\\t\\tfor(var count = range.topLeft.row;count <= length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t   if(arrRows[count])\\r\\n\\t\\t\\t\\t   {\\r\\n\\t\\t\\t\\t   \\t\\tarrReturn.push({rowIndex:count,row:arrRows[count]});\\r\\n\\t\\t\\t\\t   }\\r\\n\\t\\t\\t\\t   else\\r\\n\\t\\t\\t\\t   {\\r\\n\\t\\t\\t\\t    \\tbreak;\\r\\n\\t\\t\\t\\t   }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t\\treturn arrReturn;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getSelectedRowsCells = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\tif(this.__range.cursor) \\r\\n\\t\\t    {\\r\\n\\t\\t\\t\\tvar range = this.__range;\\r\\n\\t\\t\\t\\tvar arrRows = this.getSelectedRows();\\r\\n\\t\\t\\t\\tvar length = arrRows.length;\\r\\n\\t\\t\\t\\tvar arrCells = [];\\r\\n\\t\\t\\t\\tvar arrSelectedCells = [];\\r\\n\\t\\t\\t\\tvar cellLength = range.bottomRight.col;\\r\\n\\t\\t\\t\\tvar row = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\trow = arrRows[count].row;\\r\\n\\t\\t\\t\\t\\tarrCells = row.cells;\\r\\n\\t\\t\\t\\t\\tarrSelectedCells = [];\\r\\n\\t\\t\\t\\t    for(var innerCount = range.topLeft.col;innerCount <= cellLength;innerCount++)\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\tarrSelectedCells.push({rowIndex:arrRows[count].rowIndex,row:row,cellIndex:innerCount,cell:arrCells[innerCount]});\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t\\t\\t    arrReturn.push({rowIndex:arrRows[count].rowIndex,row:row,cellDetails:arrSelectedCells});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t    }\\r\\n\\t\\t\\treturn arrReturn;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getSelectedCellValues = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\tvar arrDetail = this.getSelectedRowsCells();\\r\\n\\t\\t\\tvar arrValues = [];\\r\\n\\t\\t\\tfor(var rowCount = 0;rowCount < arrDetail.length;rowCount++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    var arrCellDetails = arrDetail[rowCount].cellDetails;\\r\\n\\t\\t\\t    var arrValues = [];\\r\\n\\t\\t\\t    for(var cellCount = 0;cellCount < arrCellDetails.length;cellCount++)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tarrValues.push(arrCellDetails[cellCount].cell.innerText);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t    arrReturn.push(arrValues);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrReturn;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.setSelectedCellValues = function(arrValues)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(arrValues)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(!this.util.isArray(arrValues))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrValues = [arrValues];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar arrDetail = this.getSelectedRowsCells();\\r\\n\\t\\t\\t\\tfor(var rowCount = 0;rowCount < arrDetail.length && (rowCount in arrValues);rowCount++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t    var arrCellDetails = arrDetail[rowCount].cellDetails;\\r\\n\\t\\t\\t\\t    var value = arrValues[rowCount];\\r\\n\\t\\t\\t\\t    if(!this.util.isArray(value))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t    \\tvalue = [value];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t    for(var cellCount = 0;cellCount < arrCellDetails.length && (cellCount in value);cellCount++)\\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t\\t\\t    \\tthis.setCellValue(arrCellDetails[cellCount].cell,value[cellCount]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.setCellValue = function(cell,data)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(cell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar row = this.util.findParent(cell,\\\"tr\\\");\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.__table,NSCellSelection.SET_CELL_VALUE,cell,{cellIndex:cell.cellIndex,rowIndex:row.rowIndex,cell:cell,row:row,dataToBeSet:data});\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.selectAll = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__selectCell({row:0,col:0},{row:-1,col:-1});\\r\\n\\t\\t\\tthis.__refreshCells();\\r\\n\\t\\t\\tthis.__refreshPosition();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.deselectAll = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__deSelectCurrentRange();\\r\\n\\t\\t\\tthis.__refreshCells();\\r\\n\\t\\t\\tthis.__refreshPosition();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.selectRange = function(fromRange,toTange)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(fromRange && toTange)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__selectCell(fromRange,toTange);\\r\\n\\t\\t\\t\\tthis.__refreshCells();\\r\\n\\t\\t\\t\\tthis.__refreshPosition();\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.selectCell = function(cellRange)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(cellRange)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__selectCell(cellRange);\\r\\n\\t\\t\\t\\tthis.__refreshCells();\\r\\n\\t\\t\\t\\tthis.__refreshPosition();\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.destroy = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__initDone)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.deselectAll();\\r\\n\\t\\t\\t\\tif(this.__tblMouseDownRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(this.__table,\\\"mousedown\\\", this.__tblMouseDownRef);\\r\\n\\t\\t\\t\\t\\tthis.__tblMouseDownRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__tblClickRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(this.__table,\\\"click\\\", this.__tblClickRef);\\r\\n\\t\\t\\t\\t\\tthis.__tblClickRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__tbldblClickRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(this.__table,\\\"dblclick\\\", this.__tbldblClickRef);\\r\\n\\t\\t\\t\\t\\tthis.__tbldblClickRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__tblMouseMoveRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(this.__table,\\\"mousemove\\\", this.__tblMouseMoveRef);\\r\\n\\t\\t\\t\\t\\tthis.__tblMouseMoveRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__documentMouseDownRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(document,\\\"mousedown\\\", this.__documentMouseDownRef);\\r\\n\\t\\t\\t\\t\\tthis.__documentMouseDownRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__documentMouseUpRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(document,\\\"mouseup\\\", this.__documentMouseUpRef);\\r\\n\\t\\t\\t\\t\\tthis.__documentMouseUpRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t        if(this.__documentMouseMoveRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(document,\\\"mousemove\\\", this.__documentMouseMoveRef);\\r\\n\\t\\t\\t\\t\\tthis.__documentMouseMoveRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__documentKeyEventRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(document,\\\"keypress\\\", this.__documentKeyEventRef);\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(document,\\\"keyup\\\", this.__documentKeyEventRef);\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(document,\\\"keydown\\\", this.__documentKeyEventRef);\\r\\n\\t\\t\\t\\t\\tthis.__documentKeyEventRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__documentCopyRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(document,\\\"copy\\\", this.__documentCopyRef);\\r\\n\\t\\t\\t\\t\\tthis.__documentCopyRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(this.__documentPasteRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeEvent(document,\\\"paste\\\", this.__documentPasteRef);\\r\\n\\t\\t\\t\\t\\tthis.__documentPasteRef = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tthis.__initDone = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__tblMouseDownHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__lastEditor)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\t\\t//var cell = this.__closestCell(target);\\r\\n\\t\\t\\t\\tvar cell = this.util.findParent(target,\\\"TD\\\");\\r\\n\\t\\t        if(cell)\\r\\n\\t\\t        {\\r\\n\\t\\t        \\tthis.__fireSelectionStartEvent();\\r\\n\\t\\t        \\tthis.__selectedCell = cell;\\r\\n\\t\\t        \\tvar position = this.__getCellPosition(cell);\\r\\n\\t\\t\\t        this.__selectCell(position,event.shiftKey);\\r\\n\\t\\t\\t        event.preventDefault();\\r\\n\\t\\t\\t        this.__refreshCells();\\r\\n\\t\\t        }\\r\\n\\t\\t        if(!this.__documentMouseUpRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__documentMouseUpRef = this.__documentMouseUpHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document,\\\"mouseup\\\", this.__documentMouseUpRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t        if(!this.__documentMouseMoveRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__documentMouseMoveRef = this.__documentMouseMoveHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(document,\\\"mousemove\\\", this.__documentMouseMoveRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t        if(!this.__tblMouseMoveRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t        \\tthis.__tblMouseMoveRef = this.__tblMouseMoveHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__table,\\\"mousemove\\\", this.__tblMouseMoveRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__tblMouseMoveHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__movingHandler(event);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__tblClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\tvar cell = this.util.findParent(target,\\\"TD\\\");\\r\\n\\t\\t\\tif (!cell || (this.__lastEditor && this.__lastEditor.__cell == cell)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__lastEditor)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__lastEditor.setFocus();\\t\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t        return;\\r\\n\\t\\t    }\\r\\n\\t\\t\\tif (this.__lastEditor && this.__lastEditor.__cell != cell) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__commitEditorChanges(this.__lastEditor);\\r\\n\\t\\t    }\\r\\n\\t\\t\\tif(this.__config.enableFillHandle && cell)\\r\\n\\t\\t\\t{\\r\\n\\t        \\tthis.__fireSelectionStartEvent();\\r\\n\\t        \\tthis.__selectedCell = cell;\\r\\n\\t        \\tvar position = this.__getCellPosition(cell);\\r\\n\\t\\t        this.__selectCell(position,event.shiftKey);\\r\\n\\t\\t        event.preventDefault();\\r\\n\\t\\t        this.__refreshCells();\\r\\n\\t\\t\\t\\tthis.__repositionHandle(cell);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__tbldblClickHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\tvar cell = this.util.findParent(target,\\\"TD\\\");\\r\\n\\t\\t\\tif(!this.__lastEditor || (this.__lastEditor && this.__lastEditor.__cell != cell))//if(this.__selectedCell != cell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__selectedCell = cell;\\r\\n\\t\\t\\t\\tthis.__handleEditor(this.__selectedCell,event);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentMouseDownHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\tif(this.__setFocus(this.__table === target || (this.__table.compareDocumentPosition(target) & Node.DOCUMENT_POSITION_CONTAINED_BY)))\\r\\n\\t\\t\\t{\\r\\n\\t\\t    \\t//scope.$apply();\\r\\n\\t\\t    }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentMouseMoveHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__repositionScrolls(event,true,true);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentMouseUpHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__documentMouseMoveRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(document,\\\"mousemove\\\",this.__documentMouseMoveRef);\\r\\n\\t\\t\\t\\tthis.__documentMouseMoveRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__documentMouseUpRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(document,\\\"mouseup\\\", this.__documentMouseUpRef);\\r\\n\\t\\t\\t\\tthis.__documentMouseUpRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__tblMouseMoveRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__table,\\\"mousemove\\\",this.__tblMouseMoveRef);\\r\\n\\t\\t\\t\\tthis.__tblMouseMoveRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t/*if(this.__handleDragRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(this.__table,\\\"mousemove\\\", this.__handleDragRef);\\r\\n\\t\\t\\t\\tthis.__handleDragRef = null;\\r\\n\\t\\t\\t}*/\\r\\n\\t\\t\\tthis.__deltaX = 0;\\r\\n\\t\\t\\tthis.__deltaY = 0;\\r\\n\\t\\t\\tthis.__fireSelectionEndEvent();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentKeyEventHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__hasFocus)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\t\\tif(!this.__isKeyStrokeValid(target,this.__table))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(event.type == \\\"keydown\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(event.keyCode === this.util.KEYCODE.ENTER)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__handleEditor(this.__selectedCell,event);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(this.__KeyMoveHandler(event))\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__fireSelectionStartEvent();\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__refreshCells();\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__refreshPosition(event);\\r\\n\\t\\t\\t\\t\\t\\t\\tevent.stopImmediatePropagation();\\r\\n\\t\\t\\t\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t\\t\\t\\t\\tthis.__fireSelectionEndEvent();\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentCopyHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__hasFocus)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\tvar clipboardData = (event.clipboardData || event.originalEvent && event.originalEvent.clipboardData);\\r\\n\\t\\t\\t\\tvar arrData = this.getSelectedCellValues();\\r\\n\\t\\t\\t\\tvar data = this.__formatDataForCopy(arrData);\\r\\n\\t\\t\\t\\tif(clipboardData)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tclipboardData.setData(\\\"text/plain\\\", data);\\r\\n\\t\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t        }\\r\\n\\t\\t\\t\\telse if(window.clipboardData)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\twindow.clipboardData.setData(\\\"Text\\\", data);\\r\\n\\t\\t          \\tevent.preventDefault();\\r\\n\\t\\t        }\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentPasteHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__hasFocus)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\tvar clipboardData = (event.clipboardData || event.originalEvent && event.originalEvent.clipboardData);\\r\\n\\t\\t\\t\\tvar data = null;\\r\\n\\t\\t\\t\\tif(clipboardData)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t    \\tdata = clipboardData.getData(\\\"text/plain\\\");\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\telse if(window.clipboardData)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t        data = window.clipboardData.getData(\\\"Text\\\");\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\tif(!this.util.isUndefined(data))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdata = this.__formatDataForPaste(data);\\r\\n\\t\\t\\t\\t\\tthis.setSelectedCellValues(data);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__createHandle = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__handle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__handle = this.util.createDiv(null,\\\"handle-overlay\\\");\\r\\n\\t\\t\\t\\tthis.__handle.setAttribute(\\\"draggable\\\",true);\\r\\n\\t\\t\\t\\tthis.__table.parentNode.appendChild(this.__handle);\\r\\n\\t\\t\\t\\tif(!this.__handleDragStartRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__handleDragStartRef = this.__handleDragStartHandler.bind(this);\\r\\n\\t\\t\\t\\t\\t//this.util.addEvent(this.__handle,\\\"mousedown\\\", this.__handleDragStartRef);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__handle,\\\"dragstart\\\", this.__handleDragStartRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__handleDragRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__handleDragRef = this.__handleDragHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__handle,\\\"drag\\\", this.__handleDragRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(!this.__handleDragEndRef)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__handleDragEndRef = this.__handleDragEndHandler.bind(this);\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(this.__handle,\\\"dragend\\\", this.__handleDragEndRef);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleDragStartHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__lastEditor)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\t\\tvar cell = this.__getCellFromDragPosition(event);\\r\\n\\t\\t\\t\\t//var cell = this.__closestCell(target);\\r\\n\\t\\t        if(cell)\\r\\n\\t\\t        {\\r\\n\\t\\t        \\tif(this.__isCellSelectionValid(cell))\\r\\n\\t\\t\\t  \\t\\t{\\r\\n\\t\\t        \\t\\tthis.__fireSelectionStartEvent();\\r\\n\\t\\t\\t        \\tthis.__selectedCell = cell;\\r\\n\\t\\t\\t        \\tvar position = this.__getCellPosition(cell);\\r\\n\\t\\t\\t\\t        this.__selectCell(position,event.shiftKey);\\r\\n\\t\\t\\t\\t        this.__refreshCells();\\r\\n\\t\\t\\t\\t        this.__repositionHandle(cell);\\r\\n\\t\\t\\t\\t        event.stopImmediatePropagation();\\r\\n\\t\\t\\t\\t        this.__isHandleDragged = true;\\r\\n\\t\\t\\t  \\t\\t}\\r\\n\\t\\t        \\telse\\r\\n\\t\\t        \\t{\\r\\n\\t\\t        \\t\\tthis.__isHandleDragged = false;\\r\\n\\t\\t        \\t\\tevent.preventDefault();\\r\\n\\t\\t        \\t}\\r\\n\\t\\t        }\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleDragHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__isHandleDragged)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__movingHandler(event);\\r\\n\\t\\t\\t\\tthis.__repositionScrolls(event,true,false);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleDragEndHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__isHandleDragged)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__deltaX = 0;\\r\\n\\t\\t\\t\\tthis.__deltaY = 0;\\r\\n\\t\\t\\t\\tthis.__fireSelectionEndEvent();\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__isHandleDragged = false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__repositionHandle = function(cell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(cell && this.__handle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar rect = cell.getBoundingClientRect();\\r\\n\\t\\t\\t    var newOffset = this.util.getPosition(cell,true);\\r\\n\\t\\t\\t    this.__handle.style.top = (newOffset.top + rect.height - 4) + \\\"px\\\";\\r\\n\\t\\t\\t    this.__handle.style.left = ((newOffset.left + rect.width) - 4) + \\\"px\\\";\\r\\n\\t\\t\\t    this.__handle.style.height = \\\"1px\\\";\\r\\n\\t\\t\\t    this.__handle.style.width = \\\"1px\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleEditor = function(cell,event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(cell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\tvar commitChanges = function(value)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tself.__commitEditorChanges(editor);\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tvar cancelChanges = function()\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tdestroyEditor();\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tvar destroyEditor = function()\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\teditor.destroy();\\r\\n\\t\\t\\t\\t\\tself.__lastEditor = null;\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tvar position = this.__getPosition(cell);\\r\\n\\t\\t\\t\\tvar editorSetting = this.__config.editors[cell.cellIndex];\\r\\n\\t\\t\\t\\tvar editorFunction = (editorSetting.type) ? editorSetting.type.editor : editorSetting.customEditor;\\r\\n\\t\\t\\t\\tvar editorType = (editorSetting.type) ? editorSetting.type.type : \\\"outer\\\";\\r\\n\\t\\t\\t\\tvar setting = {container:cell,position:position,defaultValue:cell.innerText,commitChanges:commitChanges,cancelChanges:cancelChanges,validator:editorSetting.validator};\\r\\n\\t\\t\\t\\tvar editor = new editorFunction(setting,this.util);\\r\\n\\t\\t\\t\\teditor.__cell = cell;\\r\\n\\t\\t\\t\\teditor.__type = editorType;\\r\\n\\t\\t\\t\\teditor.__setting = editorSetting;\\r\\n\\t\\t\\t\\tthis.__lastEditor = editor;\\r\\n\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__commitEditorChanges = function(editor)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar destroyEditor = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\teditor.destroy();\\r\\n\\t\\t\\t\\teditor = null;\\r\\n\\t\\t\\t\\tself.__lastEditor = null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar cell = editor.__cell;\\r\\n\\t\\t\\tvar editorType = editor.__type;\\r\\n\\t\\t\\tvar editorSetting = editor.__setting;\\r\\n\\t\\t\\tvar value = editor.getValue();\\r\\n\\t\\t\\tvar objValidate = editor.validate();\\r\\n\\t\\t\\tif(objValidate.isValid)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar hasValueChanged = editor.hasValueChanged();\\r\\n\\t\\t\\t\\tdestroyEditor();\\r\\n\\t\\t\\t\\tif(hasValueChanged)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.setCellValue(cell,value);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\talert(objValidate.message);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__refreshPosition = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__scrollableElement && this.__selectedCell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cellRect = this.__selectedCell.getBoundingClientRect();\\r\\n\\t\\t\\t\\tvar newOffset = this.util.getPosition(this.__selectedCell,true);\\r\\n\\t\\t\\t\\t//vertical scroll logic\\r\\n\\t\\t\\t \\tvar cellTop = newOffset.top;\\r\\n\\t\\t\\t    var cellBottom = cellTop + cellRect.height;\\r\\n\\t\\t\\t    var scrollerHeight = this.__scrollableElement.clientHeight;\\r\\n\\t\\t\\t    var currentScrollTop = this.__scrollableElement.scrollTop;\\r\\n\\t\\t\\t    // scroll up\\r\\n\\t\\t\\t    if (cellTop < 0)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tif(this.__selectedCell.parentNode.rowIndex < 2)\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tthis.__scrollableElement.scrollTop = 0;\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    \\telse\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tthis.__scrollableElement.scrollTop = currentScrollTop + cellTop;\\t\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t \\t// scroll down\\r\\n\\t\\t\\t    else if (cellBottom  > scrollerHeight)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t        var scrollAmount = cellBottom - scrollerHeight;\\r\\n\\t\\t\\t        this.__scrollableElement.scrollTop = currentScrollTop + scrollAmount;\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t  \\t//horizontal scroll logic\\r\\n\\t\\t\\t    var cellLeft = newOffset.left;\\r\\n\\t\\t\\t    var cellRight = cellLeft + cellRect.width;\\r\\n\\t\\t\\t    var scrollerWidth = this.__scrollableElement.clientWidth;\\r\\n\\t\\t\\t    var currentScrollLeft = this.__scrollableElement.scrollLeft;\\r\\n\\t\\t\\t \\t// scroll Left\\r\\n\\t\\t\\t    if (cellLeft < 0)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tif(this.__selectedCell.cellIndex === 0)\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tthis.__scrollableElement.scrollLeft = 0;\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    \\telse\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tthis.__scrollableElement.scrollLeft = currentScrollLeft + cellLeft;\\t\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t \\t// scroll Right\\r\\n\\t\\t\\t    else if (cellRight  > scrollerWidth)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t        var scrollAmount = cellRight - scrollerWidth;\\r\\n\\t\\t\\t        this.__scrollableElement.scrollLeft = currentScrollLeft + scrollAmount;\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__movingHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\t//var cell = this.__closestCell(target);\\r\\n\\t\\t\\tvar cell = this.util.findParent(target,\\\"TD\\\");\\r\\n\\t\\t\\tif(!cell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cell = this.__getCellFromDragPosition(event);\\r\\n\\t\\t\\t}\\r\\n\\t        if(cell)\\r\\n\\t        {\\r\\n\\t        \\tthis.__selectCell(this.__getCellPosition(cell),true);\\r\\n\\t        \\tthis.__refreshCells();\\r\\n\\t        \\tthis.__repositionHandle(cell);\\r\\n\\t        }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__repositionScrolls = function(event,isVertical,isHorizontal)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar rect = this.__scrollableElement.getBoundingClientRect();\\r\\n\\t\\t\\tif(isHorizontal)\\r\\n\\t\\t\\t{\\r\\n\\t\\t        var width = rect.width;\\r\\n\\t\\t        var xPos = event.clientX - width / 2;\\r\\n\\t\\t        this.__deltaX = xPos * 0.1;\\r\\n\\t\\t        this.__scrollableElement.scrollLeft = this.__scrollableElement.scrollLeft + this.__deltaX;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(isVertical)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar height = rect.height;\\r\\n\\t\\t        var yPos = event.clientY - height / 2;\\r\\n\\t\\t        this.__deltaY = yPos * 0.1;\\r\\n\\t\\t        this.__scrollableElement.scrollTop = this.__scrollableElement.scrollTop + this.__deltaY;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__focus = function()\\r\\n\\t\\t{\\r\\n\\t\\t  if(this.__table.ownerDocument.activeElement)\\r\\n\\t\\t  {\\r\\n\\t\\t\\t this.__table.ownerDocument.activeElement.blur();\\r\\n\\t\\t  }\\r\\n\\t\\t  this.__hasFocus = true;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__blur = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__hasFocus = false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__setFocus = function(enableFocus)\\r\\n\\t\\t{\\r\\n\\t\\t  \\tif(this.__hasFocus != enableFocus)\\r\\n\\t\\t  \\t{\\r\\n\\t\\t\\t    if(enableFocus)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t      \\tthis.__focus();\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    else\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t      \\tthis.__blur();\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    return true;\\r\\n\\t\\t  \\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__selectCell = function(position,isExpanding)\\r\\n\\t\\t{\\r\\n\\t\\t\\t if(position)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t this.__focus();\\r\\n\\t\\t\\t\\t var size = this.__getTotalSize();\\r\\n\\t\\t\\t\\t if(size && size.row && size.col)\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t if(isExpanding && typeof(isExpanding) == \\\"object\\\")\\r\\n\\t\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t\\t isExpanding = this.__getBoundCellPosition(isExpanding,size);\\r\\n\\t\\t\\t\\t\\t }\\r\\n\\t\\t\\t\\t\\t this.__setCurrentRange(this.__getBoundCellPosition(position,size),isExpanding);\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__refreshCells = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__drawCellClass(this.__range.cursor);\\r\\n\\t        var position = {topLeft:this.__range.topLeft,bottomRight:this.__range.bottomRight};\\r\\n\\t        this.__drawAreaClass(position);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__drawAreaClass = function(position)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar cell = null;\\r\\n\\t\\t\\tvar row = null;\\r\\n\\t\\t\\tvar rowIndex = null;\\r\\n\\t\\t  \\tvar colIndex = null;\\r\\n\\t\\t  \\tvar processTable = function(arrElement,arrClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t  \\t\\tif(arrElement && arrElement.length > 0 && arrClass && arrClass.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < arrElement.length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tfor(var innerCount = 0;innerCount < arrClass.length;innerCount++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tself.util.removeStyleClass(arrElement[count],arrClass[innerCount]);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar addStyleClass = function(element,cssClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tself.util.addStyleClass(element,cssClass);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar areaClass = this.__config.areaClass;\\r\\n\\t\\t\\tvar areaClassLeft = this.__config.areaClassLeft;\\r\\n\\t\\t\\tvar areaClassRight = this.__config.areaClassRight;\\r\\n\\t\\t\\tvar areaClassTop = this.__config.areaClassTop;\\r\\n\\t\\t\\tvar areaClassBottom = this.__config.areaClassBottom;\\r\\n\\t\\t\\tprocessTable(this.__table.querySelectorAll(\\\"tbody>tr>td.\\\" + areaClass),[areaClass,areaClassLeft,areaClassRight]);\\r\\n\\t\\t\\tprocessTable(this.__table.querySelectorAll(\\\"colgroup>col.\\\" + areaClass),[areaClass,areaClassLeft,areaClassRight]);\\r\\n\\t\\t\\tprocessTable(this.__table.querySelectorAll(\\\"tbody>tr.\\\" + areaClass),[areaClass,areaClassTop,areaClassBottom]);\\r\\n\\t\\t  \\tif(position && position.topLeft)\\r\\n\\t\\t  \\t{\\r\\n\\t\\t\\t    for(rowIndex = position.topLeft.row,row = this.__tblBody.rows[rowIndex];rowIndex <= position.bottomRight.row && row;rowIndex++,row= this.__tblBody.rows[rowIndex])\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\taddStyleClass(row,areaClass);\\r\\n\\t\\t\\t      \\tif(rowIndex == position.topLeft.row)\\r\\n\\t\\t\\t      \\t{\\r\\n\\t\\t\\t      \\t\\taddStyleClass(row,areaClassTop);\\r\\n\\t\\t\\t      \\t}\\r\\n\\t\\t\\t      \\tif(rowIndex == position.bottomRight.row)\\r\\n\\t\\t\\t      \\t{\\r\\n\\t\\t\\t      \\t\\taddStyleClass(row,areaClassBottom);\\r\\n\\t\\t\\t      \\t}\\r\\n\\t\\t\\t      \\tfor(colIndex = position.topLeft.col,cell = row.cells[colIndex];colIndex <= position.bottomRight.col && cell;colIndex++,cell = row.cells[colIndex])\\r\\n\\t\\t\\t      \\t{\\r\\n\\t\\t\\t      \\t\\taddStyleClass(cell,areaClass);\\r\\n\\t\\t\\t        \\tif(colIndex == position.topLeft.col)\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t        \\t\\taddStyleClass(cell,areaClassLeft);\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t        \\tif(colIndex == position.bottomRight.col)\\r\\n\\t\\t\\t        \\t{\\r\\n\\t\\t\\t        \\t\\taddStyleClass(cell,areaClassRight);\\r\\n\\t\\t\\t        \\t}\\r\\n\\t\\t\\t      \\t}\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    for(colIndex = position.topLeft.col;colIndex <= position.bottomRight.col;colIndex++)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tcell = this.__getColGroup(colIndex);\\r\\n\\t\\t\\t      \\taddStyleClass(cell,areaClass);\\r\\n\\t\\t\\t      \\tif(colIndex == position.topLeft.col)\\r\\n\\t\\t        \\t{\\r\\n\\t\\t        \\t\\taddStyleClass(cell,areaClassLeft);\\r\\n\\t\\t        \\t}\\r\\n\\t\\t        \\tif(colIndex == position.bottomRight.col)\\r\\n\\t\\t        \\t{\\r\\n\\t\\t        \\t\\taddStyleClass(cell,areaClassRight);\\r\\n\\t\\t        \\t}\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t }\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__drawCellClass = function(position)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar cellClass = this.__config.cellClass;\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar processTable = function(arrElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(arrElement && arrElement.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < arrElement.length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tself.util.removeStyleClass(arrElement[count],cellClass);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tprocessTable(this.__table.querySelectorAll(\\\"tbody>tr>td.\\\" + cellClass));\\r\\n\\t\\t\\tprocessTable(this.__table.querySelectorAll(\\\"colgroup>col.\\\" + cellClass));\\r\\n\\t\\t\\tprocessTable(this.__table.querySelectorAll(\\\"tbody>tr.\\\" + cellClass));\\r\\n\\t\\t  \\tif(position)\\r\\n\\t\\t  \\t{\\r\\n\\t\\t    \\tvar cell = this.__getCell(position);\\r\\n\\t\\t    \\tif(cell)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.util.addStyleClass(cell,cellClass);\\r\\n\\t\\t    \\t\\tthis.util.addStyleClass(cell.parentNode,cellClass);\\r\\n\\t\\t    \\t\\tthis.__selectedCell = cell;\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tthis.util.addStyleClass(this.__getColGroup(position.col),cellClass);\\r\\n\\t\\t  \\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__KeyMoveHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t  \\tif(event.ctrlKey || event.metaKey || event.altKey) \\r\\n\\t\\t  \\t{\\r\\n\\t\\t  \\t\\treturn;\\r\\n\\t\\t  \\t}\\r\\n\\t\\t  \\tvar shiftKey = event.shiftKey;\\r\\n\\t\\t  \\tvar keyCode = this.util.KEYCODE;\\r\\n\\t\\t  \\tswitch(event.keyCode)\\r\\n\\t\\t  \\t{\\r\\n\\t\\t\\t  case keyCode.UP:\\r\\n\\t\\t\\t    this.__selectMove({row:-1,col:0},shiftKey);\\r\\n\\t\\t\\t    return true;\\r\\n\\t\\t\\t  case keyCode.DOWN:\\r\\n\\t\\t\\t    this.__selectMove({row:+1,col:0},shiftKey);\\r\\n\\t\\t\\t    return true;\\r\\n\\t\\t\\t  case keyCode.LEFT:\\r\\n\\t\\t\\t    this.__selectMove({row:0,col:-1},shiftKey);\\r\\n\\t\\t\\t    return true;\\r\\n\\t\\t\\t  case keyCode.RIGHT:\\r\\n\\t\\t\\t    this.__selectMove({row:0,col:+1},shiftKey);\\r\\n\\t\\t\\t    return true;\\r\\n\\t\\t\\t  case keyCode.TAB:\\r\\n\\t\\t\\t    this.__selectMove({row:0,col:shiftKey ? -1:+1});\\r\\n\\t\\t\\t    return true;\\r\\n\\t\\t\\t  case keyCode.ESC:\\r\\n\\t\\t\\t\\tthis.__deSelectCurrentRange();\\r\\n\\t\\t    \\treturn true;\\r\\n\\t\\t  \\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isKeyStrokeValid = function(target,validElement)\\r\\n\\t\\t{\\r\\n\\t\\t  \\twhile(target)\\r\\n\\t\\t  \\t{\\r\\n\\t\\t    \\tif(target.tagName == \\\"INPUT\\\" || target.tagName == \\\"TEXTAREA\\\" || target.contentEditable == \\\"true\\\" || target.tagName == \\\"SELECT\\\")\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\treturn true;\\t\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tif(target == validElement)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\treturn false;\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\ttarget = target.parentNode;\\r\\n\\t\\t  \\t}\\r\\n\\t\\t  \\treturn false;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__selectMove = function(move,isExpanding)\\r\\n\\t\\t{\\r\\n\\t\\t  \\tvar cursor = this.__range.cursor || {};\\r\\n\\t\\t  \\tvar size = this.__getTotalSize();\\r\\n\\t\\t  \\tif(!size||!size.row||!size.col)\\r\\n\\t\\t  \\t{\\r\\n\\t\\t      \\treturn;\\r\\n\\t\\t  \\t}\\r\\n\\t\\t  \\tvar position = this.__getBoundCellPosition({row:cursor.row + (move.row || 0),col:cursor.col + (move.col||0)},size);\\r\\n\\t\\t  \\tif(isExpanding && typeof(isExpanding) == \\\"object\\\")\\r\\n\\t\\t  \\t{\\r\\n\\t\\t  \\t\\tisExpanding = this.__getBoundCellPosition(isExpanding,size);\\r\\n\\t\\t  \\t}\\r\\n\\t\\t  \\tthis.__selectCell(position,isExpanding);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getColGroup = function(colIndex)\\r\\n\\t\\t{\\r\\n\\t\\t  \\tif(!this.__colgroup)\\r\\n\\t\\t  \\t{\\r\\n\\t\\t    \\tthis.__colgroup = this.__getElementsSnapshot(this.__table,\\\"colgroup\\\");\\r\\n\\t\\t    \\tif(this.__colgroup && this.__colgroup.length > 0)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\tthis.__colgroup = this.__colgroup[0];\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\tif(!this.__colgroup || this.__colgroup.length === 0)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t      \\t\\tthis.__colgroup = this.__table.ownerDocument.createElement(\\\"colgroup\\\");\\r\\n\\t\\t      \\t\\tthis.__table.appendChild(this.__colgroup);\\r\\n\\t\\t    \\t}\\r\\n\\t\\t  \\t}\\r\\n\\t\\t  \\twhile(!this.__colgroup.children[colIndex])\\r\\n\\t\\t  \\t{\\r\\n\\t\\t    \\tvar col = this.__table.ownerDocument.createElement(\\\"col\\\");\\r\\n\\t\\t    \\tthis.__colgroup.appendChild(col);\\r\\n\\t\\t  \\t}\\r\\n\\t\\t  \\treturn this.__colgroup.children[colIndex];\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__closestCell = function(target)\\r\\n\\t\\t{\\r\\n\\t\\t  \\twhile(target.parentNode)\\r\\n\\t\\t  \\t{\\r\\n\\t\\t    \\tif(target.parentNode.parentNode == this.__tblBody)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t    \\t\\treturn target;\\t\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\ttarget = target.parentNode;\\r\\n\\t\\t  \\t}\\r\\n\\t\\t  \\t\\r\\n\\t\\t  \\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getCellPosition = function(cell)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn {row:cell.parentNode.sectionRowIndex,col:cell.cellIndex};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getTotalSize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\t if(this.__tblBody)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t    var rowLength = this.__tblBody.rows.length;\\r\\n\\t\\t\\t    if(rowLength)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t      \\treturn {row:rowLength,col:this.__tblBody.rows[0].cells.length};\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t return null;\\r\\n\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\tthis.__getBoundCellPosition = function(cellPosition,totalSize)\\r\\n\\t\\t{\\r\\n\\t\\t\\t return {\\r\\n\\t\\t\\t    col: ((isNaN(cellPosition.col)|| cellPosition.col >= totalSize.col) ? 0 : ((cellPosition.col<0) ? totalSize.col - 1 : cellPosition.col)),\\r\\n\\t\\t\\t    row: ((isNaN(cellPosition.row)|| cellPosition.row >= totalSize.row) ? 0 : ((cellPosition.row<0) ? totalSize.row-1 : cellPosition.row))\\r\\n\\t\\t\\t };\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getCell = function(position)\\r\\n\\t\\t{\\r\\n\\t\\t  \\tif(position && this.__tblBody)\\r\\n\\t\\t  \\t{\\r\\n\\t\\t  \\t\\tvar row = this.__tblBody.rows[position.row];\\r\\n\\t\\t\\t\\tif(row && row.cells)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn row.cells[position.col];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t  \\t}\\r\\n\\t\\t  \\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t//range selection methods\\r\\n\\t\\tthis.__setCurrentRange = function(position,isExpanding)\\r\\n\\t\\t{\\r\\n\\t\\t  \\tthis.__range.cursor = this.__hasPositionChanged(this.__range.cursor,{row:position.row,col:position.col});\\r\\n\\t\\t  \\tif(typeof(isExpanding) == \\\"object\\\")\\r\\n\\t\\t  \\t{\\r\\n\\t\\t  \\t\\tthis.__range.start = this.__hasPositionChanged(this.__range.start,{row:isExpanding.row,col:isExpanding.col});\\r\\n\\t\\t  \\t}\\r\\n\\t\\t  \\tif(!isExpanding || !this.__range.start)\\r\\n\\t\\t  \\t{\\r\\n\\t\\t  \\t\\tthis.__range.start = this.__range.topLeft = this.__range.bottomRight = this.__range.cursor;\\r\\n\\t\\t  \\t}\\r\\n\\t\\t  \\telse\\r\\n\\t\\t  \\t{\\r\\n\\t\\t  \\t\\tvar colToLeft = this.__config.enableFillHandle ? this.__range.start.col : Math.min(this.__range.start.col,this.__range.cursor.col);\\r\\n\\t\\t  \\t\\tvar colBottomRight = this.__config.enableFillHandle ? this.__range.start.col : Math.max(this.__range.start.col,this.__range.cursor.col);\\r\\n\\t\\t  \\t\\tthis.__range.topLeft = this.__hasPositionChanged(this.__range.topLeft,{row:Math.min(this.__range.start.row,this.__range.cursor.row),col:colToLeft});\\r\\n\\t\\t  \\t\\tthis.__range.bottomRight = this.__hasPositionChanged(this.__range.bottomRight,{row:Math.max(this.__range.start.row,this.__range.cursor.row),col:colBottomRight});\\r\\n\\t\\t \\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__deSelectCurrentRange = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__range = {};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__hasPositionChanged = function(oldPosition,newPosition)\\r\\n\\t\\t{\\r\\n\\t\\t  \\treturn (!oldPosition || oldPosition.row != newPosition.row || oldPosition.col != newPosition.col) ? newPosition : oldPosition;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isValidRange = function(position)\\r\\n\\t\\t{\\r\\n\\t\\t  \\treturn (this.__range.cursor && this.__range.topLeft.row <= position.row && position.row <= this.__range.bottomRight.row && this.__range.topLeft.col <= position.col && position.col <= this.__range.bottomRight.col);\\r\\n\\t\\t};\\r\\n\\t\\t//end of range selection methods\\r\\n\\t\\tthis.__getElementsSnapshot = function(element,type)\\r\\n\\t\\t{\\r\\n\\t\\t\\ttry\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar xPathResult = element.ownerDocument.evaluate(type,element,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);\\r\\n\\t\\t\\t\\tvar length = xPathResult.snapshotLength;\\r\\n\\t\\t\\t\\tvar arrReturn = new Array(length);\\r\\n\\t\\t\\t\\tfor(var count = 0;count < length; count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrReturn[count] = xPathResult.snapshotItem(count);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn arrReturn;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcatch(error)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__formatDataForCopy = function(arrData)\\r\\n\\t\\t{\\r\\n\\t\\t  \\tif(arrData && arrData.length)\\r\\n\\t\\t  \\t{\\r\\n\\t\\t    \\tvar arrReturn = [];\\r\\n\\t\\t    \\tfor(var count = 0;count < arrData.length;count++)\\r\\n\\t\\t    \\t{\\r\\n\\t\\t      \\t\\tvar arrInner = arrData[count];\\r\\n\\t\\t      \\t\\tvar arrStr = [];\\r\\n\\t\\t      \\t\\tfor(var innerCount = 0;innerCount < arrInner.length;innerCount++)\\r\\n\\t\\t      \\t\\t{\\r\\n\\t\\t        \\t\\tvar str = arrInner[innerCount];\\r\\n\\t\\t        \\t\\tif(this.util.isString(str))\\r\\n\\t\\t        \\t\\t{\\r\\n\\t\\t          \\t\\t\\tif(str.indexOf(\\\"\\\\n\\\") > -1)\\r\\n\\t\\t          \\t\\t\\t{\\r\\n\\t\\t          \\t\\t\\t\\tarrStr.push('\\\"' + str.replace(/\\\"/g, '\\\"\\\"') + '\\\"');\\r\\n\\t\\t          \\t\\t\\t}\\r\\n\\t\\t          \\t\\t\\telse\\r\\n\\t\\t          \\t\\t\\t{\\r\\n\\t\\t          \\t\\t\\t\\tarrStr.push(str);\\r\\n\\t\\t          \\t\\t\\t}\\r\\n\\t\\t        \\t\\t}\\r\\n\\t\\t        \\t\\telse\\r\\n\\t\\t        \\t\\t{\\r\\n\\t\\t        \\t\\t\\tarrStr.push(this.util.isUndefinedOrNull(str) ? \\\"\\\" : str);\\r\\n\\t\\t        \\t\\t}\\r\\n\\t\\t      \\t\\t}\\r\\n\\t\\t      \\t\\tarrReturn.push(arrStr.join(\\\"\\\\t\\\"));\\r\\n\\t\\t    \\t}\\r\\n\\t\\t    \\treturn arrReturn.join(\\\"\\\\n\\\");\\r\\n\\t\\t  \\t}\\r\\n\\t\\t  \\treturn arrData;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__formatDataForPaste = function(data)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar quotes = function(strData) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn (strData.split('\\\"').length - 1) & 1;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif (this.util.isString(data)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrReturn = [];\\r\\n\\t\\t\\t\\tvar arrRows = data.split(\\\"\\\\n\\\");\\r\\n\\t\\t\\t\\tif (arrRows.length && arrRows[arrRows.length - 1] === \\\"\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrRows.pop();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar arrRowData = []; \\r\\n\\t\\t\\t\\tvar isMultiline = false;\\r\\n\\t\\t\\t\\tfor (var rowCount = 0;rowCount < arrRows.length;rowCount++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t   if (!isMultiline) \\r\\n\\t\\t\\t\\t   {\\r\\n\\t\\t\\t\\t    \\tarrRowData = [];\\r\\n\\t\\t\\t\\t      \\tarrReturn.push(arrRowData);\\r\\n\\t\\t\\t\\t   }\\r\\n\\t\\t\\t\\t   var arrColumn = arrRows[rowCount].split(\\\"\\\\t\\\");\\r\\n\\t\\t\\t\\t   for (var colCount = 0;colCount < arrColumn.length;colCount++) \\r\\n\\t\\t\\t\\t   {\\r\\n\\t\\t\\t\\t      var strColumn = arrColumn[colCount];\\r\\n\\t\\t\\t\\t      if (isMultiline && colCount === 0) \\r\\n\\t\\t\\t\\t      {\\r\\n\\t\\t\\t\\t         if (quotes(strColumn)) \\r\\n\\t\\t\\t\\t         {\\r\\n\\t\\t\\t\\t          \\tisMultiline = false;\\r\\n\\t\\t\\t\\t          \\tstrColumn = strColumn.substring(0, strColumn.length - 1).replace(/\\\"\\\"/g, '\\\"');\\r\\n\\t\\t\\t\\t         }\\r\\n\\t\\t\\t\\t         arrRowData[arrRowData.length-1] += \\\"\\\\n\\\" + strColumn;\\r\\n\\t\\t\\t\\t      } \\r\\n\\t\\t\\t\\t      else \\r\\n\\t\\t\\t\\t      {\\r\\n\\t\\t\\t\\t         if(colCount === arrColumn.length - 1 && strColumn.charAt(0)=='\\\"' && quotes(strColumn)) \\r\\n\\t\\t\\t\\t         {\\r\\n\\t\\t\\t\\t        \\tstrColumn = strColumn.substring(1);\\r\\n\\t\\t\\t\\t          \\tisMultiline = true;\\r\\n\\t\\t\\t\\t         } \\r\\n\\t\\t\\t\\t         else \\r\\n\\t\\t\\t\\t         {\\r\\n\\t\\t\\t\\t          \\tisMultiline = false;\\r\\n\\t\\t\\t\\t         }\\r\\n\\t\\t\\t\\t         arrRowData.push(strColumn.replace(/\\\"\\\"/g, '\\\"'));\\r\\n\\t\\t\\t\\t      }\\r\\n\\t\\t\\t\\t   }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn arrReturn;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn data;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getPosition = function(element) \\r\\n\\t\\t{\\r\\n\\t\\t      var position = {\\r\\n\\t\\t        top: element.offsetTop,\\r\\n\\t\\t        left: element.offsetLeft,\\r\\n\\t\\t        bottom: 0,\\r\\n\\t\\t        right: 0,\\r\\n\\t\\t        width: this.util.getOuterWidth(element),\\r\\n\\t\\t        height: this.util.getOuterHeight(element),\\r\\n\\t\\t        visible: true};\\r\\n\\t\\t      position.bottom = position.top + position.height;\\r\\n\\t\\t      position.right = position.left + position.width;\\r\\n\\t\\r\\n\\t\\t      // walk up the tree\\r\\n\\t\\t      var offsetParent = element.offsetParent;\\r\\n\\t\\t      while ((element = element.parentNode) != document.body) \\r\\n\\t\\t      {\\r\\n\\t\\t        if (position.visible && element.scrollHeight != element.offsetHeight && this.util.getStyleValue(element,\\\"overflowY\\\",false) != \\\"visible\\\") \\r\\n\\t\\t        {\\r\\n\\t\\t          \\tposition.visible = position.bottom > element.scrollTop && position.top < element.scrollTop + element.clientHeight;\\r\\n\\t\\t        }\\r\\n\\t\\t        if (position.visible && element.scrollWidth != element.offsetWidth && this.util.getStyleValue(element,\\\"overflowX\\\",false) != \\\"visible\\\") \\r\\n\\t\\t        {\\r\\n\\t\\t          \\tposition.visible = position.right > element.scrollLeft && position.left < element.scrollLeft + element.clientWidth;\\r\\n\\t\\t        }\\r\\n\\t\\t        position.left -= element.scrollLeft;\\r\\n\\t\\t        position.top -= element.scrollTop;\\r\\n\\t\\t        if (element === offsetParent) \\r\\n\\t\\t        {\\r\\n\\t\\t          \\tposition.left += element.offsetLeft;\\r\\n\\t\\t          \\tposition.top += element.offsetTop;\\r\\n\\t\\t          \\toffsetParent = element.offsetParent;\\r\\n\\t\\t        }\\r\\n\\t\\t        position.bottom = position.top + position.height;\\r\\n\\t\\t        position.right = position.left + position.width;\\r\\n\\t\\t      }\\r\\n\\t\\r\\n\\t\\t      return position;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isCellSelectionValid = function(cell)\\r\\n\\t\\t{\\r\\n\\t  \\t\\tvar row = this.util.findParent(cell,\\\"tr\\\");\\t\\r\\n\\t  \\t\\tvar cancelled = this.util.dispatchEvent(this.__table,NSCellSelection.CELL_SELECTABLE,cell,{cellIndex:cell.cellIndex,rowIndex:row.rowIndex,cell:cell,row:row},true,true);\\r\\n\\t  \\t\\treturn !cancelled;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getCellFromDragPosition = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar offSet = this.util.getOffSet(this.__scrollableElement);\\r\\n\\t\\t\\tvar arrElements = getElementsUnderPoint(event.pageX - offSet.left,event.pageY - offSet.top);\\r\\n\\t\\t\\tif(arrElements && arrElements.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrElements.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(arrElements[count] && arrElements[count].nodeName == \\\"TD\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn arrElements[count];\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn null;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__getElementsUnderPoint = function(xPos,yPos)\\r\\n\\t\\t{\\r\\n\\t\\t     var stack = [];\\r\\n\\t\\t     var elementMouseIsOver = document.elementFromPoint(xPos,yPos);\\r\\n\\t\\t     stack.push(elementMouseIsOver);\\r\\n\\t\\t\\t while (elementMouseIsOver && elementMouseIsOver.tagName !== 'HTML')\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t     elementMouseIsOver.classList.add('pointerEventsNone');\\r\\n\\t\\t\\t     elementMouseIsOver = document.elementFromPoint(xPos,yPos);\\r\\n\\t\\t\\t     stack.push(elementMouseIsOver);\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t for(count = 0;count < stack.length; count++) \\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t if(stack[count])\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t stack[count].classList.remove('pointerEventsNone');\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t return stack;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__fireSelectionStartEvent = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__table,NSCellSelection.SELECTION_START,null,null);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__fireSelectionEndEvent = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrCells = this.getSelectedRowsCells();\\r\\n\\t\\t\\tif(arrCells && arrCells.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.__table,NSCellSelection.SELECTION_END,arrCells,{selectedCells:arrCells});\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\tNSCellSelection.SELECTION_START = \\\"selectionStart\\\";\\r\\n\\tNSCellSelection.SELECTION_END = \\\"selectionEnd\\\";\\r\\n\\tNSCellSelection.SET_CELL_VALUE = \\\"setCellValue\\\";\\r\\n\\tNSCellSelection.CELL_SELECTABLE = \\\"cellSelectable\\\";\\r\\n\\tNSCellSelection.EDITORS = {\\\"TEXT\\\":{editor:nsTextEditor,type:\\\"inner\\\"},\\\"TEXTAREA\\\":{editor:nsTextAreaEditor,type:\\\"outer\\\"}};\\r\\n\\t\\r\\n\\treturn NSCellSelection;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSCellSelection\\\",NSCellSelection);\\r\\n\\r\\nvar NSTableCellNavigator = (function()\\r\\n{\\r\\n\\tvar NSTableCellNavigator = function(table,setting)\\r\\n\\t{\\r\\n\\t\\tthis.__table = table;\\r\\n\\t\\tthis.__setting = setting; \\r\\n\\t\\tthis.__scrollableElement = null;\\r\\n\\t\\tthis.util = new NSUtil();\\r\\n\\t\\tthis.__tblBody = null;\\r\\n\\t\\tthis.__selectedCell = null;\\r\\n\\t\\tthis.__lastDirection = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentKeyEventRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.setSelectedCell = function(cell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__selectedCell = cell;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.getSelectedCell = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn this.__selectedCell;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.destroy = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__documentKeyEventRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeEvent(document,\\\"keydown\\\", this.__documentKeyEventRef);\\r\\n\\t\\t\\t\\tthis.__documentKeyEventRef = null;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!this.__setting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__setting = {scrollableElement: null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__scrollableElement = this.__setting.scrollableElement;\\r\\n\\t\\t\\tif(this.__table.tBodies && this.__table.tBodies.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__tblBody = this.__table.tBodies[0];\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__scrollableElement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__scrollableElement = this.__table.parentNode;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar arrCell = this.__tblBody ? this.__tblBody.querySelectorAll(\\\"td\\\") : this.__table.querySelectorAll(\\\"td\\\");\\r\\n\\t\\t\\tif(arrCell && arrCell.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cell = null;\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrCell.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcell = arrCell[count];\\r\\n\\t\\t\\t\\t\\tthis.util.addEvent(cell,\\\"click\\\",this.__cellClickListener.bind(this));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!this.__documentKeyEventRef)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__documentKeyEventRef = this.__documentKeyEventHandler.bind(this);\\r\\n\\t\\t\\t\\tthis.util.addEvent(document,\\\"keydown\\\", this.__documentKeyEventRef);\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__cellClickListener = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\ttarget = this.util.getTarget(event);\\r\\n\\t\\t\\tvar selectedCell = this.util.findParent(target,\\\"td\\\");\\r\\n\\t\\t\\tif(selectedCell)\\r\\n\\t\\t  \\t{\\r\\n\\t\\t  \\t\\tif(this.__isCellSelectionValid(selectedCell))\\r\\n\\t\\t  \\t\\t{\\r\\n\\t\\t  \\t\\t\\tthis.__handleSelection(selectedCell,true,event);\\t\\r\\n\\t\\t  \\t\\t}\\r\\n\\t\\t  \\t\\telse\\r\\n\\t\\t  \\t\\t{\\r\\n\\t\\t  \\t\\t\\tthis.__fireUnselectEvent(true,event);\\r\\n\\t\\t  \\t\\t}\\r\\n\\t\\t  \\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__documentKeyEventHandler = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\t\\tif(target)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar hasFocus = this.util.isChildInParent(this.__table,target);\\r\\n\\t\\t\\t\\tif(hasFocus && (!setting.keyNavigationValid || setting.keyNavigationValid(event,this.__selectedCell)))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__keyEventHandler.bind(this)(event);\\r\\n\\t\\t\\t\\t\\tthis.__refreshPosition(event);\\r\\n\\t\\t\\t\\t\\tevent.preventDefault();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__keyEventHandler = function(event) \\r\\n\\t\\t{\\r\\n\\t\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\t  \\tif(!this.__selectedCell) \\r\\n\\t\\t  \\t{\\r\\n\\t\\t  \\t\\treturn;\\r\\n\\t\\t  \\t}\\r\\n\\t\\t  \\tvar keyCode = this.util.KEYCODE;\\r\\n\\t\\t  \\tvar selectedCell = null;\\r\\n\\t\\t  \\tswitch(event.keyCode)\\r\\n\\t\\t  \\t{\\r\\n\\t\\t\\t  case keyCode.UP:\\r\\n\\t\\t\\t\\tvar index = this.__selectedCell.cellIndex;\\r\\n\\t\\t\\t\\tvar nextRow = this.__selectedCell.parentElement.previousElementSibling;\\r\\n\\t\\t\\t\\tif (nextRow != null) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tselectedCell = nextRow.cells[index];\\r\\n\\t\\t\\t\\t\\tthis.__lastDirection = \\\"vertical\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t  case keyCode.DOWN:\\r\\n\\t\\t\\t\\tvar index = this.__selectedCell.cellIndex;\\r\\n\\t\\t\\t\\tvar nextRow = this.__selectedCell.parentElement.nextElementSibling;\\r\\n\\t\\t\\t\\tif (nextRow != null) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tselectedCell = nextRow.cells[index];\\r\\n\\t\\t\\t\\t\\tthis.__lastDirection = \\\"vertical\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t  case keyCode.LEFT:\\r\\n\\t\\t\\t\\tselectedCell = this.__selectedCell.previousElementSibling;\\r\\n\\t\\t\\t\\tthis.__lastDirection = \\\"horizontal\\\";\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t  case keyCode.RIGHT:\\r\\n\\t\\t\\t\\tselectedCell = this.__selectedCell.nextElementSibling;\\r\\n\\t\\t\\t\\tthis.__lastDirection = \\\"horizontal\\\";\\r\\n\\t\\t  \\t}\\r\\n\\t\\t  \\tif(selectedCell)\\r\\n\\t\\t  \\t{\\r\\n\\t\\t  \\t\\tif(this.__isCellSelectionValid(selectedCell))\\r\\n\\t\\t  \\t\\t{\\r\\n\\t\\t  \\t\\t\\tthis.__handleSelection(selectedCell,false,event);\\t\\r\\n\\t\\t  \\t\\t}\\r\\n\\t\\t  \\t\\telse\\r\\n\\t\\t  \\t\\t{\\r\\n\\t\\t  \\t\\t\\tthis.__fireUnselectEvent(false,event);\\r\\n\\t\\t  \\t\\t\\tthis.__selectedCell = selectedCell;\\r\\n\\t\\t  \\t\\t\\tthis.__keyEventHandler(event);\\r\\n\\t\\t  \\t\\t}\\r\\n\\t\\t  \\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__handleSelection = function(cell,isMouseSelection,propagatingEvent) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(cell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__fireUnselectEvent(isMouseSelection,propagatingEvent);\\r\\n\\t\\t\\t\\tcell.focus();\\r\\n\\t\\t\\t\\tvar row = this.util.findParent(cell,\\\"tr\\\");\\t\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.__table,NSTableCellNavigator.CELL_SELECTED,cell,{cellIndex:cell.cellIndex,rowIndex:row.rowIndex,cell:cell,row:row,isMouseSelection:isMouseSelection,propagatingEvent:propagatingEvent});\\r\\n\\t\\t\\t\\tthis.__selectedCell = cell;\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__fireUnselectEvent = function(isMouseSelection,propagatingEvent) \\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__selectedCell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__selectedCell.focus();\\r\\n\\t\\t\\t\\tvar oldRow = this.util.findParent(this.__selectedCell,\\\"tr\\\");\\t\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.__table,NSTableCellNavigator.CELL_UNSELECTED,this.__selectedCell,{cellIndex:this.__selectedCell.cellIndex,rowIndex:oldRow.rowIndex,cell:this.__selectedCell,row:oldRow,isMouseSelection:isMouseSelection,propagatingEvent:propagatingEvent});\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__isCellSelectionValid = function(cell)\\r\\n\\t\\t{\\r\\n\\t  \\t\\tvar row = this.util.findParent(cell,\\\"tr\\\");\\t\\r\\n\\t  \\t\\tvar cancelled = this.util.dispatchEvent(this.__table,NSTableCellNavigator.CELL_SELECTABLE,cell,{cellIndex:cell.cellIndex,rowIndex:row.rowIndex,cell:cell,row:row},true,true);\\r\\n\\t  \\t\\treturn !cancelled;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tthis.__refreshPosition = function(event)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__scrollableElement && this.__selectedCell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar cellRect = this.__selectedCell.getBoundingClientRect();\\r\\n\\t\\t\\t\\tvar newOffset = this.util.getPosition(this.__selectedCell,true);\\r\\n\\t\\t\\t\\t//vertical scroll logic\\r\\n\\t\\t\\t \\tvar cellTop = newOffset.top;\\r\\n\\t\\t\\t    var cellBottom = cellTop + cellRect.height;\\r\\n\\t\\t\\t    var scrollerHeight = this.__scrollableElement.clientHeight;\\r\\n\\t\\t\\t    var currentScrollTop = this.__scrollableElement.scrollTop;\\r\\n\\t\\t\\t    // scroll up\\r\\n\\t\\t\\t    if (cellTop < 0)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tif(this.__selectedCell.parentNode.rowIndex < 2)\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tthis.__scrollableElement.scrollTop = 0;\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    \\telse\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tthis.__scrollableElement.scrollTop = currentScrollTop + cellTop;\\t\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t \\t// scroll down\\r\\n\\t\\t\\t    else if (cellBottom  > scrollerHeight)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t        var scrollAmount = cellBottom - scrollerHeight;\\r\\n\\t\\t\\t        this.__scrollableElement.scrollTop = currentScrollTop + scrollAmount;\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t  \\t//horizontal scroll logic\\r\\n\\t\\t\\t    var cellLeft = newOffset.left;\\r\\n\\t\\t\\t    var cellRight = cellLeft + cellRect.width;\\r\\n\\t\\t\\t    var scrollerWidth = this.__scrollableElement.clientWidth;\\r\\n\\t\\t\\t    var currentScrollLeft = this.__scrollableElement.scrollLeft;\\r\\n\\t\\t\\t \\t// scroll Left\\r\\n\\t\\t\\t    if (cellLeft < 0)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tif(this.__selectedCell.cellIndex === 0)\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tthis.__scrollableElement.scrollLeft = 0;\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    \\telse\\r\\n\\t\\t\\t    \\t{\\r\\n\\t\\t\\t    \\t\\tthis.__scrollableElement.scrollLeft = currentScrollLeft + cellLeft;\\t\\r\\n\\t\\t\\t    \\t}\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t \\t// scroll Right\\r\\n\\t\\t\\t    else if (cellRight  > scrollerWidth)\\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t        var scrollAmount = cellRight - scrollerWidth;\\r\\n\\t\\t\\t        this.__scrollableElement.scrollLeft = currentScrollLeft + scrollAmount;\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\tthis.__initialize();\\r\\n\\t};\\r\\n\\tNSTableCellNavigator.CELL_SELECTED = \\\"cellSelected\\\";\\r\\n\\tNSTableCellNavigator.CELL_UNSELECTED = \\\"cellUnselected\\\";\\r\\n\\tNSTableCellNavigator.CELL_SELECTABLE = \\\"cellSelectable\\\";\\r\\n\\t\\r\\n\\treturn NSTableCellNavigator;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSTableCellNavigator\\\",NSTableCellNavigator);\";","export const NSXlsxExportCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\n\\r\\n\\t\\t}\\r\\nvar NSZip = (function()\\r\\n{\\r\\n\\tvar NSZip = function(config)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar setting = {};\\r\\n\\t    \\r\\n\\t    var objFiles = {};\\r\\n\\t    var util = null;\\r\\n\\t\\t\\r\\n\\t\\tvar initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!config)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t/*setting = {\\r\\n\\t\\t\\t\\tfileName: config[\\\"fileName\\\"] || \\\"download\\\",\\r\\n\\t\\t\\t\\tmimeType: config[\\\"mimeType\\\"] || \\\"application/zip\\\"\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif (setting.fileName.indexOf(\\\".\\\") === -1) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetting.fileName = setting.fileName + \\\".zip\\\";\\r\\n\\t        }*/\\r\\n\\t\\t\\tutil = new ZipUtil();\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getFile = function(type,mimeType)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar objRet = null;\\r\\n\\t\\t\\ttype = type ? type : \\\"blob\\\";\\r\\n\\t\\t\\tswitch(type) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase \\\"blob\\\":\\r\\n\\t\\t\\t\\t\\tobjRet = getBlob(mimeType);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn objRet;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar addFolders = function(arrPath)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar arrReturn = null;\\r\\n\\t\\t\\tif(arrPath && arrPath.length > 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrReturn = [];\\r\\n\\t\\t\\t\\tfor(var index = 0;index < arrPath.length;index++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tarrReturn.push(addFolder(arrPath[index]));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn arrReturn;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar addFolder = function(path)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn createFolder(path);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar addFile = function(path,content,prop)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn createFile(path,content,prop,false);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar createFolder = function(path)\\r\\n\\t\\t{\\r\\n\\t\\t\\tpath = util.addSlashAtEnd(path);\\r\\n\\t\\t\\tif(objFiles[path])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn objFiles[path].zipFile;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn createFile(path,null,null,true);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar createFile = function(path,content,prop,isDir)\\r\\n\\t\\t{\\r\\n\\t\\t\\tprop = prop ? prop : {};\\r\\n\\t\\t\\tvar item = {path: path,content: content,origContent: content};\\r\\n\\t\\t\\titem.created = new Date();\\r\\n\\t\\t\\titem.dataType = util.getDataType(content);\\r\\n\\t\\t\\titem.isDir = isDir ? true : false;\\r\\n\\t\\t\\tvar parent = util.getParentFolder(path);\\r\\n\\t\\t\\tif(parent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcreateFolder(parent);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem.isBase64 = (item.type == \\\"base64\\\");\\r\\n\\t\\t\\titem.isBinary = (item.type == \\\"binary\\\");\\r\\n\\t\\t\\tvar isUnicodeString = (item.dataType === \\\"string\\\") && item.isBase64 && item.isBinary;\\r\\n\\t\\t\\tif (item.type != \\\"binary\\\") \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem.isBinary = !isUnicodeString;\\r\\n\\t\\t    }\\r\\n\\t\\t\\tif(item.isDir || !path || !path.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem.dataType = \\\"string\\\";\\r\\n\\t\\t\\t\\titem.isBase64 = false;\\r\\n\\t\\t\\t\\titem.isBinary = true;\\r\\n\\t\\t\\t\\titem.content = \\\"\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\titem.content = getContent(item);\\r\\n\\t\\t\\tvar zipFile = new ZipFile(util,item,self);\\r\\n\\t\\t\\tobjFiles[path] = {item: item,zipFile: zipFile};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn zipFile;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getContent = function(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar refine = function(data)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar dataType = item.dataType;\\r\\n\\t\\t\\t\\tif(dataType)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(dataType === \\\"string\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(item.isBase64)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tdata = util.base64Decode(data);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if(item.isBinary)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t/*var arrData = new Uint8Array(data.length);\\r\\n\\t\\t\\t\\t\\t\\t\\tdata = util.fillArrayWithString(data,arrData);*/\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if (dataType === \\\"arraybuffer\\\") \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t            data = new Uint8Array(item);\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tconsole.warn(\\\"DataType cannot be detected for file \\\" + item.path);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn data;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar content = item.content;\\r\\n\\t\\t\\tvar isBlob = (content instanceof Blob || ['[object File]', '[object Blob]'].indexOf(Object.prototype.toString.call(content)) !== -1);\\r\\n\\t        if(isBlob && typeof FileReader !== \\\"undefined\\\") \\r\\n\\t        {\\r\\n\\t        \\treturn new Promise(function (resolve, reject) \\r\\n\\t        \\t{\\r\\n\\t                var reader = new FileReader();\\r\\n\\t                reader.onload = function(event) \\r\\n\\t                {\\r\\n\\t                \\titem.content = refine(event.target.result);\\r\\n\\t                \\tresolve(event.target.result);\\r\\n\\t                };\\r\\n\\t                reader.onerror = function(event) \\r\\n\\t                {\\r\\n\\t                \\tconsole.error(event.target.error);\\r\\n\\t                    reject(event.target.error);\\r\\n\\t                };\\r\\n\\t                reader.readAsArrayBuffer(content);\\r\\n\\t        \\t});\\r\\n\\t        }\\r\\n\\t        return refine(content);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar clear = function()\\r\\n\\t\\t{\\r\\n\\t\\t     objFiles = {};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getBlob = function(mimeType)\\r\\n\\t\\t{\\r\\n\\t\\t\\tmimeType = mimeType ? mimeType : \\\"application/zip\\\";\\r\\n\\t\\t\\tvar textOutput = buildFileStream();\\r\\n\\t\\t\\tvar uInt8Output  = util.buildUint8Array(textOutput);\\r\\n\\t\\t\\tclear();\\r\\n\\t\\t\\treturn new Blob([uInt8Output], { type: setting.mimeType });\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar buildFileStream = function(initContent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tinitContent = initContent ? initContent : \\\"\\\";\\r\\n\\t\\t\\tvar len = Object.keys(objFiles).length;\\r\\n\\t\\t\\tvar middleContent = \\\"\\\";\\r\\n\\t\\t\\tvar lL = 0;\\r\\n\\t        var cL = 0;\\r\\n\\t        for(var path in objFiles)\\r\\n\\t\\t\\t{\\r\\n\\t        \\tvar file = objFiles[path].item;\\r\\n\\t\\t\\t\\tvar objHeader = getHeader(file, lL);\\r\\n\\t\\t\\t\\tvar fileHeader = objHeader.fileHeader;\\r\\n\\t\\t\\t\\tvar folderHeader = objHeader.folderHeader;\\r\\n\\t\\t\\t\\tvar content = objHeader.content;\\r\\n\\t\\t\\t\\tlL += fileHeader.length + content.length;\\r\\n\\t            cL += folderHeader.length;\\r\\n\\t            initContent +=  fileHeader + content;\\r\\n\\t            middleContent += folderHeader;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar endContent = buildFolderEnd(len, cL, lL);\\r\\n\\t        return initContent + middleContent + endContent;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getHeader = function(file,offset)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar content = util.utf8_encode(file.content);\\r\\n\\t\\t\\tvar path = file.path;\\r\\n\\t\\t\\tvar created = file.created;\\r\\n\\t\\t\\tvar utfPath = util.utf8_encode(path);\\r\\n\\t\\t\\tvar isUTF8 = (utfPath !== path);\\r\\n\\t\\t\\tvar time = util.convertTime(created);\\r\\n\\t\\t    var dt = util.convertDate(created);\\r\\n\\t\\t    var extraFields = \\\"\\\";\\r\\n\\t\\t    if (isUTF8) \\r\\n\\t\\t    {\\r\\n\\t            var uExtraFieldPath = util.decToHex(1, 1) + util.decToHex(util.getFromCrc32Table(utfPath), 4) + utfPath;\\r\\n\\t            extraFields = \\\"\\\\x75\\\\x70\\\" + util.decToHex(uExtraFieldPath.length, 2) + uExtraFieldPath;\\r\\n\\t        }\\r\\n\\t\\t    var header = '\\\\x0A\\\\x00' +\\r\\n\\t        (isUTF8 ? '\\\\x00\\\\x08' : '\\\\x00\\\\x00') + // general purpose bit flag\\r\\n\\t        '\\\\x00\\\\x00' +\\r\\n\\t        util.decToHex(time, 2) + // last modified time\\r\\n\\t        util.decToHex(dt, 2) + // last modified date\\r\\n\\t        util.decToHex(content ? util.getFromCrc32Table(content) : 0, 4) +\\r\\n\\t        util.decToHex(content ? content.length : 0, 4) + // compressed size\\r\\n\\t        util.decToHex(content ? content.length : 0, 4) + // uncompressed size\\r\\n\\t        util.decToHex(utfPath.length, 2) + // file name length\\r\\n\\t        util.decToHex(extraFields.length, 2); // extra field length\\r\\n\\t        \\r\\n\\t\\t    var fileHeader = 'PK\\\\x03\\\\x04' + header + utfPath + extraFields;\\r\\n\\t        var folderHeader = 'PK\\\\x01\\\\x02' + // central header\\r\\n\\t            '\\\\x14\\\\x00' +\\r\\n\\t            header + // file header\\r\\n\\t            '\\\\x00\\\\x00' +\\r\\n\\t            '\\\\x00\\\\x00' +\\r\\n\\t            '\\\\x00\\\\x00' +\\r\\n\\t            (content ? '\\\\x00\\\\x00\\\\x00\\\\x00' : '\\\\x10\\\\x00\\\\x00\\\\x00') + // external file attributes\\r\\n\\t            util.decToHex(offset, 4) + // relative offset of local header\\r\\n\\t            utfPath + // file name\\r\\n\\t            extraFields; // extra field\\r\\n\\t        return { fileHeader: fileHeader, folderHeader: folderHeader, content: content || '' };\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar buildFolderEnd = function(totalEntries,size,startOffset)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar retValue = \\\"PK\\\\x05\\\\x06\\\" + \\\"\\\\x00\\\\x00\\\" + \\\"\\\\x00\\\\x00\\\";\\r\\n\\t\\t\\tretValue += util.decToHex(totalEntries, 2);\\r\\n\\t\\t\\tretValue += util.decToHex(totalEntries, 2);\\r\\n\\t\\t\\tretValue += util.decToHex(size, 4);\\r\\n\\t\\t\\tretValue += util.decToHex(startOffset, 4);\\r\\n\\t\\t\\tretValue += \\\"\\\\x00\\\\x00\\\";\\r\\n\\t\\t\\treturn retValue;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t    var downloadFile = function(fileName,mimeType,type,content)\\r\\n\\t    {\\r\\n\\t    \\tfileName = fileName ? fileName : \\\"download\\\";\\r\\n\\t    \\tif (fileName.indexOf(\\\".\\\") === -1) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfileName = fileName + \\\".zip\\\";\\r\\n\\t        }\\r\\n\\t    \\tcontent = content ? content : getFile(type,mimeType);\\r\\n\\t    \\tutil.downloadFile(fileName,content);\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    var ZipFile = function(util,item,objRoot)\\r\\n\\t    {\\r\\n\\t    \\tvar self = this;\\r\\n\\t    \\t\\r\\n\\t    \\tvar addFolder = function(path)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn objRoot.addFolder(getPath(path));\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tvar addFile = function(path,content)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn objRoot.addFile(getPath(path),content);\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tvar getPath = function(path)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\treturn item.path + path;\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tif(item.isDir)\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tself.addFolder = addFolder;\\r\\n\\t    \\t\\tself.addFile = addFile;\\r\\n\\t    \\t}\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t    var ZipUtil = function()\\r\\n\\t    {\\r\\n\\t    \\tvar self = this;\\r\\n\\t    \\tvar crcTable = [];\\r\\n\\t    \\tvar base64Key = \\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\\";\\r\\n\\t    \\t\\r\\n\\t    \\tvar initialize = function()\\r\\n\\t    \\t{\\r\\n\\t    \\t\\tcrcTable = makeCRCTable();\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\t//https://stackoverflow.com/questions/18638900/javascript-crc32\\r\\n\\t    \\tvar makeCRCTable = function()\\r\\n\\t    \\t{\\r\\n\\t    \\t    var c;\\r\\n\\t    \\t    var crcTable = [];\\r\\n\\t    \\t    for(var n =0; n < 256; n++)\\r\\n\\t    \\t    {\\r\\n\\t    \\t        c = n;\\r\\n\\t    \\t        for(var k =0; k < 8; k++)\\r\\n\\t    \\t        {\\r\\n\\t    \\t            c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\\r\\n\\t    \\t        }\\r\\n\\t    \\t        crcTable[n] = c;\\r\\n\\t    \\t    }\\r\\n\\t    \\t    return crcTable;\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tvar getFromCrc32Table = function(content, crc)\\r\\n\\t        {\\r\\n\\t    \\t\\tif(typeof content === \\\"undefined\\\" || !content.length) \\r\\n\\t    \\t\\t{\\r\\n\\t    \\t        return 0;\\r\\n\\t    \\t    }\\r\\n\\t    \\t\\tif(!crc)\\r\\n\\t        \\t{\\r\\n\\t        \\t\\tcrc = 0;\\r\\n\\t        \\t}\\r\\n\\t        \\tcrc ^= (-1);\\r\\n\\t    \\t\\tvar dataType = util.getDataType(content);\\r\\n\\t    \\t\\tif(dataType === \\\"string\\\")\\r\\n\\t    \\t\\t{\\r\\n\\t\\t            var ch = 0;\\r\\n\\t\\t            var k = 0;\\r\\n\\t\\t            var l = 0;\\r\\n\\t\\t            var len = content.length;\\r\\n\\t\\t            for (var count = 0;count < len;count++) \\r\\n\\t\\t            {\\r\\n\\t\\t            \\tch = content.charCodeAt(count);\\r\\n\\t\\t                k = (crc ^ ch) & 0xFF;\\r\\n\\t\\t                l = crcTable[k];\\r\\n\\t\\t                crc = (crc >>> 8) ^ l;\\r\\n\\t\\t            }\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t\\telse\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tvar ch = 0;\\r\\n\\t\\t            var k = 0;\\r\\n\\t\\t            var l = 0;\\r\\n\\t    \\t\\t\\tvar len = content.length;\\r\\n\\t    \\t\\t\\tfor (var count = 0;count < len;count++) \\r\\n\\t\\t            {\\r\\n\\t    \\t\\t\\t\\tch = content[count];\\r\\n\\t    \\t\\t\\t\\tk = (crc ^ ch) & 0xFF;\\r\\n\\t    \\t\\t\\t\\tl = crcTable[k];\\r\\n\\t    \\t\\t\\t\\tcrc = (crc >>> 8) ^ l;\\r\\n\\t\\t            }\\r\\n\\t    \\t\\t}\\r\\n\\t    \\t\\treturn crc ^ (-1);\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        var buildUint8Array = function(content)\\r\\n\\t        {\\r\\n\\t        \\tvar retValue = new Uint8Array(content.length);\\r\\n\\t            for (var count = 0; count < content.length; count++) \\r\\n\\t            {\\r\\n\\t            \\tretValue[count] = content.charCodeAt(count);\\r\\n\\t            }\\r\\n\\t            return retValue;\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        //http://www.navioo.com/javascript/tutorials/Javascript_utf8_encode_1529.html\\r\\n\\t        // Encodes an ISO-8859-1 string to UTF-8    \\r\\n\\t        var utf8_encode = function(str) \\r\\n\\t    \\t{\\r\\n\\t        \\tvar retValue = \\\"\\\";\\r\\n\\t    \\t\\tvar str = str.replace(/\\\\r\\\\n/g, \\\"\\\\n\\\");\\r\\n\\t    \\t\\tvar len = str.length;\\r\\n\\t    \\t\\tvar start = 0;\\r\\n\\t    \\t\\tvar end = 0;\\r\\n\\t    \\t\\tvar enc = null;\\r\\n\\t    \\t\\tvar ch = null;\\r\\n\\t    \\t\\tfor(var count = 0;count < len;count++)\\r\\n\\t    \\t\\t{\\r\\n\\t    \\t\\t\\tch = str.charCodeAt(count);\\r\\n\\t    \\t\\t\\tenc = null;\\r\\n\\t    \\t\\t\\tif(ch < 128)\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tend++;\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t\\telse if(ch > 127 && ch < 2048)\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tenc = String.fromCharCode(ch >> 6 | 192);\\r\\n\\t    \\t\\t\\t\\tenc += String.fromCharCode((ch & 63) | 128);\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t\\telse\\r\\n\\t    \\t\\t\\t{\\r\\n\\t    \\t\\t\\t\\tenc = String.fromCharCode((ch >> 12) | 224);\\r\\n\\t    \\t\\t\\t\\tenc += String.fromCharCode(((ch >> 6) & 63) | 128);\\r\\n\\t    \\t\\t\\t\\tenc += String.fromCharCode((ch & 63) | 128);\\r\\n\\t    \\t\\t\\t}\\r\\n\\t    \\t\\t\\tif (enc != null) \\r\\n\\t    \\t\\t\\t{  \\r\\n    \\t\\t            if (end > start) \\r\\n    \\t\\t            {  \\r\\n    \\t\\t            \\tretValue += str.substring(start, end);  \\r\\n    \\t\\t            }  \\r\\n    \\t\\t            retValue += enc;  \\r\\n    \\t\\t            start = end = count + 1;  \\r\\n    \\t\\t        }  \\r\\n\\t    \\t\\t}\\r\\n\\t    \\t\\tif (end > start) \\r\\n\\t    \\t\\t{  \\r\\n\\t    \\t\\t\\tretValue += str.substring(start,str.length);  \\r\\n\\t    \\t    } \\r\\n\\t    \\t\\treturn retValue;\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        //http://www.navioo.com/javascript/tutorials/Javascript_utf8_decode_1528.html\\r\\n\\t        // Converts a UTF-8 encoded string to ISO-8859-1    \\r\\n\\t        var utf8_decode = function(str) \\r\\n\\t    \\t{\\r\\n\\t        \\tvar arrReturn = [];\\r\\n\\t        \\tvar count = 0;\\r\\n\\t        \\tvar retCount = 0;\\r\\n\\t        \\tvar char1 = 0;\\r\\n\\t        \\tvar char2 = 0;\\r\\n\\t        \\tvar char3 = 0;  \\r\\n\\t            str += \\\"\\\";  \\r\\n\\t            while (count < str.length) \\r\\n\\t            {  \\r\\n\\t                char1 = str.charCodeAt(count);  \\r\\n\\t                if (char1 < 128) \\r\\n\\t                {  \\r\\n\\t                    arrReturn[retCount++] = String.fromCharCode(char1);  \\r\\n\\t                    count++;  \\r\\n\\t                } \\r\\n\\t                else if ((char1 > 191) && (char1 < 224)) \\r\\n\\t                {  \\r\\n\\t                    char2 = str.charCodeAt(count+1);  \\r\\n\\t                    arrReturn[retCount++] = String.fromCharCode(((char1 & 31) << 6) | (char2 & 63));  \\r\\n\\t                    count += 2;  \\r\\n\\t                } \\r\\n\\t                else \\r\\n\\t                {  \\r\\n\\t                    char2 = str.charCodeAt(count+1);  \\r\\n\\t                    char3 = str.charCodeAt(count+2);  \\r\\n\\t                    arrReturn[retCount++] = String.fromCharCode(((char1 & 15) << 12) | ((char2 & 63) << 6) | (char3 & 63));  \\r\\n\\t                    count += 3;  \\r\\n\\t                }  \\r\\n\\t            }  \\r\\n\\t            return arrReturn.join('');  \\r\\n\\t    \\t};\\r\\n\\t        \\r\\n\\t        var decToHex = function(number, bytes) \\r\\n\\t        {\\r\\n\\t        \\tvar retValue = \\\"\\\";\\r\\n\\t        \\tfor(var count = 0;count < bytes;count++)\\r\\n\\t    \\t\\t{\\r\\n\\t        \\t\\tretValue += String.fromCharCode(number & 0xFF);\\r\\n\\t        \\t\\tnumber = number >>> 8;\\r\\n\\t    \\t\\t}\\r\\n\\t        \\treturn retValue;\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        var fillArrayWithString = function(str,arrData) \\r\\n\\t        {\\r\\n\\t        \\tfor (var count = 0;count < str.length;count++) \\r\\n\\t        \\t{\\r\\n\\t        \\t\\tarrData[count] = str.charCodeAt(count) & 0xFF;\\r\\n\\t            }\\r\\n\\t            return arrData;\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        var convertTime = function(date)\\r\\n\\t        {\\r\\n\\t        \\t var hour = date.getUTCHours();\\r\\n\\t        \\t hour = hour << 6;\\r\\n\\t        \\t hour = hour | date.getUTCMinutes();\\r\\n\\t        \\t hour = hour << 5;\\r\\n\\t        \\t hour = hour | date.getUTCSeconds() / 2;\\r\\n\\t        \\t return hour;\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        var convertDate = function(date)\\r\\n\\t        {\\r\\n\\t        \\tvar retDate = date.getUTCFullYear() - 1980;\\r\\n\\t        \\tretDate = retDate << 4;\\r\\n\\t        \\tretDate = retDate | (date.getUTCMonth() + 1);\\r\\n\\t        \\tretDate = retDate << 5;\\r\\n\\t        \\tretDate = retDate | date.getUTCDate();\\r\\n\\t        \\treturn retDate;\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        var addSlashAtEnd = function(path) \\r\\n\\t    \\t{\\r\\n\\t    \\t    if (path.slice(-1) !== \\\"/\\\") \\r\\n\\t    \\t    {\\r\\n\\t    \\t        path += \\\"/\\\";\\r\\n\\t    \\t    }\\r\\n\\t    \\t    return path;\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tvar getParentFolder = function(path) \\r\\n\\t    \\t{\\r\\n\\t    \\t    if (path.slice(-1) === '/') \\r\\n\\t    \\t    {\\r\\n\\t    \\t        path = path.substring(0, path.length - 1);\\r\\n\\t    \\t    }\\r\\n\\t    \\t    var lastSlash = path.lastIndexOf('/');\\r\\n\\t    \\t    return (lastSlash > 0) ? path.substring(0, lastSlash) : \\\"\\\";\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tvar getDataType = function(data) \\r\\n\\t    \\t{\\r\\n\\t    \\t    if (typeof data === \\\"string\\\") \\r\\n\\t    \\t    {\\r\\n\\t    \\t        return \\\"string\\\";\\r\\n\\t    \\t    }\\r\\n\\t    \\t    if (Object.prototype.toString.call(data) === \\\"[object Array]\\\") \\r\\n\\t    \\t    {\\r\\n\\t    \\t        return \\\"array\\\";\\r\\n\\t    \\t    }\\r\\n\\t    \\t    if (typeof Buffer !== \\\"undefined\\\" && data instanceof Buffer) \\r\\n\\t    \\t    {\\r\\n\\t    \\t        return \\\"nodebuffer\\\";\\r\\n\\t    \\t    }\\r\\n\\t    \\t    if (data instanceof Uint8Array) \\r\\n\\t    \\t    {\\r\\n\\t    \\t        return \\\"uint8array\\\";\\r\\n\\t    \\t    }\\r\\n\\t    \\t    if (data instanceof ArrayBuffer) \\r\\n\\t    \\t    {\\r\\n\\t    \\t        return \\\"arraybuffer\\\";\\r\\n\\t    \\t    }\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tvar base64Decode = function(data) \\r\\n\\t    \\t{\\r\\n\\t    \\t\\tvar chr1, chr2, chr3;\\r\\n\\t    \\t    var enc1, enc2, enc3, enc4;\\r\\n\\t    \\t    var i = 0, resultIndex = 0;\\r\\n\\t    \\t    \\r\\n\\t    \\t    if(data.indexOf('base64,') > -1)\\r\\n\\t    \\t    {\\r\\n\\t    \\t    \\tvar index = data.indexOf('base64,') + 'base64,'.length;\\r\\n\\t\\t    \\t    data = data.substring(index);\\r\\n\\t    \\t    }\\r\\n\\t    \\t    data = data.replace(/[^A-Za-z0-9\\\\+\\\\/\\\\=]/g, \\\"\\\");\\r\\n\\t    \\t    var totalLength = data.length * 3 / 4;\\r\\n\\t    \\t    if(data.charAt(data.length - 1) === base64Key.charAt(64)) \\r\\n\\t    \\t    {\\r\\n\\t    \\t        totalLength--;\\r\\n\\t    \\t    }\\r\\n\\t    \\t    if(data.charAt(data.length - 2) === base64Key.charAt(64)) \\r\\n\\t    \\t    {\\r\\n\\t    \\t        totalLength--;\\r\\n\\t    \\t    }\\r\\n\\t    \\t    //totalLength is base64 expected length\\r\\n\\t    \\t    if (totalLength % 1 !== 0) \\r\\n\\t    \\t    {\\r\\n\\t    \\t        throw new Error(\\\"Invalid base64 data\\\");\\r\\n\\t    \\t    }\\r\\n\\t    \\t    var retValue = new Uint8Array(totalLength|0);\\r\\n\\t    \\t    while (i < data.length) \\r\\n\\t    \\t    {\\r\\n\\t    \\t        enc1 = base64Key.indexOf(data.charAt(i++));\\r\\n\\t    \\t        enc2 = base64Key.indexOf(data.charAt(i++));\\r\\n\\t    \\t        enc3 = base64Key.indexOf(data.charAt(i++));\\r\\n\\t    \\t        enc4 = base64Key.indexOf(data.charAt(i++));\\r\\n\\r\\n\\t    \\t        chr1 = (enc1 << 2) | (enc2 >> 4);\\r\\n\\t    \\t        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\\r\\n\\t    \\t        chr3 = ((enc3 & 3) << 6) | enc4;\\r\\n\\r\\n\\t    \\t        retValue[resultIndex++] = chr1;\\r\\n\\r\\n\\t    \\t        if (enc3 !== 64) \\r\\n\\t    \\t        {\\r\\n\\t    \\t            retValue[resultIndex++] = chr2;\\r\\n\\t    \\t        }\\r\\n\\t    \\t        if (enc4 !== 64) \\r\\n\\t    \\t        {\\r\\n\\t    \\t            retValue[resultIndex++] = chr3;\\r\\n\\t    \\t        }\\r\\n\\t    \\t    }\\r\\n\\r\\n\\t    \\t    return retValue;\\r\\n\\t    \\t};\\r\\n\\t    \\t\\r\\n\\t    \\tvar downloadFile = function(fileName,content)\\r\\n\\t        {\\r\\n\\t        \\tif (\\\"msSaveOrOpenBlob\\\" in window.navigator) \\r\\n\\t        \\t{\\r\\n\\t                window.navigator.msSaveOrOpenBlob(content, fileName);\\r\\n\\t            }\\r\\n\\t            else \\r\\n\\t            {\\r\\n\\t                var element = document.createElement(\\\"a\\\");\\r\\n\\t                var url = window.URL.createObjectURL(content);\\r\\n\\t                element.setAttribute(\\\"href\\\", url);\\r\\n\\t                element.setAttribute(\\\"download\\\", fileName);\\r\\n\\t                element.style.display = \\\"none\\\";\\r\\n\\t                document.body.appendChild(element);\\r\\n\\t                element.click();\\r\\n\\t                window.URL.revokeObjectURL(url);\\r\\n\\t                document.body.removeChild(element);\\r\\n\\t            }\\r\\n\\t        };\\r\\n\\t        \\r\\n\\t        initialize();\\r\\n\\t        \\r\\n\\t        self.getFromCrc32Table = getFromCrc32Table;\\r\\n\\t        self.buildUint8Array = buildUint8Array;\\r\\n\\t        self.utf8_encode = utf8_encode;\\r\\n\\t        self.utf8_decode = utf8_decode;\\r\\n\\t        self.decToHex = decToHex;\\r\\n\\t        self.fillArrayWithString = fillArrayWithString;\\r\\n\\t        self.convertTime = convertTime;\\r\\n\\t        self.convertDate = convertDate;\\r\\n\\t        self.addSlashAtEnd = addSlashAtEnd;\\r\\n\\t        self.getParentFolder = getParentFolder;\\r\\n\\t        self.getDataType = getDataType;\\r\\n\\t        self.base64Decode = base64Decode;\\r\\n\\t        self.downloadFile = downloadFile;\\r\\n\\t    };\\r\\n\\t    \\r\\n\\t\\tinitialize();\\r\\n\\t\\t\\r\\n\\t\\tself.addFolder = addFolder;\\r\\n\\t\\tself.addFolders = addFolders;\\r\\n\\t\\tself.addFile = addFile;\\r\\n\\t\\tself.getBlob = getBlob;\\r\\n\\t\\tself.getFile = getFile;\\r\\n\\t\\tself.downloadFile = downloadFile;\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSZip;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSZip\\\",NSZip);var NSXlsxExport = (function()\\r\\n{\\r\\n\\tvar NSXlsxExport = function(config)\\r\\n\\t{\\r\\n\\t\\tvar self = this;\\r\\n\\t\\tvar xlsxUtil = null;\\r\\n\\t\\tvar workbook = null;\\r\\n\\t\\tvar styles = null;\\r\\n\\t\\tvar setting = {};\\r\\n\\t\\tvar sharedString = null;\\r\\n\\t\\t\\r\\n\\t\\tvar initialize = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(!config)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tconfig = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\txlsxUtil = new XlsxUtil();\\r\\n\\t\\t\\tsetting = {\\r\\n\\t\\t\\t\\tfileName: config[\\\"fileName\\\"] || \\\"download\\\",\\r\\n\\t\\t\\t\\tsheets: config[\\\"sheets\\\"],\\r\\n\\t\\t\\t\\tmaxCharWidth: config[\\\"maxCharWidth\\\"]\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tif(!setting.sheets || setting.sheets.length == 0)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\txlsxUtil.throwNSError(\\\"sheets is not defined in config\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.fileName.indexOf(\\\".\\\") === -1) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsetting.fileName = setting.fileName + \\\".xlsx\\\";\\r\\n\\t        }\\r\\n\\t\\t\\tstyles = new XlsxStyle(xlsxUtil);\\r\\n\\t\\t\\tsharedString = new XlsxSharedStrings(xlsxUtil);\\r\\n\\t\\t\\tworkbook = new XlsxWorkbook(xlsxUtil,styles,sharedString,setting.sheets,setting);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar process = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar mimeType = \\\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\\\";\\r\\n\\t\\t\\tvar zip = new NSZip();\\r\\n\\t\\t\\tvar xl = zip.addFolder(\\\"xl\\\");\\r\\n\\t\\t\\tsave(zip,xl);\\r\\n\\t\\t\\tzip.downloadFile(setting.fileName,mimeType);\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar save = function(zip,xl)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar strWorkbook = workbook.process();\\r\\n\\t\\t\\tsaveSheets(zip,xl);\\r\\n\\t\\t\\tsaveStyles(zip,xl);\\r\\n\\t\\t\\tsaveSharedStrings(zip,xl);\\r\\n\\t\\t\\tzip.addFile('[Content_Types].xml', getContentTypesXml());\\r\\n\\t\\t\\tzip.addFile('_rels/.rels', getRels());\\r\\n\\t\\t\\txl.addFile('workbook.xml', strWorkbook);\\r\\n\\t\\t\\txl.addFile('_rels/workbook.xml.rels', getWorkbookXMLRels());\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar saveSheets = function(zip,xl)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < setting.sheets.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar sheet = workbook.getSheet(count);\\r\\n\\t\\t\\t\\txl.addFile(sheet.getPath(),sheet.getSheetData());\\r\\n\\t\\t\\t\\txlsxUtil.addSheetProp(\\\"relationship\\\",sheet.getRelationship());\\r\\n\\t\\t\\t\\txlsxUtil.addSheetProp(\\\"override\\\",sheet.getOverride());\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getWorkbookXMLRels = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar relationShip = {style:{type:xlsxUtil.schemas.stylesheet,target:'styles.xml'},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tsharedStrings:{type:xlsxUtil.schemas.sharedStrings,target:'sharedStrings.xml'}\\r\\n\\t\\t\\t\\t\\t\\t\\t   };\\r\\n\\t\\t\\tvar arrChild = [];\\r\\n\\t\\t\\tvar index = setting.sheets.length;\\r\\n\\t\\t\\tfor(var key in relationShip)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = relationShip[key];\\r\\n\\t\\t\\t\\tarrChild.push(xlsxUtil.getXML({\\r\\n\\t\\t\\t\\t\\t\\tname: 'Relationship',\\r\\n\\t\\t\\t\\t\\t\\tattributes: {'Id':'rId' + (++index),'Type': item.type,'Target': item.target}\\r\\n\\t\\t\\t\\t}));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tarrChild.push(xlsxUtil.getSheetProp(\\\"relationship\\\"));\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn xlsxUtil.getXML({\\r\\n\\t\\t\\t\\tname: 'Relationships',\\r\\n\\t\\t\\t\\tns: 'relationshipPackage',\\r\\n\\t\\t\\t\\tchildren: arrChild\\r\\n\\t\\t\\t});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar saveStyles = function(zip,xl)\\r\\n\\t\\t{\\r\\n\\t\\t\\txl.addFile('styles.xml', styles.getTag());\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar saveSharedStrings = function(zip,xl)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif (sharedString.hasString() > 0) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\txl.addFile('sharedStrings.xml', sharedString.getTag());\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getRels = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar rels = '<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\\\n ' +\\r\\n\\t\\t\\t'<Relationships xmlns=\\\"http://schemas.openxmlformats.org/package/2006/relationships\\\">\\\\n ' +\\r\\n\\t\\t\\t'<Relationship Id=\\\"rId1\\\" Type=\\\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\\\" Target=\\\"xl/workbook.xml\\\"/>\\\\n ' +\\r\\n\\t\\t\\t'</Relationships>';\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn rels;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar getContentTypesXml = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar override = {workbook:{partName:'/xl/workbook.xml',contentType:'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml'},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tstyles:{partName:'/xl/styles.xml',contentType:'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml'}\\r\\n\\t\\t\\t\\t   \\t\\t\\t   };\\r\\n\\t\\t\\tif (sharedString.hasString() > 0) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\toverride[\\\"sharedStrings\\\"] = {partName:'/xl/sharedStrings.xml',contentType:'application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml'}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar arrChild = [];\\r\\n\\t\\t\\tarrChild.push('<Default Extension=\\\"rels\\\" ContentType=\\\"application/vnd.openxmlformats-package.relationships+xml\\\"/>');\\r\\n\\t\\t\\tarrChild.push('<Default Extension=\\\"xml\\\" ContentType=\\\"application/xml\\\"/>');\\r\\n\\t\\t\\tfor(var key in override)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = override[key];\\r\\n\\t\\t\\t\\tarrChild.push(xlsxUtil.getXML({\\r\\n\\t\\t\\t\\t\\t\\tname: 'Override',\\r\\n\\t\\t\\t\\t\\t\\tattributes: {'PartName': item.partName,'ContentType': item.contentType}\\r\\n\\t\\t\\t\\t}));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tarrChild.push(xlsxUtil.getSheetProp(\\\"override\\\"));\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn xlsxUtil.getXML({\\r\\n\\t\\t\\t\\tname: 'Types',\\r\\n\\t\\t\\t\\tns: 'contentTypes',\\r\\n\\t\\t\\t\\tchildren: arrChild\\r\\n\\t\\t\\t});\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar XlsxStyle = function(util)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar objTypes = {numberFormats:{def: StyleNumberFormat},\\r\\n\\t\\t\\t\\t\\t\\t\\tfonts:{def: StyleFonts},\\r\\n\\t\\t\\t\\t\\t\\t\\tfills:{def: StyleFills},\\r\\n\\t\\t\\t\\t\\t\\t\\tborders:{def: StyleBorder},\\r\\n\\t\\t\\t\\t\\t\\t\\tcells:{def: StyleCells}};\\r\\n\\t\\t\\tvar defaultTableStyle = '';\\r\\n\\t\\t\\tvar mergeCache = {};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar initialize = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var key in objTypes)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjTypes[key][\\\"ins\\\"] = new objTypes[key][\\\"def\\\"](util,self);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar addFormat = function(style,name) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn objTypes[\\\"cells\\\"][\\\"ins\\\"].add(style,name);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getStyle = function(name) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn objTypes[\\\"cells\\\"][\\\"ins\\\"].getStyle(name);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getStyleID = function(name) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn objTypes[\\\"cells\\\"][\\\"ins\\\"].getStyleID(name);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar addFillOutFormat = function(objStyle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (getStyle(objStyle).fillOut) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn objStyle;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar style = objTypes[\\\"cells\\\"][\\\"ins\\\"].cutVisible(objTypes[\\\"cells\\\"][\\\"ins\\\"].fullGet(objStyle));\\r\\n\\t\\t\\t\\tif(!util.isObjectEmpty(style))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn addFormat(style);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar merge = function(format)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar formats = [];\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arguments.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(arguments[count])\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tformats.push(arguments[count]);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (formats.length === 0) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse if (formats.length === 1) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn addFormat(formats[0]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t//https://www.w3schools.com/jsref/jsref_reduce.asp\\r\\n\\t\\t\\t\\t\\tvar id = formats.reduce(function (total, currentValue,currentIndex, arr) \\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\treturn total + JSON.stringify(currentValue);\\r\\n\\t\\t\\t\\t\\t\\t\\t}, '');\\r\\n\\t\\t\\t\\t\\tvar merged = mergeCache[id];\\r\\n\\t\\t\\t\\t\\tif (!merged) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar cells = objTypes[\\\"cells\\\"][\\\"ins\\\"];\\r\\n\\t\\t\\t\\t\\t\\tvar newFormat = {};\\r\\n\\t\\t\\t\\t\\t\\tfor(var index = 0;index < formats.length;index++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar format = formats[index];\\r\\n\\t\\t\\t\\t\\t\\t\\tnewFormat = cells.merge(newFormat,cells.fullGet(format));\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tmerged = cells.add(newFormat,null,{ merge: true});\\r\\n\\t\\t\\t\\t\\t\\tmergeCache[id] = merged;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn merged;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar addFontFormat = function(format, name) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn objTypes[\\\"fonts\\\"][\\\"ins\\\"].add(format, name);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar addBorderFormat = function(format, name) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn objTypes[\\\"borders\\\"][\\\"ins\\\"].add(format, name);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar addPatternFormat = function(format, name) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn objTypes[\\\"fills\\\"][\\\"ins\\\"].add(format, name, {fillType:'pattern'});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar addGradientFormat = function(format, name) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn objTypes[\\\"fills\\\"][\\\"ins\\\"].add(format, name, {fillType:'gradient'});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar addNumberFormat = function(format, name) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn objTypes[\\\"numberFormats\\\"][\\\"ins\\\"].add(format, name);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar addTableFormat = function(format, name) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//return objTypes[\\\"numberFormats\\\"][\\\"ins\\\"].add(format, name);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar addTableElementFormat = function(format, name) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//return objTypes[\\\"numberFormats\\\"][\\\"ins\\\"].add(format, name);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar setDefaultTableStyle = function(format, name) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t//return objTypes[\\\"numberFormats\\\"][\\\"ins\\\"].add(format, name);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getTag = function(objStyle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrChildren = [];\\r\\n\\t\\t\\t\\tfor(var key in objTypes)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t//console.log(key + \\\" :: \\\" + objTypes[key][\\\"ins\\\"].getFinalTag());\\r\\n\\t\\t\\t\\t\\tarrChildren.push(objTypes[key][\\\"ins\\\"].getFinalTag());\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'styleSheet',\\r\\n\\t\\t\\t\\t\\tns: 'spreadsheetml',\\r\\n\\t\\t\\t\\t\\tchildren: arrChildren\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tinitialize();\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.addFormat = addFormat;\\r\\n\\t\\t\\tself.getStyle = getStyle;\\r\\n\\t\\t\\tself.getStyleID = getStyleID;\\r\\n\\t\\t\\tself.addFillOutFormat = addFillOutFormat;\\r\\n\\t\\t\\tself.merge = merge;\\r\\n\\t\\t\\tself.addFontFormat = addFontFormat;\\r\\n\\t\\t\\tself.addBorderFormat = addBorderFormat;\\r\\n\\t\\t\\tself.addPatternFormat = addPatternFormat;\\r\\n\\t\\t\\tself.addGradientFormat = addGradientFormat;\\r\\n\\t\\t\\tself.addNumberFormat = addNumberFormat;\\r\\n\\t\\t\\tself.addTableFormat = addTableFormat;\\r\\n\\t\\t\\tself.addTableElementFormat = addTableElementFormat;\\r\\n\\t\\t\\tself.setDefaultTableStyle = setDefaultTableStyle;\\r\\n\\t\\t\\tself.getTag = getTag;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.objTypes = objTypes;\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar StyleCells = function(util,xlsxStyle)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self =  this;\\r\\n\\t\\t\\tvar style = new XlsxBaseStyle(util,xlsxStyle);\\r\\n\\t\\t\\tstyle.formatName = \\\"format\\\";\\r\\n\\t\\t\\tstyle.saveName = \\\"cellXfs\\\";\\r\\n\\t\\t\\tvar alignment = new XlsxAlignment(util);\\r\\n\\t\\t\\tvar protection = new XlsxProtection(util);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar ALLOWED_PARTS = ['format', 'fill', 'border', 'font'];\\r\\n\\t\\t\\tvar XLS_NAMES = ['numFmtId', 'fillId', 'borderId', 'fontId'];\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar initialize = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstyle.formats.push({format: style.getStyleObj({})});\\r\\n\\t\\t\\t\\tfor(var key in util.numberPredifined)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstyle.predefined[key] = {format: key};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tstyle.idIndex = style.formats.length;\\r\\n\\t\\t\\t\\tstyle.saveEmpty = false;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.getStyleObj = function(objStyle,prop)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = {};\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tif (objStyle.format) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.format = xlsxStyle.objTypes[\\\"numberFormats\\\"][\\\"ins\\\"].add(objStyle.format);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.font) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.font = xlsxStyle.objTypes[\\\"fonts\\\"][\\\"ins\\\"].add(objStyle.font);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.pattern) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.fill = xlsxStyle.objTypes[\\\"fills\\\"][\\\"ins\\\"].add(objStyle.pattern, null, { fillType: 'pattern' });\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (objStyle.gradient) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.fill = xlsxStyle.objTypes[\\\"fills\\\"][\\\"ins\\\"].add(objStyle.gradient, null, { fillType: 'gradient' });\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse if (prop && prop.merge && objStyle.fill) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.fill = xlsxStyle.objTypes[\\\"fills\\\"][\\\"ins\\\"].add(objStyle.fill, null, prop);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.border) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.border = xlsxStyle.objTypes[\\\"borders\\\"][\\\"ins\\\"].add(objStyle.border);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar alignmentValue = prop && prop.merge ? alignment.getStyleObj(objStyle.alignment) : alignment.getStyleObj(objStyle);\\r\\n\\t\\t\\t\\tif (alignmentValue) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.alignment = alignmentValue;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar protectionValue = prop && prop.merge ? protection.getStyleObj(objStyle.protection) : protection.getStyleObj(objStyle);\\r\\n\\t\\t\\t\\tif (protectionValue) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.protection = protectionValue;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.fillOut) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.fillOut = objStyle.fillOut;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.fullGet = function(objStyle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (style.getStyleID(objStyle)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjStyle = style.getStyle(objStyle);\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjStyle = style.getStyleObj(objStyle);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar retValue = {};\\r\\n\\t\\t\\t\\tif (objStyle.format) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.format = xlsxStyle.objTypes[\\\"numberFormats\\\"][\\\"ins\\\"].getStyle(objStyle.format);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.font) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.font = xlsxStyle.objTypes[\\\"fonts\\\"][\\\"ins\\\"].getStyle(objStyle.font);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.fill) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.fill = xlsxStyle.objTypes[\\\"fills\\\"][\\\"ins\\\"].getStyle(objStyle.fill);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.border) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.border = xlsxStyle.objTypes[\\\"borders\\\"][\\\"ins\\\"].getStyle(objStyle.border);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.alignment) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.alignment = objStyle.alignment;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.protection) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.protection = objStyle.protection;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.cutVisible = function(objStyle) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = {};\\r\\n\\t\\t\\t\\tif (objStyle.format) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.format = objStyle.format;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.font) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.font = objStyle.font;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.alignment) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.alignment = objStyle.alignment;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.protection) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.protection = objStyle.protection;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.merge = function(formatTo,formatFrom) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (formatTo.format || formatFrom.format) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tformatTo.format = xlsxStyle.objTypes[\\\"numberFormats\\\"][\\\"ins\\\"].merge(formatTo.format, formatFrom.format);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (formatTo.font || formatFrom.font) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tformatTo.font = xlsxStyle.objTypes[\\\"fonts\\\"][\\\"ins\\\"].merge(formatTo.font, formatFrom.font);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (formatTo.fill || formatFrom.fill) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tformatTo.fill = xlsxStyle.objTypes[\\\"fills\\\"][\\\"ins\\\"].merge(formatTo.fill, formatFrom.fill);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (formatTo.border || formatFrom.border) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tformatTo.border = xlsxStyle.objTypes[\\\"borders\\\"][\\\"ins\\\"].merge(formatTo.border, formatFrom.border);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (formatTo.alignment || formatFrom.alignment) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tformatTo.alignment = alignment.merge(formatTo.alignment, formatFrom.alignment);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (formatTo.protection || formatFrom.protection) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tformatTo.protection = protection.merge(formatTo.protection, formatFrom.protection);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn formatTo;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.getTag = function(objStyle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar attributes = {};\\r\\n\\t\\t\\t\\tvar children = [];\\r\\n\\t\\t\\t\\tif (objStyle.alignment) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchildren.push(alignment.getTag(objStyle.alignment));\\r\\n\\t\\t\\t\\t\\tattributes['applyAlignment'] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.protection) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchildren.push(protection.getTag(objStyle.protection));\\r\\n\\t\\t\\t\\t\\tattributes['applyProtection'] = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tfor(var key in objStyle)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(ALLOWED_PARTS.indexOf(key) > -1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar value = objStyle[key];\\r\\n\\t\\t\\t\\t\\t\\tvar xlsName = XLS_NAMES[ALLOWED_PARTS.indexOf(key)];\\r\\n\\t\\t\\t\\t\\t\\tif (key === 'format') \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tattributes[xlsName] = xlsxStyle.objTypes[\\\"numberFormats\\\"][\\\"ins\\\"].getStyleID(value);\\r\\n\\t\\t\\t\\t\\t\\t\\tattributes['applyNumberFormat'] = true;\\r\\n\\t\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\t\\telse if (key === 'fill') \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tattributes[xlsName] = xlsxStyle.objTypes[\\\"fills\\\"][\\\"ins\\\"].getStyleID(value);\\r\\n\\t\\t\\t\\t\\t\\t\\tattributes['applyFill'] = true;\\r\\n\\t\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\t\\telse if (key === 'border') \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tattributes[xlsName] = xlsxStyle.objTypes[\\\"borders\\\"][\\\"ins\\\"].getStyleID(value);\\r\\n\\t\\t\\t\\t\\t\\t\\tattributes['applyBorder'] = true;\\r\\n\\t\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\t\\telse if (key === 'font') \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tattributes[xlsName] = xlsxStyle.objTypes[\\\"fonts\\\"][\\\"ins\\\"].getStyleID(value);\\r\\n\\t\\t\\t\\t\\t\\t\\tattributes['applyFont'] = true;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'xf',\\r\\n\\t\\t\\t\\t\\tattributes: attributes,\\r\\n\\t\\t\\t\\t\\tchildren: children\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tinitialize();\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn style;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar StyleBorder = function(util,xlsxStyle)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self =  this;\\r\\n\\t\\t\\tvar style = new XlsxBaseStyle(util,xlsxStyle);\\r\\n\\t\\t\\tstyle.formatName = \\\"border\\\";\\r\\n\\t\\t\\tstyle.saveName = \\\"borders\\\";\\r\\n\\t\\t\\tvar mainBorders = ['left', 'right', 'top', 'bottom'];\\r\\n\\t\\t\\tvar borders = ['left', 'right', 'top', 'bottom', 'diagonal'];\\r\\n\\t\\t\\tvar borderStyle = {\\r\\n\\t\\t\\t\\t\\tdashDot: 'dashDot',\\r\\n\\t\\t\\t\\t\\tdashDotDot: 'dashDotDot',\\r\\n\\t\\t\\t\\t\\tdashed: 'dashed',\\r\\n\\t\\t\\t\\t\\tdotted: 'dotted',\\r\\n\\t\\t\\t\\t\\tdouble: 'double',\\r\\n\\t\\t\\t\\t\\thair: 'hair',\\r\\n\\t\\t\\t\\t\\tmedium: 'medium',\\r\\n\\t\\t\\t\\t\\tmediumDashDot: 'mediumDashDot',\\r\\n\\t\\t\\t\\t\\tmediumDashDotDot: 'mediumDashDotDot',\\r\\n\\t\\t\\t\\t\\tmediumDashed: 'mediumDashed',\\r\\n\\t\\t\\t\\t\\tnone: 'none',\\r\\n\\t\\t\\t\\t\\tslantDashDot: 'slantDashDot',\\r\\n\\t\\t\\t\\t\\tthick: 'thick',\\r\\n\\t\\t\\t\\t\\tthin: 'thin'\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar initialize = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstyle.formats.push({format: style.getStyleObj({})});\\r\\n\\t\\t\\t\\tstyle.idIndex = style.formats.length;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.getStyleObj = function(objStyle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = {};\\r\\n\\t\\t\\t\\tif(!objStyle)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjStyle = {};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(objStyle[\\\"style\\\"] || objStyle[\\\"color\\\"])\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (!objStyle[\\\"style\\\"] || borderStyle[objStyle[\\\"style\\\"]]) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tfor(var index = 0;index < mainBorders.length;index++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tretValue[mainBorders[index]] = {style: objStyle.style,color: objStyle.color};\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var index = 0;index < borders.length;index++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar name = borders[index];\\r\\n\\t\\t\\t\\t\\t\\tvar border = objStyle[name];\\r\\n\\t\\t\\t\\t\\t\\tif (border && (!objStyle.style || borderStyle[border.style])) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tretValue[name] = {style: border.style,color: border.color };\\r\\n\\t\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tretValue[name] = {};\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.getTag = function(objStyle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar tagChildren = [];\\r\\n\\t\\t\\t\\tfor(var index = 0;index < borders.length;index++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar childTag = borders[index];\\r\\n\\t\\t\\t\\t\\tvar border = objStyle[childTag];\\r\\n\\t\\t\\t\\t\\tvar attributes = null;\\r\\n\\t\\t\\t\\t\\tvar children = null;\\r\\n\\r\\n\\t\\t\\t\\t\\tif (border) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif (border.style) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tattributes = {'style': border.style};\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif (border.color) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tchildren = [util.getColorTag(border.color)];\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\ttagChildren.push(util.getXML({\\r\\n\\t\\t\\t\\t\\t\\tname: childTag,\\r\\n\\t\\t\\t\\t\\t\\tattributes: attributes,\\r\\n\\t\\t\\t\\t\\t\\tchildren: children\\r\\n\\t\\t\\t\\t\\t}));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'border',\\r\\n\\t\\t\\t\\t\\tchildren: tagChildren\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.merge = function(formatTo,formatFrom)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tformatTo = (!util.isUndefinedOrNull(formatTo)) ? formatTo : style.getStyleObj({});\\r\\n\\t\\t\\t\\tif (formatFrom) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var index = 0;index < borders.length;index++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar childTag = borders[index];\\r\\n\\t\\t\\t\\t\\t\\tvar borderFrom = formatFrom[childTag];\\r\\n\\t\\t\\t\\t\\t\\tif (borderFrom && borderFrom.style) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tformatTo[childTag].style = borderFrom.style;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif (borderFrom && borderFrom.color) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tformatTo[childTag].color = borderFrom.color;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn formatTo;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tinitialize();\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.borderStyle = borderStyle;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn style;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar StyleFills = function(util,xlsxStyle)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self =  this;\\r\\n\\t\\t\\tvar style = new XlsxBaseStyle(util,xlsxStyle);\\r\\n\\t\\t\\tstyle.formatName = \\\"fill\\\";\\r\\n\\t\\t\\tstyle.saveName = \\\"fills\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar PATTERN_TYPES = ['none', 'solid', 'darkGray', 'mediumGray', 'lightGray', 'gray125', 'gray0625', 'darkHorizontal', 'darkVertical', 'darkDown', 'darkUp', 'darkGrid', 'darkTrellis', 'lightHorizontal', 'lightVertical', 'lightDown', 'lightUp', 'lightGrid', 'lightTrellis'];\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar initialize = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstyle.formats.push({format: style.getStyleObj({ type: 'none' }, { fillType: 'pattern' }) }, { format: style.getStyleObj({ type: 'gray125' }, { fillType: 'pattern' }) });\\r\\n\\t\\t\\t\\tstyle.idIndex = style.formats.length;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.getStyleObj = function(objStyle,prop)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = {};\\r\\n\\t\\t\\t\\tretValue[\\\"fillType\\\"] = prop.merge ? objStyle.fillType : prop.fillType;\\r\\n\\t\\t\\t\\tif(retValue[\\\"fillType\\\"] === \\\"pattern\\\")\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar fgColor = (prop.merge ? objStyle.fgColor : objStyle.color) || 'FFFFFFFF';\\r\\n\\t\\t\\t\\t\\tvar bgColor = (prop.merge ? objStyle.bgColor : objStyle.backColor) || 'FFFFFFFF';\\r\\n\\t\\t\\t\\t\\tvar patternType = prop.merge ? objStyle.patternType : objStyle.type;\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\tretValue[\\\"patternType\\\"] = util.hasInArray(PATTERN_TYPES, patternType) ? patternType : 'solid';\\r\\n\\t\\t\\t\\t\\tif (prop.isTable && retValue.patternType === 'solid') \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue[\\\"fgColor\\\"] = bgColor;\\r\\n\\t\\t\\t\\t\\t\\tretValue[\\\"bgColor\\\"] = fgColor;\\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue[\\\"fgColor\\\"] = fgColor;\\r\\n\\t\\t\\t\\t\\t\\tretValue[\\\"bgColor\\\"] = bgColor;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (!util.isUndefinedOrNull(objStyle['left']))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.left = objStyle.left || 0;\\r\\n\\t\\t\\t\\t\\t\\tretValue.right = objStyle.right || 0;\\r\\n\\t\\t\\t\\t\\t\\tretValue.top = objStyle.top || 0;\\r\\n\\t\\t\\t\\t\\t\\tretValue.bottom = objStyle.bottom || 0;\\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.degree = objStyle.degree || 0;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tretValue.start = objStyle.start || 'FFFFFFFF';\\r\\n\\t\\t\\t\\t\\tretValue.end = objStyle.end || 'FFFFFFFF';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.getTag = function(objStyle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar children = (objStyle.fillType === 'pattern') ? [getPatternTag(objStyle)] : [getGradientTag(objStyle)];\\r\\n\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'fill',\\r\\n\\t\\t\\t\\t\\tchildren: children\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getPatternTag = function(objStyle) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar attributes = {'patternType': objStyle.patternType};\\r\\n\\t\\t\\t\\tvar children = [util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'fgColor',\\r\\n\\t\\t\\t\\t\\tattributes: {'rgb': util.getCanonColor(objStyle.fgColor)}\\r\\n\\t\\t\\t\\t}), util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'bgColor',\\r\\n\\t\\t\\t\\t\\tattributes: {'rgb': util.getCanonColor(objStyle.bgColor)}\\r\\n\\t\\t\\t\\t})];\\r\\n\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'patternFill',\\r\\n\\t\\t\\t\\t\\tattributes: attributes,\\r\\n\\t\\t\\t\\t\\tchildren: children\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getGradientTag = function(objStyle) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar attributes = {};\\r\\n\\r\\n\\t\\t\\t\\tif (objStyle.degree) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tattributes['degree'] = objStyle.degree;\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse if (objStyle.left) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tattributes['type'] = 'path';\\r\\n\\t\\t\\t\\t\\tattributes['left'] = objStyle.left;\\r\\n\\t\\t\\t\\t\\tattributes['right'] = objStyle.right;\\r\\n\\t\\t\\t\\t\\tattributes['top'] = objStyle.top;\\r\\n\\t\\t\\t\\t\\tattributes['bottom'] = objStyle.bottom;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar children = [util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'stop',\\r\\n\\t\\t\\t\\t\\tattributes: {'position': 0},\\r\\n\\t\\t\\t\\t\\tchildren: [util.getColorTag(objStyle.start)]\\r\\n\\t\\t\\t\\t}), util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'stop',\\r\\n\\t\\t\\t\\t\\tattributes: {'position': 1},\\r\\n\\t\\t\\t\\t\\tchildren: [util.getColorTag(objStyle.end)]\\r\\n\\t\\t\\t\\t})];\\r\\n\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'gradientFill',\\r\\n\\t\\t\\t\\t\\tattributes: attributes,\\r\\n\\t\\t\\t\\t\\tchildren: children\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tinitialize();\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn style;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar StyleFonts = function(util,xlsxStyle)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self =  this;\\r\\n\\t\\t\\tvar style = new XlsxBaseStyle(util,xlsxStyle);\\r\\n\\t\\t\\tstyle.formatName = \\\"font\\\";\\r\\n\\t\\t\\tstyle.saveName = \\\"fonts\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar initialize = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tstyle.formats.push({format: style.getStyleObj({})});\\r\\n\\t\\t\\t\\tstyle.idIndex = style.formats.length;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.getStyleObj = function(objStyle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = {};\\r\\n\\r\\n\\t\\t\\t\\tif (objStyle['bold']) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.bold = !!objStyle.bold;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle['italic']) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.italic = !!objStyle.italic;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.superscript) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.vertAlign = 'superscript';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.subscript) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.vertAlign = 'subscript';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.underline) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrUnderline = ['double', 'singleAccounting', 'doubleAccounting'];\\r\\n\\t\\t\\t\\t\\tif (arrUnderline.indexOf(objStyle.underline) > -1) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.underline = objStyle.underline;\\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.underline = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle['strike']) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.strike = !!objStyle.strike;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.outline) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.outline = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.shadow) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.shadow = true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.size) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.size = objStyle.size;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.color) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.color = objStyle.color;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.fontName) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.fontName = objStyle.fontName;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.getTag = function(objStyle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar children = [];\\r\\n\\r\\n\\t\\t\\t\\tif (objStyle.size) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchildren.push(util.getXML({\\r\\n\\t\\t\\t\\t\\t\\tname: 'sz',\\r\\n\\t\\t\\t\\t\\t\\tattributes: {'val': objStyle.size}\\r\\n\\t\\t\\t\\t\\t}));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.fontName) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchildren.push(util.getXML({\\r\\n\\t\\t\\t\\t\\t\\tname: 'name',\\r\\n\\t\\t\\t\\t\\t\\tattributes: {'val': objStyle.fontName}\\r\\n\\t\\t\\t\\t\\t}));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle['bold']) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (objStyle.bold) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tchildren.push(util.getXML({ name: 'b' }));\\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tchildren.push(util.getXML({ name: 'b', attributes: {'val': 0} }));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle['italic']) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (objStyle.italic) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tchildren.push(util.getXML({ name: 'i' }));\\r\\n\\t\\t\\t\\t\\t} else \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tchildren.push(util.getXML({ name: 'i', attributes: {'val': 0}}));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.vertAlign) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchildren.push(util.getXML({\\r\\n\\t\\t\\t\\t\\t\\tname: 'vertAlign',\\r\\n\\t\\t\\t\\t\\t\\tattributes: {'val': objStyle.vertAlign}\\r\\n\\t\\t\\t\\t\\t}));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.underline) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar attrs = null;\\r\\n\\t\\t\\t\\t\\tif (objStyle.underline !== true) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tattrs = {'val': objStyle.underline};\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tchildren.push(util.getXML({\\r\\n\\t\\t\\t\\t\\t\\tname: 'u',\\r\\n\\t\\t\\t\\t\\t\\tattributes: attrs\\r\\n\\t\\t\\t\\t\\t}));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle['strike']) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (objStyle.strike) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tchildren.push(util.getXML({ name: 'strike' }));\\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tchildren.push(util.getXML({ name: 'strike', attributes: {'val': 0} }));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.shadow) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchildren.push(util.getXML({ name: 'shadow' }));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.outline) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchildren.push(util.getXML({ name: 'outline' }));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objStyle.color) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchildren.push(util.getColorTag(objStyle.color));\\r\\n\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'font',\\r\\n\\t\\t\\t\\t\\tchildren: children\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.merge = function(formatTo,formatFrom)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = {};\\r\\n\\t\\t\\t\\tfor(var key in formatTo)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue[key] = formatTo[key];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tfor(var key in formatFrom)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue[key] = formatFrom[key];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tretValue.color = formatFrom && formatFrom.color || formatTo && formatTo.color;\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tinitialize();\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn style;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar StyleNumberFormat = function(util,xlsxStyle)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self =  this;\\r\\n\\t\\t\\tvar style = new XlsxBaseStyle(util,xlsxStyle);\\r\\n\\t\\t\\tstyle.formatName = \\\"numberFormat\\\";\\r\\n\\t\\t\\tstyle.saveName = \\\"numFmts\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar initialize = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var key in util.numberPredifined)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstyle.formatsByNames[key] = {format: key, formatId: util.numberPredifined[key].formatId};\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tstyle.idIndex = 164;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.getStyleObj = function(objStyle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn objStyle;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tstyle.getTag = function(objStyle,styleFormat)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar attributes = {'numFmtId': styleFormat.formatId,'formatCode': objStyle};\\r\\n\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'numFmt',\\r\\n\\t\\t\\t\\t\\tattributes: attributes\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tinitialize();\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn style;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar XlsxAlignment = function(util)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar HORIZONTAL = ['left', 'center', 'right', 'fill', 'justify', 'centerContinuous', 'distributed'];\\r\\n\\t\\t\\tvar VERTICAL = ['top', 'center', 'bottom', 'justify', 'distributed'];\\r\\n\\r\\n\\t\\t\\tvar getStyleObj = function(objStyle) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(objStyle)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar retValue = {};\\r\\n\\t\\t\\t\\t\\tif (objStyle['horizontal'] && HORIZONTAL.indexOf(objStyle.horizontal) > -1) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.horizontal = objStyle.horizontal;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (objStyle['vertical'] && VERTICAL.indexOf(objStyle.vertical) > -1) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.vertical = objStyle.vertical;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (objStyle['indent']) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.indent = objStyle.indent;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (objStyle['justifyLastLine']) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.justifyLastLine = objStyle.justifyLastLine ? 1 : 0;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (objStyle['readingOrder'] && _.includes([0, 1, 2], objStyle.readingOrder)) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.readingOrder = objStyle.readingOrder;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (objStyle['relativeIndent']) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.relativeIndent = objStyle.relativeIndent;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (objStyle['shrinkToFit']) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.shrinkToFit = objStyle.shrinkToFit ? 1 : 0;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (objStyle['textRotation']) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.textRotation = objStyle.textRotation;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (objStyle['wrapText']) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.wrapText = objStyle.wrapText ? 1 : 0;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(!util.isObjectEmpty(retValue))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar merge = function(objTo,objFrom)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = {};\\r\\n\\t\\t\\t    for (var key in objFrom) \\r\\n\\t\\t\\t    { \\r\\n\\t\\t\\t    \\tretValue[key] = objFrom[key]; \\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    for (var key in objTo) \\r\\n\\t\\t\\t    { \\r\\n\\t\\t\\t    \\tretValue[key] = objTo[key]; \\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    return retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getTag = function(format) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'alignment',\\r\\n\\t\\t\\t\\t\\tattributes: format\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.getStyleObj = getStyleObj;\\r\\n\\t\\t\\tself.merge = merge;\\r\\n\\t\\t\\tself.getTag = getTag;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar XlsxProtection = function(util)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\r\\n\\t\\t\\tvar getStyleObj = function(objStyle) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(objStyle)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar retValue = {};\\r\\n\\t\\t\\t\\t\\tif (objStyle['locked']) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.locked = objStyle.locked ? 1 : 0;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (objStyle['hidden']) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.hidden = objStyle.hidden ? 1 : 0;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(!util.isObjectEmpty(retValue))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar merge = function(objTo,objFrom)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = {};\\r\\n\\t\\t\\t    for (var key in objFrom) \\r\\n\\t\\t\\t    { \\r\\n\\t\\t\\t    \\tretValue[key] = objFrom[key]; \\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    for (var key in objTo) \\r\\n\\t\\t\\t    { \\r\\n\\t\\t\\t    \\tretValue[key] = objTo[key]; \\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    return retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getTag = function(format) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'protection',\\r\\n\\t\\t\\t\\t\\tattributes: format\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.getStyleObj = getStyleObj;\\r\\n\\t\\t\\tself.merge = merge;\\r\\n\\t\\t\\tself.getTag = getTag;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar XlsxBaseStyle = function(util,xlsxStyle)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.util = util;\\r\\n\\t\\t\\tself.xlsxStyle = xlsxStyle;\\r\\n\\t\\t\\tself.formatName = null;\\r\\n\\t\\t\\tself.saveName = null;\\r\\n\\t\\t\\tself.nameIndex = 1;\\r\\n\\t\\t\\tself.idIndex = 0;\\r\\n\\t\\t\\tself.formats = [];\\r\\n\\t\\t\\tself.formatsByData = {};\\r\\n\\t\\t\\tself.formatsByNames = {};\\r\\n\\t\\t\\tself.predefined = {};\\r\\n\\t\\t\\tself.saveEmpty = true;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.add = function(style,name,prop)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tprop = prop ? prop : {};\\r\\n\\t\\t\\t\\tif (name && self.formatsByNames[name]) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar objStyle = self.getStyleObj(style,prop);\\r\\n\\t\\t\\t\\t\\tvar strStyle = self.util.isObject(objStyle) ? JSON.stringify(objStyle) : objStyle;\\r\\n\\r\\n\\t\\t\\t\\t\\tif (strStyle !== self.formatsByNames[name].stringFormat) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tself.addNewStyle(objStyle, strStyle, name);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn name;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (!name && self.util.isString(style)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (self.formatsByNames[style]) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn style;\\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\telse if (self.predefined[style]) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn self.add(self.predefined[style],style);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar objStyle = self.getStyleObj(style,prop);\\r\\n\\t\\t\\t\\tvar stringFormat = self.util.isObject(objStyle) ? JSON.stringify(objStyle) : objStyle;\\r\\n\\t\\t\\t\\tvar styleFormat = self.formatsByData[stringFormat];\\r\\n\\r\\n\\t\\t\\t\\tif (!styleFormat) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstyleFormat = self.addNewStyle(objStyle,stringFormat,name);\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse if (name && !self.formatsByNames[name]) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstyleFormat.name = name;\\r\\n\\t\\t\\t\\t\\tself.formatsByNames[name] = styleFormat;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn styleFormat.name;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.addNewStyle = function(objStyle,strStyle,name)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tname = name || self.formatName + self.nameIndex++;\\r\\n\\t\\t\\t\\tvar styleFormat = {\\r\\n\\t\\t\\t\\t\\tname: name,\\r\\n\\t\\t\\t\\t\\tformatId: self.idIndex++,\\r\\n\\t\\t\\t\\t\\tformat: objStyle,\\r\\n\\t\\t\\t\\t\\tstringFormat: strStyle\\r\\n\\t\\t\\t\\t};\\r\\n\\r\\n\\t\\t\\t\\tself.formats.push(styleFormat);\\r\\n\\t\\t\\t\\tself.formatsByData[strStyle] = styleFormat;\\r\\n\\t\\t\\t\\tself.formatsByNames[name] = styleFormat;\\r\\n\\r\\n\\t\\t\\t\\treturn styleFormat;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.getStyleObj = function(objStyle)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn objStyle;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.getStyle = function(objStyle) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (self.util.isString(objStyle)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar styleFormat = self.formatsByNames[objStyle];\\r\\n\\t\\t\\t\\t\\treturn styleFormat ? styleFormat.format : objStyle;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn objStyle;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.getStyleID = function(name) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar styleFormat = self.formatsByNames[name];\\r\\n\\t\\t\\t\\treturn styleFormat ? styleFormat.formatId : self.getPredefinedID(name);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.getPredefinedID = function(name) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (self.predefined[name]) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn self.getStyleID(self.add(self.predefined[name],name));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.getFinalTag = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (self.saveEmpty || self.formats.length > 0) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar attributes = {count:self.formats.length};\\r\\n\\t\\t\\t\\t\\tvar children = [];\\r\\n\\t\\t\\t\\t\\tfor(var index = 0;index < self.formats.length;index++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar format = self.formats[index];\\r\\n\\t\\t\\t\\t\\t\\tchildren.push(self.getTag(format.format, format));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\t\\tname: self.saveName,\\r\\n\\t\\t\\t\\t\\t\\tattributes: attributes,\\r\\n\\t\\t\\t\\t\\t\\tchildren: children\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn '';\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.getTag = function(objStyle,prop) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn '';\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.merge = function(formatTo,formatFrom)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn formatFrom || formatTo;\\r\\n\\t\\t\\t};\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar XlsxWorkbook = function(util,styles,sharedString,arrSheets,setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar arrSheet = [];\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar process = function() \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrSheet = [];\\r\\n\\t\\t\\t\\tvar sheetValue = \\\"\\\";\\r\\n\\t\\t\\t\\tif(arrSheets && arrSheets.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < arrSheets.length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar sheetID = count + 1;\\r\\n\\t\\t\\t\\t\\t\\tvar sheet = new XlsxSheet(util,self,styles,sharedString,arrSheets[count],sheetID,setting);\\r\\n\\t\\t\\t\\t\\t\\tsheetValue += sheet.process();\\r\\n\\t\\t\\t\\t\\t\\tarrSheet.push(sheet);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tsheetValue = '<sheets>' + sheetValue + '</sheets>';\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'workbook',\\r\\n\\t\\t\\t\\t\\tns: 'spreadsheetml',\\r\\n\\t\\t\\t\\t\\tattributes: {'xmlns:r': util.schemas.r,'xmlns:mx': util.schemas.mx,'xmlns:mc': util.schemas.mc,'xmlns:mv': util.schemas.mv,'xmlns:x14': util.schemas.x14,'xmlns:x14ac': util.schemas.x14ac,'xmlns:xm': util.schemas.xm},\\r\\n\\t\\t\\t\\t\\tchildren: ['<workbookPr/>','<bookViews><workbookView activeTab=\\\"0\\\"/></bookViews>', sheetValue, '<definedNames/>', '<calcPr/>']\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getSheet = function(index)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(arrSheet && arrSheet.length > index)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn arrSheet[index];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.process = process;\\r\\n\\t\\t\\tself.getSheet = getSheet;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar XlsxSheet = function(util,xlsxWorkbook,styles,sharedString,objSheet,sheetIndex,setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//objSheet properties: {name,columns,dataSource,rowProperties,title,titleStyle,headerStyle,maxCharWidth,freeze,split,viewAttribute,printSetUp}\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar arrRow = [];\\r\\n\\t\\t\\tvar sheetData = null;\\r\\n\\t\\t\\tvar path = null;\\r\\n\\t\\t\\tvar relationsPath = null;\\r\\n\\t\\t\\tvar relationship = null;\\r\\n\\t\\t\\tvar override = null;\\r\\n\\t\\t\\tvar maxX = 0;\\r\\n\\t\\t\\tvar maxY = null;\\r\\n\\t\\t\\tvar isHeaderRequired = false;\\r\\n\\t\\t\\tvar arrProcessColumns = [];\\r\\n\\t\\t\\tvar objProcessRows = {};\\r\\n\\t\\t\\tvar arrProcessData = [];\\r\\n\\t\\t\\tvar mergedCells = null;\\r\\n\\t\\t\\tvar sheetViewAttribute = {};\\r\\n\\t\\t\\tvar sheetViewPane = {};\\r\\n\\t\\t\\tvar defaultMargin = {left: 0.7,\\r\\n\\t\\t\\t\\t\\tright: 0.7,\\r\\n\\t\\t\\t\\t\\ttop: 0.75,\\r\\n\\t\\t\\t\\t\\tbottom: 0.75,\\r\\n\\t\\t\\t\\t\\theader: 0.3,\\r\\n\\t\\t\\t\\t\\tfooter: 0.3};\\r\\n\\t\\t\\tvar printConfig = {};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar initialize = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tmergedCells = new XlsxMergedCells(util,self);\\r\\n\\t\\t\\t\\tgetObjColumns();\\r\\n\\t\\t\\t\\tgetObjRows();\\r\\n\\t\\t\\t\\tgetData();\\r\\n\\t\\t\\t\\tinitializeSheetView();\\r\\n\\t\\t\\t\\tprocessProperties();\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getObjColumns = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrCol = objSheet.columns;\\r\\n\\t\\t\\t\\tfor(var index = 0;index < arrCol.length;index++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar column = util.cloneObject(arrCol[index]);\\r\\n\\t\\t\\t\\t\\tif(column.headerText)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tisHeaderRequired = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (column.style) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tcolumn.style = styles.addFormat(column.style);\\r\\n\\t\\t\\t\\t\\t\\tvar style = styles.addFillOutFormat(column.style);\\r\\n\\t\\t\\t\\t\\t\\tcolumn.styleID = styles.getStyleID(style);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tarrProcessColumns.push(column);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getObjRows = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar objRows = objSheet.rowProperties;\\r\\n\\t\\t\\t\\tvar dataIndex = 0;\\r\\n\\t\\t\\t\\tvar setStyle = function(tempRow,tempStyle)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\ttempRow.style = styles.addFormat(tempStyle);\\r\\n\\t\\t\\t\\t\\tvar rowStyle = styles.addFillOutFormat(tempRow.style);\\r\\n\\t\\t\\t\\t\\ttempRow.styleID = styles.getStyleID(rowStyle);\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tif(objSheet.title)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = {};\\r\\n\\t\\t\\t\\t\\tvar titleStyle = {horizontal: 'center',vertical: 'center',font: {bold: true}};\\r\\n\\t\\t\\t\\t\\tif(objSheet.titleStyle)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\ttitleStyle = objSheet.titleStyle;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tsetStyle(item,titleStyle);\\r\\n\\t\\t\\t\\t\\titem.skipColumnsStyle = true;\\r\\n\\t\\t\\t\\t\\titem.type = \\\"string\\\";\\r\\n\\t\\t\\t\\t\\tobjProcessRows[dataIndex++] = item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(isHeaderRequired)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = {};\\r\\n\\t\\t\\t\\t\\tif(objSheet.headerStyle)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetStyle(item,objSheet.headerStyle);\\r\\n\\t\\t\\t\\t\\t\\titem.skipColumnsStyle = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\titem.skipColumnsStyle = false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\titem.type = \\\"string\\\";\\r\\n\\t\\t\\t\\t\\tobjProcessRows[dataIndex++] = item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tfor(var key in objRows)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar row = util.cloneObject(objRows[key]);\\r\\n\\t\\t\\t\\t\\tif (row.style) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetStyle(row,row.style);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\trow.skipColumnsStyle = row.skipColumnsStyle || false;\\r\\n\\t\\t\\t\\t\\tvar index = parseInt(key) + dataIndex;\\r\\n\\t\\t\\t\\t\\tobjProcessRows[index] = row;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getData = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar dataSource = objSheet.dataSource;\\r\\n\\t\\t\\t\\tvar tempSource = [];\\r\\n\\t\\t\\t\\tvar dataIndex = 0;\\r\\n\\t\\t\\t\\tif(objSheet.title)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = util.getArrayOfSize(arrProcessColumns.length,function(index){\\r\\n\\t\\t\\t\\t\\t\\tif(index == 0)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\treturn {value: objSheet.title, colspan:arrProcessColumns.length};\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\treturn {value: null};\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t\\ttempSource.push(item);\\r\\n\\t\\t\\t\\t\\tdataIndex++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(isHeaderRequired)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar item = {};\\r\\n\\t\\t\\t\\t\\tfor(var index = 0;index < arrProcessColumns.length;index++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar column = arrProcessColumns[index];\\r\\n\\t\\t\\t\\t\\t\\titem[arrProcessColumns[index].dataField] = {value:(column.headerText || \\\"\\\"),style:column.headerCellStyle};\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\ttempSource.push(item);\\r\\n\\t\\t\\t\\t\\tdataIndex++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar source = tempSource.concat(dataSource);\\r\\n\\t\\t\\t\\tfor(var index = 0;index < source.length;index++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar rowData = source[index];\\r\\n\\t\\t\\t\\t\\tvar objRow = objProcessRows[index] || {};\\r\\n\\t\\t\\t\\t\\tvar rowIndex = parseInt(index) + 1;\\r\\n\\t\\t\\t\\t\\tvar row = getRowData(rowData,objRow,rowIndex,source);\\r\\n\\t\\t\\t\\t\\tarrProcessData.push(row);\\r\\n\\t\\t\\t\\t\\t//maxX = Math.max(maxX, row.length);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tmaxY = arrProcessData.length;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getRowData = function(rowData,objRow,rowIndex,dataSource)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = [];\\r\\n\\t\\t\\t\\tif(rowData)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar rowStyle = null;\\r\\n\\t\\t\\t\\t\\tvar skipColumnsStyle = false;\\r\\n\\t\\t\\t\\t\\tvar inserts = [];\\r\\n\\t\\t\\t\\t\\tif (!util.isArray(rowData)) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\trowData = mergeRowDataToRow(rowData,objRow);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(rowData)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\trowStyle = rowData.style || null;\\r\\n\\t\\t\\t\\t\\t\\tskipColumnsStyle = rowData.skipColumnsStyle;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tfor(var index = 0;index < arrProcessColumns.length;index++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar objCol = arrProcessColumns[index];\\r\\n\\t\\t\\t\\t\\t\\tvar objCell = getCellDetails(rowData,objCol,index);\\r\\n\\t\\t\\t\\t\\t\\tobjCol[\\\"cellDetails\\\"] = objCol[\\\"cellDetails\\\"] || {};\\r\\n\\t\\t\\t\\t\\t\\tobjCol[\\\"cellDetails\\\"][rowIndex] = objCell;\\r\\n\\t\\t\\t\\t\\t\\tif(objCell.isObject)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(objCell.isSpanRequired)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\trowData = mergeCells(dataSource,rowData,arrProcessColumns,parseInt(index),rowIndex - 1,objCell);\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\treturn rowData;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar mergeRowDataToRow = function(rowData,objRow)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\trowData.height = rowData.height || objRow.height;\\r\\n\\t\\t\\t\\trowData.outlineLevel = rowData.outlineLevel || objRow.outlineLevel;\\r\\n\\t\\t\\t\\trowData.type = rowData.type || objRow.type;\\r\\n\\t\\t\\t\\trowData.style = rowData.style ? styles.addFormat(rowData.style) : objRow.style;\\r\\n\\t\\t\\t\\trowData.skipColumnsStyle = rowData.skipColumnsStyle || objRow.skipColumnsStyle;\\r\\n\\r\\n\\t\\t\\t\\treturn rowData;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getCellDetails = function(rowData,objCol,index)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar value = util.isArray(rowData) ? rowData[index] : rowData[objCol.dataField];\\r\\n\\t\\t\\t\\tvar retValue = {origValue: value, value: value,isObject: false,style: null,isSpanRequired: false};\\r\\n\\t\\t\\t\\tif (!util.isUndefinedOrNull(value) && !util.isDate(value) && util.isObject(value))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue.isObject = true;\\r\\n\\t\\t\\t\\t\\tif (value.style) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.style = value.style;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (value.colspan || value.rowspan) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.isSpanRequired = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tretValue.value = value.value;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar mergeCells = function(dataSource,rowData,arrCol,colIndex,rowIndex,objCell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar origValue = objCell.origValue;\\r\\n\\t\\t\\t\\tif (origValue.colspan || origValue.rowspan) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar colSpan = (origValue.colspan || 1) - 1;\\r\\n\\t\\t\\t\\t\\tvar rowSpan = (origValue.rowspan || 1) - 1;\\r\\n\\t\\t\\t\\t\\tif (colSpan || rowSpan) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tmergedCells.addMergedCells({ c: colIndex + 1, r: rowIndex + 1 }, { c: colIndex + 1 + colSpan, r: rowIndex + 1 + rowSpan });\\r\\n\\t\\t\\t\\t\\t\\treturn mergedCells.add(dataSource,rowData,arrCol,colIndex,rowIndex,colSpan,rowSpan,origValue.style);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn rowData;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar process = function() \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsheetData = processSheetData();\\r\\n\\t\\t\\t\\tsetProp();\\r\\n\\t\\t\\t\\treturn processSheet();\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar processSheetData = function() \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrRow = [];\\r\\n\\t\\t\\t\\tvar beforeData = \\\"\\\";\\r\\n\\t\\t\\t\\tvar rowValue = \\\"\\\";\\r\\n\\t\\t\\t\\tvar colValue = \\\"\\\";\\r\\n\\t\\t\\t\\tvar afterData = \\\"\\\";\\r\\n\\t\\t\\t\\tif(objSheet)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar maxCharWidth = objSheet.maxCharWidth || setting.maxCharWidth;\\r\\n\\t\\t\\t\\t\\tcolValue = processColumns(arrProcessColumns,maxCharWidth);\\r\\n\\t\\t\\t\\t\\tif(arrProcessColumns && arrProcessColumns.length > 0 && arrProcessData && arrProcessData.length > 0)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tfor(var count = 0;count < arrProcessData.length;count++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tvar rowIndex = count + 1;\\r\\n\\t\\t\\t\\t\\t\\t\\tvar objRow = objProcessRows[count] || {};\\r\\n\\t\\t\\t\\t\\t\\t\\tvar row = new XlsxRow(util,self,styles,sharedString,arrProcessData[count],arrProcessColumns,rowIndex,objRow);\\r\\n\\t\\t\\t\\t\\t\\t\\trowValue += row.process();\\r\\n\\t\\t\\t\\t\\t\\t\\tarrRow.push(row);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\trowValue = '<sheetData>' + rowValue + '</sheetData>';\\r\\n\\t\\t\\t\\tbeforeData = getBeforeSheetData();\\r\\n\\t\\t\\t\\tafterData = getAfterSheetData();\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'worksheet',\\r\\n\\t\\t\\t\\t\\tns: 'spreadsheetml',\\r\\n\\t\\t\\t\\t\\tattributes: {'xmlns:mc': util.schemas.mc,'xmlns:mv': util.schemas.mv,'xmlns:mx': util.schemas.mx,'xmlns:r': util.schemas.r,'xmlns:x14': util.schemas.x14,'xmlns:x14ac': util.schemas.x14ac,'xmlns:xm': util.schemas.xm},\\r\\n\\t\\t\\t\\t\\tchildren: [beforeData,colValue,rowValue,afterData]\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getBeforeSheetData = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = \\\"\\\";\\r\\n\\t\\t\\t\\tretValue += getSheetViewsTag();\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getAfterSheetData = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = \\\"\\\";\\r\\n\\t\\t\\t\\tretValue += mergedCells.getTag() + getPrinterTag();\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar processSheet = function() \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar templateSheet = '<sheet state=\\\"visible\\\" name=\\\"###sheetName###\\\" sheetId=\\\"###sheetIndex###\\\" r:id=\\\"rId###sheetIndex###\\\"/>';\\r\\n\\t\\t\\t\\tvar sheet = templateSheet.replaceAll(\\\"###sheetName###\\\",objSheet.name || (\\\"Sheet\\\" + sheetIndex));\\r\\n\\t\\t\\t\\tsheet = sheet.replaceAll(\\\"###sheetIndex###\\\",sheetIndex);\\r\\n\\t\\t\\t\\treturn sheet;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar processColumns = function(arrCol,maxCharWidth)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(arrCol && arrCol.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrChildren = [];\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < arrCol.length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar item = arrCol[count];\\r\\n\\t\\t\\t\\t\\t\\tvar arrAttr = {'min': item.min || count + 1, 'max': item.max || count + 1};\\r\\n\\t\\t\\t\\t\\t\\tif (item.hidden) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrAttr['hidden'] = 1;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif (item.autoFit) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrAttr['bestFit'] = 1;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif (item.width) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrAttr['customWidth'] = 1;\\r\\n\\t\\t\\t\\t\\t\\t\\tarrAttr['width'] = item.width;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if (item.widthInPx) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrAttr['customWidth'] = 1;\\r\\n\\t\\t\\t\\t\\t\\t\\tarrAttr['width'] = util.pixelToCharWidth(util.charToRealWidth(item.widthInPx,maxCharWidth),maxCharWidth);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse if (item.widthInChar) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrAttr['customWidth'] = 1;\\r\\n\\t\\t\\t\\t\\t\\t\\tarrAttr['width'] = util.charToRealWidth(item.widthInChar,maxCharWidth);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t//arrAttr['width'] = 9.140625;\\r\\n\\t\\t\\t\\t\\t\\t\\tarrAttr['width'] = 10;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tif (item.styleID) \\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tarrAttr['style'] = item.styleID;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tarrChildren.push(util.getXML({\\r\\n\\t\\t\\t\\t\\t\\t\\tname: 'col',\\r\\n\\t\\t\\t\\t\\t\\t\\tattributes: arrAttr\\r\\n\\t\\t\\t\\t\\t\\t}));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\t\\tname: 'cols',\\r\\n\\t\\t\\t\\t\\t\\tchildren: arrChildren\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn '';\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar processProperties = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(objSheet.freeze)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar value = objSheet.freeze;\\r\\n\\t\\t\\t\\t\\tfreeze(value.col, value.row, value.cell, value.activePane);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(objSheet.name == \\\"split\\\") \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar value = objSheet.split;\\r\\n\\t\\t\\t\\t\\tsplit(value.x, value.y, value.cell, value.activePane);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(objSheet.viewAttribute)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var key in objSheet.viewAttribute)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetSheetViewAttribute({name: key,value: objSheet.viewAttribute[key]});\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(objSheet.printSetUp)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(objSheet.printSetUp.margin)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetMargin(objSheet.printSetUp.margin);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(objSheet.printSetUp.orientation)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsetOrientation(objSheet.printSetUp.orientation);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getRow = function(index)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(arrRow && arrRow.length > index)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn arrRow[index];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar setProp = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tpath = 'worksheets/sheet' + sheetIndex + '.xml';\\r\\n\\t\\t\\t\\trelationsPath = 'worksheets/_rels/sheet' + sheetIndex + '.xml.rels';\\r\\n\\t\\t\\t\\trelationship = util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'Relationship',\\r\\n\\t\\t\\t\\t\\tattributes: {'Id': 'rId' + sheetIndex,'Type': util.schemas.worksheet,'Target': path}\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\toverride = util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'Override',\\r\\n\\t\\t\\t\\t\\tattributes: {'PartName': '/xl/' + path,'ContentType': 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml'}\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getPath = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn path;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getRelationsPath = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn relationsPath;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getSheetData = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn sheetData;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getRelationship = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn relationship;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getOverride = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn override;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar initializeSheetView = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar getBooleanValue = function(item)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(!item || util.getBooleanValue(item.value) == null)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\txlsxUtil.throwNSError(item.name + \\\" attribute does not have a proper value for Sheet View Attribute\\\"); \\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn util.getBooleanValue(item.value).toString();\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tsheetViewAttribute = {\\r\\n\\t\\t\\t\\t\\t\\tdefaultGridColor: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null,\\r\\n\\t\\t\\t\\t\\t\\t\\tgetValue: getBooleanValue\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\tcolorId: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\trightToLeft: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null,\\r\\n\\t\\t\\t\\t\\t\\t\\tgetValue: getBooleanValue\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\tshowFormulas: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null,\\r\\n\\t\\t\\t\\t\\t\\t\\tgetValue: getBooleanValue\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\tshowGridLines: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null,\\r\\n\\t\\t\\t\\t\\t\\t\\tgetValue: getBooleanValue\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\tshowOutlineSymbols: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null,\\r\\n\\t\\t\\t\\t\\t\\t\\tgetValue: getBooleanValue\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\tshowRowColHeaders: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null,\\r\\n\\t\\t\\t\\t\\t\\t\\tgetValue: getBooleanValue\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\tshowRuler: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null,\\r\\n\\t\\t\\t\\t\\t\\t\\tgetValue: getBooleanValue\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\tshowWhiteSpace: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null,\\r\\n\\t\\t\\t\\t\\t\\t\\tgetValue: getBooleanValue\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\tshowZeros: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null,\\r\\n\\t\\t\\t\\t\\t\\t\\tgetValue: getBooleanValue\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\ttabSelected: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null,\\r\\n\\t\\t\\t\\t\\t\\t\\tgetValue: getBooleanValue\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\ttopLeftCell: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null //A1\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\tview: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: 'normal' //normal | pageBreakPreview | pageLayout\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\twindowProtection: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null,\\r\\n\\t\\t\\t\\t\\t\\t\\tgetValue: getBooleanValue\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\tzoomScale: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null //10-400\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\tzoomScaleNormal: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null //10-400\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\tzoomScalePageLayoutView: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null //10-400\\r\\n\\t\\t\\t\\t\\t\\t},\\r\\n\\t\\t\\t\\t\\t\\tzoomScaleSheetLayoutView: {\\r\\n\\t\\t\\t\\t\\t\\t\\tvalue: null //10-400\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar setSheetViewAttribute = function(objAttr) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(objAttr && objAttr.name)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif (objAttr.name == \\\"freeze\\\") \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tfreeze(value.col, value.row, value.cell, value.activePane);\\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\telse if(objAttr.name == \\\"split\\\") \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tsplit(value.x, value.y, value.cell, value.activePane);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse if (sheetViewAttribute[objAttr.name] && !util.isUndefinedOrNull(objAttr.value)) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tif(sheetViewAttribute[objAttr.name].getValue)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tsheetViewAttribute[objAttr.name].value = sheetViewAttribute[objAttr.name].getValue(objAttr);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tsheetViewAttribute[objAttr.name].value = objAttr.value;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar freeze = function(colNo,rowNo,cell,activePane) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsheetViewPane = {\\r\\n\\t\\t\\t\\t\\tstate: 'frozen',\\r\\n\\t\\t\\t\\t\\txSplit: parseInt(colNo),\\r\\n\\t\\t\\t\\t\\tySplit: parseInt(rowNo),\\r\\n\\t\\t\\t\\t\\ttopLeftCell: util.getCanonCell(cell) || util.getLetterFromCells(parseInt(colNo) + 1, parseInt(rowNo) + 1),\\r\\n\\t\\t\\t\\t\\tactivePane: activePane || 'bottomRight'\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar split = function(xPos,yPos,cell,activePane) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tsheetViewPane = {\\r\\n\\t\\t\\t\\t\\tstate: 'split',\\r\\n\\t\\t\\t\\t\\txSplit: parseInt(xPos) * 20,\\r\\n\\t\\t\\t\\t\\tySplit: parseInt(yPos) * 20,\\r\\n\\t\\t\\t\\t\\ttopLeftCell: util.getCanonCell(cell) || 'A1',\\r\\n\\t\\t\\t\\t\\tactivePane: activePane || 'bottomRight'\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getSheetViewsTag = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar arrChildren = [];\\r\\n\\t\\t\\t\\tif(sheetViewPane && Object.keys(sheetViewPane).length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar attr = {state: sheetViewPane.state, xSplit: sheetViewPane.xSplit, ySplit: sheetViewPane.ySplit, topLeftCell: sheetViewPane.topLeftCell, activePane: sheetViewPane.activePane};\\r\\n\\t\\t\\t\\t\\tarrChildren.push(util.getXML({\\r\\n\\t\\t\\t\\t\\t\\tname: 'pane',\\r\\n\\t\\t\\t\\t\\t\\tattributes:attr\\r\\n\\t\\t\\t\\t\\t}));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar attributes = {workbookViewId: 0};\\r\\n\\t\\t\\t\\tfor(var key in sheetViewAttribute)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(!util.isUndefinedOrNull(sheetViewAttribute[key].value))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tattributes[key] = sheetViewAttribute[key].value;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tvar arrSheetView = [util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'sheetView',\\r\\n\\t\\t\\t\\t\\tattributes:attributes,\\r\\n\\t\\t\\t\\t\\tchildren: arrChildren\\r\\n\\t\\t\\t\\t})];\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'sheetViews',\\r\\n\\t\\t\\t\\t\\tchildren:arrSheetView\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar setMargin = function(margin)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tprintConfig.margin = util.setObjectWithDefaults(margin,defaultMargin);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar setOrientation = function(orientation)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (orientation === 'portrait' || orientation === 'landscape')\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tprintConfig.orientation = orientation;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getPrinterTag = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = '';\\r\\n\\t\\t\\t\\tif(printConfig)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar margin = printConfig.margin;\\r\\n\\t\\t\\t\\t\\tif(margin) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue += util.getXML({\\r\\n\\t\\t\\t\\t\\t\\t\\tname: 'pageMargins',\\r\\n\\t\\t\\t\\t\\t\\t\\tattributes: margin\\r\\n\\t\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(printConfig.orientation)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue += util.getXML({\\r\\n\\t\\t\\t\\t\\t\\t\\tname: 'pageSetup',\\r\\n\\t\\t\\t\\t\\t\\t\\tattributes: {orientation: printConfig.orientation}\\r\\n\\t\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tinitialize();\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.process = process;\\r\\n\\t\\t\\tself.getRow = getRow;\\r\\n\\t\\t\\tself.setProp = setProp;\\r\\n\\t\\t\\tself.getPath = getPath;\\r\\n\\t\\t\\tself.getRelationsPath = getRelationsPath;\\r\\n\\t\\t\\tself.getSheetData = getSheetData;\\r\\n\\t\\t\\tself.getRelationship = getRelationship;\\r\\n\\t\\t\\tself.getOverride = getOverride;\\r\\n\\t\\t\\tself.getCellDetails = getCellDetails;\\r\\n\\t\\t\\tself.freeze = freeze;\\r\\n\\t\\t\\tself.split = split;\\r\\n\\t\\t\\tself.setViewAttribute = setSheetViewAttribute;\\r\\n\\t\\t\\tself.setMargin = setMargin;\\r\\n\\t\\t\\tself.setOrientation = setOrientation;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar XlsxRow = function(util,xlsxSheet,styles,sharedString,rowData,arrCol,rowIndex,objRow)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar arrCell = [];\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar process = function() \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrCell = [];\\r\\n\\t\\t\\t\\tvar cellValue = \\\"\\\";\\r\\n\\t\\t\\t\\tif(arrCol && arrCol.length > 0)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var count = 0;count < arrCol.length;count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar objCol = arrCol[count];\\r\\n\\t\\t\\t\\t\\t\\tvar objCell = objCol[\\\"cellDetails\\\"][rowIndex] || xlsxSheet.getCellDetails(rowData,objCol,count);\\r\\n\\t\\t\\t\\t\\t\\tvar cell = new XlsxCell(util,self,styles,sharedString,objCol,count + 1,rowData,rowIndex,objCell,objRow,objRow.skipColumnsStyle);\\r\\n\\t\\t\\t\\t\\t\\tcellValue += cell.process();\\r\\n\\t\\t\\t\\t\\t\\tarrCell.push(cell);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'row',\\r\\n\\t\\t\\t\\t\\tattributes: getAttr(),\\r\\n\\t\\t\\t\\t\\tchildren: [cellValue]\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getAttr = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar attr = {'r': rowIndex};\\r\\n\\t\\t\\t\\tif (!util.isUndefinedOrNull(objRow.height)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tattr[\\\"customHeight\\\"] = 1;\\r\\n\\t\\t\\t\\t\\tattr[\\\"ht\\\"] = objRow.height;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objRow.styleID) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tattr[\\\"customFormat\\\"] = 1;\\r\\n\\t\\t\\t\\t\\tattr[\\\"s\\\"] = objRow.styleID;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (objRow.outlineLevel) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tattr[\\\"outlineLevel\\\"] = objRow.outlineLevel;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn attr;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getCell = function(index)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(arrCell && arrCell.length > index)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn arrCell[index];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.process = process;\\r\\n\\t\\t\\tself.getCell = getCell;\\r\\n\\t\\t\\t\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar XlsxCell = function(util,xlsxRow,styles,sharedString,objCol,cellIndex,rowData,rowIndex,objCell,objRow,skipColumnsStyle)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar dataType = null;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tinitialize = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar process = function() \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar value = objCell.value;\\r\\n\\t\\t\\t\\tvar cellStyle = objCell.style;\\r\\n\\t\\t\\t\\tvar objValue = objCell.origValue;\\r\\n\\t\\t\\t\\tvar cellType = getCellType(value);\\r\\n\\t\\t\\t\\tvar predefinedStyle = null;\\r\\n\\t\\t\\t\\tfor(var key in util.numberPredifined)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(cellType == key)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tpredefinedStyle = cellType;\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar columnStyle = !skipColumnsStyle ? objCol.style : null;\\r\\n\\t\\t\\t\\tvar rowStyle = objRow.style;\\r\\n\\t\\t\\t\\tvar finalCellStyleID = styles.getStyleID(styles.merge(predefinedStyle,columnStyle,rowStyle,cellStyle));\\r\\n\\t\\t\\t\\tvar objCellValue = getCellObj(cellType,value);\\r\\n\\t\\t\\t\\tvar attributes = getAttr(cellIndex - 1,rowIndex,cellType,finalCellStyleID);\\r\\n\\t\\t\\t\\tvar children = \\\"\\\";\\r\\n\\t\\t\\t\\tif (!util.isUndefinedOrNull(objCellValue.formula)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tchildren = '<v>' + objCellValue.formula + '</v>';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (!util.isUndefinedOrNull(objCellValue.value))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t/*if(cellType == \\\"string\\\")\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tchildren = '<is><t>' + objCellValue.value + '</t></is>';\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{*/\\r\\n\\t\\t\\t\\t\\t\\tchildren = '<v>' + objCellValue.value + '</v>';\\r\\n\\t\\t\\t\\t\\t//}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\tname: 'c',\\r\\n\\t\\t\\t\\t\\tattributes: attributes,\\r\\n\\t\\t\\t\\t\\tchildren: [children]\\r\\n\\t\\t\\t\\t});\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getAttr = function(index,rowIndex,cellType,styleID)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar attr = {'r': generatorCellNumber(index, rowIndex)};\\r\\n\\t\\t\\t\\tif (styleID) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tattr[\\\"s\\\"] = styleID;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tswitch (cellType)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcase \\\"string\\\":\\r\\n\\t\\t\\t\\t\\t\\t//attr[\\\"t\\\"] = \\\"inlineStr\\\";\\r\\n\\t\\t\\t\\t\\t\\tattr[\\\"t\\\"] = \\\"s\\\"; \\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\tcase \\\"boolean\\\":\\r\\n\\t\\t\\t\\t\\t\\tattr[\\\"t\\\"] = \\\"b\\\"; \\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn attr;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getCellType = function(value)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(objCell && objCell.type)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn objCell.type;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (rowData && rowData.type) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn rowData.type;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (objRow && objRow.type) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn objRow.type;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(objCol && objCol.type)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn objCol.type;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if (typeof value === 'number') \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn 'number';\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse if (typeof value === 'string') \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn 'string';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(util.isDate(value))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn \\\"date\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn 'string';\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getCellObj = function(cellType,cellValue) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = {value: null,formula: null,isString: false};\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tvar formulaFunc = function(objRet,value,sharedString)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjRet.formula = util.escapeString(value);\\r\\n\\t\\t\\t\\t\\treturn objRet;\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tvar stringFunc = function(objRet,value,sharedString)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjRet.value = sharedString.add(value);\\r\\n\\t\\t\\t\\t\\t//objRet.value = value;\\r\\n\\t\\t\\t\\t\\tobjRet.isString = false;\\r\\n\\t\\t\\t\\t\\treturn objRet;\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tvar mapCellType = {string: {func: stringFunc},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t   formula:{func: formulaFunc}};\\r\\n\\t\\t\\t\\tfor(var key in mapCellType)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(cellType == key)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn mapCellType[key].func(retValue,cellValue,sharedString);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tfor(var key in util.numberPredifined)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tif(cellType == key)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn util.numberPredifined[key].cellObjFunc(retValue,cellValue,sharedString);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tretValue.value = cellValue;\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar generatorCellNumber = function(index, rowNumber)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn generateColumnLetter(index) + rowNumber;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar generateColumnLetter = function(colIndex) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (typeof colIndex !== 'number') \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn '';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar prefix = Math.floor(colIndex / 26);\\r\\n\\t\\t\\t\\tvar letter = String.fromCharCode(97 + (colIndex % 26)).toUpperCase();\\r\\n\\t\\t\\t\\tif (prefix === 0) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn letter;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn generateColumnLetter(prefix - 1) + letter;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tinitialize();\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.process = process;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar XlsxSharedStrings = function(util)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar objString = {};\\r\\n\\t\\t\\tvar arrString = [];\\r\\n\\t\\t\\tvar index = 0;\\r\\n\\t\\t\\tvar regexSpace = /^\\\\s|\\\\s$/;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar add = function(str) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar strIndex = objString[str];\\r\\n\\t\\t\\t\\tif (util.isUndefinedOrNull(strIndex)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tstrIndex = index++;\\r\\n\\t\\t\\t\\t\\tobjString = strIndex;\\r\\n\\t\\t\\t\\t\\tarrString[strIndex] = str;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn strIndex;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getAllString = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn arrString;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar hasString = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn index > 0;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getTag = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar strResult = \\\"\\\";\\r\\n\\t\\t\\t\\tfor(var index = 0;index < arrString.length;index++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar str = util.escapeString(arrString[index]);\\r\\n\\t\\t\\t\\t\\tif (regexSpace.test(str)) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tstrResult += '<si><t xml:space=\\\"preserve\\\">' + str + '</t></si>';\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tstrResult += '<si><t>' + str + '</t></si>';\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tvar retValue = getTagStart(index) + strResult + getTagEnd();\\r\\n\\t\\t\\t\\treset();\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getTagStart = function(count) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn util.xmlPrefix + '<sst xmlns=\\\"' + util.schemas.spreadsheetml + '\\\" count=\\\"' + count + '\\\" uniqueCount=\\\"' + count + '\\\">';\\r\\n\\t\\t\\t};\\r\\n\\r\\n\\t\\t\\tvar getTagEnd = function() \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn '</sst>';\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar reset = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjString = {};\\r\\n\\t\\t\\t\\tarrString = [];\\r\\n\\t\\t\\t\\t//not setting index as 0 so that while saving other api can figure out that shared String exists\\r\\n\\t\\t\\t\\t//index = 0;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.add = add;\\r\\n\\t\\t\\tself.getAllString = getAllString;\\r\\n\\t\\t\\tself.getTag = getTag;\\r\\n\\t\\t\\tself.hasString = hasString;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar XlsxMergedCells = function(util,sheet)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar arrCells = [];\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar add = function(dataSource,rowData,arrCol,colIndex,rowIndex,colSpan,rowSpan,style)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(colSpan)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar getEmptyCell = function(index)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\treturn {value: null,style: style};\\r\\n\\t\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\t\\tif(!util.isArray(rowData))\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\trowData = convertObjectToArray(rowData,arrCol);\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tvar arrTill = copyArray(rowData.slice(0, colIndex + 1));\\r\\n\\t\\t\\t\\t\\tvar arrEmpty = util.getArrayOfSize(colSpan,getEmptyCell);\\r\\n\\t\\t\\t\\t\\tarrEmpty = copyArray(arrEmpty);\\r\\n\\t\\t\\t\\t\\tvar arrAfter = copyArray(rowData.slice(colIndex + 1));\\r\\n\\t\\t\\t\\t\\trowData = [].concat(arrTill,arrEmpty,arrAfter);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(rowSpan) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar index = 1;\\r\\n\\t\\t\\t\\t\\tfor(var count = (rowIndex + 1);(count < dataSource.length && index < rowSpan);count++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar item = dataSource[count];\\r\\n\\t\\t\\t\\t\\t\\tutil.isArray(item) ? (item[colIndex] = \\\"\\\") : (item[arrCol[colIndex].dataField] = null);\\r\\n\\t\\t\\t\\t\\t\\tindex++;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\twhile(index < rowSpan)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar item = {};\\r\\n\\t\\t\\t\\t\\t\\tfor(var count = 0;count < arrCol.length;count++)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tif(count == colIndex)\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\titem[arrCol[colIndex].dataField] = {style: style,value: null};\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\t\\titem[arrCol[colIndex].dataField] = null;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\tdataSource.push(item);\\r\\n\\t\\t\\t\\t\\t\\tindex++;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\treturn rowData;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar addMergedCells = function(fromCell,toCell) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tarrCells.push([fromCell, toCell]);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getTag = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (arrCells.length > 0) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar arrChildren = [];\\r\\n\\t\\t\\t\\t\\tfor(var index = 0;index < arrCells.length;index++)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tvar mergeCell = arrCells[index];\\r\\n\\t\\t\\t\\t\\t\\tarrChildren.push(util.getXML({\\r\\n\\t\\t\\t\\t\\t\\t\\tname: 'mergeCell',\\r\\n\\t\\t\\t\\t\\t\\t\\tattributes: {'ref': util.getCanonCell(mergeCell[0]) + ':' + util.getCanonCell(mergeCell[1])}\\r\\n\\t\\t\\t\\t\\t\\t}));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn util.getXML({\\r\\n\\t\\t\\t\\t\\t\\tname: 'mergeCells',\\r\\n\\t\\t\\t\\t\\t\\tattributes: {'count': arrCells.length},\\r\\n\\t\\t\\t\\t\\t\\tchildren: arrChildren\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar convertObjectToArray = function(rowData,arrCol)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = Array(arrCol.length);\\r\\n\\t\\t\\t\\tfor(var count = 0;count < arrCol.length;count++)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar objCol = arrCol[count];\\r\\n\\t\\t\\t\\t\\tretValue[count] = rowData[objCol.dataField];\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar copyArray = function(arrSource)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (util.isArray(arrSource)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar retValue = Array(arrSource.length);\\r\\n\\t\\t\\t\\t\\tfor (var i = 0; i < arrSource.length; i++) \\r\\n\\t\\t\\t\\t\\t{ \\r\\n\\t\\t\\t\\t\\t\\tretValue[i] = arrSource[i]; \\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\treturn retValue; \\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\treturn Array.from(arrSource); \\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.add = add;\\r\\n\\t\\t\\tself.addMergedCells = addMergedCells;\\r\\n\\t\\t\\tself.getTag = getTag;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tvar XlsxUtil = function()\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar objSheetsProp = {};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar xmlPrefix = '<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\\\n';\\r\\n\\t\\t\\tvar schemas = {\\r\\n\\t\\t\\t\\t\\t'r': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',\\r\\n\\t\\t\\t\\t\\t'mx': 'http://schemas.microsoft.com/office/mac/excel/2008/main',\\r\\n\\t\\t\\t\\t\\t'mc': 'http://schemas.openxmlformats.org/markup-compatibility/2006',\\r\\n\\t\\t\\t\\t\\t'mv': 'urn:schemas-microsoft-com:mac:vml',\\r\\n\\t\\t\\t\\t\\t'x14': 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/main',\\r\\n\\t\\t\\t\\t\\t'x14ac': 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac',\\r\\n\\t\\t\\t\\t\\t'xm': 'http://schemas.microsoft.com/office/excel/2006/main',\\r\\n\\t\\t\\t\\t\\t'spreadsheetml': 'http://schemas.openxmlformats.org/spreadsheetml/2006/main',\\r\\n\\t\\t\\t\\t\\t'relationshipPackage': 'http://schemas.openxmlformats.org/package/2006/relationships',\\r\\n\\t\\t\\t\\t\\t'worksheet': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet',\\r\\n\\t\\t\\t\\t\\t'stylesheet': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles',\\r\\n\\t\\t\\t\\t\\t'sharedStrings': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings',\\r\\n\\t\\t\\t\\t\\t'contentTypes': 'http://schemas.openxmlformats.org/package/2006/content-types',\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t'officeDocument': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument',\\r\\n\\t\\t\\t\\t\\t'package': 'http://schemas.openxmlformats.org/package/2006/relationships',\\r\\n\\t\\t\\t\\t\\t'table': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/table',\\r\\n\\t\\t\\t\\t\\t'spreadsheetDrawing': 'http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing',\\r\\n\\t\\t\\t\\t\\t'drawing': 'http://schemas.openxmlformats.org/drawingml/2006/main',\\r\\n\\t\\t\\t\\t\\t'drawingRelationship': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing',\\r\\n\\t\\t\\t\\t\\t'image': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image',\\r\\n\\t\\t\\t\\t\\t'chart': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart',\\r\\n\\t\\t\\t\\t\\t'hyperlink': 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink'\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar numberPredifined = null;\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar initialize = function()\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar getDateTimeCellObj = function(objRet,value,sharedString)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar date = getDateTimeValue(value);\\r\\n\\t\\t\\t\\t\\tif(date)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tobjRet.value = date;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tobjRet.value = sharedString.add(String(value));\\r\\n\\t\\t\\t\\t\\t\\t//objRet.value = value;\\r\\n\\t\\t\\t\\t\\t\\tobjRet.isString = true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn objRet;\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tvar getNumberCellObj = function(objRet,value,sharedString)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tobjRet.value = value;\\r\\n\\t\\t\\t\\t\\tobjRet.isString = false;\\r\\n\\t\\t\\t\\t\\treturn objRet;\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t\\tnumberPredifined = {\\r\\n\\t\\t\\t\\t\\t\\tdate: {formatId: 14,cellObjFunc:getDateTimeCellObj}, //mm-dd-yy\\r\\n\\t\\t\\t\\t\\t\\ttime: {formatId: 21,cellObjFunc:getDateTimeCellObj}, //h:mm:ss\\r\\n\\t\\t\\t\\t\\t\\tinteger: {formatId: 1,cellObjFunc:getNumberCellObj},\\r\\n\\t\\t\\t\\t\\t\\tdouble: {formatId: 2,cellObjFunc:getNumberCellObj}\\r\\n\\t\\t\\t\\t};\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getXML = function(config) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = '<' + config.name;\\r\\n\\t\\t\\t\\tvar content = '';\\r\\n\\r\\n\\t\\t\\t\\tif (config.ns) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue = xmlPrefix + retValue + ' xmlns=\\\"' + schemas[config.ns] + '\\\"';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (config.attributes) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tfor(var key in config.attributes)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue += ' ' + key + '=\\\"' + escapeString(config.attributes[key]) + '\\\"';\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (!isUndefinedOrNull(config.value)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcontent += escapeString(config.value);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (config.children) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tcontent += config.children.join('');\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (content) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue += '>' + content + '</' + config.name + '>';\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tretValue += '/>';\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar escapeString = function(str)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn str;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar addSheetProp = function(prop,value)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tobjSheetsProp[prop] = objSheetsProp[prop] ? (objSheetsProp[prop] + \\\" \\\" + value) : value;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getSheetProp = function(prop)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn objSheetsProp[prop];\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getCanonColor = function(color) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn color[0] === '#' ? 'FF' + color.substr(1) : color;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getColorTag = function(color) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (isString(color)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn getXML({\\r\\n\\t\\t\\t\\t\\t\\tname: 'color',\\r\\n\\t\\t\\t\\t\\t\\tattributes: {'rgb': getCanonColor(color)}\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar attributes = {};\\r\\n\\t\\t\\t\\t\\tif (color.tint) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tattributes['tint'] = color.tint;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (color.auto) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tattributes['auto'] = !!color.auto;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif (color.theme) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tattributes['theme'] = color.theme;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn getXML({\\r\\n\\t\\t\\t\\t\\t\\tname: 'color',\\r\\n\\t\\t\\t\\t\\t\\tattributes: attributes\\r\\n\\t\\t\\t\\t\\t});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar hasInArray = function(arrSource,value)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t return (arrSource.indexOf(value) > -1);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar isObject = function(refObject)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (typeof refObject === 'object' && refObject !== null) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t    return true;\\r\\n\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar isString = function(object) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    return typeof object == \\\"string\\\";\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar isDate = function(object) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn (Object.prototype.toString.call(object) === \\\"[object Date]\\\"); \\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar isArray = function(object)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn Array.isArray(object);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar isObjectEmpty = function(obj)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tfor(var key in obj) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t        if(obj.hasOwnProperty(key))\\r\\n\\t\\t\\t        {\\r\\n\\t\\t\\t        \\treturn false;\\r\\n\\t\\t\\t        }\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t    return true;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getDateTimeValue = function(value)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar timezoneOffset = new Date().getTimezoneOffset() * 60 * 1000;\\r\\n\\t\\t\\t\\tvar dateValue = isDate(value) ? value.valueOf() : value;\\r\\n\\t\\t\\t\\tvar date = 25569.0 + (dateValue - timezoneOffset) / (60 * 60 * 24 * 1000);\\r\\n\\t\\t\\t\\tif (isFinite(date)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn date;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn null;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar cloneObject = function(objSrc)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn JSON.parse(JSON.stringify(objSrc));\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getArrayOfSize = function(length,callback)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar index = -1;\\r\\n\\t\\t        var retValue = Array(length);\\r\\n\\t\\t        if(callback)\\r\\n\\t\\t        {\\r\\n\\t\\t        \\twhile (++index < length) \\r\\n\\t\\t\\t\\t    {\\r\\n\\t\\t        \\t\\tretValue[index] = callback(index);\\r\\n\\t\\t\\t\\t    }\\r\\n\\t\\t        }\\r\\n\\t\\t        return retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getLetterFromCells = function(fromCell,toCell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\\r\\n\\t\\t\\t\\tvar retValue = \\\"\\\";\\r\\n\\t\\t\\t\\tvar strData = '';\\r\\n\\t\\t\\t\\tvar count = fromCell;\\r\\n\\t\\t\\t\\tvar index = null;\\r\\n\\t\\t\\t\\tdo \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tindex = (count - 1) % 26;\\r\\n\\t\\t\\t\\t\\tstrData = alphabet[index] + strData;\\r\\n\\t\\t\\t\\t\\tcount = (count - (index + 1)) / 26;\\r\\n\\t\\t\\t\\t} while (count > 0);\\r\\n\\t\\t\\t\\tretValue = strData + (toCell || '');;\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getCellsFromLetter = function(cell) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar retValue = {x: 0,y: 0};\\r\\n\\t\\t\\t\\tvar len = cell.length;\\r\\n\\t\\t\\t\\tfor (var count = 0; count < len; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar charCode = cell.charCodeAt(count);\\r\\n\\t\\t\\t\\t\\tif (charCode >= 65) \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.x = retValue.x * 26 + charCode - 64;\\r\\n\\t\\t\\t\\t\\t} \\r\\n\\t\\t\\t\\t\\telse \\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tretValue.y = parseInt(cell.slice(count), 10);\\r\\n\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn retValue;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getCanonCell = function(cell) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(isObject(cell))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn getLetterFromCells(cell.c || 1, cell.r || 1);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn cell;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getBooleanValue = function(value)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(['true', 'yes', '1'].includes(value)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t    return  true;   \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse if(['false', 'no', '0'].includes(value)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t    return  false;  \\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar throwNSError = function(message)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t \\tthrow new Error(\\\"Error in \\\" + \\\"NSXlsxExport\\\" + \\\" with details::\\\" + message);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar isUndefinedOrNull = function(object) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t    return (typeof object == \\\"undefined\\\" || object === null);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar setObjectWithDefaults = function(objCurrent,objDefault)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(objCurrent)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar objReturn = cloneObject(objCurrent);\\r\\n\\t\\t\\t\\t\\tif(objDefault)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\tfor(var key in objDefault)\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\tobjReturn[key] = objDefault[key];\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\treturn objReturn;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn objDefault;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar pixelToCharWidth = function(width,maxCharWidth)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tmaxCharWidth = getMaxCharWidth(maxCharWidth);\\r\\n\\t\\t\\t\\tvar charWidth = truncate((((width - 5) / maxCharWidth) * 100) + 0.5) / 100;\\r\\n\\t\\t\\t\\treturn charWidth;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar charToRealWidth = function(charWidth,maxCharWidth)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tmaxCharWidth = getMaxCharWidth(maxCharWidth);\\r\\n\\t\\t\\t\\tvar width = truncate((((charWidth * maxCharWidth) + 5) / maxCharWidth) * 256) / 256;\\r\\n\\t\\t\\t\\treturn width;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar getMaxCharWidth = function(maxCharWidth)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t// 6 is for \\\"Calibri 12\\\"\\r\\n\\t\\t\\t\\tmaxCharWidth = maxCharWidth ? maxCharWidth : 6;\\r\\n\\t\\t\\t\\treturn maxCharWidth;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar truncate = function(num)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (Math.trunc) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn Math.trunc(num);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (isNaN(num)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn NaN;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif (num > 0) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn Math.floor(num);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn Math.ceil(num);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tinitialize();\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tself.getXML = getXML;\\r\\n\\t\\t\\tself.escapeString = escapeString;\\r\\n\\t\\t\\tself.addSheetProp = addSheetProp;\\r\\n\\t\\t\\tself.getSheetProp = getSheetProp;\\r\\n\\t\\t\\tself.getCanonColor = getCanonColor;\\r\\n\\t\\t\\tself.getColorTag = getColorTag;\\r\\n\\t\\t\\tself.hasInArray = hasInArray;\\r\\n\\t\\t\\tself.isObject = isObject;\\r\\n\\t\\t\\tself.isString = isString;\\r\\n\\t\\t\\tself.isDate = isDate;\\r\\n\\t\\t\\tself.isArray = isArray;\\r\\n\\t\\t\\tself.isObjectEmpty = isObjectEmpty;\\r\\n\\t\\t\\tself.getDateTimeValue = getDateTimeValue;\\r\\n\\t\\t\\tself.cloneObject = cloneObject;\\r\\n\\t\\t\\tself.getArrayOfSize = getArrayOfSize;\\r\\n\\t\\t\\tself.getLetterFromCells = getLetterFromCells;\\r\\n\\t\\t\\tself.getCellsFromLetter = getCellsFromLetter;\\r\\n\\t\\t\\tself.getCanonCell = getCanonCell;\\r\\n\\t\\t\\tself.getBooleanValue = getBooleanValue;\\r\\n\\t\\t\\tself.throwNSError = throwNSError;\\r\\n\\t\\t\\tself.isUndefinedOrNull = isUndefinedOrNull;\\r\\n\\t\\t\\tself.setObjectWithDefaults = setObjectWithDefaults;\\r\\n\\t\\t\\tself.pixelToCharWidth = pixelToCharWidth;\\r\\n\\t\\t\\tself.charToRealWidth = charToRealWidth;\\r\\n\\t\\t\\tself.xmlPrefix = xmlPrefix;\\r\\n\\t\\t\\tself.schemas = schemas;\\r\\n\\t\\t\\tself.numberPredifined = numberPredifined;\\r\\n\\t\\t};\\r\\n\\t\\t\\r\\n\\t\\tself.process = process;\\r\\n\\t\\t\\r\\n\\t\\tinitialize();\\r\\n\\t};\\r\\n\\t\\r\\n\\treturn NSXlsxExport;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSXlsxExport\\\",NSXlsxExport);\";","export const NSCalendarCode = \"var nsModuleExport = function(root,name,prototype)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\tmodule.exports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\tdefine(name,[], function () {return prototype;});\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\texports[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\troot[name] = prototype;\\r\\n\\t\\t}\\r\\n\\t};var nsIsWeb = function(root)\\r\\n\\t{\\r\\n\\t\\tif(typeof exports === 'object' && typeof module === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if (typeof define === \\\"function\\\" && define.amd)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse if(typeof exports === 'object')\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t};if(!nsIsWeb())\\r\\n\\t\\t{\\r\\nvar nsutilRef = require('./nsUtil.min.js');\\r\\nvar NSUtil = nsutilRef.NSUtil;\\r\\nvar nscontainerbaseRef = require('./nsContainerBase.min.js');\\r\\nvar nsExtendPrototype = nscontainerbaseRef.nsExtendPrototype;\\r\\nvar NSContainerBase = nscontainerbaseRef.NSContainerBase;\\r\\nvar svgRef = require('./nsSVG.min.js');\\r\\nvar NSSvg = svgRef.NSSvg;\\r\\nvar NSSvgShapes = svgRef.NSSvgShapes;\\r\\nvar plugginsRef = require('./nsPluggins.min.js');\\r\\nvar nsTextEditor = plugginsRef.nsTextEditor;\\r\\nvar nsTextAreaEditor = plugginsRef.nsTextAreaEditor;\\r\\nvar NSCellSelection = plugginsRef.NSCellSelection;\\r\\nvar NSTableCellNavigator = plugginsRef.NSTableCellNavigator;\\r\\nvar dateutilRef = require('./nsDateUtil.min.js');\\r\\nvar NSDateUtil = dateutilRef.NSDateUtil;\\r\\n\\r\\n\\t\\t}\\r\\nvar NSCalendar = (function()\\r\\n{\\r\\n\\tfunction NSCalendar(component,setting) \\r\\n\\t{\\r\\n\\t\\tthis.__setting = setting;\\r\\n\\t\\t\\r\\n\\t\\tthis.__context = window;\\r\\n\\t\\tthis.__inputDateFormat = \\\"MM/dd/yyyy\\\";\\r\\n\\t\\tthis.__minDate = null;\\r\\n\\t\\tthis.__maxDate = null;\\r\\n\\t\\tthis.__selectedDate = null;\\r\\n\\t\\tthis.__buttonSetting = {prev:{html:null,cssClass:null},next:{html:null,cssClass:null}, savetime: {html:null,cssClass:null}, canceltime: {html:null,cssClass:null}};\\r\\n\\t\\tthis.__customClass = {container:null,headerContainer:null,prevButton:null,nextButton:null,monthDropdown:null,yearDropdown:null,weekContainer:null,week:null,dayContainer:null,day:null,footerContainer:null};\\r\\n\\t\\tthis.__monthValueName = null;\\r\\n\\t\\tthis.__monthTextName = null;\\r\\n\\t\\tthis.__weekName = null;\\r\\n\\t\\tthis.__markDayDisabled = null;\\r\\n\\t\\tthis.__showFooter = false;\\r\\n\\t\\tthis.__footerContent = null;\\r\\n\\t\\tthis.__width = null;\\r\\n\\t\\tthis.__cellWidth = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.__divContainer = null;\\r\\n\\t\\tthis.__divHeaderContainer = null;\\r\\n\\t\\tthis.__cmbMonth = null;\\r\\n\\t\\tthis.__cmbYear = null;\\r\\n\\t\\tthis.__divWeekContainer = null;\\r\\n\\t\\tthis.__divDayContainer = null;\\r\\n\\t\\tthis.__divDayBody = null;\\r\\n\\t\\tthis.__divTimeContainer = null;\\r\\n\\t\\tthis.__divFooterContainer = null;\\r\\n\\t\\tthis.__arrYear = [];\\r\\n\\t\\tthis.__lastSelectedCell = null;\\r\\n\\t\\tthis.__arrDayCells = []; \\r\\n\\t\\tthis.__minWidth = 240;\\r\\n\\t\\tthis.__minCellWidth = 32;\\r\\n\\t\\tthis.__showTime = false;\\r\\n\\t\\tthis.__timeSetting = {minHour: 0, maxHour: 23, minMinute: 0, maxMinute: 59, showSeconds: false, minSecond: 0, maxSecond: 59};\\r\\n\\t\\t\\r\\n\\t\\tthis.__dayClickHandlerRef = null;\\r\\n\\t\\t\\r\\n\\t\\tthis.base.__setBaseComponent.call(this,component);\\r\\n\\t};\\r\\n\\tnsExtendPrototype(NSContainerBase,NSCalendar);\\r\\n\\tNSCalendar.prototype.varructor = NSCalendar;\\r\\n\\t\\r\\n\\tNSCalendar.prototype.initializeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.initializeComponent.call(this);\\r\\n\\t\\tthis.__setSetting();\\r\\n\\t\\tthis.__initDefault();\\r\\n\\t\\tthis.__injectClass();\\r\\n\\t\\tthis.__createComponent();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.setComponentProperties = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.setComponentProperties.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.propertyChange = function(attrName, oldVal, newVal, setProperty)\\r\\n\\t{\\r\\n\\t\\tvar attributeName = attrName.toLowerCase();\\r\\n\\t\\tthis.base.propertyChange.call(this,attrName, oldVal, newVal, setProperty);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.removeComponent = function() \\r\\n\\t{\\r\\n\\t\\tthis.base.removeComponent.call(this);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.componentResized = function(event) \\r\\n\\t{\\r\\n\\t\\tthis.base.componentResized.call(this,event);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.getSelectedDate = function() \\r\\n\\t{\\r\\n\\t\\treturn this.__selectedDate;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.getSelectedDateAsString = function(format) \\r\\n\\t{\\r\\n\\t\\tif(this.__selectedDate)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar nsDateUtil = new NSDateUtil();\\r\\n\\t\\t\\treturn nsDateUtil.format(this.__selectedDate,format);\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.setSelectedDate = function(date,format,fireEvent) \\r\\n\\t{\\r\\n\\t\\tthis.__selectedDate = this.__formatInputDate(date,format);\\r\\n\\t\\tthis.__updateDaysInControl(this.__selectedDate);\\r\\n\\t\\tif(this.util.isUndefinedOrNull(fireEvent) || fireEvent)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSCalendar.DATE_SELECTED,this.__selectedDate,{date:this.__selectedDate});\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.setYear = function(year) \\r\\n\\t{\\r\\n\\t\\tthis.__setYearDropdown(year);\\r\\n\\t\\tthis.__dropDownChangeHandler();\\r\\n\\t\\tthis.__cmbMonth.selectedIndex = monthDate.getMonth();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.setMonth = function(month) \\r\\n\\t{\\r\\n\\t\\tthis.__cmbMonth.selectedIndex = month;\\r\\n\\t\\tthis.__dropDownChangeHandler();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.reset = function() \\r\\n\\t{\\r\\n\\t\\tthis.__selectedDate = null;\\r\\n\\t\\tvar todayDate = new Date();\\r\\n\\t\\tvar date = this.__maxDate < todayDate ? this.__maxDate : todayDate;\\r\\n\\t\\tthis.__updateDaysInControl(date);\\r\\n\\t\\tthis.__resetTimeInControl();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.setTodayDate = function(fireEvent) \\r\\n\\t{\\r\\n\\t\\tthis.__selectedDate = new Date();\\r\\n\\t\\tthis.__updateDaysInControl(this.__selectedDate);\\r\\n\\t\\tif(this.util.isUndefinedOrNull(fireEvent) || fireEvent)\\r\\n\\t\\t{\\r\\n\\t\\t\\t//for some reason __selectedDate time part is getting reset mostly in this.__updateDayCell function that is why resetting the date back\\r\\n\\t\\t\\tif(this.__showTime) {\\r\\n\\t\\t\\t\\tthis.__selectedDate = this.__setTimePartInDate(this.__selectedDate);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSCalendar.DATE_SELECTED,this.__selectedDate,{date:this.__selectedDate});\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__initDefault = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__minDate)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__minDate = new Date();\\r\\n\\t\\t\\tthis.__minDate = this.__getDateObject(this.__minDate.getFullYear() - 15,0,1);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__maxDate)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__maxDate = new Date();\\r\\n\\t\\t\\tthis.__maxDate = this.__getDateObject(this.__maxDate.getFullYear() + 15,0,1);\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__monthValueName || this.__monthValueName.length === 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__monthValueName = [\\\"January\\\",\\\"Febuary\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"];\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__monthTextName || this.__monthTextName.length === 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__monthTextName = [\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"];\\r\\n\\t\\t}\\r\\n\\t\\tif(!this.__weekName || this.__weekName.length === 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__weekName = [\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\",\\\"Sun\\\"];\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__injectClass = function()\\r\\n\\t{\\r\\n\\t\\tif(this.__width && this.__width > this.__minWidth)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addCSSClassInDOM([\\\"#\\\" + this.getID() + \\\".nsCalendar\\\"],[\\\"width:\\\" + this.__width + \\\"px;\\\"]);\\r\\n\\t\\t\\tif(!this.__cellWidth)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__cellWidth = Math.floor(this.__width / 7);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tif(this.__cellWidth && this.__cellWidth > this.__minCellWidth)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addCSSClassInDOM([\\\"#\\\" + this.getID() + \\\".nsCalendar .nsCalendarWeek\\\"],[\\\"width:\\\" + this.__cellWidth + \\\"px;\\\"]);\\r\\n\\t\\t\\tthis.util.addCSSClassInDOM([\\\"#\\\" + this.getID() + \\\".nsCalendar .nsCalendarDayContainerCell\\\"],[\\\"width:\\\" + this.__cellWidth + \\\"px;\\\"]);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__setSetting = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setting = {};\\r\\n\\t\\t}\\r\\n\\t\\tvar setting = this.__setting;\\r\\n\\t\\tif(setting)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"context\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__context = setting[\\\"context\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"inputDateFormat\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__inputDateFormat = setting[\\\"inputDateFormat\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"minDate\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__minDate = this.__formatInputDate(setting[\\\"minDate\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"maxDate\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__maxDate = this.__formatInputDate(setting[\\\"maxDate\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"selectedDate\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__selectedDate = this.__formatInputDate(setting[\\\"selectedDate\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"monthValueName\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__monthValueName = setting[\\\"monthValueName\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"monthTextName\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__monthTextName = setting[\\\"monthTextName\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"weekName\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__weekName = setting[\\\"weekName\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"markDayDisabled\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__markDayDisabled =  setting[\\\"markDayDisabled\\\"];\\r\\n\\t\\t\\t\\tthis.__markDayDisabled = this.util.getFunction(this.__markDayDisabled,this.__context);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"width\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__width = Number(setting[\\\"width\\\"]);\\r\\n\\t\\t\\t\\tif(isNaN(this.__width))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__width = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"cellWidth\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__cellWidth = Number(setting[\\\"cellWidth\\\"]);\\r\\n\\t\\t\\t\\tif(isNaN(this.__cellWidth))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__cellWidth = null;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"showFooter\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__showFooter = Boolean.parse(setting[\\\"showFooter\\\"]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"showTime\\\")) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__showTime = Boolean.parse(setting[\\\"showTime\\\"]); \\r\\n\\t\\t\\t\\t// or simply: this.__showTime = !!setting[\\\"showTime\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"timeSetting\\\") && setting[\\\"timeSetting\\\"]) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__timeSetting = {...this.__timeSetting, ...setting[\\\"timeSetting\\\"]}; \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"footerContent\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__footerContent = setting[\\\"footerContent\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.__showFooter)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__createFooter();\\r\\n\\t\\t\\t\\tthis.__baseComponent.appendChild(this.__divFooterContainer);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"theme\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__theme = setting[\\\"theme\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar buttonSetting = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"buttonSetting\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting = setting[\\\"buttonSetting\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.prev)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.prev = {html:null,cssClass:null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.prev.html)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.prev.html = \\\"<svg height=\\\\\\\"24\\\\\\\" version=\\\\\\\"1.1\\\\\\\" viewbox=\\\\\\\"0 0 24 24\\\\\\\" width=\\\\\\\"24\\\\\\\" xmlns=\\\\\\\"http://www.w3.org/2000/svg\\\\\\\" class=\\\\\\\"nsCalendarIcon nsCalendarHeaderButtonSvg\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"<path d=\\\\\\\"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z\\\\\\\"></path>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  \\\"</svg>\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.next)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.next = {html:null,cssClass:null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.next.html)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.next.html = \\\"<svg height=\\\\\\\"24\\\\\\\" version=\\\\\\\"1.1\\\\\\\" viewbox=\\\\\\\"0 0 24 24\\\\\\\" width=\\\\\\\"24\\\\\\\" xmlns=\\\\\\\"http://www.w3.org/2000/svg\\\\\\\" class=\\\\\\\"nsCalendarIcon nsCalendarHeaderButtonSvg\\\\\\\">\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"<path d=\\\\\\\"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z\\\\\\\"></path>\\\\r\\\\n\\\" + \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t  \\\"</svg>\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.savetime)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.savetime = {html:null,cssClass:null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.savetime.html)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.savetime.html = `<svg \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tviewBox=\\\"0 0 24 24\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tfill=\\\"none\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke=\\\"currentColor\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke-width=\\\"2\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke-linecap=\\\"round\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke-linejoin=\\\"round\\\"\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tclass=\\\"nsCalendarIcon nsCalendarIconTime nsCalendarIconTimeSave\\\"\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<!-- Circle -->\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"10\\\"></circle>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<!-- Checkmark -->\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<path d=\\\"M9 12l2 2 4-4\\\"></path>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</svg>`;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.canceltime)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.canceltime = {html:null,cssClass:null};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!buttonSetting.canceltime.html)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tbuttonSetting.canceltime.html = `<svg \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tviewBox=\\\"0 0 24 24\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tfill=\\\"none\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke=\\\"currentColor\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke-width=\\\"2\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke-linecap=\\\"round\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tstroke-linejoin=\\\"round\\\"\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tclass=\\\"nsCalendarIcon nsCalendarIconTime nsCalendarIconTimeCancel\\\"\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<!-- Circle -->\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"10\\\"></circle>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<!-- Cross (X) -->\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<line x1=\\\"9\\\" y1=\\\"9\\\" x2=\\\"15\\\" y2=\\\"15\\\"></line>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<line x1=\\\"15\\\" y1=\\\"9\\\" x2=\\\"9\\\" y2=\\\"15\\\"></line>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t</svg>`;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__buttonSetting = {prev:{html:buttonSetting.prev.html,cssClass:buttonSetting.prev.cssClass},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t  \\tnext:{html:buttonSetting.next.html,cssClass:buttonSetting.next.cssClass},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tsavetime: {html:buttonSetting.savetime.html,cssClass:buttonSetting.savetime.cssClass},\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tcanceltime: {html:buttonSetting.canceltime.html,cssClass:buttonSetting.canceltime.cssClass}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t    };\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tvar customClass = {};\\r\\n\\t\\t\\tif(setting.hasOwnProperty(\\\"customClass\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcustomClass = setting[\\\"customClass\\\"];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(!customClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcustomClass = {};\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(var prop in this.__customClass)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__customClass[prop] = (customClass[prop] || null);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__createComponent = function()\\r\\n\\t{\\r\\n\\t\\tthis.util.addStyleClass(this.__baseComponent,\\\"nsCalendar\\\");\\r\\n\\t\\tthis.__applyTheme(this.__baseComponent,\\\"nsCalendar\\\");\\r\\n\\t\\tthis.__divContainer = this.util.createDiv(this.getID() + \\\"container\\\",\\\"nsCalendarContainer\\\");\\r\\n\\t\\tthis.__applyCustomClass(this.__divContainer,\\\"container\\\");\\r\\n\\t\\t\\r\\n\\t\\tthis.__createHeader();\\r\\n\\t\\tthis.__divContainer.appendChild(this.__divHeaderContainer);\\r\\n\\t\\tthis.__createWeek();\\r\\n\\t\\tthis.__divContainer.appendChild(this.__divWeekContainer);\\r\\n\\t\\tthis.__createDays();\\r\\n\\t\\tthis.__divContainer.appendChild(this.__divDayContainer);\\r\\n\\t\\tif(this.__showTime) {\\r\\n\\t\\t\\tthis.__createTimePart();\\r\\n\\t\\t\\tthis.__divContainer.appendChild(this.__divTimeContainer);\\r\\n\\t\\t}\\r\\n\\t\\tthis.__baseComponent.appendChild(this.__divContainer);\\r\\n\\t\\tif(this.__showFooter)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__createFooter();\\r\\n\\t\\t\\tthis.__baseComponent.appendChild(this.__divFooterContainer);\\r\\n\\t\\t}\\r\\n\\t\\tvar todayDate = new Date();\\r\\n\\t\\tvar date = this.__maxDate < todayDate ? this.__maxDate : todayDate;\\r\\n\\t\\tthis.__updateDaysInControl(date);\\r\\n\\t};\\t\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__createHeader = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divHeaderContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar self = this;\\r\\n\\t\\t\\tvar initButton = function(strID,cssClass,buttonSettingKey,customClassKey,handler)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar btn = self.util.createElement(\\\"button\\\",self.getID() + \\\"btn\\\" + strID,cssClass);\\r\\n\\t\\t\\t\\tbtn.innerHTML = self.__buttonSetting[buttonSettingKey].html;\\r\\n\\t\\t\\t\\tself.util.addStyleClass(btn,self.__buttonSetting[buttonSettingKey].cssClass);\\r\\n\\t\\t\\t\\tself.__applyCustomClass(btn,customClassKey);\\r\\n\\t\\t\\t\\tself.util.addEvent(btn,\\\"click\\\",handler);\\r\\n\\t\\t\\t\\tself.__divHeaderContainer.appendChild(btn);\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tvar createSelect = function(parent,id,cssClass,customClassKey,arrText,arrValue)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar select = self.util.createElement(\\\"select\\\",self.getID() + \\\"select\\\" + id,cssClass);\\r\\n\\t\\t\\t\\tself.__applyCustomClass(select,customClassKey);\\r\\n\\t\\t\\t\\tself.util.addEvent(select,\\\"change\\\",self.__dropDownChangeHandler.bind(self));\\r\\n\\t\\t\\t\\tself.util.addEvent(select,\\\"click\\\",self.__dropDownClickHandler.bind(self));\\r\\n\\t\\t\\t\\tfor (var count = 0; count < arrValue.length; count++) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t    var option = document.createElement(\\\"option\\\");\\r\\n\\t\\t\\t\\t    option.text = arrText[count];\\r\\n\\t\\t\\t\\t    option.value = arrValue[count];\\r\\n\\t\\t\\t\\t    select.appendChild(option);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tparent.appendChild(select);\\r\\n\\t\\t\\t\\treturn select;\\r\\n\\t\\t\\t};\\r\\n\\t\\t\\tthis.__divHeaderContainer = this.util.createDiv(this.getID() + \\\"header\\\",\\\"nsCalendarHeader\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(this.__divHeaderContainer,\\\"headerContainer\\\");\\r\\n\\t\\t\\tinitButton(\\\"previous\\\",\\\"nsCalendarButton\\\",\\\"prev\\\",\\\"prevButton\\\",this.__prevClickHandler.bind(this));\\r\\n\\t\\t\\tvar divNavigation = this.util.createDiv(this.getID() + \\\"headerNavigation\\\",\\\"nsCalendarHeaderNav\\\");\\r\\n\\t\\t\\tif(this.__monthValueName.length !== this.__monthTextName.length)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__monthValueName = this.__monthTextName;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__cmbMonth = createSelect(divNavigation,\\\"month\\\",\\\"nsCalendarSelect\\\",\\\"monthDropdown\\\",this.__monthTextName,this.__monthValueName);\\r\\n\\t\\t\\tvar minYear = this.__minDate.getFullYear();\\r\\n\\t\\t\\tvar maxYear = this.__maxDate.getFullYear();\\r\\n\\t\\t\\tthis.__arrYear = [];\\r\\n\\t\\t\\tfor(var count = minYear;count <= maxYear;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__arrYear.push(count);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__cmbYear = createSelect(divNavigation,\\\"year\\\",\\\"nsCalendarSelect\\\",\\\"yearDropdown\\\",this.__arrYear,this.__arrYear);\\r\\n\\t\\t\\tthis.__divHeaderContainer.appendChild(divNavigation);\\r\\n\\t\\t\\tinitButton(\\\"next\\\",\\\"nsCalendarButton\\\",\\\"next\\\",\\\"nextButton\\\",this.__nextClickHandler.bind(this));\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__createWeek = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divWeekContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divWeekContainer = this.util.createDiv(this.getID() + \\\"week\\\",\\\"nsCalendarWeekContainer\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(this.__divWeekContainer,\\\"weekContainer\\\");\\r\\n\\t\\t\\tfor(var count = 0;count < this.__weekName.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar divWeek = this.util.createDiv(null,\\\"nsCalendarWeek\\\");\\r\\n\\t\\t\\t\\tthis.__applyCustomClass(divWeek,\\\"week\\\");\\r\\n\\t\\t\\t\\tdivWeek.appendChild(document.createTextNode(this.__weekName[count]));\\r\\n\\t\\t\\t\\tthis.__divWeekContainer.appendChild(divWeek);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__createDays = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divDayContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divDayContainer = this.util.createDiv(this.getID() + \\\"day\\\",\\\"nsCalendarDayContainer\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(this.__divDayContainer,\\\"dayContainer\\\");\\r\\n\\t\\t\\tthis.__divDayBody = this.util.createDiv(this.getID() + \\\"dayBody\\\",\\\"nsCalendarDayContainerBody\\\");\\r\\n\\t\\t\\tvar handler = this.__dayClickHandler.bind(this);\\r\\n\\t\\t\\tfor (var rowCount = 0;rowCount < 6;rowCount++) \\r\\n\\t\\t\\t{ \\r\\n\\t\\t\\t    var row = this.__createDayRow(this.__divDayBody);\\r\\n\\t\\t\\t    for (var count = 0;count < 7;count++) \\r\\n\\t\\t\\t    { \\r\\n\\t\\t\\t    \\tvar cell = this.__createDayCell(row,handler);\\r\\n\\t\\t\\t    \\tvar item = {row:row,cell:cell};\\r\\n\\t\\t\\t    \\tthis.__arrDayCells.push(item);\\r\\n\\t\\t\\t    }\\t\\t\\t    \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.__divDayContainer.appendChild(this.__divDayBody);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__createDayRow = function(parent)\\r\\n\\t{\\r\\n\\t\\tvar divDayRow = this.util.createDiv(null,\\\"nsCalendarDayContainerRow\\\");\\r\\n\\t\\tparent.appendChild(divDayRow);\\r\\n\\t\\treturn divDayRow;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__createDayCell = function(parent,handler)\\r\\n\\t{\\r\\n\\t\\tvar divDay = this.util.createDiv(null,\\\"nsCalendarDayContainerCell\\\");\\r\\n\\t\\tthis.util.addEvent(divDay,\\\"click\\\",handler);\\r\\n\\t\\tparent.appendChild(divDay);\\r\\n\\t\\treturn divDay;\\r\\n\\t};\\r\\n\\r\\n\\tNSCalendar.prototype.__createTimePart = function() {\\r\\n\\t\\tif (this.__showTime) {\\r\\n\\t\\t\\tthis.__divTimeContainer = this.util.createDiv(this.getID() + \\\"Time\\\",\\\"nsCalendarTimeContainer\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(this.__divTimeContainer,\\\"timeContainer\\\");\\r\\n\\r\\n\\t\\t\\tvar timePartContainer = this.util.createDiv(this.getID() + \\\"TimePartCon\\\",\\\"nsCalendarTimePartContainer\\\");\\r\\n\\r\\n\\t\\t\\tvar timeLabelSpan = this.util.createElement(\\\"span\\\", null, \\\"nsCalendarTimeLabel\\\");\\r\\n\\t\\t\\ttimeLabelSpan.appendChild(document.createTextNode(\\\"Time: \\\"));\\r\\n\\t\\t\\ttimePartContainer.appendChild(timeLabelSpan);\\r\\n\\r\\n\\t\\t\\tvar timeSetting = this.__timeSetting;\\r\\n\\r\\n            var hourInput = this.__createTimeInput(\\\"hour\\\", \\\"nsCalendarHourInput\\\", timeSetting.minHour, timeSetting.maxHour);\\r\\n            timePartContainer.appendChild(hourInput);\\r\\n\\r\\n\\t\\t\\ttimePartContainer.appendChild(this.__createTimeSeparator());\\r\\n\\r\\n            var minuteInput = this.__createTimeInput(\\\"minute\\\", \\\"nsCalendarMinuteInput\\\", timeSetting.minMinute, timeSetting.maxMinute);\\r\\n            timePartContainer.appendChild(minuteInput);\\r\\n\\r\\n\\t\\t\\tif(timeSetting.showSeconds) {\\r\\n\\t\\t\\t\\ttimePartContainer.appendChild(this.__createTimeSeparator());\\r\\n\\r\\n\\t\\t\\t\\tvar secondInput = this.__createTimeInput(\\\"second\\\", \\\"nsCalendarSecondInput\\\", timeSetting.minSecond, timeSetting.maxSecond);\\r\\n\\t\\t\\t\\ttimePartContainer.appendChild(secondInput);\\r\\n\\t\\t\\t}\\t\\t\\t\\r\\n\\r\\n\\t\\t\\tthis.__divTimeContainer.appendChild(timePartContainer);\\r\\n\\r\\n\\t\\t\\tvar timeSaveContainer = this.util.createDiv(this.getID() + \\\"TimePartSave\\\",\\\"nsCalendarTimeSaveContainer\\\");\\r\\n\\t\\t\\ttimeSaveContainer.appendChild(this.__createTimeButton(\\\"Save\\\", null, \\\"savetime\\\", \\\"savetimebutton\\\", this.__savetimeClickHandler.bind(this)));\\r\\n\\t\\t\\ttimeSaveContainer.appendChild(this.__createTimeButton(\\\"Cancel\\\", null, \\\"canceltime\\\", \\\"canceltimebutton\\\", this.__canceltimeClickHandler.bind(this)));\\r\\n\\r\\n\\t\\t\\tthis.__divTimeContainer.appendChild(timeSaveContainer);\\r\\n        }\\r\\n\\t}\\r\\n\\r\\n\\tNSCalendar.prototype.__savetimeClickHandler = function(event) {\\r\\n\\t\\tthis.__selectedDate = this.__setTimePartInDate(this.__selectedDate);\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSCalendar.DATE_SELECTED,this.__selectedDate,{date:this.__selectedDate});\\r\\n\\t};\\r\\n\\r\\n\\tNSCalendar.prototype.__canceltimeClickHandler = function(event) {\\r\\n\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSCalendar.DATE_SELECTION_CANCELLED);\\r\\n\\t};\\r\\n\\r\\n\\tNSCalendar.prototype.__createTimeInput = function(timePart,cssClass, minVal, maxVal) {\\r\\n\\t\\tvar timeInput = this.util.createElement(\\\"input\\\",this.getID() + \\\"_input_\\\" + timePart, \\\"nsCalendarTimeInput \\\" + cssClass);\\r\\n\\t\\ttimeInput.type = \\\"number\\\";\\r\\n\\t\\ttimeInput.min = minVal;\\r\\n\\t\\ttimeInput.max = maxVal;\\r\\n\\t\\ttimeInput.value = \\\"0\\\";\\r\\n\\t\\ttimeInput.size = 2;     // Keep it small\\r\\n\\t\\ttimeInput.addEventListener(\\\"change\\\", this.__timeInputChangeHandler.bind(this));\\r\\n\\t\\ttimeInput.addEventListener(\\\"input\\\", this.__timeInputEnterInputHandler.bind(this));\\r\\n\\t\\treturn timeInput;\\r\\n\\t}\\r\\n\\r\\n\\tNSCalendar.prototype.__createTimeButton = function(strID, cssClass, buttonSettingKey, customClassKey, handler) {\\r\\n\\t\\tvar btn = this.util.createElement(\\\"button\\\",this.getID() + \\\"btn\\\" + strID,\\\"nsCalendarIconButton\\\" + (cssClass ? \\\" \\\" + cssClass : \\\"\\\"));\\r\\n\\t\\tbtn.innerHTML = this.__buttonSetting[buttonSettingKey].html;\\r\\n\\t\\tif(this.__timeSetting && this.__timeSetting.showSeconds) {\\r\\n\\t\\t\\tvar child = btn.children[0];\\r\\n\\t\\t\\tif(child) {\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(child,\\\"nsCalendarIconTimeSmall\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tthis.util.addStyleClass(btn,this.__buttonSetting[buttonSettingKey].cssClass);\\r\\n\\t\\tthis.__applyCustomClass(btn,customClassKey);\\r\\n\\t\\tthis.util.addEvent(btn,\\\"click\\\",handler);\\r\\n\\t\\treturn btn;\\r\\n\\t}\\r\\n\\r\\n\\tNSCalendar.prototype.__createTimeSeparator = function() {\\r\\n\\t\\tvar timeSeparatorSpan = this.util.createElement(\\\"span\\\", null, \\\"nsCalendarTimeSeparator\\\");\\r\\n\\t\\ttimeSeparatorSpan.appendChild(document.createTextNode(\\\" : \\\"));\\r\\n\\t\\treturn timeSeparatorSpan;\\r\\n\\t}\\r\\n\\r\\n\\tNSCalendar.prototype.__timeInputEnterInputHandler = function(event) {\\r\\n\\t\\tvar input = event.target;\\r\\n\\t\\tvar min = parseInt(input.min, 10);\\r\\n\\t\\tvar max = parseInt(input.max, 10);\\r\\n\\t\\tvar value = parseInt(input.value, 10);\\r\\n\\t\\tif (isNaN(value)) {\\r\\n\\t\\t\\tvalue = 0;\\r\\n\\t\\t}\\r\\n\\t\\tif (value > max) {\\r\\n\\t\\t\\tvalue = max;\\r\\n\\t\\t} else if (value < min) {\\r\\n\\t\\t\\tvalue = min;\\r\\n\\t\\t}\\r\\n\\t\\tinput.value = this.__padTimeValue(value);\\r\\n\\t}\\r\\n\\r\\n\\tNSCalendar.prototype.__timeInputChangeHandler = function(event) {\\r\\n\\t\\tif (!this.__selectedDate) {\\r\\n\\t\\t\\tthis.__selectedDate = new Date();\\r\\n\\t\\t}\\r\\n\\t\\t//this.__timeInputEnterInputHandler(event);\\r\\n\\t\\tthis.__selectedDate = this.__setTimePartInDate(this.__selectedDate);\\r\\n\\t\\t// Optionally fire an event or update the UI\\r\\n\\t\\t// This is up to you.  E.g., if you want dateSelected to fire whenever time changes:\\r\\n\\t\\t// this.util.dispatchEvent(this.__baseComponent, NSCalendar.DATE_SELECTED, this.__selectedDate, { date: this.__selectedDate });\\r\\n\\t};\\r\\n\\r\\n\\tNSCalendar.prototype.__updateTimeInControl = function(date) {\\r\\n\\t\\tif (!this.__divTimeContainer) return;\\r\\n\\t\\tvar hourInput   = this.__divTimeContainer.querySelector(\\\".nsCalendarHourInput\\\");\\r\\n\\t\\tvar minuteInput = this.__divTimeContainer.querySelector(\\\".nsCalendarMinuteInput\\\");\\r\\n\\t\\tvar secondInput = this.__divTimeContainer.querySelector(\\\".nsCalendarSecondInput\\\");\\r\\n\\r\\n\\t\\tif(hourInput) {\\r\\n\\t\\t\\thourInput.value = this.__padTimeValue(date.getHours());\\r\\n\\t\\t}\\r\\n\\t\\tif(minuteInput) {\\r\\n\\t\\t\\tminuteInput.value = this.__padTimeValue(date.getMinutes());\\r\\n\\t\\t}\\r\\n\\t\\tif(secondInput) {\\r\\n\\t\\t\\tsecondInput.value = this.__padTimeValue(date.getSeconds());\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\r\\n\\tNSCalendar.prototype.__resetTimeInControl  = function() {\\r\\n\\t\\tvar date = new Date();\\r\\n\\t\\tdate.setHours(0, 0, 0, 0);\\r\\n\\t\\tthis.__updateTimeInControl(date);\\r\\n\\t}\\r\\n\\r\\n\\tNSCalendar.prototype.__padTimeValue = function(value) {\\r\\n\\t\\tvar retVal = String(value).padStart(2, '0');\\r\\n\\t\\treturn retVal;\\r\\n\\t}\\r\\n\\r\\n\\tNSCalendar.prototype.__setTimePartInDate  = function(date) {\\r\\n\\t\\tvar timeContainer = this.__divTimeContainer;\\r\\n\\t\\tif (!timeContainer || !date) {\\r\\n\\t\\t\\treturn date;\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\tvar hourInput   = timeContainer.querySelector(\\\".nsCalendarHourInput\\\");\\r\\n\\t\\tvar minuteInput = timeContainer.querySelector(\\\".nsCalendarMinuteInput\\\");\\r\\n\\t\\tvar secondInput = timeContainer.querySelector(\\\".nsCalendarSecondInput\\\");\\r\\n\\t\\r\\n\\t\\tvar newHour   = parseInt(hourInput.value, 10)   || 0;\\r\\n\\t\\tvar newMinute = minuteInput ? (parseInt(minuteInput.value, 10) || 0) : 0;\\r\\n\\t\\tvar newSecond = secondInput ? (parseInt(secondInput.value, 10) || 0) : 0;\\r\\n\\t\\tnewHour   = Math.max(0, Math.min(this.__timeSetting.maxHour, newHour));\\r\\n\\t\\tnewMinute = Math.max(0, Math.min(this.__timeSetting.maxMinute, newMinute));\\r\\n\\t\\tnewSecond = Math.max(0, Math.min(this.__timeSetting.maxSecond, newSecond));\\r\\n\\t\\r\\n\\t\\tdate.setHours(newHour, newMinute, newSecond, 0);\\r\\n\\t\\treturn date;\\r\\n\\t}\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__createFooter = function()\\r\\n\\t{\\r\\n\\t\\tif(!this.__divFooterContainer)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__divFooterContainer = this.util.createDiv(this.getID() + \\\"footer\\\",\\\"nsCalendarFooterContainer\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(this.__divFooterContainer,\\\"footerContainer\\\");\\r\\n\\t\\t\\tif(this.__footerContent)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.util.isString(this.__footerContent))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tvar compSpan = document.createElement(\\\"span\\\");\\r\\n\\t\\t\\t\\t\\tcompSpan.innerHTML = this.__footerContent;\\r\\n\\t\\t\\t\\t\\tthis.__divFooterContainer.appendChild(compSpan);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__divFooterContainer.appendChild(this.__footerContent);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__updateDaysInControl = function(monthDate)\\r\\n\\t{\\r\\n\\t\\tif(this.__isDateValidForNavigation(monthDate))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__setYearDropdown(monthDate.getFullYear());\\r\\n\\t\\t\\tthis.__cmbMonth.selectedIndex = monthDate.getMonth();\\r\\n\\t\\t\\tvar today = new Date();\\r\\n\\t\\t\\tvar date = new Date(monthDate.getFullYear(),monthDate.getMonth(),1,0,0,0,0); // Starting at the 1st of the month\\r\\n\\t\\t\\tvar extras = (date.getDay() + 6) % 7; // How many days of the last month do we need to include?\\r\\n\\t\\t\\tdate.setDate(date.getDate() - extras);\\r\\n\\t\\t\\tvar item = null;\\r\\n\\t\\t\\tfor(var count = 0;count < this.__arrDayCells.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = this.__arrDayCells[count];\\r\\n\\t\\t\\t\\tthis.__updateDayCell(item.cell,date,monthDate,today,count);\\r\\n\\t\\t\\t\\titem.date = new Date(date.getTime());\\r\\n\\t\\t\\t\\titem.index = count;\\r\\n\\t\\t\\t    date.setDate(date.getDate() + 1); \\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif (this.__showTime) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__updateTimeInControl(monthDate);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__resetDayCell = function(cell)\\r\\n\\t{\\r\\n\\t\\tif(cell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tcell.setAttribute(\\\"class\\\",\\\"\\\");\\r\\n\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsCalendarDayContainerCell\\\");\\r\\n\\t\\t\\tthis.__applyCustomClass(cell,\\\"day\\\");\\r\\n\\t\\t\\tcell.innerHTML = \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__updateDayCell = function(cell,dateToSet,currentMonthDate,todayDate,index)\\r\\n\\t{\\r\\n\\t\\tif(cell)\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__resetDayCell(cell);\\r\\n\\t\\t\\tcell.appendChild(document.createTextNode(dateToSet.getDate()));\\r\\n\\t\\t\\tcell.setAttribute(\\\"data-ns-cal-index\\\",index);\\r\\n\\t\\t\\tif(this.__isDateSelectable(dateToSet))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif (dateToSet.getMonth() != currentMonthDate.getMonth()) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tthis.util.addStyleClass(cell,\\\"nsCalendarOtherMonth\\\");\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\tif (this.__dateCompare(dateToSet,todayDate) === 0) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t    \\tthis.util.addStyleClass(cell,\\\"nsCalendarToday\\\");\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t\\tif (this.__dateCompare(dateToSet,this.__selectedDate) === 0) \\r\\n\\t\\t\\t    {\\r\\n\\t\\t\\t\\t\\t//dont fire event as it is just to update the cell\\r\\n\\t\\t\\t\\t\\tthis.__setCellSelection(dateToSet,cell,false);\\r\\n\\t\\t\\t    }\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsCalendarDayDisabled\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__prevClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tvar month = this.__cmbMonth.selectedIndex; \\r\\n\\t\\tvar year = this.__cmbYear.options[this.__cmbYear.selectedIndex].value;\\r\\n\\t\\tvar date = this.__getDateObject(year,month,1);\\r\\n\\t\\tdate.setMonth(date.getMonth() - 1);\\r\\n\\t\\tthis.__updateDaysInControl(date);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__nextClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t\\tvar month = this.__cmbMonth.selectedIndex; \\r\\n\\t\\tvar year = this.__cmbYear.options[this.__cmbYear.selectedIndex].value;\\r\\n\\t\\tvar date = this.__getDateObject(year,month,1);\\r\\n\\t\\tdate.setMonth(date.getMonth() + 1);\\r\\n\\t\\tthis.__updateDaysInControl(date);\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__dayClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tvar target = this.util.getTarget(event);\\r\\n\\t\\tif(!this.util.hasStyleClass(target,\\\"nsCalendarDayContainerCell\\\"))\\r\\n\\t\\t{\\r\\n\\t\\t\\ttarget = this.util.findParentBySelector(target,\\\".nsCalendarDayContainerCell\\\");\\r\\n\\t\\t}\\r\\n\\t\\tif(target)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(this.__lastSelectedCell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.removeStyleClass(this.__lastSelectedCell,\\\"nsCalendarSelected\\\");\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tvar index = parseInt(target.getAttribute(\\\"data-ns-cal-index\\\"));\\r\\n\\t\\t\\tif(this.util.hasStyleClass(target,\\\"nsCalendarOtherMonth\\\"))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__lastSelectedCell = null;\\r\\n\\t\\t\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\t\\t\\tif(item && this.__isDateSelectable(item.date))\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.__selectedDate = item.date;\\r\\n\\t\\t\\t\\t\\tthis.__setTimePartInDate(this.__selectedDate);\\r\\n\\t\\t\\t\\t\\tthis.__updateDaysInControl(this.__selectedDate);\\r\\n\\t\\t\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSCalendar.DATE_SELECTED,this.__selectedDate,{date:this.__selectedDate});\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.__selectCellForIndex(index);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__dropDownChangeHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tvar month = this.__cmbMonth.selectedIndex; \\r\\n\\t\\tvar year = this.__cmbYear.options[this.__cmbYear.selectedIndex].value;\\r\\n\\t\\tvar date = this.__getDateObject(year,month,1);\\r\\n\\t\\tthis.__updateDaysInControl(date);\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__dropDownClickHandler = function(event)\\r\\n\\t{\\r\\n\\t\\tevent = this.util.getEvent(event);\\r\\n\\t\\tevent.stopPropagation();\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__selectCellForIndex = function(index)\\r\\n\\t{\\r\\n\\t\\tthis.__selectedDate = null;\\r\\n\\t\\tvar item = this.__getItemByIndex(index);\\r\\n\\t\\tif(item)\\r\\n\\t\\t{\\r\\n\\t\\t\\titem.date = this.__setTimePartInDate(item.date);\\r\\n\\t\\t\\tthis.__setCellSelection(item.date,item.cell,true);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__setCellSelection = function(date,cell,fireEvent)\\r\\n\\t{\\r\\n\\t\\tif(this.__isDateSelectable(date))\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.__selectedDate = this.__cloneDateObject(date);\\r\\n\\t\\t\\tif(fireEvent && !this.__showTime)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.dispatchEvent(this.__baseComponent,NSCalendar.DATE_SELECTED,this.__selectedDate,{date:this.__selectedDate});\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(cell)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tthis.util.addStyleClass(cell,\\\"nsCalendarSelected\\\");\\r\\n\\t\\t\\t\\tthis.__lastSelectedCell = cell;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__clearCellSelectionExceptSelected = function() \\r\\n\\t{\\r\\n\\t\\tif(this.__arrDayCells && this.__arrDayCells.length > 0)\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor(var count = 0;count < this.__arrDayCells.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar item = this.__arrDayCells[count];\\r\\n\\t\\t\\t\\tif(this.__lastSelectedCell != item.cell)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\tthis.util.removeStyleClass(item.cell,\\\"nsCalendarSelected\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__getItemByIndex = function(index)\\r\\n\\t{\\r\\n\\t\\tif(index > -1)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar item = {};\\r\\n\\t\\t\\tfor(var count = 0;count < this.__arrDayCells.length;count++)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\titem = this.__arrDayCells[count];\\r\\n\\t\\t\\t\\tif(item.index === index)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn item;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__dateCompare = function(date1,date2)\\r\\n\\t{\\r\\n\\t\\tif(!date1 && !date2)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn 0;\\r\\n\\t\\t}\\r\\n\\t\\tif(!date1)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn -1;\\r\\n\\t\\t}\\r\\n\\t\\tif(!date2)\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn 1;\\r\\n\\t\\t}\\r\\n\\t\\tif (date1.getDate() == date2.getDate() && date1.getMonth() == date2.getMonth() && date1.getFullYear() == date2.getFullYear())\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn 0;\\r\\n\\t\\t}\\r\\n\\t\\tvar tempDate1 = this.__dateWithoutTime(this.__cloneDateObject(date1));\\r\\n\\t\\tvar tempDate2 = this.__dateWithoutTime(this.__cloneDateObject(date2));\\r\\n\\t\\treturn (tempDate1.getTime() > tempDate2.getTime());\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__cloneDateObject = function(date)\\r\\n\\t{\\r\\n\\t\\treturn this.__getDateObject(date.getFullYear(),date.getMonth(),date.getDate());\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__getDateObject = function(year,month,day)\\r\\n\\t{\\r\\n\\t\\tvar date = new Date(year,month,day);\\r\\n\\t\\treturn date;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__isDateSelectable = function(date)\\r\\n\\t{\\r\\n\\t\\tif(date)\\r\\n\\t\\t{\\r\\n\\t\\t\\tvar tempDate = this.__dateWithoutTime(date);\\r\\n\\t\\t\\tvar tempMinDate = this.__dateWithoutTime(this.__minDate);\\r\\n\\t\\t\\tvar tempMaxDate = this.__dateWithoutTime(this.__maxDate);\\r\\n\\t\\t\\tvar isMinCond = tempDate >= tempMinDate;\\r\\n\\t\\t\\tvar isMaxCond = tempDate <= tempMaxDate;\\r\\n\\t\\t\\tif(isMinCond && isMaxCond)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif(this.__markDayDisabled)\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn this.__markDayDisabled(date);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\telse\\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__dateWithoutTime = function(date)\\r\\n\\t{\\r\\n\\t\\tvar tempDate = new Date(date);\\r\\n\\t\\ttempDate.setHours(0, 0, 0, 0);\\r\\n\\t    return tempDate;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__isDateValidForNavigation = function(date)\\r\\n\\t{\\r\\n\\t\\tif(date && date.getFullYear() >= this.__minDate.getFullYear() && date.getFullYear() <= this.__maxDate.getFullYear())\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t\\treturn false;\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__applyCustomClass = function(element,type)\\r\\n\\t{\\r\\n\\t\\tif(element && type && this.__customClass[type])\\r\\n\\t\\t{\\r\\n\\t\\t\\tthis.util.addStyleClass(element,this.__customClass[type]);\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.prototype.__formatInputDate = function(inputValue,format)\\r\\n\\t{\\r\\n\\t\\tformat = format ? format : this.__inputDateFormat;\\r\\n\\t\\tif(inputValue)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif(Object.prototype.toString.call(inputValue) === '[object Date]')\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\treturn inputValue;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tvar nsDateUtil = new NSDateUtil();\\r\\n\\t\\t\\t\\treturn nsDateUtil.parseString(inputValue,format);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn null;\\r\\n\\t};\\r\\n\\t\\r\\n\\t//IE issue \\r\\n\\tNSCalendar.prototype.__setYearDropdown = function(year)\\r\\n\\t{\\r\\n\\t\\t//this.__cmbYear.selectedIndex = this.__cmbYear.querySelector('option[value=\\\"'+ monthDate.getFullYear() +'\\\"]').index;\\r\\n\\t\\tthis.__cmbYear.querySelector('option[value=\\\"'+ year +'\\\"]').selected = \\\"selected\\\";\\r\\n\\t};\\r\\n\\t\\r\\n\\tNSCalendar.DATE_SELECTED = \\\"dateSelected\\\";\\r\\n\\tNSCalendar.DATE_SELECTION_CANCELLED = \\\"dateSelectionCancelled\\\";\\r\\n\\t\\r\\n\\treturn NSCalendar;\\r\\n})();\\r\\nnsModuleExport(this,\\\"NSCalendar\\\",NSCalendar);\";","import { Injectable } from '@angular/core';\r\n\r\nimport { NSUtilCode } from '../embedded/nsUtil';\r\nimport { NSContainerBaseCode } from '../embedded/nsContainerBase';\r\nimport { NSDateUtilCode } from '../embedded/nsDateUtil';\r\nimport { NSExportCode } from '../embedded/nsExport';\r\nimport { NSPromiseCode } from '../embedded/nsPromise';\r\nimport { NSAjaxCode } from '../embedded/nsAjax';\r\nimport { NSTextBoxCode } from '../embedded/nsTextBox';\r\nimport { NSMessageBoxCode } from '../embedded/nsMessageBox';\r\nimport { NSPanelCode } from '../embedded/nsPanel';\r\nimport { NSDividerBoxCode } from '../embedded/nsDividerBox';\r\nimport { NSExpressionEvaluatorCode } from '../embedded/nsExpressionEvaluator';\r\nimport { NSMultiSelectDropdownCode } from '../embedded/nsMultiSelectDropdown';\r\nimport { NSScrollerCode } from '../embedded/nsScroller';\r\nimport { NSDashboardCode } from '../embedded/nsDashboard';\r\nimport { NSHorizontalNavigationCode } from '../embedded/nsHorizontalNavigation';\r\nimport { NSNumericTextBoxCode } from '../embedded/nsNumericTextBox';\r\nimport { NSPaginationCode } from '../embedded/nsPagination';\r\nimport { NSProgressBarCode } from '../embedded/nsProgressBar';\r\nimport { NSTabNavigatorCode } from '../embedded/nsTabNavigator';\r\nimport { NSTableRowMoverCode } from '../embedded/nsTableRowMover';\r\nimport { NSVirtualScrollCode } from '../embedded/nsVirtualScroll';\r\nimport { NSEventCode } from '../embedded/nsEvent';\r\nimport { NSSVGCode } from '../embedded/nsSVG';\r\nimport { NSConsoleCode } from '../embedded/nsConsole';\r\nimport { NSTouchToMouseCode } from '../embedded/nsTouchToMouse';\r\nimport { NSDatePickerCode } from '../embedded/nsDatePicker';\r\nimport { NSDocxExportCode } from '../embedded/nsDocxExport';\r\nimport { NSEditorCode } from '../embedded/nsEditor';\r\nimport { NSGridCode } from '../embedded/nsGrid';\r\nimport { NSListCode } from '../embedded/nsList';\r\nimport { NSNavigationCode } from '../embedded/nsNavigation';\r\nimport { NSPlugginsCode } from '../embedded/nsPluggins';\r\nimport { NSXlsxExportCode } from '../embedded/nsXlsxExport';\r\nimport { NSCalendarCode } from '../embedded/nsCalendar';\r\n\r\n/*Whenever embed-js-files.js runs these ts files are generated \r\n * so if you add a new then run the command npm run build:library-win \r\n * and the ts file will be generated and compile time error will go away\r\n*/\r\n@Injectable({\r\n  providedIn: 'root'\r\n})\r\nexport class ScriptLoaderService {\r\n  private scriptsLoaded: { [url: string]: boolean } = {};\r\n  private embeddedScripts: Record<string, string> = {};\r\n\r\n  constructor() {\r\n    this.embeddedScripts = {\r\n      NSUtil: NSUtilCode,\r\n      NSContainerBase: NSContainerBaseCode,\r\n      NSDateUtil: NSDateUtilCode,\r\n      NSExport: NSExportCode,\r\n      NSPromise: NSPromiseCode,\r\n      NSAjax: NSAjaxCode,\r\n      NSTextBox: NSTextBoxCode,\r\n      NSMessageBox: NSMessageBoxCode,\r\n      NSPanel: NSPanelCode,\r\n      NSDividerBox: NSDividerBoxCode,\r\n      NSExpressionEvaluator: NSExpressionEvaluatorCode,\r\n      NSMultiSelectDropdown: NSMultiSelectDropdownCode,\r\n      NSScroller: NSScrollerCode,\r\n      NSDashboard: NSDashboardCode,\r\n      NSHorizontalNavigation: NSHorizontalNavigationCode,\r\n      NSNumericTextBox: NSNumericTextBoxCode,\r\n      NSPagination: NSPaginationCode,\r\n      NSProgressBar: NSProgressBarCode,\r\n      NSTabNavigator: NSTabNavigatorCode,\r\n      NSTableRowMover: NSTableRowMoverCode,\r\n      NSVirtualScroll: NSVirtualScrollCode,\r\n      NSEvent: NSEventCode,\r\n      NSSVG: NSSVGCode,\r\n      NSConsole: NSConsoleCode,\r\n      NSTouchToMouse: NSTouchToMouseCode,\r\n      NSCalendar: NSCalendarCode,\r\n      NSDatePicker: NSDatePickerCode,\r\n      NSList: NSListCode,\r\n      NSNavigation: NSNavigationCode,\r\n      NSXlsxExport: NSXlsxExportCode,\r\n      NSDocxExport: NSDocxExportCode,\r\n      NSPluggins: NSPlugginsCode,\r\n      NSGrid: NSGridCode,\r\n      NSEditor: NSEditorCode\r\n    };\r\n\r\n    this.embedScripts(['NSUtil','NSContainerBase','NSDateUtil','NSExport','NSSVG']);\r\n  }\r\n\r\n  embedAllScripts() {\r\n    for (const [name, code] of Object.entries(this.embeddedScripts)) {\r\n      this.loadEmbeddedScript(name, code);\r\n    }\r\n  }\r\n\r\n  embedScripts(names: string[]) {\r\n    if (names?.length) {\r\n      for (const name of names) {\r\n        this.embedScript(name);\r\n      }\r\n    }\r\n  }\r\n\r\n  embedScript(name: string) {\r\n    if (name in this.embeddedScripts) {\r\n      this.loadEmbeddedScript(name, this.embeddedScripts[name])\r\n    }\r\n    else {\r\n      console.warn(`${name} is not a valid script.`);\r\n    }\r\n  }\r\n\r\n  loadScript(url: string): Promise<void> {\r\n    return new Promise((resolve, reject) => {\r\n      if (this.scriptsLoaded[url]) {\r\n        resolve();\r\n        return;\r\n      }\r\n\r\n      const script = document.createElement('script');\r\n      script.src = url;\r\n      script.onload = () => {\r\n        this.scriptsLoaded[url] = true;\r\n        resolve();\r\n      };\r\n      script.onerror = () => reject(new Error(`Script load error: ${url}`));\r\n      document.head.appendChild(script);\r\n    });\r\n  }\r\n\r\n  private loadEmbeddedScript(name: string, code: string): void {\r\n    if (this.scriptsLoaded[name]) {\r\n      return;\r\n    }\r\n    console.log(\"Loading... \" + name);\r\n    const script = document.createElement('script');\r\n    const sourceURL = \"\\n\\n//# sourceURL=\" + name + \".js\";\r\n    script.textContent = code + sourceURL;\r\n    script.id = \"script-\" + name;\r\n    document.head.appendChild(script);\r\n    this.scriptsLoaded[name] = true;\r\n  }\r\n}\r\n","import { Component, ElementRef, inject, OnDestroy } from '@angular/core';\r\nimport { ScriptLoaderService } from '../../script-loader.service';\r\n\r\ndeclare var NSUtil: any;\r\n\r\nexport interface NSComponent {\r\n    removeComponent(): void;\r\n};\r\n\r\n@Component({\r\n    selector: 'ns-base',\r\n    template: '',\r\n    standalone: false\r\n})\r\nexport abstract class NSBaseComponent<T extends NSComponent> implements OnDestroy {\r\n    protected scriptLoader: ScriptLoaderService = inject(ScriptLoaderService);\r\n    private elementRef: ElementRef = inject(ElementRef);\r\n    protected element!: HTMLElement;\r\n    protected nsUtil: typeof NSUtil;\r\n    protected arrEvents: string[] = [];\r\n    protected objNSComp: T | null = null;\r\n    protected hasInitialized: boolean = false;\r\n    protected hasDestroyed: boolean = false;\r\n\r\n    constructor() {\r\n        this.element = this.elementRef.nativeElement;\r\n        this.nsUtil = new NSUtil();\r\n    }\r\n\r\n    getElement(): HTMLElement {\r\n        return this.element;\r\n    };\r\n\r\n    protected initializeScripts(compName: string[]): void {\r\n        this.scriptLoader.embedScripts(compName);\r\n    }\r\n    \r\n    protected initializeEvents(arrEvents: string[]): void {\r\n        this.arrEvents = arrEvents;\r\n        this.addEvents();\r\n    }\r\n\r\n    protected addEvents() {\r\n        for (const eventName of this.arrEvents) {\r\n            this.nsUtil.addEvent(this.element, eventName, ((eventNameParam: string) => {\r\n                return (event: any) => {\r\n                    event.stopPropagation();\r\n                    event.stopImmediatePropagation();\r\n                    this.eventListener(event,eventNameParam);\r\n                }\r\n            })(eventName));\r\n        }\r\n    }\r\n\r\n    protected eventListener(event: any,eventName: string)\r\n    {\r\n        //@ts-ignore\r\n        this[event.type].emit(event.detail, event);\r\n    }\r\n\r\n    ngOnDestroy(): void \r\n    {\r\n        if(this.hasInitialized)\r\n        {\r\n            this.hasDestroyed = true;\r\n            if(this.objNSComp && this.objNSComp.removeComponent)\r\n            {\r\n                this.objNSComp.removeComponent();\r\n                this.objNSComp = null;\r\n            }\r\n        }\r\n        this.destroy();\r\n    };\r\n\r\n    destroy(): void {\r\n    }\r\n}\r\n","import { NG_VALUE_ACCESSOR } from \"@angular/forms\";\r\nimport { NSBaseComponent } from \"../ns-base\";\r\nimport { INSTextBoxSetting } from \"./interfaces\";\r\n\r\nimport { AfterViewInit, Component, ElementRef, EventEmitter, forwardRef, Input, OnChanges, OnInit, Output, SimpleChange, ViewEncapsulation } from \"@angular/core\";\r\n\r\ndeclare var NSTextBox: any;\r\n\r\nexport interface INSTextBoxAngularSetting extends INSTextBoxSetting {\r\n    setting?: INSTextBoxSetting;\r\n    containerStyle?: any;\r\n    [propName: string]: any;\r\n}\r\n\r\n@Component({\r\n    selector: 'ns-text-box-angular',\r\n    template: '',\r\n    standalone: false,\r\n    styles: [`\r\n        @import \"../../../generated/css/nsTextBox.min.css\";\r\n        @import \"../../../generated/css/nsGrid.min.css\";\r\n        @import \"../../../generated/css/nsList.min.css\";\r\n    `],\r\n    encapsulation: ViewEncapsulation.None,\r\n    providers: [\r\n        {\r\n          provide: NG_VALUE_ACCESSOR,\r\n          useExisting: forwardRef(() => NSTextBoxAngular),\r\n          multi: true\r\n        },\r\n    ],\r\n})\r\n\r\nexport class NSTextBoxAngular extends NSBaseComponent<typeof NSTextBox> implements OnChanges, OnInit, AfterViewInit {\r\n    @Input() setting: INSTextBoxAngularSetting | null | undefined;\r\n    @Input() set dataSource(arrSource: any[]) {\r\n        this.__dataSource = arrSource;\r\n        if (this.objNSComp) {\r\n            this.objNSComp.dataSource(arrSource);\r\n        }\r\n    }\r\n    get dataSource(): any[] {\r\n        return this.__dataSource;\r\n    }\r\n\r\n    @Output() itemSelected: EventEmitter<any> = new EventEmitter();\r\n    @Output() itemUnselected: EventEmitter<any> = new EventEmitter();\r\n\r\n    public static checkComponentLoaded(): void {\r\n        if (!NSTextBox) {\r\n            throw new Error('NSTextBox is not loaded yet.');\r\n        }\r\n    }\r\n\r\n    public static get TYPE_AUTOTEXT(): any {\r\n        this.checkComponentLoaded();\r\n        return NSTextBox?.TYPE_AUTOTEXT;\r\n    }\r\n\r\n    public static get TYPE_AUTOCOMPLETE(): any {\r\n        this.checkComponentLoaded();\r\n        return NSTextBox?.TYPE_AUTOCOMPLETE;\r\n    }\r\n\r\n    public static get TYPE_EMAIL(): any {\r\n        this.checkComponentLoaded();\r\n        return NSTextBox?.TYPE_EMAIL;\r\n    }\r\n\r\n    public static get TYPE_NUMBER(): any {\r\n        this.checkComponentLoaded();\r\n        return NSTextBox?.TYPE_NUMBER;\r\n    }\r\n\r\n    public static get TYPE_PASSWORD(): any {\r\n        this.checkComponentLoaded();\r\n        return NSTextBox?.TYPE_PASSWORD;\r\n    }\r\n\r\n    public static get TYPE_URL(): any {\r\n        this.checkComponentLoaded();\r\n        return NSTextBox?.TYPE_URL;\r\n    }\r\n\r\n    public static get DROPDOWN_TYPE_LIST(): any {\r\n        this.checkComponentLoaded();\r\n        return NSTextBox?.DROPDOWN_TYPE_LIST;\r\n    }\r\n\r\n    public static get DROPDOWN_TYPE_GRID(): any {\r\n        this.checkComponentLoaded();\r\n        return NSTextBox?.DROPDOWN_TYPE_GRID;\r\n    }\r\n\r\n    /*public static readonly TYPE_AUTOTEXT = NSTextBox.TYPE_AUTOTEXT;\r\n    public static readonly TYPE_AUTOCOMPLETE = NSTextBox.TYPE_AUTOCOMPLETE;\r\n    public static readonly TYPE_EMAIL = NSTextBox.TYPE_EMAIL;\r\n    public static readonly TYPE_NUMBER = NSTextBox.TYPE_NUMBER;\r\n    public static readonly TYPE_PASSWORD = NSTextBox.TYPE_PASSWORD;\r\n    public static readonly TYPE_URL = NSTextBox.TYPE_URL;\r\n    public static readonly DROPDOWN_TYPE_LIST = NSTextBox.DROPDOWN_TYPE_LIST;\r\n    public static readonly DROPDOWN_TYPE_GRID = NSTextBox.DROPDOWN_TYPE_GRID;*/\r\n    public static readonly FILTER_TYPE_EXACT = \"exact\";\r\n    public static readonly FILTER_TYPE_STARTS_WITH = \"startsWith\";\r\n    public static readonly FILTER_TYPE_ENDS_WITH = \"endsWith\";\r\n    public static readonly FILTER_TYPE_CONTAINS = \"contains\";\r\n\r\n    private __dataSource!: any[];\r\n\r\n    constructor() {\r\n        super();\r\n        this.initializeScripts(['NSGrid', 'NSTextBox']);\r\n    };\r\n\r\n    ngOnInit(): void {\r\n        this.initializeEvents([NSTextBox.ITEM_SELECTED,\r\n        NSTextBox.ITEM_UNSELECTED]);\r\n        /*let util = new NSUtil();\r\n        let eventHandler:any = this.__eventHandler.bind(this);\r\n        util.addEvent(this.__element,NSTextBox.ITEM_SELECTED,eventHandler);\r\n        util.addEvent(this.__element,NSTextBox.ITEM_UNSELECTED,eventHandler);*/\r\n       \r\n    };\r\n\r\n    ngOnChanges(changes: { [propName: string]: SimpleChange }): void {\r\n        if (!this.objNSComp && this.setting) {\r\n            if (this.__dataSource) {\r\n                this.setting[\"dataSource\"] = this.__dataSource;\r\n            }\r\n            this.create();\r\n        }\r\n    };\r\n\r\n    ngAfterViewInit(): void {\r\n    };\r\n\r\n    create(): void {\r\n        if(this.setting) {\r\n            this.objNSComp = new NSTextBox(this.element, this.setting);\r\n            this.hasInitialized = true;\r\n        }\r\n    };\r\n\r\n    getTextBox(): any {\r\n        return this.objNSComp.getTextBox();\r\n    };\r\n\r\n    setText(text: string): void {\r\n        this.objNSComp.setText(text);\r\n    };\r\n\r\n    getText(): string {\r\n        return this.objNSComp.getText();\r\n    };\r\n\r\n    setSelectedItems(arrItems: any[]): void\r\n    {\r\n        this.objNSComp.setSelectedItems(arrItems);\r\n    };\r\n    \r\n    setSelectedItem(item: any): void\r\n    {\r\n        this.objNSComp.setSelectedItem(item);\r\n    };\r\n    \r\n    setSelectedIndexes(arrSelectedIndex: number[]): void\r\n    {\r\n        this.objNSComp.setSelectedIndexes(arrSelectedIndex);\r\n    };\r\n    \r\n    setSelectedIndex(selectedIndex: number): void\r\n    {\r\n        this.objNSComp.setSelectedIndexes(selectedIndex);\r\n    };\r\n    \r\n    unSelectItems(arrItems: any[]): void\r\n    {\r\n        this.objNSComp.unSelectItems(arrItems);\r\n    };\r\n    \r\n    unSelectItem(item: any): void\r\n    {\r\n        this.objNSComp.unSelectItem(item);\r\n    };\r\n    \r\n    unSelectIndexes(arrSelectedIndex: number[]): void\r\n    {\r\n        this.objNSComp.unSelectIndexes(arrSelectedIndex);\r\n    };\r\n    \r\n    unSelectIndex(selectedIndex: number): void\r\n    {\r\n        this.objNSComp.unSelectIndex(selectedIndex);\r\n    };\r\n    \r\n    unSelectAll(fireEvent?: boolean): void\r\n    {\r\n        this.objNSComp.unSelectAll(fireEvent);\r\n    };\r\n\r\n    getSelectedItem(): any {\r\n        return this.objNSComp.getSelectedItem();\r\n    };\r\n\r\n    getSelectedItems(): any[] {\r\n        return this.objNSComp.getSelectedItems();\r\n    };\r\n}","import { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChange, ViewEncapsulation } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { INSNavigationMenu, INSNavigationSetting } from \"./interfaces\";\r\nimport { ScriptLoaderService } from \"../../script-loader.service\";\r\nimport { NSBaseComponent } from \"../ns-base\";\r\n\r\ndeclare var NSNavigation: any;\r\n\r\nexport interface INSNavigationAngularSettings extends INSNavigationSetting {\r\n    setting?: INSNavigationSetting;\r\n    containerStyle?: any;\r\n    [propName: string]: any;\r\n}\r\n\r\n@Component({\r\n    selector: 'ns-navigation-angular',\r\n    template: '',\r\n    standalone: false,\r\n    styles: [`\r\n        @import \"../../../generated/css/nsNavigation.min.css\";\r\n    `],\r\n    encapsulation: ViewEncapsulation.None\r\n})\r\nexport class NSNavigationAngular extends NSBaseComponent<typeof NSNavigation> implements OnChanges, OnInit, AfterViewInit {\r\n    @Input() set setting(value: INSNavigationAngularSettings) {\r\n        this.__setting = value;\r\n        if (!this.objNSComp && this.__setting) {\r\n            if (this.__dataSource) {\r\n                this.__manageDataSource();\r\n                this.__setting!.dataSource = this.dataSource || [];\r\n            }\r\n            this.objNSComp = new NSNavigation(this.element, this.__setting);\r\n            this.hasInitialized = true;\r\n        }\r\n    }\r\n    get setting(): INSNavigationAngularSettings | null | undefined {\r\n        return this.__setting;\r\n    }\r\n    @Input() set dataSource(arrSource: INSNavigationMenu[]) {\r\n        this.__dataSource = arrSource;\r\n        if (this.objNSComp) {\r\n            this.__manageDataSource();\r\n            this.objNSComp.dataSource(arrSource);\r\n        }\r\n    }\r\n    get dataSource(): INSNavigationMenu[] | null | undefined {\r\n        return this.__dataSource;\r\n    }\r\n\r\n\r\n    @Output() navigationOpenStart: EventEmitter<any> = new EventEmitter();\r\n    @Output() navigationOpenEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() navigationCloseStart: EventEmitter<any> = new EventEmitter();\r\n    @Output() navigationCloseEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() navigationMenuSelected: EventEmitter<any> = new EventEmitter();\r\n    @Output() navigationMenuDeselected: EventEmitter<any> = new EventEmitter();\r\n\r\n    private __dataSource: INSNavigationMenu[] | null | undefined;\r\n    private __setting: INSNavigationAngularSettings | null | undefined;\r\n\r\n    constructor(private router: Router) {\r\n        super();\r\n        this.initializeScripts(['NSNavigation']);\r\n    };\r\n\r\n    ngOnChanges(changes: { [propName: string]: SimpleChange }): void {\r\n        /*if(!this.objNSComp && this.__setting)\r\n        {\r\n            this.__manageDataSource();\r\n            if(this.__dataSource)\r\n            {\r\n                this.setting[\"dataSource\"] = this.dataSource;\r\n            }\r\n            this.objNSComp = new NSNavigation(this.__element,this.setting);\r\n        }*/\r\n    };\r\n\r\n    ngOnInit(): void {\r\n        this.initializeEvents([NSNavigation.NAVIGATION_OPEN_START,\r\n            NSNavigation.NAVIGATION_OPEN_END,\r\n            NSNavigation.NAVIGATION_CLOSE_START,\r\n            NSNavigation.NAVIGATION_CLOSE_END,\r\n            NSNavigation.NAVIGATION_MENU_SELECTED,\r\n            NSNavigation.NAVIGATION_MENU_DESELECTED]);\r\n        \r\n        /*let eventHandler: any = this.__navEventHandler.bind(this);\r\n        util.addEvent(this.__element, NSNavigation.NAVIGATION_OPEN_START, eventHandler);\r\n        util.addEvent(this.__element, NSNavigation.NAVIGATION_OPEN_END, eventHandler);\r\n        util.addEvent(this.__element, NSNavigation.NAVIGATION_CLOSE_START, eventHandler);\r\n        util.addEvent(this.__element, NSNavigation.NAVIGATION_CLOSE_END, eventHandler);\r\n        util.addEvent(this.__element, NSNavigation.NAVIGATION_MENU_SELECTED, eventHandler);\r\n        util.addEvent(this.__element, NSNavigation.NAVIGATION_MENU_DESELECTED, eventHandler);*/\r\n    };\r\n\r\n    ngAfterViewInit(): void {\r\n    };\r\n\r\n    isNavOpen(): Boolean {\r\n        return (this.objNSComp ? this.objNSComp.isNavOpen() : false);\r\n    };\r\n\r\n    toggleNavigation(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.toggleNavigation();\r\n        }\r\n    };\r\n\r\n    openNavigation(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.openNavigation();\r\n        }\r\n    };\r\n\r\n    closeNavigation(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.closeNavigation();\r\n        }\r\n    };\r\n\r\n    selectMenu(itemOrElement: any): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.selectMenu(itemOrElement);\r\n        }\r\n    };\r\n\r\n    setDataSource(source: INSNavigationMenu[]): void {\r\n        if (this.objNSComp) {\r\n            this.__manageDataSource();\r\n            this.objNSComp.dataSource(source);\r\n        }\r\n    };\r\n\r\n    setStyle(styleProp: String, value: any) {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.setStyle(styleProp, value);\r\n        }\r\n    };\r\n\r\n    setFocus(isFocus: boolean) {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.setFocus(isFocus);\r\n        }\r\n    };\r\n\r\n    hasFocus(): boolean {\r\n        if (this.objNSComp) {\r\n            return this.objNSComp.hasFocus();\r\n        }\r\n        return false;\r\n    };\r\n\r\n    setTheme(theme: string) {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.setTheme(theme);\r\n        }\r\n    };\r\n\r\n    private __manageDataSource(): void {\r\n        if (this.dataSource && this.dataSource.length > 0) {\r\n            for (let source of this.dataSource) {\r\n                this.__manageDataSourceItem(source);\r\n            }\r\n        }\r\n    };\r\n\r\n    private __manageDataSourceItem(item: INSNavigationMenu): void {\r\n        if (item) {\r\n            if (item.childMenus && item.childMenus.length > 0) {\r\n                for (let childMenu of item.childMenus) {\r\n                    this.__manageDataSourceItem(childMenu);\r\n                }\r\n            }\r\n            else {\r\n                item[\"click\"] = this.__menuClickHandler.bind(this);\r\n            }\r\n        }\r\n    };\r\n\r\n    private __menuClickHandler(event: any, item: INSNavigationMenu, li: any): void {\r\n        if (item) {\r\n            let navigateAction = true;\r\n            if (item.onClick) {\r\n                navigateAction = item.onClick(event, item, li);\r\n            }\r\n            if (this.router && navigateAction && (item.href || item[\"link\"])) {\r\n                const newRoute = item.href || item[\"link\"];\r\n                const formattedRoute = newRoute.startsWith('/') ? newRoute : `/${newRoute}`;\r\n                this.router.navigate([formattedRoute]);\r\n            } else {\r\n                console.log('Navigation is not available');\r\n            }\r\n        }\r\n    };\r\n}","import {\r\n    AfterViewInit,\r\n    Component,\r\n    ElementRef,\r\n    EventEmitter,\r\n    forwardRef,\r\n    Input,\r\n    OnDestroy,\r\n    OnInit,\r\n    Output,\r\n    ViewEncapsulation\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\r\nimport { ScriptLoaderService } from '../../script-loader.service';\r\nimport { NSBaseComponent } from '../ns-base';\r\nimport { INSMultiSelectDropdownSetting } from './interfaces';\r\n\r\ndeclare var NSMultiSelectDropdown: any;\r\n\r\nexport interface INSMultiSelectDropdownAngularSetting extends INSMultiSelectDropdownSetting {\r\n    setting?: INSMultiSelectDropdownSetting;\r\n    dataSource?: any[];\r\n    [propName: string]: any;\r\n}\r\n\r\n@Component({\r\n    selector: 'ns-multiselect-dropdown-angular',\r\n    template: '',\r\n    standalone: false,\r\n    styles: [\r\n        `\r\n        @import \"../../../generated/css/nsMultiSelectDropdown.min.css\";\r\n      `\r\n    ],\r\n    encapsulation: ViewEncapsulation.None,\r\n    providers: [\r\n        {\r\n            provide: NG_VALUE_ACCESSOR,\r\n            useExisting: forwardRef(() => NSMultiSelectDropdownAngular),\r\n            multi: true\r\n        }\r\n    ]\r\n})\r\nexport class NSMultiSelectDropdownAngular extends NSBaseComponent<typeof NSMultiSelectDropdown> implements OnInit, AfterViewInit, ControlValueAccessor {\r\n\r\n    public static checkComponentLoaded(): void {\r\n        if (!NSMultiSelectDropdown) {\r\n            throw new Error('NSMultiSelectDropdown is not loaded yet.');\r\n        }\r\n    }\r\n\r\n    public static get LABEL_TYPE_OF_TEXT(): any {\r\n        this.checkComponentLoaded();\r\n        return NSMultiSelectDropdown?.LABEL_TYPE_OF_TEXT;\r\n    }\r\n\r\n    public static get LABEL_TYPE_HORIZONTAL_LIST(): any {\r\n        this.checkComponentLoaded();\r\n        return NSMultiSelectDropdown?.LABEL_TYPE_HORIZONTAL_LIST;\r\n    }\r\n\r\n    public static get LABEL_TYPE_VERTICAL_LIST(): any {\r\n        this.checkComponentLoaded();\r\n        return NSMultiSelectDropdown?.LABEL_TYPE_VERTICAL_LIST;\r\n    }\r\n\r\n    @Input() setting: INSMultiSelectDropdownAngularSetting | undefined | null;\r\n    @Input() set dataSource(arrSource: any[]) {\r\n        this.__source = arrSource;\r\n        if (this.objNSComp) {\r\n            this.objNSComp.dataSource(this.__source);\r\n        }\r\n    }\r\n    get dataSource(): any[] | null | undefined {\r\n        return this.__source;\r\n    }\r\n\r\n    @Output() dropdownOpen: EventEmitter<any> = new EventEmitter();\r\n    @Output() dropdownClose: EventEmitter<any> = new EventEmitter();\r\n    @Output() dropdownItemClick: EventEmitter<any> = new EventEmitter();\r\n\r\n    private __source: any[] | undefined | null;\r\n    private __arrItems: any[] = [];\r\n    private __arrValues: any[] = [];\r\n    private onChange: (value: any) => void = () => { };\r\n    private onTouched: () => void = () => { };\r\n\r\n    constructor() {\r\n        super();\r\n        this.initializeScripts(['NSMultiSelectDropdown']);\r\n    }\r\n\r\n    ngOnInit(): void {\r\n        if (!this.objNSComp) {\r\n            this.initializeEvents([\r\n                NSMultiSelectDropdown.DROPDOWN_OPEN,\r\n                NSMultiSelectDropdown.DROPDOWN_CLOSE,\r\n                NSMultiSelectDropdown.DROPDOWN_ITEM_CLICK\r\n            ]);\r\n            this.create();\r\n        }\r\n        this.hasInitialized = true;\r\n    }\r\n\r\n    ngAfterViewInit(): void {\r\n        // Additional initialization logic if needed\r\n    }\r\n\r\n    create(): void {\r\n        if (!this.objNSComp && this.setting) {\r\n            if (this.__source && this.__source.length > 0) {\r\n                this.setting.dataSource = this.__source;\r\n            }\r\n            this.objNSComp = new NSMultiSelectDropdown(this.element, this.setting);\r\n            this.hasInitialized = true;\r\n\r\n            // Handle any items to be selected/unselected\r\n            if (this.__arrItems) {\r\n                for (const item of this.__arrItems) {\r\n                    this.setSelectUnselectItems(item.items, item.isSelected);\r\n                }\r\n            }\r\n            if (this.__arrValues) {\r\n                for (const value of this.__arrValues) {\r\n                    this.setSelectUnselectItemsByValue(value.values, value.isSelected);\r\n                }\r\n            }\r\n            this.hasInitialized = true;\r\n        }\r\n    }\r\n\r\n    // ControlValueAccessor methods\r\n    writeValue(value: any): void {\r\n        if (value !== undefined && this.objNSComp) {\r\n            this.objNSComp.setSelectUnselectItems(value, true);\r\n        }\r\n    }\r\n\r\n    registerOnChange(fn: (value: any) => void): void {\r\n        this.onChange = fn;\r\n    }\r\n\r\n    registerOnTouched(fn: () => void): void {\r\n        this.onTouched = fn;\r\n    }\r\n\r\n    setDisabledState?(isDisabled: boolean): void {\r\n        if (this.objNSComp) {\r\n            //this.objNSComp.setDisabledState(isDisabled);\r\n        }\r\n    }\r\n\r\n    getSelectedIndexes(): number[] {\r\n        return this.objNSComp?.getSelectedIndexes();\r\n    }\r\n\r\n    getSelectedItems(): any[] {\r\n        return this.objNSComp?.getSelectedItems();\r\n    }\r\n\r\n    setSelectUnselectItemsByValue(value: string | number, isSelected: boolean): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.setSelectUnselectItemsByValue(value, isSelected);\r\n        } else {\r\n            this.__arrValues.push({ values: value, isSelected: isSelected });\r\n        }\r\n    }\r\n\r\n    setSelectUnselectItems(arrItems: any, isSelected: boolean): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.setSelectUnselectItems(arrItems, isSelected);\r\n        } else {\r\n            this.__arrItems.push({ items: arrItems, isSelected: isSelected });\r\n        }\r\n    }\r\n\r\n    setStyle(styleProp: string, value: any): void {\r\n        this.objNSComp.setStyle(styleProp, value);\r\n    }\r\n\r\n    setFocus(isFocus: boolean): void {\r\n        this.objNSComp.setFocus(isFocus);\r\n    }\r\n\r\n    hasFocus(): boolean {\r\n        return this.objNSComp.hasFocus();\r\n    }\r\n\r\n    setTheme(theme: string): void {\r\n        this.objNSComp.setTheme(theme);\r\n    }\r\n\r\n    protected override eventListener(event: any, eventName: string): void {\r\n        switch (eventName) {\r\n            case NSMultiSelectDropdown.DROPDOWN_OPEN:\r\n                this.dropdownOpen.emit(event);\r\n                break;\r\n            case NSMultiSelectDropdown.DROPDOWN_CLOSE:\r\n                this.dropdownClose.emit(event);\r\n                break;\r\n            case NSMultiSelectDropdown.DROPDOWN_ITEM_CLICK:\r\n                this.dropdownItemClick.emit(event);\r\n                break;\r\n        }\r\n    }\r\n}\r\n","import { Component, ViewEncapsulation, OnChanges, OnInit, AfterViewInit, Input, Output, EventEmitter, ElementRef, SimpleChange } from \"@angular/core\";\r\nimport { INSPanelSetting } from \"./interfaces\";\r\nimport { NSBaseComponent } from \"../ns-base\";\r\n\r\n\r\ndeclare var NSPanel: any;\r\n\r\nexport interface INSPanelAngularSettings extends INSPanelSetting {\r\n    setting?: INSPanelSetting;\r\n    [propName: string]: any;\r\n}\r\n\r\n@Component({\r\n    selector: 'ns-panel-angular',\r\n    template: '<ng-content></ng-content>',\r\n    standalone: false,\r\n    styles: [`\r\n        @import \"../../../generated/css/nsPanel.min.css\";\r\n    `],\r\n    encapsulation: ViewEncapsulation.None\r\n})\r\n\r\nexport class NSPanelAngular extends NSBaseComponent<typeof NSPanel> implements OnChanges, OnInit, AfterViewInit {\r\n    @Input() setting!: INSPanelAngularSettings;\r\n\r\n    @Output() dragStaring: EventEmitter<any> = new EventEmitter();\r\n    @Output() dragging: EventEmitter<any> = new EventEmitter();\r\n    @Output() dragEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() resizeStaring: EventEmitter<any> = new EventEmitter();\r\n    @Output() resizing: EventEmitter<any> = new EventEmitter();\r\n    @Output() resizeEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() collapseStarting: EventEmitter<any> = new EventEmitter();\r\n    @Output() collapseEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() expansionStarting: EventEmitter<any> = new EventEmitter();\r\n    @Output() expansionEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() minimizeStarting: EventEmitter<any> = new EventEmitter();\r\n    @Output() minimizeEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() maximizeStarting: EventEmitter<any> = new EventEmitter();\r\n    @Output() maximizeEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() fullScreenStarting: EventEmitter<any> = new EventEmitter();\r\n    @Output() fullScreenEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() restoreStarting: EventEmitter<any> = new EventEmitter();\r\n    @Output() restoreEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() closed: EventEmitter<any> = new EventEmitter();\r\n\r\n\r\n    constructor() {\r\n        super();\r\n        this.initializeScripts(['NSPanel']);\r\n    };\r\n\r\n    ngOnInit(): void {\r\n    };\r\n\r\n    ngOnChanges(changes: { [propName: string]: SimpleChange }): void {\r\n    };\r\n\r\n    //elements children are created in ngAfterViewInit and not in ngOnInit\r\n    ngAfterViewInit(): void {\r\n        this.create();\r\n    };\r\n\r\n    open(): void {\r\n        /*if(!this.objNSComp)\r\n        {\r\n            this.element = this.elementRef.nativeElement;\r\n            this.objNSComp = new NSPanel(this.element,this.setting); \r\n            this.__creationHandler();\r\n            this.__addEventHandlers();\r\n        }*/\r\n        if (this.objNSComp) {\r\n            return this.objNSComp.open();\r\n        }\r\n    };\r\n\r\n    close(): void {\r\n        if (this.objNSComp) {\r\n            return this.objNSComp.close();\r\n        }\r\n    };\r\n\r\n    removeModal(): void {\r\n        if (this.objNSComp) {\r\n            return this.objNSComp.removeModal();\r\n        }\r\n    };\r\n\r\n    getBaseElement(): any {\r\n        if (this.objNSComp) {\r\n            return this.objNSComp.getBaseElement();\r\n        }\r\n        return null;\r\n    };\r\n\r\n    minimize(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.minimize();\r\n        }\r\n    };\r\n\r\n    maximize(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.maximize();\r\n        }\r\n    };\r\n\r\n    collapse(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.collapse();\r\n        }\r\n    };\r\n\r\n    expand(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.expand();\r\n        }\r\n    };\r\n\r\n    fullScreen(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.fullScreen();\r\n        }\r\n    };\r\n\r\n    restore(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.restore();\r\n        }\r\n    };\r\n\r\n    disableResize(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.disableResize();\r\n        }\r\n    };\r\n\r\n    disableDrag(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.disableDrag();\r\n        }\r\n    };\r\n\r\n    disableCollapse(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.disableCollapse();\r\n        }\r\n    };\r\n\r\n    disableMinMax(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.disableCollapse();\r\n        }\r\n    };\r\n\r\n    disableFullScreen(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.disableCollapse();\r\n        }\r\n    };\r\n\r\n    isCollapsed(): boolean {\r\n        if (this.objNSComp) {\r\n            return this.objNSComp.isCollapsed();\r\n        }\r\n        return false;\r\n    };\r\n\r\n    isMinimized(): boolean {\r\n        if (this.objNSComp) {\r\n            return this.objNSComp.isMinimized();\r\n        }\r\n        return false;\r\n    };\r\n\r\n    isFullScreen(): boolean {\r\n        if (this.objNSComp) {\r\n            return this.objNSComp.isFullScreen();\r\n        }\r\n        return false;\r\n    };\r\n\r\n    private create(): void {\r\n        if (!this.objNSComp) {\r\n            this.objNSComp = new NSPanel(this.element, this.setting);\r\n            if (!this.element) {\r\n                this.element = this.objNSComp.getBaseElement();\r\n                this.initializeEvents([NSPanel.DRAG_STARTING,\r\n                NSPanel.DRAGGING,\r\n                NSPanel.DRAG_END,\r\n                NSPanel.RESIZE_STARTING,\r\n                NSPanel.RESIZING,\r\n                NSPanel.RESIZE_END,\r\n                NSPanel.COLLAPSE_STARTING,\r\n                NSPanel.COLLAPSE_END,\r\n                NSPanel.EXPANSION_STARTING,\r\n                NSPanel.EXPANSION_END,\r\n                NSPanel.MINIMIZE_STARTING,\r\n                NSPanel.MINIMIZE_END,\r\n                NSPanel.FULLSCREEN_STARTING,\r\n                NSPanel.FULLSCREEN_END,\r\n                NSPanel.RESTORE_STARTING,\r\n                NSPanel.RESTORE_END,\r\n                NSPanel.CLOSED\r\n                ]);\r\n            }\r\n            this.hasInitialized = true;\r\n        }\r\n    };\r\n}","////////// Interfaces /////////////////////////////////////////////////////////\r\n\r\nexport interface INSPanelMinimizeAddRemoveElementFunction {\r\n    (component: any,parentComponent: any,isMinimized: boolean):void;\r\n}\r\n\r\nexport interface INSPanelContentComponent{\r\n    // gets called once after the component is created\r\n   init?(data: any): Promise<any> | void;\r\n   // Return the DOM element of editor which gets added in DOM\r\n   getElement(): HTMLElement;\r\n   //fired when element is added in DOM\r\n   elementAdded?(): void;\r\n   // gets called when editor is being destroyed.Used to do editor cleanup\r\n   destroy?(): void;\r\n}\r\n\r\nexport interface INSPanelCustomClass {\r\n    container?: string;\r\n    titleBar?: string;\r\n    iconContainer?: string;\r\n    icon?: string;\r\n    body?: string;\r\n    [propName: string]: any;\r\n}\r\n\r\nexport interface INSPanelToolBarDetailsObject {\r\n    iconHTML?: string;\r\n    title?: string;\r\n}\r\n\r\nexport interface INSPanelToolBarDetails {\r\n    minimize?: INSPanelToolBarDetailsObject;\r\n    maximize?: INSPanelToolBarDetailsObject;\r\n    expand?: INSPanelToolBarDetailsObject;\r\n    collapse?: INSPanelToolBarDetailsObject;\r\n    fullScreen?: INSPanelToolBarDetailsObject;\r\n    restore?: INSPanelToolBarDetailsObject;\r\n    close?: INSPanelToolBarDetailsObject;\r\n}\r\n\r\nexport interface INSPanelDivSetting {\r\n    top?: string;\r\n    left?: string;\r\n    width?: string;\r\n    height?: string;\r\n}\r\n\r\nexport interface INSPanelSetting {\r\n    context?: any;\r\n    parent?: any;\r\n    title?: string;\r\n    titleHtml?: string;\r\n    content?: any;\r\n    contentComponent?: any;\r\n    contentComponentData?: any;\r\n    template?: string;\r\n    templateUrl?: string;\r\n    minWidth?: number;\r\n    minHeight?: number;\r\n    enablePopUp?: boolean;\r\n    enableModal?: boolean;\r\n    enableCollapse?: boolean;\r\n    enableMinimization?: boolean;\r\n    enableFullScreen?: boolean;\r\n    enableDrag?: boolean;\r\n    enableResize?: boolean;\r\n    enableTitleDblClick?: boolean;\r\n    enableMoveOnClick?: boolean;\r\n    enableModalAnimation?: boolean;\r\n    enableModalCloseOnOutsideClick?: boolean;\r\n    enableModalCloseOnEscape?: boolean;\r\n    enableCloseIconVisibility?: boolean;\r\n    minimizedDirection?: string;\r\n    theme?: string;\r\n    minimizeAddRemoveElementCallback?: INSPanelMinimizeAddRemoveElementFunction,\r\n    customClass?: INSPanelCustomClass;\r\n    toolBarDetails?: INSPanelToolBarDetails;\r\n    panelSetting?: INSPanelDivSetting;\r\n    [propName: string]: any;\r\n}","import { Component, ViewEncapsulation, OnChanges, OnInit, AfterViewInit, Input, Output, EventEmitter, ElementRef, SimpleChange } from \"@angular/core\";\r\nimport { INSCalendarSetting } from \"./interfaces\";\r\nimport { NSBaseComponent } from \"../ns-base\";\r\n\r\n\r\ndeclare var NSCalendar: any;\r\n\r\nexport interface INSCalendarAngularSetting extends INSCalendarSetting {\r\n    setting?: INSCalendarSetting;\r\n    [propName: string]: any;\r\n}\r\n\r\n\r\n@Component({\r\n    selector: 'ns-calendar-angular',\r\n    template: '',\r\n    standalone: false,\r\n    styles: [`\r\n        @import \"../../../generated/css/nsComponent.min.css\";\r\n        @import \"../../../generated/css/nsCalendar.min.css\";\r\n    `],\r\n    encapsulation: ViewEncapsulation.None\r\n})\r\nexport class NSCalendarAngular extends NSBaseComponent<typeof NSCalendar> implements OnChanges, OnInit, AfterViewInit {\r\n    @Input() setting!: INSCalendarAngularSetting;\r\n\r\n    @Output() dateSelected: EventEmitter<any> = new EventEmitter();\r\n\r\n    constructor() {\r\n        super();\r\n        this.initializeScripts(['NSCalendar']);\r\n    };\r\n\r\n    ngOnChanges(changes: { [propName: string]: SimpleChange }): void {\r\n\r\n    };\r\n\r\n    ngOnInit(): void {\r\n        this.objNSComp = new NSCalendar(this.element, this.setting);\r\n        this.initializeEvents([NSCalendar.DATE_SELECTED]);\r\n        this.hasInitialized = true;\r\n    };\r\n\r\n    ngAfterViewInit(): void {\r\n    };\r\n\r\n    getSelectedDate(): any {\r\n        return this.objNSComp.getSelectedDate();\r\n    };\r\n\r\n    getSelectedDateAsString(format: string): any {\r\n        return this.objNSComp.getSelectedDateAsString(format);\r\n    };\r\n\r\n    setSelectedDate(date: any, format: string): void {\r\n        this.objNSComp.setSelectedDate(date, format);\r\n    };\r\n\r\n    setYear(year: number): void {\r\n        this.objNSComp.setYear(year);\r\n    };\r\n\r\n    setMonth(month: number): void {\r\n        this.objNSComp.setMonth(month);\r\n    };\r\n\r\n    reset(): void {\r\n        this.objNSComp.reset();\r\n    };\r\n\r\n    setTodayDate(): void {\r\n        this.objNSComp.setTodayDate();\r\n    };\r\n\r\n    setStyle(styleProp: string, value: any): void {\r\n        this.objNSComp.setStyle(styleProp, value);\r\n    };\r\n\r\n    setFocus(isFocus: boolean): void {\r\n        this.objNSComp.setFocus(isFocus);\r\n    };\r\n\r\n    hasFocus(): boolean {\r\n        return this.objNSComp.hasFocus();\r\n    };\r\n\r\n    setTheme(theme: string): void {\r\n        this.objNSComp.setTheme(theme);\r\n    };\r\n\r\n    changeProperty(propertyName: string, value: any): void {\r\n        this.objNSComp.changeProperty(propertyName, value);\r\n    };\r\n}  ","import { Component, ViewEncapsulation, OnChanges, OnInit, AfterViewInit, Input, Output, EventEmitter, ElementRef, SimpleChange, forwardRef } from \"@angular/core\";\r\nimport { NSBaseComponent } from \"../ns-base\";\r\nimport { INSDatePickerSetting } from \"./interfaces\";\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\r\n\r\n\r\ndeclare var NSCalendar: any;\r\ndeclare var NSDatePicker: any;\r\n\r\nexport interface INSDatePickerAngularSetting extends INSDatePickerSetting {\r\n    setting?: INSDatePickerSetting;\r\n    [propName: string]: any;\r\n}\r\n\r\n@Component({\r\n    selector: 'ns-date-picker-angular',\r\n    template: '',\r\n    standalone: false,\r\n    styles: [`\r\n        @import \"../../../generated/css/nsComponent.min.css\";\r\n        @import \"../../../generated/css/nsDatePicker.min.css\";\r\n    `],\r\n    encapsulation: ViewEncapsulation.None,\r\n    providers: [\r\n        {\r\n            provide: NG_VALUE_ACCESSOR,\r\n            useExisting: forwardRef(() => NSDatePickerAngular),\r\n            multi: true\r\n        }\r\n    ]\r\n})\r\n\r\nexport class NSDatePickerAngular extends NSBaseComponent<typeof NSDatePicker> implements OnChanges, OnInit, AfterViewInit, ControlValueAccessor {\r\n    @Input() setting!: INSDatePickerAngularSetting;\r\n\r\n    @Output() nsCalendarOpened: EventEmitter<any> = new EventEmitter();\r\n    @Output() nsCalendarClosed: EventEmitter<any> = new EventEmitter();\r\n    @Output() nsDateSelected: EventEmitter<any> = new EventEmitter();\r\n    @Output() nsInputChange: EventEmitter<any> = new EventEmitter();\r\n    @Output() modelChanged = new EventEmitter();\r\n\r\n    private __onChange!: (value: any) => void;\r\n    private __onTouch!: () => void;\r\n\r\n    /*@Input()\r\n    get model(): any {\r\n        return this.__modelValue;\r\n    };\r\n\r\n    set model(value: any) {\r\n        if (!this.__isInternalCall) {\r\n            this.__modelValue = value;\r\n            if (this.objNSComp) {\r\n                this.objNSComp.setSelectedDate(this.__modelValue, null, false);\r\n            }\r\n            this.onChange(this.__modelValue);\r\n            this.modelChange.emit(this.__modelValue);\r\n        }\r\n        this.__isInternalCall = false;\r\n    };*/\r\n\r\n    //private __modelValue: any;\r\n    private __isInternalCall: boolean = false;\r\n    private __pendingValue: any | undefined;\r\n\r\n    constructor() {\r\n        super();\r\n        this.initializeScripts(['NSDatePicker']);\r\n    };\r\n\r\n    writeValue(value: any): void {\r\n        //this.__modelValue = value;\r\n        if (this.objNSComp) {\r\n            this.objNSComp.setSelectedDate(value, null, false);\r\n            let dateFormat: string = this.setting.inputDateFormat || \"MM/dd/yyyy\";\r\n            const textValue = this.getSelectedDateAsString(dateFormat);\r\n            if(textValue !== this.getTextBox().value) {\r\n                this.getTextBox().value = textValue;\r\n            }\r\n        } else {\r\n            this.__pendingValue = value;\r\n        }\r\n    }\r\n\r\n    registerOnChange(fn: any): void {\r\n        this.__onChange = fn;\r\n    }\r\n\r\n    registerOnTouched(fn: any): void {\r\n        this.__onTouch = fn;\r\n    }\r\n\r\n    setDisabledState?(isDisabled: boolean): void {\r\n        // Implement disabled state logic if needed\r\n    }\r\n\r\n    ngOnChanges(changes: { [propName: string]: SimpleChange }): void {\r\n\r\n    };\r\n\r\n    ngOnInit(): void {\r\n        this.objNSComp = new NSDatePicker(this.element, this.setting);\r\n        this.initializeEvents([NSDatePicker.CALENDAR_OPENED,\r\n        NSDatePicker.CALENDAR_CLOSED,\r\n        NSDatePicker.DATE_SELECTED,\r\n        NSDatePicker.INPUT_CHANGE]);\r\n        this.hasInitialized = true;\r\n        //this.nsUtil.addEvent(this.element, NSDatePicker.DATE_SELECTED, this.__dateSelectedHandler.bind(this));\r\n        //this.nsUtil.addEvent(this.element, NSDatePicker.INPUT_CHANGE, this.__inputChangeHandler.bind(this));\r\n    };\r\n\r\n    ngAfterViewInit(): void {\r\n        if (this.__pendingValue !== undefined) {\r\n            this.objNSComp.setSelectedDate(this.__pendingValue, null, false);\r\n            this.__pendingValue = undefined;\r\n        }\r\n    };\r\n\r\n    getSelectedDate(): any {\r\n        return this.objNSComp.getSelectedDate();\r\n    };\r\n\r\n    getSelectedDateAsString(format: string): any {\r\n        return this.objNSComp.getSelectedDateAsString(format);\r\n    };\r\n\r\n    setSelectedDate(date: any, format?: string): void {\r\n        this.objNSComp.setSelectedDate(date, format);\r\n    };\r\n\r\n    setYear(year: number): void {\r\n        this.objNSComp.setYear(year);\r\n    };\r\n\r\n    setMonth(month: number): void {\r\n        this.objNSComp.setMonth(month);\r\n    };\r\n\r\n    reset(): void {\r\n        this.objNSComp.reset();\r\n    };\r\n\r\n    setTodayDate(): void {\r\n        this.objNSComp.setTodayDate();\r\n    };\r\n\r\n    showCalendar(isAbsolutePosition?: boolean): void {\r\n        this.objNSComp.showCalendar(isAbsolutePosition);\r\n    };\r\n\r\n    closeCalendar(): void {\r\n        this.objNSComp.closeCalendar();\r\n    };\r\n\r\n    getCalendar(): typeof NSCalendar {\r\n        return this.objNSComp.getCalendar();\r\n    };\r\n\r\n    getTextBox(): HTMLInputElement {\r\n        return this.objNSComp.getTextBox();\r\n    };\r\n\r\n    getText(): any {\r\n        if (this.objNSComp) {\r\n            return this.objNSComp.getText();\r\n        }\r\n        return \"\";\r\n    };\r\n\r\n    toggleCalendarVisibility(): void {\r\n        this.objNSComp.toggleCalendarVisibility();\r\n    };\r\n\r\n    setStyle(styleProp: string, value: any): void {\r\n        this.objNSComp.setStyle(styleProp, value);\r\n    };\r\n\r\n    setFocus(isFocus: boolean): void {\r\n        this.objNSComp.setFocus(isFocus);\r\n    };\r\n\r\n    hasFocus(): boolean {\r\n        return this.objNSComp.hasFocus();\r\n    };\r\n\r\n    setTheme(theme: string): void {\r\n        this.objNSComp.setTheme(theme);\r\n    };\r\n\r\n    changeProperty(propertyName: string, value: any): void {\r\n        this.objNSComp.changeProperty(propertyName, value);\r\n    };\r\n\r\n    private fireChangeEvents(newValue: any) {\r\n        if (this.__onChange) {\r\n            this.__onChange(newValue);\r\n            this.__onTouch();\r\n            this.modelChanged.emit(newValue);\r\n        }\r\n    }\r\n\r\n    private __dateSelectedHandler(event: any) {\r\n        this.__isInternalCall = true;\r\n        //this.__modelValue = event.detail;\r\n        this.fireChangeEvents(event.detail);\r\n    }\r\n\r\n    private __inputChangeHandler(event: any) {\r\n        this.__isInternalCall = true;\r\n        //this.__modelValue = event.detail;\r\n        this.fireChangeEvents(event.detail);\r\n    }\r\n\r\n    protected override eventListener(event: any, eventName: string) {\r\n        let type: any = event.type;\r\n        if(type === NSDatePicker.DATE_SELECTED) {\r\n            this.__dateSelectedHandler(event);\r\n        }\r\n        else if(type === NSDatePicker.INPUT_CHANGE) {\r\n            this.__inputChangeHandler(event);\r\n        }\r\n        type = \"ns\" + type.charAt(0).toUpperCase() + type.slice(1);\r\n        //@ts-ignore\r\n        this[type].emit(event.detail);\r\n    }\r\n}","import { Injectable, ApplicationRef, ComponentRef, Type, Injector, ViewContainerRef, EmbeddedViewRef, Renderer2, ComponentFactoryResolver, RendererFactory2 } from '@angular/core';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class NSDynamicComponentService {\r\n    private renderer: Renderer2;\r\n    constructor(private applicationRef: ApplicationRef,\r\n        private injector: Injector,\r\n        private componentFactoryResolver: ComponentFactoryResolver,\r\n        rendererFactory: RendererFactory2) {\r\n        this.renderer = rendererFactory.createRenderer(null, null);\r\n    }\r\n\r\n    /**\r\n     * Create a component reference dynamically.\r\n     * @param componentClass The component class to create.\r\n     * @param viewContainerRef Optional ViewContainerRef to host the component.\r\n     * @param inputs Optional object containing @Input properties to set on the component instance.\r\n     */\r\n    createComponentRef<T>(componentClass: Type<T>, viewContainerRef?: ViewContainerRef, inputs?: Partial<T>): ComponentRef<T> {\r\n        let componentRef: ComponentRef<T>;\r\n        if (viewContainerRef) {\r\n            // If ViewContainerRef is provided, create the component within it\r\n            componentRef = viewContainerRef.createComponent(componentClass, { injector: this.injector });\r\n        } else {\r\n            // Create the component independently\r\n            /*const componentRef = this.applicationRef.bootstrap(componentClass); // Standalone component instantiation\r\n            const domElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\r\n            document.body.appendChild(domElem);\r\n            return componentRef;*/\r\n            const containerElement = this.renderer.createElement('div');\r\n            this.renderer.appendChild(document.body, containerElement);\r\n\r\n            // Create an embedded view to host the component\r\n            const tempViewContainerRef = this.createViewContainerRef(containerElement);\r\n\r\n            // Create the component within the temporary view container\r\n            componentRef = tempViewContainerRef.createComponent(componentClass, {\r\n                injector: this.injector,\r\n            });\r\n        }\r\n        if(componentRef) {\r\n            if(inputs) {\r\n                Object.assign((componentRef.instance as any), inputs);\r\n            }\r\n            componentRef.changeDetectorRef.detectChanges();\r\n        }\r\n        return componentRef;\r\n    }\r\n\r\n    private createViewContainerRef(element: HTMLElement): ViewContainerRef {\r\n        const embeddedView = this.applicationRef\r\n            .components[0]\r\n            .instance\r\n            .viewContainerRef\r\n            .createEmbeddedView({});\r\n\r\n        this.applicationRef.attachView(embeddedView);\r\n        embeddedView.rootNodes.forEach((node: any) => {\r\n            this.renderer.appendChild(element, node);\r\n        });\r\n\r\n        return embeddedView.injector.get(ViewContainerRef);\r\n    }\r\n\r\n    getInstance<T>(componentRef: ComponentRef<T>): T {\r\n        // Access the instance of the dynamically created component\r\n        return componentRef.instance;\r\n    }\r\n\r\n    getDomElement<T>(componentRef: ComponentRef<T>): HTMLElement {\r\n        // Get the root DOM element of the component\r\n        return (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\r\n    }\r\n\r\n    destroyComponent<T>(componentRef: ComponentRef<T>, delay = 0): void {\r\n        // Destroy the component with an optional delay\r\n        setTimeout(() => {\r\n            this.applicationRef.detachView(componentRef.hostView);\r\n            componentRef.destroy();\r\n        }, delay);\r\n    }\r\n}\r\n","import { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';\r\nimport { INSDashboardPanelSetting, INSDashboardSetting } from './interfaces';\r\nimport { NSBaseComponent } from '../ns-base';\r\nimport { NSDynamicComponentService } from '../../services/ns-dynamic-component.service';\r\n\r\ndeclare const NSDashboard: any;\r\n\r\nexport interface INSDashboardAngularSetting extends INSDashboardSetting {\r\n    setting?: INSDashboardSetting;\r\n    containerStyle?: any;\r\n    [propName: string]: any;\r\n}\r\n\r\n@Component({\r\n    selector: 'ns-dashboard-angular',\r\n    template: '<ng-template #dynamicContainer></ng-template>',\r\n    standalone: false,\r\n    styles: [`\r\n        @import \"../../../generated/css/nsComponent.min.css\";\r\n        @import \"../../../generated/css/nsDashboard.min.css\";\r\n    `],\r\n    encapsulation: ViewEncapsulation.None,\r\n    providers:[NSDynamicComponentService]\r\n})\r\nexport class NSDashboardAngular extends NSBaseComponent<typeof NSDashboard> implements OnInit, AfterViewInit {\r\n    @Input() setting: INSDashboardAngularSetting | undefined | null;\r\n    @Input() containerStyle: any;\r\n\r\n    @Output() panelDragStart = new EventEmitter<any>();\r\n    @Output() panelDragEnter = new EventEmitter<any>();\r\n    @Output() panelDragOver = new EventEmitter<any>();\r\n    @Output() panelDragLeave = new EventEmitter<any>();\r\n    @Output() panelDrop = new EventEmitter<any>();\r\n    @Output() panelDragEnd = new EventEmitter<any>();\r\n\r\n    @Output() rendererComponentCreated:EventEmitter<any> = new EventEmitter();\r\n\r\n    @ViewChild('dynamicContainer', { read: ViewContainerRef, static: true })\r\n    dynamicContainer!: ViewContainerRef;\r\n\r\n    private arrCustomComponents: any[] = [];\r\n    private arrComponentInstances: any[] = [];\r\n\r\n    constructor(private dynamicComponentService: NSDynamicComponentService) { \r\n        super();\r\n        this.initializeScripts(['NSDashboard']);\r\n    }\r\n\r\n    ngOnInit(): void {\r\n        this.initializeComponent();\r\n        this.hasInitialized = true;\r\n    }\r\n\r\n    ngAfterViewInit(): void {\r\n    }\r\n\r\n    override destroy(): void {\r\n        for (let comp of this.arrCustomComponents) {\r\n            comp?.componentRef?.destroy();\r\n        }\r\n    }\r\n\r\n    private initializeComponent(): void {\r\n        if(this.setting && !this.objNSComp) {\r\n            if (this.setting?.arrPanelSetting) {\r\n                this.setting.arrPanelSetting.forEach((panelSetting, index) => {\r\n                    this.initPanel(panelSetting, index);\r\n                });\r\n            }\r\n            this.setting.container = this.element;\r\n            this.objNSComp = new NSDashboard(this.setting);\r\n            this.initializeEvents([NSDashboard.PANEL_DRAG_START,\r\n                NSDashboard.PANEL_DRAG_ENTER,\r\n                NSDashboard.PANEL_DRAG_OVER,\r\n                NSDashboard.PANEL_DRAG_LEAVE,\r\n                NSDashboard.PANEL_DROP,\r\n                NSDashboard.PANEL_DRAG_END\r\n            ]);\r\n            this.hasInitialized = true;\r\n        }\r\n    }\r\n\r\n    private initPanel(setting: INSDashboardPanelSetting, index: number): void {\r\n        if (setting.contentComponent) {\r\n            setting.contentComponent = this.customEditor(setting.contentComponent, index, instance => {\r\n                setting.bodyComponentInstance = instance;\r\n                this.arrComponentInstances[index] = instance;\r\n            });\r\n        }\r\n    }\r\n\r\n    private customEditor(customEditorComponent: any, index: number, mainCallback: (instance: any) => void): any {\r\n        const self: any = this;\r\n        const editor = function(this: any) {\r\n            let componentRef: any;\r\n            let objComponent: any;\r\n\r\n            this.init = async (data: any): Promise<any> => {\r\n                const instance  = await self.dynamicComponentService.createComponentRef(customEditorComponent, self.dynamicContainer);\r\n                componentRef = instance;\r\n                objComponent = self.dynamicComponentService.getInstance(componentRef);\r\n                if (objComponent?.init) {\r\n                    mainCallback(objComponent);\r\n                    objComponent.init(data);\r\n                }\r\n                self.arrCustomComponents[index] = { instance: objComponent, componentRef, component: customEditorComponent, data };\r\n                self.emitRendererComponentCreated(self.arrCustomComponents[index]);\r\n            };\r\n\r\n            this.getElement = () => {\r\n                if(objComponent && objComponent.getElement) {\r\n                    return objComponent.getElement();\r\n                }\r\n                return null;\r\n            }\r\n            this.elementAdded = () => {\r\n                if(objComponent && objComponent.elementAdded) {\r\n                    objComponent.elementAdded();\r\n                }\r\n            }\r\n            this.fullScreenChanged = (isFullScreen: boolean) => {\r\n                if(objComponent && objComponent.fullScreenChanged) {\r\n                    objComponent.fullScreenChanged(isFullScreen);\r\n                }\r\n            }\r\n            this.destroy = () => {\r\n                if(objComponent && objComponent.destroy) {\r\n                    objComponent.destroy();\r\n                }\r\n            }\r\n        };\r\n\r\n        return editor;\r\n    }\r\n\r\n    private emitRendererComponentCreated(objItem:any)\r\n    {\r\n        this.rendererComponentCreated.emit(objItem);\r\n    };\r\n}","////////// Interfaces /////////////////////////////////////////////////////////\r\n\r\nimport { INSPanelSetting } from \"../ns-panel\";\r\n\r\nexport interface INSDashboardBodyComponent{\r\n    // gets called once after the component is created\r\n   init?(data: any): Promise<any> | void;\r\n   // Return the DOM element of editor which gets added in DOM\r\n   getElement(): HTMLElement;\r\n   //fired when element is added in DOM\r\n   elementAdded?(): void;\r\n   fullScreenChanged?(isFullScreen:boolean):void;\r\n   // gets called when editor is being destroyed.Used to do editor cleanup\r\n   destroy?(): void;\r\n}\r\n\r\nexport interface INSDashboardPanelSetting extends INSPanelSetting {\r\n    bodyComponent?: any;\r\n    bodyComponentData?: any;\r\n    bodyComponentInstance?: any;\r\n}\r\n\r\nexport interface INSDashboardSetting {\r\n    container?: HTMLElement;\r\n    panelClass?: string;\r\n    panelDragClass?: string;\r\n    panelHoverClass?: string;\r\n    panelCount?: number;\r\n    panelPerRow?: number;\r\n    arrPanelSetting?: INSDashboardPanelSetting[];\r\n}\r\n\r\n","import { Component, ViewEncapsulation, OnChanges, OnInit, AfterViewInit, Input, Output, EventEmitter, ElementRef, SimpleChange, ViewContainerRef, ContentChildren, QueryList, ViewChild } from \"@angular/core\";\r\nimport { INSMessageBoxAlertSetting, INSMessageBoxCallbackFunction, INSMessageBoxConfirmSetting, INSMessageBoxCustomSetting, INSMessageBoxSetting, MessageBoxComponentRef } from \"./interfaces\";\r\nimport { NSBaseComponent } from \"../ns-base\";\r\nimport { NSDynamicComponentService } from \"../../services\";\r\n\r\ndeclare var NSPanel: any;\r\ndeclare var NSMessageBox: any;\r\n\r\nexport interface INSMessageBoxAngularSetting extends INSMessageBoxSetting {\r\n    setting?: INSMessageBoxSetting;\r\n    [propName: string]: any;\r\n}\r\n\r\n@Component({\r\n    selector: 'ns-message-box-angular',\r\n    template: `<ng-template #dynamicContainer></ng-template>\r\n               <ng-content></ng-content>`,\r\n    standalone: false,\r\n    styles: [`\r\n        @import \"../../../generated/css/nsMessageBox.min.css\";\r\n    `],\r\n    encapsulation: ViewEncapsulation.None,\r\n    providers:[NSDynamicComponentService]\r\n})\r\n\r\nexport class NSMessageBoxAngular extends NSBaseComponent<typeof NSMessageBox> implements OnChanges, OnInit, AfterViewInit {\r\n    @ViewChild('dynamicContainer', { read: ViewContainerRef, static: true })\r\n    dynamicContainer!: ViewContainerRef;\r\n\r\n    @ContentChildren(ElementRef, { descendants: true }) contentChildren!: QueryList<ElementRef>;\r\n\r\n    @Input() setting!: INSMessageBoxAngularSetting | undefined | null;\r\n\r\n    @Output() dragStaring: EventEmitter<any> = new EventEmitter();\r\n    @Output() dragging: EventEmitter<any> = new EventEmitter();\r\n    @Output() dragEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() resizeStaring: EventEmitter<any> = new EventEmitter();\r\n    @Output() resizing: EventEmitter<any> = new EventEmitter();\r\n    @Output() resizeEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() collapseStarting: EventEmitter<any> = new EventEmitter();\r\n    @Output() collapseEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() expansionStarting: EventEmitter<any> = new EventEmitter();\r\n    @Output() expansionEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() minimizeStarting: EventEmitter<any> = new EventEmitter();\r\n    @Output() minimizeEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() maximizeStarting: EventEmitter<any> = new EventEmitter();\r\n    @Output() maximizeEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() fullScreenStarting: EventEmitter<any> = new EventEmitter();\r\n    @Output() fullScreenEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() restoreStarting: EventEmitter<any> = new EventEmitter();\r\n    @Output() restoreEnd: EventEmitter<any> = new EventEmitter();\r\n    @Output() closed: EventEmitter<any> = new EventEmitter();\r\n\r\n    @Output() rendererComponentCreated:EventEmitter<any> = new EventEmitter();\r\n\r\n    private __objNSPanel?: typeof NSPanel;\r\n    private __objBodyContent: any;\r\n    private __objCustomComponent: any;\r\n    private __bodyComponentInstance: any;\r\n\r\n    constructor(private dynamicComponentService: NSDynamicComponentService) {\r\n        super();\r\n        this.initializeScripts(['NSPanel', 'NSMessageBox']);\r\n    };\r\n\r\n    ngOnInit(): void {\r\n        if (this.element) {\r\n            this.__objBodyContent = this.element;\r\n        }\r\n        this.__createComponent();\r\n    };\r\n\r\n    ngAfterContentInit() {\r\n        if (this.contentChildren.length === 0) {\r\n            //const componentRef = this.dynamicContainer.createComponent();\r\n            // Access component instance if needed\r\n            // const instance = componentRef.instance;\r\n        }\r\n    }\r\n\r\n    ngOnChanges(changes: { [propName: string]: SimpleChange }): void {\r\n    };\r\n\r\n    //elements children are created in ngAfterViewInit and not in ngOnInit\r\n    ngAfterViewInit(): void {\r\n    };\r\n\r\n    minimize(): void {\r\n        if (this.__objNSPanel) {\r\n            this.__objNSPanel.minimize();\r\n        }\r\n    };\r\n\r\n    maximize(): void {\r\n        if (this.__objNSPanel) {\r\n            this.__objNSPanel.maximize();\r\n        }\r\n    };\r\n\r\n    collapse(): void {\r\n        if (this.__objNSPanel) {\r\n            this.__objNSPanel.collapse();\r\n        }\r\n    };\r\n\r\n    expand(): void {\r\n        if (this.__objNSPanel) {\r\n            this.__objNSPanel.expand();\r\n        }\r\n    };\r\n\r\n    fullScreen(): void {\r\n        if (this.__objNSPanel) {\r\n            this.__objNSPanel.fullScreen();\r\n        }\r\n    };\r\n\r\n    restore(): void {\r\n        if (this.__objNSPanel) {\r\n            this.__objNSPanel.restore();\r\n        }\r\n    };\r\n\r\n    disableResize(): void {\r\n        if (this.__objNSPanel) {\r\n            this.__objNSPanel.disableResize();\r\n        }\r\n    };\r\n\r\n    disableDrag(): void {\r\n        if (this.__objNSPanel) {\r\n            this.__objNSPanel.disableDrag();\r\n        }\r\n    };\r\n\r\n    disableCollapse(): void {\r\n        if (this.__objNSPanel) {\r\n            this.__objNSPanel.disableCollapse();\r\n        }\r\n    };\r\n\r\n    disableMinMax(): void {\r\n        if (this.__objNSPanel) {\r\n            this.__objNSPanel.disableCollapse();\r\n        }\r\n    };\r\n\r\n    disableFullScreen(): void {\r\n        if (this.__objNSPanel) {\r\n            this.__objNSPanel.disableCollapse();\r\n        }\r\n    };\r\n\r\n    isCollapsed(): boolean {\r\n        if (this.__objNSPanel) {\r\n            return this.__objNSPanel.isCollapsed();\r\n        }\r\n        return false;\r\n    };\r\n\r\n    isMinimized(): boolean {\r\n        if (this.__objNSPanel) {\r\n            return this.__objNSPanel.isMinimized();\r\n        }\r\n        return false;\r\n    };\r\n\r\n    isFullScreen(): boolean {\r\n        if (this.__objNSPanel) {\r\n            return this.__objNSPanel.isFullScreen();\r\n        }\r\n        return false;\r\n    };\r\n\r\n    alert(message: string | INSMessageBoxAlertSetting, title?: string, callback?: INSMessageBoxCallbackFunction): void {\r\n        this.__createComponent();\r\n        this.objNSComp.alert(message, title, callback);\r\n        this.__creationHandler();\r\n    };\r\n\r\n    confirm(message: string | INSMessageBoxConfirmSetting, title?: string, confirmCallback?: INSMessageBoxCallbackFunction, cancelCallback?: INSMessageBoxCallbackFunction): void {\r\n        this.__createComponent();\r\n        this.objNSComp.confirm(message, title, confirmCallback, cancelCallback);\r\n        this.__creationHandler();\r\n    };\r\n\r\n    custom(setting: INSMessageBoxCustomSetting): void {\r\n        this.__createComponent();\r\n        if (!setting) {\r\n            setting = {};\r\n        }\r\n        if(setting.bodyComponent) {\r\n            setting.bodyComponent = this.__customBodyComponent(setting.bodyComponent,(instance: any) => {\r\n                setting[\"bodyComponentInstance\"] = instance;\r\n                this.__bodyComponentInstance = instance;\r\n            });\r\n            /*setting.contentComponent = this.customEditor(setting.contentComponent, instance => {\r\n                setting[\"bodyComponentInstance\"] = instance;\r\n                this.__bodyComponentInstance = instance;\r\n                this.objNSComp.custom(setting);\r\n                this.__creationHandler();\r\n            });*/\r\n        }\r\n        else if(!setting.bodyContent && !setting.bodyTemplate && !setting.bodyContent) {\r\n            if (!setting.bodyContent && this.__objBodyContent) {\r\n                setting.bodyContent = this.__objBodyContent;\r\n            }\r\n        }\r\n        this.objNSComp.custom(setting);\r\n        this.__creationHandler();\r\n    };\r\n\r\n    close(): void {\r\n        this.__createComponent();\r\n        this.objNSComp.close();\r\n    };\r\n\r\n    removeModal(): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.removeModal();\r\n        }\r\n        this.__objNSPanel = null;\r\n    };\r\n\r\n    changeButtonStyle(btnIdentifier: any, objStyle: any): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.changeButtonStyle(btnIdentifier, objStyle);\r\n        }\r\n    }\r\n\r\n    getPanel(): any {\r\n        return this.__objNSPanel;\r\n    };\r\n\r\n    private __createComponent(): void {\r\n        if (!this.objNSComp) {\r\n            this.objNSComp = new NSMessageBox(this.setting);\r\n            this.initializeEvents([NSPanel.DRAG_STARTING,\r\n            NSPanel.DRAGGING,\r\n            NSPanel.DRAG_END,\r\n            NSPanel.RESIZE_STARTING,\r\n            NSPanel.RESIZING,\r\n            NSPanel.RESIZE_END,\r\n            NSPanel.COLLAPSE_STARTING,\r\n            NSPanel.COLLAPSE_END,\r\n            NSPanel.EXPANSION_STARTING,\r\n            NSPanel.EXPANSION_END,\r\n            NSPanel.MINIMIZE_STARTING,\r\n            NSPanel.MINIMIZE_END,\r\n            NSPanel.FULLSCREEN_STARTING,\r\n            NSPanel.FULLSCREEN_END,\r\n            NSPanel.RESTORE_STARTING,\r\n            NSPanel.RESTORE_END,\r\n            NSPanel.CLOSED\r\n            ]);\r\n            this.hasInitialized = true;\r\n        }\r\n    };\r\n\r\n    private __customBodyComponent(customEditorComponent: any,mainCallback: any): new () => CustomBodyComponent {\r\n        const parentIns = this;\r\n\r\n        return class extends CustomBodyComponent {\r\n            constructor() {\r\n                super(parentIns, customEditorComponent, mainCallback);\r\n            }\r\n        };\r\n    };\r\n\r\n    private __creationHandler(): void {\r\n        this.__objNSPanel = this.objNSComp.getPanel();\r\n        if (!this.element) {\r\n            this.element = this.__objNSPanel.getBaseElement();\r\n        }\r\n    };\r\n\r\n    private __getComponent(rendererComponent: any, paramCallback?: any, prop?: any): Promise<any> {\r\n        return new Promise((parResolve, parReject) => {\r\n            let params = {};\r\n            if (prop) {\r\n                params = prop;\r\n            }\r\n\r\n            const instance  = this.dynamicComponentService.createComponentRef(rendererComponent, this.dynamicContainer);\r\n            const componentRef = instance;\r\n            const objComponent = this.dynamicComponentService.getInstance(componentRef);\r\n\r\n            /*this.__objCustomComponent = {\r\n                instance: objComponent,\r\n                componentRef: componentRef,\r\n                component: rendererComponent,\r\n                data: params,\r\n            };*/\r\n\r\n            paramCallback && paramCallback(instance, objComponent);\r\n            parResolve({ instance, objComponent, params });\r\n    \r\n            /*const onInstanceCreated = (instance: any, container: HTMLElement | null, portal: React.ReactPortal) => {\r\n                paramCallback && paramCallback(null, instance, container);\r\n                parResolve({ instance, container, portal });\r\n            };\r\n    \r\n            const portal = this.createUpdatedPortal(rendererComponent, params, onInstanceCreated);\r\n            this.setState((prevState: any) => {\r\n                //console.log(\"Previous State:\", prevState);\r\n                this.hasPortalUpdated = true;\r\n                return {\r\n                    dynamicComponents: [...prevState.dynamicComponents, portal],\r\n                };\r\n            });*/\r\n        });\r\n    };\r\n\r\n    /*private customEditor(customEditorComponent: any, mainCallback: (instance: any) => void): any {\r\n        const self: any = this;\r\n        const editor = function(this: any) {\r\n            let componentRef: any;\r\n            let objComponent: any;\r\n\r\n            this.init = async (data: any): Promise<any> => {\r\n                const instance  = await self.dynamicComponentService.createComponentRef(customEditorComponent, self.dynamicContainer);\r\n                componentRef = instance;\r\n                objComponent = self.dynamicComponentService.getInstance(componentRef);\r\n                if (objComponent?.init) {\r\n                    mainCallback(objComponent);\r\n                    objComponent.init(data);\r\n                }\r\n                self.__objCustomComponent = { instance: objComponent, componentRef, component: customEditorComponent, data };\r\n                self.emitRendererComponentCreated(self.__objCustomComponent);\r\n            };\r\n\r\n            this.getElement = () => objComponent?.getElement();\r\n            this.elementAdded = () => objComponent?.elementAdded();\r\n            this.fullScreenChanged = (isFullScreen: boolean) => objComponent?.fullScreenChanged(isFullScreen);\r\n            this.destroy = () => objComponent?.destroy();\r\n        };\r\n\r\n        return editor;\r\n    }*/\r\n\r\n    private __emitRendererComponentCreated(objItem:any)\r\n    {\r\n        this.rendererComponentCreated.emit(objItem);\r\n    };\r\n\r\n}\r\n\r\nclass CustomBodyComponent {\r\n    private objComponent: any = null;\r\n    private componentRef: any = null;\r\n    private containerRef!: HTMLElement;\r\n    private parentInstance: any;\r\n    private customEditorComponent: any;\r\n    private mainCallback: any;\r\n\r\n    constructor(parentInstance: any, customEditorComponent: any, mainCallback: any) {\r\n        this.parentInstance = parentInstance;\r\n        this.customEditorComponent = customEditorComponent;\r\n        this.mainCallback = mainCallback;\r\n    }\r\n\r\n    public init(data: any): Promise<any> {\r\n        return new Promise((parResolve, parReject) => {\r\n            const callback = (dynamicCompRef: MessageBoxComponentRef, localComponentRef: any, container: HTMLElement) => {\r\n                this.componentRef = dynamicCompRef;\r\n                this.containerRef = container;\r\n\r\n                if (localComponentRef) {\r\n                    this.objComponent = localComponentRef[\"component\"] ? localComponentRef[\"component\"] : localComponentRef;\r\n                    this.containerRef = this.objComponent.getElement();\r\n\r\n                    if (this.objComponent && this.objComponent.init) {\r\n                        this.mainCallback && this.mainCallback(this.objComponent);\r\n                        this.objComponent.init(data);\r\n                    }\r\n\r\n                    this.parentInstance.__objCustomComponent = {\r\n                        instance: this.objComponent,\r\n                        componentRef: this.componentRef,\r\n                        component: this.customEditorComponent,\r\n                        data: data,\r\n                    };\r\n\r\n                    this.parentInstance.__emitRendererComponentCreated(this.parentInstance.__objCustomComponent);\r\n                    parResolve(localComponentRef);\r\n                } /*else {\r\n                    this.parentInstance.updateCallbacksOnUpdate.push({\r\n                        callback: callback,\r\n                        dynamicCompRef: dynamicCompRef,\r\n                        container: container,\r\n                        data: data\r\n                    });\r\n                }*/\r\n            };\r\n\r\n            this.parentInstance.__getComponent(this.customEditorComponent, callback, data);\r\n        });\r\n    }\r\n\r\n    public getElement(): HTMLElement {\r\n        return this.containerRef;\r\n    }\r\n\r\n    public elementAdded(): void {\r\n        if (this.objComponent && this.objComponent.elementAdded) {\r\n            this.objComponent.elementAdded();\r\n        }\r\n    }\r\n\r\n    public destroy(): void {\r\n        if (this.objComponent && this.objComponent.destroy) {\r\n            this.objComponent.destroy();\r\n        }\r\n    }\r\n}","//import { DynamicComponentService } from \"../dynamicComponentService/dynamicComponentService\"\r\n\r\nimport {INSPanelSetting, INSPanelDivSetting, INSPanelToolBarDetails, INSPanelToolBarDetailsObject, INSPanelCustomClass, INSPanelMinimizeAddRemoveElementFunction\r\n} from \"../ns-panel/interfaces\";\r\n\r\n////////// Interfaces /////////////////////////////////////////////////////////\r\n\r\nexport type MessageBoxComponentRef = (() => void);\r\n\r\nexport interface INSMessageBoxCallbackFunction {\r\n    (event: any):void;\r\n}\r\n\r\nexport interface INSMessageBoxConfirmButtonSetting{\r\n    label?: string;\r\n    cssClass?: string;\r\n    parentCssClass?: string;\r\n    horizontalAlign?: string;\r\n    initialStyle?: any;\r\n    callback?: INSMessageBoxCallbackFunction;\r\n}\r\n\r\nexport interface INSMessageBoxToolBarDetails extends INSPanelToolBarDetails {\r\n    messageBody?: string;\r\n    messageFooter?: string;\r\n    messageFooterLeft? :string;\r\n    messageFooterRight? :string;\r\n}\r\n\r\nexport interface INSMessageBoxBodyComponent{\r\n     // gets called once after the component is created\r\n    init?(data: any): Promise<any> | void;\r\n    // Return the DOM element of editor which gets added in DOM\r\n    getElement(): HTMLElement;\r\n    //fired when element is added in DOM\r\n    elementAdded?(): void;\r\n    // gets called when editor is being destroyed.Used to do editor cleanup\r\n    destroy?(): void;\r\n}\r\n\r\nexport interface INSMessageBoxSetting extends INSPanelSetting {\r\n    \r\n} \r\n\r\nexport interface INSMessageBoxAlertSetting extends INSMessageBoxSetting {\r\n    bodyContent?: any;\r\n    bodyTemplate?: string;\r\n    bodyTemplateUrl?: string;\r\n    buttonLabel?: string;\r\n    buttonClass?: string;\r\n    parentClass?: string;\r\n    horizontalAlign?: string;\r\n    callback?: INSMessageBoxCallbackFunction;\r\n}\r\n\r\nexport interface INSMessageBoxConfirmSetting extends INSMessageBoxSetting {\r\n    bodyContent?: any;\r\n    bodyTemplate?: string;\r\n    bodyTemplateUrl?: string;\r\n    confirm?: INSMessageBoxConfirmButtonSetting;\r\n    cancel?: INSMessageBoxConfirmButtonSetting;\r\n}\r\n\r\nexport interface INSMessageBoxCustomSetting extends INSMessageBoxSetting {\r\n    bodyContent?: any;\r\n    bodyTemplate?: string;\r\n    bodyTemplateUrl?: string;\r\n    bodyComponent?: any;\r\n    bodyComponentData?: any;\r\n    buttons?: INSMessageBoxConfirmButtonSetting[];\r\n}","import { Component, ViewEncapsulation, OnChanges, OnInit, AfterViewInit, Input, Output, EventEmitter, ElementRef, SimpleChange, DoCheck, KeyValueChangeRecord, ComponentRef, ViewChild, ViewContainerRef } from \"@angular/core\";\r\n\r\nimport { NSBaseComponent } from \"../ns-base\";\r\nimport { GridComponentRef, INSGridCascadeFunction, INSGridColumn, INSGridDetailRendererComponent, INSGridDetailRendererComponentInstance, INSGridDetailRendererComponentParam, INSGridEditorCustomComponentInstance, INSGridEditorCustomComponentSetting, INSGridExtraRowHeaderRendererComponentInstance, INSGridGroupRendererComponentInstance, INSGridHeaderRendererComponentInstance, INSGridMasterDetailSetting, INSGridRendererComponentInstance, INSGridSetting, INSGridToolTipRendererComponentInstance } from \"./interfaces\";\r\nimport { NSDynamicComponentService } from \"../../services\";\r\nimport { AnyCatcher } from \"rxjs/internal/AnyCatcher\";\r\n\r\ndeclare var NSGrid: any;\r\n\r\nexport interface INSGridAngularSetting extends INSGridSetting {\r\n    setting?: INSGridSetting;\r\n    [propName: string]: any;\r\n}\r\n\r\n@Component({\r\n    selector: 'ns-grid-angular',\r\n    template: '<ng-template #dynamicContainer></ng-template>',\r\n    standalone: false,\r\n    styles: [`\r\n        @import \"../../../generated/css/nsComponent.min.css\";\r\n        @import \"../../../generated/css/nsGrid.min.css\";\r\n    `],\r\n    encapsulation: ViewEncapsulation.None,\r\n    providers:[NSDynamicComponentService]\r\n})\r\n\r\nexport class NSGridAngular extends NSBaseComponent<typeof NSGrid> implements OnChanges, OnInit, AfterViewInit, DoCheck\r\n{  \r\n    @ViewChild('dynamicContainer', { read: ViewContainerRef, static: true })\r\n    dynamicContainer!: ViewContainerRef;\r\n    \r\n    @Input() setting: INSGridAngularSetting | undefined | null;\r\n    @Input() set dataSource(arrSource:any[])\r\n    {\r\n        this.__dataSource = arrSource;\r\n        if(this.objNSComp)\r\n        {\r\n            this.__objCustomComponent = {};\r\n            if(this.__dataSource.length > 0)\r\n            {\r\n                this.__hasGridDataSource = true;\r\n            }\r\n            this.objNSComp?.dataSource(arrSource);\r\n        }\r\n    }\r\n    get dataSource(): any[] | undefined\r\n    {\r\n        return this.__dataSource;\r\n    }\r\n  \r\n    @Output() gridRendered:EventEmitter<any> = new EventEmitter();\r\n    @Output() rowSelected:EventEmitter<any> = new EventEmitter();\r\n    @Output() rowUnselected:EventEmitter<any> = new EventEmitter();\r\n    @Output() rowClicked:EventEmitter<any> = new EventEmitter();\r\n    @Output() rowDoubleClicked:EventEmitter<any> = new EventEmitter();\r\n    @Output() rowNavigated:EventEmitter<any> = new EventEmitter();\r\n    @Output() cellSelected:EventEmitter<any> = new EventEmitter();\r\n    @Output() cellUnselected:EventEmitter<any> = new EventEmitter();\r\n    @Output() cellClicked:EventEmitter<any> = new EventEmitter();\r\n    @Output() cellDoubleClicked:EventEmitter<any> = new EventEmitter();\r\n    @Output() sortChanging:EventEmitter<any> = new EventEmitter();\r\n    @Output() sortChanged:EventEmitter<any> = new EventEmitter();\r\n    @Output() advancedFilterClosing:EventEmitter<any> = new EventEmitter();\r\n    @Output() filterChanging:EventEmitter<any> = new EventEmitter();\r\n    @Output() filterChanged:EventEmitter<any> = new EventEmitter();\r\n    @Output() filterResetted:EventEmitter<any> = new EventEmitter();\r\n    @Output() columnResizing:EventEmitter<any> = new EventEmitter();\r\n    @Output() columnResized:EventEmitter<any> = new EventEmitter();\r\n    @Output() columnMoving:EventEmitter<any> = new EventEmitter();\r\n    @Output() columnMoved:EventEmitter<any> = new EventEmitter();\r\n    @Output() rendererComponentCreated:EventEmitter<any> = new EventEmitter();\r\n    @Output() editorCellValueChanged:EventEmitter<any> = new EventEmitter();\r\n\r\n    @Output() detailComponentCreated:EventEmitter<any> = new EventEmitter();\r\n    \r\n    public static readonly GRID_RENDERED = \"gridRendered\";\r\n    public static readonly MULTI_SELECTION_EDITORS_TEXT = \"TEXT\";\r\n    public static readonly MULTI_SELECTION_EDITORS_TEXTAREA = \"TEXTAREA\";\r\n    public static readonly GRID_TYPE_HIERARCHICAL = \"hierarchical\";\r\n    public static readonly GRID_TYPE_GROUP = \"group\";\r\n    public static readonly GRID_TYPE_NORMAL = \"normal\";\r\n    public static readonly GRID_TYPE_MASTER_DETAIL = \"masterdetail\";\r\n    public static readonly PAGINATION_TYPE_SCROLL = \"scroll\";\r\n    public static readonly PAGINATION_TYPE_PAGES = \"pages\";\r\n    public static readonly PAGINATION_MODE_AUTO = \"auto\";\r\n    public static readonly PAGINATION_MODE_MANUAL = \"manual\";\r\n    public static readonly RESPONSIVE_MODE_STACK = \"stack\";\r\n    public static readonly RESPONSIVE_MODE_COLUMN_TOGGLE = \"columnToggle\";\r\n    public static readonly ADVANCED_FILTER_TEXT = \"text\";\r\n    public static readonly ADVANCED_FILTER_NUMBER = \"number\";\r\n    public static readonly ADVANCED_FILTER_LIST = \"list\";\r\n    public static readonly MULTICOLUMN_KEY_SHIFT = \"shift\";\r\n    public static readonly MULTICOLUMN_KEY_CTRL = \"ctrl\";\r\n    public static readonly MULTICOLUMN_KEY_ALT = \"alt\";\r\n    public static readonly NAVIGATION_UP = \"up\";\r\n    public static readonly NAVIGATION_DOWN = \"down\";\r\n    //Editors\r\n    public static readonly EDITOR_EDITTYPE_CELL = \"cell\";\r\n    public static readonly EDITOR_EDITTYPE_ROW = \"row\";\r\n    public static readonly EDITOR_EDITING_SINGLECLICK = \"singleClick\";\r\n    public static readonly EDITOR_EDITING_DOUBLECLICK = \"doubleClick\";\r\n    public static readonly EDITOR_EDITING_NOCLICK = \"noClick\";\r\n    public static readonly EDITOR_TYPE_TEXT = \"text\";\r\n    public static readonly EDITOR_TYPE_TEXTAREA = \"textArea\";\r\n    public static readonly EDITOR_TYPE_CUSTOM = \"custom\";\r\n\r\n    private __dataSource:any[] | undefined;\r\n    private __objCustomComponent: any;\r\n    private __masterDetailRendererInstance!: INSGridDetailRendererComponentInstance[];\r\n    private __hasGridDataSource: boolean = false;\r\n    private __detectSettingChanges: boolean = false;\r\n    private updateCallbacksOnUpdate: any[] = [];\r\n\r\n    private __differ: any;\r\n    private __gridRendered: Promise<boolean> = new Promise<boolean>(resolve => {\r\n            resolve(true);\r\n        }\r\n    );\r\n\r\n    constructor(private dynamicComponentService: NSDynamicComponentService) \r\n    {\r\n        super();\r\n        this.initializeScripts(['NSGrid']);\r\n    };\r\n    \r\n    ngOnInit() : void\r\n    {\r\n    };\r\n  \r\n    ngOnChanges(changes: {[propName: string]: SimpleChange}): void \r\n    {\r\n        if(this.hasInitialized)\r\n        {\r\n            //console.log(changes);\r\n        }\r\n    };\r\n    \r\n    ngDoCheck() \r\n    {\r\n        if(this.__hasGridDataSource)\r\n        {\r\n            if(this.__differ)\r\n            {\r\n                let changes: any = this.__differ.diff(this.setting);\r\n                if(changes) \r\n                {\r\n                    this.__applySettingChanges(changes);\r\n                } \r\n            }\r\n        }\r\n    };\r\n  \r\n    ngAfterViewInit(): void \r\n    {\r\n        if(!this.objNSComp && this.setting)\r\n        {\r\n            let setting:INSGridSetting = this.nsUtil.cloneObject(this.setting,true);\r\n            setting.columns = this.__setColumn(this.setting.columns);\r\n            setting.multiLevelGroupColumn = this.__setColumnObject(this.setting.multiLevelGroupColumn);\r\n            setting.masterDetailSetting = this.__processMasterDetailSetting(setting.masterDetailSetting);\r\n            setting.eventDispatcher = this.__eventDispatcher.bind(this);\r\n            if(this.__dataSource)\r\n            {\r\n                setting[\"dataSource\"] = this.__dataSource;\r\n                if(this.__dataSource.length > 0)\r\n                {\r\n                    this.__hasGridDataSource = true;\r\n                }\r\n            }\r\n            this.__objCustomComponent = {};\r\n            this.objNSComp = new NSGrid(this.element,setting);\r\n            //this.__differ = this.differs.find(this.setting).create(null);\r\n            this.hasInitialized = true;\r\n        }\r\n    };\r\n    \r\n    setHeightOffset(offset : number) : void\r\n    {\r\n        this.objNSComp?.setHeightOffset(offset);\r\n    };\r\n    \r\n    deviceViewChanged(conditionTrue : boolean,queryIndex : number = 0,query : string = \"\") : void\r\n    {\r\n        this.objNSComp?.deviceViewChanged(conditionTrue,queryIndex,query);\r\n    };\r\n    \r\n    setState(data : any): void\r\n    {\r\n        this.objNSComp?.setState(data);\r\n    };\r\n    \r\n    getState(): any\r\n    {\r\n        return this.objNSComp?.getState();\r\n    };\r\n    \r\n    setColumn(arrColumns:INSGridColumn[]): void\r\n    {\r\n        this.objNSComp?.setColumn(this.__setColumn(arrColumns));\r\n    };\r\n    \r\n    setContextMenuSetting(contextMenuSetting:any): void\r\n    {\r\n        this.objNSComp?.setContextMenuSetting(contextMenuSetting);\r\n    };\r\n    \r\n    getOrignalItem(item : any): void\r\n    {\r\n        return this.objNSComp?.getOrignalItem(item);\r\n    };\r\n    \r\n    addRows(source : any[]): void\r\n    {\r\n        this.objNSComp?.addRows(source);\r\n    };\r\n    \r\n    removeRows(arrIndex : any[]): void\r\n    {\r\n        this.objNSComp?.removeRows(arrIndex);\r\n    };\r\n    \r\n    groupBy(groupByField : string): void\r\n    {\r\n        this.objNSComp?.groupBy(groupByField);\r\n    };\r\n    \r\n    expandAll(): void\r\n    {\r\n        this.objNSComp?.expandAll();\r\n    };\r\n    \r\n    collapseAll(): void\r\n    {\r\n        this.objNSComp?.collapseAll();\r\n    };\r\n    \r\n    expandCollapseByRow(element : any,rowIndex : number): void\r\n    {\r\n        this.objNSComp?.expandCollapseByRow(element,rowIndex);\r\n    };\r\n    \r\n    getRowInfo(row : any): any\r\n    {\r\n        return this.objNSComp?.getRowInfo(row);\r\n    };\r\n    \r\n    getCellInfo(cell : any): any\r\n    {\r\n        return this.objNSComp?.getCellInfo(cell);\r\n    };\r\n    \r\n    getItemInfo(objItem : any): any\r\n    {\r\n        return this.objNSComp?.getItemInfo(objItem);\r\n    };\r\n    \r\n    getItemInfoByKeyField(keyFieldValue : string): any\r\n    {\r\n        return this.objNSComp?.getItemInfoByKeyField(keyFieldValue);\r\n    };\r\n    \r\n    cascadeValues(event: any,callBack: INSGridCascadeFunction): void\r\n    {\r\n        this.objNSComp?.cascadeValues(event,callBack);\r\n    };\r\n    \r\n    setFontSize(fontSize: number): void\r\n    {\r\n        this.objNSComp?.setFontSize(fontSize);\r\n    };\r\n    \r\n    addColumn(objColumn: INSGridColumn): void\r\n    {\r\n        this.objNSComp?.addColumn(this.__setColumnObject(objColumn));\r\n    };\r\n    \r\n    changeDeviceView(conditionTrue: boolean): void\r\n    {\r\n        this.objNSComp?.changeDeviceView(conditionTrue);\r\n    };\r\n    \r\n    hideColumn(column: string | Number): boolean\r\n    {\r\n        return this.objNSComp?.hideColumn(column);\r\n    };\r\n    \r\n    showColumn(column: string | Number): boolean\r\n    {\r\n        return this.objNSComp?.showColumn(column);\r\n    };\r\n    \r\n    swapColumns(sourceColumn: INSGridColumn,destinationColumn: INSGridColumn): boolean\r\n    {\r\n        return this.objNSComp?.swapColumns(sourceColumn,destinationColumn);\r\n    };\r\n    \r\n    moveColumn(column: INSGridColumn,toIndex: number): boolean\r\n    {\r\n        return this.objNSComp?.moveColumn(column,toIndex) || false;\r\n    };\r\n    \r\n    sortBy(column: INSGridColumn,isAscending: boolean): void\r\n    {\r\n        this.objNSComp?.sortBy(column,isAscending);\r\n    };\r\n    \r\n    autoResizeColumn(column: INSGridColumn): void\r\n    {\r\n        this.objNSComp?.autoResizeColumn(column);\r\n    };\r\n    \r\n    updateRowByIndex(index: number): void\r\n    {\r\n        this.objNSComp?.updateRowByIndex(index);\r\n    };\r\n    \r\n    updateRowByKeyField(keyFieldValue: any): void\r\n    {\r\n        this.objNSComp?.updateRowByKeyField(keyFieldValue);\r\n    };\r\n    \r\n    updateCellByIndex(index: number,dataField: string): void\r\n    {\r\n        this.objNSComp?.updateCellByIndex(index,dataField);\r\n    };\r\n    \r\n    updateCellByKeyField(keyFieldValue: any,dataField: string): void\r\n    {\r\n        this.objNSComp?.updateCellByKeyField(keyFieldValue,dataField);\r\n    };\r\n    \r\n    updateItemInDataSource(item: any): void\r\n    {\r\n        this.objNSComp?.updateItemInDataSource(item);\r\n    };\r\n    \r\n    getGroupedSource(): any[]\r\n    {\r\n        return this.objNSComp?.getGroupedSource() || [];\r\n    }\r\n    \r\n    setSelectedItems(arrItems: any[]): void\r\n    {\r\n        this.objNSComp?.setSelectedItems(arrItems);\r\n    };\r\n    \r\n    addSelectedItems(arrItems: any[]): void\r\n    {\r\n        this.objNSComp?.addSelectedItems(arrItems);\r\n    };\r\n    \r\n    removeSelectedItems(arrItems: any[]): void\r\n    {\r\n        this.objNSComp?.removeSelectedItems(arrItems);\r\n    };\r\n    \r\n    setSelectedItem(item: any): void\r\n    {\r\n        this.objNSComp?.setSelectedItem(item);\r\n    };\r\n    \r\n    setSelectedIndexes(arrSelectedIndex: number[]): void\r\n    {\r\n        this.objNSComp?.setSelectedIndexes(arrSelectedIndex);\r\n    };\r\n    \r\n    getSelectedIndex(): number\r\n    {\r\n        return this.objNSComp?.getSelectedIndex();\r\n    };\r\n    \r\n    getSelectedItem(): any\r\n    {\r\n        return this.objNSComp?.getSelectedItem();\r\n    };\r\n    \r\n    getSelectedIndexes(): number[]\r\n    {\r\n        return this.objNSComp?.getSelectedIndexes();\r\n    };\r\n    \r\n    getSelectedItems(): any[]\r\n    {\r\n        return this.objNSComp?.getSelectedItems();\r\n    };\r\n    \r\n    deselectAll(): void\r\n    {\r\n        this.objNSComp?.deselectAll();\r\n    };\r\n    \r\n    filter(filter: any,setting: any,enableHighlighting: boolean = false,recordLimit: number = -1): void\r\n    {\r\n        this.objNSComp?.filter(filter,setting,enableHighlighting,recordLimit);\r\n    };\r\n    \r\n    resetFilters(): void\r\n    {\r\n        this.objNSComp?.resetFilters();\r\n    };\r\n    \r\n    getFilteredData(): any[]\r\n    {\r\n        return this.objNSComp?.getFilteredData() || [];\r\n    };\r\n    \r\n    highlightText(dataField: string,text: string): void\r\n    {\r\n        this.objNSComp?.highlightText(dataField,text);\r\n    };\r\n    \r\n    unHighlightText(): void\r\n    {\r\n        this.objNSComp?.unHighlightText();\r\n    };\r\n    \r\n    fixFixedHeader(): void\r\n    {\r\n        this.objNSComp?.fixFixedHeader();\r\n    };\r\n    \r\n    scrollToIndex(selectedIndex: number,animationRequired: boolean = false): void\r\n    {\r\n        this.objNSComp?.scrollToIndex(selectedIndex,animationRequired);\r\n    };\r\n    \r\n    setNoDataMessage(message: string): void\r\n    {\r\n        this.objNSComp?.setNoDataMessage(message);\r\n    };\r\n    \r\n    renderHeaderExtraRows(): void\r\n    {\r\n        this.objNSComp?.renderHeaderExtraRows();\r\n    };\r\n    //Editor related public functions\r\n    editByIndex(index: any,dataField?: string): void\r\n    {\r\n        this.objNSComp?.editByIndex(index,dataField);\r\n    };\r\n    editByKeyField(keyFieldValue: any,dataField?: string): void\r\n    {\r\n        this.objNSComp?.editByKeyField(keyFieldValue,dataField);\r\n    };\r\n    editByItem(item: any,dataField?: string): void\r\n    {\r\n        this.objNSComp?.editByItem(item,dataField);\r\n    };\r\n    editStopByIndex(index: any,dataField?: string,isCancel?:boolean): void\r\n    {\r\n        this.objNSComp?.editStopByIndex(index,dataField,isCancel);\r\n    };\r\n    editStopByKeyField(keyFieldValue: any,dataField?: string,isCancel?:boolean): void\r\n    {\r\n        this.objNSComp?.editStopByKeyField(keyFieldValue,dataField,isCancel);\r\n    };\r\n    editStopByItem(item: any,dataField?: string,isCancel?:boolean): void\r\n    {\r\n        this.objNSComp?.editStopByItem(item,dataField,isCancel);\r\n    };\r\n    getEditorInstances(): any[]\r\n    {\r\n        return this.objNSComp?.getEditorInstances();\r\n    };\r\n    //end of editor related public functions\r\n    setStyle(styleProp: string,value: any): void\r\n    {\r\n        this.objNSComp?.setStyle(styleProp,value);\r\n    };\r\n    \r\n    setFocus(isFocus: boolean): void\r\n    {\r\n        this.objNSComp?.setFocus(isFocus);\r\n    };\r\n    \r\n    hasFocus(): boolean\r\n    {\r\n        return this.objNSComp?.hasFocus() || false;\r\n    };\r\n    \r\n    setTheme(theme: string): void\r\n    {\r\n        this.objNSComp?.setTheme(theme);\r\n    };\r\n    \r\n    changeProperty(propertyName: string,value: any): void\r\n    {\r\n        this.objNSComp?.changeProperty(propertyName,value);\r\n    };\r\n    \r\n    getRendererComponentInstance(columnName:string,rowIndex: number): INSGridRendererComponentInstance | null\r\n    {\r\n        if(this.__objCustomComponent && this.__objCustomComponent[columnName] && this.__objCustomComponent[columnName].length > rowIndex && this.__objCustomComponent[columnName][rowIndex][\"renderer\"])\r\n        {\r\n            return this.__objCustomComponent[columnName][rowIndex][\"renderer\"];\r\n        }\r\n        return null;\r\n    };\r\n    \r\n    getGroupRendererComponentInstance(columnName:string,rowIndex: number): INSGridGroupRendererComponentInstance | null\r\n    {\r\n        if(this.__objCustomComponent && this.__objCustomComponent[columnName] && this.__objCustomComponent[columnName].length > rowIndex && this.__objCustomComponent[columnName][rowIndex][\"groupRenderer\"])\r\n        {\r\n            return this.__objCustomComponent[columnName][rowIndex][\"groupRenderer\"];\r\n        }\r\n        return null;\r\n    };\r\n    \r\n    getHeaderRendererComponentInstance(columnName:string): INSGridHeaderRendererComponentInstance | null\r\n    {\r\n        let rowIndex: number = 0;\r\n        if(this.__objCustomComponent && this.__objCustomComponent[columnName] && this.__objCustomComponent[columnName].length > rowIndex && this.__objCustomComponent[columnName][rowIndex][\"headerRenderer\"])\r\n        {\r\n            return this.__objCustomComponent[columnName][rowIndex][\"headerRenderer\"];\r\n        }\r\n        return null;\r\n    };\r\n    \r\n    getToolTipRendererComponentInstance(columnName:string,rowIndex: number): INSGridToolTipRendererComponentInstance | null\r\n    {\r\n        if(this.__objCustomComponent && this.__objCustomComponent[columnName] && this.__objCustomComponent[columnName].length > rowIndex && this.__objCustomComponent[columnName][rowIndex][\"toolTipRenderer\"])\r\n        {\r\n            return this.__objCustomComponent[columnName][rowIndex][\"toolTipRenderer\"];\r\n        }\r\n        return null;\r\n    };\r\n    \r\n    getExtraRowHeaderRendererComponentInstance(columnName:string,rowIndex: number): INSGridExtraRowHeaderRendererComponentInstance | null\r\n    {\r\n        if(this.__objCustomComponent && this.__objCustomComponent[columnName] && this.__objCustomComponent[columnName].length > rowIndex && this.__objCustomComponent[columnName][rowIndex][\"extraRowHeaderRenderer\"])\r\n        {\r\n            return this.__objCustomComponent[columnName][rowIndex][\"extraRowHeaderRenderer\"];\r\n        }\r\n        return null;\r\n    };\r\n    \r\n    getEditorComponentInstance(columnName:string,rowIndex: number): INSGridEditorCustomComponentInstance | null\r\n    {\r\n        if(this.__objCustomComponent && this.__objCustomComponent[columnName] && this.__objCustomComponent[columnName].length > rowIndex && this.__objCustomComponent[columnName][rowIndex][\"editor\"])\r\n        {\r\n            return this.__objCustomComponent[columnName][rowIndex][\"editor\"];\r\n        }\r\n        return null;\r\n    };\r\n    \r\n    getGrid(): any\r\n    {\r\n        return  this.objNSComp;\r\n    };\r\n    \r\n    private __applySettingChanges(changes: any): void \r\n    {\r\n        if(this.__detectSettingChanges)\r\n        {\r\n            let self: any = this;\r\n            let applyChange: any = function(record: KeyValueChangeRecord<string,any>)\r\n            {\r\n                self.objNSComp.changeProperty(record.key,record.currentValue);\r\n            };\r\n            changes.forEachChangedItem((record: KeyValueChangeRecord<string,any>) => applyChange(record));\r\n            changes.forEachAddedItem((record: KeyValueChangeRecord<string,any>) =>  applyChange(record));\r\n            changes.forEachRemovedItem((record: KeyValueChangeRecord<string,any>) => applyChange(record));\r\n        }\r\n       this.__detectSettingChanges = true;\r\n    };\r\n    \r\n    private __setColumn(arrColumns:INSGridColumn[] | undefined): INSGridColumn[]\r\n    {\r\n        if(arrColumns && arrColumns.length > 0)\r\n        {\r\n            let retValue: INSGridColumn[] = [];\r\n            for (let column of arrColumns)\r\n            {\r\n                retValue.push(this.__setColumnObject(column));\r\n            }\r\n            return retValue;\r\n        }\r\n        return [];\r\n    };\r\n    \r\n    private __setColumnObject(objColumn: INSGridColumn | undefined): INSGridColumn\r\n    {\r\n        if(objColumn)\r\n        {\r\n            let self: any = this;\r\n            if(objColumn.itemRendererComponent)\r\n            {\r\n                objColumn.itemRenderer = function(item: any,dataField: string,index: number,colIndex: number,row: any): any\r\n                {\r\n                    return self.__renderer(objColumn.itemRendererComponent,item,dataField,index,colIndex,row);\r\n                };\r\n            }\r\n            if(objColumn.groupRendererComponent)\r\n            {\r\n                objColumn.groupRenderer = function(item: any,dataField: string,index: number,colIndex: number,row: any,arrChildren: any[],childrenCount: number,arrFlatChildren: any[],groupLevel:number): any\r\n                {\r\n                    return self.__groupRenderer(objColumn.groupRendererComponent,item,dataField,index,colIndex,row,arrChildren,childrenCount,arrFlatChildren,groupLevel);\r\n                };\r\n            }\r\n            if(objColumn.headerRendererComponent)\r\n            {\r\n                objColumn.headerRenderer = function(colItem: INSGridColumn,colIndex: number): any\r\n                {\r\n                    return self.__headerRenderer(objColumn.headerRendererComponent,colItem,colIndex);\r\n                };\r\n            }\r\n            if(objColumn.toolTipRendererComponent)\r\n            {\r\n                objColumn.toolTipRenderer = function(item: any,dataField: string,index: number,colIndex: number,row: any): any\r\n                {\r\n                    return self.__toolTipRenderer(objColumn.toolTipRendererComponent,item,dataField,index,colIndex,row);\r\n                };\r\n            }\r\n            if(objColumn.extraRowHeaderRendererComponent)\r\n            {\r\n                objColumn.extraRowHeaderRenderer = function(dataField: string,colItem: INSGridColumn,arrFilteredGroupedSource: any[],rowIndex: number,colIndex: number,extraHeaderCell: any,extraHeaderRow: any): any\r\n                {\r\n                    return self.__extraRowHeaderRenderer(objColumn.extraRowHeaderRendererComponent,dataField,colItem,arrFilteredGroupedSource,rowIndex,colIndex,extraHeaderCell,extraHeaderRow);\r\n                };\r\n            }\r\n            if(objColumn.editorSetting && objColumn.editorSetting.customEditor)\r\n            {\r\n                objColumn.editorSetting.customEditor = self.__customEditor(objColumn.editorSetting.customEditor,objColumn);\r\n            }\r\n        }\r\n        return objColumn || {};\r\n    };\r\n    \r\n    private __customEditor(customEditorComponent: any,objColumn: INSGridColumn): any\r\n    {\r\n        let self: any = this;\r\n        let __editor: any = function(this: any)\r\n        {\r\n            let objComponent: any = null;\r\n            let componentRef!: ComponentRef<any>;\r\n            \r\n            this.init = function(setting: INSGridEditorCustomComponentSetting): void\r\n            {\r\n                 let index: number = setting.rowIndex;\r\n                 let objRef: any = self.__getComponent(customEditorComponent,objColumn.dataField,index);\r\n                 objComponent = objRef.instance;\r\n                 componentRef = objRef.ref;\r\n                 objComponent.init(setting);\r\n                 let objItem: INSGridEditorCustomComponentInstance = {instance: objComponent,componentRef: componentRef,setting: setting,colItem: objColumn,index: index,colIndex: setting.cellIndex,columnName: objColumn.dataField};\r\n                 //self.__initializeCompInObject(objColumn.dataField, setting.rowIndex);\r\n                 objColumn.dataField && (self.__objCustomComponent[objColumn.dataField][index][\"editor\"] = objItem);\r\n                 self.__emitRendererComponentCreated(objItem);\r\n            };\r\n            this.getElement = function(): HTMLElement\r\n            {\r\n                return self.__getElement(componentRef);\r\n            };\r\n            this.elementAdded = function(): void\r\n            {\r\n                if(objComponent && objComponent.elementAdded)\r\n                {\r\n                    objComponent.elementAdded();\r\n                }\r\n            };\r\n            this.handleKeyDown = function(event: any,keyCode: any): void\r\n            {\r\n                if(objComponent && objComponent.handleKeyDown)\r\n                {\r\n                    objComponent.handleKeyDown(event,keyCode);\r\n                }\r\n            };\r\n            this.getValue = function(): any\r\n            {\r\n                return objComponent.getValue();\r\n            };\r\n            this.destroy = function(): void\r\n            {\r\n                if(objComponent && objComponent.destroy)\r\n                {\r\n                    objComponent.destroy();\r\n                }\r\n            };\r\n            this.setFocus = function(): void\r\n            {\r\n                objComponent.setFocus();\r\n            };\r\n            this.hasFocus = function(): any\r\n            {\r\n                if(objComponent && objComponent.hasFocus)\r\n                {\r\n                    return objComponent.hasFocus();\r\n                }\r\n                return null;\r\n            };\r\n            this.hasValueChanged = function(currentValue: any): any\r\n            {\r\n                if(objComponent && objComponent.hasValueChanged)\r\n                {\r\n                    return objComponent.hasValueChanged(currentValue);\r\n                }\r\n                return null;\r\n            };\r\n            this.validate = function(): any\r\n            {\r\n                if(objComponent && objComponent.validate)\r\n                {\r\n                    return objComponent.validate();\r\n                }\r\n                return null;\r\n            };\r\n            this.isPopUp = function(): boolean\r\n            {\r\n                if (objComponent && objComponent.isPopUp) {\r\n                    return objComponent.isPopUp();\r\n                }\r\n                return false;\r\n            };\r\n            this.save = function(): void\r\n            {\r\n                if(objComponent && objComponent.save)\r\n                {\r\n                    objComponent.save();\r\n                }\r\n            };\r\n            this.cancel = function(): void\r\n            {\r\n                if(objComponent && objComponent.cancel)\r\n                {\r\n                    objComponent.cancel();\r\n                }\r\n            };\r\n            this.setPopUpWrapper = function(popUpWrapper: HTMLElement): void\r\n            {\r\n                if(objComponent && objComponent.setPopUpWrapper)\r\n                {\r\n                    objComponent.setPopUpWrapper(popUpWrapper);\r\n                }\r\n            };\r\n        };\r\n        \r\n        return __editor;\r\n    };\r\n    \r\n    private __renderer(rendererComponent: any,item: any,dataField: string,index: number,colIndex: number,row: any): any\r\n    {\r\n        if(item)\r\n        {\r\n            let objRef: any = this.__getComponent(rendererComponent,dataField,index);\r\n            let objComponent: any = objRef.instance;\r\n            objComponent.setData(item,dataField,index,colIndex,row);\r\n            this.__callAfterSetData(objRef.ref);\r\n            let objItem: INSGridRendererComponentInstance = {instance: objComponent,componentRef: objRef.ref,item: item,index: index,colIndex: colIndex,columnName: dataField};\r\n            this.__objCustomComponent[dataField][index][\"renderer\"] = objItem;\r\n            //this.__initializeCompInObject(dataField, index);\r\n            this.__emitRendererComponentCreated(objItem);\r\n            return this.__getElement(objRef.ref);//objComponent.getElement();\r\n        }\r\n        return null;\r\n    };\r\n    \r\n    private __groupRenderer(rendererComponent: any,item: any,dataField: string,index: number,colIndex: number,row: any,arrChildren: any[],childrenCount: number,arrFlatChildren: any[],groupLevel:number): any\r\n    {\r\n        if(item)\r\n        {\r\n            let objRef: any = this.__getComponent(rendererComponent,dataField,index);\r\n            let objComponent: any = objRef.instance;\r\n            objComponent.setData(item,dataField,index,colIndex,row,arrChildren,childrenCount,arrFlatChildren,groupLevel);\r\n            this.__callAfterSetData(objRef.ref);\r\n            let objItem:INSGridGroupRendererComponentInstance = {instance: objComponent,componentRef: objRef.ref,item: item,index: index,colIndex: colIndex,columnName: dataField};\r\n            this.__objCustomComponent[dataField][index][\"groupRenderer\"] = objItem;\r\n            this.__emitRendererComponentCreated(objItem);\r\n            return this.__getElement(objRef.ref);//objComponent.getElement();\r\n        }\r\n        return null;\r\n    };\r\n    \r\n    private __headerRenderer(rendererComponent: any,colItem: INSGridColumn,colIndex: number): any\r\n    {\r\n        if(colItem)\r\n        {\r\n            let dataField : string = colItem.dataField || '';\r\n            let index : number = 0;\r\n            let objRef: any = this.__getComponent(rendererComponent,dataField,index);\r\n            let objComponent: any = objRef.instance;\r\n            objComponent.setData(colItem,colIndex);\r\n            this.__callAfterSetData(objRef.ref);\r\n            let objItem: INSGridHeaderRendererComponentInstance = {instance: objComponent,componentRef: objRef.ref,index: index,colItem: colItem,colIndex: colIndex};\r\n            this.__objCustomComponent[dataField][index][\"headerRenderer\"] = objItem;\r\n            this.__emitRendererComponentCreated(objItem);\r\n            return this.__getElement(objRef.ref);//objComponent.getElement();\r\n        }\r\n        return null;\r\n    };\r\n    \r\n    private __toolTipRenderer(rendererComponent: any,item: any,dataField: string,index: number,colIndex: number,row: any): any\r\n    {\r\n        if(item)\r\n        {\r\n            let objRef: any = this.__getComponent(rendererComponent,dataField,index);\r\n            let objComponent: any = objRef.instance;\r\n            objComponent.setData(item,dataField,index,colIndex,row);\r\n            this.__callAfterSetData(objRef.ref);\r\n            let objItem: INSGridToolTipRendererComponentInstance = {instance: objComponent,componentRef: objRef.ref,item: item,index: index,colIndex: colIndex,columnName: dataField};\r\n            this.__objCustomComponent[dataField][index][\"toolTipRenderer\"] = objItem;\r\n            this.__emitRendererComponentCreated(objItem);\r\n            return this.__getElement(objRef.ref);\r\n        }\r\n        return null;\r\n    };\r\n    \r\n    private __extraRowHeaderRenderer(rendererComponent: any,dataField: string,colItem: INSGridColumn,filteredDataSource: any[],index: number,colIndex: number,extraHeaderCell: any,extraHeaderRow: any): any\r\n    {\r\n        if(colItem)\r\n        {\r\n            let objRef: any = this.__getComponent(rendererComponent,dataField,index);\r\n            let objComponent: any = objRef.instance;\r\n            objComponent.setData(dataField,colItem,filteredDataSource,index,colIndex,extraHeaderCell,extraHeaderRow);\r\n            this.__callAfterSetData(objRef.ref);\r\n            let objItem: INSGridExtraRowHeaderRendererComponentInstance = {instance: objComponent,componentRef: objRef.ref,colItem: colItem,index: index,colIndex: colIndex,columnName: dataField};\r\n            this.__objCustomComponent[dataField][index][\"extraRowHeaderRenderer\"] = objItem;\r\n            this.__emitRendererComponentCreated(objItem);\r\n            return this.__getElement(objRef.ref);\r\n        }\r\n        return null;\r\n    };\r\n\r\n    private __processMasterDetailSetting(masterDetailSetting: INSGridMasterDetailSetting | undefined): INSGridMasterDetailSetting | undefined {\r\n        if(masterDetailSetting) {\r\n            if(masterDetailSetting.detailRenderer) {\r\n                masterDetailSetting.detailRenderer = this.__customDetailComponent(masterDetailSetting.detailRenderer);\r\n            }\r\n        }\r\n        return masterDetailSetting;\r\n    }\r\n\r\n    private __customDetailComponent(detailRenderer: INSGridDetailRendererComponent): new () => INSGridDetailRendererComponent {\r\n        const parentIns = this;\r\n\r\n        return class extends NSGridCustomDetailRenderer {\r\n            constructor() {\r\n                super(parentIns, detailRenderer);\r\n            }\r\n        };\r\n    }    \r\n    \r\n    private __getComponent(rendererComponent: any,dataField: string | null, index: number, paramCallback?: any, prop?: any): any\r\n    {\r\n        let componentRef: ComponentRef<any> = this.dynamicComponentService.createComponentRef(rendererComponent, this.dynamicContainer);\r\n        let objComponent: any = this.dynamicComponentService.getInstance(componentRef);\r\n        if(dataField) {\r\n            this.__initializeCompInObject(dataField, index);\r\n        }\r\n        return {ref: componentRef,instance: objComponent};\r\n    };\r\n\r\n    private __initializeCompInObject(dataField: string,index: number) {\r\n        if(!this.__objCustomComponent[dataField])\r\n        {\r\n            this.__objCustomComponent[dataField] = [];\r\n        }\r\n        if(!this.__objCustomComponent[dataField][index])\r\n        {\r\n            this.__objCustomComponent[dataField][index] = {};\r\n        }\r\n    }\r\n\r\n    private __eventDispatcher(eventType: string,data: any,param: any,bubbles: boolean= true,cancelable: boolean= false): void\r\n    {\r\n        if(!this.hasDestroyed)\r\n        {\r\n            let eventEmitter: any = <EventEmitter<any>> (<any>this)[eventType];\r\n            if (eventEmitter) \r\n            {\r\n                let event: any = {eventName: eventType,detail: data};\r\n                if(param)\r\n                {\r\n                     for (let key in param) \r\n                     {\r\n                         if(param.hasOwnProperty(key)) \r\n                         {\r\n                             event[key] = param[key];\r\n                         } \r\n                     }   \r\n                }\r\n                if (eventType === \"gridRendered\") \r\n                {\r\n                    this.__gridRendered.then((result => {\r\n                        eventEmitter.emit(event);\r\n                    }));\r\n                } \r\n                else \r\n                {\r\n                    eventEmitter.emit(event);\r\n                }\r\n            } \r\n            else \r\n            {\r\n                console.debug(eventType + \" is not dispatched by NS-GRID Angular\");\r\n            }\r\n        }  \r\n    };\r\n\r\n    private __emitRendererComponentCreated(objItem:any)\r\n    {\r\n        this.rendererComponentCreated.emit(objItem);\r\n    };\r\n    \r\n    private __callAfterSetData(componentRef: ComponentRef<any>): void\r\n    {\r\n        componentRef.changeDetectorRef.detectChanges();\r\n    };\r\n    \r\n    private __getElement(componentRef: ComponentRef<any>): any\r\n    {\r\n        return componentRef.location.nativeElement;\r\n    };\r\n}\r\n\r\nclass NSGridCustomDetailRenderer implements INSGridDetailRendererComponent {\r\n    private objComponent: any = null;\r\n    private componentRef: any = null;\r\n    private containerRef!: HTMLElement;\r\n    private parentIns: any;\r\n    private detailRenderer: INSGridDetailRendererComponent;\r\n\r\n    constructor(parentIns: any, detailRenderer: INSGridDetailRendererComponent) {\r\n        this.parentIns = parentIns;\r\n        this.detailRenderer = detailRenderer;\r\n    }\r\n\r\n    public init(param: INSGridDetailRendererComponentParam): Promise<any> {\r\n        return new Promise((parResolve, parReject) => {\r\n            const callback = (dynamicCompRef: GridComponentRef, localComponentRef: any, container: HTMLElement | null) => {\r\n                this.componentRef = dynamicCompRef;\r\n                //this.containerRef = container;\r\n\r\n                if (localComponentRef) {\r\n                    this.objComponent = localComponentRef[\"component\"] ? localComponentRef[\"component\"] : localComponentRef;\r\n                    if(this.objComponent.getElement) {\r\n                        this.containerRef = this.objComponent.getElement();\r\n                    }\r\n                    else {\r\n                        this.containerRef = this.componentRef.location.nativeElement;\r\n                    }\r\n\r\n                    if (this.objComponent && this.objComponent.init) {\r\n                        this.objComponent.init(param);\r\n                    }\r\n\r\n                    const objItem: INSGridDetailRendererComponentInstance = {\r\n                        instance: this.objComponent,\r\n                        componentRef: dynamicCompRef,\r\n                        param: param\r\n                    };\r\n\r\n                    this.parentIns.__masterDetailRendererInstance[param.rowIndex] = objItem;\r\n                    this.parentIns.detailComponentCreated.emit(objItem);\r\n                    parResolve(dynamicCompRef);\r\n                } else {\r\n                    const objItem: INSGridDetailRendererComponentInstance = {\r\n                        instance: null,\r\n                        componentRef: this.componentRef,\r\n                        param: param\r\n                    };\r\n\r\n                    this.parentIns.__masterDetailRendererInstance[param.rowIndex] = objItem;\r\n                    this.parentIns.updateCallbacksOnUpdate.push({\r\n                        callback: callbackSent,\r\n                        dynamicCompRef: dynamicCompRef,\r\n                        container: container,\r\n                        objItem: objItem\r\n                    });\r\n                }\r\n            };\r\n\r\n            const callbackSent = callback.bind(this); // Ensure `this` refers to Renderer instance\r\n            if (!this.parentIns.__masterDetailRendererInstance) {\r\n                this.parentIns.__masterDetailRendererInstance = [];\r\n            }\r\n            /*let objRef: any = self.__getComponent(customEditorComponent,objColumn.dataField,index);\r\n                 objComponent = objRef.instance;\r\n                 componentRef = objRef.ref;*/\r\n            const objRef: any = this.parentIns.__getComponent(this.detailRenderer, null, -1, callbackSent, param);\r\n            callbackSent(objRef.ref, objRef.instance, null);\r\n        });\r\n    }\r\n\r\n    public getElement(): HTMLElement {\r\n        return this.containerRef;\r\n    }\r\n\r\n    public elementAdded(params: INSGridDetailRendererComponentParam): void {\r\n        if (this.objComponent && this.objComponent.elementAdded) {\r\n            this.objComponent.elementAdded(params);\r\n        }\r\n    }\r\n\r\n    public renderEverytime(params: INSGridDetailRendererComponentParam): boolean {\r\n        if (this.objComponent && this.objComponent.renderEverytime) {\r\n            return this.objComponent.renderEverytime(params);\r\n        }\r\n        return true;\r\n    }\r\n\r\n    public destroy(): void {\r\n        if (this.objComponent && this.objComponent.destroy) {\r\n            this.objComponent.destroy();\r\n        }\r\n    }\r\n};","//import { DynamicComponentService } from \"../dynamicComponentService/dynamicComponentService\"\r\n\r\n////////// Interfaces /////////////////////////////////////////////////////////\r\n\r\n//export type GridComponentRef = DynamicComponentService | (() => void);\r\nexport type GridComponentRef = (() => void);\r\n\r\nexport interface INSGridCascadeFunction {\r\n    (control : any,childControl : any,item : any,dataField: string,cellIndex: number,colItem : any,childCell: any,row : any):void;\r\n}\r\n\r\nexport interface INSGridFilterRendererFunction {\r\n    (colItem: INSGridColumn,colIndex: number,cell: any,row: any):any;\r\n}\r\n\r\nexport interface INSGridAdvancedFilterHandler {\r\n    (dataField:string,nsPopUp: any,advancedFilterSetting: any,rendererID: string,enableApply: boolean,createApplySectionCallback: any,advanceFilterGridCallback: any,removePopUpCallback: any):void;\r\n}\r\n\r\nexport interface INSGridGroupRendererFunction {\r\n    (item: any,dataField: string,index: number,colIndex: number,row: any,arrChildren: any[],childrenCount: number,arrFlatChildren: any[],groupLevel:number): string | any;\r\n}\r\n\r\nexport interface INSGridItemRendererFunction {\r\n    (item: any,dataField: string,index: number,colIndex: number,row: any): string | any;\r\n}\r\n\r\nexport interface INSGridLabelFunction {\r\n    (item: any,dataField: string,colItem: INSGridColumn):string;\r\n}\r\n\r\nexport interface INSGridToolTipRendererFunction {\r\n    (item: any,dataField: string,index: number,colIndex: number,row: any):string;\r\n}\r\n\r\nexport interface INSGridTemplateSetDataFunction {\r\n    (cellElement: any, item: any,dataField: string,colItem: INSGridColumn,row: any):void;\r\n}\r\n\r\nexport interface INSGridHeaderRendererFunction {\r\n    (colItem: INSGridColumn,colIndex: number): string | any;\r\n}\r\n\r\nexport interface INSGridExtraRowHeaderRendererFunction {\r\n    (dataField: string,colItem: INSGridColumn,arrFilteredGroupedSource: any[],rowIndex: number,colIndex: number,extraHeaderCell: any,extraHeaderRow: any): string | any;\r\n}\r\n\r\nexport interface INSGridContextMenuProviderFunction {\r\n    (item: any, colIndex: number,rowIndex: number): any;\r\n}\r\n\r\nexport interface INSGridPaginationFetchRecordFunction {\r\n    (fromRecord: number, toRecord: number,pageSize: number): void;\r\n}\r\n\r\nexport interface INSGridFilterFunction {\r\n    (item: any,filter: any,setting: any,isHierarchical: boolean,childField: string,parentItem: any): any;\r\n}\r\n\r\nexport interface INSGridHierarchyFilterChildrenFunction {\r\n    (item: any,index: number,isMatch: boolean,filter: any,setting: any,parentItem: any): boolean;\r\n}\r\n\r\nexport interface INSGridRowMoverDropEndHandlerFunction {\r\n    (row: any,targetTable: any,targetRow: any): any;\r\n}\r\n\r\nexport interface INSGridEditorValidatorFunction {\r\n    (element: any,value: any): boolean;\r\n}\r\n\r\nexport interface INSGridEditorIsCellEditableFunction {\r\n    (colItem: INSGridColumn,item: any,colIndex: number,row: any,rowIndex: number): boolean;\r\n}\r\n\r\nexport interface INSGridEditorAPICommitChangesFunction {\r\n    (): void;\r\n}\r\n\r\nexport interface INSGridEditorAPICancelChangesFunction {\r\n    (): void;\r\n}\r\n\r\nexport interface INSGridOnDemandChildFetchCallbackFunction {\r\n    (item: any,rowIndex: number,rowLevel: number,event: any): void;\r\n}\r\n\r\nexport interface INSEventDispatcherFunction {\r\n    (eventType: string,data: any,param: any,bubbles?: boolean,cancelable?: boolean): void;\r\n}\r\n\r\nexport interface INSGridCustomClassSetting {\r\n    outerContainer?: string,\r\n    titleBar?: string,\r\n    headerRow?: string,\r\n    headerCell?: string,\r\n    filterRow?: string,\r\n    filterCell?: string,\r\n    bodyRow?: string,\r\n     //for Hierarchies and Grouping grid\r\n    firstBodyColumn?: string,\r\n    nonFirstBodyColumn?: string\r\n}\r\n\r\nexport interface INSGridMultiCellSelectionSetting {\r\n    scrollableElement?: any,\r\n    enableFillHandle?: boolean,\r\n    enableKeyboardNavigation?: boolean,\r\n    enableCopy?: boolean,\r\n    enablePaste?: boolean,\r\n    cellClass?: string,\r\n    areaClass?: string,\r\n    areaClassLeft?: string,\r\n    areaClassRight?: string,\r\n    areaClassTop?: string,\r\n    areaClassBottom?: string\r\n}\r\n\r\n\r\nexport interface INSGridFilterSetting {\r\n    filterRenderer?: INSGridFilterRendererFunction,\r\n    filterTemplate?: string,\r\n    enableAdvancedFilter?: boolean,\r\n    advancedFilterType?: string,\r\n    advancedFilterHandler?: INSGridAdvancedFilterHandler,\r\n    advancedFilterPopUpPos?: string,\r\n    [propName: string]: any;\r\n}\r\n\r\nexport interface INSGridColumnCustomIcon {\r\n    menu?: string,\r\n    filter?: string,\r\n    sortAscending?: string,\r\n    sortDescending?: string,\r\n    columnMove?: string\r\n}\r\n\r\nexport interface INSGridCustomIcon extends INSGridColumnCustomIcon {\r\n    exportButton?: string,\r\n    rowExpanded?: string,\r\n    rowCollapsed?: string\r\n}\r\n\r\nexport interface INSGridEditorSetting {\r\n    editType?: string,//can be EDITOR_EDITTYPE_CELL,EDITOR_EDITTYPE_ROW\r\n    clickType?: string,// can be EDITOR_EDITING_SINGLECLICK,EDITOR_EDITING_DOUBLECLICK,EDITOR_EDITING_NOCLICK\r\n    stopEditingOnGridFocusOut?: boolean, // if true then grids stops editing when focus is out of grid\r\n    enableMultipleEdit?: boolean // if true then grid allows multiple edits\r\n}\r\n\r\nexport interface INSGridColumnEditorSetting {\r\n    type?: string, // can be EDITOR_TYPE_TEXT,EDITOR_TYPE_TEXTAREA,EDITOR_TYPE_CUSTOM\r\n    params?: any,// any param to the editor. Properties will differ according to editors\r\n    customEditor?: any,\r\n    validator?: INSGridEditorValidatorFunction,\r\n    isCellEditableCallback?: INSGridEditorIsCellEditableFunction\r\n}\r\n\r\nexport interface INSGridMasterDetailSetting {\r\n    hasChildField?: string;\r\n    hasChildCallback?: (item: any) => void;\r\n    detailColumns?: INSGridColumn; //detail grid column\r\n    detailDataSourceCallback: (params: any) => void;\r\n    detailGridSetting?: INSGridColumnEditorSetting;//detail grid setting\r\n    gridRefreshEverytimeCallback?: (params: any) => boolean; //callback to tell if detail grid needs to be rendered everytime the master is expanded\r\n    gridHtmlCallback?: (params: any) => string; //returns html with a container having attribute \"detailGrid\" in which the detail grid will be rendered\r\n    detailRenderer?: INSGridDetailRendererComponent | any; //any for functional component\r\n    detailRendererParam?: any;\r\n    detailHeight?: number;\r\n}\r\n\r\nexport interface INSGridDetailRendererComponent {\r\n    init: (params: INSGridDetailRendererComponentParam) => Promise<any>;\r\n    getElement?: () => HTMLElement;\r\n    elementAdded?: (params: INSGridDetailRendererComponentParam) => void;\r\n    renderEverytime?: (params: INSGridDetailRendererComponentParam) => boolean;\r\n    destroy?: () => void;\r\n}\r\n\r\nexport interface INSGridDetailRendererComponentParam {\r\n    masterData: any;\r\n    container: HTMLElement;\r\n    cell: HTMLTableCellElement;\r\n    row: HTMLTableRowElement;\r\n    rowIndex: number;\r\n    [propName: string]: any;\r\n}\r\n\r\nexport interface INSGridEditorCustomComponentSetting {\r\n    cell: any,\r\n    row: any,\r\n    item: any,\r\n    rowIndex: number,\r\n    cellIndex: number,\r\n    position: any,\r\n    defaultValue: any,\r\n    commitChanges: INSGridEditorAPICommitChangesFunction,\r\n    cancelChanges: INSGridEditorAPICancelChangesFunction,\r\n    validator: INSGridEditorValidatorFunction,\r\n    setting: INSGridColumnEditorSetting,\r\n    column: INSGridColumn,\r\n    //grid instance\r\n    api: any\r\n}\r\n\r\nexport interface INSGridRendererComponentInstance\r\n{\r\n    instance: INSGridRendererComponent | null,\r\n    componentRef: GridComponentRef, \r\n    item: any,\r\n    index: number,\r\n    colIndex: number,\r\n    columnName: string;\r\n}\r\n\r\nexport interface INSGridDetailRendererComponentInstance\r\n{\r\n    instance: INSGridDetailRendererComponent | null,\r\n    componentRef: GridComponentRef,\r\n    param: INSGridDetailRendererComponentParam\r\n}\r\n\r\nexport interface INSGridRendererComponent \r\n{\r\n    setData(item: any,dataField: string,index: number,colIndex: number,row: any): void;\r\n}\r\n\r\nexport interface INSGridGroupRendererComponentInstance\r\n{\r\n    instance: INSGridGroupRendererComponent | null,\r\n    componentRef: GridComponentRef,\r\n    item: any,\r\n    index: number,\r\n    colIndex: number,\r\n    columnName: string;\r\n}\r\n\r\nexport interface INSGridGroupRendererComponent\r\n{\r\n    setData(item: any,dataField: string,index: number,colIndex: number,row: any,arrChildren: any[],childrenCount: number,arrFlatChildren: any[],groupLevel:number): void;\r\n}\r\n\r\nexport interface INSGridHeaderRendererComponentInstance\r\n{\r\n    instance: INSGridHeaderRendererComponent | null,\r\n    componentRef: GridComponentRef,\r\n    index: number,\r\n    colItem: INSGridColumn,\r\n    colIndex: number\r\n}\r\n\r\nexport interface INSGridHeaderRendererComponent\r\n{\r\n    setData(colItem: INSGridColumn,colIndex: number): void;\r\n}\r\n\r\nexport interface INSGridToolTipRendererComponentInstance\r\n{\r\n    instance: INSGridToolTipRendererComponent | null,\r\n    componentRef: GridComponentRef,\r\n    item: any,\r\n    index: number,\r\n    colIndex: number,\r\n    columnName: string;\r\n}\r\n\r\nexport interface INSGridToolTipRendererComponent\r\n{\r\n    setData(item: any,dataField: string,index: number,colIndex: number,row: any): void;\r\n}\r\n\r\nexport interface INSGridExtraRowHeaderRendererComponentInstance\r\n{\r\n    instance: INSGridExtraRowHeaderRendererComponent | null,\r\n    componentRef: GridComponentRef,\r\n    colItem: INSGridColumn,\r\n    index: number,\r\n    colIndex: number,\r\n    columnName: string;\r\n}\r\n\r\nexport interface INSGridExtraRowHeaderRendererComponent\r\n{\r\n    setData(dataField: string,colItem: INSGridColumn,filteredDataSource: any[],index: number,colIndex: number,extraHeaderCell: any,extraHeaderRow: any): void;\r\n}\r\n\r\nexport interface INSGridEditorCustomComponentInstance\r\n{\r\n    instance: INSGridEditorCustomComponent | null,\r\n    componentRef: any;//GridComponentRef,\r\n    setting: INSGridEditorCustomComponentSetting,\r\n    colItem: INSGridColumn,\r\n    index: number,\r\n    colIndex: number,\r\n    columnName: string | undefined;\r\n}\r\n\r\nexport interface INSGridEditorCustomComponent\r\n{\r\n     // gets called once after the editor is created\r\n    init(setting: INSGridEditorCustomComponentSetting): Promise<any> | void;\r\n    // Return the DOM element of editor which gets added in DOM\r\n    getElement(): HTMLElement;\r\n    //fired when element is added in DOM\r\n    elementAdded?(): void;\r\n    //fired when a key was pressed. can be used if component is preventing event propagation.\r\n    handleKeyDown?(event: any,keyCode: any): void;\r\n    // Should return the final value to the grid, the result of the editing\r\n    getValue(): any;\r\n    // gets called when editor is being destroyed.Used to do editor cleanup\r\n    destroy?(): void;\r\n    // gets called when editor is on focus. used when element added in dom and the element which should have focus is different\r\n    setFocus(): void;\r\n    // gets called when grid checks if editor has focus. used when element added in dom and the element which should have focus is different\r\n    hasFocus?(): boolean;\r\n    // gets called when grid wants the current editor value. used when element added in dom and the element which should have focus is different\r\n    hasValueChanged?(currentValue: any): boolean\r\n    // gets called when grid has to commit value.If the validate function returns false then editor value is not committed and editor is not destroyed.\r\n    validate?() : boolean;\r\n    // gets called at the start to figure out whether the editor is popUp or not.\r\n    isPopUp() : boolean;\r\n    // gets called when editor has to save the value. should be used when user wants to manipulate the value before save\r\n    save?(): void;\r\n    // gets called when editor has to cancel the value. should be used when user wants to manipulate the value before cancel\r\n    cancel?(): void;\r\n    setPopUpWrapper?(popUpWrapper: any): void;\r\n}\r\n\r\nexport interface INSGridColumn {\r\n    dataField?: string,\r\n    headerText?: string,\r\n    width?: any;\r\n    sortable?: boolean;\r\n    sortDescending?: boolean;\r\n    truncateToFit?: boolean;\r\n    headerTruncateToFit?: boolean;\r\n    sortField?: string;\r\n    resizable?: boolean;\r\n    draggable?: boolean;\r\n    autoSize?: boolean;\r\n    showMenu?: boolean;\r\n    minWidth?: number,\r\n    groupRenderer?: INSGridGroupRendererFunction,\r\n    groupRendererComponent?: any,\r\n    groupRendererComponentProps?: any,\r\n    itemRenderer?: INSGridItemRendererFunction,\r\n    itemRendererComponent?: any,\r\n    itemRendererComponentProps?: any,\r\n    template?: string,\r\n    setData?: INSGridTemplateSetDataFunction,\r\n    labelFunction?: INSGridLabelFunction,\r\n    headerRenderer?: INSGridHeaderRendererFunction,\r\n    headerRendererComponent?: any,\r\n    headerRendererComponentProps?: any,\r\n    headerTemplate?: string,\r\n    toolTipField?: string,\r\n    toolTipRenderer?: INSGridToolTipRendererFunction,\r\n    toolTipRendererComponent?: any,\r\n    toolTipRendererComponentProps?: any,\r\n    extraRowHeaderRenderer?: INSGridExtraRowHeaderRendererFunction,\r\n    extraRowHeaderRendererComponent?: any,\r\n    extraRowHeaderRendererComponentProps?: any,\r\n    priority?: number ,\r\n    hideable?: boolean,\r\n    /*****filter related ***********/\r\n    enableFilter?: boolean,\r\n    filter?: INSGridFilterSetting,\r\n    /*****editor related ***********/\r\n    enableEditable?: boolean,\r\n    editorSetting?: INSGridColumnEditorSetting,\r\n    icons?: INSGridColumnCustomIcon,\r\n    [propName: string]: any;\r\n}\r\n\r\nexport interface INSGridSetting {\r\n    nsTitle?: string,\r\n    type?: string,\r\n    context?: any,\r\n    enableMouseHover?: boolean,\r\n    enableMultipleSelection?: boolean,\r\n    enableKeyboardNavigation?: boolean,\r\n    enableColumnMouseHover?: boolean,\r\n    childField?: string,\r\n    rowKeyField?: string,\r\n    groupByField?: string,\r\n    columnMinWidth?: number,\r\n    customScrollerRequired?: boolean,\r\n    columnResizable?: boolean,\r\n    columnDraggable?: boolean,\r\n    columnSortable?: boolean,\r\n    columnAutoSize?: boolean,\r\n    enablePagination?: boolean,\r\n    paginationType?: string,\r\n    paginationMode?: boolean,\r\n    enableAsyncLoadPagination?: boolean,\r\n    pageSize?: number,\r\n    totalRecords?: number,\r\n    paginationFetchRecordCallBack?: INSGridPaginationFetchRecordFunction,\r\n    enableContextMenu?: boolean,\r\n    contextMenuProvider?: INSGridContextMenuProviderFunction,\r\n    enableFilter?: boolean,\r\n    filterFunction?: INSGridFilterFunction,\r\n    hierarchyFilterChildrenFunction?: INSGridHierarchyFilterChildrenFunction,\r\n    enableAdvancedFilter?: boolean,\r\n    enableVirtualScroll?: boolean,\r\n    enableDataRefreshOnScrollEnd?: boolean,\r\n    dataRefreshfireDelay?: number,\r\n    bottomPercentageForAddRows?: number,\r\n    enableServerCall?: boolean,\r\n    rowHeight?: number,\r\n    enableExport?: boolean,\r\n    exportFileName?: boolean,\r\n    enableResponsive?: boolean,\r\n    enableRowSelection?: boolean,\r\n    enableCellSelection?: boolean,\r\n    enableMultiCellSelection?: boolean,\r\n    responsiveMode?: string,\r\n    noDataMessage?: string,\r\n    leftFixedColumn?: number,\r\n    rightFixedColumn?: number,\r\n    enableFixedColumnAnimation?: boolean,\r\n    enableRowMove?: boolean,\r\n    isSameTableMove?: boolean,\r\n    rowMoverDropEndHandler?: INSGridRowMoverDropEndHandlerFunction,\r\n    renderInCachedMode?: boolean,\r\n    enableVariableRowHeight?: boolean,\r\n    enableToolTipForTruncateText?: boolean,\r\n    heightOffset?: number,\r\n    enableMultiSort?: boolean,\r\n    multiColumnKey?: string,\r\n    dataSource?: any[],\r\n    columns?: INSGridColumn[] | undefined,\r\n    headerExtraRowCount?: number,\r\n    customClass?: INSGridCustomClassSetting,\r\n    theme?: string,\r\n    showExpandCollapseIcon?: boolean,\r\n    multiCellSelectionSetting?: INSGridMultiCellSelectionSetting,\r\n    isSingleLevelGrouping?: boolean,\r\n    multiLevelGroupColumn?: INSGridColumn | undefined,\r\n    enableEditable?: boolean,\r\n    editorSetting?: INSGridEditorSetting,\r\n    //isPopUp should be true if the grid is used in cases like autocomplete so that componentResized is called multiple times so that width is adjusted properly\r\n    isPopUp?: boolean,\r\n    //eventDispatcher to support different frameworks \r\n    eventDispatcher?: INSEventDispatcherFunction,\r\n    enableOnDemandHierarchy?: boolean,\r\n    onDemandChildDetectionField?: string,\r\n    onDemandChildFetchCallback?: INSGridOnDemandChildFetchCallbackFunction,\r\n    icons?: INSGridCustomIcon,\r\n    enableColumnSetting?: boolean,\r\n    masterDetailSetting?: INSGridMasterDetailSetting,\r\n    [propName: string]: any;\r\n}","import { ScriptLoaderService } from \"../../script-loader.service\";\r\nimport { NSBaseComponent } from \"../ns-base\";\r\nimport { INSTabNavigatorSetting } from \"./interfaces\";\r\n\r\nimport { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChange, ViewEncapsulation } from \"@angular/core\";\r\n\r\ndeclare var NSTabNavigator: any;\r\n\r\nexport interface INSTabNavigatorAngularSetting extends INSTabNavigatorSetting {\r\n    setting?: INSTabNavigatorSetting;\r\n    [propName: string]: any;\r\n}\r\n\r\n@Component({\r\n    selector: 'ns-tab-navigator-angular',\r\n    template: '',\r\n    standalone: false,\r\n    styles: [`\r\n        @import \"../../../generated/css/nsTabNavigator.min.css\";\r\n    `],\r\n    encapsulation: ViewEncapsulation.None\r\n})\r\n\r\nexport class NSTabNavigatorAngular extends NSBaseComponent<typeof NSTabNavigator> implements OnChanges, OnInit, AfterViewInit {\r\n    @Input() setting: INSTabNavigatorAngularSetting | null | undefined;\r\n\r\n    @Output() tabChangeStarting: EventEmitter<any> = new EventEmitter();\r\n    @Output() tabChanged: EventEmitter<any> = new EventEmitter();\r\n    @Output() tabChangeEnd: EventEmitter<any> = new EventEmitter();\r\n\r\n    constructor() {\r\n        super();\r\n        this.initializeScripts(['NSTabNavigator']);\r\n    };\r\n\r\n    ngOnInit(): void {\r\n        this.initializeEvents([NSTabNavigator.TAB_CHANGE_STARTING,\r\n            NSTabNavigator.TAB_CHANGED,\r\n            NSTabNavigator.TAB_CHANGE_END]);\r\n       \r\n       this.create();\r\n    };\r\n\r\n    ngOnChanges(changes: { [propName: string]: SimpleChange }): void {\r\n        \r\n    };\r\n\r\n    ngAfterViewInit(): void {\r\n    };\r\n\r\n    create(): void {\r\n        if (!this.objNSComp && this.setting) {\r\n            this.objNSComp = new NSTabNavigator(this.element, this.setting);\r\n            this.hasInitialized = true;\r\n        }\r\n    };\r\n}","import { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChange, ViewEncapsulation } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { INSHorizontalNavigationMenu, INSHorizontalNavigationSetting } from \"./interfaces\";\r\nimport { NSBaseComponent } from \"../ns-base\";\r\n\r\ndeclare var NSHorizontalNavigation: any;\r\n\r\nexport interface INSHorizontalNavigationAngularSettings extends INSHorizontalNavigationSetting {\r\n    setting?: INSHorizontalNavigationSetting;\r\n    [propName: string]: any;\r\n}\r\n\r\n@Component({\r\n    selector: 'ns-horizontal-navigation-angular',\r\n    template: '',\r\n    standalone: false,\r\n    styles: [`\r\n        @import \"../../../generated/css/nsHorizontalNavigation.min.css\";\r\n    `],\r\n    encapsulation: ViewEncapsulation.None\r\n})\r\nexport class NSHorizontalNavigationAngular extends NSBaseComponent<typeof NSHorizontalNavigation> implements OnChanges, OnInit, AfterViewInit {\r\n    @Input() setting!: INSHorizontalNavigationAngularSettings;\r\n    @Input() dataSource: INSHorizontalNavigationMenu[] = [];\r\n\r\n    @Output() navigationMenuSelected: EventEmitter<any> = new EventEmitter();\r\n\r\n    constructor(private router: Router) {\r\n        super();\r\n        this.initializeScripts(['NSHorizontalNavigation']);\r\n    }\r\n\r\n    ngOnChanges(changes: { [propName: string]: SimpleChange }): void {\r\n        if (changes['dataSource'] && this.objNSComp) {\r\n            this.objNSComp.dataSource(this.dataSource);\r\n            this.__manageDataSource();\r\n        }\r\n    }\r\n\r\n    ngOnInit(): void {\r\n        if (!this.objNSComp) {\r\n            this.initializeEvents([NSHorizontalNavigation.NAVIGATION_MENU_SELECTED]);\r\n            const container = this.element;\r\n            this.setting.dataSource = this.dataSource;\r\n            this.objNSComp = new NSHorizontalNavigation(container, this.setting);\r\n            this.__manageDataSource();\r\n            this.hasInitialized = true;\r\n        }\r\n    }\r\n\r\n    ngAfterViewInit(): void {}\r\n\r\n    selectMenu(itemOrElement: any): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.selectMenu(itemOrElement);\r\n        }\r\n    }\r\n\r\n    setDataSource(source: INSHorizontalNavigationMenu[]): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.dataSource(source);\r\n            this.__manageDataSource();\r\n        }\r\n    }\r\n\r\n    setStyle(styleProp: string, value: any): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.setStyle(styleProp, value);\r\n        }\r\n    }\r\n\r\n    setFocus(isFocus: boolean): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.setFocus(isFocus);\r\n        }\r\n    }\r\n\r\n    hasFocus(): boolean {\r\n        return this.objNSComp?.hasFocus() || false;\r\n    }\r\n\r\n    setTheme(theme: string): void {\r\n        if (this.objNSComp) {\r\n            this.objNSComp.setTheme(theme);\r\n        }\r\n    }\r\n\r\n    private __manageDataSource(): void {\r\n        if (this.dataSource?.length > 0) {\r\n            for (let source of this.dataSource) {\r\n                this.__manageDataSourceItem(source);\r\n            }\r\n        }\r\n    }\r\n\r\n    private __manageDataSourceItem(item: INSHorizontalNavigationMenu): void {\r\n        if (item) {\r\n            if (item.childMenus?.length) {\r\n                for (let childMenu of item.childMenus) {\r\n                    this.__manageDataSourceItem(childMenu);\r\n                }\r\n            } else {\r\n                item[\"click\"] = this.__menuClickHandler.bind(this);\r\n            }\r\n        }\r\n    }\r\n\r\n    private __menuClickHandler(event: any, item: INSHorizontalNavigationMenu): void {\r\n        if (item) {\r\n            let navigateAction = true;\r\n            if (item.onClick) {\r\n                navigateAction = item.onClick(event, item);\r\n            }\r\n            if (this.router && navigateAction && (item.href || item[\"link\"])) {\r\n                const newRoute = item.href || item[\"link\"];\r\n                const formattedRoute = newRoute.startsWith('/') ? newRoute : `/${newRoute}`;\r\n                this.router.navigate([formattedRoute]);\r\n            } else {\r\n                console.log('Navigation is not available');\r\n            }\r\n        }\r\n    }\r\n}\r\n","import { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewEncapsulation } from \"@angular/core\";\r\nimport { NSBaseComponent } from \"../ns-base\";\r\nimport { INSEditorSetting } from \"./interfaces\";\r\n\r\ndeclare var NSEditor: any;\r\n\r\nexport interface INSEditorAngularSetting extends INSEditorSetting {\r\n    setting?: INSEditorSetting;\r\n    [propName: string]: any;\r\n}\r\n\r\n@Component({\r\n    selector: 'ns-editor-angular',\r\n    template: '',\r\n    standalone: false,\r\n    styles: [`\r\n        @import \"../../../generated/css/nsEditor.min.css\";\r\n    `],\r\n    encapsulation: ViewEncapsulation.None\r\n})\r\nexport class NSEditorAngular extends NSBaseComponent<typeof NSEditor> implements OnInit, OnChanges, AfterViewInit {\r\n    @Input() setting!: INSEditorAngularSetting;\r\n    @Input() containerStyle: any = {};\r\n\r\n    @Output() maximized: EventEmitter<any> = new EventEmitter();\r\n    @Output() restored: EventEmitter<any> = new EventEmitter();\r\n\r\n\r\n    constructor() {\r\n        super();\r\n        this.initializeScripts(['NSEditor']);\r\n    }\r\n\r\n    ngOnInit(): void {\r\n        if (!this.objNSComp) {\r\n            this.initializeEvents([\r\n                NSEditor.EVENT_MAXIMIZED,\r\n                NSEditor.EVENT_RESTORED,\r\n            ]);\r\n            this.create();\r\n            this.hasInitialized = true;\r\n        }\r\n    }\r\n\r\n    ngAfterViewInit(): void { }\r\n\r\n    ngOnChanges(changes: SimpleChanges): void { }\r\n\r\n    create(): void {\r\n        const container = this.element;\r\n        this.objNSComp = new NSEditor(container, this.setting);\r\n        this.hasInitialized = true;\r\n    }\r\n\r\n    toggleLineNumber(): void {\r\n        this.objNSComp.toggleLineNumber();\r\n    }\r\n\r\n    setDisabled(isDisabled: boolean): void {\r\n        this.objNSComp.setDisabled(isDisabled);\r\n    }\r\n\r\n    getDisabled(): boolean {\r\n        return this.objNSComp.getDisabled();\r\n    }\r\n\r\n    setText(text: string): void {\r\n        this.objNSComp.setText(text);\r\n    }\r\n\r\n    getText(): string {\r\n        return this.objNSComp.getText();\r\n    }\r\n\r\n    setHtml(html: string): void {\r\n        this.objNSComp.setHtml(html);\r\n    }\r\n\r\n    getHtml(): string {\r\n        return this.objNSComp.getHtml();\r\n    }\r\n\r\n    setStyle(styleProp: string, value: any): void {\r\n        this.objNSComp.setStyle(styleProp, value);\r\n    }\r\n\r\n    setFocus(isFocus: boolean): void {\r\n        this.objNSComp.setFocus(isFocus);\r\n    }\r\n\r\n    hasFocus(): boolean {\r\n        return this.objNSComp.hasFocus();\r\n    }\r\n\r\n    setTheme(theme: string): void {\r\n        this.objNSComp.setTheme(theme);\r\n    }\r\n\r\n    changeProperty(propertyName: string, value: any): void {\r\n        this.objNSComp.changeProperty(propertyName, value);\r\n    }\r\n\r\n    getNSEditor(): any {\r\n        return this.objNSComp;\r\n    }\r\n}\r\n","import {\r\n  Component,\r\n  Input,\r\n  Output,\r\n  ElementRef,\r\n  EventEmitter,\r\n  ViewEncapsulation,\r\n  ViewChild,\r\n  OnInit,\r\n  OnDestroy,\r\n  AfterViewInit,\r\n  forwardRef\r\n} from '@angular/core';\r\n\r\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { INSNumericTextBoxSetting } from './interfaces';\r\nimport { NSBaseComponent } from '../ns-base';\r\n\r\ndeclare var NSNumericTextBox: any;\r\n\r\nexport interface INSNumericTextBoxAngularSetting extends INSNumericTextBoxSetting {\r\n  setting?: INSNumericTextBoxSetting;\r\n  [propName: string]: any;\r\n}\r\n\r\n@Component({\r\n  selector: 'ns-numeric-textbox-angular',\r\n  template: `<input type=\"text\" [disabled]=\"disabled\" #txtRef>`,\r\n  standalone: false,\r\n  providers: [\r\n    {\r\n      provide: NG_VALUE_ACCESSOR,\r\n      useExisting: forwardRef(() => NSNumericTextBoxAngular),\r\n      multi: true\r\n    },\r\n  ],\r\n  styles: [`\r\n    @import \"../../../generated/css/nsNumericTextBox.min.css\";\r\n`],\r\n  encapsulation: ViewEncapsulation.None\r\n})\r\nexport class NSNumericTextBoxAngular extends NSBaseComponent<typeof NSNumericTextBox> implements OnInit, AfterViewInit, ControlValueAccessor {\r\n\r\n  @Input() set setting(value: INSNumericTextBoxAngularSetting | null | undefined) {\r\n    this.__setting = value;\r\n    if(value && this.__input) {\r\n      value.input = this.__input.nativeElement;\r\n      this.objNSComp = new NSNumericTextBox(value);\r\n      this.hasInitialized = true;\r\n    }\r\n  }\r\n  get setting(): INSNumericTextBoxAngularSetting | null | undefined {\r\n      return this.__setting;\r\n  }\r\n\r\n  @ViewChild('txtRef', { static: false }) private __input!: ElementRef;\r\n\r\n  @Input() disabled: boolean = false;\r\n  @Input() __setting: INSNumericTextBoxAngularSetting | undefined | null;\r\n\r\n  @Output() modelChanged = new EventEmitter<any>();\r\n  @Output() formatValueChanged = new EventEmitter<any>();\r\n  @Output() spin = new EventEmitter<any>();\r\n  @Output() valueChanged = new EventEmitter<any>();\r\n\r\n  private __onChange!: (value: any) => void;\r\n  private __onTouch!: () => void;\r\n  private __pendingValue: any | undefined;\r\n\r\n  constructor() {\r\n    super();\r\n    this.initializeScripts(['NSNumericTextBox']);\r\n  }\r\n\r\n  ngOnInit(): void {\r\n    this.initializeEvents([NSNumericTextBox.SPIN,\r\n      NSNumericTextBox.VALUE_CHANGED\r\n    ]);\r\n  }\r\n\r\n  ngAfterViewInit(): void {\r\n    if(this.setting && this.__input && !this.objNSComp) {\r\n      const setting = this.setting;\r\n      setting.input = this.__input.nativeElement;\r\n      this.objNSComp = new NSNumericTextBox(setting);\r\n      if (this.__pendingValue !== undefined) {\r\n        this.setValue(this.__pendingValue, false);\r\n        this.__pendingValue = undefined;\r\n      }\r\n      this.hasInitialized = true;\r\n    }\r\n  }\r\n\r\n  writeValue(value: any): void {\r\n    if (this.objNSComp) {\r\n      this.setValue(value, false);\r\n    } else {\r\n      this.__pendingValue = value;\r\n    }\r\n  }\r\n\r\n  registerOnChange(fn: any): void {\r\n    this.__onChange = fn;\r\n  }\r\n\r\n  registerOnTouched(fn: any): void {\r\n    this.__onTouch = fn;\r\n  }\r\n\r\n  getTextBox(): ElementRef {\r\n    return this.__input;\r\n  }\r\n\r\n  setValue(text: any, fireEvent: boolean): void {\r\n    this.objNSComp.setValue(text, fireEvent);\r\n  }\r\n\r\n  getValue(): number {\r\n    return this.objNSComp.getValue();\r\n  }\r\n\r\n  getFormattedValue(): string {\r\n    return this.objNSComp.getFormattedValue();\r\n  }\r\n\r\n  setTheme(theme: string): void {\r\n    this.objNSComp.setTheme(theme);\r\n  }\r\n\r\n  protected override eventListener(event: any,eventName: string): void {\r\n    if (event.type === NSNumericTextBox.VALUE_CHANGED) {\r\n      const newValue = event.detail.newValue;\r\n      if (this.__onChange) {\r\n        this.__onChange(newValue);\r\n        this.__onTouch();\r\n        this.modelChanged.emit(newValue);\r\n        this.formatValueChanged.emit(this.getFormattedValue());\r\n      }\r\n    }\r\n    super.eventListener(event, eventName);\r\n  }\r\n}  ","import { Directive, ElementRef, inject } from '@angular/core';\r\nimport { ScriptLoaderService } from '../../script-loader.service';\r\nimport { HttpClient } from '@angular/common/http';\r\n\r\ndeclare var NSUtil: any;\r\n\r\n@Directive({\r\n    selector: '[nsBaseDirective]',\r\n    standalone: false,\r\n})\r\nexport abstract class NSBaseDirective {\r\n    protected scriptLoader: ScriptLoaderService = inject(ScriptLoaderService);\r\n    private elementRef: ElementRef = inject(ElementRef);\r\n    private http: HttpClient = inject(HttpClient);\r\n    protected element!: HTMLElement;\r\n    protected nsUtil: typeof NSUtil;\r\n    protected arrEvents: string[] = [];\r\n\r\n    constructor() {\r\n        this.element = this.elementRef.nativeElement;\r\n        this.nsUtil = new NSUtil();\r\n    }\r\n\r\n    getElement(): HTMLElement {\r\n        return this.element;\r\n    }\r\n\r\n    protected initializeScripts(compName: string[]): void {\r\n        this.scriptLoader.embedScripts(compName);\r\n    }\r\n\r\n    protected initializeEvents(arrEvents: string[]): void {\r\n        this.arrEvents = arrEvents;\r\n        this.addEvents();\r\n    }\r\n\r\n    protected addEvents(): void {\r\n        for (const eventName of this.arrEvents) {\r\n            this.nsUtil.addEvent(this.element, eventName, ((eventNameParam: string) => {\r\n                return (event: any) => {\r\n                    event.stopPropagation();\r\n                    event.stopImmediatePropagation();\r\n                    this.eventListener(event, eventNameParam);\r\n                };\r\n            })(eventName));\r\n        }\r\n    }\r\n\r\n    protected eventListener(event: any, eventName: string): void {\r\n        // To be overridden by child directives\r\n        console.warn(`Event listener triggered for event: ${eventName}`, event);\r\n    }\r\n\r\n    protected injectCSS(cssString: string, styleId?: string): void {\r\n        if(cssString && (!styleId || !document.getElementById(styleId))) {\r\n            const styleElement = document.createElement('style');\r\n            if(styleId) {\r\n                styleElement.id = styleId;\r\n            }\r\n            styleElement.textContent = cssString;\r\n            document.head.appendChild(styleElement);\r\n        }\r\n    }\r\n\r\n    protected loadCSS(cssPath: string): void {\r\n        const resolvedPath = this.getLibraryCssPath(cssPath);\r\n        this.http.get(resolvedPath, { responseType: 'text' }).subscribe(\r\n          (cssContent) => {\r\n            const style = document.createElement('style');\r\n            style.textContent = cssContent;\r\n            document.head.appendChild(style);\r\n          },\r\n          (error) => {\r\n            console.error('Failed to load CSS file:', error);\r\n          }\r\n        );\r\n      }\r\n      \r\n      protected getLibraryCssPath(relativePath: string): string {\r\n        const basePath = this.getBaseLibraryPath();\r\n        return `${basePath}/${relativePath}`;\r\n      }\r\n      \r\n      protected getBaseLibraryPath(): string {\r\n        const scripts = document.getElementsByTagName('script');\r\n        for (let i = 0; i < scripts.length; i++) {\r\n          const src = scripts[i].src;\r\n          if (src.includes('ns-components-angular')) {\r\n            return src.substring(0, src.lastIndexOf('/'));\r\n          }\r\n        }\r\n        return '';\r\n      }\r\n}\r\n","import { Directive, Input } from '@angular/core';\r\nimport { INSTableRowMoverSetting } from './interfaces';\r\nimport { NSBaseDirective } from '../ns-base-directive';\r\n\r\ndeclare var NSTableRowMover: any;\r\n\r\nconst cssDraggable: string = `\r\n                                .nsDraggableRow{\r\n                                }\r\n                                .nsDraggableRow.nsDraggableRowDrag\r\n                                {\r\n                                    cursor: move;\t\r\n                                }\r\n                                .nsDraggableCloneRow{\r\n                                    background: #FFF;\r\n                                    position: absolute;\r\n                                }\r\n                                .nsDraggableCloneRow > table {\r\n                                    border-collapse: collapse;\r\n                                }\r\n\r\n                                .nsDraggableCloneRow > table,.nsDraggableCloneRow > th,.nsDraggableCloneRow > td {\r\n                                    border: 1px solid black;\r\n                                }\r\n                                .nsDraggingRow {\r\n                                    box-shadow:3px 5px 6px -4px rgba(0,0,0,0.8);\r\n                                }\r\n                                .nsDraggingRow > td {\r\n                                    position:relative;\r\n                                    z-index: 9999;\r\n                                }\r\n                                .nsDraggingRow > td:first-child::before {\r\n                                    border-top-left-radius:5px;\r\n                                    border-bottom-left-radius:5px;\r\n                                }\r\n                                .nsDraggingRow > td:last-child::before {\r\n                                    border-top-right-radius:5px;\r\n                                    border-bottom-right-radius:5px;\r\n                                }\r\n                                .nsDraggingRow > td::before {\r\n                                    background-color:white;\r\n                                    box-shadow:3px 5px 6px -4px rgba(0,0,0,0.8);\r\n                                    display:block;\r\n                                    padding:0 9px 0 0;\r\n                                    content:'';\r\n                                    position:absolute;\r\n                                    left:0;\r\n                                    top:0;\r\n                                    z-index:-1;\r\n                                    width:100%;\r\n                                    height:100%;\r\n                                }\r\n                                .nsDottedRow > td:first-child \r\n                                {\r\n                                    border-left: 2px dotted red!important;\r\n                                }\r\n                                .nsDottedRow > td\r\n                                {\r\n                                    border-top: 2px dotted red!important;\r\n                                    border-bottom: 2px dotted red!important;\r\n                                }\r\n                                .nsDottedRow > td:last-child \r\n                                {\r\n                                    border-right: 2px dotted red!important;\r\n                                }\r\n                                .nsTableRowMoverGhost {\r\n                                    background: #e5e5e5;\r\n                                    border: 1px solid black;\r\n                                    cursor: move;\r\n                                    font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\r\n                                    font-size: 14px;\r\n                                    line-height: 1.4;\r\n                                    overflow: hidden;\r\n                                    padding: 3px;\r\n                                    position: absolute;\r\n                                    text-overflow: ellipsis;\r\n                                    -webkit-user-select: none;\r\n                                    -moz-user-select: none;\r\n                                    -ms-user-select: none;\r\n                                    user-select: none;\r\n                                    background: white;\r\n                                    border-radius: 2px;\r\n                                    box-shadow: none;\r\n                                    padding: 4px;\r\n                                    border: 1px solid #BDC3C7;\r\n                                    color: rgba(0, 0, 0, 0.54);\r\n                                    font-weight: 600;\r\n                                    font-size: 12px;\r\n                                    font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;\r\n                                    height: 32px !important;\r\n                                    line-height: 32px;\r\n                                    margin: 0;\r\n                                    padding: 0 8px;\r\n                                    transform: translateY(8px);\r\n                                    z-index: 10000;\r\n                                }\r\n                                .nsTableRowMoverAnimation {\r\n                                    position: absolute;\r\n                                    -webkit-transition: top 0.4s, height 0.4s, background-color 0.1s, opacity 0.2s, -webkit-transform 0.4s;\r\n                                    transition: top 0.4s, height 0.4s, background-color 0.1s, opacity 0.2s, -webkit-transform 0.4s;\r\n                                    transition: transform 0.4s, top 0.4s, height 0.4s, background-color 0.1s, opacity 0.2s;\r\n                                    transition: transform 0.4s, top 0.4s, height 0.4s, background-color 0.1s, opacity 0.2s, -webkit-transform 0.4s;\r\n                                }`;\r\n\r\n\r\nexport interface INSTableRowMoverAngularSetting extends INSTableRowMoverSetting {\r\n}\r\n\r\n@Directive({\r\n    selector: '[nsTableRowMoverAngular]',\r\n    standalone: false\r\n})\r\nexport class NSTableRowMoverAngularDirective extends NSBaseDirective {\r\n    private __objNSTableRowMover: typeof NSTableRowMover | null = null;\r\n    private __setting: INSTableRowMoverAngularSetting | undefined;\r\n\r\n    @Input()\r\n    set setting(value: INSTableRowMoverAngularSetting) {\r\n        this.__setting = value;\r\n        if (this.__setting) {\r\n            this.__create();\r\n        }\r\n    }\r\n    get setting(): INSTableRowMoverAngularSetting {\r\n        return this.__setting!;\r\n    }\r\n\r\n    constructor() {\r\n        super();\r\n        this.initializeScripts(['NSTableRowMover']);\r\n        this.injectCSS(cssDraggable, 'ns-table-row-mover-angular-style');\r\n    }\r\n\r\n    ngOnInit(): void {\r\n        //this.loadCSS('../../../generated/css/nsComponent.min.css');\r\n        //this.loadCSS('node_modules/ns-components-angular/generated/css/nsComponent.min.css');\r\n    }\r\n\r\n    ngOnDestroy(): void {\r\n        this.remove();\r\n    }\r\n\r\n    processRows(): void {\r\n        if (this.__objNSTableRowMover) {\r\n            this.__objNSTableRowMover.processRows();\r\n        }\r\n    }\r\n\r\n    remove(): void {\r\n        if (this.__objNSTableRowMover) {\r\n            this.__objNSTableRowMover.remove();\r\n            this.__objNSTableRowMover = null;\r\n        }\r\n    }\r\n\r\n    private __create(): void {\r\n        if (!this.__objNSTableRowMover && this.__setting) {\r\n            this.__setting.table = this.getElement();\r\n            this.__objNSTableRowMover = new NSTableRowMover(this.__setting);\r\n        }\r\n    }\r\n}\r\n","import { NSExpressionEvaluatorCode } from '../../../embedded/nsExpressionEvaluator';\r\n\r\ndeclare var NSExpressionEvaluator: any;\r\n\r\nexport class NSExpressionEvaluatorAngular {\r\n    private evaluator: any;\r\n\r\n    constructor(private settings?: any) {\r\n        this.loadScript();\r\n        this.instantiateEvaluator();\r\n    }\r\n\r\n    private loadScript(): void {\r\n        if (!(window as any).NSExpressionEvaluator) {\r\n            const name = 'NSExpressionEvaluator';\r\n            const code = NSExpressionEvaluatorCode;\r\n            const script = document.createElement('script');\r\n            const sourceURL = '\\n\\n//# sourceURL=' + name + '.js';\r\n            script.textContent = code + sourceURL;\r\n            script.id = 'script-' + name;\r\n            document.head.appendChild(script);\r\n        }\r\n    }\r\n\r\n    private instantiateEvaluator(): void {\r\n        if ((window as any).NSExpressionEvaluator) {\r\n            this.evaluator = new NSExpressionEvaluator(this.settings);\r\n        } else {\r\n            setTimeout(() => this.instantiateEvaluator(), 0);\r\n        }\r\n    }\r\n\r\n    evaluate(expression: string, model: any): any {\r\n        return this.evaluator.evaluate(expression, model);\r\n    }\r\n\r\n    setExpression(expression: string): void {\r\n        this.evaluator.setExpression(expression);\r\n    }\r\n}\r\n\r\n\r\n/*export class NSExpressionEvaluatorAngular {\r\n  private evaluator: any;\r\n\r\n  constructor(private settings?: any) {\r\n    this.loadScript();\r\n  }\r\n\r\n  private loadScript(): void {\r\n    if(!(window as any).NSExpressionEvaluator) {\r\n        const name = 'NSExpressionEvaluator';\r\n        const code = NSExpressionEvaluatorCode;\r\n        const script = document.createElement('script');\r\n        const sourceURL = \"\\n\\n//# sourceURL=\" + name + \".js\";\r\n        script.textContent = code + sourceURL;\r\n        script.id = \"script-\" + name;\r\n        document.head.appendChild(script);\r\n    }\r\n    this.evaluator = new NSExpressionEvaluator(this.settings);\r\n  }\r\n\r\n  evaluate(expression: string, model: any): any {\r\n    return this.evaluator.evaluate(expression, model);\r\n  }\r\n\r\n  setExpression(expression: string): void {\r\n    this.evaluator.setExpression(expression);\r\n  }\r\n}*/\r\n","import { NgModule } from '@angular/core';\r\n\r\nimport { NSNavigationAngular, NSTextBoxAngular, NSMultiSelectDropdownAngular, NSPanelAngular, NSCalendarAngular, NSDatePickerAngular, \r\n  NSDashboardAngular, NSDynamicComponentService, NSGridAngular, NSMessageBoxAngular, \r\n  NSTableRowMoverAngularDirective} from '../public-api';\r\nimport { NSTabNavigatorAngular } from './components/ns-tab-navigator/ns-tab-navigator-angular.component';\r\nimport { NSHorizontalNavigationAngular } from './components/ns-horizontal-navigation';\r\nimport { NSEditorAngular } from './components/ns-editor/ns-editor-angular.component';\r\nimport { NSNumericTextBoxAngular } from './components/ns-numeric-textbox';\r\n\r\nconst components = [\r\n  NSTextBoxAngular,\r\n  NSNavigationAngular,\r\n  NSMultiSelectDropdownAngular,\r\n  NSPanelAngular,\r\n  NSCalendarAngular,\r\n  NSDatePickerAngular,\r\n  NSDashboardAngular,\r\n  NSMessageBoxAngular,\r\n  NSGridAngular,\r\n  NSTabNavigatorAngular,\r\n  NSHorizontalNavigationAngular,\r\n  NSEditorAngular,\r\n  NSNumericTextBoxAngular,\r\n  NSTableRowMoverAngularDirective \r\n];\r\n\r\n@NgModule({\r\n    declarations: [...components],\r\n    imports: [],\r\n    exports: [...components],\r\n    providers: [\r\n      NSDynamicComponentService\r\n    ]\r\n  })\r\n  export class NSComponentsModule { }","/*\r\n * Public API Surface of ns-components-angular\r\n */\r\n\r\n\r\n\r\nexport * from './lib/components/ns-textbox';\r\nexport * from './lib/components/ns-navigation';\r\nexport * from './lib/components/ns-multiselect-dropdown';\r\nexport * from './lib/components/ns-panel';\r\nexport * from './lib/components/ns-calendar';\r\nexport * from './lib/components/ns-datepicker';\r\nexport * from './lib/components/ns-dashboard';\r\nexport * from './lib/components/ns-messagebox';\r\nexport * from './lib/components/ns-grid';\r\nexport * from './lib/components/ns-tab-navigator';\r\nexport * from './lib/components/ns-horizontal-navigation';\r\nexport * from './lib/components/ns-editor';\r\nexport * from './lib/components/ns-numeric-textbox';\r\nexport * from './lib/services';\r\n\r\n//directives\r\nexport * from './lib/directives/ns-table-row-mover';\r\n\r\n//utils\r\nexport * from './lib/utils/ns-expression-evaluator';\r\n\r\nexport * from './lib/ns-components.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NSDynamicComponentService"],"mappings":";;;;;;AAAO,MAAM,UAAU,GAAG,sipOAAsipO;;ACAzjpO,MAAM,mBAAmB,GAAG,4ogBAA4ogB;;ACAxqgB,MAAM,cAAc,GAAG,6+aAA6+a;;ACApgb,MAAM,YAAY,GAAG,gr1DAAgr1D;;ACArs1D,MAAM,aAAa,GAAG,4wUAA4wU;;ACAlyU,MAAM,UAAU,GAAG,u9jCAAu9jC;;ACA1+jC,MAAM,aAAa,GAAG,s6yLAAs6yL;;ACA57yL,MAAM,gBAAgB,GAAG,6uoEAA6uoE;;ACAtwoE,MAAM,WAAW,GAAG,wxpDAAwxpD;;ACA5ypD,MAAM,gBAAgB,GAAG,822BAA822B;;ACAv42B,MAAM,yBAAyB,GAAG,mohBAAmohB;;ACArqhB,MAAM,yBAAyB,GAAG,igvDAAigvD;;ACAnivD,MAAM,cAAc,GAAG,sl+DAAsl+D;;ACA7m+D,MAAM,eAAe,GAAG,40gEAA40gE;;ACAp2gE,MAAM,0BAA0B,GAAG,4pZAA4pZ;;ACA/rZ,MAAM,oBAAoB,GAAG,ohhCAAohhC;;ACAjjhC,MAAM,gBAAgB,GAAG,opaAAopa;;ACA7qa,MAAM,iBAAiB,GAAG,6tYAA6tY;;ACAvvY,MAAM,kBAAkB,GAAG,orsEAAorsE;;ACA/ssE,MAAM,mBAAmB,GAAG,294BAA294B;;ACAv/4B,MAAM,mBAAmB,GAAG,qm8BAAqm8B;;ACAjo8B,MAAM,WAAW,GAAG,88GAA88G;;ACAl+G,MAAM,SAAS,GAAG,ivkDAAivkD;;ACAnwkD,MAAM,aAAa,GAAG,iplBAAiplB;;ACAvqlB,MAAM,kBAAkB,GAAG,8rUAA8rU;;ACAztU,MAAM,gBAAgB,GAAG,ykxDAAykxD;;ACAlmxD,MAAM,gBAAgB,GAAG,8xpLAA8xpL;;ACAvzpL,MAAM,YAAY,GAAG,4uoYAA4uoY;;ACAjwoY,MAAM,UAAU,GAAG,y90xBAAy90xB;;ACA5+0xB,MAAM,UAAU,GAAG,4qxNAA4qxN;;ACA/rxN,MAAM,gBAAgB,GAAG,ixjEAAixjE;;ACA1yjE,MAAM,cAAc,GAAG,6u+DAA6u+D;;ACApw+D,MAAM,gBAAgB,GAAG,8m7GAA8m7G;;ACAvo7G,MAAM,cAAc,GAAG,m5tCAAm5tC;;ACqCj7tC;;;AAGE;MAIW,mBAAmB,CAAA;IACtB,aAAa,GAA+B,EAAE;IAC9C,eAAe,GAA2B,EAAE;AAEpD,IAAA,WAAA,GAAA;QACE,IAAI,CAAC,eAAe,GAAG;AACrB,YAAA,MAAM,EAAE,UAAU;AAClB,YAAA,eAAe,EAAE,mBAAmB;AACpC,YAAA,UAAU,EAAE,cAAc;AAC1B,YAAA,QAAQ,EAAE,YAAY;AACtB,YAAA,SAAS,EAAE,aAAa;AACxB,YAAA,MAAM,EAAE,UAAU;AAClB,YAAA,SAAS,EAAE,aAAa;AACxB,YAAA,YAAY,EAAE,gBAAgB;AAC9B,YAAA,OAAO,EAAE,WAAW;AACpB,YAAA,YAAY,EAAE,gBAAgB;AAC9B,YAAA,qBAAqB,EAAE,yBAAyB;AAChD,YAAA,qBAAqB,EAAE,yBAAyB;AAChD,YAAA,UAAU,EAAE,cAAc;AAC1B,YAAA,WAAW,EAAE,eAAe;AAC5B,YAAA,sBAAsB,EAAE,0BAA0B;AAClD,YAAA,gBAAgB,EAAE,oBAAoB;AACtC,YAAA,YAAY,EAAE,gBAAgB;AAC9B,YAAA,aAAa,EAAE,iBAAiB;AAChC,YAAA,cAAc,EAAE,kBAAkB;AAClC,YAAA,eAAe,EAAE,mBAAmB;AACpC,YAAA,eAAe,EAAE,mBAAmB;AACpC,YAAA,OAAO,EAAE,WAAW;AACpB,YAAA,KAAK,EAAE,SAAS;AAChB,YAAA,SAAS,EAAE,aAAa;AACxB,YAAA,cAAc,EAAE,kBAAkB;AAClC,YAAA,UAAU,EAAE,cAAc;AAC1B,YAAA,YAAY,EAAE,gBAAgB;AAC9B,YAAA,MAAM,EAAE,UAAU;AAClB,YAAA,YAAY,EAAE,gBAAgB;AAC9B,YAAA,YAAY,EAAE,gBAAgB;AAC9B,YAAA,YAAY,EAAE,gBAAgB;AAC9B,YAAA,UAAU,EAAE,cAAc;AAC1B,YAAA,MAAM,EAAE,UAAU;AAClB,YAAA,QAAQ,EAAE;SACX;AAED,QAAA,IAAI,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAC,iBAAiB,EAAC,YAAY,EAAC,UAAU,EAAC,OAAO,CAAC,CAAC;;IAGjF,eAAe,GAAA;AACb,QAAA,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE;AAC/D,YAAA,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC;;;AAIvC,IAAA,YAAY,CAAC,KAAe,EAAA;AAC1B,QAAA,IAAI,KAAK,EAAE,MAAM,EAAE;AACjB,YAAA,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;AACxB,gBAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;;;;AAK5B,IAAA,WAAW,CAAC,IAAY,EAAA;AACtB,QAAA,IAAI,IAAI,IAAI,IAAI,CAAC,eAAe,EAAE;AAChC,YAAA,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;;aAEtD;AACH,YAAA,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA,uBAAA,CAAyB,CAAC;;;AAIlD,IAAA,UAAU,CAAC,GAAW,EAAA;QACpB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACrC,YAAA,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE;AAC3B,gBAAA,OAAO,EAAE;gBACT;;YAGF,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC;AAC/C,YAAA,MAAM,CAAC,GAAG,GAAG,GAAG;AAChB,YAAA,MAAM,CAAC,MAAM,GAAG,MAAK;AACnB,gBAAA,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI;AAC9B,gBAAA,OAAO,EAAE;AACX,aAAC;AACD,YAAA,MAAM,CAAC,OAAO,GAAG,MAAM,MAAM,CAAC,IAAI,KAAK,CAAC,CAAsB,mBAAA,EAAA,GAAG,CAAE,CAAA,CAAC,CAAC;AACrE,YAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;AACnC,SAAC,CAAC;;IAGI,kBAAkB,CAAC,IAAY,EAAE,IAAY,EAAA;AACnD,QAAA,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE;YAC5B;;AAEF,QAAA,OAAO,CAAC,GAAG,CAAC,aAAa,GAAG,IAAI,CAAC;QACjC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC;AAC/C,QAAA,MAAM,SAAS,GAAG,oBAAoB,GAAG,IAAI,GAAG,KAAK;AACrD,QAAA,MAAM,CAAC,WAAW,GAAG,IAAI,GAAG,SAAS;AACrC,QAAA,MAAM,CAAC,EAAE,GAAG,SAAS,GAAG,IAAI;AAC5B,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;AACjC,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,IAAI;;uGAhGtB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cAFlB,MAAM,EAAA,CAAA;;2FAEP,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACpCA;MAOqB,eAAe,CAAA;AACvB,IAAA,YAAY,GAAwB,MAAM,CAAC,mBAAmB,CAAC;AACjE,IAAA,UAAU,GAAe,MAAM,CAAC,UAAU,CAAC;AACzC,IAAA,OAAO;AACP,IAAA,MAAM;IACN,SAAS,GAAa,EAAE;IACxB,SAAS,GAAa,IAAI;IAC1B,cAAc,GAAY,KAAK;IAC/B,YAAY,GAAY,KAAK;AAEvC,IAAA,WAAA,GAAA;QACI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;AAC5C,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,EAAE;;IAG9B,UAAU,GAAA;QACN,OAAO,IAAI,CAAC,OAAO;;;AAGb,IAAA,iBAAiB,CAAC,QAAkB,EAAA;AAC1C,QAAA,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC;;AAGlC,IAAA,gBAAgB,CAAC,SAAmB,EAAA;AAC1C,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAC1B,IAAI,CAAC,SAAS,EAAE;;IAGV,SAAS,GAAA;AACf,QAAA,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,SAAS,EAAE;AACpC,YAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,cAAsB,KAAI;gBACtE,OAAO,CAAC,KAAU,KAAI;oBAClB,KAAK,CAAC,eAAe,EAAE;oBACvB,KAAK,CAAC,wBAAwB,EAAE;AAChC,oBAAA,IAAI,CAAC,aAAa,CAAC,KAAK,EAAC,cAAc,CAAC;AAC5C,iBAAC;AACL,aAAC,EAAE,SAAS,CAAC,CAAC;;;IAIZ,aAAa,CAAC,KAAU,EAAC,SAAiB,EAAA;;AAGhD,QAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC;;IAG9C,WAAW,GAAA;AAEP,QAAA,IAAG,IAAI,CAAC,cAAc,EACtB;AACI,YAAA,IAAI,CAAC,YAAY,GAAG,IAAI;YACxB,IAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,eAAe,EACnD;AACI,gBAAA,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE;AAChC,gBAAA,IAAI,CAAC,SAAS,GAAG,IAAI;;;QAG7B,IAAI,CAAC,OAAO,EAAE;;;IAGlB,OAAO,GAAA;;uGA5DW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,oEAHvB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAGM,eAAe,EAAA,UAAA,EAAA,CAAA;kBALpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,SAAS;AACnB,oBAAA,QAAQ,EAAE,EAAE;AACZ,oBAAA,UAAU,EAAE;AACf,iBAAA;;;ACoBK,MAAO,gBAAiB,SAAQ,eAAiC,CAAA;AAC1D,IAAA,OAAO;IAChB,IAAa,UAAU,CAAC,SAAgB,EAAA;AACpC,QAAA,IAAI,CAAC,YAAY,GAAG,SAAS;AAC7B,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC;;;AAG5C,IAAA,IAAI,UAAU,GAAA;QACV,OAAO,IAAI,CAAC,YAAY;;AAGlB,IAAA,YAAY,GAAsB,IAAI,YAAY,EAAE;AACpD,IAAA,cAAc,GAAsB,IAAI,YAAY,EAAE;AAEzD,IAAA,OAAO,oBAAoB,GAAA;QAC9B,IAAI,CAAC,SAAS,EAAE;AACZ,YAAA,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC;;;AAIhD,IAAA,WAAW,aAAa,GAAA;QAC3B,IAAI,CAAC,oBAAoB,EAAE;QAC3B,OAAO,SAAS,EAAE,aAAa;;AAG5B,IAAA,WAAW,iBAAiB,GAAA;QAC/B,IAAI,CAAC,oBAAoB,EAAE;QAC3B,OAAO,SAAS,EAAE,iBAAiB;;AAGhC,IAAA,WAAW,UAAU,GAAA;QACxB,IAAI,CAAC,oBAAoB,EAAE;QAC3B,OAAO,SAAS,EAAE,UAAU;;AAGzB,IAAA,WAAW,WAAW,GAAA;QACzB,IAAI,CAAC,oBAAoB,EAAE;QAC3B,OAAO,SAAS,EAAE,WAAW;;AAG1B,IAAA,WAAW,aAAa,GAAA;QAC3B,IAAI,CAAC,oBAAoB,EAAE;QAC3B,OAAO,SAAS,EAAE,aAAa;;AAG5B,IAAA,WAAW,QAAQ,GAAA;QACtB,IAAI,CAAC,oBAAoB,EAAE;QAC3B,OAAO,SAAS,EAAE,QAAQ;;AAGvB,IAAA,WAAW,kBAAkB,GAAA;QAChC,IAAI,CAAC,oBAAoB,EAAE;QAC3B,OAAO,SAAS,EAAE,kBAAkB;;AAGjC,IAAA,WAAW,kBAAkB,GAAA;QAChC,IAAI,CAAC,oBAAoB,EAAE;QAC3B,OAAO,SAAS,EAAE,kBAAkB;;AAGxC;;;;;;;AAO2E;AACpE,IAAA,OAAgB,iBAAiB,GAAG,OAAO;AAC3C,IAAA,OAAgB,uBAAuB,GAAG,YAAY;AACtD,IAAA,OAAgB,qBAAqB,GAAG,UAAU;AAClD,IAAA,OAAgB,oBAAoB,GAAG,UAAU;AAEhD,IAAA,YAAY;AAEpB,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE;QACP,IAAI,CAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;;;IAGnD,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,aAAa;AAC9C,YAAA,SAAS,CAAC,eAAe,CAAC,CAAC;AAC3B;;;AAGuE;;;AAI3E,IAAA,WAAW,CAAC,OAA6C,EAAA;QACrD,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,OAAO,EAAE;AACjC,YAAA,IAAI,IAAI,CAAC,YAAY,EAAE;gBACnB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY;;YAElD,IAAI,CAAC,MAAM,EAAE;;;;IAIrB,eAAe,GAAA;;;IAGf,MAAM,GAAA;AACF,QAAA,IAAG,IAAI,CAAC,OAAO,EAAE;AACb,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC;AAC1D,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;;;IAIlC,UAAU,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE;;;AAGtC,IAAA,OAAO,CAAC,IAAY,EAAA;AAChB,QAAA,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;;;IAGhC,OAAO,GAAA;AACH,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;;;AAGnC,IAAA,gBAAgB,CAAC,QAAe,EAAA;AAE5B,QAAA,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,QAAQ,CAAC;;;AAG7C,IAAA,eAAe,CAAC,IAAS,EAAA;AAErB,QAAA,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC;;;AAGxC,IAAA,kBAAkB,CAAC,gBAA0B,EAAA;AAEzC,QAAA,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,gBAAgB,CAAC;;;AAGvD,IAAA,gBAAgB,CAAC,aAAqB,EAAA;AAElC,QAAA,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,aAAa,CAAC;;;AAGpD,IAAA,aAAa,CAAC,QAAe,EAAA;AAEzB,QAAA,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC;;;AAG1C,IAAA,YAAY,CAAC,IAAS,EAAA;AAElB,QAAA,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC;;;AAGrC,IAAA,eAAe,CAAC,gBAA0B,EAAA;AAEtC,QAAA,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,gBAAgB,CAAC;;;AAGpD,IAAA,aAAa,CAAC,aAAqB,EAAA;AAE/B,QAAA,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,aAAa,CAAC;;;AAG/C,IAAA,WAAW,CAAC,SAAmB,EAAA;AAE3B,QAAA,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC;;;IAGzC,eAAe,GAAA;AACX,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE;;;IAG3C,gBAAgB,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE;;;uGA5KnC,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,EATd,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,OAAA,EAAA,EAAA,YAAA,EAAA,cAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,EAAA,SAAA,EAAA;AACP,YAAA;AACE,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,gBAAgB,CAAC;AAC/C,gBAAA,KAAK,EAAE;AACR,aAAA;AACJ,SAAA,EAAA,eAAA,EAAA,IAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAdS,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,sl5BAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAiBH,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAnB5B,SAAS;+BACI,qBAAqB,EAAA,QAAA,EACrB,EAAE,EACA,UAAA,EAAA,KAAK,iBAMF,iBAAiB,CAAC,IAAI,EAC1B,SAAA,EAAA;AACP,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,sBAAsB,CAAC;AAC/C,4BAAA,KAAK,EAAE;AACR,yBAAA;AACJ,qBAAA,EAAA,MAAA,EAAA,CAAA,sl5BAAA,CAAA,EAAA;wDAIQ,OAAO,EAAA,CAAA;sBAAf;gBACY,UAAU,EAAA,CAAA;sBAAtB;gBAUS,YAAY,EAAA,CAAA;sBAArB;gBACS,cAAc,EAAA,CAAA;sBAAvB;;;ACvBC,MAAO,mBAAoB,SAAQ,eAAoC,CAAA;AAqCrD,IAAA,MAAA;IApCpB,IAAa,OAAO,CAAC,KAAmC,EAAA;AACpD,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;QACtB,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,EAAE;AACnC,YAAA,IAAI,IAAI,CAAC,YAAY,EAAE;gBACnB,IAAI,CAAC,kBAAkB,EAAE;gBACzB,IAAI,CAAC,SAAU,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,EAAE;;AAEtD,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;AAC/D,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;;AAGlC,IAAA,IAAI,OAAO,GAAA;QACP,OAAO,IAAI,CAAC,SAAS;;IAEzB,IAAa,UAAU,CAAC,SAA8B,EAAA;AAClD,QAAA,IAAI,CAAC,YAAY,GAAG,SAAS;AAC7B,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,kBAAkB,EAAE;AACzB,YAAA,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC;;;AAG5C,IAAA,IAAI,UAAU,GAAA;QACV,OAAO,IAAI,CAAC,YAAY;;AAIlB,IAAA,mBAAmB,GAAsB,IAAI,YAAY,EAAE;AAC3D,IAAA,iBAAiB,GAAsB,IAAI,YAAY,EAAE;AACzD,IAAA,oBAAoB,GAAsB,IAAI,YAAY,EAAE;AAC5D,IAAA,kBAAkB,GAAsB,IAAI,YAAY,EAAE;AAC1D,IAAA,sBAAsB,GAAsB,IAAI,YAAY,EAAE;AAC9D,IAAA,wBAAwB,GAAsB,IAAI,YAAY,EAAE;AAElE,IAAA,YAAY;AACZ,IAAA,SAAS;AAEjB,IAAA,WAAA,CAAoB,MAAc,EAAA;AAC9B,QAAA,KAAK,EAAE;QADS,IAAM,CAAA,MAAA,GAAN,MAAM;AAEtB,QAAA,IAAI,CAAC,iBAAiB,CAAC,CAAC,cAAc,CAAC,CAAC;;;AAG5C,IAAA,WAAW,CAAC,OAA6C,EAAA;AACrD;;;;;;;;AAQG;;;IAGP,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,qBAAqB;AACrD,YAAA,YAAY,CAAC,mBAAmB;AAChC,YAAA,YAAY,CAAC,sBAAsB;AACnC,YAAA,YAAY,CAAC,oBAAoB;AACjC,YAAA,YAAY,CAAC,wBAAwB;AACrC,YAAA,YAAY,CAAC,0BAA0B,CAAC,CAAC;AAE7C;;;;;;AAMuF;;;IAG3F,eAAe,GAAA;;;IAGf,SAAS,GAAA;AACL,QAAA,QAAQ,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,GAAG,KAAK;;;IAG/D,gBAAgB,GAAA;AACZ,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE;;;;IAIzC,cAAc,GAAA;AACV,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE;;;;IAIvC,eAAe,GAAA;AACX,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE;;;;AAIxC,IAAA,UAAU,CAAC,aAAkB,EAAA;AACzB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,aAAa,CAAC;;;;AAIhD,IAAA,aAAa,CAAC,MAA2B,EAAA;AACrC,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,kBAAkB,EAAE;AACzB,YAAA,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC;;;;IAIzC,QAAQ,CAAC,SAAiB,EAAE,KAAU,EAAA;AAClC,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;;;;AAIjD,IAAA,QAAQ,CAAC,OAAgB,EAAA;AACrB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC;;;;IAIxC,QAAQ,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;;AAEpC,QAAA,OAAO,KAAK;;;AAGhB,IAAA,QAAQ,CAAC,KAAa,EAAA;AAClB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;;;;IAI9B,kBAAkB,GAAA;AACtB,QAAA,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/C,YAAA,KAAK,IAAI,MAAM,IAAI,IAAI,CAAC,UAAU,EAAE;AAChC,gBAAA,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC;;;;;AAKvC,IAAA,sBAAsB,CAAC,IAAuB,EAAA;QAClD,IAAI,IAAI,EAAE;AACN,YAAA,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/C,gBAAA,KAAK,IAAI,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE;AACnC,oBAAA,IAAI,CAAC,sBAAsB,CAAC,SAAS,CAAC;;;iBAGzC;AACD,gBAAA,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;AAKtD,IAAA,kBAAkB,CAAC,KAAU,EAAE,IAAuB,EAAE,EAAO,EAAA;QACnE,IAAI,IAAI,EAAE;YACN,IAAI,cAAc,GAAG,IAAI;AACzB,YAAA,IAAI,IAAI,CAAC,OAAO,EAAE;gBACd,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC;;AAElD,YAAA,IAAI,IAAI,CAAC,MAAM,IAAI,cAAc,KAAK,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE;gBAC9D,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC;AAC1C,gBAAA,MAAM,cAAc,GAAG,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,QAAQ,GAAG,CAAI,CAAA,EAAA,QAAQ,EAAE;gBAC3E,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,cAAc,CAAC,CAAC;;iBACnC;AACH,gBAAA,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC;;;;;uGAtK7C,mBAAmB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,ydAPlB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,2m3BAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAOH,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAT/B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,YACvB,EAAE,EAAA,UAAA,EACA,KAAK,EAIF,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,2m3BAAA,CAAA,EAAA;2EAGxB,OAAO,EAAA,CAAA;sBAAnB;gBAcY,UAAU,EAAA,CAAA;sBAAtB;gBAYS,mBAAmB,EAAA,CAAA;sBAA5B;gBACS,iBAAiB,EAAA,CAAA;sBAA1B;gBACS,oBAAoB,EAAA,CAAA;sBAA7B;gBACS,kBAAkB,EAAA,CAAA;sBAA3B;gBACS,sBAAsB,EAAA,CAAA;sBAA/B;gBACS,wBAAwB,EAAA,CAAA;sBAAjC;;;ACZC,MAAO,4BAA6B,SAAQ,eAA6C,CAAA;AAEpF,IAAA,OAAO,oBAAoB,GAAA;QAC9B,IAAI,CAAC,qBAAqB,EAAE;AACxB,YAAA,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC;;;AAI5D,IAAA,WAAW,kBAAkB,GAAA;QAChC,IAAI,CAAC,oBAAoB,EAAE;QAC3B,OAAO,qBAAqB,EAAE,kBAAkB;;AAG7C,IAAA,WAAW,0BAA0B,GAAA;QACxC,IAAI,CAAC,oBAAoB,EAAE;QAC3B,OAAO,qBAAqB,EAAE,0BAA0B;;AAGrD,IAAA,WAAW,wBAAwB,GAAA;QACtC,IAAI,CAAC,oBAAoB,EAAE;QAC3B,OAAO,qBAAqB,EAAE,wBAAwB;;AAGjD,IAAA,OAAO;IAChB,IAAa,UAAU,CAAC,SAAgB,EAAA;AACpC,QAAA,IAAI,CAAC,QAAQ,GAAG,SAAS;AACzB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC;;;AAGhD,IAAA,IAAI,UAAU,GAAA;QACV,OAAO,IAAI,CAAC,QAAQ;;AAGd,IAAA,YAAY,GAAsB,IAAI,YAAY,EAAE;AACpD,IAAA,aAAa,GAAsB,IAAI,YAAY,EAAE;AACrD,IAAA,iBAAiB,GAAsB,IAAI,YAAY,EAAE;AAE3D,IAAA,QAAQ;IACR,UAAU,GAAU,EAAE;IACtB,WAAW,GAAU,EAAE;AACvB,IAAA,QAAQ,GAAyB,MAAK,GAAI;AAC1C,IAAA,SAAS,GAAe,MAAK,GAAI;AAEzC,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE;AACP,QAAA,IAAI,CAAC,iBAAiB,CAAC,CAAC,uBAAuB,CAAC,CAAC;;IAGrD,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACjB,IAAI,CAAC,gBAAgB,CAAC;AAClB,gBAAA,qBAAqB,CAAC,aAAa;AACnC,gBAAA,qBAAqB,CAAC,cAAc;AACpC,gBAAA,qBAAqB,CAAC;AACzB,aAAA,CAAC;YACF,IAAI,CAAC,MAAM,EAAE;;AAEjB,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;IAG9B,eAAe,GAAA;;;IAIf,MAAM,GAAA;QACF,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,OAAO,EAAE;AACjC,YAAA,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC3C,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ;;AAE3C,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI,qBAAqB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC;AACtE,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;AAG1B,YAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AACjB,gBAAA,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;oBAChC,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC;;;AAGhE,YAAA,IAAI,IAAI,CAAC,WAAW,EAAE;AAClB,gBAAA,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,WAAW,EAAE;oBAClC,IAAI,CAAC,6BAA6B,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC;;;AAG1E,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;;;AAKlC,IAAA,UAAU,CAAC,KAAU,EAAA;QACjB,IAAI,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,SAAS,EAAE;YACvC,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,KAAK,EAAE,IAAI,CAAC;;;AAI1D,IAAA,gBAAgB,CAAC,EAAwB,EAAA;AACrC,QAAA,IAAI,CAAC,QAAQ,GAAG,EAAE;;AAGtB,IAAA,iBAAiB,CAAC,EAAc,EAAA;AAC5B,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE;;AAGvB,IAAA,gBAAgB,CAAE,UAAmB,EAAA;AACjC,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;;;;IAKxB,kBAAkB,GAAA;AACd,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,kBAAkB,EAAE;;IAG/C,gBAAgB,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,gBAAgB,EAAE;;IAG7C,6BAA6B,CAAC,KAAsB,EAAE,UAAmB,EAAA;AACrE,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,SAAS,CAAC,6BAA6B,CAAC,KAAK,EAAE,UAAU,CAAC;;aAC5D;AACH,YAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;;;IAIxE,sBAAsB,CAAC,QAAa,EAAE,UAAmB,EAAA;AACrD,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,QAAQ,EAAE,UAAU,CAAC;;aACxD;AACH,YAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;;;IAIzE,QAAQ,CAAC,SAAiB,EAAE,KAAU,EAAA;QAClC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;;AAG7C,IAAA,QAAQ,CAAC,OAAgB,EAAA;AACrB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC;;IAGpC,QAAQ,GAAA;AACJ,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;;AAGpC,IAAA,QAAQ,CAAC,KAAa,EAAA;AAClB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;;IAGf,aAAa,CAAC,KAAU,EAAE,SAAiB,EAAA;QAC1D,QAAQ,SAAS;YACb,KAAK,qBAAqB,CAAC,aAAa;AACpC,gBAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC7B;YACJ,KAAK,qBAAqB,CAAC,cAAc;AACrC,gBAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC9B;YACJ,KAAK,qBAAqB,CAAC,mBAAmB;AAC1C,gBAAA,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC;gBAClC;;;uGA/JH,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA5B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,4BAA4B,EAR1B,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,iCAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,OAAA,EAAA,EAAA,YAAA,EAAA,cAAA,EAAA,aAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,EAAA,SAAA,EAAA;AACP,YAAA;AACI,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,4BAA4B,CAAC;AAC3D,gBAAA,KAAK,EAAE;AACV;AACJ,SAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAdS,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,o8LAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAgBH,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAlBxC,SAAS;+BACI,iCAAiC,EAAA,QAAA,EACjC,EAAE,EACA,UAAA,EAAA,KAAK,iBAMF,iBAAiB,CAAC,IAAI,EAC1B,SAAA,EAAA;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,kCAAkC,CAAC;AAC3D,4BAAA,KAAK,EAAE;AACV;AACJ,qBAAA,EAAA,MAAA,EAAA,CAAA,o8LAAA,CAAA,EAAA;wDAyBQ,OAAO,EAAA,CAAA;sBAAf;gBACY,UAAU,EAAA,CAAA;sBAAtB;gBAUS,YAAY,EAAA,CAAA;sBAArB;gBACS,aAAa,EAAA,CAAA;sBAAtB;gBACS,iBAAiB,EAAA,CAAA;sBAA1B;;;ACzDC,MAAO,cAAe,SAAQ,eAA+B,CAAA;AACtD,IAAA,OAAO;AAEN,IAAA,WAAW,GAAsB,IAAI,YAAY,EAAE;AACnD,IAAA,QAAQ,GAAsB,IAAI,YAAY,EAAE;AAChD,IAAA,OAAO,GAAsB,IAAI,YAAY,EAAE;AAC/C,IAAA,aAAa,GAAsB,IAAI,YAAY,EAAE;AACrD,IAAA,QAAQ,GAAsB,IAAI,YAAY,EAAE;AAChD,IAAA,SAAS,GAAsB,IAAI,YAAY,EAAE;AACjD,IAAA,gBAAgB,GAAsB,IAAI,YAAY,EAAE;AACxD,IAAA,WAAW,GAAsB,IAAI,YAAY,EAAE;AACnD,IAAA,iBAAiB,GAAsB,IAAI,YAAY,EAAE;AACzD,IAAA,YAAY,GAAsB,IAAI,YAAY,EAAE;AACpD,IAAA,gBAAgB,GAAsB,IAAI,YAAY,EAAE;AACxD,IAAA,WAAW,GAAsB,IAAI,YAAY,EAAE;AACnD,IAAA,gBAAgB,GAAsB,IAAI,YAAY,EAAE;AACxD,IAAA,WAAW,GAAsB,IAAI,YAAY,EAAE;AACnD,IAAA,kBAAkB,GAAsB,IAAI,YAAY,EAAE;AAC1D,IAAA,aAAa,GAAsB,IAAI,YAAY,EAAE;AACrD,IAAA,eAAe,GAAsB,IAAI,YAAY,EAAE;AACvD,IAAA,UAAU,GAAsB,IAAI,YAAY,EAAE;AAClD,IAAA,MAAM,GAAsB,IAAI,YAAY,EAAE;AAGxD,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE;AACP,QAAA,IAAI,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC;;;IAGvC,QAAQ,GAAA;;;AAGR,IAAA,WAAW,CAAC,OAA6C,EAAA;;;;IAIzD,eAAe,GAAA;QACX,IAAI,CAAC,MAAM,EAAE;;;IAGjB,IAAI,GAAA;AACA;;;;;;AAMG;AACH,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;;;;IAIpC,KAAK,GAAA;AACD,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;;;;IAIrC,WAAW,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;;;;IAI3C,cAAc,GAAA;AACV,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE;;AAE1C,QAAA,OAAO,IAAI;;;IAGf,QAAQ,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;;;;IAIjC,QAAQ,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;;;;IAIjC,QAAQ,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;;;;IAIjC,MAAM,GAAA;AACF,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;;;;IAI/B,UAAU,GAAA;AACN,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE;;;;IAInC,OAAO,GAAA;AACH,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;;;;IAIhC,aAAa,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE;;;;IAItC,WAAW,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;;;;IAIpC,eAAe,GAAA;AACX,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE;;;;IAIxC,aAAa,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE;;;;IAIxC,iBAAiB,GAAA;AACb,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE;;;;IAIxC,WAAW,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;;AAEvC,QAAA,OAAO,KAAK;;;IAGhB,WAAW,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;;AAEvC,QAAA,OAAO,KAAK;;;IAGhB,YAAY,GAAA;AACR,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE;;AAExC,QAAA,OAAO,KAAK;;;IAGR,MAAM,GAAA;AACV,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;AACjB,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC;AACxD,YAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;gBACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE;AAC9C,gBAAA,IAAI,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,aAAa;AAC5C,oBAAA,OAAO,CAAC,QAAQ;AAChB,oBAAA,OAAO,CAAC,QAAQ;AAChB,oBAAA,OAAO,CAAC,eAAe;AACvB,oBAAA,OAAO,CAAC,QAAQ;AAChB,oBAAA,OAAO,CAAC,UAAU;AAClB,oBAAA,OAAO,CAAC,iBAAiB;AACzB,oBAAA,OAAO,CAAC,YAAY;AACpB,oBAAA,OAAO,CAAC,kBAAkB;AAC1B,oBAAA,OAAO,CAAC,aAAa;AACrB,oBAAA,OAAO,CAAC,iBAAiB;AACzB,oBAAA,OAAO,CAAC,YAAY;AACpB,oBAAA,OAAO,CAAC,mBAAmB;AAC3B,oBAAA,OAAO,CAAC,cAAc;AACtB,oBAAA,OAAO,CAAC,gBAAgB;AACxB,oBAAA,OAAO,CAAC,WAAW;AACnB,oBAAA,OAAO,CAAC;AACP,iBAAA,CAAC;;AAEN,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;;;uGAvLzB,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,guBARb,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,47VAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAQ5B,cAAc,EAAA,UAAA,EAAA,CAAA;kBAV1B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,YAClB,2BAA2B,EAAA,UAAA,EACzB,KAAK,EAIF,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,47VAAA,CAAA,EAAA;wDAI5B,OAAO,EAAA,CAAA;sBAAf;gBAES,WAAW,EAAA,CAAA;sBAApB;gBACS,QAAQ,EAAA,CAAA;sBAAjB;gBACS,OAAO,EAAA,CAAA;sBAAhB;gBACS,aAAa,EAAA,CAAA;sBAAtB;gBACS,QAAQ,EAAA,CAAA;sBAAjB;gBACS,SAAS,EAAA,CAAA;sBAAlB;gBACS,gBAAgB,EAAA,CAAA;sBAAzB;gBACS,WAAW,EAAA,CAAA;sBAApB;gBACS,iBAAiB,EAAA,CAAA;sBAA1B;gBACS,YAAY,EAAA,CAAA;sBAArB;gBACS,gBAAgB,EAAA,CAAA;sBAAzB;gBACS,WAAW,EAAA,CAAA;sBAApB;gBACS,gBAAgB,EAAA,CAAA;sBAAzB;gBACS,WAAW,EAAA,CAAA;sBAApB;gBACS,kBAAkB,EAAA,CAAA;sBAA3B;gBACS,aAAa,EAAA,CAAA;sBAAtB;gBACS,eAAe,EAAA,CAAA;sBAAxB;gBACS,UAAU,EAAA,CAAA;sBAAnB;gBACS,MAAM,EAAA,CAAA;sBAAf;;;AC3CL;;ACuBM,MAAO,iBAAkB,SAAQ,eAAkC,CAAA;AAC5D,IAAA,OAAO;AAEN,IAAA,YAAY,GAAsB,IAAI,YAAY,EAAE;AAE9D,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE;AACP,QAAA,IAAI,CAAC,iBAAiB,CAAC,CAAC,YAAY,CAAC,CAAC;;;AAG1C,IAAA,WAAW,CAAC,OAA6C,EAAA;;;IAIzD,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC;QAC3D,IAAI,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;;IAG9B,eAAe,GAAA;;;IAGf,eAAe,GAAA;AACX,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE;;;AAG3C,IAAA,uBAAuB,CAAC,MAAc,EAAA;QAClC,OAAO,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,MAAM,CAAC;;;IAGzD,eAAe,CAAC,IAAS,EAAE,MAAc,EAAA;QACrC,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC;;;AAGhD,IAAA,OAAO,CAAC,IAAY,EAAA;AAChB,QAAA,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;;;AAGhC,IAAA,QAAQ,CAAC,KAAa,EAAA;AAClB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;;;IAGlC,KAAK,GAAA;AACD,QAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;;;IAG1B,YAAY,GAAA;AACR,QAAA,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE;;;IAGjC,QAAQ,CAAC,SAAiB,EAAE,KAAU,EAAA;QAClC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;;;AAG7C,IAAA,QAAQ,CAAC,OAAgB,EAAA;AACrB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC;;;IAGpC,QAAQ,GAAA;AACJ,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;;;AAGpC,IAAA,QAAQ,CAAC,KAAa,EAAA;AAClB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;;;IAGlC,cAAc,CAAC,YAAoB,EAAE,KAAU,EAAA;QAC3C,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC;;;uGApE7C,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,uMARhB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,y6uBAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAQH,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAV7B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,YACrB,EAAE,EAAA,UAAA,EACA,KAAK,EAKF,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,y6uBAAA,CAAA,EAAA;wDAG5B,OAAO,EAAA,CAAA;sBAAf;gBAES,YAAY,EAAA,CAAA;sBAArB;;;ACMC,MAAO,mBAAoB,SAAQ,eAAoC,CAAA;AAChE,IAAA,OAAO;AAEN,IAAA,gBAAgB,GAAsB,IAAI,YAAY,EAAE;AACxD,IAAA,gBAAgB,GAAsB,IAAI,YAAY,EAAE;AACxD,IAAA,cAAc,GAAsB,IAAI,YAAY,EAAE;AACtD,IAAA,aAAa,GAAsB,IAAI,YAAY,EAAE;AACrD,IAAA,YAAY,GAAG,IAAI,YAAY,EAAE;AAEnC,IAAA,UAAU;AACV,IAAA,SAAS;AAEjB;;;;;;;;;;;;;;;AAeI;;IAGI,gBAAgB,GAAY,KAAK;AACjC,IAAA,cAAc;AAEtB,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE;AACP,QAAA,IAAI,CAAC,iBAAiB,CAAC,CAAC,cAAc,CAAC,CAAC;;;AAG5C,IAAA,UAAU,CAAC,KAAU,EAAA;;AAEjB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;YAClD,IAAI,UAAU,GAAW,IAAI,CAAC,OAAO,CAAC,eAAe,IAAI,YAAY;YACrE,MAAM,SAAS,GAAG,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC;YAC1D,IAAG,SAAS,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE;AACtC,gBAAA,IAAI,CAAC,UAAU,EAAE,CAAC,KAAK,GAAG,SAAS;;;aAEpC;AACH,YAAA,IAAI,CAAC,cAAc,GAAG,KAAK;;;AAInC,IAAA,gBAAgB,CAAC,EAAO,EAAA;AACpB,QAAA,IAAI,CAAC,UAAU,GAAG,EAAE;;AAGxB,IAAA,iBAAiB,CAAC,EAAO,EAAA;AACrB,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE;;AAGvB,IAAA,gBAAgB,CAAE,UAAmB,EAAA;;;AAIrC,IAAA,WAAW,CAAC,OAA6C,EAAA;;;IAIzD,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC;AAC7D,QAAA,IAAI,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,eAAe;AACnD,YAAA,YAAY,CAAC,eAAe;AAC5B,YAAA,YAAY,CAAC,aAAa;AAC1B,YAAA,YAAY,CAAC,YAAY,CAAC,CAAC;AAC3B,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;;;;IAK9B,eAAe,GAAA;AACX,QAAA,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS,EAAE;AACnC,YAAA,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,KAAK,CAAC;AAChE,YAAA,IAAI,CAAC,cAAc,GAAG,SAAS;;;;IAIvC,eAAe,GAAA;AACX,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE;;;AAG3C,IAAA,uBAAuB,CAAC,MAAc,EAAA;QAClC,OAAO,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,MAAM,CAAC;;;IAGzD,eAAe,CAAC,IAAS,EAAE,MAAe,EAAA;QACtC,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC;;;AAGhD,IAAA,OAAO,CAAC,IAAY,EAAA;AAChB,QAAA,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;;;AAGhC,IAAA,QAAQ,CAAC,KAAa,EAAA;AAClB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;;;IAGlC,KAAK,GAAA;AACD,QAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;;;IAG1B,YAAY,GAAA;AACR,QAAA,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE;;;AAGjC,IAAA,YAAY,CAAC,kBAA4B,EAAA;AACrC,QAAA,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,kBAAkB,CAAC;;;IAGnD,aAAa,GAAA;AACT,QAAA,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE;;;IAGlC,WAAW,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;;;IAGvC,UAAU,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE;;;IAGtC,OAAO,GAAA;AACH,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;;AAEnC,QAAA,OAAO,EAAE;;;IAGb,wBAAwB,GAAA;AACpB,QAAA,IAAI,CAAC,SAAS,CAAC,wBAAwB,EAAE;;;IAG7C,QAAQ,CAAC,SAAiB,EAAE,KAAU,EAAA;QAClC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;;;AAG7C,IAAA,QAAQ,CAAC,OAAgB,EAAA;AACrB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC;;;IAGpC,QAAQ,GAAA;AACJ,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;;;AAGpC,IAAA,QAAQ,CAAC,KAAa,EAAA;AAClB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;;;IAGlC,cAAc,CAAC,YAAoB,EAAE,KAAU,EAAA;QAC3C,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC;;;AAG9C,IAAA,gBAAgB,CAAC,QAAa,EAAA;AAClC,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AACjB,YAAA,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;YACzB,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC;;;AAIhC,IAAA,qBAAqB,CAAC,KAAU,EAAA;AACpC,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI;;AAE5B,QAAA,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC;;AAG/B,IAAA,oBAAoB,CAAC,KAAU,EAAA;AACnC,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI;;AAE5B,QAAA,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC;;IAGpB,aAAa,CAAC,KAAU,EAAE,SAAiB,EAAA;AAC1D,QAAA,IAAI,IAAI,GAAQ,KAAK,CAAC,IAAI;AAC1B,QAAA,IAAG,IAAI,KAAK,YAAY,CAAC,aAAa,EAAE;AACpC,YAAA,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC;;AAEhC,aAAA,IAAG,IAAI,KAAK,YAAY,CAAC,YAAY,EAAE;AACxC,YAAA,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC;;AAEpC,QAAA,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;;QAE1D,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;;uGA/LxB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,EATjB,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,aAAA,EAAA,eAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,SAAA,EAAA;AACP,YAAA;AACI,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,mBAAmB,CAAC;AAClD,gBAAA,KAAK,EAAE;AACV;AACJ,SAAA,EAAA,eAAA,EAAA,IAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAbS,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,k5wBAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAgBH,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAlB/B,SAAS;+BACI,wBAAwB,EAAA,QAAA,EACxB,EAAE,EACA,UAAA,EAAA,KAAK,iBAKF,iBAAiB,CAAC,IAAI,EAC1B,SAAA,EAAA;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,yBAAyB,CAAC;AAClD,4BAAA,KAAK,EAAE;AACV;AACJ,qBAAA,EAAA,MAAA,EAAA,CAAA,k5wBAAA,CAAA,EAAA;wDAIQ,OAAO,EAAA,CAAA;sBAAf;gBAES,gBAAgB,EAAA,CAAA;sBAAzB;gBACS,gBAAgB,EAAA,CAAA;sBAAzB;gBACS,cAAc,EAAA,CAAA;sBAAvB;gBACS,aAAa,EAAA,CAAA;sBAAtB;gBACS,YAAY,EAAA,CAAA;sBAArB;;;MCpCQ,yBAAyB,CAAA;AAEd,IAAA,cAAA;AACR,IAAA,QAAA;AACA,IAAA,wBAAA;AAHJ,IAAA,QAAQ;AAChB,IAAA,WAAA,CAAoB,cAA8B,EACtC,QAAkB,EAClB,wBAAkD,EAC1D,eAAiC,EAAA;QAHjB,IAAc,CAAA,cAAA,GAAd,cAAc;QACtB,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACR,IAAwB,CAAA,wBAAA,GAAxB,wBAAwB;QAEhC,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC;;AAG9D;;;;;AAKG;AACH,IAAA,kBAAkB,CAAI,cAAuB,EAAE,gBAAmC,EAAE,MAAmB,EAAA;AACnG,QAAA,IAAI,YAA6B;QACjC,IAAI,gBAAgB,EAAE;;AAElB,YAAA,YAAY,GAAG,gBAAgB,CAAC,eAAe,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;;aACzF;;AAEH;;;AAGsB;YACtB,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;YAC3D,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;;YAG1D,MAAM,oBAAoB,GAAG,IAAI,CAAC,sBAAsB,CAAC,gBAAgB,CAAC;;AAG1E,YAAA,YAAY,GAAG,oBAAoB,CAAC,eAAe,CAAC,cAAc,EAAE;gBAChE,QAAQ,EAAE,IAAI,CAAC,QAAQ;AAC1B,aAAA,CAAC;;QAEN,IAAG,YAAY,EAAE;YACb,IAAG,MAAM,EAAE;gBACP,MAAM,CAAC,MAAM,CAAE,YAAY,CAAC,QAAgB,EAAE,MAAM,CAAC;;AAEzD,YAAA,YAAY,CAAC,iBAAiB,CAAC,aAAa,EAAE;;AAElD,QAAA,OAAO,YAAY;;AAGf,IAAA,sBAAsB,CAAC,OAAoB,EAAA;AAC/C,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC;aACrB,UAAU,CAAC,CAAC;aACZ;aACA;aACA,kBAAkB,CAAC,EAAE,CAAC;AAE3B,QAAA,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,YAAY,CAAC;QAC5C,YAAY,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,IAAS,KAAI;YACzC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC;AAC5C,SAAC,CAAC;QAEF,OAAO,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,gBAAgB,CAAC;;AAGtD,IAAA,WAAW,CAAI,YAA6B,EAAA;;QAExC,OAAO,YAAY,CAAC,QAAQ;;AAGhC,IAAA,aAAa,CAAI,YAA6B,EAAA;;QAE1C,OAAQ,YAAY,CAAC,QAAiC,CAAC,SAAS,CAAC,CAAC,CAAgB;;AAGtF,IAAA,gBAAgB,CAAI,YAA6B,EAAE,KAAK,GAAG,CAAC,EAAA;;QAExD,UAAU,CAAC,MAAK;YACZ,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC;YACrD,YAAY,CAAC,OAAO,EAAE;SACzB,EAAE,KAAK,CAAC;;uGA5EJ,yBAAyB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,wBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,cADZ,MAAM,EAAA,CAAA;;2FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACsB5B,MAAO,kBAAmB,SAAQ,eAAmC,CAAA;AAmBnD,IAAA,uBAAA;AAlBX,IAAA,OAAO;AACP,IAAA,cAAc;AAEb,IAAA,cAAc,GAAG,IAAI,YAAY,EAAO;AACxC,IAAA,cAAc,GAAG,IAAI,YAAY,EAAO;AACxC,IAAA,aAAa,GAAG,IAAI,YAAY,EAAO;AACvC,IAAA,cAAc,GAAG,IAAI,YAAY,EAAO;AACxC,IAAA,SAAS,GAAG,IAAI,YAAY,EAAO;AACnC,IAAA,YAAY,GAAG,IAAI,YAAY,EAAO;AAEtC,IAAA,wBAAwB,GAAqB,IAAI,YAAY,EAAE;AAGzE,IAAA,gBAAgB;IAER,mBAAmB,GAAU,EAAE;IAC/B,qBAAqB,GAAU,EAAE;AAEzC,IAAA,WAAA,CAAoB,uBAAkD,EAAA;AAClE,QAAA,KAAK,EAAE;QADS,IAAuB,CAAA,uBAAA,GAAvB,uBAAuB;AAEvC,QAAA,IAAI,CAAC,iBAAiB,CAAC,CAAC,aAAa,CAAC,CAAC;;IAG3C,QAAQ,GAAA;QACJ,IAAI,CAAC,mBAAmB,EAAE;AAC1B,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;IAG9B,eAAe,GAAA;;IAGN,OAAO,GAAA;AACZ,QAAA,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,mBAAmB,EAAE;AACvC,YAAA,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE;;;IAI7B,mBAAmB,GAAA;QACvB,IAAG,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;AAChC,YAAA,IAAI,IAAI,CAAC,OAAO,EAAE,eAAe,EAAE;AAC/B,gBAAA,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,KAAK,KAAI;AACzD,oBAAA,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC;AACvC,iBAAC,CAAC;;YAEN,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO;YACrC,IAAI,CAAC,SAAS,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC;AAC9C,YAAA,IAAI,CAAC,gBAAgB,CAAC,CAAC,WAAW,CAAC,gBAAgB;AAC/C,gBAAA,WAAW,CAAC,gBAAgB;AAC5B,gBAAA,WAAW,CAAC,eAAe;AAC3B,gBAAA,WAAW,CAAC,gBAAgB;AAC5B,gBAAA,WAAW,CAAC,UAAU;AACtB,gBAAA,WAAW,CAAC;AACf,aAAA,CAAC;AACF,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;;IAI1B,SAAS,CAAC,OAAiC,EAAE,KAAa,EAAA;AAC9D,QAAA,IAAI,OAAO,CAAC,gBAAgB,EAAE;AAC1B,YAAA,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,EAAE,QAAQ,IAAG;AACrF,gBAAA,OAAO,CAAC,qBAAqB,GAAG,QAAQ;AACxC,gBAAA,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,GAAG,QAAQ;AAChD,aAAC,CAAC;;;AAIF,IAAA,YAAY,CAAC,qBAA0B,EAAE,KAAa,EAAE,YAAqC,EAAA;QACjG,MAAM,IAAI,GAAQ,IAAI;AACtB,QAAA,MAAM,MAAM,GAAG,YAAA;AACX,YAAA,IAAI,YAAiB;AACrB,YAAA,IAAI,YAAiB;AAErB,YAAA,IAAI,CAAC,IAAI,GAAG,OAAO,IAAS,KAAkB;AAC1C,gBAAA,MAAM,QAAQ,GAAI,MAAM,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,qBAAqB,EAAE,IAAI,CAAC,gBAAgB,CAAC;gBACrH,YAAY,GAAG,QAAQ;gBACvB,YAAY,GAAG,IAAI,CAAC,uBAAuB,CAAC,WAAW,CAAC,YAAY,CAAC;AACrE,gBAAA,IAAI,YAAY,EAAE,IAAI,EAAE;oBACpB,YAAY,CAAC,YAAY,CAAC;AAC1B,oBAAA,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;;AAE3B,gBAAA,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,qBAAqB,EAAE,IAAI,EAAE;gBAClH,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;AACtE,aAAC;AAED,YAAA,IAAI,CAAC,UAAU,GAAG,MAAK;AACnB,gBAAA,IAAG,YAAY,IAAI,YAAY,CAAC,UAAU,EAAE;AACxC,oBAAA,OAAO,YAAY,CAAC,UAAU,EAAE;;AAEpC,gBAAA,OAAO,IAAI;AACf,aAAC;AACD,YAAA,IAAI,CAAC,YAAY,GAAG,MAAK;AACrB,gBAAA,IAAG,YAAY,IAAI,YAAY,CAAC,YAAY,EAAE;oBAC1C,YAAY,CAAC,YAAY,EAAE;;AAEnC,aAAC;AACD,YAAA,IAAI,CAAC,iBAAiB,GAAG,CAAC,YAAqB,KAAI;AAC/C,gBAAA,IAAG,YAAY,IAAI,YAAY,CAAC,iBAAiB,EAAE;AAC/C,oBAAA,YAAY,CAAC,iBAAiB,CAAC,YAAY,CAAC;;AAEpD,aAAC;AACD,YAAA,IAAI,CAAC,OAAO,GAAG,MAAK;AAChB,gBAAA,IAAG,YAAY,IAAI,YAAY,CAAC,OAAO,EAAE;oBACrC,YAAY,CAAC,OAAO,EAAE;;AAE9B,aAAC;AACL,SAAC;AAED,QAAA,OAAO,MAAM;;AAGT,IAAA,4BAA4B,CAAC,OAAW,EAAA;AAE5C,QAAA,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC;;;uGAjHtC,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,yBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,qYAFjB,CAAC,yBAAyB,CAAC,EAeE,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,IAAA,EAAA,gBAAgB,kEAtB7C,+CAA+C,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,8t/BAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAShD,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAX9B,SAAS;+BACI,sBAAsB,EAAA,QAAA,EACtB,+CAA+C,EAAA,UAAA,EAC7C,KAAK,EAAA,aAAA,EAKF,iBAAiB,CAAC,IAAI,EAAA,SAAA,EAC3B,CAAC,yBAAyB,CAAC,EAAA,MAAA,EAAA,CAAA,8t/BAAA,CAAA,EAAA;2FAG5B,OAAO,EAAA,CAAA;sBAAf;gBACQ,cAAc,EAAA,CAAA;sBAAtB;gBAES,cAAc,EAAA,CAAA;sBAAvB;gBACS,cAAc,EAAA,CAAA;sBAAvB;gBACS,aAAa,EAAA,CAAA;sBAAtB;gBACS,cAAc,EAAA,CAAA;sBAAvB;gBACS,SAAS,EAAA,CAAA;sBAAlB;gBACS,YAAY,EAAA,CAAA;sBAArB;gBAES,wBAAwB,EAAA,CAAA;sBAAjC;gBAGD,gBAAgB,EAAA,CAAA;sBADf,SAAS;uBAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE;;;ACrC3E;;ACyBM,MAAO,mBAAoB,SAAQ,eAAoC,CAAA;AAmCrD,IAAA,uBAAA;AAjCpB,IAAA,gBAAgB;AAEoC,IAAA,eAAe;AAE1D,IAAA,OAAO;AAEN,IAAA,WAAW,GAAsB,IAAI,YAAY,EAAE;AACnD,IAAA,QAAQ,GAAsB,IAAI,YAAY,EAAE;AAChD,IAAA,OAAO,GAAsB,IAAI,YAAY,EAAE;AAC/C,IAAA,aAAa,GAAsB,IAAI,YAAY,EAAE;AACrD,IAAA,QAAQ,GAAsB,IAAI,YAAY,EAAE;AAChD,IAAA,SAAS,GAAsB,IAAI,YAAY,EAAE;AACjD,IAAA,gBAAgB,GAAsB,IAAI,YAAY,EAAE;AACxD,IAAA,WAAW,GAAsB,IAAI,YAAY,EAAE;AACnD,IAAA,iBAAiB,GAAsB,IAAI,YAAY,EAAE;AACzD,IAAA,YAAY,GAAsB,IAAI,YAAY,EAAE;AACpD,IAAA,gBAAgB,GAAsB,IAAI,YAAY,EAAE;AACxD,IAAA,WAAW,GAAsB,IAAI,YAAY,EAAE;AACnD,IAAA,gBAAgB,GAAsB,IAAI,YAAY,EAAE;AACxD,IAAA,WAAW,GAAsB,IAAI,YAAY,EAAE;AACnD,IAAA,kBAAkB,GAAsB,IAAI,YAAY,EAAE;AAC1D,IAAA,aAAa,GAAsB,IAAI,YAAY,EAAE;AACrD,IAAA,eAAe,GAAsB,IAAI,YAAY,EAAE;AACvD,IAAA,UAAU,GAAsB,IAAI,YAAY,EAAE;AAClD,IAAA,MAAM,GAAsB,IAAI,YAAY,EAAE;AAE9C,IAAA,wBAAwB,GAAqB,IAAI,YAAY,EAAE;AAEjE,IAAA,YAAY;AACZ,IAAA,gBAAgB;AAChB,IAAA,oBAAoB;AACpB,IAAA,uBAAuB;AAE/B,IAAA,WAAA,CAAoB,uBAAkD,EAAA;AAClE,QAAA,KAAK,EAAE;QADS,IAAuB,CAAA,uBAAA,GAAvB,uBAAuB;QAEvC,IAAI,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;;;IAGvD,QAAQ,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;AACd,YAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,OAAO;;QAExC,IAAI,CAAC,iBAAiB,EAAE;;;IAG5B,kBAAkB,GAAA;QACd,IAAI,IAAI,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE;;;;;;AAO3C,IAAA,WAAW,CAAC,OAA6C,EAAA;;;;IAIzD,eAAe,GAAA;;;IAGf,QAAQ,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE;;;;IAIpC,QAAQ,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE;;;;IAIpC,QAAQ,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE;;;;IAIpC,MAAM,GAAA;AACF,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;;;;IAIlC,UAAU,GAAA;AACN,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE;;;;IAItC,OAAO,GAAA;AACH,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;;;;IAInC,aAAa,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE;;;;IAIzC,WAAW,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE;;;;IAIvC,eAAe,GAAA;AACX,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE;;;;IAI3C,aAAa,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE;;;;IAI3C,iBAAiB,GAAA;AACb,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE;;;;IAI3C,WAAW,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,OAAO,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE;;AAE1C,QAAA,OAAO,KAAK;;;IAGhB,WAAW,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,OAAO,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE;;AAE1C,QAAA,OAAO,KAAK;;;IAGhB,YAAY,GAAA;AACR,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACnB,YAAA,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE;;AAE3C,QAAA,OAAO,KAAK;;;AAGhB,IAAA,KAAK,CAAC,OAA2C,EAAE,KAAc,EAAE,QAAwC,EAAA;QACvG,IAAI,CAAC,iBAAiB,EAAE;QACxB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC;QAC9C,IAAI,CAAC,iBAAiB,EAAE;;;AAG5B,IAAA,OAAO,CAAC,OAA6C,EAAE,KAAc,EAAE,eAA+C,EAAE,cAA8C,EAAA;QAClK,IAAI,CAAC,iBAAiB,EAAE;AACxB,QAAA,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,cAAc,CAAC;QACvE,IAAI,CAAC,iBAAiB,EAAE;;;AAG5B,IAAA,MAAM,CAAC,OAAmC,EAAA;QACtC,IAAI,CAAC,iBAAiB,EAAE;QACxB,IAAI,CAAC,OAAO,EAAE;YACV,OAAO,GAAG,EAAE;;AAEhB,QAAA,IAAG,OAAO,CAAC,aAAa,EAAE;AACtB,YAAA,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,aAAa,EAAC,CAAC,QAAa,KAAI;AACvF,gBAAA,OAAO,CAAC,uBAAuB,CAAC,GAAG,QAAQ;AAC3C,gBAAA,IAAI,CAAC,uBAAuB,GAAG,QAAQ;AAC3C,aAAC,CAAC;AACF;;;;;AAKK;;AAEJ,aAAA,IAAG,CAAC,OAAO,CAAC,WAAW,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;YAC3E,IAAI,CAAC,OAAO,CAAC,WAAW,IAAI,IAAI,CAAC,gBAAgB,EAAE;AAC/C,gBAAA,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,gBAAgB;;;AAGnD,QAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,iBAAiB,EAAE;;;IAG5B,KAAK,GAAA;QACD,IAAI,CAAC,iBAAiB,EAAE;AACxB,QAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;;;IAG1B,WAAW,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;;AAEhC,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI;;;IAG5B,iBAAiB,CAAC,aAAkB,EAAE,QAAa,EAAA;AAC/C,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,aAAa,EAAE,QAAQ,CAAC;;;IAIjE,QAAQ,GAAA;QACJ,OAAO,IAAI,CAAC,YAAY;;;IAGpB,iBAAiB,GAAA;AACrB,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACjB,IAAI,CAAC,SAAS,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC;AAC/C,YAAA,IAAI,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,aAAa;AAC5C,gBAAA,OAAO,CAAC,QAAQ;AAChB,gBAAA,OAAO,CAAC,QAAQ;AAChB,gBAAA,OAAO,CAAC,eAAe;AACvB,gBAAA,OAAO,CAAC,QAAQ;AAChB,gBAAA,OAAO,CAAC,UAAU;AAClB,gBAAA,OAAO,CAAC,iBAAiB;AACzB,gBAAA,OAAO,CAAC,YAAY;AACpB,gBAAA,OAAO,CAAC,kBAAkB;AAC1B,gBAAA,OAAO,CAAC,aAAa;AACrB,gBAAA,OAAO,CAAC,iBAAiB;AACzB,gBAAA,OAAO,CAAC,YAAY;AACpB,gBAAA,OAAO,CAAC,mBAAmB;AAC3B,gBAAA,OAAO,CAAC,cAAc;AACtB,gBAAA,OAAO,CAAC,gBAAgB;AACxB,gBAAA,OAAO,CAAC,WAAW;AACnB,gBAAA,OAAO,CAAC;AACP,aAAA,CAAC;AACF,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;;;IAI1B,qBAAqB,CAAC,qBAA0B,EAAC,YAAiB,EAAA;QACtE,MAAM,SAAS,GAAG,IAAI;QAEtB,OAAO,cAAc,mBAAmB,CAAA;AACpC,YAAA,WAAA,GAAA;AACI,gBAAA,KAAK,CAAC,SAAS,EAAE,qBAAqB,EAAE,YAAY,CAAC;;SAE5D;;;IAGG,iBAAiB,GAAA;QACrB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;AAC7C,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE;;;;AAIjD,IAAA,cAAc,CAAC,iBAAsB,EAAE,aAAmB,EAAE,IAAU,EAAA;QAC1E,OAAO,IAAI,OAAO,CAAC,CAAC,UAAU,EAAE,SAAS,KAAI;YACzC,IAAI,MAAM,GAAG,EAAE;YACf,IAAI,IAAI,EAAE;gBACN,MAAM,GAAG,IAAI;;AAGjB,YAAA,MAAM,QAAQ,GAAI,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,IAAI,CAAC,gBAAgB,CAAC;YAC3G,MAAM,YAAY,GAAG,QAAQ;YAC7B,MAAM,YAAY,GAAG,IAAI,CAAC,uBAAuB,CAAC,WAAW,CAAC,YAAY,CAAC;AAE3E;;;;;AAKI;AAEJ,YAAA,aAAa,IAAI,aAAa,CAAC,QAAQ,EAAE,YAAY,CAAC;YACtD,UAAU,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;AAE9C;;;;;;;;;;;;AAYK;AACT,SAAC,CAAC;;;AAGN;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;AAEK,IAAA,8BAA8B,CAAC,OAAW,EAAA;AAE9C,QAAA,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC;;;uGA7TtC,mBAAmB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,yBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,QAAA,EAAA,UAAA,EAAA,OAAA,EAAA,SAAA,EAAA,aAAA,EAAA,eAAA,EAAA,QAAA,EAAA,UAAA,EAAA,SAAA,EAAA,WAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,YAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,aAAA,EAAA,eAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,YAAA,EAAA,MAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,0BAAA,EAAA,EAAA,SAAA,EAHlB,CAAC,yBAAyB,CAAC,0DAOpB,UAAU,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,IAAA,EAHY,gBAAgB,EAX7C,MAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;AAC2B,wCAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,yvYAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAS5B,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAZ/B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,EACxB,QAAA,EAAA,CAAA;yCAC2B,EACzB,UAAA,EAAA,KAAK,iBAIF,iBAAiB,CAAC,IAAI,EAC3B,SAAA,EAAA,CAAC,yBAAyB,CAAC,EAAA,MAAA,EAAA,CAAA,yvYAAA,CAAA,EAAA;2FAKrC,gBAAgB,EAAA,CAAA;sBADf,SAAS;uBAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE;gBAGnB,eAAe,EAAA,CAAA;sBAAlE,eAAe;AAAC,gBAAA,IAAA,EAAA,CAAA,UAAU,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;gBAEzC,OAAO,EAAA,CAAA;sBAAf;gBAES,WAAW,EAAA,CAAA;sBAApB;gBACS,QAAQ,EAAA,CAAA;sBAAjB;gBACS,OAAO,EAAA,CAAA;sBAAhB;gBACS,aAAa,EAAA,CAAA;sBAAtB;gBACS,QAAQ,EAAA,CAAA;sBAAjB;gBACS,SAAS,EAAA,CAAA;sBAAlB;gBACS,gBAAgB,EAAA,CAAA;sBAAzB;gBACS,WAAW,EAAA,CAAA;sBAApB;gBACS,iBAAiB,EAAA,CAAA;sBAA1B;gBACS,YAAY,EAAA,CAAA;sBAArB;gBACS,gBAAgB,EAAA,CAAA;sBAAzB;gBACS,WAAW,EAAA,CAAA;sBAApB;gBACS,gBAAgB,EAAA,CAAA;sBAAzB;gBACS,WAAW,EAAA,CAAA;sBAApB;gBACS,kBAAkB,EAAA,CAAA;sBAA3B;gBACS,aAAa,EAAA,CAAA;sBAAtB;gBACS,eAAe,EAAA,CAAA;sBAAxB;gBACS,UAAU,EAAA,CAAA;sBAAnB;gBACS,MAAM,EAAA,CAAA;sBAAf;gBAES,wBAAwB,EAAA,CAAA;sBAAjC;;AAsSL,MAAM,mBAAmB,CAAA;IACb,YAAY,GAAQ,IAAI;IACxB,YAAY,GAAQ,IAAI;AACxB,IAAA,YAAY;AACZ,IAAA,cAAc;AACd,IAAA,qBAAqB;AACrB,IAAA,YAAY;AAEpB,IAAA,WAAA,CAAY,cAAmB,EAAE,qBAA0B,EAAE,YAAiB,EAAA;AAC1E,QAAA,IAAI,CAAC,cAAc,GAAG,cAAc;AACpC,QAAA,IAAI,CAAC,qBAAqB,GAAG,qBAAqB;AAClD,QAAA,IAAI,CAAC,YAAY,GAAG,YAAY;;AAG7B,IAAA,IAAI,CAAC,IAAS,EAAA;QACjB,OAAO,IAAI,OAAO,CAAC,CAAC,UAAU,EAAE,SAAS,KAAI;YACzC,MAAM,QAAQ,GAAG,CAAC,cAAsC,EAAE,iBAAsB,EAAE,SAAsB,KAAI;AACxG,gBAAA,IAAI,CAAC,YAAY,GAAG,cAAc;AAClC,gBAAA,IAAI,CAAC,YAAY,GAAG,SAAS;gBAE7B,IAAI,iBAAiB,EAAE;AACnB,oBAAA,IAAI,CAAC,YAAY,GAAG,iBAAiB,CAAC,WAAW,CAAC,GAAG,iBAAiB,CAAC,WAAW,CAAC,GAAG,iBAAiB;oBACvG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE;oBAElD,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;wBAC7C,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC;AACzD,wBAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;;AAGhC,oBAAA,IAAI,CAAC,cAAc,CAAC,oBAAoB,GAAG;wBACvC,QAAQ,EAAE,IAAI,CAAC,YAAY;wBAC3B,YAAY,EAAE,IAAI,CAAC,YAAY;wBAC/B,SAAS,EAAE,IAAI,CAAC,qBAAqB;AACrC,wBAAA,IAAI,EAAE,IAAI;qBACb;oBAED,IAAI,CAAC,cAAc,CAAC,8BAA8B,CAAC,IAAI,CAAC,cAAc,CAAC,oBAAoB,CAAC;oBAC5F,UAAU,CAAC,iBAAiB,CAAC;AACjC,iBAAC;;;;;;;AAOE;AACP,aAAC;AAED,YAAA,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,CAAC,qBAAqB,EAAE,QAAQ,EAAE,IAAI,CAAC;AAClF,SAAC,CAAC;;IAGC,UAAU,GAAA;QACb,OAAO,IAAI,CAAC,YAAY;;IAGrB,YAAY,GAAA;QACf,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE;AACrD,YAAA,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE;;;IAIjC,OAAO,GAAA;QACV,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;AAChD,YAAA,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;;;AAGtC;;AC9ZD;;AC0BM,MAAO,aAAc,SAAQ,eAA8B,CAAA;AA6FzC,IAAA,uBAAA;AA1FpB,IAAA,gBAAgB;AAEP,IAAA,OAAO;IAChB,IAAa,UAAU,CAAC,SAAe,EAAA;AAEnC,QAAA,IAAI,CAAC,YAAY,GAAG,SAAS;AAC7B,QAAA,IAAG,IAAI,CAAC,SAAS,EACjB;AACI,YAAA,IAAI,CAAC,oBAAoB,GAAG,EAAE;YAC9B,IAAG,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAC/B;AACI,gBAAA,IAAI,CAAC,mBAAmB,GAAG,IAAI;;AAEnC,YAAA,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC;;;AAG7C,IAAA,IAAI,UAAU,GAAA;QAEV,OAAO,IAAI,CAAC,YAAY;;AAGlB,IAAA,YAAY,GAAqB,IAAI,YAAY,EAAE;AACnD,IAAA,WAAW,GAAqB,IAAI,YAAY,EAAE;AAClD,IAAA,aAAa,GAAqB,IAAI,YAAY,EAAE;AACpD,IAAA,UAAU,GAAqB,IAAI,YAAY,EAAE;AACjD,IAAA,gBAAgB,GAAqB,IAAI,YAAY,EAAE;AACvD,IAAA,YAAY,GAAqB,IAAI,YAAY,EAAE;AACnD,IAAA,YAAY,GAAqB,IAAI,YAAY,EAAE;AACnD,IAAA,cAAc,GAAqB,IAAI,YAAY,EAAE;AACrD,IAAA,WAAW,GAAqB,IAAI,YAAY,EAAE;AAClD,IAAA,iBAAiB,GAAqB,IAAI,YAAY,EAAE;AACxD,IAAA,YAAY,GAAqB,IAAI,YAAY,EAAE;AACnD,IAAA,WAAW,GAAqB,IAAI,YAAY,EAAE;AAClD,IAAA,qBAAqB,GAAqB,IAAI,YAAY,EAAE;AAC5D,IAAA,cAAc,GAAqB,IAAI,YAAY,EAAE;AACrD,IAAA,aAAa,GAAqB,IAAI,YAAY,EAAE;AACpD,IAAA,cAAc,GAAqB,IAAI,YAAY,EAAE;AACrD,IAAA,cAAc,GAAqB,IAAI,YAAY,EAAE;AACrD,IAAA,aAAa,GAAqB,IAAI,YAAY,EAAE;AACpD,IAAA,YAAY,GAAqB,IAAI,YAAY,EAAE;AACnD,IAAA,WAAW,GAAqB,IAAI,YAAY,EAAE;AAClD,IAAA,wBAAwB,GAAqB,IAAI,YAAY,EAAE;AAC/D,IAAA,sBAAsB,GAAqB,IAAI,YAAY,EAAE;AAE7D,IAAA,sBAAsB,GAAqB,IAAI,YAAY,EAAE;AAEhE,IAAA,OAAgB,aAAa,GAAG,cAAc;AAC9C,IAAA,OAAgB,4BAA4B,GAAG,MAAM;AACrD,IAAA,OAAgB,gCAAgC,GAAG,UAAU;AAC7D,IAAA,OAAgB,sBAAsB,GAAG,cAAc;AACvD,IAAA,OAAgB,eAAe,GAAG,OAAO;AACzC,IAAA,OAAgB,gBAAgB,GAAG,QAAQ;AAC3C,IAAA,OAAgB,uBAAuB,GAAG,cAAc;AACxD,IAAA,OAAgB,sBAAsB,GAAG,QAAQ;AACjD,IAAA,OAAgB,qBAAqB,GAAG,OAAO;AAC/C,IAAA,OAAgB,oBAAoB,GAAG,MAAM;AAC7C,IAAA,OAAgB,sBAAsB,GAAG,QAAQ;AACjD,IAAA,OAAgB,qBAAqB,GAAG,OAAO;AAC/C,IAAA,OAAgB,6BAA6B,GAAG,cAAc;AAC9D,IAAA,OAAgB,oBAAoB,GAAG,MAAM;AAC7C,IAAA,OAAgB,sBAAsB,GAAG,QAAQ;AACjD,IAAA,OAAgB,oBAAoB,GAAG,MAAM;AAC7C,IAAA,OAAgB,qBAAqB,GAAG,OAAO;AAC/C,IAAA,OAAgB,oBAAoB,GAAG,MAAM;AAC7C,IAAA,OAAgB,mBAAmB,GAAG,KAAK;AAC3C,IAAA,OAAgB,aAAa,GAAG,IAAI;AACpC,IAAA,OAAgB,eAAe,GAAG,MAAM;;AAExC,IAAA,OAAgB,oBAAoB,GAAG,MAAM;AAC7C,IAAA,OAAgB,mBAAmB,GAAG,KAAK;AAC3C,IAAA,OAAgB,0BAA0B,GAAG,aAAa;AAC1D,IAAA,OAAgB,0BAA0B,GAAG,aAAa;AAC1D,IAAA,OAAgB,sBAAsB,GAAG,SAAS;AAClD,IAAA,OAAgB,gBAAgB,GAAG,MAAM;AACzC,IAAA,OAAgB,oBAAoB,GAAG,UAAU;AACjD,IAAA,OAAgB,kBAAkB,GAAG,QAAQ;AAE5C,IAAA,YAAY;AACZ,IAAA,oBAAoB;AACpB,IAAA,8BAA8B;IAC9B,mBAAmB,GAAY,KAAK;IACpC,sBAAsB,GAAY,KAAK;IACvC,uBAAuB,GAAU,EAAE;AAEnC,IAAA,QAAQ;AACR,IAAA,cAAc,GAAqB,IAAI,OAAO,CAAU,OAAO,IAAG;QAClE,OAAO,CAAC,IAAI,CAAC;AACjB,KAAC,CACJ;AAED,IAAA,WAAA,CAAoB,uBAAkD,EAAA;AAElE,QAAA,KAAK,EAAE;QAFS,IAAuB,CAAA,uBAAA,GAAvB,uBAAuB;AAGvC,QAAA,IAAI,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC;;;IAGtC,QAAQ,GAAA;;;AAIR,IAAA,WAAW,CAAC,OAA2C,EAAA;AAEnD,QAAA,IAAG,IAAI,CAAC,cAAc,EACtB;;;;;IAKJ,SAAS,GAAA;AAEL,QAAA,IAAG,IAAI,CAAC,mBAAmB,EAC3B;AACI,YAAA,IAAG,IAAI,CAAC,QAAQ,EAChB;AACI,gBAAA,IAAI,OAAO,GAAQ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;gBACnD,IAAG,OAAO,EACV;AACI,oBAAA,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC;;;;;;IAMnD,eAAe,GAAA;QAEX,IAAG,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,OAAO,EAClC;AACI,YAAA,IAAI,OAAO,GAAkB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,EAAC,IAAI,CAAC;AACvE,YAAA,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;AACxD,YAAA,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC;YAC1F,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,4BAA4B,CAAC,OAAO,CAAC,mBAAmB,CAAC;YAC5F,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;AAC3D,YAAA,IAAG,IAAI,CAAC,YAAY,EACpB;AACI,gBAAA,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY;gBACzC,IAAG,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAC/B;AACI,oBAAA,IAAI,CAAC,mBAAmB,GAAG,IAAI;;;AAGvC,YAAA,IAAI,CAAC,oBAAoB,GAAG,EAAE;AAC9B,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,EAAC,OAAO,CAAC;;AAEjD,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;;;AAIlC,IAAA,eAAe,CAAC,MAAe,EAAA;AAE3B,QAAA,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,MAAM,CAAC;;;AAG3C,IAAA,iBAAiB,CAAC,aAAuB,EAAC,aAAsB,CAAC,EAAC,QAAiB,EAAE,EAAA;QAEjF,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,aAAa,EAAC,UAAU,EAAC,KAAK,CAAC;;;AAGrE,IAAA,QAAQ,CAAC,IAAU,EAAA;AAEf,QAAA,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,IAAI,CAAC;;;IAGlC,QAAQ,GAAA;AAEJ,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE;;;AAGrC,IAAA,SAAS,CAAC,UAA0B,EAAA;AAEhC,QAAA,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;;;AAG3D,IAAA,qBAAqB,CAAC,kBAAsB,EAAA;AAExC,QAAA,IAAI,CAAC,SAAS,EAAE,qBAAqB,CAAC,kBAAkB,CAAC;;;AAG7D,IAAA,cAAc,CAAC,IAAU,EAAA;QAErB,OAAO,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,IAAI,CAAC;;;AAG/C,IAAA,OAAO,CAAC,MAAc,EAAA;AAElB,QAAA,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC;;;AAGnC,IAAA,UAAU,CAAC,QAAgB,EAAA;AAEvB,QAAA,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,QAAQ,CAAC;;;AAGxC,IAAA,OAAO,CAAC,YAAqB,EAAA;AAEzB,QAAA,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,YAAY,CAAC;;;IAGzC,SAAS,GAAA;AAEL,QAAA,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE;;;IAG/B,WAAW,GAAA;AAEP,QAAA,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE;;;IAGjC,mBAAmB,CAAC,OAAa,EAAC,QAAiB,EAAA;QAE/C,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,OAAO,EAAC,QAAQ,CAAC;;;AAGzD,IAAA,UAAU,CAAC,GAAS,EAAA;QAEhB,OAAO,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG,CAAC;;;AAG1C,IAAA,WAAW,CAAC,IAAU,EAAA;QAElB,OAAO,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC;;;AAG5C,IAAA,WAAW,CAAC,OAAa,EAAA;QAErB,OAAO,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,OAAO,CAAC;;;AAG/C,IAAA,qBAAqB,CAAC,aAAsB,EAAA;QAExC,OAAO,IAAI,CAAC,SAAS,EAAE,qBAAqB,CAAC,aAAa,CAAC;;;IAG/D,aAAa,CAAC,KAAU,EAAC,QAAgC,EAAA;QAErD,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,KAAK,EAAC,QAAQ,CAAC;;;AAGjD,IAAA,WAAW,CAAC,QAAgB,EAAA;AAExB,QAAA,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC;;;AAGzC,IAAA,SAAS,CAAC,SAAwB,EAAA;AAE9B,QAAA,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;;;AAGhE,IAAA,gBAAgB,CAAC,aAAsB,EAAA;AAEnC,QAAA,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,aAAa,CAAC;;;AAGnD,IAAA,UAAU,CAAC,MAAuB,EAAA;QAE9B,OAAO,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC;;;AAG7C,IAAA,UAAU,CAAC,MAAuB,EAAA;QAE9B,OAAO,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC;;;IAG7C,WAAW,CAAC,YAA2B,EAAC,iBAAgC,EAAA;QAEpE,OAAO,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,YAAY,EAAC,iBAAiB,CAAC;;;IAGtE,UAAU,CAAC,MAAqB,EAAC,OAAe,EAAA;AAE5C,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,EAAC,OAAO,CAAC,IAAI,KAAK;;;IAG9D,MAAM,CAAC,MAAqB,EAAC,WAAoB,EAAA;QAE7C,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAC,WAAW,CAAC;;;AAG9C,IAAA,gBAAgB,CAAC,MAAqB,EAAA;AAElC,QAAA,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,MAAM,CAAC;;;AAG5C,IAAA,gBAAgB,CAAC,KAAa,EAAA;AAE1B,QAAA,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC;;;AAG3C,IAAA,mBAAmB,CAAC,aAAkB,EAAA;AAElC,QAAA,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,aAAa,CAAC;;;IAGtD,iBAAiB,CAAC,KAAa,EAAC,SAAiB,EAAA;QAE7C,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,KAAK,EAAC,SAAS,CAAC;;;IAGtD,oBAAoB,CAAC,aAAkB,EAAC,SAAiB,EAAA;QAErD,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,aAAa,EAAC,SAAS,CAAC;;;AAGjE,IAAA,sBAAsB,CAAC,IAAS,EAAA;AAE5B,QAAA,IAAI,CAAC,SAAS,EAAE,sBAAsB,CAAC,IAAI,CAAC;;;IAGhD,gBAAgB,GAAA;QAEZ,OAAO,IAAI,CAAC,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE;;AAGnD,IAAA,gBAAgB,CAAC,QAAe,EAAA;AAE5B,QAAA,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,QAAQ,CAAC;;;AAG9C,IAAA,gBAAgB,CAAC,QAAe,EAAA;AAE5B,QAAA,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,QAAQ,CAAC;;;AAG9C,IAAA,mBAAmB,CAAC,QAAe,EAAA;AAE/B,QAAA,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,QAAQ,CAAC;;;AAGjD,IAAA,eAAe,CAAC,IAAS,EAAA;AAErB,QAAA,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,IAAI,CAAC;;;AAGzC,IAAA,kBAAkB,CAAC,gBAA0B,EAAA;AAEzC,QAAA,IAAI,CAAC,SAAS,EAAE,kBAAkB,CAAC,gBAAgB,CAAC;;;IAGxD,gBAAgB,GAAA;AAEZ,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,gBAAgB,EAAE;;;IAG7C,eAAe,GAAA;AAEX,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,eAAe,EAAE;;;IAG5C,kBAAkB,GAAA;AAEd,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,kBAAkB,EAAE;;;IAG/C,gBAAgB,GAAA;AAEZ,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,gBAAgB,EAAE;;;IAG7C,WAAW,GAAA;AAEP,QAAA,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE;;;IAGjC,MAAM,CAAC,MAAW,EAAC,OAAY,EAAC,qBAA8B,KAAK,EAAC,WAAsB,GAAA,CAAC,CAAC,EAAA;AAExF,QAAA,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAC,OAAO,EAAC,kBAAkB,EAAC,WAAW,CAAC;;;IAGzE,YAAY,GAAA;AAER,QAAA,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE;;;IAGlC,eAAe,GAAA;QAEX,OAAO,IAAI,CAAC,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE;;;IAGlD,aAAa,CAAC,SAAiB,EAAC,IAAY,EAAA;QAExC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,SAAS,EAAC,IAAI,CAAC;;;IAGjD,eAAe,GAAA;AAEX,QAAA,IAAI,CAAC,SAAS,EAAE,eAAe,EAAE;;;IAGrC,cAAc,GAAA;AAEV,QAAA,IAAI,CAAC,SAAS,EAAE,cAAc,EAAE;;;AAGpC,IAAA,aAAa,CAAC,aAAqB,EAAC,iBAAA,GAA6B,KAAK,EAAA;QAElE,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,aAAa,EAAC,iBAAiB,CAAC;;;AAGlE,IAAA,gBAAgB,CAAC,OAAe,EAAA;AAE5B,QAAA,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,OAAO,CAAC;;;IAG7C,qBAAqB,GAAA;AAEjB,QAAA,IAAI,CAAC,SAAS,EAAE,qBAAqB,EAAE;;;;IAG3C,WAAW,CAAC,KAAU,EAAC,SAAkB,EAAA;QAErC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,KAAK,EAAC,SAAS,CAAC;;;IAEhD,cAAc,CAAC,aAAkB,EAAC,SAAkB,EAAA;QAEhD,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,aAAa,EAAC,SAAS,CAAC;;;IAE3D,UAAU,CAAC,IAAS,EAAC,SAAkB,EAAA;QAEnC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,EAAC,SAAS,CAAC;;;AAE9C,IAAA,eAAe,CAAC,KAAU,EAAC,SAAkB,EAAC,QAAiB,EAAA;QAE3D,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,KAAK,EAAC,SAAS,EAAC,QAAQ,CAAC;;;AAE7D,IAAA,kBAAkB,CAAC,aAAkB,EAAC,SAAkB,EAAC,QAAiB,EAAA;QAEtE,IAAI,CAAC,SAAS,EAAE,kBAAkB,CAAC,aAAa,EAAC,SAAS,EAAC,QAAQ,CAAC;;;AAExE,IAAA,cAAc,CAAC,IAAS,EAAC,SAAkB,EAAC,QAAiB,EAAA;QAEzD,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,IAAI,EAAC,SAAS,EAAC,QAAQ,CAAC;;;IAE3D,kBAAkB,GAAA;AAEd,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,kBAAkB,EAAE;;;;IAG/C,QAAQ,CAAC,SAAiB,EAAC,KAAU,EAAA;QAEjC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,SAAS,EAAC,KAAK,CAAC;;;AAG7C,IAAA,QAAQ,CAAC,OAAgB,EAAA;AAErB,QAAA,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC;;;IAGrC,QAAQ,GAAA;QAEJ,OAAO,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,KAAK;;;AAG9C,IAAA,QAAQ,CAAC,KAAa,EAAA;AAElB,QAAA,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;;;IAGnC,cAAc,CAAC,YAAoB,EAAC,KAAU,EAAA;QAE1C,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,YAAY,EAAC,KAAK,CAAC;;;IAGtD,4BAA4B,CAAC,UAAiB,EAAC,QAAgB,EAAA;AAE3D,QAAA,IAAG,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,QAAQ,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,EAC/L;AACI,YAAA,OAAO,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC;;AAEtE,QAAA,OAAO,IAAI;;;IAGf,iCAAiC,CAAC,UAAiB,EAAC,QAAgB,EAAA;AAEhE,QAAA,IAAG,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,QAAQ,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,EACpM;AACI,YAAA,OAAO,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC;;AAE3E,QAAA,OAAO,IAAI;;;AAGf,IAAA,kCAAkC,CAAC,UAAiB,EAAA;QAEhD,IAAI,QAAQ,GAAW,CAAC;AACxB,QAAA,IAAG,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,QAAQ,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,gBAAgB,CAAC,EACrM;AACI,YAAA,OAAO,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,gBAAgB,CAAC;;AAE5E,QAAA,OAAO,IAAI;;;IAGf,mCAAmC,CAAC,UAAiB,EAAC,QAAgB,EAAA;AAElE,QAAA,IAAG,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,QAAQ,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC,EACtM;AACI,YAAA,OAAO,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,iBAAiB,CAAC;;AAE7E,QAAA,OAAO,IAAI;;;IAGf,0CAA0C,CAAC,UAAiB,EAAC,QAAgB,EAAA;AAEzE,QAAA,IAAG,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,QAAQ,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,wBAAwB,CAAC,EAC7M;AACI,YAAA,OAAO,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,wBAAwB,CAAC;;AAEpF,QAAA,OAAO,IAAI;;;IAGf,0BAA0B,CAAC,UAAiB,EAAC,QAAgB,EAAA;AAEzD,QAAA,IAAG,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,QAAQ,IAAI,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAC7L;AACI,YAAA,OAAO,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;;AAEpE,QAAA,OAAO,IAAI;;;IAGf,OAAO,GAAA;QAEH,OAAQ,IAAI,CAAC,SAAS;;;AAGlB,IAAA,qBAAqB,CAAC,OAAY,EAAA;AAEtC,QAAA,IAAG,IAAI,CAAC,sBAAsB,EAC9B;YACI,IAAI,IAAI,GAAQ,IAAI;YACpB,IAAI,WAAW,GAAQ,UAAS,MAAwC,EAAA;AAEpE,gBAAA,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,EAAC,MAAM,CAAC,YAAY,CAAC;AACjE,aAAC;AACD,YAAA,OAAO,CAAC,kBAAkB,CAAC,CAAC,MAAwC,KAAK,WAAW,CAAC,MAAM,CAAC,CAAC;AAC7F,YAAA,OAAO,CAAC,gBAAgB,CAAC,CAAC,MAAwC,KAAM,WAAW,CAAC,MAAM,CAAC,CAAC;AAC5F,YAAA,OAAO,CAAC,kBAAkB,CAAC,CAAC,MAAwC,KAAK,WAAW,CAAC,MAAM,CAAC,CAAC;;AAElG,QAAA,IAAI,CAAC,sBAAsB,GAAG,IAAI;;;AAG7B,IAAA,WAAW,CAAC,UAAsC,EAAA;QAEtD,IAAG,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EACtC;YACI,IAAI,QAAQ,GAAoB,EAAE;AAClC,YAAA,KAAK,IAAI,MAAM,IAAI,UAAU,EAC7B;gBACI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;;AAEjD,YAAA,OAAO,QAAQ;;AAEnB,QAAA,OAAO,EAAE;;;AAGL,IAAA,iBAAiB,CAAC,SAAoC,EAAA;QAE1D,IAAG,SAAS,EACZ;YACI,IAAI,IAAI,GAAQ,IAAI;AACpB,YAAA,IAAG,SAAS,CAAC,qBAAqB,EAClC;AACI,gBAAA,SAAS,CAAC,YAAY,GAAG,UAAS,IAAS,EAAC,SAAiB,EAAC,KAAa,EAAC,QAAgB,EAAC,GAAQ,EAAA;AAEjG,oBAAA,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,qBAAqB,EAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,QAAQ,EAAC,GAAG,CAAC;AAC7F,iBAAC;;AAEL,YAAA,IAAG,SAAS,CAAC,sBAAsB,EACnC;gBACI,SAAS,CAAC,aAAa,GAAG,UAAS,IAAS,EAAC,SAAiB,EAAC,KAAa,EAAC,QAAgB,EAAC,GAAQ,EAAC,WAAkB,EAAC,aAAqB,EAAC,eAAsB,EAAC,UAAiB,EAAA;oBAEpL,OAAO,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,sBAAsB,EAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,QAAQ,EAAC,GAAG,EAAC,WAAW,EAAC,aAAa,EAAC,eAAe,EAAC,UAAU,CAAC;AACxJ,iBAAC;;AAEL,YAAA,IAAG,SAAS,CAAC,uBAAuB,EACpC;AACI,gBAAA,SAAS,CAAC,cAAc,GAAG,UAAS,OAAsB,EAAC,QAAgB,EAAA;AAEvE,oBAAA,OAAO,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,uBAAuB,EAAC,OAAO,EAAC,QAAQ,CAAC;AACpF,iBAAC;;AAEL,YAAA,IAAG,SAAS,CAAC,wBAAwB,EACrC;AACI,gBAAA,SAAS,CAAC,eAAe,GAAG,UAAS,IAAS,EAAC,SAAiB,EAAC,KAAa,EAAC,QAAgB,EAAC,GAAQ,EAAA;AAEpG,oBAAA,OAAO,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,wBAAwB,EAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,QAAQ,EAAC,GAAG,CAAC;AACvG,iBAAC;;AAEL,YAAA,IAAG,SAAS,CAAC,+BAA+B,EAC5C;AACI,gBAAA,SAAS,CAAC,sBAAsB,GAAG,UAAS,SAAiB,EAAC,OAAsB,EAAC,wBAA+B,EAAC,QAAgB,EAAC,QAAgB,EAAC,eAAoB,EAAC,cAAmB,EAAA;oBAE3L,OAAO,IAAI,CAAC,wBAAwB,CAAC,SAAS,CAAC,+BAA+B,EAAC,SAAS,EAAC,OAAO,EAAC,wBAAwB,EAAC,QAAQ,EAAC,QAAQ,EAAC,eAAe,EAAC,cAAc,CAAC;AAC/K,iBAAC;;YAEL,IAAG,SAAS,CAAC,aAAa,IAAI,SAAS,CAAC,aAAa,CAAC,YAAY,EAClE;AACI,gBAAA,SAAS,CAAC,aAAa,CAAC,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,aAAa,CAAC,YAAY,EAAC,SAAS,CAAC;;;QAGlH,OAAO,SAAS,IAAI,EAAE;;;IAGlB,cAAc,CAAC,qBAA0B,EAAC,SAAwB,EAAA;QAEtE,IAAI,IAAI,GAAQ,IAAI;AACpB,QAAA,IAAI,QAAQ,GAAQ,YAAA;YAEhB,IAAI,YAAY,GAAQ,IAAI;AAC5B,YAAA,IAAI,YAAgC;AAEpC,YAAA,IAAI,CAAC,IAAI,GAAG,UAAS,OAA4C,EAAA;AAE5D,gBAAA,IAAI,KAAK,GAAW,OAAO,CAAC,QAAQ;AACpC,gBAAA,IAAI,MAAM,GAAQ,IAAI,CAAC,cAAc,CAAC,qBAAqB,EAAC,SAAS,CAAC,SAAS,EAAC,KAAK,CAAC;AACtF,gBAAA,YAAY,GAAG,MAAM,CAAC,QAAQ;AAC9B,gBAAA,YAAY,GAAG,MAAM,CAAC,GAAG;AACzB,gBAAA,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC;AAC1B,gBAAA,IAAI,OAAO,GAAyC,EAAC,QAAQ,EAAE,YAAY,EAAC,YAAY,EAAE,YAAY,EAAC,OAAO,EAAE,OAAO,EAAC,OAAO,EAAE,SAAS,EAAC,KAAK,EAAE,KAAK,EAAC,QAAQ,EAAE,OAAO,CAAC,SAAS,EAAC,UAAU,EAAE,SAAS,CAAC,SAAS,EAAC;;gBAEpN,SAAS,CAAC,SAAS,KAAK,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC;AAClG,gBAAA,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC;AACjD,aAAC;YACD,IAAI,CAAC,UAAU,GAAG,YAAA;AAEd,gBAAA,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC;AAC1C,aAAC;YACD,IAAI,CAAC,YAAY,GAAG,YAAA;AAEhB,gBAAA,IAAG,YAAY,IAAI,YAAY,CAAC,YAAY,EAC5C;oBACI,YAAY,CAAC,YAAY,EAAE;;AAEnC,aAAC;AACD,YAAA,IAAI,CAAC,aAAa,GAAG,UAAS,KAAU,EAAC,OAAY,EAAA;AAEjD,gBAAA,IAAG,YAAY,IAAI,YAAY,CAAC,aAAa,EAC7C;AACI,oBAAA,YAAY,CAAC,aAAa,CAAC,KAAK,EAAC,OAAO,CAAC;;AAEjD,aAAC;YACD,IAAI,CAAC,QAAQ,GAAG,YAAA;AAEZ,gBAAA,OAAO,YAAY,CAAC,QAAQ,EAAE;AAClC,aAAC;YACD,IAAI,CAAC,OAAO,GAAG,YAAA;AAEX,gBAAA,IAAG,YAAY,IAAI,YAAY,CAAC,OAAO,EACvC;oBACI,YAAY,CAAC,OAAO,EAAE;;AAE9B,aAAC;YACD,IAAI,CAAC,QAAQ,GAAG,YAAA;gBAEZ,YAAY,CAAC,QAAQ,EAAE;AAC3B,aAAC;YACD,IAAI,CAAC,QAAQ,GAAG,YAAA;AAEZ,gBAAA,IAAG,YAAY,IAAI,YAAY,CAAC,QAAQ,EACxC;AACI,oBAAA,OAAO,YAAY,CAAC,QAAQ,EAAE;;AAElC,gBAAA,OAAO,IAAI;AACf,aAAC;AACD,YAAA,IAAI,CAAC,eAAe,GAAG,UAAS,YAAiB,EAAA;AAE7C,gBAAA,IAAG,YAAY,IAAI,YAAY,CAAC,eAAe,EAC/C;AACI,oBAAA,OAAO,YAAY,CAAC,eAAe,CAAC,YAAY,CAAC;;AAErD,gBAAA,OAAO,IAAI;AACf,aAAC;YACD,IAAI,CAAC,QAAQ,GAAG,YAAA;AAEZ,gBAAA,IAAG,YAAY,IAAI,YAAY,CAAC,QAAQ,EACxC;AACI,oBAAA,OAAO,YAAY,CAAC,QAAQ,EAAE;;AAElC,gBAAA,OAAO,IAAI;AACf,aAAC;YACD,IAAI,CAAC,OAAO,GAAG,YAAA;AAEX,gBAAA,IAAI,YAAY,IAAI,YAAY,CAAC,OAAO,EAAE;AACtC,oBAAA,OAAO,YAAY,CAAC,OAAO,EAAE;;AAEjC,gBAAA,OAAO,KAAK;AAChB,aAAC;YACD,IAAI,CAAC,IAAI,GAAG,YAAA;AAER,gBAAA,IAAG,YAAY,IAAI,YAAY,CAAC,IAAI,EACpC;oBACI,YAAY,CAAC,IAAI,EAAE;;AAE3B,aAAC;YACD,IAAI,CAAC,MAAM,GAAG,YAAA;AAEV,gBAAA,IAAG,YAAY,IAAI,YAAY,CAAC,MAAM,EACtC;oBACI,YAAY,CAAC,MAAM,EAAE;;AAE7B,aAAC;AACD,YAAA,IAAI,CAAC,eAAe,GAAG,UAAS,YAAyB,EAAA;AAErD,gBAAA,IAAG,YAAY,IAAI,YAAY,CAAC,eAAe,EAC/C;AACI,oBAAA,YAAY,CAAC,eAAe,CAAC,YAAY,CAAC;;AAElD,aAAC;AACL,SAAC;AAED,QAAA,OAAO,QAAQ;;;IAGX,UAAU,CAAC,iBAAsB,EAAC,IAAS,EAAC,SAAiB,EAAC,KAAa,EAAC,QAAgB,EAAC,GAAQ,EAAA;QAEzG,IAAG,IAAI,EACP;AACI,YAAA,IAAI,MAAM,GAAQ,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAC,SAAS,EAAC,KAAK,CAAC;AACxE,YAAA,IAAI,YAAY,GAAQ,MAAM,CAAC,QAAQ;AACvC,YAAA,YAAY,CAAC,OAAO,CAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,QAAQ,EAAC,GAAG,CAAC;AACvD,YAAA,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC;AACnC,YAAA,IAAI,OAAO,GAAqC,EAAC,QAAQ,EAAE,YAAY,EAAC,YAAY,EAAE,MAAM,CAAC,GAAG,EAAC,IAAI,EAAE,IAAI,EAAC,KAAK,EAAE,KAAK,EAAC,QAAQ,EAAE,QAAQ,EAAC,UAAU,EAAE,SAAS,EAAC;AAClK,YAAA,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,GAAG,OAAO;;AAEjE,YAAA,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC;YAC5C,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;;AAEzC,QAAA,OAAO,IAAI;;;AAGP,IAAA,eAAe,CAAC,iBAAsB,EAAC,IAAS,EAAC,SAAiB,EAAC,KAAa,EAAC,QAAgB,EAAC,GAAQ,EAAC,WAAkB,EAAC,aAAqB,EAAC,eAAsB,EAAC,UAAiB,EAAA;QAEhM,IAAG,IAAI,EACP;AACI,YAAA,IAAI,MAAM,GAAQ,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAC,SAAS,EAAC,KAAK,CAAC;AACxE,YAAA,IAAI,YAAY,GAAQ,MAAM,CAAC,QAAQ;YACvC,YAAY,CAAC,OAAO,CAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,QAAQ,EAAC,GAAG,EAAC,WAAW,EAAC,aAAa,EAAC,eAAe,EAAC,UAAU,CAAC;AAC5G,YAAA,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC;AACnC,YAAA,IAAI,OAAO,GAAyC,EAAC,QAAQ,EAAE,YAAY,EAAC,YAAY,EAAE,MAAM,CAAC,GAAG,EAAC,IAAI,EAAE,IAAI,EAAC,KAAK,EAAE,KAAK,EAAC,QAAQ,EAAE,QAAQ,EAAC,UAAU,EAAE,SAAS,EAAC;AACtK,YAAA,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,GAAG,OAAO;AACtE,YAAA,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC;YAC5C,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;;AAEzC,QAAA,OAAO,IAAI;;;AAGP,IAAA,gBAAgB,CAAC,iBAAsB,EAAC,OAAsB,EAAC,QAAgB,EAAA;QAEnF,IAAG,OAAO,EACV;AACI,YAAA,IAAI,SAAS,GAAY,OAAO,CAAC,SAAS,IAAI,EAAE;YAChD,IAAI,KAAK,GAAY,CAAC;AACtB,YAAA,IAAI,MAAM,GAAQ,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAC,SAAS,EAAC,KAAK,CAAC;AACxE,YAAA,IAAI,YAAY,GAAQ,MAAM,CAAC,QAAQ;AACvC,YAAA,YAAY,CAAC,OAAO,CAAC,OAAO,EAAC,QAAQ,CAAC;AACtC,YAAA,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC;YACnC,IAAI,OAAO,GAA2C,EAAC,QAAQ,EAAE,YAAY,EAAC,YAAY,EAAE,MAAM,CAAC,GAAG,EAAC,KAAK,EAAE,KAAK,EAAC,OAAO,EAAE,OAAO,EAAC,QAAQ,EAAE,QAAQ,EAAC;AACxJ,YAAA,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,GAAG,OAAO;AACvE,YAAA,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC;YAC5C,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;;AAEzC,QAAA,OAAO,IAAI;;;IAGP,iBAAiB,CAAC,iBAAsB,EAAC,IAAS,EAAC,SAAiB,EAAC,KAAa,EAAC,QAAgB,EAAC,GAAQ,EAAA;QAEhH,IAAG,IAAI,EACP;AACI,YAAA,IAAI,MAAM,GAAQ,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAC,SAAS,EAAC,KAAK,CAAC;AACxE,YAAA,IAAI,YAAY,GAAQ,MAAM,CAAC,QAAQ;AACvC,YAAA,YAAY,CAAC,OAAO,CAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,QAAQ,EAAC,GAAG,CAAC;AACvD,YAAA,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC;AACnC,YAAA,IAAI,OAAO,GAA4C,EAAC,QAAQ,EAAE,YAAY,EAAC,YAAY,EAAE,MAAM,CAAC,GAAG,EAAC,IAAI,EAAE,IAAI,EAAC,KAAK,EAAE,KAAK,EAAC,QAAQ,EAAE,QAAQ,EAAC,UAAU,EAAE,SAAS,EAAC;AACzK,YAAA,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC,GAAG,OAAO;AACxE,YAAA,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC;YAC5C,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC;;AAExC,QAAA,OAAO,IAAI;;;AAGP,IAAA,wBAAwB,CAAC,iBAAsB,EAAC,SAAiB,EAAC,OAAsB,EAAC,kBAAyB,EAAC,KAAa,EAAC,QAAgB,EAAC,eAAoB,EAAC,cAAmB,EAAA;QAE9L,IAAG,OAAO,EACV;AACI,YAAA,IAAI,MAAM,GAAQ,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAC,SAAS,EAAC,KAAK,CAAC;AACxE,YAAA,IAAI,YAAY,GAAQ,MAAM,CAAC,QAAQ;AACvC,YAAA,YAAY,CAAC,OAAO,CAAC,SAAS,EAAC,OAAO,EAAC,kBAAkB,EAAC,KAAK,EAAC,QAAQ,EAAC,eAAe,EAAC,cAAc,CAAC;AACxG,YAAA,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC;AACnC,YAAA,IAAI,OAAO,GAAmD,EAAC,QAAQ,EAAE,YAAY,EAAC,YAAY,EAAE,MAAM,CAAC,GAAG,EAAC,OAAO,EAAE,OAAO,EAAC,KAAK,EAAE,KAAK,EAAC,QAAQ,EAAE,QAAQ,EAAC,UAAU,EAAE,SAAS,EAAC;AACtL,YAAA,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,wBAAwB,CAAC,GAAG,OAAO;AAC/E,YAAA,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC;YAC5C,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC;;AAExC,QAAA,OAAO,IAAI;;;AAGP,IAAA,4BAA4B,CAAC,mBAA2D,EAAA;QAC5F,IAAG,mBAAmB,EAAE;AACpB,YAAA,IAAG,mBAAmB,CAAC,cAAc,EAAE;gBACnC,mBAAmB,CAAC,cAAc,GAAG,IAAI,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,cAAc,CAAC;;;AAG7G,QAAA,OAAO,mBAAmB;;AAGtB,IAAA,uBAAuB,CAAC,cAA8C,EAAA;QAC1E,MAAM,SAAS,GAAG,IAAI;QAEtB,OAAO,cAAc,0BAA0B,CAAA;AAC3C,YAAA,WAAA,GAAA;AACI,gBAAA,KAAK,CAAC,SAAS,EAAE,cAAc,CAAC;;SAEvC;;IAGG,cAAc,CAAC,iBAAsB,EAAC,SAAwB,EAAE,KAAa,EAAE,aAAmB,EAAE,IAAU,EAAA;AAElH,QAAA,IAAI,YAAY,GAAsB,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,IAAI,CAAC,gBAAgB,CAAC;QAC/H,IAAI,YAAY,GAAQ,IAAI,CAAC,uBAAuB,CAAC,WAAW,CAAC,YAAY,CAAC;QAC9E,IAAG,SAAS,EAAE;AACV,YAAA,IAAI,CAAC,wBAAwB,CAAC,SAAS,EAAE,KAAK,CAAC;;QAEnD,OAAO,EAAC,GAAG,EAAE,YAAY,EAAC,QAAQ,EAAE,YAAY,EAAC;;;IAG7C,wBAAwB,CAAC,SAAiB,EAAC,KAAa,EAAA;QAC5D,IAAG,CAAC,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,EACxC;AACI,YAAA,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,EAAE;;QAE7C,IAAG,CAAC,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,EAC/C;YACI,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;;;IAIhD,iBAAiB,CAAC,SAAiB,EAAC,IAAS,EAAC,KAAU,EAAC,OAAkB,GAAA,IAAI,EAAC,UAAA,GAAqB,KAAK,EAAA;AAE9G,QAAA,IAAG,CAAC,IAAI,CAAC,YAAY,EACrB;AACI,YAAA,IAAI,YAAY,GAAkC,IAAK,CAAC,SAAS,CAAC;YAClE,IAAI,YAAY,EAChB;gBACI,IAAI,KAAK,GAAQ,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,EAAE,IAAI,EAAC;gBACpD,IAAG,KAAK,EACR;AACK,oBAAA,KAAK,IAAI,GAAG,IAAI,KAAK,EACrB;AACI,wBAAA,IAAG,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,EAC5B;4BACI,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC;;;;AAIpC,gBAAA,IAAI,SAAS,KAAK,cAAc,EAChC;oBACI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,IAAG;AAC/B,wBAAA,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;qBAC3B,EAAE;;qBAGP;AACI,oBAAA,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;;;iBAIhC;AACI,gBAAA,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,uCAAuC,CAAC;;;;;AAKtE,IAAA,8BAA8B,CAAC,OAAW,EAAA;AAE9C,QAAA,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC;;;AAGvC,IAAA,kBAAkB,CAAC,YAA+B,EAAA;AAEtD,QAAA,YAAY,CAAC,iBAAiB,CAAC,aAAa,EAAE;;;AAG1C,IAAA,YAAY,CAAC,YAA+B,EAAA;AAEhD,QAAA,OAAO,YAAY,CAAC,QAAQ,CAAC,aAAa;;;uGAn3BrC,aAAa,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,yBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,s6BAHZ,CAAC,yBAAyB,CAAC,EAKE,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,IAAA,EAAA,gBAAgB,uFAZ7C,+CAA+C,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,u79CAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAUhD,aAAa,EAAA,UAAA,EAAA,CAAA;kBAZzB,SAAS;+BACI,iBAAiB,EAAA,QAAA,EACjB,+CAA+C,EAAA,UAAA,EAC7C,KAAK,EAAA,aAAA,EAKF,iBAAiB,CAAC,IAAI,EAAA,SAAA,EAC3B,CAAC,yBAAyB,CAAC,EAAA,MAAA,EAAA,CAAA,u79CAAA,CAAA,EAAA;2FAMrC,gBAAgB,EAAA,CAAA;sBADf,SAAS;uBAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE;gBAG9D,OAAO,EAAA,CAAA;sBAAf;gBACY,UAAU,EAAA,CAAA;sBAAtB;gBAkBS,YAAY,EAAA,CAAA;sBAArB;gBACS,WAAW,EAAA,CAAA;sBAApB;gBACS,aAAa,EAAA,CAAA;sBAAtB;gBACS,UAAU,EAAA,CAAA;sBAAnB;gBACS,gBAAgB,EAAA,CAAA;sBAAzB;gBACS,YAAY,EAAA,CAAA;sBAArB;gBACS,YAAY,EAAA,CAAA;sBAArB;gBACS,cAAc,EAAA,CAAA;sBAAvB;gBACS,WAAW,EAAA,CAAA;sBAApB;gBACS,iBAAiB,EAAA,CAAA;sBAA1B;gBACS,YAAY,EAAA,CAAA;sBAArB;gBACS,WAAW,EAAA,CAAA;sBAApB;gBACS,qBAAqB,EAAA,CAAA;sBAA9B;gBACS,cAAc,EAAA,CAAA;sBAAvB;gBACS,aAAa,EAAA,CAAA;sBAAtB;gBACS,cAAc,EAAA,CAAA;sBAAvB;gBACS,cAAc,EAAA,CAAA;sBAAvB;gBACS,aAAa,EAAA,CAAA;sBAAtB;gBACS,YAAY,EAAA,CAAA;sBAArB;gBACS,WAAW,EAAA,CAAA;sBAApB;gBACS,wBAAwB,EAAA,CAAA;sBAAjC;gBACS,sBAAsB,EAAA,CAAA;sBAA/B;gBAES,sBAAsB,EAAA,CAAA;sBAA/B;;AAw0BL,MAAM,0BAA0B,CAAA;IACpB,YAAY,GAAQ,IAAI;IACxB,YAAY,GAAQ,IAAI;AACxB,IAAA,YAAY;AACZ,IAAA,SAAS;AACT,IAAA,cAAc;IAEtB,WAAY,CAAA,SAAc,EAAE,cAA8C,EAAA;AACtE,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;AAC1B,QAAA,IAAI,CAAC,cAAc,GAAG,cAAc;;AAGjC,IAAA,IAAI,CAAC,KAA0C,EAAA;QAClD,OAAO,IAAI,OAAO,CAAC,CAAC,UAAU,EAAE,SAAS,KAAI;YACzC,MAAM,QAAQ,GAAG,CAAC,cAAgC,EAAE,iBAAsB,EAAE,SAA6B,KAAI;AACzG,gBAAA,IAAI,CAAC,YAAY,GAAG,cAAc;;gBAGlC,IAAI,iBAAiB,EAAE;AACnB,oBAAA,IAAI,CAAC,YAAY,GAAG,iBAAiB,CAAC,WAAW,CAAC,GAAG,iBAAiB,CAAC,WAAW,CAAC,GAAG,iBAAiB;AACvG,oBAAA,IAAG,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE;wBAC7B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE;;yBAEjD;wBACD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,aAAa;;oBAGhE,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;AAC7C,wBAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;;AAGjC,oBAAA,MAAM,OAAO,GAA2C;wBACpD,QAAQ,EAAE,IAAI,CAAC,YAAY;AAC3B,wBAAA,YAAY,EAAE,cAAc;AAC5B,wBAAA,KAAK,EAAE;qBACV;oBAED,IAAI,CAAC,SAAS,CAAC,8BAA8B,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,OAAO;oBACvE,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC;oBACnD,UAAU,CAAC,cAAc,CAAC;;qBACvB;AACH,oBAAA,MAAM,OAAO,GAA2C;AACpD,wBAAA,QAAQ,EAAE,IAAI;wBACd,YAAY,EAAE,IAAI,CAAC,YAAY;AAC/B,wBAAA,KAAK,EAAE;qBACV;oBAED,IAAI,CAAC,SAAS,CAAC,8BAA8B,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,OAAO;AACvE,oBAAA,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,IAAI,CAAC;AACxC,wBAAA,QAAQ,EAAE,YAAY;AACtB,wBAAA,cAAc,EAAE,cAAc;AAC9B,wBAAA,SAAS,EAAE,SAAS;AACpB,wBAAA,OAAO,EAAE;AACZ,qBAAA,CAAC;;AAEV,aAAC;YAED,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzC,YAAA,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,8BAA8B,EAAE;AAChD,gBAAA,IAAI,CAAC,SAAS,CAAC,8BAA8B,GAAG,EAAE;;AAEtD;;AAEiC;YACjC,MAAM,MAAM,GAAQ,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,CAAC;YACrG,YAAY,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC;AACnD,SAAC,CAAC;;IAGC,UAAU,GAAA;QACb,OAAO,IAAI,CAAC,YAAY;;AAGrB,IAAA,YAAY,CAAC,MAA2C,EAAA;QAC3D,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE;AACrD,YAAA,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC;;;AAIvC,IAAA,eAAe,CAAC,MAA2C,EAAA;QAC9D,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE;YACxD,OAAO,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,MAAM,CAAC;;AAEpD,QAAA,OAAO,IAAI;;IAGR,OAAO,GAAA;QACV,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;AAChD,YAAA,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;;;AAGtC;AAAA;;AC5+BD;;ACuBM,MAAO,qBAAsB,SAAQ,eAAsC,CAAA;AACpE,IAAA,OAAO;AAEN,IAAA,iBAAiB,GAAsB,IAAI,YAAY,EAAE;AACzD,IAAA,UAAU,GAAsB,IAAI,YAAY,EAAE;AAClD,IAAA,YAAY,GAAsB,IAAI,YAAY,EAAE;AAE9D,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE;AACP,QAAA,IAAI,CAAC,iBAAiB,CAAC,CAAC,gBAAgB,CAAC,CAAC;;;IAG9C,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,gBAAgB,CAAC,CAAC,cAAc,CAAC,mBAAmB;AACrD,YAAA,cAAc,CAAC,WAAW;AAC1B,YAAA,cAAc,CAAC,cAAc,CAAC,CAAC;QAEpC,IAAI,CAAC,MAAM,EAAE;;;AAGhB,IAAA,WAAW,CAAC,OAA6C,EAAA;;;IAIzD,eAAe,GAAA;;;IAGf,MAAM,GAAA;QACF,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,OAAO,EAAE;AACjC,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC;AAC/D,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;;;uGA9BzB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,8QARpB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,+qKAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAQH,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAVjC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,YAC1B,EAAE,EAAA,UAAA,EACA,KAAK,EAIF,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,+qKAAA,CAAA,EAAA;wDAI5B,OAAO,EAAA,CAAA;sBAAf;gBAES,iBAAiB,EAAA,CAAA;sBAA1B;gBACS,UAAU,EAAA,CAAA;sBAAnB;gBACS,YAAY,EAAA,CAAA;sBAArB;;;ACPC,MAAO,6BAA8B,SAAQ,eAA8C,CAAA;AAMzE,IAAA,MAAA;AALX,IAAA,OAAO;IACP,UAAU,GAAkC,EAAE;AAE7C,IAAA,sBAAsB,GAAsB,IAAI,YAAY,EAAE;AAExE,IAAA,WAAA,CAAoB,MAAc,EAAA;AAC9B,QAAA,KAAK,EAAE;QADS,IAAM,CAAA,MAAA,GAAN,MAAM;AAEtB,QAAA,IAAI,CAAC,iBAAiB,CAAC,CAAC,wBAAwB,CAAC,CAAC;;AAGtD,IAAA,WAAW,CAAC,OAA6C,EAAA;QACrD,IAAI,OAAO,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE;YACzC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC;YAC1C,IAAI,CAAC,kBAAkB,EAAE;;;IAIjC,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACjB,IAAI,CAAC,gBAAgB,CAAC,CAAC,sBAAsB,CAAC,wBAAwB,CAAC,CAAC;AACxE,YAAA,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO;YAC9B,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU;AACzC,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI,sBAAsB,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC;YACpE,IAAI,CAAC,kBAAkB,EAAE;AACzB,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;;AAIlC,IAAA,eAAe;AAEf,IAAA,UAAU,CAAC,aAAkB,EAAA;AACzB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,aAAa,CAAC;;;AAIhD,IAAA,aAAa,CAAC,MAAqC,EAAA;AAC/C,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC;YACjC,IAAI,CAAC,kBAAkB,EAAE;;;IAIjC,QAAQ,CAAC,SAAiB,EAAE,KAAU,EAAA;AAClC,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;;;AAIjD,IAAA,QAAQ,CAAC,OAAgB,EAAA;AACrB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC;;;IAIxC,QAAQ,GAAA;QACJ,OAAO,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,KAAK;;AAG9C,IAAA,QAAQ,CAAC,KAAa,EAAA;AAClB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;;;IAI9B,kBAAkB,GAAA;QACtB,IAAI,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,CAAC,EAAE;AAC7B,YAAA,KAAK,IAAI,MAAM,IAAI,IAAI,CAAC,UAAU,EAAE;AAChC,gBAAA,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC;;;;AAKvC,IAAA,sBAAsB,CAAC,IAAiC,EAAA;QAC5D,IAAI,IAAI,EAAE;AACN,YAAA,IAAI,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE;AACzB,gBAAA,KAAK,IAAI,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE;AACnC,oBAAA,IAAI,CAAC,sBAAsB,CAAC,SAAS,CAAC;;;iBAEvC;AACH,gBAAA,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;;;;IAKtD,kBAAkB,CAAC,KAAU,EAAE,IAAiC,EAAA;QACpE,IAAI,IAAI,EAAE;YACN,IAAI,cAAc,GAAG,IAAI;AACzB,YAAA,IAAI,IAAI,CAAC,OAAO,EAAE;gBACd,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC;;AAE9C,YAAA,IAAI,IAAI,CAAC,MAAM,IAAI,cAAc,KAAK,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE;gBAC9D,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC;AAC1C,gBAAA,MAAM,cAAc,GAAG,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,QAAQ,GAAG,CAAI,CAAA,EAAA,QAAQ,EAAE;gBAC3E,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,cAAc,CAAC,CAAC;;iBACnC;AACH,gBAAA,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC;;;;uGAjG7C,6BAA6B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA7B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,6BAA6B,kQAP5B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,27FAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAOH,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBATzC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kCAAkC,YAClC,EAAE,EAAA,UAAA,EACA,KAAK,EAIF,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,27FAAA,CAAA,EAAA;2EAG5B,OAAO,EAAA,CAAA;sBAAf;gBACQ,UAAU,EAAA,CAAA;sBAAlB;gBAES,sBAAsB,EAAA,CAAA;sBAA/B;;;ACLC,MAAO,eAAgB,SAAQ,eAAgC,CAAA;AACxD,IAAA,OAAO;IACP,cAAc,GAAQ,EAAE;AAEvB,IAAA,SAAS,GAAsB,IAAI,YAAY,EAAE;AACjD,IAAA,QAAQ,GAAsB,IAAI,YAAY,EAAE;AAG1D,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE;AACP,QAAA,IAAI,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,CAAC;;IAGxC,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACjB,IAAI,CAAC,gBAAgB,CAAC;AAClB,gBAAA,QAAQ,CAAC,eAAe;AACxB,gBAAA,QAAQ,CAAC,cAAc;AAC1B,aAAA,CAAC;YACF,IAAI,CAAC,MAAM,EAAE;AACb,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;;AAIlC,IAAA,eAAe;IAEf,WAAW,CAAC,OAAsB,EAAA;IAElC,MAAM,GAAA;AACF,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO;AAC9B,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC;AACtD,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;IAG9B,gBAAgB,GAAA;AACZ,QAAA,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE;;AAGrC,IAAA,WAAW,CAAC,UAAmB,EAAA;AAC3B,QAAA,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC;;IAG1C,WAAW,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;;AAGvC,IAAA,OAAO,CAAC,IAAY,EAAA;AAChB,QAAA,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;;IAGhC,OAAO,GAAA;AACH,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;;AAGnC,IAAA,OAAO,CAAC,IAAY,EAAA;AAChB,QAAA,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;;IAGhC,OAAO,GAAA;AACH,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;;IAGnC,QAAQ,CAAC,SAAiB,EAAE,KAAU,EAAA;QAClC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;;AAG7C,IAAA,QAAQ,CAAC,OAAgB,EAAA;AACrB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC;;IAGpC,QAAQ,GAAA;AACJ,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;;AAGpC,IAAA,QAAQ,CAAC,KAAa,EAAA;AAClB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;;IAGlC,cAAc,CAAC,YAAoB,EAAE,KAAU,EAAA;QAC3C,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC;;IAGtD,WAAW,GAAA;QACP,OAAO,IAAI,CAAC,SAAS;;uGAnFhB,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,uPAPd,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,43iDAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAOH,eAAe,EAAA,UAAA,EAAA,CAAA;kBAT3B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,YACnB,EAAE,EAAA,UAAA,EACA,KAAK,EAIF,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,43iDAAA,CAAA,EAAA;wDAG5B,OAAO,EAAA,CAAA;sBAAf;gBACQ,cAAc,EAAA,CAAA;sBAAtB;gBAES,SAAS,EAAA,CAAA;sBAAlB;gBACS,QAAQ,EAAA,CAAA;sBAAjB;;;ACgBC,MAAO,uBAAwB,SAAQ,eAAwC,CAAA;IAEnF,IAAa,OAAO,CAAC,KAAyD,EAAA;AAC5E,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;AACtB,QAAA,IAAG,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE;YACxB,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa;YACxC,IAAI,CAAC,SAAS,GAAG,IAAI,gBAAgB,CAAC,KAAK,CAAC;AAC5C,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;;AAG9B,IAAA,IAAI,OAAO,GAAA;QACP,OAAO,IAAI,CAAC,SAAS;;AAGuB,IAAA,OAAO;IAE9C,QAAQ,GAAY,KAAK;AACzB,IAAA,SAAS;AAER,IAAA,YAAY,GAAG,IAAI,YAAY,EAAO;AACtC,IAAA,kBAAkB,GAAG,IAAI,YAAY,EAAO;AAC5C,IAAA,IAAI,GAAG,IAAI,YAAY,EAAO;AAC9B,IAAA,YAAY,GAAG,IAAI,YAAY,EAAO;AAExC,IAAA,UAAU;AACV,IAAA,SAAS;AACT,IAAA,cAAc;AAEtB,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AACP,QAAA,IAAI,CAAC,iBAAiB,CAAC,CAAC,kBAAkB,CAAC,CAAC;;IAG9C,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,IAAI;AAC1C,YAAA,gBAAgB,CAAC;AAClB,SAAA,CAAC;;IAGJ,eAAe,GAAA;AACb,QAAA,IAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;AAClD,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO;YAC5B,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa;YAC1C,IAAI,CAAC,SAAS,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC;AAC9C,YAAA,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS,EAAE;gBACrC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC;AACzC,gBAAA,IAAI,CAAC,cAAc,GAAG,SAAS;;AAEjC,YAAA,IAAI,CAAC,cAAc,GAAG,IAAI;;;AAI9B,IAAA,UAAU,CAAC,KAAU,EAAA;AACnB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAClB,YAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;;aACtB;AACL,YAAA,IAAI,CAAC,cAAc,GAAG,KAAK;;;AAI/B,IAAA,gBAAgB,CAAC,EAAO,EAAA;AACtB,QAAA,IAAI,CAAC,UAAU,GAAG,EAAE;;AAGtB,IAAA,iBAAiB,CAAC,EAAO,EAAA;AACvB,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE;;IAGrB,UAAU,GAAA;QACR,OAAO,IAAI,CAAC,OAAO;;IAGrB,QAAQ,CAAC,IAAS,EAAE,SAAkB,EAAA;QACpC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;;IAG1C,QAAQ,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;;IAGlC,iBAAiB,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE;;AAG3C,IAAA,QAAQ,CAAC,KAAa,EAAA;AACpB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;;IAGb,aAAa,CAAC,KAAU,EAAC,SAAiB,EAAA;QAC3D,IAAI,KAAK,CAAC,IAAI,KAAK,gBAAgB,CAAC,aAAa,EAAE;AACjD,YAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ;AACtC,YAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AACnB,gBAAA,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;gBACzB,IAAI,CAAC,SAAS,EAAE;AAChB,gBAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC;gBAChC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;;;AAG1D,QAAA,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC;;uGAlG5B,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAvB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,EAZvB,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,4BAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,UAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,OAAA,EAAA,EAAA,YAAA,EAAA,cAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,IAAA,EAAA,MAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,SAAA,EAAA;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,uBAAuB,CAAC;AACtD,gBAAA,KAAK,EAAE;AACR,aAAA;AACF,SAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,SAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,QAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EARS,CAAmD,iDAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,qrHAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAclD,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAhBnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,4BAA4B,EAC5B,QAAA,EAAA,CAAA,iDAAA,CAAmD,EACjD,UAAA,EAAA,KAAK,EACN,SAAA,EAAA;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,6BAA6B,CAAC;AACtD,4BAAA,KAAK,EAAE;AACR,yBAAA;qBACF,EAIc,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,qrHAAA,CAAA,EAAA;wDAIxB,OAAO,EAAA,CAAA;sBAAnB;gBAY+C,OAAO,EAAA,CAAA;sBAAtD,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;gBAE7B,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBAES,YAAY,EAAA,CAAA;sBAArB;gBACS,kBAAkB,EAAA,CAAA;sBAA3B;gBACS,IAAI,EAAA,CAAA;sBAAb;gBACS,YAAY,EAAA,CAAA;sBAArB;;;MCrDmB,eAAe,CAAA;AACvB,IAAA,YAAY,GAAwB,MAAM,CAAC,mBAAmB,CAAC;AACjE,IAAA,UAAU,GAAe,MAAM,CAAC,UAAU,CAAC;AAC3C,IAAA,IAAI,GAAe,MAAM,CAAC,UAAU,CAAC;AACnC,IAAA,OAAO;AACP,IAAA,MAAM;IACN,SAAS,GAAa,EAAE;AAElC,IAAA,WAAA,GAAA;QACI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;AAC5C,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,EAAE;;IAG9B,UAAU,GAAA;QACN,OAAO,IAAI,CAAC,OAAO;;AAGb,IAAA,iBAAiB,CAAC,QAAkB,EAAA;AAC1C,QAAA,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC;;AAGlC,IAAA,gBAAgB,CAAC,SAAmB,EAAA;AAC1C,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAC1B,IAAI,CAAC,SAAS,EAAE;;IAGV,SAAS,GAAA;AACf,QAAA,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,SAAS,EAAE;AACpC,YAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,cAAsB,KAAI;gBACtE,OAAO,CAAC,KAAU,KAAI;oBAClB,KAAK,CAAC,eAAe,EAAE;oBACvB,KAAK,CAAC,wBAAwB,EAAE;AAChC,oBAAA,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,cAAc,CAAC;AAC7C,iBAAC;AACL,aAAC,EAAE,SAAS,CAAC,CAAC;;;IAIZ,aAAa,CAAC,KAAU,EAAE,SAAiB,EAAA;;QAEjD,OAAO,CAAC,IAAI,CAAC,CAAA,oCAAA,EAAuC,SAAS,CAAE,CAAA,EAAE,KAAK,CAAC;;IAGjE,SAAS,CAAC,SAAiB,EAAE,OAAgB,EAAA;AACnD,QAAA,IAAG,SAAS,KAAK,CAAC,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,EAAE;YAC7D,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;YACpD,IAAG,OAAO,EAAE;AACR,gBAAA,YAAY,CAAC,EAAE,GAAG,OAAO;;AAE7B,YAAA,YAAY,CAAC,WAAW,GAAG,SAAS;AACpC,YAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC;;;AAIrC,IAAA,OAAO,CAAC,OAAe,EAAA;QAC7B,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;AACpD,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC,SAAS,CAC7D,CAAC,UAAU,KAAI;YACb,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,YAAA,KAAK,CAAC,WAAW,GAAG,UAAU;AAC9B,YAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAClC,SAAC,EACD,CAAC,KAAK,KAAI;AACR,YAAA,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,KAAK,CAAC;AAClD,SAAC,CACF;;AAGO,IAAA,iBAAiB,CAAC,YAAoB,EAAA;AAC9C,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,EAAE;AAC1C,QAAA,OAAO,CAAG,EAAA,QAAQ,CAAI,CAAA,EAAA,YAAY,EAAE;;IAG5B,kBAAkB,GAAA;QAC1B,MAAM,OAAO,GAAG,QAAQ,CAAC,oBAAoB,CAAC,QAAQ,CAAC;AACvD,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG;AAC1B,YAAA,IAAI,GAAG,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE;AACzC,gBAAA,OAAO,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;;;AAGjD,QAAA,OAAO,EAAE;;uGAjFK,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAf,eAAe,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,UAAU,EAAE,KAAK;AACpB,iBAAA;;;ACHD,MAAM,YAAY,GAAW,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAgGK;AAU5B,MAAO,+BAAgC,SAAQ,eAAe,CAAA;IACxD,oBAAoB,GAAkC,IAAI;AAC1D,IAAA,SAAS;IAEjB,IACI,OAAO,CAAC,KAAqC,EAAA;AAC7C,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;AACtB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;YAChB,IAAI,CAAC,QAAQ,EAAE;;;AAGvB,IAAA,IAAI,OAAO,GAAA;QACP,OAAO,IAAI,CAAC,SAAU;;AAG1B,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE;AACP,QAAA,IAAI,CAAC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CAAC;AAC3C,QAAA,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,kCAAkC,CAAC;;IAGpE,QAAQ,GAAA;;;;IAKR,WAAW,GAAA;QACP,IAAI,CAAC,MAAM,EAAE;;IAGjB,WAAW,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,oBAAoB,EAAE;AAC3B,YAAA,IAAI,CAAC,oBAAoB,CAAC,WAAW,EAAE;;;IAI/C,MAAM,GAAA;AACF,QAAA,IAAI,IAAI,CAAC,oBAAoB,EAAE;AAC3B,YAAA,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE;AAClC,YAAA,IAAI,CAAC,oBAAoB,GAAG,IAAI;;;IAIhC,QAAQ,GAAA;QACZ,IAAI,CAAC,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,SAAS,EAAE;YAC9C,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE;YACxC,IAAI,CAAC,oBAAoB,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC;;;uGA9C9D,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA/B,+BAA+B,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAA/B,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAJ3C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,UAAU,EAAE;AACf,iBAAA;wDAMO,OAAO,EAAA,CAAA;sBADV;;;MChHQ,4BAA4B,CAAA;AAGjB,IAAA,QAAA;AAFZ,IAAA,SAAS;AAEjB,IAAA,WAAA,CAAoB,QAAc,EAAA;QAAd,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACxB,IAAI,CAAC,UAAU,EAAE;QACjB,IAAI,CAAC,oBAAoB,EAAE;;IAGvB,UAAU,GAAA;AACd,QAAA,IAAI,CAAE,MAAc,CAAC,qBAAqB,EAAE;YACxC,MAAM,IAAI,GAAG,uBAAuB;YACpC,MAAM,IAAI,GAAG,yBAAyB;YACtC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC;AAC/C,YAAA,MAAM,SAAS,GAAG,oBAAoB,GAAG,IAAI,GAAG,KAAK;AACrD,YAAA,MAAM,CAAC,WAAW,GAAG,IAAI,GAAG,SAAS;AACrC,YAAA,MAAM,CAAC,EAAE,GAAG,SAAS,GAAG,IAAI;AAC5B,YAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;;;IAIjC,oBAAoB,GAAA;AACxB,QAAA,IAAK,MAAc,CAAC,qBAAqB,EAAE;YACvC,IAAI,CAAC,SAAS,GAAG,IAAI,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC;;aACtD;YACH,UAAU,CAAC,MAAM,IAAI,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;;;IAIxD,QAAQ,CAAC,UAAkB,EAAE,KAAU,EAAA;QACnC,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC;;AAGrD,IAAA,aAAa,CAAC,UAAkB,EAAA;AAC5B,QAAA,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,UAAU,CAAC;;AAE/C;AAGD;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;;AC3DH,MAAM,UAAU,GAAG;IACjB,gBAAgB;IAChB,mBAAmB;IACnB,4BAA4B;IAC5B,cAAc;IACd,iBAAiB;IACjB,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;IACnB,aAAa;IACb,qBAAqB;IACrB,6BAA6B;IAC7B,eAAe;IACf,uBAAuB;IACvB;CACD;MAUc,kBAAkB,CAAA;uGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,iBAxB/B,gBAAgB;YAChB,mBAAmB;YACnB,4BAA4B;YAC5B,cAAc;YACd,iBAAiB;YACjB,mBAAmB;YACnB,kBAAkB;YAClB,mBAAmB;YACnB,aAAa;YACb,qBAAqB;YACrB,6BAA6B;YAC7B,eAAe;YACf,uBAAuB;AACvB,YAAA,+BAA+B,aAb/B,gBAAgB;YAChB,mBAAmB;YACnB,4BAA4B;YAC5B,cAAc;YACd,iBAAiB;YACjB,mBAAmB;YACnB,kBAAkB;YAClB,mBAAmB;YACnB,aAAa;YACb,qBAAqB;YACrB,6BAA6B;YAC7B,eAAe;YACf,uBAAuB;YACvB,+BAA+B,CAAA,EAAA,CAAA;AAWlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAJlB,SAAA,EAAA;YACT;AACD,SAAA,EAAA,CAAA;;2FAEU,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBARhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,GAAG,UAAU,CAAC;AAC7B,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AACxB,oBAAA,SAAS,EAAE;wBACT;AACD;AACF,iBAAA;;;AClCH;;AAEG;;ACFH;;AAEG;;;;"}