@syncfusion/ej2-navigations 17.2.55-1205479 → 17.3.14-96615

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/.eslintrc.json +244 -0
  2. package/CHANGELOG.md +898 -786
  3. package/README.md +163 -163
  4. package/dist/ej2-navigations.umd.min.js +1 -10
  5. package/dist/ej2-navigations.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-navigations.es2015.js +512 -255
  7. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  8. package/dist/es6/ej2-navigations.es5.js +642 -385
  9. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  10. package/dist/global/ej2-navigations.min.js +1 -10
  11. package/dist/global/ej2-navigations.min.js.map +1 -1
  12. package/dist/global/index.d.ts +0 -9
  13. package/dist/ts/accordion/accordion.ts +1312 -0
  14. package/dist/ts/common/h-scroll.ts +459 -0
  15. package/dist/ts/common/menu-base.ts +2131 -0
  16. package/dist/ts/common/v-scroll.ts +430 -0
  17. package/dist/ts/context-menu/context-menu.ts +119 -0
  18. package/dist/ts/menu/menu.ts +270 -0
  19. package/dist/ts/sidebar/sidebar.ts +817 -0
  20. package/dist/ts/tab/tab.ts +1761 -0
  21. package/dist/ts/toolbar/toolbar.ts +2076 -0
  22. package/dist/ts/treeview/treeview.ts +5050 -0
  23. package/helpers/e2e/index.js +3 -3
  24. package/license +10 -10
  25. package/package.json +135 -145
  26. package/src/accordion/accordion-model.d.ts +162 -143
  27. package/src/accordion/accordion.d.ts +35 -6
  28. package/src/accordion/accordion.js +193 -71
  29. package/src/common/h-scroll-model.d.ts +5 -5
  30. package/src/common/h-scroll.js +19 -20
  31. package/src/common/index.d.ts +1 -0
  32. package/src/common/index.js +1 -0
  33. package/src/common/menu-base-model.d.ts +157 -157
  34. package/src/common/menu-base.d.ts +19 -0
  35. package/src/common/menu-base.js +97 -24
  36. package/src/common/v-scroll-model.d.ts +5 -5
  37. package/src/common/v-scroll.js +19 -19
  38. package/src/context-menu/context-menu-model.d.ts +15 -15
  39. package/src/context-menu/context-menu.js +19 -19
  40. package/src/menu/menu-model.d.ts +30 -30
  41. package/src/menu/menu.js +19 -19
  42. package/src/sidebar/sidebar-model.d.ts +136 -136
  43. package/src/sidebar/sidebar.js +19 -19
  44. package/src/tab/tab-model.d.ts +215 -215
  45. package/src/tab/tab.d.ts +3 -0
  46. package/src/tab/tab.js +120 -83
  47. package/src/toolbar/toolbar-model.d.ts +175 -175
  48. package/src/toolbar/toolbar.d.ts +2 -1
  49. package/src/toolbar/toolbar.js +30 -24
  50. package/src/treeview/treeview-model.d.ts +323 -323
  51. package/src/treeview/treeview.d.ts +3 -1
  52. package/src/treeview/treeview.js +107 -87
  53. package/styles/accordion/_all.scss +2 -2
  54. package/styles/accordion/_bootstrap-dark-definition.scss +69 -69
  55. package/styles/accordion/_bootstrap-definition.scss +76 -76
  56. package/styles/accordion/_bootstrap4-definition.scss +82 -82
  57. package/styles/accordion/_fabric-dark-definition.scss +74 -74
  58. package/styles/accordion/_fabric-definition.scss +78 -78
  59. package/styles/accordion/_highcontrast-definition.scss +106 -106
  60. package/styles/accordion/_highcontrast-light-definition.scss +104 -104
  61. package/styles/accordion/_layout.scss +447 -447
  62. package/styles/accordion/_material-dark-definition.scss +75 -75
  63. package/styles/accordion/_material-definition.scss +72 -72
  64. package/styles/accordion/_theme.scss +479 -479
  65. package/styles/accordion/icons/_bootstrap-dark.scss +17 -17
  66. package/styles/accordion/icons/_bootstrap.scss +17 -17
  67. package/styles/accordion/icons/_bootstrap4.scss +17 -17
  68. package/styles/accordion/icons/_fabric-dark.scss +17 -17
  69. package/styles/accordion/icons/_fabric.scss +17 -17
  70. package/styles/accordion/icons/_highcontrast-light.scss +17 -17
  71. package/styles/accordion/icons/_highcontrast.scss +17 -17
  72. package/styles/accordion/icons/_material-dark.scss +17 -17
  73. package/styles/accordion/icons/_material.scss +17 -17
  74. package/styles/accordion/material-dark.css +2 -2
  75. package/styles/bootstrap-dark.css +10 -9
  76. package/styles/bootstrap.css +10 -9
  77. package/styles/bootstrap4.css +10 -9
  78. package/styles/bootstrap5-dark.css +0 -0
  79. package/styles/bootstrap5-dark.scss +0 -0
  80. package/styles/bootstrap5.css +0 -0
  81. package/styles/bootstrap5.scss +0 -0
  82. package/styles/context-menu/_all.scss +2 -2
  83. package/styles/context-menu/_bootstrap-dark-definition.scss +54 -54
  84. package/styles/context-menu/_bootstrap-definition.scss +52 -52
  85. package/styles/context-menu/_bootstrap4-definition.scss +52 -52
  86. package/styles/context-menu/_fabric-dark-definition.scss +54 -54
  87. package/styles/context-menu/_fabric-definition.scss +52 -52
  88. package/styles/context-menu/_highcontrast-definition.scss +52 -52
  89. package/styles/context-menu/_highcontrast-light-definition.scss +54 -54
  90. package/styles/context-menu/_layout-mixin.scss +175 -174
  91. package/styles/context-menu/_layout.scss +70 -70
  92. package/styles/context-menu/_material-dark-definition.scss +54 -54
  93. package/styles/context-menu/_material-definition.scss +52 -52
  94. package/styles/context-menu/_theme-mixin.scss +59 -59
  95. package/styles/context-menu/_theme.scss +36 -36
  96. package/styles/context-menu/bootstrap-dark.css +1 -1
  97. package/styles/context-menu/bootstrap.css +1 -1
  98. package/styles/context-menu/bootstrap4.css +1 -1
  99. package/styles/context-menu/fabric-dark.css +1 -1
  100. package/styles/context-menu/fabric.css +1 -1
  101. package/styles/context-menu/highcontrast-light.css +1 -1
  102. package/styles/context-menu/highcontrast.css +1 -1
  103. package/styles/context-menu/icons/_bootstrap-dark.scss +30 -30
  104. package/styles/context-menu/icons/_bootstrap.scss +30 -30
  105. package/styles/context-menu/icons/_bootstrap4.scss +30 -30
  106. package/styles/context-menu/icons/_fabric-dark.scss +30 -30
  107. package/styles/context-menu/icons/_fabric.scss +30 -30
  108. package/styles/context-menu/icons/_highcontrast-light.scss +30 -30
  109. package/styles/context-menu/icons/_highcontrast.scss +30 -30
  110. package/styles/context-menu/icons/_material-dark.scss +30 -30
  111. package/styles/context-menu/icons/_material.scss +30 -30
  112. package/styles/context-menu/material-dark.css +1 -1
  113. package/styles/context-menu/material.css +4 -4
  114. package/styles/fabric-dark.css +10 -9
  115. package/styles/fabric.css +10 -9
  116. package/styles/h-scroll/_all.scss +2 -2
  117. package/styles/h-scroll/_bootstrap-dark-definition.scss +49 -49
  118. package/styles/h-scroll/_bootstrap-definition.scss +50 -50
  119. package/styles/h-scroll/_bootstrap4-definition.scss +49 -49
  120. package/styles/h-scroll/_fabric-dark-definition.scss +50 -50
  121. package/styles/h-scroll/_fabric-definition.scss +48 -48
  122. package/styles/h-scroll/_highcontrast-definition.scss +52 -52
  123. package/styles/h-scroll/_highcontrast-light-definition.scss +54 -54
  124. package/styles/h-scroll/_layout.scss +198 -198
  125. package/styles/h-scroll/_material-dark-definition.scss +77 -77
  126. package/styles/h-scroll/_material-definition.scss +77 -77
  127. package/styles/h-scroll/_theme.scss +157 -157
  128. package/styles/h-scroll/icons/_bootstrap-dark.scss +49 -49
  129. package/styles/h-scroll/icons/_bootstrap.scss +49 -49
  130. package/styles/h-scroll/icons/_bootstrap4.scss +49 -49
  131. package/styles/h-scroll/icons/_fabric-dark.scss +49 -49
  132. package/styles/h-scroll/icons/_fabric.scss +49 -49
  133. package/styles/h-scroll/icons/_highcontrast-light.scss +49 -49
  134. package/styles/h-scroll/icons/_highcontrast.scss +49 -49
  135. package/styles/h-scroll/icons/_material-dark.scss +49 -49
  136. package/styles/h-scroll/icons/_material.scss +49 -49
  137. package/styles/highcontrast-light.css +10 -9
  138. package/styles/highcontrast.css +10 -9
  139. package/styles/material-dark.css +12 -11
  140. package/styles/material.css +24 -14
  141. package/styles/menu/_all.scss +2 -2
  142. package/styles/menu/_bootstrap-dark-definition.scss +63 -63
  143. package/styles/menu/_bootstrap-definition.scss +65 -65
  144. package/styles/menu/_bootstrap4-definition.scss +64 -64
  145. package/styles/menu/_fabric-dark-definition.scss +63 -63
  146. package/styles/menu/_fabric-definition.scss +64 -64
  147. package/styles/menu/_highcontrast-definition.scss +65 -65
  148. package/styles/menu/_highcontrast-light-definition.scss +61 -61
  149. package/styles/menu/_layout.scss +638 -637
  150. package/styles/menu/_material-dark-definition.scss +63 -63
  151. package/styles/menu/_material-definition.scss +64 -64
  152. package/styles/menu/_theme.scss +243 -243
  153. package/styles/menu/bootstrap-dark.css +2 -1
  154. package/styles/menu/bootstrap.css +2 -1
  155. package/styles/menu/bootstrap.scss +1 -0
  156. package/styles/menu/bootstrap4.css +2 -1
  157. package/styles/menu/fabric-dark.css +2 -1
  158. package/styles/menu/fabric.css +2 -1
  159. package/styles/menu/fabric.scss +1 -0
  160. package/styles/menu/highcontrast-light.css +2 -1
  161. package/styles/menu/highcontrast.css +2 -1
  162. package/styles/menu/highcontrast.scss +1 -0
  163. package/styles/menu/icons/_bootstrap-dark.scss +127 -127
  164. package/styles/menu/icons/_bootstrap.scss +127 -127
  165. package/styles/menu/icons/_bootstrap4.scss +127 -127
  166. package/styles/menu/icons/_fabric-dark.scss +127 -127
  167. package/styles/menu/icons/_fabric.scss +127 -127
  168. package/styles/menu/icons/_highcontrast-light.scss +127 -127
  169. package/styles/menu/icons/_highcontrast.scss +127 -127
  170. package/styles/menu/icons/_material-dark.scss +127 -127
  171. package/styles/menu/icons/_material.scss +127 -127
  172. package/styles/menu/material-dark.css +2 -1
  173. package/styles/menu/material.css +4 -3
  174. package/styles/menu/material.scss +1 -0
  175. package/styles/sidebar/_all.scss +3 -3
  176. package/styles/sidebar/_bootstrap-dark-definition.scss +4 -4
  177. package/styles/sidebar/_bootstrap-definition.scss +4 -4
  178. package/styles/sidebar/_bootstrap4-definition.scss +4 -4
  179. package/styles/sidebar/_fabric-dark-definition.scss +4 -4
  180. package/styles/sidebar/_fabric-definition.scss +6 -6
  181. package/styles/sidebar/_highcontrast-definition.scss +4 -4
  182. package/styles/sidebar/_highcontrast-light-definition.scss +4 -4
  183. package/styles/sidebar/_icons.scss +1 -1
  184. package/styles/sidebar/_material-dark-definition.scss +4 -4
  185. package/styles/sidebar/_material-definition.scss +6 -6
  186. package/styles/sidebar/_theme.scss +168 -168
  187. package/styles/sidebar/bootstrap-dark.css +0 -1
  188. package/styles/sidebar/bootstrap.css +0 -1
  189. package/styles/sidebar/bootstrap4.css +0 -1
  190. package/styles/sidebar/fabric-dark.css +0 -1
  191. package/styles/sidebar/fabric.css +0 -1
  192. package/styles/sidebar/highcontrast-light.css +0 -1
  193. package/styles/sidebar/highcontrast.css +0 -1
  194. package/styles/sidebar/material-dark.css +0 -1
  195. package/styles/sidebar/material.css +0 -1
  196. package/styles/tab/_all.scss +2 -2
  197. package/styles/tab/_bootstrap-dark-definition.scss +386 -386
  198. package/styles/tab/_bootstrap-definition.scss +396 -396
  199. package/styles/tab/_bootstrap4-definition.scss +401 -401
  200. package/styles/tab/_fabric-dark-definition.scss +394 -394
  201. package/styles/tab/_fabric-definition.scss +410 -410
  202. package/styles/tab/_highcontrast-definition.scss +434 -434
  203. package/styles/tab/_highcontrast-light-definition.scss +423 -423
  204. package/styles/tab/_icons.scss +43 -43
  205. package/styles/tab/_layout.scss +3528 -3521
  206. package/styles/tab/_material-dark-definition.scss +407 -407
  207. package/styles/tab/_material-definition.scss +416 -416
  208. package/styles/tab/_theme.scss +1751 -1751
  209. package/styles/tab/bootstrap-dark.css +7 -2
  210. package/styles/tab/bootstrap.css +7 -2
  211. package/styles/tab/bootstrap4.css +7 -2
  212. package/styles/tab/fabric-dark.css +7 -2
  213. package/styles/tab/fabric.css +7 -2
  214. package/styles/tab/highcontrast-light.css +7 -2
  215. package/styles/tab/highcontrast.css +7 -2
  216. package/styles/tab/icons/_bootstrap-dark.scss +132 -132
  217. package/styles/tab/icons/_bootstrap.scss +132 -132
  218. package/styles/tab/icons/_bootstrap4.scss +132 -132
  219. package/styles/tab/icons/_fabric-dark.scss +132 -132
  220. package/styles/tab/icons/_fabric.scss +132 -132
  221. package/styles/tab/icons/_highcontrast-light.scss +132 -132
  222. package/styles/tab/icons/_highcontrast.scss +132 -132
  223. package/styles/tab/icons/_material-dark.scss +132 -132
  224. package/styles/tab/icons/_material.scss +132 -132
  225. package/styles/tab/material-dark.css +7 -2
  226. package/styles/tab/material.css +7 -2
  227. package/styles/tailwind-dark.css +0 -0
  228. package/styles/tailwind-dark.scss +0 -0
  229. package/styles/tailwind.css +0 -0
  230. package/styles/tailwind.scss +0 -0
  231. package/styles/toolbar/_all.scss +2 -2
  232. package/styles/toolbar/_bootstrap-dark-definition.scss +135 -135
  233. package/styles/toolbar/_bootstrap-definition.scss +134 -134
  234. package/styles/toolbar/_bootstrap4-definition.scss +139 -139
  235. package/styles/toolbar/_fabric-dark-definition.scss +155 -155
  236. package/styles/toolbar/_fabric-definition.scss +139 -139
  237. package/styles/toolbar/_highcontrast-definition.scss +149 -149
  238. package/styles/toolbar/_highcontrast-light-definition.scss +164 -164
  239. package/styles/toolbar/_layout.scss +1460 -1460
  240. package/styles/toolbar/_material-dark-definition.scss +180 -180
  241. package/styles/toolbar/_material-definition.scss +164 -164
  242. package/styles/toolbar/_theme.scss +451 -451
  243. package/styles/toolbar/bootstrap-dark.css +0 -1
  244. package/styles/toolbar/bootstrap.css +0 -1
  245. package/styles/toolbar/bootstrap.scss +1 -0
  246. package/styles/toolbar/bootstrap4.css +0 -1
  247. package/styles/toolbar/fabric-dark.css +0 -1
  248. package/styles/toolbar/fabric.css +0 -1
  249. package/styles/toolbar/fabric.scss +1 -0
  250. package/styles/toolbar/highcontrast-light.css +0 -1
  251. package/styles/toolbar/highcontrast.css +0 -1
  252. package/styles/toolbar/highcontrast.scss +1 -0
  253. package/styles/toolbar/icons/_bootstrap-dark.scss +16 -16
  254. package/styles/toolbar/icons/_bootstrap.scss +16 -16
  255. package/styles/toolbar/icons/_bootstrap4.scss +16 -16
  256. package/styles/toolbar/icons/_fabric-dark.scss +16 -16
  257. package/styles/toolbar/icons/_fabric.scss +16 -16
  258. package/styles/toolbar/icons/_highcontrast-light.scss +16 -16
  259. package/styles/toolbar/icons/_highcontrast.scss +16 -16
  260. package/styles/toolbar/icons/_material-dark.scss +16 -16
  261. package/styles/toolbar/icons/_material.scss +16 -16
  262. package/styles/toolbar/material-dark.css +0 -1
  263. package/styles/toolbar/material.css +0 -1
  264. package/styles/toolbar/material.scss +1 -0
  265. package/styles/treeview/_all.scss +2 -2
  266. package/styles/treeview/_bootstrap-dark-definition.scss +131 -131
  267. package/styles/treeview/_bootstrap-definition.scss +127 -127
  268. package/styles/treeview/_bootstrap4-definition.scss +153 -153
  269. package/styles/treeview/_fabric-dark-definition.scss +130 -130
  270. package/styles/treeview/_fabric-definition.scss +126 -126
  271. package/styles/treeview/_highcontrast-definition.scss +132 -132
  272. package/styles/treeview/_highcontrast-light-definition.scss +137 -137
  273. package/styles/treeview/_layout.scss +551 -551
  274. package/styles/treeview/_material-dark-definition.scss +126 -126
  275. package/styles/treeview/_material-definition.scss +126 -126
  276. package/styles/treeview/_theme.scss +331 -331
  277. package/styles/treeview/bootstrap-dark.css +0 -3
  278. package/styles/treeview/bootstrap.css +0 -3
  279. package/styles/treeview/bootstrap4.css +0 -3
  280. package/styles/treeview/fabric-dark.css +0 -3
  281. package/styles/treeview/fabric.css +0 -3
  282. package/styles/treeview/highcontrast-light.css +0 -3
  283. package/styles/treeview/highcontrast.css +0 -3
  284. package/styles/treeview/icons/_bootstrap-dark.scss +39 -39
  285. package/styles/treeview/icons/_bootstrap.scss +39 -39
  286. package/styles/treeview/icons/_bootstrap4.scss +39 -39
  287. package/styles/treeview/icons/_fabric-dark.scss +43 -43
  288. package/styles/treeview/icons/_fabric.scss +43 -43
  289. package/styles/treeview/icons/_highcontrast-light.scss +43 -43
  290. package/styles/treeview/icons/_highcontrast.scss +43 -43
  291. package/styles/treeview/icons/_material-dark.scss +43 -43
  292. package/styles/treeview/icons/_material.scss +43 -43
  293. package/styles/treeview/material-dark.css +0 -3
  294. package/styles/treeview/material.css +9 -3
  295. package/styles/v-scroll/_all.scss +2 -2
  296. package/styles/v-scroll/_bootstrap-dark-definition.scss +50 -50
  297. package/styles/v-scroll/_bootstrap-definition.scss +49 -49
  298. package/styles/v-scroll/_bootstrap4-definition.scss +49 -49
  299. package/styles/v-scroll/_fabric-dark-definition.scss +51 -51
  300. package/styles/v-scroll/_fabric-definition.scss +50 -50
  301. package/styles/v-scroll/_highcontrast-definition.scss +51 -51
  302. package/styles/v-scroll/_highcontrast-light-definition.scss +52 -52
  303. package/styles/v-scroll/_layout.scss +162 -162
  304. package/styles/v-scroll/_material-dark-definition.scss +78 -78
  305. package/styles/v-scroll/_material-definition.scss +77 -77
  306. package/styles/v-scroll/_theme.scss +133 -133
  307. package/styles/v-scroll/icons/_bootstrap-dark.scss +26 -26
  308. package/styles/v-scroll/icons/_bootstrap.scss +26 -26
  309. package/styles/v-scroll/icons/_bootstrap4.scss +26 -26
  310. package/styles/v-scroll/icons/_fabric-dark.scss +26 -26
  311. package/styles/v-scroll/icons/_fabric.scss +26 -26
  312. package/styles/v-scroll/icons/_highcontrast-light.scss +26 -26
  313. package/styles/v-scroll/icons/_highcontrast.scss +26 -26
  314. package/styles/v-scroll/icons/_material-dark.scss +26 -26
  315. package/styles/v-scroll/icons/_material.scss +26 -26
  316. package/tslint.json +111 -0
@@ -1,11 +1,2 @@
1
- /*!
2
- * filename: ej2-navigations.min.js
3
- * version : 17.2.49
4
- * Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.
5
- * Use of this code is subject to the terms of our license.
6
- * A copy of the current license can be obtained at any time by e-mailing
7
- * licensing@syncfusion.com. Any infringement will be prosecuted under
8
- * applicable laws.
9
- */
10
- this.ej=this.ej||{},this.ej.navigations=function(e,t,i,s,n,o,l){"use strict";var r=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),a=function(e,t,i,s){var n,o=arguments.length,l=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(o<3?n(l):o>3?n(t,i,l):n(t,i))||l);return o>3&&l&&Object.defineProperty(t,i,l),l},d=function(e){function i(t,i){return e.call(this,t,i)||this}return r(i,e),i.prototype.preRender=function(){this.browser=t.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=t.Browser.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=t.getUniqueID("hscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add("e-rtl")},i.prototype.render=function(){this.touchModule=new t.Touch(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),t.EventHandler.add(this.scrollEle,"scroll",this.scrollHandler,this),this.isDevice?(this.element.classList.add("e-scroll-device"),this.createOverlay(this.element)):this.createNavIcon(this.element),this.setScrollState()},i.prototype.setScrollState=function(){t.isNullOrUndefined(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetWidth,this.customStep=!1):this.customStep=!0},i.prototype.initialize=function(){var e=this.createElement("div",{className:"e-hscroll-content"}),t=this.createElement("div",{className:"e-hscroll-bar"});t.setAttribute("tabindex","-1");for(var i=this.element,s=0,n=[].slice.call(i.children);s<n.length;s++){var o=n[s];e.appendChild(o)}t.appendChild(e),i.appendChild(t),t.style.overflowX="hidden",this.scrollEle=t,this.scrollItems=e},i.prototype.getPersistData=function(){var e=["scrollStep"];return this.addOnPersist(e)},i.prototype.getModuleName=function(){return"hScroll"},i.prototype.destroy=function(){var i=this.element;i.style.display="",i.classList.remove("e-hscroll"),i.classList.remove("e-scroll-device");var s=t.selectAll(".e-"+i.id+"_nav.e-scroll-nav",i),n=t.selectAll(".e-scroll-overlay",i);[].slice.call(n).forEach(function(e){t.detach(e)});for(var o=0,l=[].slice.call(this.scrollItems.children);o<l.length;o++){var r=l[o];i.appendChild(r)}this.uniqueId&&this.element.removeAttribute("id"),t.detach(this.scrollEle),s.length>0&&(t.detach(s[0]),t.isNullOrUndefined(s[1])||t.detach(s[1])),t.EventHandler.remove(this.scrollEle,"scroll",this.scrollHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},i.prototype.disable=function(e){var i=t.selectAll(".e-scroll-nav:not(.e-overlay)",this.element);e?this.element.classList.add("e-overlay"):this.element.classList.remove("e-overlay"),[].slice.call(i).forEach(function(t){t.setAttribute("tabindex",e?"-1":"0")})},i.prototype.createOverlay=function(e){var t=e.id.concat("_nav"),i=this.createElement("div",{className:"e-scroll-overlay e-scroll-right-overlay"}),s="e-"+e.id.concat("_nav e-scroll-nav e-scroll-right-nav"),n=this.createElement("div",{id:t.concat("_right"),className:s}),o=this.createElement("div",{className:"e-nav-right-arrow e-nav-arrow e-icons"});n.appendChild(o);var l=this.createElement("div",{className:"e-scroll-overlay e-scroll-left-overlay"});this.ieCheck&&n.classList.add("e-ie-align"),e.appendChild(i),e.appendChild(n),e.insertBefore(l,e.firstChild),this.eventBinding([n])},i.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav e-scroll-nav e-scroll-right-nav"),s=this.createElement("div",{id:t.concat("_right"),className:i});s.setAttribute("aria-disabled","false");var n=this.createElement("div",{className:"e-nav-right-arrow e-nav-arrow e-icons"}),o="e-"+e.id.concat("_nav e-scroll-nav e-scroll-left-nav"),l=this.createElement("div",{id:t.concat("_left"),className:o+" e-overlay"});l.setAttribute("aria-disabled","true");var r=this.createElement("div",{className:"e-nav-left-arrow e-nav-arrow e-icons"});l.appendChild(r),s.appendChild(n),s.setAttribute("tabindex","0"),e.appendChild(s),e.insertBefore(l,e.firstChild),this.ieCheck&&(s.classList.add("e-ie-align"),l.classList.add("e-ie-align")),this.eventBinding([s,l])},i.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){var i=function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)};this.keyTimer=window.setTimeout(function(){i()},100)}},i.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},i.prototype.eventBinding=function(e){var i=this;[].slice.call(e).forEach(function(e){new t.Touch(e,{tapHold:i.tabHoldHandler.bind(i),tapHoldThreshold:500}),e.addEventListener("keydown",i.onKeyPress.bind(i)),e.addEventListener("keyup",i.onKeyUp.bind(i)),e.addEventListener("mouseup",i.repeatScroll.bind(i)),e.addEventListener("touchend",i.repeatScroll.bind(i)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),t.EventHandler.add(e,"click",i.clickEventHandler,i)})},i.prototype.repeatScroll=function(){clearInterval(this.timeout)},i.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,"e-scroll-nav")?i.firstElementChild:i;var s=function(){t.eleScrolling(10,i,!0)};this.timeout=window.setInterval(function(){s()},50)},i.prototype.contains=function(e,t){return e.classList.contains(t)},i.prototype.eleScrolling=function(e,t,i){var s=this.scrollEle,n=this.element,o=t.classList;o.contains("e-scroll-nav")&&(o=t.querySelector(".e-nav-arrow").classList),this.contains(n,"e-rtl")&&this.browserCheck&&(e=-e);s.scrollLeft;!this.contains(n,"e-rtl")||this.browserCheck||this.ieCheck?o.contains("e-nav-right-arrow")?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i):o.contains("e-nav-left-arrow")?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i)},i.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},i.prototype.swipeHandler=function(e){var t,i=this.scrollEle;t=e.velocity<=1?e.distanceX/(10*e.velocity):e.distanceX/e.velocity;var s=.5,n=function(){var o=Math.sin(s);o<=0?window.cancelAnimationFrame(o):("Left"===e.swipeDirection?i.scrollLeft+=t*o:"Right"===e.swipeDirection&&(i.scrollLeft-=t*o),s-=.02,window.requestAnimationFrame(n))};n()},i.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollLeft+=e:this.scrollEle.scrollLeft-=e},i.prototype.frameScrollRequest=function(e,i,s){var n=this;if(s)return void this.scrollUpdating(e,i);this.customStep||[].slice.call(t.selectAll(".e-scroll-overlay",this.element)).forEach(function(t){e-=t.offsetWidth});var o=function(){var t,s;n.contains(n.element,"e-rtl")&&n.browserCheck?(t=-e,s=-10):(t=e,s=10),t<10?window.cancelAnimationFrame(s):(n.scrollUpdating(s,i),e-=s,window.requestAnimationFrame(o))};o()},i.prototype.touchHandler=function(e){var t,i=this.scrollEle;t=e.distanceX,this.ieCheck&&this.contains(this.element,"e-rtl")&&(t=-t),"Left"===e.scrollDirection?i.scrollLeft=i.scrollLeft+t:"Right"===e.scrollDirection&&(i.scrollLeft=i.scrollLeft-t)},i.prototype.arrowDisabling=function(e,i){if(this.isDevice){var s=(t.isNullOrUndefined(e)?i:e).querySelector(".e-nav-arrow");t.isNullOrUndefined(e)?t.classList(s,["e-nav-right-arrow"],["e-nav-left-arrow"]):t.classList(s,["e-nav-left-arrow"],["e-nav-right-arrow"])}else e.classList.add("e-overlay"),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),i.classList.remove("e-overlay"),i.setAttribute("aria-disabled","false"),i.setAttribute("tabindex","0");this.repeatScroll()},i.prototype.scrollHandler=function(e){var t=e.target,i=t.offsetWidth,s=this.element,n=this.element.querySelector(".e-scroll-left-nav"),o=this.element.querySelector(".e-scroll-right-nav"),l=this.element.querySelector(".e-scroll-left-overlay"),r=this.element.querySelector(".e-scroll-right-overlay"),a=t.scrollLeft;if(a<=0&&(a=-a),this.isDevice&&(!this.enableRtl||this.browserCheck||this.ieCheck||(l=this.element.querySelector(".e-scroll-right-overlay"),r=this.element.querySelector(".e-scroll-left-overlay")),l.style.width=a<40?a+"px":"40px",t.scrollWidth-Math.ceil(i+a)<40?r.style.width=t.scrollWidth-Math.ceil(i+a)+"px":r.style.width="40px"),0===a)!this.contains(s,"e-rtl")||this.browserCheck||this.ieCheck?this.arrowDisabling(n,o):this.arrowDisabling(o,n);else if(Math.ceil(i+a+.1)>=t.scrollWidth)!this.contains(s,"e-rtl")||this.browserCheck||this.ieCheck?this.arrowDisabling(o,n):this.arrowDisabling(n,o);else{var d=this.element.querySelector(".e-scroll-nav.e-overlay");d&&(d.classList.remove("e-overlay"),d.setAttribute("aria-disabled","false"),d.setAttribute("tabindex","0"))}},i.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")}},a([t.Property(null)],i.prototype,"scrollStep",void 0),i=a([t.NotifyPropertyChanges],i)}(t.Component),h=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),c=function(e,t,i,s){var n,o=arguments.length,l=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(o<3?n(l):o>3?n(t,i,l):n(t,i))||l);return o>3&&l&&Object.defineProperty(t,i,l),l},p=function(e){function i(t,i){return e.call(this,t,i)||this}return h(i,e),i.prototype.preRender=function(){this.browser=t.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=t.Browser.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=t.getUniqueID("vscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add("e-rtl")},i.prototype.render=function(){this.touchModule=new t.Touch(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),t.EventHandler.add(this.scrollEle,"scroll",this.scrollEventHandler,this),this.isDevice?(this.element.classList.add("e-scroll-device"),this.createOverlayElement(this.element)):this.createNavIcon(this.element),this.setScrollState(),t.EventHandler.add(this.element,"wheel",this.wheelEventHandler,this)},i.prototype.setScrollState=function(){t.isNullOrUndefined(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetHeight,this.customStep=!1):this.customStep=!0},i.prototype.initialize=function(){var e=t.createElement("div",{className:"e-vscroll-content"}),i=t.createElement("div",{className:"e-vscroll-bar"});i.setAttribute("tabindex","-1");for(var s=this.element,n=0,o=[].slice.call(s.children);n<o.length;n++){var l=o[n];e.appendChild(l)}i.appendChild(e),s.appendChild(i),i.style.overflowY="hidden",this.scrollEle=i,this.scrollItems=e},i.prototype.getPersistData=function(){var e=["scrollStep"];return this.addOnPersist(e)},i.prototype.getModuleName=function(){return"vScroll"},i.prototype.destroy=function(){var i=this.element;i.style.display="",t.removeClass([this.element],["e-vscroll","e-scroll-device"]);var s=t.selectAll(".e-"+i.id+"_nav.e-scroll-nav",i),n=t.selectAll(".e-scroll-overlay",i);[].slice.call(n).forEach(function(e){t.detach(e)});for(var o=0,l=[].slice.call(this.scrollItems.children);o<l.length;o++){var r=l[o];i.appendChild(r)}this.uniqueId&&this.element.removeAttribute("id"),t.detach(this.scrollEle),s.length>0&&(t.detach(s[0]),t.isNullOrUndefined(s[1])||t.detach(s[1])),t.EventHandler.remove(this.scrollEle,"scroll",this.scrollEventHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},i.prototype.disable=function(e){var i=t.selectAll(".e-scroll-nav:not(.e-overlay)",this.element);e?this.element.classList.add("e-overlay"):this.element.classList.remove("e-overlay"),[].slice.call(i).forEach(function(t){t.setAttribute("tabindex",e?"-1":"0")})},i.prototype.createOverlayElement=function(e){var i=e.id.concat("_nav"),s=t.createElement("div",{className:"e-scroll-overlay e-scroll-down-overlay"}),n="e-"+e.id.concat("_nav e-scroll-nav e-scroll-down-nav"),o=t.createElement("div",{id:i.concat("down"),className:n}),l=t.createElement("div",{className:"e-nav-down-arrow e-nav-arrow e-icons"});o.appendChild(l);var r=t.createElement("div",{className:"e-scroll-overlay e-scroll-up-overlay"});this.ieCheck&&o.classList.add("e-ie-align"),e.appendChild(s),e.appendChild(o),e.insertBefore(r,e.firstChild),this.eventBinding([o])},i.prototype.createNavIcon=function(e){var i=e.id.concat("_nav"),s="e-"+e.id.concat("_nav e-scroll-nav e-scroll-down-nav"),n=t.createElement("div",{id:i.concat("_down"),className:s});n.setAttribute("aria-disabled","false");var o=t.createElement("div",{className:"e-nav-down-arrow e-nav-arrow e-icons"}),l="e-"+e.id.concat("_nav e-scroll-nav e-scroll-up-nav"),r=t.createElement("div",{id:i.concat("_up"),className:l+" e-overlay"});r.setAttribute("aria-disabled","true");var a=t.createElement("div",{className:"e-nav-up-arrow e-nav-arrow e-icons"});r.appendChild(a),n.appendChild(o),n.setAttribute("tabindex","0"),e.appendChild(n),e.insertBefore(r,e.firstChild),this.ieCheck&&(n.classList.add("e-ie-align"),r.classList.add("e-ie-align")),this.eventBinding([n,r])},i.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){var i=function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)};this.keyTimer=window.setTimeout(function(){i()},100)}},i.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},i.prototype.eventBinding=function(e){var i=this;[].slice.call(e).forEach(function(e){new t.Touch(e,{tapHold:i.tabHoldHandler.bind(i),tapHoldThreshold:500}),e.addEventListener("keydown",i.onKeyPress.bind(i)),e.addEventListener("keyup",i.onKeyUp.bind(i)),e.addEventListener("mouseup",i.repeatScroll.bind(i)),e.addEventListener("touchend",i.repeatScroll.bind(i)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),t.EventHandler.add(e,"click",i.clickEventHandler,i)})},i.prototype.repeatScroll=function(){clearInterval(this.timeout)},i.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,"e-scroll-nav")?i.firstElementChild:i;var s=function(){t.eleScrolling(10,i,!0)};this.timeout=window.setInterval(function(){s()},50)},i.prototype.contains=function(e,t){return e.classList.contains(t)},i.prototype.eleScrolling=function(e,t,i){this.element;var s=t.classList;s.contains("e-scroll-nav")&&(s=t.querySelector(".e-nav-arrow").classList),s.contains("e-nav-down-arrow")?this.frameScrollRequest(e,"add",i):s.contains("e-nav-up-arrow")&&this.frameScrollRequest(e,"",i)},i.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},i.prototype.wheelEventHandler=function(e){e.preventDefault(),this.frameScrollRequest(this.scrollStep,e.deltaY>0?"add":"",!1)},i.prototype.swipeHandler=function(e){var t,i=this.scrollEle;t=e.velocity<=1?e.distanceY/(10*e.velocity):e.distanceY/e.velocity;var s=.5,n=function(){var o=Math.sin(s);o<=0?window.cancelAnimationFrame(o):("Up"===e.swipeDirection?i.scrollTop+=t*o:"Down"===e.swipeDirection&&(i.scrollTop-=t*o),s-=.02,window.requestAnimationFrame(n))};n()},i.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollTop+=e:this.scrollEle.scrollTop-=e},i.prototype.frameScrollRequest=function(e,i,s){var n=this;if(s)return void this.scrollUpdating(e,i);this.customStep||[].slice.call(t.selectAll(".e-scroll-overlay",this.element)).forEach(function(t){e-=t.offsetHeight});var o=function(){e<10?window.cancelAnimationFrame(10):(n.scrollUpdating(10,i),e-=10,window.requestAnimationFrame(o))};o()},i.prototype.touchHandler=function(e){var t,i=this.scrollEle;t=e.distanceY,"Up"===e.scrollDirection?i.scrollTop=i.scrollTop+t:"Down"===e.scrollDirection&&(i.scrollTop=i.scrollTop-t)},i.prototype.arrowDisabling=function(e,i){if(this.isDevice){var s=(t.isNullOrUndefined(e)?i:e).querySelector(".e-nav-arrow");t.isNullOrUndefined(e)?t.classList(s,["e-nav-down-arrow"],["e-nav-up-arrow"]):t.classList(s,["e-nav-up-arrow"],["e-nav-down-arrow"])}else e.classList.add("e-overlay"),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),i.classList.remove("e-overlay"),i.setAttribute("aria-disabled","false"),i.setAttribute("tabindex","0");this.repeatScroll()},i.prototype.scrollEventHandler=function(e){var t=e.target,i=t.offsetHeight,s=(this.element,this.element.querySelector(".e-scroll-up-nav")),n=this.element.querySelector(".e-scroll-down-nav"),o=this.element.querySelector(".e-scroll-up-overlay"),l=this.element.querySelector(".e-scroll-down-overlay"),r=t.scrollTop;if(r<=0&&(r=-r),this.isDevice&&(o.style.height=r<40?r+"px":"40px",t.scrollHeight-Math.ceil(i+r)<40?l.style.height=t.scrollHeight-Math.ceil(i+r)+"px":l.style.height="40px"),0===r)this.arrowDisabling(s,n);else if(Math.ceil(i+r+.1)>=t.scrollHeight)this.arrowDisabling(n,s);else{var a=this.element.querySelector(".e-scroll-nav.e-overlay");a&&(a.classList.remove("e-overlay"),a.setAttribute("aria-disabled","false"),a.setAttribute("tabindex","0"))}},i.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")}},c([t.Property(null)],i.prototype,"scrollStep",void 0),i=c([t.NotifyPropertyChanges],i)}(t.Component),u=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),f=function(e,t,i,s){var n,o=arguments.length,l=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(o<3?n(l):o>3?n(t,i,l):n(t,i))||l);return o>3&&l&&Object.defineProperty(t,i,l),l},m="e-focused",v="e-menu-header",g="e-selected",y="e-menu-item",b="e-menu-hide",C="e-menu-popup",N=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return u(i,e),f([t.Property("id")],i.prototype,"itemId",void 0),f([t.Property("parentId")],i.prototype,"parentId",void 0),f([t.Property("text")],i.prototype,"text",void 0),f([t.Property("iconCss")],i.prototype,"iconCss",void 0),f([t.Property("url")],i.prototype,"url",void 0),f([t.Property("separator")],i.prototype,"separator",void 0),f([t.Property("items")],i.prototype,"children",void 0),i}(t.ChildProperty),E=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return u(i,e),f([t.Property(null)],i.prototype,"iconCss",void 0),f([t.Property("")],i.prototype,"id",void 0),f([t.Property(!1)],i.prototype,"separator",void 0),f([t.Collection([],i)],i.prototype,"items",void 0),f([t.Property("")],i.prototype,"text",void 0),f([t.Property("")],i.prototype,"url",void 0),i}(t.ChildProperty),x=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return u(i,e),f([t.Property("SlideDown")],i.prototype,"effect",void 0),f([t.Property(400)],i.prototype,"duration",void 0),f([t.Property("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),O=function(e){function n(i,s){var n=e.call(this,i,s)||this;return n.navIdx=[],n.animation=new t.Animation({}),n.isTapHold=!1,n.tempItem=[],n}return u(n,e),n.prototype.preRender=function(){if(!this.isMenu){o=void 0;if("EJS-CONTEXTMENU"===this.element.tagName){o=this.createElement("ul",{id:t.getUniqueID(this.getModuleName()),className:"e-control e-lib e-"+this.getModuleName()});var e=t.getValue("ej2_instances",this.element);t.removeClass([this.element],["e-control","e-lib","e-"+this.getModuleName()]),this.clonedElement=this.element,this.element=o,t.setValue("ej2_instances",e,this.element)}else{o=this.createElement("ul",{id:t.getUniqueID(this.getModuleName())}),t.append([].slice.call(this.element.cloneNode(!0).children),o);var i=this.element.nextElementSibling;i?this.element.parentElement.insertBefore(o,i):this.element.parentElement.appendChild(o),this.clonedElement=o}this.clonedElement.style.display="none"}if("EJS-MENU"===this.element.tagName){for(var s=this.element,n=t.getValue("ej2_instances",s),o=this.createElement("ul"),l=this.createElement("EJS-MENU",{className:"e-"+this.getModuleName()+"-wrapper"}),r=0,a=s.attributes.length;r<a;r++)o.setAttribute(s.attributes[r].nodeName,s.attributes[r].nodeValue);s.parentNode.insertBefore(l,s),t.detach(s),s=o,l.appendChild(s),t.setValue("ej2_instances",n,s),this.clonedElement=l,this.element=s,this.element.id||(this.element.id=t.getUniqueID(this.getModuleName()))}},n.prototype.render=function(){if(this.initialize(),this.renderItems(),this.isMenu&&this.template&&this.isBlazor()){var e=this.element.id+"Template";t.resetBlazorTemplate(e,"Template"),Object.keys(t.blazorTemplates).length&&t.extend(this.tempItem,t.blazorTemplates[e],[],!0),t.updateBlazorTemplate(e,"Template",this)}this.wireEvents(),this.renderComplete()},n.prototype.initialize=function(){var e=this.getWrapper();e||(e=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.isMenu?this.element.parentElement.insertBefore(e,this.element):document.body.appendChild(e)),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),this.enableRtl&&e.classList.add("e-rtl"),e.appendChild(this.element),this.isMenu&&this.hamburgerMode&&(this.target||this.createHeaderContainer(e))},n.prototype.renderItems=function(){if(!this.items.length){var e=i.ListBase.createJsonFromElement(this.element,{fields:{child:"items"}});this.setProperties({items:e},!0),this.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML=""}var s=this.createItems(this.items);t.append(Array.prototype.slice.call(s.children),this.element),this.element.classList.add("e-menu-parent");var n=this.getWrapper();this.element.classList.contains("e-vertical")?this.addScrolling(n,this.element,"vscroll",n.offsetHeight,this.element.offsetHeight):this.addScrolling(n,this.element,"hscroll",n.offsetWidth,this.element.offsetWidth)},n.prototype.wireEvents=function(){var e=this.getWrapper();if(this.target){for(var i=void 0,n=t.selectAll(this.target),o=0,l=n.length;o<l;o++)i=n[o],this.isMenu?t.EventHandler.add(i,"click",this.menuHeaderClickHandler,this):t.Browser.isIos?new t.Touch(i,{tapHold:this.touchHandler.bind(this)}):t.EventHandler.add(i,"contextmenu",this.cmenuHandler,this);if(this.targetElement=i,!this.isMenu)for(var r=0,a=s.getScrollableParent(this.targetElement);r<a.length;r++){var d=a[r];t.EventHandler.add(d,"scroll",this.scrollHandler,this)}}t.Browser.isDevice||(this.delegateMoverHandler=this.moverHandler.bind(this),this.delegateMouseDownHandler=this.mouseDownHandler.bind(this),t.EventHandler.add(this.isMenu?document:e,"mouseover",this.delegateMoverHandler,this),t.EventHandler.add(document,"mousedown",this.delegateMouseDownHandler,this)),this.delegateClickHandler=this.clickHandler.bind(this),t.EventHandler.add(document,"click",this.delegateClickHandler,this),this.wireKeyboardEvent(e),this.rippleFn=t.rippleEffect(e,{selector:"."+y})},n.prototype.wireKeyboardEvent=function(e){var i={downarrow:"downarrow",uparrow:"uparrow",enter:"enter",leftarrow:"leftarrow",rightarrow:"rightarrow",escape:"escape"};this.isMenu&&(i.home="home",i.end="end"),new t.KeyboardEvents(e,{keyAction:this.keyBoardHandler.bind(this),keyConfigs:i})},n.prototype.mouseDownHandler=function(e){t.closest(e.target,".e-"+this.getModuleName()+"-wrapper")===this.getWrapper()||t.closest(e.target,".e-"+this.getModuleName()+"-popup")||this.closeMenu(this.isMenu?null:this.navIdx.length,e)},n.prototype.keyBoardHandler=function(e){var i="",s=e.target,n=this.isMenu&&!this.hamburgerMode&&!this.element.classList.contains("e-vertical")&&this.navIdx.length<1;if(e.preventDefault(),this.enableScrolling&&13===e.keyCode&&s.classList.contains("e-scroll-nav")&&this.removeLIStateByClass([m,g],[t.closest(s,".e-"+this.getModuleName()+"-wrapper")]),n)switch(e.action){case"rightarrow":i="rightarrow",e.action="downarrow";break;case"leftarrow":i="leftarrow",e.action="uparrow";break;case"downarrow":i="downarrow",e.action="rightarrow";break;case"uparrow":i="uparrow",e.action=""}else if(this.enableRtl)switch(e.action){case"leftarrow":n=!0,i="leftarrow",e.action="rightarrow";break;case"rightarrow":n=!0,i="rightarrow",e.action="leftarrow"}switch(e.action){case"downarrow":case"uparrow":case"end":case"home":this.upDownKeyHandler(e);break;case"rightarrow":this.rightEnterKeyHandler(e);break;case"leftarrow":this.leftEscKeyHandler(e);break;case"enter":this.hamburgerMode&&"SPAN"===s.tagName&&s.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):this.rightEnterKeyHandler(e);break;case"escape":this.leftEscKeyHandler(e)}n&&(e.action=i)},n.prototype.upDownKeyHandler=function(e){var t=this.getUlByNavIdx(),i="downarrow"===e.action||"home"===e.action?0:t.childElementCount-1,s=i,n=this.getLIByClass(t,m);n&&("end"!==e.action&&"home"!==e.action&&(s=this.getIdx(t,n)),n.classList.remove(m),"end"!==e.action&&"home"!==e.action&&("downarrow"===e.action?s++:s--,s===("downarrow"===e.action?t.childElementCount:-1)&&(s=i)));var o=t.children[s];s=this.isValidLI(o,s,e.action),t.children[s].classList.add(m),t.children[s].focus()},n.prototype.isValidLI=function(e,t,i){this.getWrapper();var s=this.getUlByNavIdx();return(e.classList.contains("e-separator")||e.classList.contains("e-disabled")||e.classList.contains(b))&&("downarrow"===i||"rightarrow"===i?t++:t--),((e=s.children[t]).classList.contains("e-separator")||e.classList.contains("e-disabled")||e.classList.contains(b))&&(t=this.isValidLI(e,t,i)),t},n.prototype.getUlByNavIdx=function(e){if(void 0===e&&(e=this.navIdx.length),this.isMenu){var i=[this.getWrapper()].concat([].slice.call(t.selectAll("."+C)))[e];return t.isNullOrUndefined(i)?null:t.select(".e-menu-parent",i)}return this.getWrapper().children[e]},n.prototype.rightEnterKeyHandler=function(e){var t,i=this.getUlByNavIdx(),s=this.getLIByClass(i,m);if(s){var n=this.getIdx(i,s),o=this.navIdx.concat(n),l=this.getItem(o);l.items.length?(this.navIdx.push(n),this.keyType="right",this.action=e.action,this.openMenu(s,l,null,null,e)):"enter"===e.action&&(this.isMenu&&0===this.navIdx.length?this.removeLIStateByClass([g],[this.getWrapper()]):s.classList.remove(m),s.classList.add(g),t={element:s,item:l,event:e},this.trigger("select",t),this.closeMenu(null,e))}},n.prototype.leftEscKeyHandler=function(e){this.navIdx.length?(this.keyType="left",this.closeMenu(this.navIdx.length,e)):"escape"===e.action&&this.closeMenu(null,e)},n.prototype.scrollHandler=function(e){this.closeMenu(null,e)},n.prototype.touchHandler=function(e){this.isTapHold=!0,this.cmenuHandler(e.originalEvent)},n.prototype.cmenuHandler=function(e){e.preventDefault(),this.isCMenu=!0,this.pageX=e.changedTouches?e.changedTouches[0].pageX+1:e.pageX+1,this.pageY=e.changedTouches?e.changedTouches[0].pageY+1:e.pageY+1,this.closeMenu(null,e),this.isCMenu&&(this.canOpen(e.target)&&this.openMenu(null,null,this.pageY,this.pageX,e),this.isCMenu=!1)},n.prototype.closeMenu=function(e,i){var n=this;if(void 0===e&&(e=0),void 0===i&&(i=null),this.isMenuVisible()){var o,l,r,a=void 0,d=void 0,h=this.getWrapper(),c=this.getPopups(),u=!1,f=this.isMenu?c.length+1:h.childElementCount;o=this.isMenu&&1!==f?t.select(".e-ul",c[f-2]):t.selectAll(".e-menu-parent",h)[f-1],this.isMenu&&o.classList.contains("e-menu")&&((a=this.getLIByClass(o,g))&&a.classList.remove(g),u=!0),u||(l=this.navIdx.length?this.getItem(this.navIdx):null,r=l?l.items:this.items,d={element:o,parentItem:l,items:r,event:i,cancel:!1},this.trigger("beforeClose",d,function(a){var d,h,c,u=!a.cancel;if((u||n.isCMenu)&&(n.isMenu?(d=t.closest(o,"."+C),n.hamburgerMode&&(d.parentElement.style.minHeight=""),n.unWireKeyboardEvent(d),n.destroyScrollObj(t.getInstance(d.children[0],p),d.children[0]),(c=t.getInstance(d,s.Popup)).hide(),c.destroy(),t.detach(d)):n.toggleAnimation(o,!1),h={element:o,parentItem:l,items:r},n.trigger("onClose",h),n.navIdx.pop()),n.isCMenu)n.canOpen(i.target)&&n.openMenu(null,null,n.pageY,n.pageX,i),n.isCMenu=!1;else if(u&&n.hamburgerMode&&null!==e)n.afterCloseMenu(i);else if(u&&!e&&n.navIdx.length)n.closeMenu(null,i);else if(!u||n.isMenu||e||0!==n.navIdx.length||n.isMenusClosed)if(u&&n.isMenu&&i&&i.target&&0!==n.navIdx.length&&t.closest(i.target,".e-menu-parent.e-control"))n.closeMenu(0,i);else if(!u||"right"!==n.keyType&&"click"!==n.keyType){var f=n.getUlByNavIdx(),v=n.getLIByClass(f,g);v&&(v.setAttribute("aria-expanded","false"),v.classList.remove(g),v.classList.add(m),v.focus())}else n.afterCloseMenu(i);else n.isMenusClosed=!0,n.closeMenu(0,i);n.removeStateWrapper()}))}},n.prototype.destroyScrollObj=function(e,i){e&&(e.destroy(),i.parentElement.appendChild(t.select(".e-menu-parent",i)),t.detach(i))},n.prototype.getPopups=function(){var e=this,t=[];return[].slice.call(document.querySelectorAll("."+C)).forEach(function(i){e.getIndex(i.querySelector("."+y).id,!0).length&&t.push(i)}),t},n.prototype.isMenuVisible=function(){return this.navIdx.length>0||this.element.classList.contains("e-contextmenu")&&t.isVisible(this.element).valueOf()},n.prototype.canOpen=function(e){var i=!0;if(this.filter){i=!1;for(var s=this.filter.split(" "),n=0,o=s.length;n<o;n++)if(t.closest(e,"."+s[n])){i=!0;break}}return i},n.prototype.openMenu=function(e,i,n,o,l,r){void 0===n&&(n=0),void 0===o&&(o=0),void 0===l&&(l=null),void 0===r&&(r=this.targetElement);var a=this.getWrapper();this.lItem=e;var d=""!==this.element.id?this.element.id:"menu";if(this.isMenusClosed=!1,e){if(this.uList=this.createItems(i[this.getField("children",this.navIdx.length-1)]),!this.isMenu&&t.Browser.isDevice){a.lastChild.style.display="none";var h={text:i[this.getField("text")].toString(),iconCss:"e-icons e-previous"},c=new E(this.items[0],"items",h,!0),p=this.createItems([c]).children[0];p.classList.add(v),this.uList.insertBefore(p,this.uList.children[0])}this.isMenu?(this.popupWrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper "+C,id:e.id+"-ej2menu-"+d+"-popup"}),this.hamburgerMode?(n=e.offsetHeight,e.appendChild(this.popupWrapper)):document.body.appendChild(this.popupWrapper),this.isNestedOrVertical=this.element.classList.contains("e-vertical")||1!==this.navIdx.length,this.popupObj=this.generatePopup(this.popupWrapper,this.uList,e,this.isNestedOrVertical),this.hamburgerMode?this.calculateIndentSize(this.uList,e):(this.cssClass&&t.addClass([this.popupWrapper],this.cssClass.split(" ")),this.popupObj.hide()),this.triggerBeforeOpen(e,this.uList,i,l,0,0,"menu")):(this.uList.style.zIndex=this.element.style.zIndex,a.appendChild(this.uList),this.triggerBeforeOpen(e,this.uList,i,l,n,o,"none"))}else this.uList=this.element,this.uList.style.zIndex=s.getZindexPartial(r||this.element).toString(),this.triggerBeforeOpen(e,this.uList,i,l,n,o,"none");if(this.isMenu&&this.template&&this.isBlazor()){var u=this.element.id+"Template";if(Object.keys(t.blazorTemplates).length){var f=t.blazorTemplates[u];this.tempItem=this.tempItem.concat(f),t.blazorTemplates[u]=this.tempItem}t.updateBlazorTemplate(u,"Template",this)}},n.prototype.calculateIndentSize=function(e,t){var i=getComputedStyle(t),s=parseInt(i.textIndent,10);this.navIdx.length<2&&!t.classList.contains("e-blankicon")?s*=2:s+=s/4,e.style.textIndent=s+"px";var n=e.querySelectorAll(".e-blankicon");if(n&&n.length){var o=e.querySelector(".e-menu-icon"),l=getComputedStyle(o),r=parseInt(l.marginRight,10)+o.offsetWidth+s;n.forEach(function(e){return e.style.textIndent=r+"px"})}},n.prototype.generatePopup=function(e,i,n,o){var l=this,r=new s.Popup(e,{actionOnScroll:this.hamburgerMode?"none":"reposition",relateTo:n,collision:this.hamburgerMode?{X:"none",Y:"none"}:{X:o||this.enableRtl?"none":"flip",Y:"fit"},position:o&&!this.hamburgerMode?{X:"right",Y:"top"}:{X:"left",Y:"bottom"},targetType:"relative",enableRtl:this.enableRtl,content:i,open:function(){var e=t.select(".e-menu-vscroll",r.element);e&&(e.style.height="inherit",e.style.maxHeight="");var i=t.select(".e-ul",r.element);r.element.style.maxHeight="",i.focus(),l.triggerOpen(i)}});return r},n.prototype.createHeaderContainer=function(e){e=e||this.getWrapper();var t=this.createElement("span",{className:"e-"+this.getModuleName()+"-header"}),i=this.createElement("span",{className:"e-"+this.getModuleName()+"-title",innerHTML:this.title}),s=this.createElement("span",{className:"e-icons e-"+this.getModuleName()+"-icon",attrs:{tabindex:"0"}});t.appendChild(i),t.appendChild(s),e.insertBefore(t,this.element)},n.prototype.openHamburgerMenu=function(e){this.hamburgerMode&&this.triggerBeforeOpen(null,this.element,null,e,0,0,"hamburger")},n.prototype.closeHamburgerMenu=function(e){var t=this;if(this.hamburgerMode){var i=void 0;i={element:this.element,parentItem:null,event:e,items:this.items,cancel:!1},this.trigger("beforeClose",i,function(i){i.cancel||(t.closeMenu(null,e),t.element.classList.add("e-hide-menu"),t.trigger("onClose",{element:t.element,parentItem:null,items:t.items}))})}},n.prototype.callFit=function(e,t,i,n,o){return s.fit(e,null,{X:t,Y:i},{top:n,left:o})},n.prototype.triggerBeforeOpen=function(e,i,n,o,l,r,a){var d=this,h=(this.getIndex(e?e.id:null,!0),{element:i,items:e?n[this.getField("children",this.navIdx.length-1)]:this.items,parentItem:n,event:o,cancel:!1,top:l,left:r}),c=a;this.trigger("beforeOpen",h,function(i){switch(c){case"menu":d.hamburgerMode||(d.top=i.top,d.left=i.left),d.popupWrapper.style.display="block",d.hamburgerMode||(d.popupWrapper.style.maxHeight=d.popupWrapper.getBoundingClientRect().height+"px",d.addScrolling(d.popupWrapper,d.uList,"vscroll",d.popupWrapper.offsetHeight,d.uList.offsetHeight),d.checkScrollOffset(o));var l=void 0;if(d.hamburgerMode||d.left||d.top)d.popupObj.collision={X:"none",Y:"none"};else{if(d.popupObj.refreshPosition(d.lItem,!0),d.left=parseInt(d.popupWrapper.style.left,10),d.top=parseInt(d.popupWrapper.style.top,10),d.enableRtl&&(d.left=d.isNestedOrVertical?d.left-d.popupWrapper.offsetWidth-d.lItem.parentElement.offsetWidth:d.left-d.popupWrapper.offsetWidth+d.lItem.offsetWidth),l=s.isCollide(d.popupWrapper,null,d.left,d.top),(d.isNestedOrVertical||d.enableRtl)&&(l.indexOf("right")>-1||l.indexOf("left")>-1)){d.popupObj.collision.X="none";var r=t.closest(d.lItem,".e-"+d.getModuleName()+"-wrapper").offsetWidth;d.left=d.enableRtl?s.calculatePosition(d.lItem,d.isNestedOrVertical?"right":"left","top").left:d.left-d.popupWrapper.offsetWidth-r}((l=s.isCollide(d.popupWrapper,null,d.left,d.top)).indexOf("left")>-1||l.indexOf("right")>-1)&&(d.left=d.callFit(d.popupWrapper,!0,!1,d.top,d.left).left),d.popupWrapper.style.left=d.left+"px"}d.popupWrapper.style.display="";break;case"none":d.top=i.top,d.left=i.left;break;case"hamburger":i.cancel||(d.element.classList.remove("e-hide-menu"),d.triggerOpen(d.element))}if("hamburger"!==c)if(i.cancel)d.isMenu&&(d.popupObj.destroy(),t.detach(d.popupWrapper)),d.navIdx.pop();else if(d.isMenu)if(d.hamburgerMode)d.popupWrapper.style.top=d.top+"px",d.popupWrapper.style.left="0px",d.toggleAnimation(d.popupWrapper);else{d.wireKeyboardEvent(d.popupWrapper),t.rippleEffect(d.popupWrapper,{selector:"."+y}),d.popupWrapper.style.left=d.left+"px",d.popupWrapper.style.top=d.top+"px";var a="None"!==d.animationSettings.effect?{name:d.animationSettings.effect,duration:d.animationSettings.duration,timingFunction:d.animationSettings.easing}:null;d.popupObj.show(a,d.lItem)}else d.setPosition(d.lItem,d.uList,d.top,d.left),d.toggleAnimation(d.uList);if("right"===d.keyType){var h=d.getUlByNavIdx();if(e.classList.remove(m),d.isMenu&&1===d.navIdx.length&&d.removeLIStateByClass([g],[d.getWrapper()]),e.classList.add(g),"enter"===d.action){var p={element:e,item:n,event:o};d.trigger("select",p)}e.focus(),h=d.getUlByNavIdx();var u=d.isValidLI(h.children[0],0,d.action);h.children[u].classList.add(m),h.children[u].focus()}})},n.prototype.checkScrollOffset=function(e){var i=this.getWrapper();if(i.children[0].classList.contains("e-menu-hscroll")&&1===this.navIdx.length){var s=t.isNullOrUndefined(e)?this.element:t.closest(e.target,"."+y),n=t.select(".e-hscroll-bar",i),o=void 0,l=void 0;n.scrollLeft>s.offsetLeft&&(n.scrollLeft-=n.scrollLeft-s.offsetLeft),(o=n.scrollLeft+n.offsetWidth)<(l=s.offsetLeft+s.offsetWidth)&&(n.scrollLeft+=l-o)}},n.prototype.addScrolling=function(e,i,s,n,o){if(this.enableScrolling&&n<o){var l=this.createElement("div",{className:"e-menu-"+s});e.appendChild(l),l.appendChild(i),l.style.maxHeight=e.style.maxHeight;e.style.overflow="hidden","vscroll"===s?new p({enableRtl:this.enableRtl},l).scrollStep=t.select(".e-"+s+"-bar",e).offsetHeight/2:new d({enableRtl:this.enableRtl},l).scrollStep=t.select(".e-"+s+"-bar",e).offsetWidth}},n.prototype.setPosition=function(e,i,n,o){if(this.toggleVisiblity(i),i===this.element||!t.isNullOrUndefined(o)&&!t.isNullOrUndefined(n))(a=s.isCollide(i,null,o,n)).indexOf("right")>-1&&(o-=i.offsetWidth),a.indexOf("bottom")>-1&&(n=(r=this.callFit(i,!1,!0,n,o)).top-20),(a=s.isCollide(i,null,o,n)).indexOf("left")>-1&&(o=(r=this.callFit(i,!0,!1,n,o)).left);else if(t.Browser.isDevice)n=Number(this.element.style.top.replace("px","")),o=Number(this.element.style.left.replace("px",""));else{var l=this.enableRtl?"left":"right",r=s.calculatePosition(e,l,"top");n=r.top,o=r.left;var a=s.isCollide(i,null,this.enableRtl?o-i.offsetWidth:o,n),d=a.indexOf("left")>-1||a.indexOf("right")>-1;d&&(o=(r=s.calculatePosition(e,this.enableRtl?"right":"left","top")).left),(this.enableRtl||d)&&(o=this.enableRtl&&d?o:o-i.offsetWidth),a.indexOf("bottom")>-1&&(n=(r=this.callFit(i,!1,!0,n,o)).top)}this.toggleVisiblity(i,!1),i.style.top=n+"px",i.style.left=o+"px"},n.prototype.toggleVisiblity=function(e,t){void 0===t&&(t=!0),e.style.visibility=t?"hidden":"",e.style.display=t?"block":"none"},n.prototype.createItems=function(e){var s=this,n=this.navIdx?this.navIdx.length:0,o=this.hasField(e,this.getField("iconCss",n)),l={showIcon:o,moduleName:"menu",fields:this.getFields(n),template:this.template,itemCreating:function(e){e.curData[e.fields.id]||(e.curData[e.fields.id]=t.getUniqueID("menuitem")),e.curData.htmlAttributes={role:"menuitem",tabindex:"-1"},s.isMenu&&!e.curData[s.getField("separator",n)]&&(e.curData.htmlAttributes["aria-label"]=e.curData[e.fields.text]),""===e.curData[e.fields.iconCss]&&(e.curData[e.fields.iconCss]=null)},itemCreated:function(e){if(e.curData[s.getField("separator",n)]&&(e.item.classList.add("e-separator"),e.item.removeAttribute("role")),!o||e.curData[e.fields.iconCss]||e.curData[s.getField("separator",n)]||e.item.classList.add("e-blankicon"),e.curData[e.fields.child]&&e.curData[e.fields.child].length){var t=s.createElement("span",{className:"e-icons e-caret"});e.item.appendChild(t),e.item.setAttribute("aria-haspopup","true"),e.item.setAttribute("aria-expanded","false"),s.isMenu||e.item.removeAttribute("role"),e.item.classList.add("e-menu-caret-icon")}s.isMenu&&s.template&&(e.item.setAttribute("id",e.curData[e.fields.id].toString()),e.item.removeAttribute("data-uid"));var i={item:e.curData,element:e.item};s.trigger("beforeItemRender",i)}};this.setProperties({items:this.items},!0),this.isMenu&&(l.templateID=this.element.id+"Template");var r=i.ListBase.createList(this.createElement,e,l,!this.template);return r.setAttribute("tabindex","0"),this.isMenu&&r.setAttribute("role","menu"),r},n.prototype.moverHandler=function(e){var i=e.target;this.liTrgt=i;var s=this.getLI(i),n=s?t.closest(s,".e-"+this.getModuleName()+"-wrapper"):this.getWrapper(),o=this.getWrapper(),l=new RegExp("-ej2menu-(.*)-popup"),r=!1;if(n){if((""!==n.id?l.exec(n.id)[1]:n.querySelector("ul").id)!==this.element.id){if(this.removeLIStateByClass([m,g],[this.getWrapper()]),!this.navIdx.length)return;r=!0}s&&t.closest(s,".e-"+this.getModuleName()+"-wrapper")&&!r&&(this.removeLIStateByClass([m],this.isMenu?[n].concat(this.getPopups()):[n]),this.removeLIStateByClass([m],this.isMenu?[o].concat(this.getPopups()):[o]),s.classList.add(m),this.showItemOnClick||this.clickHandler(e)),this.isMenu&&(this.showItemOnClick||i.parentElement===n||t.closest(i,".e-"+this.getModuleName()+"-popup")||s&&(!s||this.getIndex(s.id,!0).length)?r&&this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e)):(this.removeLIStateByClass([m,g],[n]),this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e))),this.isClosed||this.removeStateWrapper(),this.isClosed=!1)}},n.prototype.removeStateWrapper=function(){if(this.liTrgt){var e=t.closest(this.liTrgt,".e-menu-vscroll");"DIV"===this.liTrgt.tagName&&e&&this.removeLIStateByClass([m,g],[e])}},n.prototype.removeLIStateByClass=function(e,i){for(var s,n=0;n<i.length;n++)!function(n){e.forEach(function(e){(s=t.select("."+e,i[n]))&&s.classList.remove(e)})}(n)},n.prototype.getField=function(e,t){void 0===t&&(t=0);var i=this.fields[e];return"string"==typeof i?i:i[t]?i[t].toString():i[i.length-1].toString()},n.prototype.getFields=function(e){return void 0===e&&(e=0),{id:this.getField("itemId",e),iconCss:this.getField("iconCss",e),text:this.getField("text",e),url:this.getField("url",e),child:this.getField("children",e),separator:this.getField("separator",e)}},n.prototype.hasField=function(e,t){for(var i=0,s=e.length;i<s;i++)if(e[i][t])return!0;return!1},n.prototype.menuHeaderClickHandler=function(e){this.element.classList.contains("e-hide-menu")?this.openHamburgerMenu(e):this.closeHamburgerMenu(e)},n.prototype.clickHandler=function(e){if(this.isTapHold)this.isTapHold=!1;else{var i=this.getWrapper(),s=e.target,n=this.cli=this.getLI(s),o=n?t.closest(n,".e-"+this.getModuleName()+"-wrapper"):null,l=n&&o&&(this.isMenu?this.getIndex(n.id,!0).length>0:i.firstElementChild.id===o.firstElementChild.id);if(l&&"click"===e.type&&!n.classList.contains(v)){this.setLISelected(n);var r=this.getIndex(n.id,!0),a={element:n,item:this.getItem(r),event:e};this.trigger("select",a)}if(l&&("mouseover"===e.type||t.Browser.isDevice||this.showItemOnClick)){var d=void 0;if(n.classList.contains(v))d=i.children[this.navIdx.length-1],this.toggleAnimation(d),(p=this.getLIByClass(d,g))&&p.classList.remove(g),t.detach(n.parentNode),this.navIdx.pop();else if(!n.classList.contains("e-separator")){this.showSubMenu=!0;var h=n.parentNode;if(this.cliIdx=this.getIdx(h,n),this.isMenu||!t.Browser.isDevice){var c=this.isMenu?Array.prototype.indexOf.call([i].concat(this.getPopups()),t.closest(h,".e-"+this.getModuleName()+"-wrapper")):this.getIdx(i,h);if(this.navIdx[c]===this.cliIdx&&(this.showSubMenu=!1),c!==this.navIdx.length&&("mouseover"!==e.type||this.showSubMenu)){var p=this.getLIByClass(h,g);p&&p.classList.remove(g),this.isClosed=!0,this.keyType="click",this.closeMenu(c+1,e)}}this.isClosed||this.afterCloseMenu(e),this.isClosed=!1}}else if(this.isMenu&&"DIV"===s.tagName&&this.navIdx.length&&t.closest(s,".e-menu-vscroll")){var u=t.closest(s,"."+C),f=Array.prototype.indexOf.call(this.getPopups(),u)+1;f<this.navIdx.length&&(this.closeMenu(f+1,e),this.removeLIStateByClass([m,g],[u]))}else this.isMenu&&this.hamburgerMode&&"SPAN"===s.tagName&&s.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):"UL"===s.tagName&&s.parentElement===i||n&&n.querySelector(".e-caret")||this.closeMenu(null,e)}},n.prototype.afterCloseMenu=function(e){if(this.showSubMenu){var i=this.navIdx.concat(this.cliIdx),s=this.getItem(i);s[this.getField("children",i.length-1)]&&s[this.getField("children",i.length-1)].length?(("mouseover"===e.type||t.Browser.isDevice&&this.isMenu)&&this.setLISelected(this.cli),this.cli.setAttribute("aria-expanded","true"),this.navIdx.push(this.cliIdx),this.openMenu(this.cli,s,null,null,e)):"mouseover"!==e.type&&this.closeMenu(null,e)}this.keyType=""},n.prototype.setLISelected=function(e){var t=this.getLIByClass(e.parentElement,g);t&&t.classList.remove(g),this.isMenu||e.classList.remove(m),e.classList.add(g)},n.prototype.getLIByClass=function(e,t){for(var i=0,s=e.children.length;i<s;i++)if(e.children[i].classList.contains(t))return e.children[i];return null},n.prototype.getItem=function(e){var t=(e=e.slice()).pop();return this.getItems(e)[t]},n.prototype.getItems=function(e){for(var t=this.items,i=0;i<e.length;i++)t=t[e[i]][this.getField("children",i)];return t},n.prototype.getIdx=function(e,t,i){void 0===i&&(i=!0);var s=Array.prototype.indexOf.call(e.querySelectorAll("li"),t);return s=this.isMenu&&this.template&&this.isBlazor()?Array.prototype.indexOf.call(e.querySelectorAll(t.tagName),t):Array.prototype.indexOf.call(e.children,t),i&&e.children[0].classList.contains(v)&&s--,s},n.prototype.getLI=function(e){return"LI"===e.tagName&&e.classList.contains("e-menu-item")?e:t.closest(e,"li.e-menu-item")},n.prototype.isBlazor=function(){return-1!==Object.keys(window).indexOf("ejsInterop")},n.prototype.removeChildElement=function(e){for(;e.firstElementChild;)e.removeChild(e.firstElementChild);return e},n.prototype.onPropertyChanged=function(e,i){for(var s=this,n=this.getWrapper(),o=this,l=0,r=Object.keys(e);l<r.length;l++)!function(l){switch(l){case"cssClass":i.cssClass&&t.removeClass([n],i.cssClass.split(" ")),e.cssClass&&t.addClass([n],e.cssClass.split(" "));break;case"enableRtl":n.classList.toggle("e-rtl");break;case"showItemOnClick":o.unWireEvents(),o.showItemOnClick=e.showItemOnClick,o.wireEvents();break;case"enableScrolling":if(e.enableScrolling){var r;o.element.classList.contains("e-vertical")?o.addScrolling(n,o.element,"vscroll",n.offsetHeight,o.element.offsetHeight):o.addScrolling(n,o.element,"hscroll",n.offsetWidth,o.element.offsetWidth),o.getPopups().forEach(function(e){r=t.select(".e-ul",e),s.addScrolling(e,r,"vscroll",e.offsetHeight,r.offsetHeight)})}else{var a=n.children[0];o.element.classList.contains("e-vertical")?o.destroyScrollObj(t.getInstance(a,p),a):o.destroyScrollObj(t.getInstance(a,d),a),n.style.overflow="",n.appendChild(o.element),o.getPopups().forEach(function(e){a=e.children[0],s.destroyScrollObj(t.getInstance(a,p),a),e.style.overflow=""})}break;case"items":var h=void 0,c=void 0,u=void 0;if(Object.keys(i.items).length)for(var f=Object.keys(e.items),m=0;m<f.length;m++)(c=o.getChangedItemIndex(e,[],Number(f[m]))).length<=o.getWrapper().children.length&&(h=c.pop(),u=o.getItems(c),o.insertAfter([u[h]],u[h].text),u=o.getItems(c),o.removeItem(u,c,h)),c.length=0;else{var v=o.element;o.isBlazor()?v=o.removeChildElement(o.element):v.innerHTML="",[].slice.call(o.createItems(o.items).children).forEach(function(e){v.appendChild(e)});for(var m=1,g=n.childElementCount;m<g;m++)t.detach(n.lastElementChild);o.navIdx=[]}}}(r[l])},n.prototype.getChangedItemIndex=function(e,t,i){t.push(i);var s=Object.keys(e.items[i]).pop();if("items"===s){var n=e.items[i];this.getChangedItemIndex(n,t,Number(Object.keys(n.items).pop()))}else"isParentArray"===s&&t.length>1&&t.pop();return t},n.prototype.removeItem=function(e,i,s){e.splice(s,1);var n=this.getWrapper().children;i.length<n.length&&t.detach(n[i.length].children[s])},n.prototype.unWireEvents=function(e){void 0===e&&(e=this.target);var i=this.getWrapper();if(e){for(var n=void 0,o=void 0,l=t.selectAll(e),r=0,a=l.length;r<a;r++)n=l[r],this.isMenu?t.EventHandler.remove(n,"click",this.menuHeaderClickHandler):t.Browser.isIos?(o=t.getInstance(n,t.Touch))&&o.destroy():t.EventHandler.remove(n,"contextmenu",this.cmenuHandler);if(!this.isMenu)for(var d=0,h=s.getScrollableParent(this.targetElement);d<h.length;d++){var c=h[d];t.EventHandler.remove(c,"scroll",this.scrollHandler)}}t.Browser.isDevice||(t.EventHandler.remove(this.isMenu?document:i,"mouseover",this.delegateMoverHandler),t.EventHandler.remove(document,"mousedown",this.delegateMouseDownHandler)),t.EventHandler.remove(document,"click",this.delegateClickHandler),this.unWireKeyboardEvent(i),this.rippleFn()},n.prototype.unWireKeyboardEvent=function(e){var i=t.getInstance(e,t.KeyboardEvents);i&&i.destroy()},n.prototype.toggleAnimation=function(e,t){var i=this;void 0===t&&(t=!0);var s,n;"None"!==this.animationSettings.effect&&t?this.animation.animate(e,{name:this.animationSettings.effect,duration:this.animationSettings.duration,timingFunction:this.animationSettings.easing,begin:function(e){i.hamburgerMode?(n=e.element.parentElement,e.element.style.position="absolute",s=n.offsetHeight,e.element.style.maxHeight=e.element.offsetHeight+"px",n.style.maxHeight=""):(e.element.style.display="block",e.element.style.maxHeight=e.element.getBoundingClientRect().height+"px")},progress:function(e){i.hamburgerMode&&(n.style.minHeight=s+e.element.offsetHeight+"px")},end:function(e){i.hamburgerMode?(e.element.style.position="",e.element.style.maxHeight="",n.style.minHeight="",e.element.style.top="0px",e.element.children[0].focus(),i.triggerOpen(e.element.children[0])):i.end(e.element,t)}}):this.end(e,t)},n.prototype.triggerOpen=function(e){var t=this.navIdx.length?this.getItem(this.navIdx):null,i={element:e,parentItem:t,items:t?t.items:this.items};this.trigger("onOpen",i)},n.prototype.end=function(e,i){if(i)if(e.style.display="block",e.style.maxHeight="",this.triggerOpen(e),e.querySelector("."+m))e.querySelector("."+m).focus();else{var s=void 0;(s=this.getWrapper().children[this.getIdx(this.getWrapper(),e)-1])?s.querySelector("."+g).focus():this.element.focus()}else if(e===this.element){var n=this.getLIByClass(this.element,m);n&&n.classList.remove(m);var o=this.getLIByClass(this.element,g);o&&o.classList.remove(g),e.style.display="none"}else t.detach(e)},n.prototype.getPersistData=function(){return""},n.prototype.getWrapper=function(){return t.closest(this.element,".e-"+this.getModuleName()+"-wrapper")},n.prototype.getIndex=function(e,t,i,s,n,o){void 0===i&&(i=this.items),void 0===s&&(s=[]),void 0===n&&(n=!1),void 0===o&&(o=0);var l;o=n?o+1:0;for(var r=0,a=i.length;r<a;r++){if(l=i[r],(t?l[this.getField("itemId",o)]:l[this.getField("text",o)])===e){s.push(r);break}if(l[this.getField("children",o)]&&l[this.getField("children",o)].length){if(-1!==(s=this.getIndex(e,t,l[this.getField("children",o)],s,!0,o))[s.length-1]){s.unshift(r);break}r!==a-1&&s.pop()}else r===a-1&&s.push(-1)}return n||-1!==s[0]?s:[]},n.prototype.enableItems=function(e,i,s){void 0===i&&(i=!0);for(var n,o,l,r="e-disabled",a=0;a<e.length;a++)o=(l=this.getIndex(e[a],s)).pop(),(n=this.getUlByNavIdx(l.length))&&(i?this.isMenu?(n.children[o].classList.remove(r),n.children[o].removeAttribute("aria-disabled")):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[o+1].classList.remove(r):n.children[o].classList.remove(r):this.isMenu?(n.children[o].classList.add(r),n.children[o].setAttribute("aria-disabled","true")):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[o+1].classList.add(r):n.children[o].classList.add(r))},n.prototype.showItems=function(e,t){this.showHideItems(e,!1,t)},n.prototype.hideItems=function(e,t){this.showHideItems(e,!0,t)},n.prototype.showHideItems=function(e,i,s){for(var n,o,l,r=0;r<e.length;r++)o=(l=this.getIndex(e[r],s)).pop(),(n=this.getUlByNavIdx(l.length))&&(i?t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[o+1].classList.add(b):n.children[o].classList.add(b):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[o+1].classList.remove(b):n.children[o].classList.remove(b))},n.prototype.removeItems=function(e,t){for(var i,s,n,o=0;o<e.length;o++)i=(s=this.getIndex(e[o],t)).pop(),n=this.getItems(s),this.removeItem(n,s,i)},n.prototype.insertAfter=function(e,t,i){this.insertItems(e,t,i)},n.prototype.insertBefore=function(e,t,i){this.insertItems(e,t,i,!1)},n.prototype.insertItems=function(e,i,s,n){void 0===n&&(n=!0);for(var o,l,r,a,d,h=0;h<e.length;h++){l=(r=this.getIndex(i,s)).pop(),a=this.getItems(r),d=new E(a[0],"items",e[h],!0),a.splice(n?l+1:l,0,d);var c=this.isMenu?[this.getWrapper()].concat(this.getPopups()):[].slice.call(this.getWrapper().children);if(r.length<c.length){l=n?l+1:l,this.hasField(a,this.getField("iconCss",r.length-1)),o=this.createItems(a).children[l];var p=this.isMenu?t.select(".e-menu-parent",c[r.length]):c[r.length];p.insertBefore(o,p.children[l])}}},n.prototype.removeAttributes=function(){var e=this;["top","left","display","z-index"].forEach(function(t){e.element.style.removeProperty(t)}),["role","tabindex","class","style"].forEach(function(t){"class"===t&&e.element.classList.contains("e-menu-parent")&&e.element.classList.remove("e-menu-parent"),-1!==["class","style"].indexOf(t)&&e.element.getAttribute(t)||e.element.removeAttribute(t),e.isMenu&&"class"===t&&e.element.classList.contains("e-vertical")&&e.element.classList.remove("e-vertical")})},n.prototype.destroy=function(){var i=this.getWrapper();if(i){if(this.unWireEvents(),this.isMenu)this.closeMenu(),this.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML="",this.removeAttributes(),i.parentNode.insertBefore(this.element,i);else{if(this.clonedElement.style.display="","EJS-CONTEXTMENU"===this.clonedElement.tagName)t.addClass([this.clonedElement],["e-control","e-lib","e-"+this.getModuleName()]),this.element=this.clonedElement;else if(this.refreshing&&this.clonedElement.childElementCount&&"LI"===this.clonedElement.children[0].tagName&&this.setProperties({items:[]},!0),document.getElementById(this.clonedElement.id)){var s=this.clonedElement.nextElementSibling;s&&s!==i?this.clonedElement.parentElement.insertBefore(this.element,s):this.clonedElement.parentElement.appendChild(this.element),this.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML="",t.append([].slice.call(this.clonedElement.children),this.element),t.detach(this.clonedElement),this.removeAttributes()}this.clonedElement=null}this.isMenu&&this.clonedElement?(t.detach(this.element),i.style.display="",i.classList.remove("e-"+this.getModuleName()+"-wrapper"),i.removeAttribute("data-ripple")):t.detach(i),e.prototype.destroy.call(this)}},f([t.Event()],n.prototype,"beforeItemRender",void 0),f([t.Event()],n.prototype,"beforeOpen",void 0),f([t.Event()],n.prototype,"onOpen",void 0),f([t.Event()],n.prototype,"beforeClose",void 0),f([t.Event()],n.prototype,"onClose",void 0),f([t.Event()],n.prototype,"select",void 0),f([t.Event()],n.prototype,"created",void 0),f([t.Property("")],n.prototype,"cssClass",void 0),f([t.Property(!1)],n.prototype,"showItemOnClick",void 0),f([t.Property("")],n.prototype,"target",void 0),f([t.Property("")],n.prototype,"filter",void 0),f([t.Property(null)],n.prototype,"template",void 0),f([t.Property(!1)],n.prototype,"enableScrolling",void 0),f([t.Complex({},N)],n.prototype,"fields",void 0),f([t.Collection([],E)],n.prototype,"items",void 0),f([t.Complex({},x)],n.prototype,"animationSettings",void 0),n=f([t.NotifyPropertyChanges],n)}(t.Component),w=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),k=function(e,t,i,s){var n,o=arguments.length,l=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(o<3?n(l):o>3?n(t,i,l):n(t,i))||l);return o>3&&l&&Object.defineProperty(t,i,l),l},S="e-toolbar-items",L="e-toolbar-item",A="e-toolbar-popup",I=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return w(i,e),k([t.Property("")],i.prototype,"id",void 0),k([t.Property("")],i.prototype,"text",void 0),k([t.Property("auto")],i.prototype,"width",void 0),k([t.Property("")],i.prototype,"cssClass",void 0),k([t.Property(!1)],i.prototype,"showAlwaysInPopup",void 0),k([t.Property("")],i.prototype,"prefixIcon",void 0),k([t.Property("")],i.prototype,"suffixIcon",void 0),k([t.Property("None")],i.prototype,"overflow",void 0),k([t.Property("")],i.prototype,"template",void 0),k([t.Property("Button")],i.prototype,"type",void 0),k([t.Property("Both")],i.prototype,"showTextOn",void 0),k([t.Property(null)],i.prototype,"htmlAttributes",void 0),k([t.Property("")],i.prototype,"tooltipText",void 0),k([t.Property("Left")],i.prototype,"align",void 0),k([t.Event()],i.prototype,"click",void 0),i}(t.ChildProperty),D=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.resizeContext=s.resize.bind(s),s.keyConfigs={moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow",popupOpen:"enter",popupClose:"escape",tab:"tab",home:"home",end:"end"},s}return w(i,e),i.prototype.destroy=function(){var i=this,s=this.element;for(e.prototype.destroy.call(this),this.unwireEvents(),this.tempId.forEach(function(e){t.isNullOrUndefined(i.element.querySelector(e))||(document.body.appendChild(i.element.querySelector(e)).style.display="none")});s.firstElementChild;)s.removeChild(s.firstElementChild);this.trgtEle&&s.appendChild(this.ctrlTem),this.clearProperty(),this.popObj=null,this.tbarAlign=null,this.remove(this.element,"e-toolpop"),s.removeAttribute("style"),["aria-disabled","aria-orientation","aria-haspopup","role"].forEach(function(e){i.element.removeAttribute(e)})},i.prototype.preRender=function(){var e={enableCollision:this.enableCollision,scrollStep:this.scrollStep};this.trigger("beforeCreate",e),this.enableCollision=e.enableCollision,this.scrollStep=e.scrollStep,this.scrollModule=null,this.popObj=null,this.tempId=[],this.tbarItemsCol=this.items,this.isVertical=!!this.element.classList.contains("e-vertical"),this.isExtendedOpen=!1,this.popupPriCount=0,this.enableRtl&&this.add(this.element,"e-rtl")},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this),window.addEventListener("resize",this.resizeContext),this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs}),t.EventHandler.add(this.element,"keydown",this.docKeyDown,this),this.element.setAttribute("tabIndex","0")},i.prototype.docKeyDown=function(e){if("INPUT"!==e.target.tagName){var i=!t.isNullOrUndefined(this.popObj)&&t.isVisible(this.popObj.element)&&"Extended"!==this.overflowMode;9===e.keyCode&&!0===e.target.classList.contains("e-hor-nav")&&i&&this.popObj.hide({name:"FadeOut",duration:100}),(40===e.keyCode||38===e.keyCode||35===e.keyCode||36===e.keyCode)&&e.preventDefault()}},i.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),this.destroyScroll(),this.keyModule.destroy(),window.removeEventListener("resize",this.resizeContext),t.EventHandler.remove(document,"scroll",this.docEvent),t.EventHandler.remove(this.element,"keydown",this.docKeyDown),t.EventHandler.remove(document,"click",this.docEvent)},i.prototype.clearProperty=function(){this.tbarEle=[],this.tbarAlgEle={lefts:[],centers:[],rights:[]}},i.prototype.docEvent=function(e){var i=t.closest(e.target,".e-popup");this.popObj&&t.isVisible(this.popObj.element)&&!i&&"Popup"===this.overflowMode&&this.popObj.hide({name:"FadeOut",duration:100})},i.prototype.destroyScroll=function(){this.scrollModule&&(this.tbarAlign&&this.add(this.scrollModule.element,"e-tbar-pos"),this.scrollModule.destroy(),this.scrollModule=null)},i.prototype.destroyItems=function(){[].slice.call(this.element.querySelectorAll("."+L)).forEach(function(e){t.detach(e)});var e=this.element.querySelector("."+S);this.tbarAlign&&([].slice.call(e.children).forEach(function(e){t.detach(e)}),this.tbarAlign=!1,this.remove(e,"e-tbar-pos")),this.clearProperty()},i.prototype.destroyMode=function(){this.scrollModule&&(this.remove(this.scrollModule.element,"e-rtl"),this.destroyScroll()),this.remove(this.element,"e-tbar-extended"),this.remove(this.element,"e-extended-toolbar");var e=this.element.querySelector(".e-toolbar-multirow");e&&this.remove(e,"e-toolbar-multirow"),this.popObj&&this.popupRefresh(this.popObj.element,!0)},i.prototype.add=function(e,t){e.classList.add(t)},i.prototype.remove=function(e,t){e.classList.remove(t)},i.prototype.elementFocus=function(e){var t=e.firstElementChild;t?(t.focus(),this.activeEleSwitch(e)):e.focus()},i.prototype.clstElement=function(e,i){return e&&this.popObj&&t.isVisible(this.popObj.element)?this.popObj.element.querySelector("."+L):this.element===i||e?this.element.querySelector("."+L+":not(.e-overlay ):not(.e-separator ):not(.e-hidden )"):t.closest(i,"."+L)},i.prototype.keyHandling=function(e,i,s,n,o){var l=this.popObj,r=this.element,a={name:"FadeOut",duration:100};switch(i.action){case"moveRight":if(this.isVertical)return;r===s?this.elementFocus(e):n||this.eleFocus(e,"next");break;case"moveLeft":if(this.isVertical)return;n||this.eleFocus(e,"previous");break;case"home":case"end":var d=void 0,h=void 0;if(e){var c=t.closest(e,".e-popup");c?t.isVisible(this.popObj.element)&&(h=[].slice.call(c.children),d="home"===i.action?h[0]:h[h.length-1]):(h=this.element.querySelectorAll("."+S+" ."+L),d="home"===i.action?h[0]:h[h.length-1]),d&&this.elementFocus(d)}break;case"moveUp":case"moveDown":var p="moveUp"===i.action?"previous":"next";if(this.isVertical)"moveUp"===i.action?this.eleFocus(e,"previous"):this.eleFocus(e,"next");else if(l&&t.closest(s,".e-popup")){var u=l.element,f=u.firstElementChild;if("previous"===p&&f===e||"next"===p&&u.lastElementChild===e)return;this.eleFocus(e,p)}else"moveDown"===i.action&&l&&t.isVisible(l.element)&&this.elementFocus(e);break;case"tab":if(!o&&!n){var m=e.firstElementChild;r===s&&(this.activeEle?this.activeEle.focus():(this.activeEleRemove(m),m.focus()),this.element.removeAttribute("tabindex"))}break;case"popupClose":l&&"Extended"!==this.overflowMode&&l.hide(a);break;case"popupOpen":if(!n)return;l&&!t.isVisible(l.element)?(l.element.style.top=r.offsetHeight+"px",l.show({name:"FadeIn",duration:100})):l.hide(a)}},i.prototype.keyActionHandler=function(e){var t=e.target;if("INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!this.element.classList.contains("e-overlay")){e.preventDefault();var i,s=t.classList.contains("e-hor-nav"),n=t.classList.contains("e-scroll-nav");((i=this.clstElement(s,t))||n)&&this.keyHandling(i,e,t,s,n)}},i.prototype.disable=function(e){var i=this.element;e?i.classList.add("e-overlay"):i.classList.remove("e-overlay"),i.setAttribute("tabindex",e?"-1":"0"),this.activeEle&&this.activeEle.setAttribute("tabindex",e?"-1":"0"),this.scrollModule&&this.scrollModule.disable(e),this.popObj&&(t.isVisible(this.popObj.element)&&"Extended"!==this.overflowMode&&this.popObj.hide(),i.querySelector("#"+i.id+"_nav").setAttribute("tabindex",e?"-1":"0"))},i.prototype.eleContains=function(e){return e.classList.contains("e-separator")||e.classList.contains("e-overlay")||e.getAttribute("disabled")||e.classList.contains("e-hidden")||!t.isVisible(e)},i.prototype.eleFocus=function(e,i){var s=Object(e)[i+"ElementSibling"];if(s){if(this.eleContains(s))return void this.eleFocus(s,i);this.elementFocus(s)}else if(this.tbarAlign){var n=Object(e.parentElement)[i+"ElementSibling"];if(t.isNullOrUndefined(n)||0!==n.children.length||(n=Object(n)[i+"ElementSibling"]),!t.isNullOrUndefined(n)&&n.children.length>0)if("next"===i){o=n.querySelector("."+L);this.eleContains(o)?this.eleFocus(o,i):(o.firstElementChild.focus(),this.activeEleSwitch(o))}else{var o=n.lastElementChild;this.eleContains(o)?this.eleFocus(o,i):this.elementFocus(o)}}},i.prototype.clickHandler=function(e){var i=this,s=e.target,n=s.classList,o=this.element,l=!t.isNullOrUndefined(t.closest(s,".e-toolbar-pop")),r=t.closest(s,".e-hor-nav");r||(r=s),o.children[0].classList.contains("e-hscroll")||o.children[0].classList.contains("e-vscroll")||!n.contains("e-hor-nav")||(n=s.querySelector(".e-icons").classList),(n.contains("e-popup-up-icon")||n.contains("e-popup-down-icon"))&&this.popupClickHandler(o,r,"e-rtl");var a,d=t.closest(e.target,"."+L);if(!t.isNullOrUndefined(d)&&!d.classList.contains("e-overlay")||r.classList.contains("e-hor-nav")){d&&(a=this.items[this.tbarEle.indexOf(d)]);var h={originalEvent:e,item:a};a&&!t.isNullOrUndefined(a.click)&&this.trigger("items["+this.tbarEle.indexOf(d)+"].click",h),h.cancel||this.trigger("clicked",h,function(e){t.isNullOrUndefined(i.popObj)||!l||e.cancel||"Popup"!==i.overflowMode||i.popObj.hide({name:"FadeOut",duration:100})})}},i.prototype.popupClickHandler=function(e,i,s){var n=this.popObj;t.isVisible(n.element)?(i.classList.remove("e-nav-active"),n.hide({name:"FadeOut",duration:100})):(e.classList.contains(s)&&(n.enableRtl=!0,n.position={X:"left",Y:"top"}),0!==n.offsetX||e.classList.contains(s)||(n.enableRtl=!1,n.position={X:"right",Y:"top"}),n.dataBind(),n.refreshPosition(),n.element.style.top=this.getElementOffsetY()+"px","Extended"===this.overflowMode&&(n.element.style.minHeight="0px"),i.classList.add("e-nav-active"),n.show({name:"FadeIn",duration:100}))},i.prototype.render=function(){this.initialize(),this.renderControl(),this.separator(),this.refreshToolbarTemplate(),this.wireEvents(),t.isBlazor()&&this.renderComplete()},i.prototype.initialize=function(){var e=t.formatUnit(this.width),i=t.formatUnit(this.height);"msie"===t.Browser.info.name&&"auto"===this.height&&"MultiRow"!==this.overflowMode||t.setStyleAttribute(this.element,{height:i}),t.setStyleAttribute(this.element,{width:e});var s={role:"toolbar","aria-disabled":"false","aria-haspopup":"false","aria-orientation":this.isVertical?"vertical":"horizontal"};t.attributes(this.element,s)},i.prototype.renderControl=function(){this.trgtEle=this.element.children.length>0?this.element.querySelector("div"):null,this.tbarAlgEle={lefts:[],centers:[],rights:[]},this.renderItems(),this.renderOverflowMode(),this.tbarAlign&&this.itemPositioning(),this.popObj&&this.popObj.element.childElementCount>1&&this.checkPopupRefresh(this.element,this.popObj.element)&&this.popupRefresh(this.popObj.element,!1)},i.prototype.changeOrientation=function(){var e=this.element;this.isVertical?(e.classList.remove("e-vertical"),this.isVertical=!1,"auto"!==this.height&&"100%"!==this.height||(e.style.height=this.height),e.setAttribute("aria-orientation","horizontal")):(e.classList.add("e-vertical"),this.isVertical=!0,e.setAttribute("aria-orientation","vertical"),t.setStyleAttribute(this.element,{height:t.formatUnit(this.height),width:t.formatUnit(this.width)})),this.destroyMode(),this.refreshOverflow()},i.prototype.initScroll=function(e,i){!this.scrollModule&&this.checkOverflow(e,i[0])&&(this.tbarAlign&&this.element.querySelector("."+S+" .e-toolbar-center").removeAttribute("style"),this.isVertical?this.scrollModule=new p({scrollStep:this.scrollStep,enableRtl:this.enableRtl},i[0]):this.scrollModule=new d({scrollStep:this.scrollStep,enableRtl:this.enableRtl},i[0]),this.remove(this.scrollModule.element,"e-tbar-pos"),t.setStyleAttribute(this.element,{overflow:"hidden"}))},i.prototype.itemWidthCal=function(e){var i,s=this,n=0;return[].slice.call(t.selectAll("."+L,e)).forEach(function(e){t.isVisible(e)&&(i=window.getComputedStyle(e),n+=s.isVertical?e.offsetHeight:e.offsetWidth,n+=parseFloat(s.isVertical?i.marginTop:i.marginRight),n+=parseFloat(s.isVertical?i.marginBottom:i.marginLeft))}),n},i.prototype.getScrollCntEle=function(e){var t=this.isVertical?".e-vscroll-content":".e-hscroll-content";return e.querySelector(t)},i.prototype.checkOverflow=function(e,i){if(t.isNullOrUndefined(e)||t.isNullOrUndefined(i)||!t.isVisible(e))return!1;var s=this.isVertical?e.offsetHeight:e.offsetWidth,n=this.isVertical?i.offsetHeight:i.offsetWidth;(this.tbarAlign||this.scrollModule||s===n)&&(n=this.itemWidthCal(this.scrollModule?this.getScrollCntEle(i):i));var o=e.querySelector(".e-hor-nav"),l=e.querySelector(".e-scroll-nav"),r=0;return o?r=this.isVertical?o.offsetHeight:o.offsetWidth:l&&(r=this.isVertical?2*l.offsetHeight:2*l.offsetWidth),n>s-r},i.prototype.refreshOverflow=function(){this.resize()},i.prototype.toolbarAlign=function(e){this.tbarAlign&&(this.add(e,"e-tbar-pos"),this.itemPositioning())},i.prototype.renderOverflowMode=function(){var e=this.element,i=e.querySelector("."+S),s=this.popupPriCount>0;if(e&&e.children.length>0)switch(this.offsetWid=e.offsetWidth,this.remove(this.element,"e-toolpop"),"msie"===t.Browser.info.name&&"auto"===this.height&&(e.style.height=""),this.overflowMode){case"Scrollable":t.isNullOrUndefined(this.scrollModule)&&this.initScroll(e,[].slice.call(e.getElementsByClassName(S)));break;case"Popup":this.add(this.element,"e-toolpop"),this.tbarAlign&&this.removePositioning(),(this.checkOverflow(e,i)||s)&&(this.createPopupEle(e,[].slice.call(t.selectAll("."+S+" ."+L,e))),this.element.querySelector(".e-hor-nav").setAttribute("tabIndex","0")),this.toolbarAlign(i);break;case"MultiRow":this.add(i,"e-toolbar-multirow"),this.checkOverflow(e,i)&&this.tbarAlign&&(this.removePositioning(),this.add(i,"e-multirow-pos")),"hidden"===e.style.overflow&&(e.style.overflow=""),"msie"!==t.Browser.info.name&&"auto"===e.style.height||(e.style.height="auto");break;case"Extended":this.add(this.element,"e-extended-toolbar"),(this.checkOverflow(e,i)||s)&&(this.tbarAlign&&this.removePositioning(),this.createPopupEle(e,[].slice.call(t.selectAll("."+S+" ."+L,e))),this.element.querySelector(".e-hor-nav").setAttribute("tabIndex","0")),this.toolbarAlign(i)}},i.prototype.separator=function(){var e,t=this.element,i=[].slice.call(t.querySelectorAll(".e-separator")),s=t.querySelector(".e-multirow-separator"),n=t.querySelector(".e-extended-separator");null!==(e="MultiRow"===this.overflowMode?s:n)&&("MultiRow"===this.overflowMode?e.classList.remove("e-multirow-separator"):"Extended"===this.overflowMode&&e.classList.remove("e-extended-separator"));for(var o=0;o<=i.length-1;o++)i[o].offsetLeft<30&&0!==i[o].offsetLeft&&("MultiRow"===this.overflowMode?i[o].classList.add("e-multirow-separator"):"Extended"===this.overflowMode&&i[o].classList.add("e-extended-separator"))},i.prototype.createPopupEle=function(e,i){var s=e.querySelector(".e-hor-nav"),n=this.isVertical;s||this.createPopupIcon(e),s=e.querySelector(".e-hor-nav");var o=n?s.offsetHeight:s.offsetWidth,l=(n?e.offsetHeight:e.offsetWidth)-o;this.element.classList.remove("e-rtl"),t.setStyleAttribute(this.element,{direction:"initial"}),this.checkPriority(e,i,l,!0),this.enableRtl&&this.element.classList.add("e-rtl"),this.element.style.removeProperty("direction"),this.createPopup()},i.prototype.pushingPoppedEle=function(e,i,s,n,o){var l=e.element,r=t.selectAll(".e-overflow-show",s),a=0,d=0;[].slice.call(t.selectAll("."+A,l.querySelector("."+S))).forEach(function(l,h){r=t.selectAll(".e-overflow-show",s),l.classList.contains("e-overflow-show")&&r.length>0?e.tbResize&&r.length>h?(s.insertBefore(l,r[h]),++d):(s.insertBefore(l,s.children[r.length]),++d):l.classList.contains("e-overflow-show")?(s.insertBefore(l,s.firstChild),++d):e.tbResize&&l.classList.contains("e-overflow-hide")&&s.children.length>0&&0===r.length?(s.insertBefore(l,s.firstChild),++d):l.classList.contains("e-overflow-hide")?i.push(l):e.tbResize?(s.insertBefore(l,s.childNodes[a+d]),++a):s.appendChild(l),l.classList.contains("e-separator")?t.setStyleAttribute(l,{display:"",height:o+"px"}):t.setStyleAttribute(l,{display:"",height:n+"px"})}),i.forEach(function(e){s.appendChild(e)});for(var h=t.selectAll("."+L,l.querySelector("."+S)),c=h.length-1;c>=0;c--){var p=h[c];if(!p.classList.contains("e-separator")||"Extended"===this.overflowMode)break;t.setStyleAttribute(p,{display:"none"})}},i.prototype.createPopup=function(){var e,t,i,s,n=this.element;"Extended"===this.overflowMode&&(s=n.querySelector(".e-separator:not(."+A+")"),i="auto"===n.style.height||""===n.style.height?null:s.offsetHeight),t=n.querySelector("."+L+":not(.e-separator):not(."+A+")"),e="auto"===n.style.height||""===n.style.height?null:t&&t.offsetHeight;var o,l=[];if(n.querySelector("#"+n.id+"_popup.e-toolbar-pop"))o=n.querySelector("#"+n.id+"_popup.e-toolbar-pop");else{var r=this.createElement("div",{id:n.id+"_popup",className:"e-toolbar-pop e-toolbar-extended"}),a=this.createElement("div",{id:n.id+"_popup",className:"e-toolbar-pop"});o="Extended"===this.overflowMode?r:a}this.pushingPoppedEle(this,l,o,e,i),this.popupInit(n,o)},i.prototype.getElementOffsetY=function(){return"Extended"===this.overflowMode&&"border-box"===window.getComputedStyle(this.element).getPropertyValue("box-sizing")?this.element.clientHeight:this.element.offsetHeight},i.prototype.popupInit=function(e,i){if(this.popObj){var n=this.popObj.element;t.setStyleAttribute(n,{maxHeight:"",display:"block"}),t.setStyleAttribute(n,{maxHeight:n.offsetHeight+"px",display:""})}else{e.appendChild(i),t.setStyleAttribute(this.element,{overflow:""});var o=window.getComputedStyle(this.element),l=new s.Popup(null,{relateTo:this.element,offsetY:this.isVertical?0:this.getElementOffsetY(),enableRtl:this.enableRtl,open:this.popupOpen.bind(this),close:this.popupClose.bind(this),collision:{Y:this.enableCollision?"flip":"none"},position:this.enableRtl?{X:"left",Y:"top"}:{X:"right",Y:"top"}});if(l.appendTo(i),"Extended"===this.overflowMode&&(l.width=parseFloat(o.width)+2*parseFloat(o.borderRightWidth),l.offsetX=0),t.EventHandler.add(document,"scroll",this.docEvent.bind(this)),t.EventHandler.add(document,"click ",this.docEvent.bind(this)),l.element.style.maxHeight=l.element.offsetHeight+"px",this.isVertical&&(l.element.style.visibility="hidden"),this.isExtendedOpen){var r=this.element.querySelector(".e-hor-nav");r.classList.add("e-nav-active"),t.classList(r.firstElementChild,["e-popup-up-icon"],["e-popup-down-icon"]),this.element.querySelector(".e-toolbar-extended").classList.add("e-popup-open")}else l.hide();this.popObj=l,this.element.setAttribute("aria-haspopup","true")}},i.prototype.tbarPopupHandler=function(e){"Extended"===this.overflowMode&&(e?this.add(this.element,"e-tbar-extended"):this.remove(this.element,"e-tbar-extended"))},i.prototype.popupOpen=function(e){var i=this.popObj;this.isVertical||(i.offsetY=this.getElementOffsetY(),i.dataBind());var n=this.popObj.element,o=this.popObj.element.parentElement,l=o.querySelector(".e-hor-nav");t.setStyleAttribute(i.element,{height:"auto",maxHeight:""}),i.element.style.maxHeight=i.element.offsetHeight+"px","Extended"===this.overflowMode&&(i.element.style.minHeight="");var r=n.offsetTop+n.offsetHeight+s.calculatePosition(o).top,a=l.firstElementChild;l.classList.add("e-nav-active"),t.classList(a,["e-popup-up-icon"],["e-popup-down-icon"]),this.tbarPopupHandler(!0);var d=t.isNullOrUndefined(window.scrollY)?0:window.scrollY;if(!this.isVertical&&window.innerHeight+d<r&&this.element.offsetTop<n.offsetHeight){var h=n.offsetHeight-(r-window.innerHeight-d+5);i.height=h+"px";for(var c=0;c<=n.childElementCount;c++){var p=n.children[c];if(p.offsetTop+p.offsetHeight>h){h=p.offsetTop;break}}t.setStyleAttribute(i.element,{maxHeight:h+"px"})}else if(this.isVertical){var u=this.element.getBoundingClientRect();t.setStyleAttribute(i.element,{maxHeight:u.top+this.element.offsetHeight+"px",bottom:0,visibility:""})}},i.prototype.popupClose=function(e){var i=this.element.querySelector(".e-hor-nav"),s=i.firstElementChild;i.classList.remove("e-nav-active"),t.classList(s,["e-popup-down-icon"],["e-popup-up-icon"]),this.tbarPopupHandler(!1)},i.prototype.checkPriority=function(e,i,s,n){for(var o,l=this.popupPriCount>0,r=s,a=0,d=0,h=0,c=function(e,t){var i=!1;return t.forEach(function(t){e.classList.contains(t)&&(i=!0)}),i},p=i.length-1;p>=0;p--){var u=void 0,f=window.getComputedStyle(i[p]);this.isVertical?(u=parseFloat(f.marginTop),u+=parseFloat(f.marginBottom)):(u=parseFloat(f.marginRight),u+=parseFloat(f.marginLeft));var m=i[p]===this.tbarEle[0];m&&(this.tbarEleMrgn=u),o=this.isVertical?i[p].offsetHeight:i[p].offsetWidth;var v=m?o+u:o;if(c(i[p],["e-popup-alone"])&&l&&(i[p].classList.add(A),this.isVertical?t.setStyleAttribute(i[p],{display:"none",minHeight:v+"px"}):t.setStyleAttribute(i[p],{display:"none",minWidth:v+"px"}),h++),this.isVertical?i[p].offsetTop+i[p].offsetHeight+u>s:i[p].offsetLeft+i[p].offsetWidth+u>s){if(i[p].classList.contains("e-separator")){if("Extended"===this.overflowMode)d===h&&c(g=i[p],["e-separator","e-ignore"])&&(i[p].classList.add(A),h++),d++;else if("Popup"===this.overflowMode){if(a>0&&d===h){var g=i[p+d+(a-1)];c(g,["e-separator","e-ignore"])&&t.setStyleAttribute(g,{display:"none"})}a++,d=0,h=0}}else d++;i[p].classList.contains("e-overflow-show")&&n?s-=(this.isVertical?i[p].offsetHeight:i[p].offsetWidth)+u:c(i[p],["e-separator","e-ignore"])?s-=(this.isVertical?i[p].offsetHeight:i[p].offsetWidth)+u:(i[p].classList.add(A),this.isVertical?t.setStyleAttribute(i[p],{display:"none",minHeight:v+"px"}):t.setStyleAttribute(i[p],{display:"none",minWidth:v+"px"}),h++)}}if(n){var y=t.selectAll("."+L+":not(."+A+")",this.element);this.checkPriority(e,y,r,!1)}},i.prototype.createPopupIcon=function(e){var i=e.id.concat("_nav"),s="e-"+e.id.concat("_nav e-hor-nav");s="Extended"===this.overflowMode?s+" e-expended-nav":s;var n=this.createElement("div",{id:i,className:s});"msie"!==t.Browser.info.name&&"edge"!==t.Browser.info.name||n.classList.add("e-ie-align");var o=this.createElement("div",{className:"e-popup-down-icon e-icons"});n.appendChild(o),n.setAttribute("tabindex","0"),e.appendChild(n)},i.prototype.tbarPriRef=function(e,i,s,n,o,l,r,a){var d=a,h=this.popObj.element,c=t.selectAll("."+A+":not(.e-overflow-show)",h).length,p=function(e,t){return e.classList.contains(t)};if(0===t.selectAll(".e-toolbar-item:not(.e-separator):not(.e-overflow-show)",e).length){var u=e.children[i-(i-s)-1],f=!t.isNullOrUndefined(u)&&p(u,"e-ignore");if(!t.isNullOrUndefined(u)&&p(u,"e-separator")&&!t.isVisible(u)||f){u.style.display="inherit";var m=u.offsetWidth+2*parseFloat(window.getComputedStyle(u).marginRight),v=u.previousElementSibling;l+m<r||o?(e.insertBefore(n,e.children[i+d-(i-s)]),t.isNullOrUndefined(v)||(v.style.display="")):v.classList.contains("e-separator")&&(v.style.display="none"),u.style.display=""}else e.insertBefore(n,e.children[i+d-(i-s)])}else e.insertBefore(n,e.children[i+d-c])},i.prototype.popupRefresh=function(e,i){var s=this,n=this.element,o=this.isVertical,l=n.querySelector(".e-hor-nav"),r=n.querySelector("."+S);if(!t.isNullOrUndefined(l)){r.removeAttribute("style"),e.style.display="block";var a;a=o?n.offsetHeight-(l.offsetHeight+r.offsetHeight):n.offsetWidth-(l.offsetWidth+r.offsetWidth);var d=0;[].slice.call(e.children).forEach(function(e){d+=s.popupEleWidth(e),t.setStyleAttribute(e,{position:""})}),a+(o?l.offsetHeight:l.offsetWidth)>d&&0===this.popupPriCount&&(i=!0),this.popupEleRefresh(a,e,i),e.style.display="",0===e.children.length&&l&&this.popObj&&(t.detach(l),l=null,this.popObj.destroy(),t.detach(this.popObj.element),this.popObj=null,n.setAttribute("aria-haspopup","false"))}},i.prototype.ignoreEleFetch=function(e,t){var i=[].slice.call(t.querySelectorAll(".e-ignore")),s=[],n=0;return i.length>0?(i.forEach(function(e){s.push([].slice.call(t.children).indexOf(e))}),s.forEach(function(t){t<=e&&n++}),n):0},i.prototype.checkPopupRefresh=function(e,t){t.style.display="block";var i=this.popupEleWidth(t.firstElementChild);t.firstElementChild.style.removeProperty("Position");var s=e.offsetWidth-e.querySelector(".e-hor-nav").offsetWidth,n=e.querySelector("."+S).offsetWidth;return t.style.removeProperty("display"),s>i+n},i.prototype.popupEleWidth=function(e){e.style.position="absolute";var i=this.isVertical?e.offsetHeight:e.offsetWidth,s=e.querySelector(".e-tbar-btn-text");if(e.classList.contains("e-tbtn-align")||e.classList.contains("e-popup-text")){var n=e.children[0];!t.isNullOrUndefined(s)&&e.classList.contains("e-popup-text")?s.style.display="none":!t.isNullOrUndefined(s)&&e.classList.contains("e-toolbar-text")&&(s.style.display="block"),n.style.minWidth="0%",i=parseFloat(this.isVertical?e.style.minHeight:e.style.minWidth),n.style.minWidth="",n.style.minHeight="",t.isNullOrUndefined(s)||(s.style.display="")}return i},i.prototype.popupEleRefresh=function(e,i,s){for(var n,o,l=this.popupPriCount>0,r=this.tbarEle,a=this.element.querySelector("."+S),d=0,h=this,c=0,p=[].slice.call(i.children);c<p.length&&"break"!==function(i){if(i.classList.contains("e-popup-alone")&&l&&!s)return"continue";var c=h.popupEleWidth(i);if(i===h.tbarEle[0]&&(c+=h.tbarEleMrgn),i.style.position="",!(c<e||s))return"break";if(t.setStyleAttribute(i,{minWidth:"",height:"",minHeight:""}),i.classList.contains("e-overflow-hide")||i.classList.remove(A),o=h.tbarEle.indexOf(i),h.tbarAlign){var p=h.items[o].align;o=h.tbarAlgEle[(p+"s").toLowerCase()].indexOf(i),r=h.tbarAlgEle[(p+"s").toLowerCase()],a=h.element.querySelector("."+S+" .e-toolbar-"+p.toLowerCase())}var u=0;"Extended"!==h.overflowMode&&r.slice(0,o).forEach(function(t){(t.classList.contains("e-overflow-show")||t.classList.contains("e-separator"))&&(t.classList.contains("e-separator")&&(t.style.display="",e-=t.offsetWidth),u++)}),d=h.ignoreEleFetch(o,a),i.classList.contains("e-overflow-show")?(h.tbarPriRef(a,o,u,i,s,c,e,d),e-=i.offsetWidth):0===o?(a.insertBefore(i,a.firstChild),e-=i.offsetWidth):(n=t.selectAll(".e-overflow-show",h.popObj.element).length,a.insertBefore(i,a.children[o+d-n]),e-=i.offsetWidth),i.style.height=""}(p[c]);c++);this.checkOverflow(this.element,this.element.getElementsByClassName(S)[0])&&!s&&this.renderOverflowMode()},i.prototype.removePositioning=function(){var e=this.element.querySelector("."+S);if(!t.isNullOrUndefined(e)&&e.classList.contains("e-tbar-pos")){this.remove(e,"e-tbar-pos");var i=[].slice.call(e.childNodes);i[1].removeAttribute("style"),i[2].removeAttribute("style")}},i.prototype.refreshPositioning=function(){var e=this.element.querySelector("."+S);this.add(e,"e-tbar-pos"),this.itemPositioning()},i.prototype.itemPositioning=function(){var e,i=this.element.querySelector("."+S);if(!t.isNullOrUndefined(i)&&i.classList.contains("e-tbar-pos")){var s,n=this.element.querySelector(".e-hor-nav");if(this.scrollModule){var o=this.isVertical?"e-vscroll-content":"e-hscroll-content";s=[].slice.call(i.querySelector("."+o).children)}else s=[].slice.call(i.childNodes);e=this.isVertical?s[0].offsetHeight+s[2].offsetHeight:s[0].offsetWidth+s[2].offsetWidth;var l=this.isVertical?this.element.offsetHeight:this.element.offsetWidth;if(n){l-=this.isVertical?n.offsetHeight:n.offsetWidth;var r=(this.isVertical?n.offsetHeight:n.offsetWidth)+"px";s[2].removeAttribute("style"),this.isVertical?this.enableRtl?s[2].style.top=r:s[2].style.bottom=r:this.enableRtl?s[2].style.left=r:s[2].style.right=r}if(!(l<=e)){var a=(l-e-(this.isVertical?s[1].offsetHeight:s[1].offsetWidth))/2;s[1].removeAttribute("style");var d=(this.isVertical?s[0].offsetHeight:s[0].offsetWidth)+a+"px";this.isVertical?this.enableRtl?s[1].style.marginBottom=d:s[1].style.marginTop=d:this.enableRtl?s[1].style.marginRight=d:s[1].style.marginLeft=d}}},i.prototype.tbarItemAlign=function(e,t,i){var s=this;if(!e.showAlwaysInPopup||"Show"===e.overflow){var n=[];if(n.push(this.createElement("div",{className:"e-toolbar-left"})),n.push(this.createElement("div",{className:"e-toolbar-center"})),n.push(this.createElement("div",{className:"e-toolbar-right"})),0===i&&"Left"!==e.align)n.forEach(function(e){t.appendChild(e)}),this.tbarAlign=!0,this.add(t,"e-tbar-pos");else if("Left"!==e.align){var o=t.childNodes,l=n[0];[].slice.call(o).forEach(function(e){s.tbarAlgEle.lefts.push(e),l.appendChild(e)}),t.appendChild(l),t.appendChild(n[1]),t.appendChild(n[2]),this.tbarAlign=!0,this.add(t,"e-tbar-pos")}}},i.prototype.ctrlTemplate=function(){var e=this;this.ctrlTem=this.trgtEle.cloneNode(!0),this.add(this.trgtEle,S),this.tbarEle=[],[].slice.call(this.trgtEle.children).forEach(function(t){"DIV"===t.tagName&&(e.tbarEle.push(t),t.setAttribute("aria-disabled","false"),e.add(t,L))})},i.prototype.renderItems=function(){var e,t,i,s=this.element,n=this.items;if(s&&s.children.length>0&&(e=s.querySelector("."+S)),null!=this.trgtEle)this.ctrlTemplate();else if(s&&n.length>0){e||(e=this.createElement("div",{className:S}));for(var o=0;o<n.length;o++)t=this.renderSubComponent(n[o],o),-1===this.tbarEle.indexOf(t)&&this.tbarEle.push(t),this.tbarAlign||this.tbarItemAlign(n[o],e,o),(i=e.querySelector(".e-toolbar-"+n[o].align.toLowerCase()))?(n[o].showAlwaysInPopup&&"Show"!==n[o].overflow||this.tbarAlgEle[(n[o].align+"s").toLowerCase()].push(t),i.appendChild(t)):e.appendChild(t);s.appendChild(e)}},i.prototype.setAttr=function(e,t){for(var i,s=Object.keys(e),n=0;n<s.length;n++)"class"===(i=s[n])?this.add(t,e[i]):t.setAttribute(i,e[i])},i.prototype.enableItems=function(e,i){var s,n=e,o=n.length;t.isNullOrUndefined(i)&&(i=!0);var l=function(e,t){e?(t.classList.remove("e-overlay"),t.setAttribute("aria-disabled","false")):(t.classList.add("e-overlay"),t.setAttribute("aria-disabled","true"))};if(!t.isNullOrUndefined(o)&&o>=1){for(var r=0,a=[].slice.call(n);r<o;r++){var d=a[r];if("number"==typeof d){if(s=this.getElementByIndex(d),t.isNullOrUndefined(s))return;n[r]=s}else s=d;l(i,s)}i?t.removeClass(n,"e-overlay"):t.addClass(n,"e-overlay")}else{if("number"==typeof n){if(s=this.getElementByIndex(n),t.isNullOrUndefined(s))return}else s=e;l(i,s)}},i.prototype.getElementByIndex=function(e){return this.tbarEle[e]?this.tbarEle[e]:null},i.prototype.addItems=function(e,i){var s;this.extendedOpen();var n=this.element.querySelector("."+S);if(t.isNullOrUndefined(n))return void this.itemsRerender(e);var o,l="Left";t.isNullOrUndefined(i)&&(i=0),e.forEach(function(e){t.isNullOrUndefined(e.align)||"Left"===e.align||"Left"!==l||(l=e.align)});for(var r=0,a=e;r<a.length;r++){var d=a[r];if(t.isNullOrUndefined(d.type)&&(d.type="Button"),s=t.selectAll("."+L,this.element),d.align=l,o=this.renderSubComponent(d,i),this.tbarEle.length>=i&&s.length>=0){t.isNullOrUndefined(this.scrollModule)&&this.destroyMode();var h="L"===d.align[0]?0:"C"===d.align[0]?1:2,c=void 0;this.tbarAlign||"Left"===l?this.tbarAlign?((c=t.closest(s[0],"."+S).children[h]).insertBefore(o,c.children[i]),this.tbarAlgEle[(d.align+"s").toLowerCase()].splice(i,0,o),this.refreshPositioning()):0===s.length?(s=t.selectAll("."+S,this.element))[0].appendChild(o):s[0].parentNode.insertBefore(o,s[i]):(this.tbarItemAlign(d,n,1),this.tbarAlign=!0,(c=t.closest(s[0],"."+S).children[h]).appendChild(o),this.tbarAlgEle[(d.align+"s").toLowerCase()].push(o),this.refreshPositioning()),this.items.splice(i,0,d),this.tbarEle.splice(i,0,o),i++,this.offsetWid=n.offsetWidth}}n.style.width="",this.renderOverflowMode()},i.prototype.removeItems=function(e){var i,s=e,n=[].slice.call(t.selectAll("."+L,this.element));if("number"==typeof s)i=parseInt(e.toString(),10),this.removeItemByIndex(i,n);else if(s&&s.length>1)for(var o=0,l=[].slice.call(s);o<l.length;o++){r=l[o];i=this.tbarEle.indexOf(r),this.removeItemByIndex(i,n),n=t.selectAll("."+L,this.element)}else{var r=s&&s.length&&1===s.length?s[0]:e;i=n.indexOf(r),this.removeItemByIndex(i,n)}this.resize()},i.prototype.removeItemByIndex=function(e,i){if(this.tbarEle[e]&&i[e]){var s=this.tbarEle.indexOf(i[e]);if(this.tbarAlign){var n=void 0;n=this.tbarAlgEle[(this.items[s].align+"s").toLowerCase()].indexOf(this.tbarEle[s]),this.tbarAlgEle[(this.items[s].align+"s").toLowerCase()].splice(n,1)}t.detach(i[e]),this.items.splice(s,1),this.tbarEle.splice(s,1)}},i.prototype.templateRender=function(e,i,s,n){var o,l=s.type,r=e;if("object"==typeof e&&(o="function"==typeof r.appendTo),"string"!=typeof e&&o){if("Input"===l){var a=this.createElement("input");s.id?a.id=s.id:a.id=t.getUniqueID("tbr-ipt"),i.appendChild(a),r.appendTo(a)}}else{var d=void 0,h=e;h="string"==typeof e?e.trim():e;try{if("object"!=typeof e||t.isNullOrUndefined(e.tagName)){if(document.querySelectorAll(h).length){var c=(a=document.querySelector(h)).outerHTML.trim();i.appendChild(a),a.style.display="",t.isNullOrUndefined(c)||this.tempId.push(h)}}else i.appendChild(e)}catch(e){d=t.compile(h)}var p=void 0;t.isNullOrUndefined(d)||(p=d({},this,"template",this.element.id+n+"_template",this.isStringTemplate)),!t.isNullOrUndefined(p)&&p.length>0&&[].slice.call(p).forEach(function(e){t.isNullOrUndefined(e.tagName)||(e.style.display=""),i.appendChild(e)})}this.add(i,"e-template"),this.tbarEle.push(i)},i.prototype.buttonRendering=function(e,i){var s=this.createElement("button",{className:"e-tbar-btn"});s.setAttribute("type","button");var o,l,r=e.text;e.id?s.id=e.id:s.id=t.getUniqueID("e-tbr-btn");var a=this.createElement("span",{className:"e-tbar-btn-text"});r?(a.innerHTML=r,s.appendChild(a),s.classList.add("e-tbtn-txt")):this.add(i,"e-tbtn-align"),(e.prefixIcon||e.suffixIcon)&&(e.prefixIcon&&e.suffixIcon||e.prefixIcon?(o=e.prefixIcon+" e-icons",l="Left"):(o=e.suffixIcon+" e-icons",l="Right"));var d=new n.Button({iconCss:o,iconPosition:l});return d.createElement=this.createElement,d.appendTo(s),e.width&&t.setStyleAttribute(s,{width:t.formatUnit(e.width)}),s},i.prototype.renderSubComponent=function(e,t){var i,s;if((i=this.createElement("div",{className:L})).setAttribute("aria-disabled","false"),this.tbarEle||(this.tbarEle=[]),e.htmlAttributes&&this.setAttr(e.htmlAttributes,i),e.tooltipText){var n=this.createElement("div",{innerHTML:e.tooltipText});i.setAttribute("title",n.textContent)}if(e.cssClass&&(i.className=i.className+" "+e.cssClass),e.template)this.templateRender(e.template,i,e,t);else switch(e.type){case"Button":(s=this.buttonRendering(e,i)).setAttribute("tabindex","-1"),i.appendChild(s),i.addEventListener("click",this.itemClick.bind(this));break;case"Separator":this.add(i,"e-separator")}if(e.showTextOn){var o=e.showTextOn;"Toolbar"===o?(this.add(i,"e-toolbar-text"),this.add(i,"e-tbtn-align")):"Overflow"===o&&this.add(i,"e-popup-text")}if(e.overflow){var l=e.overflow;"Show"===l?this.add(i,"e-overflow-show"):"Hide"===l&&(i.classList.contains("e-separator")||this.add(i,"e-overflow-hide"))}return"Show"!==e.overflow&&e.showAlwaysInPopup&&!i.classList.contains("e-separator")&&(this.add(i,"e-popup-alone"),this.popupPriCount++),i},i.prototype.refreshToolbarTemplate=function(){for(var e=Object.keys(window),i=0,s=this.items.length;i<s;i++){var n=this.items[i];n.template&&e.indexOf("Blazor")>-1&&!this.isStringTemplate&&0===n.template.indexOf("<div>Blazor")&&(t.resetBlazorTemplate(this.element.id+i+"_template","Template"),t.updateBlazorTemplate(this.element.id+i+"_template","Template",n))}},i.prototype.itemClick=function(e){this.activeEleSwitch(e.currentTarget)},i.prototype.activeEleSwitch=function(e){this.activeEleRemove(e.firstElementChild),this.activeEle.focus()},i.prototype.activeEleRemove=function(e){t.isNullOrUndefined(this.activeEle)||this.activeEle.setAttribute("tabindex","-1"),this.activeEle=e,t.isNullOrUndefined(this.trgtEle)&&!e.parentElement.classList.contains("e-template")?e.removeAttribute("tabindex"):this.activeEle.setAttribute("tabindex","0")},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.getModuleName=function(){return"toolbar"},i.prototype.itemsRerender=function(e){this.items=this.tbarItemsCol,this.destroyMode(),this.destroyItems(),this.items=e,this.tbarItemsCol=this.items,this.renderItems(),this.renderOverflowMode()},i.prototype.resize=function(){var e=this.element;this.tbResize=!0,this.tbarAlign&&this.itemPositioning(),this.popObj&&"Popup"===this.overflowMode&&this.popObj.hide();var i=this.checkOverflow(e,e.getElementsByClassName(S)[0]);if(!i){this.destroyScroll();var s=e.querySelector("."+S);t.isNullOrUndefined(s)||(this.remove(s,"e-multirow-pos"),this.tbarAlign&&this.add(s,"e-tbar-pos"))}if(!i||!this.scrollModule||this.offsetWid!==e.offsetWidth){if((this.offsetWid>e.offsetWidth||i)&&this.renderOverflowMode(),this.popObj){if("Extended"===this.overflowMode){var n=window.getComputedStyle(this.element);this.popObj.width=parseFloat(n.width)+2*parseFloat(n.borderRightWidth)}this.tbarAlign&&this.removePositioning(),this.popupRefresh(this.popObj.element,!1),this.tbarAlign&&this.refreshPositioning()}this.offsetWid=e.offsetWidth,this.tbResize=!1,this.separator()}},i.prototype.extendedOpen=function(){var e=this.element.querySelector(".e-toolbar-extended");"Extended"===this.overflowMode&&e&&(this.isExtendedOpen=e.classList.contains("e-popup-open"))},i.prototype.onPropertyChanged=function(e,i){var s=this.element;this.extendedOpen();for(var n=0,o=Object.keys(e);n<o.length;n++)switch(o[n]){case"items":if(e.items instanceof Array&&i.items instanceof Array)this.itemsRerender(e.items);else for(var l=Object.keys(e.items),r=0;r<l.length;r++){var a=parseInt(Object.keys(e.items)[r],10),d=Object.keys(e.items[a])[0],h=(Object(i.items[a])[d],Object(e.items[a])[d]);if(this.tbarAlign||"align"===d){this.refresh(),this.trigger("created");break}var c="showAlwaysInPopup"===d&&!h,p="overflow"===d&&0!==this.popupPriCount;(c||this.items[a].showAlwaysInPopup&&p)&&--this.popupPriCount,t.isNullOrUndefined(this.scrollModule)&&this.destroyMode();var u=[].slice.call(t.selectAll("."+S+" ."+L,s));t.detach(u[a]),this.tbarEle.splice(a,1),this.addItems([this.items[a]],a),this.items.splice(a,1),this.items[a].template&&this.tbarEle.splice(this.items.length,1)}break;case"width":var f=s.offsetWidth;t.setStyleAttribute(s,{width:t.formatUnit(e.width)}),this.renderOverflowMode(),this.popObj&&f<s.offsetWidth&&this.popupRefresh(this.popObj.element,!1);break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)});break;case"overflowMode":this.destroyMode(),this.renderOverflowMode(),this.enableRtl&&this.add(s,"e-rtl"),this.refreshOverflow();break;case"enableRtl":e.enableRtl?this.add(s,"e-rtl"):this.remove(s,"e-rtl"),t.isNullOrUndefined(this.scrollModule)||(e.enableRtl?this.add(this.scrollModule.element,"e-rtl"):this.remove(this.scrollModule.element,"e-rtl")),t.isNullOrUndefined(this.popObj)||(e.enableRtl?this.add(this.popObj.element,"e-rtl"):this.remove(this.popObj.element,"e-rtl")),this.tbarAlign&&this.itemPositioning();break;case"scrollStep":this.scrollModule&&(this.scrollModule.scrollStep=this.scrollStep);break;case"enableCollision":this.popObj&&(this.popObj.collision={Y:this.enableCollision?"flip":"none"})}},i.prototype.hideItem=function(e,i){var s,n,o="object"==typeof e,l=e,r=[].slice.call(t.selectAll("."+L,this.element));if(o?n=e:this.tbarEle[l]&&(n=[].slice.call(t.selectAll("."+L,this.element))[l]),n){if(i?n.classList.add("e-hidden"):n.classList.remove("e-hidden"),i&&t.isNullOrUndefined(this.element.getAttribute("tabindex"))&&!n.classList.contains("e-separator")){if(t.isNullOrUndefined(n.firstElementChild.getAttribute("tabindex"))){n.firstElementChild.setAttribute("tabindex","-1");var a=[].slice.call(t.selectAll("."+L,this.element));o&&(l=a.indexOf(n));for(var d=a[++l];d;){if(!(u=this.eleContains(d))){d.firstElementChild.removeAttribute("tabindex");break}d=a[++l]}}}else if(t.isNullOrUndefined(this.element.getAttribute("tabindex"))&&!n.classList.contains("e-separator"))for(var h=!1,c=!1,p=r[s=0];p;)if(p.classList.contains("e-separator"))p=r[++s];else if(t.isNullOrUndefined(p.firstElementChild.getAttribute("tabindex")))p.firstElementChild.setAttribute("tabindex","-1"),h=!0;else{if(h&&c)break;var u=this.eleContains(p);u||(p.firstElementChild.removeAttribute("tabindex"),c=!0),p=r[++s]}this.refreshOverflow()}},k([t.Collection([],I)],i.prototype,"items",void 0),k([t.Property("auto")],i.prototype,"width",void 0),k([t.Property("auto")],i.prototype,"height",void 0),k([t.Property("Scrollable")],i.prototype,"overflowMode",void 0),k([t.Property()],i.prototype,"scrollStep",void 0),k([t.Property(!0)],i.prototype,"enableCollision",void 0),k([t.Event()],i.prototype,"clicked",void 0),k([t.Event()],i.prototype,"created",void 0),k([t.Event()],i.prototype,"destroyed",void 0),k([t.Event()],i.prototype,"beforeCreate",void 0),i=k([t.NotifyPropertyChanges],i)}(t.Component),P=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),M=function(e,t,i,s){var n,o=arguments.length,l=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(o<3?n(l):o>3?n(t,i,l):n(t,i))||l);return o>3&&l&&Object.defineProperty(t,i,l),l},U="e-acrdn-item",H="e-acrdn-header",T="e-acrdn-panel",B=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return P(i,e),M([t.Property("SlideDown")],i.prototype,"effect",void 0),M([t.Property(400)],i.prototype,"duration",void 0),M([t.Property("linear")],i.prototype,"easing",void 0),i}(t.ChildProperty),R=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return P(i,e),M([t.Complex({effect:"SlideUp",duration:400,easing:"linear"},B)],i.prototype,"collapse",void 0),M([t.Complex({effect:"SlideDown",duration:400,easing:"linear"},B)],i.prototype,"expand",void 0),i}(t.ChildProperty),j=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return P(i,e),M([t.Property(null)],i.prototype,"content",void 0),M([t.Property(null)],i.prototype,"header",void 0),M([t.Property(null)],i.prototype,"cssClass",void 0),M([t.Property(null)],i.prototype,"iconCss",void 0),M([t.Property(!1)],i.prototype,"expanded",void 0),i}(t.ChildProperty),F=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.keyConfigs={moveUp:"uparrow",moveDown:"downarrow",enter:"enter",space:"space",home:"home",end:"end"},s}return P(i,e),i.prototype.destroy=function(){var t=this,i=this.element;for(e.prototype.destroy.call(this),this.unwireEvents(),this.isDestroy=!0,this.restoreContent(null);i.firstElementChild;)i.removeChild(i.firstElementChild);if(this.trgtEle)for(;this.ctrlTem.firstElementChild;)i.appendChild(this.ctrlTem.firstElementChild);i.classList.remove("e-acrdn-root"),i.removeAttribute("style"),["aria-disabled","aria-multiselectable","role","data-ripple"].forEach(function(e){t.element.removeAttribute(e)})},i.prototype.preRender=function(){var e=t.closest(this.element,"."+T);this.isNested=!1,this.templateEle=[],this.isDestroy||(this.isDestroy=!1),t.isNullOrUndefined(e)?this.element.classList.add("e-acrdn-root"):(e.classList.add("e-nested"),this.isNested=!0),this.enableRtl&&this.add(this.element,"e-rtl"),this.enablePersistence&&!t.isNullOrUndefined(this.expandedItems)||(this.expandedItems=[])},i.prototype.add=function(e,t){e.classList.add(t)},i.prototype.remove=function(e,t){e.classList.remove(t)},i.prototype.render=function(){this.initialize(),this.renderControl(),this.wireEvents(),t.isBlazor()&&this.renderComplete()},i.prototype.initialize=function(){var e=t.formatUnit(this.width),i=t.formatUnit(this.height);t.setStyleAttribute(this.element,{width:e,height:i});var s={"aria-disabled":"false",role:"presentation","aria-multiselectable":"true"};this.expandedItems.length>0&&(this.initExpand=this.expandedItems),t.attributes(this.element,s),"Single"===this.expandMode&&this.element.setAttribute("aria-multiselectable","false")},i.prototype.renderControl=function(){this.trgtEle=this.element.children.length>0?t.select("div",this.element):null,this.renderItems(),this.initItemExpand()},i.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),t.isNullOrUndefined(this.keyModule)||this.keyModule.destroy()},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this),this.isNested||this.isDestroy||t.rippleEffect(this.element,{selector:"."+H}),this.isNested||(this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}))},i.prototype.focusIn=function(e){e.target.parentElement.classList.add("e-item-focus")},i.prototype.focusOut=function(e){e.target.parentElement.classList.remove("e-item-focus")},i.prototype.ctrlTemplate=function(){this.ctrlTem=this.element.cloneNode(!0);var e,i=t.select(".e-accordion-container",this.element);e=i?i.children:this.element.children;var s=[];[].slice.call(e).forEach(function(e){s.push({header:e.childElementCount>0&&e.children[0]?e.children[0].innerHTML:"",content:e.childElementCount>1&&e.children[1]?e.children[1].innerHTML:""}),e.parentNode.removeChild(e)}),i&&this.element.removeChild(i),this.setProperties({items:s},!0)},i.prototype.toggleIconGenerate=function(){var e=this.createElement("div",{className:"e-toggle-icon"}),t=this.createElement("span",{className:"e-tgl-collapse-icon e-icons"});return e.appendChild(t),e},i.prototype.initItemExpand=function(){var e=this.initExpand.length;if(0!==e)if("Single"===this.expandMode)this.expandItem(!0,this.initExpand[e-1]);else for(var t=0;t<e;t++)this.expandItem(!0,this.initExpand[t])},i.prototype.renderItems=function(){var e,i=this,s=this.element;t.isNullOrUndefined(this.initExpand)&&(this.initExpand=[]),t.isNullOrUndefined(this.trgtEle)||this.ctrlTemplate();var n=this.items;s&&n.length>0&&n.forEach(function(n,o){e=i.renderInnerItem(n,o),s.appendChild(e);var l=Object.keys(window);n.header&&l.indexOf("Blazor")>-1&&!i.isStringTemplate&&0===n.header.indexOf("<div>Blazor")&&t.updateBlazorTemplate(i.element.id+o+"_header","HeaderTemplate",n),e.childElementCount>0&&(t.EventHandler.add(e.querySelector("."+H),"focus",i.focusIn,i),t.EventHandler.add(e.querySelector("."+H),"blur",i.focusOut,i))})},i.prototype.clickHandler=function(e){var i,s,n=this,o=e.target,l={};if(t.closest(o,".e-accordion")===this.element){o.classList.add("e-target");var r=t.closest(o,"."+U),a=t.closest(o,"."+H),d=t.closest(o,"."+T);r&&(t.isNullOrUndefined(a)||t.isNullOrUndefined(d))&&(a=r.children[0],d=r.children[1]),a&&(s=t.select(".e-toggle-icon",a));var h;a?h=t.closest(a,"."+U):d&&(h=t.closest(d,"."+U));var c=[];if(i=this.getIndexByItem(r),h&&(l.item=this.items[this.getIndexByItem(h)]),l.originalEvent=e,!t.isNullOrUndefined(s)&&r.childElementCount<=1&&(t.isNullOrUndefined(d)||!t.isNullOrUndefined(t.select(".e-acrdn-header .e-toggle-icon",h)))){r.appendChild(this.contentRendering(i));var p=Object.keys(window);l.item.content&&p.indexOf("Blazor")>-1&&!this.isStringTemplate&&0===l.item.content.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+i+"_content","ContentTemplate",l.item),this.ariaAttrUpdate(r)}this.trigger("clicked",l);var u=d&&!t.isNullOrUndefined(t.select(".e-target",d)),f=d&&!t.isNullOrUndefined(t.select(".e-accordion",d))&&t.isNullOrUndefined(t.closest(o,".e-acrdn-panel .e-accordion")),m=d&&t.isNullOrUndefined(t.select(".e-accordion",d))||!(t.closest(o,".e-accordion")===this.element);if(u=u&&(f||m),o.classList.remove("e-target"),!(o.classList.contains(T)||o.classList.contains("e-acrdn-content")||u)){var v=this.element.querySelector(".e-accordion-container"),g=v?v.children:this.element.children;[].slice.call(g).forEach(function(e){e.classList.contains("e-active")&&c.push(e)});var y=[].slice.call(this.element.querySelectorAll(".e-acrdn-item [e-animate]"));if(y.length>0)for(var b=0,C=y;b<C.length;b++){var N=C[b];c.push(N.parentElement)}var E=-1!==c.indexOf(h)&&"true"===d.getAttribute("e-animate"),x=!1;if(!t.isNullOrUndefined(r)&&!t.isNullOrUndefined(a)){var O=t.select("."+T,r),w=t.closest(r,".e-acrdn-root").querySelector(".e-expand-state");if(t.isNullOrUndefined(O))return;x=w===r,!t.isVisible(O)||E&&!h.classList.contains("e-selected")?(c.length>0&&"Single"===this.expandMode&&!E&&c.forEach(function(e){n.collapse(t.select("."+T,e)),e.classList.remove("e-expand-state")}),this.expand(O)):this.collapse(O),t.isNullOrUndefined(w)||x||w.classList.remove("e-expand-state")}}}},i.prototype.eleMoveFocus=function(e,i,s){var n,o=t.closest(s,"."+U);s===i?n=("moveUp"===e?s.lastElementChild:s).querySelector("."+H):s.classList.contains(H)&&(o="moveUp"===e?o.previousElementSibling:o.nextElementSibling)&&(n=t.select("."+H,o)),n&&n.focus()},i.prototype.keyActionHandler=function(e){var i=e.target,s=t.closest(e.target,H);if(!t.isNullOrUndefined(s)||i.classList.contains("e-accordion")||i.classList.contains(H)){var n,o=this.element;switch(e.action){case"moveUp":case"moveDown":this.eleMoveFocus(e.action,o,i);break;case"space":case"enter":n=i.nextElementSibling,!t.isNullOrUndefined(n)&&n.classList.contains(T)?"true"!==n.getAttribute("e-animate")&&i.click():i.click();break;case"home":case"end":("home"===e.action?o.firstElementChild.children[0]:o.lastElementChild.children[0]).focus()}}},i.prototype.headerEleGenerate=function(){var e=this.createElement("div",{className:H,id:t.getUniqueID("acrdn_header")}),i={tabindex:"0",role:"heading","aria-expanded":"false","aria-selected":"false","aria-disabled":"false","aria-level":this.items.length.toString()};return t.attributes(e,i),e},i.prototype.renderInnerItem=function(e,i){var s;if(s=this.createElement("div",{className:U}),s.id=t.getUniqueID("acrdn_item"),e.header&&this.angularnativeCondiCheck(e,"header")){var n=this.headerEleGenerate(),o=this.createElement("div",{className:"e-acrdn-header-content"});n.appendChild(o),n.appendChild(this.fetchElement(o,e.header,i,!0)),s.appendChild(n)}var l=t.select("."+H,s);if(!e.expanded||t.isNullOrUndefined(i)||this.enablePersistence||-1===this.initExpand.indexOf(i)&&this.initExpand.push(i),e.cssClass&&s.classList.add(e.cssClass),e.iconCss){var r=this.createElement("div",{className:"e-acrdn-header-icon"}),a=this.createElement("span",{className:e.iconCss+" e-icons"});r.appendChild(a),t.isNullOrUndefined(l)?((l=this.headerEleGenerate()).appendChild(r),s.appendChild(l)):l.insertBefore(r,l.childNodes[0])}if(e.content&&this.angularnativeCondiCheck(e,"content")){var d=this.toggleIconGenerate();t.isNullOrUndefined(l)&&(l=this.headerEleGenerate(),s.appendChild(l)),l.appendChild(d),this.add(s,"e-select")}return s},i.prototype.angularnativeCondiCheck=function(e,i){var s="content"===i?e.content:e.header;if(this.isAngular&&!t.isNullOrUndefined(s.elementRef)){var n=s.elementRef.nativeElement.data;if(t.isNullOrUndefined(n)||""===n||-1===n.indexOf("bindings="))return!0;var o=JSON.parse(s.elementRef.nativeElement.data.replace("bindings=",""));return!(!t.isNullOrUndefined(o)&&"false"===o["ng-reflect-ng-if"])}return!0},i.prototype.fetchElement=function(e,i,s,n){var o,l,r=Object.keys(window);try{if(document.querySelectorAll(i).length){var a=document.querySelector(i);l=a.outerHTML.trim(),e.appendChild(a),a.style.display=""}}catch(s){"string"==typeof i&&r.indexOf("Blazor")>-1&&0!==i.indexOf("<div>Blazor")?e.innerHTML=i:o=t.compile(i)}var d;if(!t.isNullOrUndefined(o)){var h=void 0;e.classList.contains("e-acrdn-header-content")?h=this.element.id+s+"_header":e.classList.contains("e-acrdn-content")&&(h=this.element.id+s+"_content"),d=o({},null,null,h,this.isStringTemplate)}return t.isNullOrUndefined(d)||!(d.length>0)||t.isNullOrUndefined(d[0].tagName)&&1===d.length?0===e.childElementCount&&(e.innerHTML=i):[].slice.call(d).forEach(function(i){t.isNullOrUndefined(i.tagName)||(i.style.display=""),e.appendChild(i)}),t.isNullOrUndefined(l)||-1===this.templateEle.indexOf(i)&&this.templateEle.push(i),e},i.prototype.ariaAttrUpdate=function(e){var i=t.select("."+H,e),s=t.select("."+T,e);i.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",i.id)},i.prototype.contentRendering=function(e){var i=this.items[e].content,s=this.createElement("div",{className:T+" e-content-hide",id:t.getUniqueID("acrdn_panel")});t.attributes(s,{"aria-hidden":"true"});var n=this.createElement("div",{className:"e-acrdn-content"});return s.appendChild(this.fetchElement(n,i,e,!1)),s},i.prototype.expand=function(e){var i,s=this,n=t.closest(e,"."+U);if(!(t.isNullOrUndefined(e)||t.isVisible(e)&&"true"!==e.getAttribute("e-animate")||n.classList.contains("e-overlay"))){var o=t.closest(n,".e-acrdn-root").querySelector(".e-expand-state"),l={name:this.animation.expand.effect,duration:this.animation.expand.duration,timingFunction:this.animation.expand.easing},r=t.select(".e-toggle-icon",n).firstElementChild;i={element:n,item:this.items[this.getIndexByItem(n)],index:this.getIndexByItem(n),content:n.querySelector("."+T),isExpanded:!0};var a=l.name;this.trigger("expanding",i,function(i){i.cancel||(r.classList.add("e-toggle-animation"),s.expandedItemsPush(n),t.isNullOrUndefined(o)||o.classList.remove("e-expand-state"),n.classList.add("e-expand-state"),"None"===l.name?(s.expandProgress("begin",r,e,n,i),s.expandProgress("end",r,e,n,i)):s.expandAnimation(a,r,e,n,l,i))})}},i.prototype.expandAnimation=function(e,i,s,n,o,l){var r,a,d=this;this.lastActiveItemId=n.id,"SlideDown"===e?(o.begin=function(){d.expandProgress("begin",i,s,n,l),s.style.position="absolute",r=n.offsetHeight,a=s.offsetHeight,s.style.maxHeight=s.offsetHeight+"px",n.style.maxHeight=""},o.progress=function(){n.style.minHeight=r+s.offsetHeight+"px"},o.end=function(){t.setStyleAttribute(s,{position:"",maxHeight:""}),n.style.minHeight="",d.expandProgress("end",i,s,n,l)}):(o.begin=function(){d.expandProgress("begin",i,s,n,l)},o.end=function(){d.expandProgress("end",i,s,n,l)}),new t.Animation(o).animate(s)},i.prototype.expandProgress=function(e,i,s,n,o){this.remove(s,"e-content-hide"),this.add(n,"e-selected"),this.add(i,"e-expand-icon"),"end"===e&&(this.add(n,"e-active"),s.setAttribute("aria-hidden","false"),t.attributes(s.previousElementSibling,{"aria-selected":"true","aria-expanded":"true"}),i.classList.remove("e-toggle-animation"),this.trigger("expanded",o))},i.prototype.expandedItemsPush=function(e){var t=this.getIndexByItem(e);-1===this.expandedItems.indexOf(t)&&this.expandedItems.push(t)},i.prototype.getIndexByItem=function(e){var t=this.getItemElements();return[].slice.call(t).indexOf(e)},i.prototype.getItemElements=function(){var e=[],t=this.element.children;return[].slice.call(t).forEach(function(t){t.classList.contains(U)&&e.push(t)}),e},i.prototype.expandedItemsPop=function(e){var t=this.getIndexByItem(e);this.expandedItems.splice(this.expandedItems.indexOf(t),1)},i.prototype.collapse=function(e){var i,s=this,n=t.closest(e,"."+U);if(!t.isNullOrUndefined(e)&&t.isVisible(e)&&!n.classList.contains("e-overlay")){var o={name:this.animation.collapse.effect,duration:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing},l=t.select(".e-toggle-icon",n).firstElementChild;i={element:n,item:this.items[this.getIndexByItem(n)],index:this.getIndexByItem(n),content:n.querySelector("."+T),isExpanded:!1};var r=o.name;this.trigger("expanding",i,function(t){t.cancel||(s.expandedItemsPop(n),n.classList.add("e-expand-state"),l.classList.add("e-toggle-animation"),"None"===o.name?(s.collapseProgress("begin",l,e,n,t),s.collapseProgress("end",l,e,n,t)):s.collapseAnimation(r,e,n,l,o,t))})}},i.prototype.collapseAnimation=function(e,i,s,n,o,l){var r,a,d,h,c=this;this.lastActiveItemId=s.id,"SlideUp"===e?(o.begin=function(){d=s.offsetHeight,s.style.minHeight=d+"px",i.style.position="absolute",r=s.offsetHeight,a=i.offsetHeight,i.style.maxHeight=a+"px",c.collapseProgress("begin",n,i,s,l)},o.progress=function(){(h=r-(a-i.offsetHeight))<d&&(s.style.minHeight=h+"px")},o.end=function(){i.style.display="none",c.collapseProgress("end",n,i,s,l),s.style.minHeight="",t.setStyleAttribute(i,{position:"",maxHeight:"",display:""})}):(o.begin=function(){c.collapseProgress("begin",n,i,s,l)},o.end=function(){c.collapseProgress("end",n,i,s,l)}),new t.Animation(o).animate(i)},i.prototype.collapseProgress=function(e,i,s,n,o){this.remove(i,"e-expand-icon"),this.remove(n,"e-selected"),"end"===e&&(this.add(s,"e-content-hide"),i.classList.remove("e-toggle-animation"),this.remove(n,"e-active"),s.setAttribute("aria-hidden","true"),t.attributes(s.previousElementSibling,{"aria-selected":"false","aria-expanded":"false"}),this.trigger("expanded",o))},i.prototype.getModuleName=function(){return"accordion"},i.prototype.itemAttribUpdate=function(){var e=this.getItemElements(),i=this.items.length;e.forEach(function(e){t.select("."+H,e).setAttribute("aria-level",""+i)})},i.prototype.addItem=function(e,i){var s=this.element,n=this.getItemElements();if(t.isNullOrUndefined(i)&&(i=this.items.length),s.childElementCount>=i){this.items.splice(i,0,e);var o=this.renderInnerItem(e,i);s.childElementCount===i?s.appendChild(o):s.insertBefore(o,n[i]),t.EventHandler.add(o.querySelector("."+H),"focus",this.focusIn,this),t.EventHandler.add(o.querySelector("."+H),"blur",this.focusOut,this),this.itemAttribUpdate()}this.expandedItems=[],this.expandedItemRefresh(s),e.expanded&&this.expandItem(!0,i)},i.prototype.expandedItemRefresh=function(e){var t=this,i=this.getItemElements();[].slice.call(i).forEach(function(e){e.classList.contains("e-selected")&&t.expandedItemsPush(e)})},i.prototype.removeItem=function(e){var i=this.getItemElements()[e];t.isNullOrUndefined(i)||(this.restoreContent(e),t.detach(i),this.items.splice(e,1),this.itemAttribUpdate(),this.expandedItems=[],this.expandedItemRefresh(this.element))},i.prototype.select=function(e){var i=this.getItemElements()[e];t.isNullOrUndefined(i)||t.isNullOrUndefined(t.select("."+H,i))||i.children[0].focus()},i.prototype.hideItem=function(e,i){var s=this.getItemElements()[e];t.isNullOrUndefined(s)||(t.isNullOrUndefined(i)&&(i=!0),i?this.add(s,"e-hide"):this.remove(s,"e-hide"))},i.prototype.enableItem=function(e,i){var s=this.getItemElements()[e];if(!t.isNullOrUndefined(s)){var n=s.firstElementChild;i?(this.remove(s,"e-overlay"),t.attributes(n,{tabindex:"0","aria-disabled":"false"}),n.focus()):(s.classList.contains("e-active")&&(this.expandItem(!1,e),this.eleMoveFocus("movedown",this.element,n)),this.add(s,"e-overlay"),n.setAttribute("aria-disabled","true"),n.removeAttribute("tabindex"))}},i.prototype.expandItem=function(e,i){var s=this,n=(this.element,this.getItemElements());if(t.isNullOrUndefined(i))if("Single"===this.expandMode&&e){r=n[n.length-1];this.itemExpand(e,r,this.getIndexByItem(r))}else{var o=t.select("#"+this.lastActiveItemId,this.element);[].slice.call(n).forEach(function(t){s.itemExpand(e,t,s.getIndexByItem(t)),t.classList.remove("e-expand-state")});var l=t.select(".e-expand-state",this.element);l&&l.classList.remove("e-expand-state"),o&&o.classList.add("e-expand-state")}else{var r=n[i];if(t.isNullOrUndefined(r)||!r.classList.contains("e-select")||r.classList.contains("e-active")&&e)return;"Single"===this.expandMode&&this.expandItem(!1),this.itemExpand(e,r,i)}},i.prototype.itemExpand=function(e,i,s){var n=i.children[1];if(!i.classList.contains("e-overlay")){if(t.isNullOrUndefined(n)&&e){n=this.contentRendering(s),i.appendChild(n);var o=Object.keys(window),l=this.items[s];l.content&&o.indexOf("Blazor")>-1&&!this.isStringTemplate&&0===l.content.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+s+"_content","ContentTemplate",l),this.ariaAttrUpdate(i)}else if(t.isNullOrUndefined(n))return;e?this.expand(n):this.collapse(n)}},i.prototype.destroyItems=function(){this.restoreContent(null),[].slice.call(this.element.querySelectorAll("."+U)).forEach(function(e){t.detach(e)})},i.prototype.restoreContent=function(e){var i;i=t.isNullOrUndefined(e)?this.element:this.element.querySelectorAll("."+U)[e],this.templateEle.forEach(function(e){t.isNullOrUndefined(i.querySelector(e))||(document.body.appendChild(i.querySelector(e)).style.display="none")})},i.prototype.updateItem=function(e,i){if(!t.isNullOrUndefined(e)){var s=this.items[i];this.items.splice(i,1),this.restoreContent(i),t.detach(e),this.addItem(s,i)}},i.prototype.getPersistData=function(){var e=["expandedItems"];return this.addOnPersist(e)},i.prototype.onPropertyChanged=function(e,i){for(var s=this.element,n=0,o=Object.keys(e);n<o.length;n++)switch(o[n]){case"items":if(e.items instanceof Array&&i.items instanceof Array)this.destroyItems(),this.renderItems(),this.initItemExpand();else for(var l=Object.keys(e.items),r=0;r<l.length;r++){var a=parseInt(Object.keys(e.items)[r],10),d=Object.keys(e.items[a])[0],h=t.selectAll("."+U,this.element)[a],c=Object(i.items[a])[d],p=Object(e.items[a])[d],u=d;("header"===u||"iconCss"===u||"expanded"===u||"content"===u&&""===c)&&this.updateItem(h,a),"cssClass"!==d||t.isNullOrUndefined(h)||(h.classList.remove(c),h.classList.add(p)),"content"!==d||t.isNullOrUndefined(h)||2!==h.children.length||(h.classList.contains("e-selected")&&this.expandItem(!1,a),t.detach(h.querySelector("."+T)))}break;case"enableRtl":e.enableRtl?this.add(s,"e-rtl"):this.remove(s,"e-rtl");break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)});break;case"width":t.setStyleAttribute(this.element,{width:t.formatUnit(e.width)});break;case"expandMode":"Single"===e.expandMode?(this.element.setAttribute("aria-multiselectable","false"),this.expandedItems.length>1&&this.expandItem(!1)):this.element.setAttribute("aria-multiselectable","true")}},M([t.Collection([],j)],i.prototype,"items",void 0),M([t.Property("100%")],i.prototype,"width",void 0),M([t.Property("auto")],i.prototype,"height",void 0),M([t.Property("Multiple")],i.prototype,"expandMode",void 0),M([t.Complex({},R)],i.prototype,"animation",void 0),M([t.Event()],i.prototype,"clicked",void 0),M([t.Event()],i.prototype,"expanding",void 0),M([t.Event()],i.prototype,"expanded",void 0),M([t.Event()],i.prototype,"created",void 0),M([t.Event()],i.prototype,"destroyed",void 0),i=M([t.NotifyPropertyChanges],i)}(t.Component),V=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),q=function(e,t,i,s){var n,o=arguments.length,l=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(o<3?n(l):o>3?n(t,i,l):n(t,i))||l);return o>3&&l&&Object.defineProperty(t,i,l),l},W=function(e){function i(t,i){return e.call(this,t,i)||this}return V(i,e),i.prototype.preRender=function(){this.isMenu=!1,this.element.id=this.element.id||t.getUniqueID("ej2-contextmenu"),e.prototype.preRender.call(this)},i.prototype.initialize=function(){e.prototype.initialize.call(this),t.attributes(this.element,{role:"menu",tabindex:"0"}),this.element.style.zIndex=s.getZindexPartial(this.element).toString()},i.prototype.open=function(t,i,s){e.prototype.openMenu.call(this,null,null,t,i,null,s)},i.prototype.close=function(){e.prototype.closeMenu.call(this)},i.prototype.onPropertyChanged=function(t,i){e.prototype.onPropertyChanged.call(this,t,i);for(var s=0,n=Object.keys(t);s<n.length;s++)switch(n[s]){case"filter":this.close(),this.filter=t.filter;break;case"target":this.unWireEvents(i.target),this.wireEvents()}},i.prototype.getModuleName=function(){return"contextmenu"},q([t.Property("")],i.prototype,"target",void 0),q([t.Property("")],i.prototype,"filter",void 0),q([t.Collection([],E)],i.prototype,"items",void 0),i=q([t.NotifyPropertyChanges],i)}(O),z=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),_=function(e,t,i,s){var n,o=arguments.length,l=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(o<3?n(l):o>3?n(t,i,l):n(t,i))||l);return o>3&&l&&Object.defineProperty(t,i,l),l},K="e-vertical",Y=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.tempItems=[],s}return z(i,e),i.prototype.getModuleName=function(){return"menu"},i.prototype.preRender=function(){if(this.isMenu=!0,this.element.id=this.element.id||t.getUniqueID("ej2-menu"),this.template)try{document.querySelectorAll(this.template).length&&(this.template=document.querySelector(this.template).innerHTML.trim(),this.clearChanges())}catch(e){}else this.updateMenuItems(this.items);e.prototype.preRender.call(this)},i.prototype.initialize=function(){e.prototype.initialize.call(this),t.attributes(this.element,{role:"menubar",tabindex:"0"}),"Vertical"===this.orientation?(this.element.classList.add(K),this.hamburgerMode&&!this.target&&this.element.previousElementSibling.classList.add(K),this.element.setAttribute("aria-orientation","vertical")):t.Browser.isDevice&&!this.enableScrolling&&this.element.parentElement.classList.add("e-scrollable"),this.hamburgerMode&&(this.element.parentElement.classList.add("e-hamburger"),"Horizontal"===this.orientation&&this.element.classList.add("e-hide-menu"))},i.prototype.updateMenuItems=function(e){this.tempItems=e,this.items=[],this.tempItems.map(this.createMenuItems,this),this.setProperties({items:this.items},!0),this.tempItems=[]},i.prototype.onPropertyChanged=function(t,i){for(var s=0,n=Object.keys(t);s<n.length;s++)switch(n[s]){case"orientation":"Vertical"===t.orientation?(this.element.classList.add(K),this.hamburgerMode&&(this.target||this.element.previousElementSibling.classList.add(K),this.element.classList.remove("e-hide-menu")),this.element.setAttribute("aria-orientation","vertical")):(this.element.classList.remove(K),this.hamburgerMode&&(this.target||this.element.previousElementSibling.classList.remove(K),this.element.classList.add("e-hide-menu")),this.element.removeAttribute("aria-orientation"));break;case"items":Object.keys(i.items).length||this.updateMenuItems(t.items);break;case"hamburgerMode":this.element.previousElementSibling||e.prototype.createHeaderContainer.call(this),t.hamburgerMode?this.element.parentElement.classList.add("e-hamburger"):this.element.parentElement.classList.remove("e-hamburger"),"Vertical"===this.orientation?(this.target||this.element.previousElementSibling.classList.add(K),this.element.classList.remove("e-hide-menu")):(this.target?this.element.previousElementSibling.classList.add(K):this.element.previousElementSibling.classList.remove(K),this.element.classList[t.hamburgerMode?"add":"remove"]("e-hide-menu"));break;case"title":this.hamburgerMode&&this.element.previousElementSibling&&(this.element.previousElementSibling.querySelector(".e-menu-title").innerHTML=t.title);break;case"target":this.hamburgerMode&&(this.unWireEvents(i.target),this.wireEvents(),"Horizontal"===this.orientation&&(t.target?this.element.previousElementSibling.classList.add(K):(this.element.previousElementSibling||e.prototype.createHeaderContainer.call(this),this.element.previousElementSibling.classList.remove(K)),this.element.classList.add("e-hide-menu")))}e.prototype.onPropertyChanged.call(this,t,i)},i.prototype.createMenuItems=function(e){var t,i,s,n=this.items;if(t=this.getField("parentId"),e[t]){for(i=this.getIndex(e[t].toString(),!0),s=0;s<i.length;s++)n[i[s]].items||(n[i[s]].items=[]),n=n[i[s]].items;n.push(e)}else this.items.push(e)},i.prototype.open=function(){e.prototype.openHamburgerMenu.call(this)},i.prototype.close=function(){e.prototype.closeHamburgerMenu.call(this)},_([t.Property("Horizontal")],i.prototype,"orientation",void 0),_([t.Property("")],i.prototype,"target",void 0),_([t.Property(null)],i.prototype,"template",void 0),_([t.Property(!1)],i.prototype,"enableScrolling",void 0),_([t.Property(!1)],i.prototype,"hamburgerMode",void 0),_([t.Property("Menu")],i.prototype,"title",void 0),_([t.Complex({},N)],i.prototype,"fields",void 0),i=_([t.NotifyPropertyChanges],i)}(O),G=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),X=function(e,t,i,s){var n,o=arguments.length,l=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(o<3?n(l):o>3?n(t,i,l):n(t,i))||l);return o>3&&l&&Object.defineProperty(t,i,l),l},Q="e-tab-header",J="e-toolbar-items",Z="e-toolbar-item",$="e-toolbar-popup",ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return G(i,e),X([t.Property("SlideLeftIn")],i.prototype,"effect",void 0),X([t.Property(600)],i.prototype,"duration",void 0),X([t.Property("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return G(i,e),X([t.Complex({effect:"SlideLeftIn",duration:600,easing:"ease"},ee)],i.prototype,"previous",void 0),X([t.Complex({effect:"SlideRightIn",duration:600,easing:"ease"},ee)],i.prototype,"next",void 0),i}(t.ChildProperty),ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return G(i,e),X([t.Property("")],i.prototype,"text",void 0),X([t.Property("")],i.prototype,"iconCss",void 0),X([t.Property("left")],i.prototype,"iconPosition",void 0),i}(t.ChildProperty),se=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return G(i,e),X([t.Complex({},ie)],i.prototype,"header",void 0),X([t.Property(null)],i.prototype,"headerTemplate",void 0),X([t.Property("")],i.prototype,"content",void 0),X([t.Property("")],i.prototype,"cssClass",void 0),X([t.Property(!1)],i.prototype,"disabled",void 0),i}(t.ChildProperty),ne=function(e){function i(i,s){var n=e.call(this,i,s)||this;return n.show={},n.hide={},n.animateOptions={},n.animObj=new t.Animation(n.animateOptions),n.maxHeight=0,n.title="Close",n.lastIndex=0,n.isAdd=!1,n.isIconAlone=!1,n.resizeContext=n.refreshActElePosition.bind(n),n.keyConfigs={tab:"tab",home:"home",end:"end",enter:"enter",space:"space",delete:"delete",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow"},n}return G(i,e),i.prototype.destroy=function(){var i=this;if(t.isNullOrUndefined(this.tbObj)||this.tbObj.destroy(),this.unWireEvents(),["role","aria-disabled","aria-activedescendant","tabindex","aria-orientation"].forEach(function(e){i.element.removeAttribute(e)}),this.expTemplateContent(),this.isTemplate){var s=t.select(".e-tab > .e-content",this.element);this.element.classList.remove("e-template"),t.isNullOrUndefined(s)||(s.innerHTML=this.cnt)}else for(;this.element.firstElementChild;)t.remove(this.element.firstElementChild);e.prototype.destroy.call(this),this.trigger("destroyed")},i.prototype.preRender=function(){var e=t.closest(this.element,".e-content");this.prevIndex=0,this.isNested=!1,this.isPopup=!1,this.initRender=!0,this.isSwipeed=!1,this.itemIndexArray=[],this.templateEle=[],t.isNullOrUndefined(e)||(e.parentElement.classList.add("e-nested"),this.isNested=!0);var i=t.Browser.info.name,s="msie"===i?"e-ie":"edge"===i?"e-edge":"safari"===i?"e-safari":"";t.setStyleAttribute(this.element,{width:t.formatUnit(this.width),height:t.formatUnit(this.height)}),this.setCssClass(this.element,this.cssClass,!0),t.attributes(this.element,{role:"tablist","aria-disabled":"false","aria-activedescendant":""}),this.setCssClass(this.element,s,!0),this.updatePopAnimationConfig()},i.prototype.render=function(){this.btnCls=this.createElement("span",{className:"e-icons e-close-icon",attrs:{title:this.title}}),this.renderContainer(),this.wireEvents(),this.initRender=!1,t.isBlazor()&&this.renderComplete()},i.prototype.renderContainer=function(){var e=this.element;if(this.items.length>0&&0===e.children.length)e.appendChild(this.createElement("div",{className:"e-content"})),this.setOrientation(this.headerPlacement,this.createElement("div",{className:Q})),this.isTemplate=!1;else if(this.element.children.length>0){this.isTemplate=!0,e.classList.add("e-template");var i=e.querySelector(".e-tab-header");i&&"Bottom"===this.headerPlacement&&this.setOrientation(this.headerPlacement,i)}if(!t.isNullOrUndefined(t.select(".e-tab-header",this.element))&&!t.isNullOrUndefined(t.select(".e-content",this.element))){if(this.renderHeader(),this.tbItems=t.select(".e-tab-header ."+J,this.element),t.isNullOrUndefined(this.tbItems)||t.rippleEffect(this.tbItems,{selector:".e-tab-wrap"}),this.renderContent(),t.selectAll("."+Z,this.element).length>0){var s=void 0;this.tbItems=t.select(".e-tab-header ."+J,this.element),this.bdrLine=this.createElement("div",{className:"e-indicator e-hidden e-ignore"}),s=t.select("."+this.scrCntClass,this.tbItems),t.isNullOrUndefined(s)?this.tbItems.insertBefore(this.bdrLine,this.tbItems.firstChild):s.insertBefore(this.bdrLine,s.firstChild),this.setContentHeight(!0),this.select(this.selectedItem)}this.setRTL(this.enableRtl)}},i.prototype.renderHeader=function(){var e=this,i=this.headerPlacement,s=[];if(this.hdrEle=t.select(".e-tab-header",this.element),this.addVerticalClass(),this.isTemplate){this.element.children.length>1&&this.element.children[1].classList.contains(Q)&&this.setProperties({headerPlacement:"Bottom"},!0);for(var n=this.hdrEle.children.length,o=[],l=0;l<n;l++)o.push(this.hdrEle.children.item(l).innerHTML);if(n>0){for(;this.hdrEle.firstElementChild;)t.detach(this.hdrEle.firstElementChild);this.hdrEle.appendChild(this.createElement("div",{className:"e-items"})),o.forEach(function(i,s){e.lastIndex=s;var n={className:"e-item",id:"e-item_"+s,attrs:{role:"tab","aria-controls":"e-content_"+s,"aria-selected":"false"}},o=e.createElement("span",{className:"e-tab-text",innerHTML:i,attrs:{role:"presentation"}}).outerHTML,l=e.createElement("div",{className:"e-text-wrap",innerHTML:o+e.btnCls.outerHTML}).outerHTML,r=e.createElement("div",{className:"e-tab-wrap",innerHTML:l,attrs:{tabIndex:"-1"}});t.select(".e-items",e.element).appendChild(e.createElement("div",n)),t.selectAll(".e-item",e.element)[s].appendChild(r)})}}else s=this.parseObject(this.items,0);this.tbObj=new D({width:"Left"===i||"Right"===i?"auto":"100%",height:"Left"===i||"Right"===i?"100%":"auto",overflowMode:this.overflowMode,items:0!==s.length?s:[],clicked:this.clickHandler.bind(this),scrollStep:this.scrollStep}),this.tbObj.isStringTemplate=!0,this.tbObj.createElement=this.createElement,this.tbObj.appendTo(this.hdrEle);for(l=0;l<this.items.length;l++){var r=this.items[l];r.headerTemplate&&t.isBlazor()&&!this.isStringTemplate&&0===r.headerTemplate.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+l+"_headerTemplate","HeaderTemplate",r)}this.updateOrientationAttribute(),this.setCloseButton(this.showCloseButton)},i.prototype.renderContent=function(){this.cntEle=t.select(".e-content",this.element);var e=t.selectAll("."+Z,this.element);if(this.isTemplate){this.cnt=this.cntEle.children.length>0?this.cntEle.innerHTML:"";for(var i=this.cntEle.children,s=0;s<e.length;s++)i.length-1>=s&&(i.item(s).className+="e-item",t.attributes(i.item(s),{role:"tabpanel","aria-labelledby":"e-item_"+s}),i.item(s).id="e-content_"+s)}},i.prototype.reRenderItems=function(){this.renderContainer(),t.isNullOrUndefined(this.cntEle)||(this.touchModule=new t.Touch(this.cntEle,{swipe:this.swipeHandler.bind(this)}))},i.prototype.parseObject=function(e,i){var s,n=this,o=t.selectAll("."+Z,this.element).length,l=[],r=[];return e.forEach(function(e,a){var d=t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.iconPosition)?"":e.header.iconPosition,h=t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.iconCss)?"":e.header.iconCss;if(t.isNullOrUndefined(e.headerTemplate)&&(t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.text)||0===e.header.text.length&&""===h))return void r.push(a);var c=e.headerTemplate||e.header.text;n.lastIndex=0===o?a:n.isReplace?i+a:n.lastIndex+1;var p=e.disabled?" e-disable e-overlay":"";s=n.createElement("div",{className:"e-tab-text",attrs:{role:"presentation"}});var u=c instanceof Object?c.outerHTML:c,f=!t.isNullOrUndefined(u)&&""!==u;t.isNullOrUndefined(c.tagName)?n.headerTextCompile(s,c,a):s.appendChild(c);var m=n.createElement("span",{className:"e-icons e-tab-icon e-icon-"+d+" "+h}),v=n.createElement("div",{className:"e-text-wrap"});v.appendChild(s),""!==c&&void 0!==c&&""!==h?("left"===d||"top"===d?v.insertBefore(m,v.firstElementChild):v.appendChild(m),s,n.isIconAlone=!1):(""===h?s:m)===m&&(t.detach(s),v.appendChild(m),n.isIconAlone=!0);var g=e.disabled?{}:{tabIndex:"-1"};v.appendChild(n.btnCls.cloneNode(!0));var y=n.createElement("div",{className:"e-tab-wrap",attrs:g});y.appendChild(v),n.itemIndexArray===[]?n.itemIndexArray.push("e-item_"+n.lastIndex):n.itemIndexArray.splice(i+a,0,"e-item_"+n.lastIndex);var b={htmlAttributes:{id:"e-item_"+n.lastIndex,role:"tab","aria-selected":"false"},template:y};b.cssClass=e.cssClass+" "+p+" "+(""!==h?"e-i"+d:"")+" "+(f?"":"e-icon"),"top"!==d&&"bottom"!==d||n.element.classList.add("e-vertical-icon"),l.push(b),a++}),this.isAdd||r.forEach(function(e){n.items.splice(e,1)}),this.isIconAlone?this.element.classList.add("e-icon-tab"):this.element.classList.remove("e-icon-tab"),l},i.prototype.removeActiveClass=function(e){var i=t.selectAll(":root .e-tab-header .e-toolbar-item.e-active",this.element)[0],s=t.select(".e-tab-header",this.element);"Bottom"===this.headerPlacement&&(i=t.selectAll(":root .e-tab-header .e-toolbar-item.e-active",s)[0]),t.isNullOrUndefined(i)||i.classList.remove("e-active")},i.prototype.checkPopupOverflow=function(e){this.tbPop=t.select(".e-toolbar-pop",this.element);var i=t.select(".e-hor-nav",this.element),s=t.select("."+J,this.element),n=s.lastChild,o=!1;return!this.isVertical()&&(this.enableRtl&&i.offsetLeft+i.offsetWidth>s.offsetLeft||!this.enableRtl&&i.offsetLeft<s.offsetWidth)?o=!0:this.isVertical()&&i.offsetTop<n.offsetTop+n.offsetHeight&&(o=!0),o&&(e.classList.add($),this.tbPop.insertBefore(e.cloneNode(!0),t.selectAll("."+$,this.tbPop)[0]),e.outerHTML=""),!0},i.prototype.popupHandler=function(e){var i=e.querySelector(".e-ripple-element");t.isNullOrUndefined(i)||(i.outerHTML="",e.querySelector(".e-tab-wrap").classList.remove("e-ripple")),this.tbItem=t.selectAll(".e-toolbar-items ."+Z,this.hdrEle);var s=this.tbItem[this.tbItem.length-1];if(0!==this.tbItem.length){if(e.classList.remove($),e.removeAttribute("style"),this.tbItems.appendChild(e.cloneNode(!0)),this.actEleId=e.id,e.outerHTML="",this.checkPopupOverflow(s)){var n=this.tbItems.lastChild.previousElementSibling;this.checkPopupOverflow(n)}this.isPopup=!0}return t.selectAll("."+Z,this.tbItems).length-1},i.prototype.updateOrientationAttribute=function(){t.attributes(this.element,{"aria-orientation":this.isVertical()?"vertical":"horizontal"})},i.prototype.setCloseButton=function(e){var i=t.select(".e-tab-header",this.element);!0===e?i.classList.add("e-close-show"):i.classList.remove("e-close-show"),this.tbObj.refreshOverflow(),this.refreshActElePosition()},i.prototype.prevCtnAnimation=function(e,t){this.enableRtl||this.element.classList.contains("e-rtl");return this.isPopup||e<=t?"SlideLeftIn"===this.animation.previous.effect?{name:"SlideLeftOut",duration:this.animation.previous.duration,timingFunction:this.animation.previous.easing}:null:"SlideRightIn"===this.animation.next.effect?{name:"SlideRightOut",duration:this.animation.next.duration,timingFunction:this.animation.next.easing}:null},i.prototype.triggerPrevAnimation=function(e,i){var s=this,n=this.prevCtnAnimation(i,this.selectedItem);t.isNullOrUndefined(n)?e.classList.remove("e-active"):(n.begin=function(){t.setStyleAttribute(e,{position:"absolute"}),e.classList.add("e-progress"),e.classList.add("e-view")},n.end=function(){e.style.display="none",e.classList.remove("e-active"),e.classList.remove("e-progress"),e.classList.remove("e-view"),t.setStyleAttribute(e,{display:"",position:""}),0!==e.childNodes.length||s.isTemplate||t.detach(e)},new t.Animation(n).animate(e))},i.prototype.triggerAnimation=function(e,i){var s,n=this,o=this.prevIndex;[].slice.call(this.element.querySelector(".e-content").children).forEach(function(e){e.id===n.prevActiveEle&&(s=e)});var l=this.tbItem[o],r=this.extIndex(this.tbItem[this.selectedItem].id),a=this.getTrgContent(this.cntEle,r);if(t.isNullOrUndefined(s)&&!t.isNullOrUndefined(l)){var d=this.extIndex(l.id);s=this.getTrgContent(this.cntEle,d)}if(this.prevActiveEle=a.id,this.initRender||!1===i||this.animation==={}||t.isNullOrUndefined(this.animation))return void(s&&s!==a&&s.classList.remove("e-active"));var h,c=t.select(".e-content",this.element);if(this.prevIndex>this.selectedItem&&!this.isPopup){var p=this.animation.previous.effect;h={name:"None"===p?"":"SlideLeftIn"!==p?p:"SlideLeftIn",duration:this.animation.previous.duration,timingFunction:this.animation.previous.easing}}else if(this.isPopup||this.prevIndex<this.selectedItem||this.prevIndex===this.selectedItem){var u=this.animation.next.effect;h={name:"None"===u?"":"SlideRightIn"!==u?u:"SlideRightIn",duration:this.animation.next.duration,timingFunction:this.animation.next.easing}}h.progress=function(){c.classList.add("e-progress"),n.setActiveBorder()},h.end=function(){c.classList.remove("e-progress"),a.classList.add("e-active")},this.initRender||t.isNullOrUndefined(s)||this.triggerPrevAnimation(s,o),this.isPopup=!1,""===h.name?a.classList.add("e-active"):new t.Animation(h).animate(a)},i.prototype.keyPressed=function(e){var i=t.closest(e,".e-tab-header ."+Z),s=this.getEleIndex(i);!t.isNullOrUndefined(this.popEle)&&e.classList.contains("e-hor-nav")?this.popEle.classList.contains("e-popup-open")?this.popObj.hide(this.hide):this.popObj.show(this.show):e.classList.contains("e-scroll-nav")?e.click():t.isNullOrUndefined(i)||!1!==i.classList.contains("e-active")||(this.select(s),t.isNullOrUndefined(this.popEle)||this.popObj.hide(this.hide))},i.prototype.getEleIndex=function(e){return Array.prototype.indexOf.call(t.selectAll(".e-tab-header ."+Z,this.element),e)},i.prototype.extIndex=function(e){return e.replace("e-item_","")},i.prototype.expTemplateContent=function(){var e=this;this.templateEle.forEach(function(i){t.isNullOrUndefined(e.element.querySelector(i))||(document.body.appendChild(e.element.querySelector(i)).style.display="none")})},i.prototype.templateCompile=function(e,i,s){var n=this.createElement("div");if(this.compileElement(n,i,"content",s),0!==n.childNodes.length){e.appendChild(n);var o=this.items[s];t.isNullOrUndefined(o)||o.content&&t.isBlazor()&&!this.isStringTemplate&&0===o.content.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+s+"_content","ContentTemplate",o)}},i.prototype.compileElement=function(e,i,s,n){var o;"string"==typeof i&&t.isBlazor()&&0!==i.indexOf("<div>Blazor")?(i=i.trim(),e.innerHTML=i):o=t.compile(i);var l;t.isNullOrUndefined(o)||(l=t.isBlazor()&&!this.isStringTemplate&&0===i.indexOf("<div>Blazor")?o({},this,s,this.element.id+n+"_"+s,this.isStringTemplate):o({},this,s)),!t.isNullOrUndefined(o)&&l.length>0&&[].slice.call(l).forEach(function(t){e.appendChild(t)})},i.prototype.headerTextCompile=function(e,t,i){this.compileElement(e,t,"headerTemplate",i)},i.prototype.getContent=function(e,i,s,n){var o;if("string"==typeof i||t.isNullOrUndefined(i.innerHTML))if("."===i[0]||"#"===i[0])if(document.querySelectorAll(i).length){var l=document.querySelector(i);o=l.outerHTML.trim(),"clone"===s?e.appendChild(l.cloneNode(!0)):(e.appendChild(l),l.style.display="")}else this.templateCompile(e,i,n);else this.templateCompile(e,i,n);else e.appendChild(i);t.isNullOrUndefined(o)||-1===this.templateEle.indexOf(i.toString())&&this.templateEle.push(i.toString())},i.prototype.getTrgContent=function(e,i){return this.element.classList.contains("e-nested")?t.select(".e-nested> .e-content > #e-content_"+i,this.element):this.findEle(e.children,"e-content_"+i)},i.prototype.findEle=function(e,t){for(var i,s=0;s<e.length;s++)if(e[s].id===t){i=e[s];break}return i},i.prototype.isVertical=function(){var e="Left"===this.headerPlacement||"Right"===this.headerPlacement;return this.scrCntClass=e?"e-vscroll-content":"e-hscroll-content",e},i.prototype.addVerticalClass=function(){if(this.isVertical()){var e="Left"===this.headerPlacement?"e-vertical-left":"e-vertical-right";t.addClass([this.hdrEle],["e-vertical",e]),this.element.classList.add("e-vertical-tab")}"Bottom"===this.headerPlacement&&this.hdrEle.classList.add("e-horizontal-bottom")},i.prototype.updatePopAnimationConfig=function(){this.show={name:this.isVertical()?"FadeIn":"SlideDown",duration:100},this.hide={name:this.isVertical()?"FadeOut":"SlideUp",duration:100}},i.prototype.changeOrientation=function(e){this.setOrientation(e,this.hdrEle);var i=!!this.hdrEle.classList.contains("e-vertical");t.removeClass([this.element],["e-vertical-tab"]),t.removeClass([this.hdrEle],["e-vertical","e-vertical-left","e-vertical-right"]),i!==this.isVertical()&&(this.tbObj.setProperties({height:this.isVertical()?"100%":"auto",width:this.isVertical()?"auto":"100%"},!0),this.tbObj.changeOrientation(),this.updatePopAnimationConfig()),this.addVerticalClass(),this.updateOrientationAttribute(),this.select(this.selectedItem)},i.prototype.setOrientation=function(e,i){"Bottom"===e&&1!==Array.prototype.indexOf.call(this.element.children,i)?this.element.appendChild(i):this.element.insertBefore(i,t.select(".e-content",this.element))},i.prototype.setCssClass=function(e,t,i){if(""!==t)for(var s=t.split(" "),n=0;n<s.length;n++)i?e.classList.add(s[n]):e.classList.remove(s[n])},i.prototype.setContentHeight=function(e){if(!t.isNullOrUndefined(this.cntEle)){var i=t.select(".e-tab-header",this.element);if("None"===this.heightAdjustMode){if("auto"===this.height)return;this.isVertical()||t.setStyleAttribute(this.cntEle,{height:this.element.offsetHeight-i.offsetHeight+"px"})}else if("Fill"===this.heightAdjustMode)t.setStyleAttribute(this.element,{height:"100%"}),t.setStyleAttribute(this.cntEle,{height:"auto"});else if("Auto"===this.heightAdjustMode){var s=t.selectAll(".e-content > .e-item",this.element);if(!0===this.isTemplate)for(o=0;o<s.length;o++)s[o].setAttribute("style","display:block; visibility: visible"),this.maxHeight=Math.max(this.maxHeight,this.getHeight(s[o])),s[o].style.removeProperty("display"),s[o].style.removeProperty("visibility");else{this.cntEle=t.select(".e-content",this.element),!0===e&&this.cntEle.appendChild(this.createElement("div",{id:"e-content_0",className:"e-item e-active",attrs:{role:"tabpanel","aria-labelledby":"e-item_0"}}));for(var n=this.cntEle.children.item(0),o=0;o<this.items.length;o++)for(this.getContent(n,this.items[o].content,"clone",o),this.maxHeight=Math.max(this.maxHeight,this.getHeight(n));n.firstChild;)n.removeChild(n.firstChild);this.clearTemplate(["content"]),this.templateEle=[],this.getContent(n,this.items[0].content,"render",0),n.classList.remove("e-active")}t.setStyleAttribute(this.cntEle,{height:this.maxHeight+"px"})}else t.setStyleAttribute(this.cntEle,{height:"auto"})}},i.prototype.getHeight=function(e){var t=window.getComputedStyle(e);return e.offsetHeight+parseFloat(t.getPropertyValue("padding-top"))+parseFloat(t.getPropertyValue("padding-bottom"))+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))},i.prototype.setActiveBorder=function(){var e,i,s,n;if("Bottom"===this.headerPlacement?(n=t.select(".e-tab-header",this.element),e=t.select(".e-toolbar-item.e-active",n)):(n=t.select(".e-tab-header",this.element),e=t.select(".e-toolbar-item.e-active",this.element)),null!==e){var o=t.closest(e,".e-tab");if(this.element===o){if(this.tbItems=t.select("."+J,n),i=t.select(".e-indicator",n),s=t.select(".e-toolbar-items ."+this.scrCntClass,n),this.isVertical())t.setStyleAttribute(i,{left:"",right:""}),0!==(t.isNullOrUndefined(s)?this.tbItems.offsetHeight:s.offsetHeight)?t.setStyleAttribute(i,{top:e.offsetTop+"px",height:e.offsetHeight+"px"}):t.setStyleAttribute(i,{top:0,height:0});else{t.setStyleAttribute(i,{top:"",height:""});var l=t.isNullOrUndefined(s)?this.tbItems.offsetWidth:s.offsetWidth;0!==l?t.setStyleAttribute(i,{left:e.offsetLeft+"px",right:l-(e.offsetLeft+e.offsetWidth)+"px"}):t.setStyleAttribute(i,{left:"auto",right:"auto"})}t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.remove("e-hidden")}}},i.prototype.setActive=function(e){this.tbItem=t.selectAll(".e-tab-header ."+Z,this.element);var i=this.tbItem[e];if(e>=0&&this.setProperties({selectedItem:e},!0),!(e<0||isNaN(e)||0===this.tbItem.length)){if(i.classList.contains("e-active"))return void this.setActiveBorder();if(!this.isTemplate){var s=this.tbItem[this.prevIndex];t.isNullOrUndefined(s)||s.removeAttribute("aria-controls"),t.attributes(i,{"aria-controls":"e-content_"+e})}var n=i.id;this.removeActiveClass(n),i.classList.add("e-active"),i.setAttribute("aria-selected","true");var o=Number(this.extIndex(n));if(t.isNullOrUndefined(this.prevActiveEle)&&(this.prevActiveEle="e-content_"+o),t.attributes(this.element,{"aria-activedescendant":n}),this.isTemplate){if(t.select(".e-content",this.element).children.length>0){var l=this.findEle(t.select(".e-content",this.element).children,"e-content_"+o);t.isNullOrUndefined(l)||l.classList.add("e-active"),this.triggerAnimation(n,this.enableAnimation)}}else{this.cntEle=t.select(".e-tab > .e-content",this.element);var r=this.getTrgContent(this.cntEle,this.extIndex(n));if(t.isNullOrUndefined(r)){this.cntEle.appendChild(this.createElement("div",{id:"e-content_"+this.extIndex(n),className:"e-item e-active",attrs:{role:"tabpanel","aria-labelledby":"e-item_"+this.extIndex(n)}}));var a=this.getTrgContent(this.cntEle,this.extIndex(n)),d=Array.prototype.indexOf.call(this.itemIndexArray,i.id);this.getContent(a,this.items[d].content,"render",d)}else r.classList.add("e-active");this.triggerAnimation(n,this.enableAnimation)}this.setActiveBorder();var h=t.select(".e-tab-header #"+n,this.element);this.refreshItemVisibility(h),this.initRender||h.firstChild.focus();var c={previousItem:this.prevItem,previousIndex:this.prevIndex,selectedItem:i,selectedIndex:e,selectedContent:t.select("#e-content_"+this.selectingID,this.content),isSwiped:this.isSwipeed};this.initRender&&0===this.selectedItem||this.trigger("selected",c)}},i.prototype.setItems=function(e){this.isReplace=!0,this.tbItems=t.select(".e-tab-header ."+J,this.element),this.tbObj.items=this.parseObject(e,0),this.tbObj.dataBind(),this.isReplace=!1},i.prototype.setRTL=function(e){this.tbObj.enableRtl=e,this.tbObj.dataBind(),this.setCssClass(this.element,"e-rtl",e),this.refreshActiveBorder()},i.prototype.refreshActiveBorder=function(){t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.add("e-hidden"),this.setActiveBorder()},i.prototype.showPopup=function(e){var i=t.select(".e-popup.e-toolbar-pop",this.hdrEle);if(i.classList.contains("e-popup-close")){var s=i&&i.ej2_instances[0];s.position.X="Left"===this.headerPlacement?"left":"right",s.dataBind(),s.show(e)}},i.prototype.wireEvents=function(){window.addEventListener("resize",this.resizeContext),t.EventHandler.add(this.element,"mouseover",this.hoverHandler,this),t.EventHandler.add(this.element,"keydown",this.spaceKeyDown,this),t.isNullOrUndefined(this.cntEle)||(this.touchModule=new t.Touch(this.cntEle,{swipe:this.swipeHandler.bind(this)})),this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyHandler.bind(this),keyConfigs:this.keyConfigs}),this.tabKeyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyHandler.bind(this),keyConfigs:{openPopup:"shift+f10",tab:"tab",shiftTab:"shift+tab"},eventName:"keydown"})},i.prototype.unWireEvents=function(){this.keyModule.destroy(),this.tabKeyModule.destroy(),t.isNullOrUndefined(this.cntEle)||this.touchModule.destroy(),window.removeEventListener("resize",this.resizeContext),t.EventHandler.remove(this.element,"mouseover",this.hoverHandler),t.EventHandler.remove(this.element,"keydown",this.spaceKeyDown),this.element.classList.remove("e-rtl"),this.element.classList.remove("e-focused")},i.prototype.clickHandler=function(e){this.element.classList.remove("e-focused");var i=e.originalEvent.target,s=t.closest(i,"."+Z),n=this.getEleIndex(s);i.classList.contains("e-close-icon")?this.removeTab(n):this.isVertical()&&t.closest(i,".e-hor-nav")?this.showPopup(this.show):(this.isPopup=!1,t.isNullOrUndefined(s)||n===this.selectedItem||this.select(n))},i.prototype.swipeHandler=function(e){if(!(e.velocity<3&&t.isNullOrUndefined(e.originalEvent.changedTouches))){if(this.isSwipeed=!0,"Right"===e.swipeDirection&&0!==this.selectedItem){for(var i=this.selectedItem-1;i>=0;i--)if(!this.tbItem[i].classList.contains("e-hidden")){this.select(i);break}}else if("Left"===e.swipeDirection&&this.selectedItem!==t.selectAll("."+Z,this.element).length-1)for(var s=this.selectedItem+1;s<this.tbItem.length;s++)if(!this.tbItem[s].classList.contains("e-hidden")){this.select(s);break}this.isSwipeed=!1}},i.prototype.spaceKeyDown=function(e){if(32===e.keyCode&&32===e.which||35===e.keyCode&&35===e.which){var i=t.closest(e.target,".e-tab-header");t.isNullOrUndefined(i)||e.preventDefault()}},i.prototype.keyHandler=function(e){if(!this.element.classList.contains("e-disable")){this.element.classList.add("e-focused");var i=e.target,s=t.select(".e-tab-header .e-active",this.element);t.selectAll(".e-toolbar-item:not(.e-toolbar-popup)",this.element);switch(this.popEle=t.select(".e-tab-header .e-toolbar-pop",this.element),t.isNullOrUndefined(this.popEle)||(this.popObj=this.popEle.ej2_instances[0]),e.action){case"space":case"enter":if(i.parentElement.classList.contains("e-disable"))return;if("enter"===e.action&&i.classList.contains("e-hor-nav")){this.showPopup(this.show);break}this.keyPressed(i);break;case"tab":case"shiftTab":i.classList.contains("e-tab-wrap")&&!1===t.closest(i,"."+Z).classList.contains("e-active")&&i.setAttribute("tabindex","-1"),this.popObj&&t.isVisible(this.popObj.element)&&this.popObj.hide(this.hide),s.children.item(0).setAttribute("tabindex","0");break;case"moveLeft":case"moveRight":var n=t.closest(document.activeElement,"."+Z);t.isNullOrUndefined(n)||this.refreshItemVisibility(n);break;case"openPopup":e.preventDefault(),!t.isNullOrUndefined(this.popEle)&&this.popEle.classList.contains("e-popup-close")&&this.popObj.show(this.show);break;case"delete":var o=t.closest(i,"."+Z);if(!0===this.showCloseButton&&!t.isNullOrUndefined(o)){var l=o.nextSibling;!t.isNullOrUndefined(l)&&l.classList.contains(Z)&&l.firstChild.focus(),this.removeTab(this.getEleIndex(o))}this.setActiveBorder()}}},i.prototype.refreshActElePosition=function(){var e=t.select(".e-toolbar-item.e-toolbar-popup.e-active",this.element);t.isNullOrUndefined(e)||this.select(this.getEleIndex(e)),this.refreshActiveBorder()},i.prototype.refreshItemVisibility=function(e){var i=t.select("."+this.scrCntClass,this.tbItems);if(!this.isVertical()&&!t.isNullOrUndefined(i)){var s=t.select(".e-hscroll-bar",this.tbItems),n=s.scrollLeft,o=n+s.offsetWidth,l=e.offsetLeft,r=e.offsetWidth,a=e.offsetLeft+e.offsetWidth;if(n<l&&o<a){d=o-l;s.scrollLeft=n+(r-d)}else if(n>l&&o>a){var d=a-n;s.scrollLeft=n-(r-d)}}},i.prototype.hoverHandler=function(e){var i=e.target;!t.isNullOrUndefined(i.classList)&&i.classList.contains("e-close-icon")&&i.setAttribute("title",new t.L10n("tab",{closeButtonTitle:this.title},this.locale).getConstant("closeButtonTitle"))},i.prototype.evalOnPropertyChangeItems=function(e,i){if(e.items instanceof Array&&i.items instanceof Array)if(this.lastIndex=0,t.isNullOrUndefined(this.tbObj))this.reRenderItems();else{this.setItems(e.items),this.templateEle.length>0&&this.expTemplateContent(),this.templateEle=[];for(var s=t.select(".e-tab > .e-content",this.element);s.firstElementChild;)t.detach(s.firstElementChild);this.select(this.selectedItem)}else for(var n=Object.keys(e.items),o=0;o<n.length;o++){var l=parseInt(Object.keys(e.items)[o],10),r=Object.keys(e.items[l])[0],a=Object(i.items[l])[r],d=Object(e.items[l])[r],h=t.select(".e-toolbar-items #e-item_"+l,this.element),c=t.select(".e-content #e-content_"+l,this.element);if("header"===r||"headerTemplate"===r){var p=t.isNullOrUndefined(this.items[l].header)||t.isNullOrUndefined(this.items[l].header.iconCss)?"":this.items[l].header.iconCss;if(""===(this.items[l].headerTemplate||this.items[l].header.text)&&""===p)this.removeTab(l);else{var u=[];u.push(this.items[l]),this.items.splice(l,1),this.itemIndexArray.splice(l,1),this.tbObj.items.splice(l,1);var f=h.classList.contains("e-hidden");t.detach(h),this.isReplace=!0,this.addTab(u,l),f&&this.hideTab(l),this.isReplace=!1}}if("content"===r&&!t.isNullOrUndefined(c))if(("string"==typeof d||t.isNullOrUndefined(d.innerHTML))&&("."===d[0]||"#"===d[0])&&d.length){var m=document.querySelector(d);c.appendChild(m),m.style.display=""}else""===d&&"#"===a[0]?(document.body.appendChild(this.element.querySelector(a)).style.display="none",c.innerHTML=d):c.innerHTML=d;"cssClass"===r&&(t.isNullOrUndefined(h)||(h.classList.remove(a),h.classList.add(d)),t.isNullOrUndefined(c)||(c.classList.remove(a),c.classList.add(d))),"disabled"===r&&this.enableTab(l,!0!==d)}},i.prototype.enableTab=function(e,i){var s=t.selectAll("."+Z,this.element)[e];t.isNullOrUndefined(s)||(!0===i?(s.classList.remove("e-disable","e-overlay"),s.firstChild.setAttribute("tabindex","-1")):(s.classList.add("e-disable","e-overlay"),s.firstChild.removeAttribute("tabindex"),s.classList.contains("e-active")&&this.select(e+1)),t.isNullOrUndefined(this.items[e])||(this.items[e].disabled=!i,this.dataBind()),s.setAttribute("aria-disabled",!0===i?"false":"true"))},i.prototype.addTab=function(e,t){var i=this,s={addedItems:e,cancel:!1};this.isReplace?this.addingTabContent(e,t):this.trigger("adding",s,function(s){s.cancel||i.addingTabContent(e,t)})},i.prototype.addingTabContent=function(e,i){var s=this,n=0;if(this.hdrEle=t.select(".e-tab-header",this.element),t.isNullOrUndefined(this.hdrEle))this.items=e,this.reRenderItems();else{var o=t.selectAll("."+Z,this.element).length;if(0!==o&&(n=this.lastIndex+1),t.isNullOrUndefined(i)&&(i=o-1),o<i||i<0||isNaN(i))return;0!==o||t.isNullOrUndefined(this.hdrEle)||(this.hdrEle.style.display=""),t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.add("e-hidden"),this.tbItems=t.select(".e-tab-header ."+J,this.element),this.isAdd=!0;var l=this.parseObject(e,i);this.isAdd=!1;var r,a=0;e.forEach(function(e,o){if(r=e.headerTemplate||e.header.text,t.isNullOrUndefined(e.headerTemplate||e.header)||t.isNullOrUndefined(r)||0===r.length&&t.isNullOrUndefined(e.header.iconCss)||(s.items.splice(i+a,0,e),a++),s.isTemplate&&!t.isNullOrUndefined(e.header)&&!t.isNullOrUndefined(e.header.text)){var l=n+o,d=s.createElement("div",{id:"e-content_"+l,className:"e-item",attrs:{role:"tabpanel","aria-labelledby":"e-item_"+l}});s.cntEle.insertBefore(d,s.cntEle.children[i+o]);var h=s.getTrgContent(s.cntEle,l.toString());s.getContent(h,e.content,"render",i)}}),this.tbObj.addItems(l,i),this.isReplace||this.trigger("added",{addedItems:e}),this.selectedItem===i?this.select(i):this.setActiveBorder()}},i.prototype.removeTab=function(e){var i=this,s=t.selectAll("."+Z,this.element)[e];if(!t.isNullOrUndefined(s)){var n={removedItem:s,removedIndex:e,cancel:!1};this.trigger("removing",n,function(n){if(!n.cancel){i.tbObj.removeItems(e),i.items.splice(e,1),i.itemIndexArray.splice(e,1),i.refreshActiveBorder();var o=t.select("#e-content_"+i.extIndex(s.id),t.select(".e-content",i.element));t.isNullOrUndefined(o)||t.detach(o),i.trigger("removed",n),s.classList.contains("e-active")&&(e=e>t.selectAll(".e-toolbar-item:not(.e-toolbar-popup)",i.element).length-1?e-1:e,i.enableAnimation=!1,i.selectedItem=e,i.select(e)),0===t.selectAll("."+Z,i.element).length&&(i.hdrEle.style.display="none"),i.enableAnimation=!0}})}},i.prototype.hideTab=function(e,i){var s,n=t.selectAll("."+Z,this.element)[e];if(!t.isNullOrUndefined(n)){if(t.isNullOrUndefined(i)&&(i=!0),this.bdrLine.classList.add("e-hidden"),!0===i)if(n.classList.add("e-hidden"),0!==(s=t.selectAll(".e-toolbar-item:not(.e-hidden)",this.tbItems)).length&&n.classList.contains("e-active")){if(0!==e)for(var o=e-1;o>=0;o--){if(!this.tbItem[o].classList.contains("e-hidden")){this.select(o);break}if(0===o)for(l=e+1;l<this.tbItem.length;l++)if(!this.tbItem[l].classList.contains("e-hidden")){this.select(l);break}}else for(var l=e+1;l<this.tbItem.length;l++)if(!this.tbItem[l].classList.contains("e-hidden")){this.select(l);break}}else 0===s.length&&this.element.classList.add("e-hidden");else this.element.classList.remove("e-hidden"),0===(s=t.selectAll(".e-toolbar-item:not(.e-hidden)",this.tbItems)).length&&this.select(e),n.classList.remove("e-hidden");this.setActiveBorder(),n.setAttribute("aria-hidden",""+i)}},i.prototype.select=function(e){var i=this;this.tbItems=t.select(".e-tab-header ."+J,this.element),this.tbItem=t.selectAll(".e-tab-header ."+Z,this.element),this.content=t.select(".e-content",this.element),this.prevItem=this.tbItem[this.prevIndex],t.isNullOrUndefined(this.selectedItem)||this.selectedItem<0||this.tbItem.length<=this.selectedItem||isNaN(this.selectedItem)?this.selectedItem=0:this.selectedID=this.extIndex(this.tbItem[this.selectedItem].id);var s=this.tbItem[e];t.isNullOrUndefined(s)?this.selectedID="0":this.selectingID=this.extIndex(s.id),t.isNullOrUndefined(this.prevItem)||this.prevItem.classList.contains("e-disable")||this.prevItem.children.item(0).setAttribute("tabindex","-1");var n={previousItem:this.prevItem,previousIndex:this.prevIndex,selectedItem:this.tbItem[this.selectedItem],selectedIndex:this.selectedItem,selectedContent:t.isNullOrUndefined(this.content)?null:t.select("#e-content_"+this.selectedID,this.content),selectingItem:s,selectingIndex:e,selectingContent:t.isNullOrUndefined(this.content)?null:t.select("#e-content_"+this.selectingID,this.content),isSwiped:this.isSwipeed,cancel:!1};this.initRender&&0===this.selectedItem?this.selectingContent(e):this.trigger("selecting",n,function(t){t.cancel||i.selectingContent(e)})},i.prototype.selectingContent=function(e){if("number"==typeof e){if(!t.isNullOrUndefined(this.tbItem[e])&&this.tbItem[e].classList.contains("e-disable"))for(var i=e+1;i<this.items.length;i++){if(!1===this.items[i].disabled){e=i;break}e=0}this.tbItem.length>e&&e>=0&&!isNaN(e)?(this.prevIndex=this.selectedItem,this.tbItem[e].classList.contains($)?this.setActive(this.popupHandler(this.tbItem[e])):this.setActive(e)):this.setActive(0)}else e instanceof HTMLElement&&this.setActive(this.getEleIndex(e))},i.prototype.disable=function(e){this.setCssClass(this.element,"e-disable",e),this.element.setAttribute("aria-disabled",""+e)},i.prototype.getPersistData=function(){return this.addOnPersist(["selectedItem","actEleId"])},i.prototype.getModuleName=function(){return"tab"},i.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"width":t.setStyleAttribute(this.element,{width:t.formatUnit(e.width)});break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)}),this.setContentHeight(!1);break;case"cssClass":""!==i.cssClass?(this.setCssClass(this.element,i.cssClass,!1),this.setCssClass(this.element,e.cssClass,!0)):this.setCssClass(this.element,e.cssClass,!0);break;case"items":this.evalOnPropertyChangeItems(e,i);break;case"showCloseButton":this.setCloseButton(e.showCloseButton);break;case"selectedItem":this.selectedItem=i.selectedItem,this.select(e.selectedItem);break;case"headerPlacement":this.changeOrientation(e.headerPlacement);break;case"enableRtl":this.setRTL(e.enableRtl);break;case"overflowMode":this.tbObj.overflowMode=e.overflowMode,this.tbObj.dataBind(),this.refreshActElePosition();break;case"heightAdjustMode":this.setContentHeight(!1),this.select(this.selectedItem);break;case"scrollStep":this.tbObj&&(this.tbObj.scrollStep=this.scrollStep)}},X([t.Collection([],se)],i.prototype,"items",void 0),X([t.Property("100%")],i.prototype,"width",void 0),X([t.Property("auto")],i.prototype,"height",void 0),X([t.Property("")],i.prototype,"cssClass",void 0),X([t.Property(0)],i.prototype,"selectedItem",void 0),X([t.Property("Top")],i.prototype,"headerPlacement",void 0),X([t.Property("Content")],i.prototype,"heightAdjustMode",void 0),X([t.Property("Scrollable")],i.prototype,"overflowMode",void 0),X([t.Property(!1)],i.prototype,"enablePersistence",void 0),X([t.Property(!1)],i.prototype,"showCloseButton",void 0),X([t.Property()],i.prototype,"scrollStep",void 0),X([t.Complex({},te)],i.prototype,"animation",void 0),X([t.Event()],i.prototype,"created",void 0),X([t.Event()],i.prototype,"adding",void 0),X([t.Event()],i.prototype,"added",void 0),X([t.Event()],i.prototype,"selecting",void 0),X([t.Event()],i.prototype,"selected",void 0),X([t.Event()],i.prototype,"removing",void 0),X([t.Event()],i.prototype,"removed",void 0),X([t.Event()],i.prototype,"destroyed",void 0),i=X([t.NotifyPropertyChanges],i)}(t.Component),oe=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),le=function(e,t,i,s){var n,o=arguments.length,l=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(o<3?n(l):o>3?n(t,i,l):n(t,i))||l);return o>3&&l&&Object.defineProperty(t,i,l),l},re="e-treeview",ae="e-icon-collapsible",de="e-icon-expandable",he="e-list-item",ce="e-list-text",pe="e-list-parent",ue="e-hover",fe="e-active",me="e-icons-spinner",ve="e-process",ge="e-icons",ye="e-text-content",be="e-sibling",Ce="e-drop-next",Ne="e-check",Ee="e-checkbox-wrapper",xe="e-node-focus",Oe={treeRole:"tree",itemRole:"treeitem",listRole:"group",itemText:"",wrapperRole:""},we=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return oe(i,e),le([t.Property("child")],i.prototype,"child",void 0),le([t.Property([])],i.prototype,"dataSource",void 0),le([t.Property("expanded")],i.prototype,"expanded",void 0),le([t.Property("hasChildren")],i.prototype,"hasChildren",void 0),le([t.Property("htmlAttributes")],i.prototype,"htmlAttributes",void 0),le([t.Property("iconCss")],i.prototype,"iconCss",void 0),le([t.Property("id")],i.prototype,"id",void 0),le([t.Property("imageUrl")],i.prototype,"imageUrl",void 0),le([t.Property("isChecked")],i.prototype,"isChecked",void 0),le([t.Property("parentID")],i.prototype,"parentID",void 0),le([t.Property(null)],i.prototype,"query",void 0),le([t.Property("selected")],i.prototype,"selected",void 0),le([t.Property(null)],i.prototype,"tableName",void 0),le([t.Property("text")],i.prototype,"text",void 0),le([t.Property("tooltip")],i.prototype,"tooltip",void 0),le([t.Property("navigateUrl")],i.prototype,"navigateUrl",void 0),i}(t.ChildProperty),ke=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return oe(i,e),le([t.Property("SlideDown")],i.prototype,"effect",void 0),le([t.Property(400)],i.prototype,"duration",void 0),le([t.Property("linear")],i.prototype,"easing",void 0),i}(t.ChildProperty),Se=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return oe(i,e),le([t.Complex({effect:"SlideUp",duration:400,easing:"linear"},ke)],i.prototype,"collapse",void 0),le([t.Complex({effect:"SlideDown",duration:400,easing:"linear"},ke)],i.prototype,"expand",void 0),i}(t.ChildProperty),Le=function(e){function r(t,i){var s=e.call(this,t,i)||this;return s.preventExpand=!1,s.checkedElement=[],s.disableNode=[],s.parentNodeCheck=[],s.expandChildren=[],s.mouseDownStatus=!1,s}oe(r,e),a=r,r.prototype.getModuleName=function(){return"treeview"},r.prototype.preRender=function(){var e=this;this.checkActionNodes=[],this.dragStartAction=!1,this.isAnimate=!1,this.keyConfigs={escape:"escape",end:"end",enter:"enter",f2:"f2",home:"home",moveDown:"downarrow",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",ctrlDown:"ctrl+downarrow",ctrlUp:"ctrl+uparrow",ctrlEnter:"ctrl+enter",ctrlHome:"ctrl+home",ctrlEnd:"ctrl+end",ctrlA:"ctrl+A",shiftDown:"shift+downarrow",shiftUp:"shift+uparrow",shiftEnter:"shift+enter",shiftHome:"shift+home",shiftEnd:"shift+end",csDown:"ctrl+shift+downarrow",csUp:"ctrl+shift+uparrow",csEnter:"ctrl+shift+enter",csHome:"ctrl+shift+home",csEnd:"ctrl+shift+end",space:"space"},this.listBaseOption={expandCollapse:!0,showIcon:!0,expandIconClass:de,ariaAttributes:Oe,expandIconPosition:"Left",itemCreated:function(t){e.beforeNodeCreate(t)}},this.updateListProp(this.fields),this.aniObj=new t.Animation({}),this.treeList=[],this.isLoaded=!1,this.isInitalExpand=!1,this.expandChildren=[],this.index=0,this.setTouchClass(),t.isNullOrUndefined(this.selectedNodes)&&this.setProperties({selectedNodes:[]},!0),t.isNullOrUndefined(this.checkedNodes)&&this.setProperties({checkedNodes:[]},!0),t.isNullOrUndefined(this.expandedNodes)?this.setProperties({expandedNodes:[]},!0):this.isInitalExpand=!0},r.prototype.getPersistData=function(){var e=["selectedNodes","checkedNodes","expandedNodes"];return this.addOnPersist(e)},r.prototype.render=function(){this.initialRender=!0,this.initialize(),this.setDataBinding(),this.setExpandOnType(),this.setRipple(),this.wireEditingEvents(this.allowEditing),this.setDragAndDrop(this.allowDragAndDrop),this.wireEvents(),this.initialRender=!1,this.renderComplete()},r.prototype.initialize=function(){this.element.setAttribute("role","tree"),this.element.setAttribute("tabindex","0"),this.element.setAttribute("aria-activedescendant",this.element.id+"_active"),this.isBlazorPlatform=t.isBlazor(),this.setCssClass(null,this.cssClass),this.setEnableRtl(),this.setFullRow(this.fullRowSelect),this.nodeTemplateFn=this.templateComplier(this.nodeTemplate)},r.prototype.setEnableRtl=function(){this.enableRtl?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},r.prototype.setRipple=function(){var e={selector:".e-fullrow,.e-text-content",ignore:"."+ye+" > ."+ge+",.e-input-group,.e-input, ."+Ee};this.rippleFn=t.rippleEffect(this.element,e);var i={selector:"."+ye+" > ."+ge,isCenterRipple:!0};this.rippleIconFn=t.rippleEffect(this.element,i)},r.prototype.setFullRow=function(e){e?t.addClass([this.element],"e-fullrow-wrap"):t.removeClass([this.element],"e-fullrow-wrap")},r.prototype.setMultiSelect=function(e){var i=t.select("."+pe,this.element);e?i.setAttribute("aria-multiselectable","true"):i.removeAttribute("aria-multiselectable")},r.prototype.templateComplier=function(e){if(e)try{if(document.querySelectorAll(e).length)return t.compile(document.querySelector(e).innerHTML.trim())}catch(i){return t.compile(e)}},r.prototype.setDataBinding=function(){var e=this;this.treeList.push("false"),this.fields.dataSource instanceof o.DataManager?this.fields.dataSource.ready?this.fields.dataSource.ready.then(function(t){e.fields.dataSource instanceof o.DataManager&&e.fields.dataSource.dataSource.offline&&(e.treeList.pop(),e.treeData=t.result,e.isNumberTypeId=e.getType(),e.setRootData(),e.renderItems(!0),0!==e.treeList.length||e.isLoaded||e.finalize())}):this.fields.dataSource.executeQuery(this.getQuery(this.fields)).then(function(t){e.treeList.pop(),e.treeData=t.result,e.isNumberTypeId=e.getType(),e.setRootData(),e.renderItems(!0),0!==e.treeList.length||e.isLoaded||e.finalize()}):(this.treeList.pop(),t.isNullOrUndefined(this.fields.dataSource)?this.rootData=this.treeData=[]:(this.treeData=JSON.parse(JSON.stringify(this.fields.dataSource)),this.setRootData()),this.isNumberTypeId=this.getType(),this.renderItems(!1)),0!==this.treeList.length||this.isLoaded||this.finalize()},r.prototype.getQuery=function(e,s){void 0===s&&(s=null);var n,l=[];if(e.query)n=e.query.clone();else{n=new o.Query;for(var r=this.getActualProperties(e),a=0,d=Object.keys(r);a<d.length;a++){var h=d[a];"dataSource"!==h&&"tableName"!==h&&"child"!==h&&e[h]&&-1===l.indexOf(e[h])&&l.push(e[h])}n.select(l),r.hasOwnProperty("tableName")&&n.from(e.tableName)}return i.ListBase.addSorting(this.sortOrder,e.text,n),t.isNullOrUndefined(s)||t.isNullOrUndefined(e.parentID)||n.where(e.parentID,"equal",this.isNumberTypeId?parseFloat(s):s),n},r.prototype.getType=function(){return!!this.treeData[0]&&"number"==typeof t.getValue(this.fields.id,this.treeData[0])},r.prototype.setRootData=function(){if(this.dataType=this.getDataType(this.treeData,this.fields),1===this.dataType){this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID);var e=this.getChildNodes(this.treeData,void 0,!0);t.isNullOrUndefined(e)?this.rootData=[]:this.rootData=e}else this.rootData=this.treeData},r.prototype.renderItems=function(e){if(this.listBaseOption.ariaAttributes.level=1,this.ulElement=i.ListBase.createList(this.createElement,e?this.rootData:this.getSortedData(this.rootData),this.listBaseOption),this.element.appendChild(this.ulElement),!1===this.loadOnDemand)for(var t=this.ulElement.querySelectorAll(".e-list-item"),s=0;s<t.length;)this.renderChildNodes(t[s],!0,null,!0),s++;else this.finalizeNode(this.element);this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate(),this.parentNodeCheck=[],this.parentCheckData=[],this.updateCheckedStateFromDS(),this.autoCheck&&this.showCheckBox&&!this.isLoaded&&this.updateParentCheckState()},r.prototype.updateCheckedStateFromDS=function(e){if(this.treeData&&this.showCheckBox)if(1===this.dataType){for(var i=this.fields,s=new o.DataManager(this.treeData).executeLocal((new o.Query).where(i.isChecked,"equal",!0,!1)),n=0;n<s.length;n++){var l=s[n][this.fields.id]?s[n][this.fields.id].toString():null;s[n][this.fields.parentID]&&s[n][this.fields.parentID].toString();if(-1!==this.checkedNodes.indexOf(l)||this.isLoaded||this.checkedNodes.push(l),s[n][this.fields.hasChildren])for(var r=s[n][this.fields.id],a=new o.DataManager(this.treeData).executeLocal((new o.Query).where(i.parentID,"equal",r,!1)),d=0;d<a.length;d++){var h=a[d][this.fields.id]?a[d][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(h)&&this.autoCheck&&this.checkedNodes.push(h)}}for(n=0;n<this.checkedNodes.length;n++){var c=this.fields,p=new o.DataManager(this.treeData).executeLocal((new o.Query).where(c.id,"equal",this.checkedNodes[n],!0));p[0]&&this.autoCheck&&(this.getCheckedNodeDetails(c,p),this.checkIndeterminateState(p[0]));for(var u=new o.DataManager(this.treeData).executeLocal((new o.Query).where(c.parentID,"equal",this.checkedNodes[n],!0)),f=0;f<u.length;f++){var m=u[f][this.fields.id]?u[f][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(m)&&this.autoCheck&&this.checkedNodes.push(m)}}}else if(2===this.dataType||this.fields.dataSource instanceof o.DataManager&&this.fields.dataSource.dataSource.offline||this.fields.dataSource instanceof o.DataManager&&!this.loadOnDemand)for(f=0;f<this.treeData.length;f++){var v=this.treeData[f][this.fields.id]?this.treeData[f][this.fields.id].toString():"";this.treeData[f][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(v)&&this.checkedNodes.push(v);var g=t.getValue(this.fields.child.toString(),this.treeData[f]);g&&this.updateChildCheckState(g,this.treeData[f])}},r.prototype.getCheckedNodeDetails=function(e,i){var s=i[0][this.fields.parentID]?i[0][this.fields.parentID].toString():null,n=0,l=this.element.querySelector('[data-uid="'+i[0][this.fields.id]+'"]'),r=this.element.querySelector('[data-uid="'+i[0][this.fields.parentID]+'"]');if(l||r)r&&(t.select("."+Ne,r)||this.changeState(r,"indeterminate",null,!0,!0));else{this.parentNodeCheck.length;-1===this.parentNodeCheck.indexOf(s)&&this.parentNodeCheck.push(s);for(var a=this.getChildNodes(this.treeData,s),d=0;d<a.length;d++){var h=a[d][this.fields.id]?a[d][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(h)&&n++,n===a.length&&-1===this.checkedNodes.indexOf(s)&&this.checkedNodes.push(s)}var c=new o.DataManager(this.treeData).executeLocal((new o.Query).where(e.id,"equal",s,!0));this.getCheckedNodeDetails(e,c)}},r.prototype.updateParentCheckState=function(){for(var e,i=t.selectAll(".e-stop",this.element),s=0;s<i.length;s++){var n=t.closest(i[s],"."+he),o=this.getTreeData(n),l=o[0][this.fields.id].toString(),r=0;if(e=1===this.dataType?this.getChildNodes(this.treeData,l):t.getValue(this.fields.child.toString(),o[0])){for(var a=0;a<e.length;a++){var d=e[a][this.fields.id].toString();-1!==this.checkedNodes.indexOf(d)&&r++}if(r===e.length){var h=n.getAttribute("data-uid");-1===this.checkedNodes.indexOf(h)&&this.checkedNodes.push(h),this.changeState(n,"check",null,!0,!0)}else 0===r&&0===this.checkedNodes.length&&this.changeState(n,"uncheck",null,!0,!0)}}},r.prototype.checkIndeterminateState=function(e){var t;if(t=1===this.dataType?this.element.querySelector('[data-uid="'+e[this.fields.parentID]+'"]'):this.element.querySelector('[data-uid="'+e[this.fields.id]+'"]'))"true"!==t.querySelector("."+Ee).getAttribute("aria-checked")&&this.changeState(t,"indeterminate",null,!0,!0);else if(2===this.dataType){this.parentNodeCheck.length;-1===this.parentNodeCheck.indexOf(e[this.fields.id].toString())&&this.parentNodeCheck.push(e[this.fields.id].toString())}},r.prototype.updateChildCheckState=function(e,i){for(var s=0,n=i[this.fields.id]?i[this.fields.id].toString():"",o=0;o<e.length;o++){var l=e[o][this.fields.id]?e[o][this.fields.id].toString():"";e[o][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(l)&&this.checkedNodes.push(l),-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(l)&&this.autoCheck&&this.checkedNodes.push(l),-1!==this.checkedNodes.indexOf(l)&&this.autoCheck&&s++;var r=t.getValue(this.fields.child.toString(),e[o]);r&&(this.parentCheckData.push(i),this.updateChildCheckState(r,e[o])),s===e.length&&this.autoCheck&&-1===this.checkedNodes.indexOf(n)&&this.checkedNodes.push(n)}if(0!==s&&this.autoCheck){this.checkIndeterminateState(i);for(var a=0;a<this.parentCheckData.length;a++)i!==this.parentCheckData[a]&&this.parentCheckData[a]&&this.checkIndeterminateState(this.parentCheckData[a])}this.parentCheckData=[]},r.prototype.beforeNodeCreate=function(e){if(this.showCheckBox){var i=n.createCheckBox(this.createElement,!0,{cssClass:this.touchClass});i.setAttribute("role","checkbox");var s=t.select("div."+ge,e.item),o=e.item.getAttribute("data-uid");e.item.childNodes[0].insertBefore(i,e.item.childNodes[0].childNodes[t.isNullOrUndefined(s)?0:1]);var l=t.getValue(e.fields.isChecked,e.curData);this.checkedNodes.indexOf(o)>-1?(t.select(".e-frame",i).classList.add(Ne),i.setAttribute("aria-checked","true"),this.addCheck(e.item)):t.isNullOrUndefined(l)||"true"!==l.toString()?i.setAttribute("aria-checked","false"):(t.select(".e-frame",i).classList.add(Ne),i.setAttribute("aria-checked","true"),this.addCheck(e.item));var r=t.select(".e-frame",i);t.EventHandler.add(r,"mousedown",this.frameMouseHandler,this),t.EventHandler.add(r,"mouseup",this.frameMouseHandler,this)}this.fullRowSelect&&this.createFullRow(e.item),this.allowMultiSelection&&!e.item.classList.contains("e-selected")&&e.item.setAttribute("aria-selected","false");var a=e.fields;if(this.addActionClass(e,a.selected,"e-selected"),this.addActionClass(e,a.expanded,"e-expanded"),!t.isNullOrUndefined(this.nodeTemplateFn)){var d=e.item.querySelector("."+ce);d.innerHTML="";var h=this.nodeTemplateFn(e.curData,void 0,void 0,this.element.id+"nodeTemplate",this.isStringTemplate);h=Array.prototype.slice.call(h),t.append(h,d)}var c={node:e.item,nodeData:e.curData,text:e.text};this.trigger("drawNode",c)},r.prototype.frameMouseHandler=function(e){var i=t.select(".e-ripple-container",e.target.parentElement);n.rippleMouseHandler(e,i)},r.prototype.addActionClass=function(e,i,s){var n=e.curData,o=t.getValue(i,n);t.isNullOrUndefined(o)||"false"===o.toString()||e.item.classList.add(s)},r.prototype.getDataType=function(e,i){if(this.fields.dataSource instanceof o.DataManager){for(s=0;s<e.length;s++)if("string"==typeof i.child&&t.isNullOrUndefined(t.getValue(i.child,e[s])))return 1;return 2}for(var s=0,n=e.length;s<n;s++){if("string"==typeof i.child&&!t.isNullOrUndefined(t.getValue(i.child,e[s])))return 2;if(!t.isNullOrUndefined(t.getValue(i.parentID,e[s]))||!t.isNullOrUndefined(t.getValue(i.hasChildren,e[s])))return 1}return 1},r.prototype.getGroupedData=function(e,t){for(var s=(new o.Query).group(t),n=i.ListBase.getDataSource(e,s),l=[],r=0;r<n.length;r++){var a=n[r].items;l.push(a)}return l},r.prototype.getSortedData=function(e){return e&&"None"!==this.sortOrder&&(e=i.ListBase.getDataSource(e,i.ListBase.addSorting(this.sortOrder,this.fields.text))),e},r.prototype.finalizeNode=function(e){for(var i=t.selectAll(".e-list-img",e),s=0;s<i.length;s++)i[s].setAttribute("alt","e-list-img");if(this.isLoaded){for(var n=t.selectAll(".e-selected",e),o=0;o<n.length;o++){this.selectNode(n[o],null);break}t.removeClass(n,"e-selected")}for(var l=t.selectAll(".e-list-item:not(.e-expanded)",e),r=0;r<l.length;r++){var a=t.select("div."+ge,l[r]);a&&a.classList.contains(de)&&this.disableExpandAttr(l[r])}var d=t.selectAll(".e-expanded",e);if(!this.isInitalExpand)for(o=0;o<d.length;o++)this.renderChildNodes(d[o]);t.removeClass(d,"e-expanded"),this.updateList(),this.isLoaded&&this.updateCheckedProp()},r.prototype.updateCheckedProp=function(){if(this.showCheckBox){var e=[].concat([],this.checkedNodes);this.setProperties({checkedNodes:e},!0)}},r.prototype.ensureIndeterminate=function(){if(this.autoCheck)for(var e=t.selectAll("li",this.element),i=0;i<e.length;i++)e[i].classList.contains(he)&&(t.select("."+pe,e[i])?this.ensureParentCheckState(e[i]):this.ensureChildCheckState(e[i]));else for(var s=t.selectAll(".e-stop",this.element),i=0;i<s.length;i++)s[i].classList.remove("e-stop")},r.prototype.ensureParentCheckState=function(e){if(!t.isNullOrUndefined(e)){if(e.classList.contains(re))return;var i=e;e.classList.contains(he)&&(i=t.select("."+pe,e));var s=t.selectAll("."+Ne,i),n=t.selectAll(".e-stop",i),o=t.selectAll("."+he,i),l=e.getElementsByClassName(Ee)[0];o.length===s.length?this.changeState(l,"check",null,!0,!0):s.length>0||n.length>0?this.changeState(l,"indeterminate",null,!0,!0):0===s.length&&this.changeState(l,"uncheck",null,!0,!0);var r=t.closest(e,"."+pe);if(!t.isNullOrUndefined(r)){var a=t.closest(r,"."+he);this.ensureParentCheckState(a)}}},r.prototype.ensureChildCheckState=function(e,i){if(!t.isNullOrUndefined(e)){var s=t.select("."+pe,e),n=void 0;if(!t.isNullOrUndefined(s)){n=t.selectAll("."+Ee,s);for(var o=e.getElementsByClassName("e-frame")[0].classList.contains(Ne),l=e.getElementsByClassName("e-frame")[0].classList.contains("e-stop"),r=s.querySelectorAll("li"),a=(s.parentElement.getAttribute("aria-expanded"),void 0),d=0;d<n.length;d++){if(t.isNullOrUndefined(this.currentLoadData)||t.isNullOrUndefined(t.getValue(this.fields.isChecked,this.currentLoadData[d]))){var h=n[d].getElementsByClassName("e-frame")[0].classList.contains(Ne),c=r[d].getAttribute("data-uid");o?a="check":h&&!this.isLoaded?a="check":-1!==this.checkedNodes.indexOf(c)&&this.isLoaded&&(l||o)?a="check":r[d].classList.contains("e-has-child")&&!t.isUndefined(this.parentNodeCheck)&&this.autoCheck&&(o||l)&&-1!==this.parentNodeCheck.indexOf(c)?(a="indeterminate",this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(c),1)):1===this.dataType&&!t.isUndefined(this.parentNodeCheck)&&this.autoCheck&&(o||l)&&-1!==this.parentNodeCheck.indexOf(c)?(a="indeterminate",this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(c),1)):a="uncheck"}else a=t.getValue(this.fields.isChecked,this.currentLoadData[d])?"check":"uncheck",-1!==this.ele&&(a=o?"check":"uncheck");this.changeState(n[d],a,i,!0,!0)}}this.autoCheck&&this.isLoaded&&this.updateParentCheckState()}},r.prototype.doCheckBoxAction=function(e,i){t.selectAll("."+he,this.element);if(t.isNullOrUndefined(e)){var s=t.selectAll("."+Ee,this.element);if(this.loadOnDemand)for(n=0;n<s.length;n++)this.updateFieldChecked(s[n],i),this.changeState(s[n],i?"check":"uncheck",null,null,null,i);else for(var n=0;n<s.length;n++)this.updateFieldChecked(s[n],i),this.changeState(s[n],i?"check":"uncheck")}else for(var o=e.length;o>=0;o--){var l=void 0;if(l=1===e.length?this.getElement(e[o-1]):this.getElement(e[o]),t.isNullOrUndefined(l)){p=void 0;if(""!==(p=e[o-e.length]?e[o-e.length].toString():e[o]?e[o].toString():null)&&i&&p)this.setValidCheckedNode(p),this.dynamicCheckState(p,i);else if(-1!==this.checkedNodes.indexOf(p)&&""!==p&&!i){this.checkedNodes.splice(this.checkedNodes.indexOf(p),1);var r=this.getChildNodes(this.treeData,p);if(r){for(var a=0;a<r.length;a++){var d=r[a][this.fields.id]?r[a][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(d)&&this.checkedNodes.splice(this.checkedNodes.indexOf(d),1)}-1!==this.parentNodeCheck.indexOf(p)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(p),1)}p&&this.dynamicCheckState(p,i),this.updateField(this.treeData,this.fields,p,"isChecked",null)}}else{var h=t.select(".e-list-parent ."+Ee,l);this.validateCheckNode(h,!i,l,null)}}if(e)for(var c=0;c<e.length;c++){var p=e[c]?e[c].toString():"";i||this.updateField(this.treeData,this.fields,p,"isChecked",null)}this.autoCheck&&this.updateParentCheckState()},r.prototype.updateFieldChecked=function(e,i){var s=t.closest(e,"."+he),n=s.getAttribute("data-uid");"true"!==this.getNodeData(s).isChecked||i||this.updateField(this.treeData,this.fields,n,"isChecked",null)},r.prototype.dynamicCheckState=function(e,i){if(1===this.dataType){var s=0,n=new o.DataManager(this.treeData).executeLocal((new o.Query).where(this.fields.id,"equal",e,!0));if(n[0]){var l=n[0][this.fields.id]?n[0][this.fields.id].toString():null,r=n[0][this.fields.parentID]?n[0][this.fields.parentID].toString():null,a=((p=this.element.querySelector('[data-uid="'+r+'"]'))&&t.select(".e-stop",p),p?t.select("."+Ne,p):null),d=this.element.querySelector('[data-uid="'+l+'"]'),h=this.getChildNodes(this.treeData,r);if(h)for(u=0;u<h.length;u++){var c=h[u][this.fields.id]?h[u][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(c)&&s++}-1!==this.checkedNodes.indexOf(e)&&p&&l===e&&this.autoCheck?this.changeState(p,"indeterminate",null):-1===this.checkedNodes.indexOf(e)&&d&&l===e&&!i?this.changeState(d,"uncheck",null):-1!==this.checkedNodes.indexOf(e)&&d&&l===e&&i?this.changeState(d,"check",null):-1===this.checkedNodes.indexOf(e)&&!d&&p&&l===e&&this.autoCheck&&0!==s?this.changeState(p,"indeterminate",null):-1===this.checkedNodes.indexOf(e)&&!d&&p&&l===e&&this.autoCheck&&0===s?this.changeState(p,"uncheck",null):d||p||l!==e||!this.autoCheck||this.updateIndeterminate(e,i)}}else if(2===this.dataType||this.fields.dataSource instanceof o.DataManager&&this.fields.dataSource.dataSource.offline||this.fields.dataSource instanceof o.DataManager&&!this.loadOnDemand)for(var l=void 0,p=void 0,a=void 0,u=0;u<this.treeData.length;u++){l=this.treeData[u][this.fields.id]?this.treeData[u][this.fields.id].toString():"",a=(p=this.element.querySelector('[data-uid="'+l+'"]'))?t.select("."+Ne,p):null,-1===this.checkedNodes.indexOf(l)&&p&&a&&!i&&this.changeState(p,"uncheck",null);var f=t.getValue(this.fields.child.toString(),this.treeData[u]);f&&this.updateChildIndeterminate(f,l,e,i,l)}},r.prototype.updateIndeterminate=function(e,t){var i,s=this.getTreeData(e),n=0;1===this.dataType&&(i=s[0][this.fields.parentID]?s[0][this.fields.parentID].toString():null);var o=this.getChildNodes(this.treeData,i);if(o)for(var l=0;l<o.length;l++){var r=o[l][this.fields.id]?o[l][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(r)&&n++}var a=this.element.querySelector('[data-uid="'+i+'"]');a&&t?this.changeState(a,"indeterminate",null):!t&&a&&-1===this.parentNodeCheck.indexOf(i)&&0!==n?this.changeState(a,"indeterminate",null):!t&&a&&-1===this.parentNodeCheck.indexOf(i)&&0===n?this.changeState(a,"uncheck",null):a||(t||-1!==this.checkedNodes.indexOf(i)||-1===this.parentNodeCheck.indexOf(i)?t&&-1===this.checkedNodes.indexOf(i)&&-1===this.parentNodeCheck.indexOf(i)?this.parentNodeCheck.push(i):t||-1===this.checkedNodes.indexOf(i)||-1!==this.parentNodeCheck.indexOf(i)||0===n||this.parentNodeCheck.push(i):this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(i),1),this.updateIndeterminate(i,t),-1===this.checkedNodes.indexOf(i)||t||this.checkedNodes.splice(this.checkedNodes.indexOf(i),1))},r.prototype.updateChildIndeterminate=function(e,i,s,n,o){for(var l=0,r=0;r<e.length;r++){var a=e[r][this.fields.id]?e[r][this.fields.id].toString():"";-1!==this.checkedNodes.indexOf(a)&&l++;var d=this.element.querySelector('[data-uid="'+i+'"]'),h=d?t.select(".e-stop",d):null,c=d?t.select("."+Ne,d):null,p=this.element.querySelector('[data-uid="'+a+'"]'),u=p?t.select("."+Ne,p):null;if(-1!==this.checkedNodes.indexOf(s)&&d&&a===s&&this.autoCheck)this.changeState(d,"indeterminate",null);else if(-1!==this.checkedNodes.indexOf(s)||!d||p||a!==s||n){if(-1===this.checkedNodes.indexOf(s)&&p&&a===s&&!n)this.changeState(p,"uncheck",null);else if(-1===this.checkedNodes.indexOf(s)&&h&&a===s&&this.autoCheck&&0===l&&!n)h.classList.remove("e-stop");else if(-1===this.checkedNodes.indexOf(s)&&!p&&c&&a===s&&0===l)this.changeState(d,"uncheck",null);else if(-1===this.checkedNodes.indexOf(a)&&p&&u&&0===l)this.changeState(p,"uncheck",null);else if(!p&&!d&&a===s||-1!==this.parentNodeCheck.indexOf(i)&&this.autoCheck){var f=this.element.querySelector('[data-uid="'+o+'"]');n&&0!==l?this.changeState(f,"indeterminate",null):n&&l===e.length&&-1===this.checkedNodes.indexOf(i)?this.checkedNodes.push(i):n||0!==l||-1===this.parentNodeCheck.indexOf(i)||this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(i)),-1===this.parentNodeCheck.indexOf(i)&&this.parentNodeCheck.push(i)}}else this.autoCheck?this.changeState(d,"uncheck",null):0!==l?this.changeState(d,"indeterminate",null):this.changeState(d,"uncheck",null);var m=t.getValue(this.fields.child.toString(),e[r]);m&&this.updateChildIndeterminate(m,a,s,n,o)}},r.prototype.changeState=function(e,i,s,n,o,l){var r,a=this,d=t.closest(e,"."+he);n?this.nodeCheckAction(e,i,d,r,s,n,o,l):(this.checkActionNodes=[],r=this.getCheckEvent(d,i,s),this.trigger("nodeChecking",r,function(t){t.cancel||a.nodeCheckAction(e,i,d,t,s,n,o,l)}))},r.prototype.nodeCheckAction=function(e,i,s,n,o,l,r,a){var d,h=e.getElementsByClassName("e-frame")[0];if("check"!==i||h.classList.contains(Ne)?"uncheck"===i&&(h.classList.contains(Ne)||h.classList.contains("e-stop"))?(t.removeClass([h],[Ne,"e-stop"]),this.removeCheck(s),d="false"):"indeterminate"===i&&!h.classList.contains("e-stop")&&this.autoCheck&&(h.classList.remove(Ne),h.classList.add("e-stop"),this.removeCheck(s),d="mixed"):(h.classList.remove("e-stop"),h.classList.add(Ne),this.addCheck(s),d="true"),d="check"===i?"true":"uncheck"===i?"false":d,t.isNullOrUndefined(d)||e.setAttribute("aria-checked",d),r){var c=[].concat([],this.checkActionNodes);n=this.getCheckEvent(s,i,o),t.isUndefined(l)&&(n.data=c)}void 0!==a&&this.ensureStateChange(s,a),l||t.isNullOrUndefined(d)||(e.setAttribute("aria-checked",d),n.data[0].checked=d,this.trigger("nodeChecked",n),this.checkActionNodes=[])},r.prototype.addCheck=function(e){var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.checkedNodes.indexOf(i)||this.checkedNodes.push(i)},r.prototype.removeCheck=function(e){var t=this.checkedNodes.indexOf(e.getAttribute("data-uid"));t>-1&&this.checkedNodes.splice(t,1)},r.prototype.getCheckEvent=function(e,i,s){this.checkActionNodes.push(this.getNodeData(e));var n=this.checkActionNodes;return{action:i,cancel:!1,isInteracted:!t.isNullOrUndefined(s),node:e,data:n}},r.prototype.finalize=function(){t.select("."+pe,this.element).setAttribute("role",Oe.treeRole),this.setMultiSelect(this.allowMultiSelection);var e=t.select("."+he,this.element);e&&(t.addClass([e],xe),this.updateIdAttr(null,e)),this.hasPid=!!this.rootData[0]&&this.rootData[0].hasOwnProperty(this.fields.parentID),this.doExpandAction()},r.prototype.doExpandAction=function(){var e=this.expandedNodes;if(this.isInitalExpand&&e.length>0)if(this.setProperties({expandedNodes:[]},!0),this.fields.dataSource instanceof o.DataManager)this.expandGivenNodes(e);else{for(var i=0;i<e.length;i++){var s=t.select('[data-uid="'+e[i]+'"]',this.element);if(t.isNullOrUndefined(s))e[i]&&-1===this.expandChildren.indexOf(e[i])&&this.expandChildren.push(e[i].toString());else{var n=t.select("."+de,t.select("."+ye,s));t.isNullOrUndefined(n)||this.expandAction(s,n,null)}}this.afterFinalized()}else this.afterFinalized()},r.prototype.expandGivenNodes=function(e){var t=this;this.expandCallback(e[this.index],function(){++t.index<e.length?t.expandGivenNodes(e):t.afterFinalized()})},r.prototype.expandCallback=function(e,i){var s=t.select('[data-uid="'+e+'"]',this.element);if(t.isNullOrUndefined(s))i();else{var n=t.select("."+de,t.select("."+ye,s));t.isNullOrUndefined(n)?i():this.expandAction(s,n,null,!1,i)}},r.prototype.afterFinalized=function(){this.doSelectionAction(),this.updateCheckedProp(),this.isLoaded=!0,this.isAnimate=!0,this.isInitalExpand=!1;var e={data:this.treeData};this.trigger("dataBound",e)},r.prototype.doSelectionAction=function(){var e=t.selectAll(".e-selected",this.element),i=this.selectedNodes;if(i.length>0){this.setProperties({selectedNodes:[]},!0);for(var s=0;s<i.length;s++){var n=t.select('[data-uid="'+i[s]+'"]',this.element);if(n&&!n.classList.contains("e-active")?this.selectNode(n,null,!0):this.selectedNodes.push(i[s]),!this.allowMultiSelection)break}}else this.selectGivenNodes(e);t.removeClass(e,"e-selected")},r.prototype.selectGivenNodes=function(e){for(var t=0;t<e.length&&(e[t].classList.contains("e-disable")||this.selectNode(e[t],null,!0),this.allowMultiSelection);t++);},r.prototype.clickHandler=function(e){var i=e.originalEvent.target;if(t.EventHandler.remove(this.element,"contextmenu",this.preventContextMenu),i&&!this.dragStartAction){var s=i.classList,n=t.closest(i,"."+he);if(n){if(this.removeHover(),this.setFocusElement(n),this.showCheckBox&&!n.classList.contains("e-disable")){var o=t.closest(i,"."+Ee);if(!t.isNullOrUndefined(o)){var l=t.select(".e-frame",o);return this.validateCheckNode(o,l.classList.contains(Ne),n,e.originalEvent),void this.triggerClickEvent(e.originalEvent,n)}}s.contains(de)?this.expandAction(n,i,e):s.contains(ae)?this.collapseNode(n,i,e):s.contains(pe)||s.contains(he)||this.toggleSelect(n,e.originalEvent,!1),this.triggerClickEvent(e.originalEvent,n)}}},r.prototype.nodeCheckedEvent=function(e,i,s){t.closest(e,"."+he);var n=this.getCheckEvent(e,i?"uncheck":"check",s);n.data=n.data.splice(0,n.data.length-1),this.trigger("nodeChecked",n)},r.prototype.triggerClickEvent=function(e,t){var i={event:e,node:t};this.trigger("nodeClicked",i)},r.prototype.expandNode=function(e,i,s){var n=this;if(i.classList.contains(me)&&this.hideSpinner(i),this.initialRender||i.classList.add("interaction"),!0!==s||!0===s&&e.classList.contains("e-expanded")){if(!0!==this.preventExpand){t.removeClass([i],de),t.addClass([i],ae);var l=0,r=0,a=this,d=t.select("."+pe,e),h=e;this.setHeight(h,d);var c=t.select(".e-list-item."+fe,e);this.isAnimate?this.aniObj.animate(d,{name:this.animation.expand.effect,duration:this.animation.expand.duration,timingFunction:this.animation.expand.easing,begin:function(i){h.style.overflow="hidden",!t.isNullOrUndefined(c)&&c instanceof HTMLElement&&c.classList.add("e-animation-active"),l=h.offsetHeight,r=t.select("."+ye,e).offsetHeight},progress:function(e){e.element.style.display="block",a.animateHeight(e,l,r)},end:function(e){e.element.style.display="block",!t.isNullOrUndefined(c)&&c instanceof HTMLElement&&c.classList.remove("e-animation-active"),n.expandedNode(h,d,i)}}):this.expandedNode(h,d,i)}}else t.select("."+pe,e).style.display="none",this.fields.dataSource instanceof o.DataManager==!0&&(this.preventExpand=!1);this.initialRender&&i.classList.add("interaction")},r.prototype.expandedNode=function(e,i,s){i.style.display="block",e.style.display="block",e.style.overflow="",e.style.height="",t.removeClass([s],ve),this.addExpand(e),this.isLoaded&&this.expandArgs&&(this.expandArgs=this.getExpandEvent(e,null),this.trigger("nodeExpanded",this.expandArgs))},r.prototype.addExpand=function(e){e.setAttribute("aria-expanded","true"),t.removeClass([e],"e-node-collapsed");var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.expandedNodes.indexOf(i)||this.expandedNodes.push(i)},r.prototype.collapseNode=function(e,i,s){var n=this;if(!i.classList.contains(ve)){t.addClass([i],ve);var o;this.isLoaded?(o=this.getExpandEvent(e,s),this.trigger("nodeCollapsing",o,function(s){s.cancel?t.removeClass([i],ve):n.nodeCollapseAction(e,i,s)})):this.nodeCollapseAction(e,i,o)}},r.prototype.nodeCollapseAction=function(e,i,s){var n=this;t.removeClass([i],ae),t.addClass([i],de);var o=0,l=0,r=this,a=t.select("."+pe,e),d=e,h=t.select(".e-list-item."+fe,e);this.isAnimate?this.aniObj.animate(a,{name:this.animation.collapse.effect,duration:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing,begin:function(i){d.style.overflow="hidden",!t.isNullOrUndefined(h)&&h instanceof HTMLElement&&h.classList.add("e-animation-active"),o=t.select("."+ye,e).offsetHeight,l=d.offsetHeight},progress:function(e){r.animateHeight(e,o,l)},end:function(e){e.element.style.display="none",!t.isNullOrUndefined(h)&&h instanceof HTMLElement&&h.classList.remove("e-animation-active"),n.collapsedNode(d,a,i,s)}}):this.collapsedNode(d,a,i,s)},r.prototype.collapsedNode=function(e,i,s,n){i.style.display="none",e.style.overflow="",e.style.height="",t.removeClass([s],ve),this.removeExpand(e),this.isLoaded&&this.trigger("nodeCollapsed",n)},r.prototype.removeExpand=function(e,t){t?e.removeAttribute("aria-expanded"):this.disableExpandAttr(e);var i=this.expandedNodes.indexOf(e.getAttribute("data-uid"));i>-1&&this.expandedNodes.splice(i,1)},r.prototype.disableExpandAttr=function(e){e.setAttribute("aria-expanded","false"),t.addClass([e],"e-node-collapsed")},r.prototype.setHeight=function(e,t){t.style.display="block",t.style.visibility="hidden",e.style.height=e.offsetHeight+"px",t.style.display="none",t.style.visibility=""},r.prototype.animateHeight=function(e,t,i){var s=(i-t)*((e.duration-e.timeStamp)/e.duration)+t;e.element.parentElement.style.height=s+"px"},r.prototype.renderChildNodes=function(e,s,n,l){var r=this,a=t.select("div."+ge,e);if(!t.isNullOrUndefined(a)){this.showSpinner(a);var d;if(this.fields.dataSource instanceof o.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName){var h=this.parents(e,"."+pe).length,c=this.getChildFields(this.fields,h,1);if(t.isNullOrUndefined(c)||t.isNullOrUndefined(c.dataSource))return t.detach(a),void this.removeExpand(e,!0);this.treeList.push("false"),this.fields.dataSource instanceof o.DataManager&&this.fields.dataSource.dataSource.offline||this.fields.dataSource instanceof o.DataManager&&!this.loadOnDemand?(this.treeList.pop(),d=this.getChildNodes(this.treeData,e.getAttribute("data-uid")),this.loadChild(d,c,a,e,s,n,l),this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate()):this.fields.dataSource instanceof o.DataManager&&this.loadOnDemand&&c.dataSource.executeQuery(this.getQuery(c,e.getAttribute("data-uid"))).then(function(t){r.treeList.pop(),d=t.result,r.loadChild(d,c,a,e,s,n,l),r.nodeTemplate&&r.isBlazorPlatform&&!r.isStringTemplate&&r.updateBlazorTemplate()})}else{if(d=this.getChildNodes(this.treeData,e.getAttribute("data-uid")),this.currentLoadData=d,t.isNullOrUndefined(d)||0===d.length)return t.detach(a),void this.removeExpand(e,!0);this.listBaseOption.ariaAttributes.level=parseFloat(e.getAttribute("aria-level"))+1,e.appendChild(i.ListBase.createList(this.createElement,this.getSortedData(d),this.listBaseOption)),this.expandNode(e,a,l),this.setSelectionForChildNodes(d),this.ensureCheckNode(e),this.finalizeNode(e),this.loadOnDemand&&this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate(),this.disableTreeNodes(d),this.renderSubChild(e,s,l)}}},r.prototype.loadChild=function(e,s,n,l,r,a,d){if(this.currentLoadData=e,t.isNullOrUndefined(e)||0===e.length)t.detach(n),this.removeExpand(l,!0);else{if(this.updateListProp(s),this.fields.dataSource instanceof o.DataManager&&!this.fields.dataSource.dataSource.offline){var h=l.getAttribute("data-uid"),c=this.getNodeObject(h);t.setValue("child",e,c)}this.listBaseOption.ariaAttributes.level=parseFloat(l.getAttribute("aria-level"))+1,l.appendChild(i.ListBase.createList(this.createElement,e,this.listBaseOption)),this.expandNode(l,n,d),this.setSelectionForChildNodes(e),this.ensureCheckNode(l),this.finalizeNode(l),this.disableTreeNodes(e),this.renderSubChild(l,r,d)}a&&a(),0!==this.treeList.length||this.isLoaded||this.finalize()},r.prototype.disableTreeNodes=function(e){for(var t=0;t<e.length;){var i=e[t][this.fields.id].toString();void 0!==this.disableNode&&-1!==this.disableNode.indexOf(i)&&this.doDisableAction([i]),t++}},r.prototype.setSelectionForChildNodes=function(e){var t;for(t=0;t<e.length;t++){var i=e[t][this.fields.id].toString();void 0!==this.selectedNodes&&-1!==this.selectedNodes.indexOf(i)&&this.doSelectionAction()}},r.prototype.ensureCheckNode=function(e){this.showCheckBox&&(this.ele=this.checkedElement?this.checkedElement.indexOf(e.getAttribute("data-uid")):null,this.autoCheck&&(this.ensureChildCheckState(e),this.ensureParentCheckState(e))),this.currentLoadData=null},r.prototype.getFields=function(e,t,i){return t===i?e:this.getFields(this.getChildMapper(e),t,i+1)},r.prototype.getChildFields=function(e,t,i){return t===i?this.getChildMapper(e):this.getChildFields(this.getChildMapper(e),t,i+1)},r.prototype.getChildMapper=function(e){return"string"==typeof e.child||t.isNullOrUndefined(e.child)?e:e.child},r.prototype.getChildNodes=function(e,i,s){void 0===s&&(s=!1);var n;if(t.isNullOrUndefined(e))return n;if(1===this.dataType)return this.getChildGroup(this.groupedData,i,s);if("string"==typeof this.fields.child)for(var o=0,l=e.length;o<l;o++){var r=t.getValue(this.fields.id,e[o]);if(r&&r.toString()===i)return t.getValue(this.fields.child,e[o]);if(!t.isNullOrUndefined(t.getValue(this.fields.child,e[o]))&&void 0!==(n=this.getChildNodes(t.getValue(this.fields.child,e[o]),i)))break}return n},r.prototype.getChildGroup=function(e,i,s){if(!t.isNullOrUndefined(e))for(var n=0,o=e.length;n<o;n++){if(t.isNullOrUndefined(e[n][0])||t.isNullOrUndefined(t.getValue(this.fields.parentID,e[n][0])))return s?e[n]:[];if(t.getValue(this.fields.parentID,e[n][0]).toString()===i)return e[n]}},r.prototype.renderSubChild=function(e,i,s){if(i)for(var n=t.selectAll("."+de,e),o=0,l=n.length;o<l;o++){var r=n[o];if(e.querySelector(".e-icons")!==n[o]){var a=t.closest(r,"."+he);this.expandArgs=this.getExpandEvent(a,null),!0!==s&&this.trigger("nodeExpanding",this.expandArgs),this.renderChildNodes(a,i,null,s)}}},r.prototype.toggleSelect=function(e,t,i){e.classList.contains("e-disable")||(this.allowMultiSelection&&(t&&t.ctrlKey||i)&&this.isActive(e)?this.unselectNode(e,t):this.selectNode(e,t,i))},r.prototype.isActive=function(e){return!!e.classList.contains(fe)},r.prototype.selectNode=function(e,i,s){var n=this;if(t.isNullOrUndefined(e)||!this.allowMultiSelection&&this.isActive(e)&&!t.isNullOrUndefined(i))return void this.setFocusElement(e);var o;this.isLoaded?(o=this.getSelectEvent(e,"select",i),this.trigger("nodeSelecting",o,function(t){t.cancel||n.nodeSelectAction(e,i,t,s)})):this.nodeSelectAction(e,i,o,s)},r.prototype.nodeSelectAction=function(e,i,s,n){if(this.allowMultiSelection&&(n||i&&(!i||i.ctrlKey))||this.removeSelectAll(),this.allowMultiSelection&&i&&i.shiftKey){this.startNode||(this.startNode=e);var o=this.liList.indexOf(this.startNode),l=this.liList.indexOf(e);if(o>l){var r=o;o=l,l=r}for(var a=o;a<=l;a++){var d=this.liList[a];t.isVisible(d)&&!d.classList.contains("e-disable")&&this.addSelect(d)}}else this.startNode=e,this.addSelect(e);this.setFocusElement(e),this.isLoaded&&(s.nodeData=this.getNodeData(e),this.trigger("nodeSelected",s))},r.prototype.unselectNode=function(e,t){var i,s=this;this.isLoaded?(i=this.getSelectEvent(e,"un-select",t),this.trigger("nodeSelecting",i,function(t){t.cancel||s.nodeUnselectAction(e,t)})):this.nodeUnselectAction(e,i)},r.prototype.nodeUnselectAction=function(e,t){this.removeSelect(e),this.setFocusElement(e),this.isLoaded&&(t.nodeData=this.getNodeData(e),this.trigger("nodeSelected",t))},r.prototype.setFocusElement=function(e){if(!t.isNullOrUndefined(e)){var i=this.getFocusedNode();i&&t.removeClass([i],xe),t.addClass([e],xe),this.updateIdAttr(i,e)}},r.prototype.addSelect=function(e){e.setAttribute("aria-selected","true"),t.addClass([e],fe);var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.selectedNodes.indexOf(i)||this.selectedNodes.push(i)},r.prototype.removeSelect=function(e){this.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),t.removeClass([e],fe);var i=this.selectedNodes.indexOf(e.getAttribute("data-uid"));i>-1&&this.selectedNodes.splice(i,1)},r.prototype.removeSelectAll=function(){for(var e=this.element.querySelectorAll("."+fe),i=0,s=e;i<s.length;i++){var n=s[i];this.allowMultiSelection?n.setAttribute("aria-selected","false"):n.removeAttribute("aria-selected")}t.removeClass(e,fe),this.setProperties({selectedNodes:[]},!0)},r.prototype.getSelectEvent=function(e,i,s){var n=this.getNodeData(e);return{action:i,cancel:!1,isInteracted:!t.isNullOrUndefined(s),node:e,nodeData:n}},r.prototype.setExpandOnType=function(){this.expandOnType="Auto"===this.expandOn?t.Browser.isDevice?"Click":"DblClick":this.expandOn},r.prototype.expandHandler=function(e){var i=e.originalEvent.target;!i||i.classList.contains("e-input")||i.classList.contains(re)||i.classList.contains(pe)||i.classList.contains(he)||i.classList.contains(ge)||this.showCheckBox&&t.closest(i,"."+Ee)||this.expandCollapseAction(t.closest(i,"."+he),e)},r.prototype.expandCollapseAction=function(e,i){var s=t.select("div."+ge,e);if(s&&!s.classList.contains(ve)){var n=s.classList;n.contains(de)?this.expandAction(e,s,i):n.contains(ae)&&this.collapseNode(e,s,i)}},r.prototype.expandAction=function(e,i,s,n,o){var l=this;i.classList.contains(ve)||(t.addClass([i],ve),this.isLoaded?(this.expandArgs=this.getExpandEvent(e,s),this.trigger("nodeExpanding",this.expandArgs,function(s){s.cancel?t.removeClass([i],ve):l.nodeExpandAction(e,i,n,o)})):this.nodeExpandAction(e,i,n,o))},r.prototype.nodeExpandAction=function(e,i,s,n){var o=t.select("."+pe,e);if(o&&"UL"===o.nodeName)this.expandNode(e,i);else{this.renderChildNodes(e,s,n);for(var l=t.selectAll("."+he,e),r=0;r<l.length;r++){var a=this.getId(l[r]);if(-1!==this.expandChildren.indexOf(a)&&void 0!==this.expandChildren){var d=t.select("."+de,t.select("."+ye,l[r]));t.isNullOrUndefined(d)||this.expandAction(l[r],d,null),this.expandChildren.splice(this.expandChildren.indexOf(a),1)}}}},r.prototype.keyActionHandler=function(e){var i=this,s=e.target,n=this.getFocusedNode();if(s&&s.classList.contains("e-input")){var o=s;return void("enter"===e.action?(o.blur(),this.element.focus(),t.addClass([n],ue)):"escape"===e.action&&(o.value=this.oldText,o.blur(),this.element.focus(),t.addClass([n],ue)))}e.preventDefault();var l={cancel:!1,event:e,node:n};this.trigger("keyPress",l,function(s){if(!s.cancel)switch(e.action){case"space":i.showCheckBox&&i.checkNode(e);break;case"moveRight":i.openNode(!i.enableRtl,e);break;case"moveLeft":i.openNode(!!i.enableRtl,e);break;case"shiftDown":i.shiftKeySelect(!0,e);break;case"moveDown":case"ctrlDown":case"csDown":i.navigateNode(!0);break;case"shiftUp":i.shiftKeySelect(!1,e);break;case"moveUp":case"ctrlUp":case"csUp":i.navigateNode(!1);break;case"home":case"shiftHome":case"ctrlHome":case"csHome":i.navigateRootNode(!0);break;case"end":case"shiftEnd":case"ctrlEnd":case"csEnd":i.navigateRootNode(!1);break;case"enter":case"ctrlEnter":case"shiftEnter":case"csEnter":i.toggleSelect(n,e);break;case"f2":i.allowEditing&&!n.classList.contains("e-disable")&&i.createTextbox(n,e);break;case"ctrlA":if(i.allowMultiSelection){var o=t.selectAll(".e-list-item:not(.e-active)",i.element);i.selectGivenNodes(o)}}})},r.prototype.navigateToFocus=function(e){var i=this.getFocusedNode().querySelector("."+ye),s=i.getBoundingClientRect(),n=this.getScrollParent(this.element);if(!t.isNullOrUndefined(n)){var o=n.getBoundingClientRect();s.bottom>o.bottom?n.scrollTop+=s.bottom-o.bottom:s.top<o.top&&(n.scrollTop-=o.top-s.top)}this.isVisibleInViewport(i)||i.scrollIntoView(e)},r.prototype.isVisibleInViewport=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},r.prototype.getScrollParent=function(e){return t.isNullOrUndefined(e)?null:e.scrollHeight>e.clientHeight?e:this.getScrollParent(e.parentElement)},r.prototype.shiftKeySelect=function(e,t){if(this.allowMultiSelection){var i=this.getFocusedNode(),s=e?this.getNextNode(i):this.getPrevNode(i);this.removeHover(),this.setFocusElement(s),this.toggleSelect(s,t,!1),this.navigateToFocus(!e)}else this.navigateNode(e)},r.prototype.checkNode=function(e){var i=this.getFocusedNode(),s=t.select("."+Ee,i),n=t.select(" .e-frame",s).classList.contains(Ne);i.classList.contains("e-disable")||0==i.getElementsByClassName("e-checkbox-disabled").length&&this.validateCheckNode(s,n,i,e)},r.prototype.validateCheckNode=function(e,i,s,n){var o=this,l=t.closest(e,"."+he);this.checkActionNodes=[];var r=i?"false":"true";t.isNullOrUndefined(r)||e.setAttribute("aria-checked",r);var a=this.getCheckEvent(l,i?"uncheck":"check",n);this.trigger("nodeChecking",a,function(t){t.cancel||o.nodeCheckingAction(e,i,s,t,n)})},r.prototype.nodeCheckingAction=function(e,i,s,n,o){if(-1===this.checkedElement.indexOf(s.getAttribute("data-uid"))){this.checkedElement.push(s.getAttribute("data-uid"));var l=this.getChildNodes(this.treeData,s.getAttribute("data-uid"));null!==l?this.allCheckNode(l,this.checkedElement,null,null,!1):l=null}if(this.changeState(e,i?"uncheck":"check",o,!0),this.autoCheck){this.ensureChildCheckState(s),this.ensureParentCheckState(t.closest(t.closest(s,"."+pe),"."+he));var r=void 0;"check"===n.action?r=!0:"uncheck"===n.action&&(r=!1),this.ensureStateChange(s,r)}this.nodeCheckedEvent(e,i,o)},r.prototype.ensureStateChange=function(e,i){var s=t.select("."+pe,e),n=e.getAttribute("data-uid"),l=this.fields;if(1===this.dataType&&this.autoCheck)for(var r=new o.DataManager(this.treeData).executeLocal((new o.Query).where(l.parentID,"equal",n,!0)),a=0;a<r.length;a++){var d=r[a][this.fields.id]?r[a][this.fields.id].toString():null,h=r[a][this.fields.isChecked]?r[a][this.fields.isChecked].toString():null;if(-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(d)){this.checkedNodes.push(d);p=this.getChildNodes(this.treeData,d);this.getChildItems(p,i),-1!==this.parentNodeCheck.indexOf(d)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(d),1)}else if(-1===this.checkedNodes.indexOf(n)&&null===s&&-1!==this.checkedNodes.indexOf(d)){if(this.checkedNodes.splice(this.checkedNodes.indexOf(d),1),"true"===h&&this.updateField(this.treeData,this.fields,d,"isChecked",null),-1===this.checkedNodes.indexOf(n)&&null===s||-1!==this.parentNodeCheck.indexOf(d)){var c=this.getChildNodes(this.treeData,d);this.getChildItems(c,i),-1!==this.parentNodeCheck.indexOf(d)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(d),1)}}else{var p=this.getChildNodes(this.treeData,d);this.getChildItems(p,i)}}else if(1!==this.dataType||this.autoCheck)(p=this.getChildNodes(this.treeData,n))&&this.childStateChange(p,n,s,i);else if(i)for(a=0;a<this.treeData.length;a++){var u=this.treeData[a][this.fields.id]?this.treeData[a][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(u)&&this.checkedNodes.push(u)}else{for(var f=new o.DataManager(this.treeData).executeLocal((new o.Query).where(l.isChecked,"equal",!0,!1)),a=0;a<f.length;a++){var m=f[a][this.fields.id]?f[a][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(m)&&this.checkedNodes.splice(this.checkedNodes.indexOf(m),1),this.updateField(this.treeData,this.fields,m,"isChecked",null)}this.checkedNodes=[]}},r.prototype.getChildItems=function(e,t){for(var i=0;i<e.length;i++){var s=e[i][this.fields.id]?e[i][this.fields.id].toString():null,n=e[i][this.fields.isChecked]?e[i][this.fields.isChecked].toString():null;-1===this.checkedNodes.indexOf(s)||t||this.checkedNodes.splice(this.checkedNodes.indexOf(s),1),-1===this.checkedNodes.indexOf(s)&&t&&this.checkedNodes.push(s),"true"!==n||t||this.updateField(this.treeData,this.fields,s,"isChecked",null);var o=this.getChildNodes(this.treeData,s);o.length>0&&this.getChildItems(o,t)}},r.prototype.childStateChange=function(e,t,i,s){for(var n=0;n<e.length;n++){var o=e[n][this.fields.id]?e[n][this.fields.id].toString():"",l=e[n][this.fields.isChecked]?e[n][this.fields.isChecked].toString():null;this.autoCheck?-1!==this.checkedNodes.indexOf(t)&&-1===this.checkedNodes.indexOf(o)?(this.checkedNodes.push(o),-1!==this.parentNodeCheck.indexOf(o)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(o),1)):-1!==this.checkedNodes.indexOf(t)||null!==i||s||(this.checkedNodes.splice(this.checkedNodes.indexOf(o),1),"true"===l&&this.updateField(this.treeData,this.fields,o,"isChecked",null)):this.autoCheck||(s?-1===this.checkedNodes.indexOf(o)&&this.checkedNodes.push(o):(-1!==this.checkedNodes.indexOf(o)&&this.checkedNodes.splice(this.checkedNodes.indexOf(o),1),this.updateField(this.treeData,this.fields,o,"isChecked",null),this.checkedNodes=[]));var r=this.getChildNodes(this.treeData,o);r&&this.childStateChange(r,t,i,s)}},r.prototype.allCheckNode=function(e,i,s,n,o){if(e)for(var l=0;l<e.length;l++){var r=t.getValue(this.fields.id,e[l]),a=this.element.querySelector('[data-uid="'+r+'"]');if(!1!==o&&-1===this.checkedElement.indexOf(r.toString())&&(null===a&&!t.isNullOrUndefined(e[l][this.fields.isChecked])&&-1===i.indexOf(r.toString())||0===n||2===s)&&(!1!==e[l][this.fields.isChecked]||2===s?i.push(r.toString()):n=null,n=!1!==e[l][this.fields.isChecked]||2===s?0:null),-1===i.indexOf(r.toString())&&t.isNullOrUndefined(s)&&i.push(r.toString()),!0===t.getValue(this.fields.hasChildren,e[l])||t.getValue(this.fields.child.toString(),e[l])){var d=t.getValue(this.fields.id,e[l]),h=this.getChildNodes(this.treeData,d.toString());h&&(t.isNullOrUndefined(o)?this.allCheckNode(h,i,s,n):this.allCheckNode(h,i,s,n,o),n=null)}n=null}},r.prototype.openNode=function(e,i){var s=this.getFocusedNode(),n=t.select("div."+ge,s);if(e){if(!n)return;n.classList.contains(de)?this.expandAction(s,n,i):this.focusNextNode(s,!0)}else if(n&&n.classList.contains(ae))this.collapseNode(s,n,i);else{var o=t.closest(t.closest(s,"."+pe),"."+he);if(!o)return;o.classList.contains("e-disable")||(this.setFocus(s,o),this.navigateToFocus(!0))}},r.prototype.navigateNode=function(e){var t=this.getFocusedNode();this.focusNextNode(t,e)},r.prototype.navigateRootNode=function(e){var t=this.getFocusedNode(),i=e?this.getRootNode():this.getEndNode();i.classList.contains("e-disable")||(this.setFocus(t,i),this.navigateToFocus(e))},r.prototype.getFocusedNode=function(){var e,i=t.select(".e-list-item."+xe,this.element);return t.isNullOrUndefined(i)&&(e=t.select("."+he,this.element)),t.isNullOrUndefined(i)?t.isNullOrUndefined(e)?this.element.firstElementChild:e:i},r.prototype.focusNextNode=function(e,t){var i=t?this.getNextNode(e):this.getPrevNode(e);if(this.setFocus(e,i),this.navigateToFocus(!t),i.classList.contains("e-disable")){var s=i.lastChild;null==i.previousSibling&&i.classList.contains("e-level-1")?this.focusNextNode(i,!0):null==i.nextSibling&&i.classList.contains("e-node-collapsed")?this.focusNextNode(i,!1):null==i.nextSibling&&s.classList.contains("e-text-content")?this.focusNextNode(i,!1):this.focusNextNode(i,t)}},r.prototype.getNextNode=function(e){var i,s=this.liList.indexOf(e);do{if(s++,i=this.liList[s],t.isNullOrUndefined(i))return e}while(!t.isVisible(i));return i},r.prototype.getPrevNode=function(e){var i,s=this.liList.indexOf(e);do{if(s--,i=this.liList[s],t.isNullOrUndefined(i))return e}while(!t.isVisible(i));return i},r.prototype.getRootNode=function(){var e,i=0;do{e=this.liList[i],i++}while(!t.isVisible(e));return e},r.prototype.getEndNode=function(){var e,i=this.liList.length-1;do{e=this.liList[i],i--}while(!t.isVisible(e));return e},r.prototype.setFocus=function(e,i){t.removeClass([e],[ue,xe]),i.classList.contains("e-disable")||(t.addClass([i],[ue,xe]),this.updateIdAttr(e,i))},r.prototype.updateIdAttr=function(e,t){this.element.removeAttribute("aria-activedescendant"),e&&e.removeAttribute("id"),t.setAttribute("id",this.element.id+"_active"),this.element.setAttribute("aria-activedescendant",this.element.id+"_active")},r.prototype.focusIn=function(){this.mouseDownStatus||t.addClass([this.getFocusedNode()],ue),this.mouseDownStatus=!1},r.prototype.focusOut=function(){t.removeClass([this.getFocusedNode()],ue)},r.prototype.onMouseOver=function(e){var i=e.target,s=i.classList,n=t.closest(i,"."+he);if(!n||s.contains(pe)||s.contains(he))return void this.removeHover();n&&!n.classList.contains("e-disable")&&this.setHover(n)},r.prototype.setHover=function(e){e.classList.contains(ue)||(this.removeHover(),t.addClass([e],ue))},r.prototype.onMouseLeave=function(e){this.removeHover()},r.prototype.removeHover=function(){var e=t.selectAll("."+ue,this.element);e&&e.length&&t.removeClass(e,ue)},r.prototype.getNodeData=function(e,i){if(!t.isNullOrUndefined(e)&&e.classList.contains(he)&&!t.isNullOrUndefined(t.closest(e,".e-control"))&&t.closest(e,".e-control").classList.contains(re)){var s=e.getAttribute("data-uid"),n=this.getText(e,i),o=t.closest(e.parentNode,"."+he),l=o?o.getAttribute("data-uid"):null,r=e.classList.contains(fe),a="true"===e.getAttribute("aria-expanded"),d=null!==e.getAttribute("aria-expanded"),h=null;return this.showCheckBox&&(h=t.select("."+Ee,e).getAttribute("aria-checked")),{id:s,text:n,parentID:l,selected:r,expanded:a,isChecked:h,hasChildren:d}}return{id:"",text:"",parentID:"",selected:!1,expanded:!1,isChecked:"",hasChildren:!1}},r.prototype.getText=function(e,i){if(i){var s=this.getNodeObject(e.getAttribute("data-uid")),n=parseFloat(e.getAttribute("aria-level")),o=this.getFields(this.fields,n,1);return t.getValue(o.text,s)}return t.select("."+ce,e).textContent},r.prototype.getExpandEvent=function(e,i){var s=this.getNodeData(e);return{cancel:!1,isInteracted:!t.isNullOrUndefined(i),node:e,nodeData:s,event:i}},r.prototype.destroyTemplate=function(e){this.clearTemplate(["nodeTemplate"])},r.prototype.reRenderNodes=function(){t.resetBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate"),this.isBlazorPlatform&&this.element.firstElementChild?this.element.removeChild(this.element.firstElementChild):this.element.innerHTML="",t.isNullOrUndefined(this.nodeTemplateFn)||this.destroyTemplate(this.nodeTemplate),this.setTouchClass(),this.setProperties({selectedNodes:[],checkedNodes:[],expandedNodes:[]},!0),this.isLoaded=!1,this.setDataBinding()},r.prototype.setCssClass=function(e,i){t.isNullOrUndefined(e)||""===e||t.removeClass([this.element],e.split(" ")),t.isNullOrUndefined(i)||""===i||t.addClass([this.element],i.split(" "))},r.prototype.editingHandler=function(e){var i=e.target;if(!(!i||i.classList.contains(re)||i.classList.contains(pe)||i.classList.contains(he)||i.classList.contains(ge)||i.classList.contains("e-input")||i.classList.contains("e-input-group"))){var s=t.closest(i,"."+he);this.createTextbox(s,e)}},r.prototype.createTextbox=function(e,i){var s=this,n=t.select(".e-tree-input",this.element);n&&n.blur();var o=t.select("."+ce,e);this.updateOldText(e);var r=this.createElement("input",{className:"e-tree-input",attrs:{value:this.oldText}}),a=this.getEditEvent(e,null,r.outerHTML);this.trigger("nodeEditing",a,function(i){if(!i.cancel){var n="width:"+(o.offsetWidth+5)+"px";t.addClass([e],"e-editing"),o.innerHTML=a.innerHtml;var r=t.select(".e-tree-input",o);s.inputObj=l.Input.createInput({element:r,properties:{enableRtl:s.enableRtl}},s.createElement),s.inputObj.container.setAttribute("style",n),r.focus();var d=r;d.setSelectionRange(0,d.value.length),s.wireInputEvents(r)}})},r.prototype.updateOldText=function(e){var i=e.getAttribute("data-uid");this.editData=this.getNodeObject(i);var s=parseFloat(e.getAttribute("aria-level"));this.editFields=this.getFields(this.fields,s,1),this.oldText=t.getValue(this.editFields.text,this.editData)},r.prototype.inputFocusOut=function(e){if(t.select(".e-tree-input",this.element)){var i=e.target,s=i.value,n=t.closest(i,"."+ce),o=t.closest(i,"."+he);t.detach(this.inputObj.container),this.appendNewText(o,n,s,!0)}},r.prototype.appendNewText=function(e,i,s,n){var o=this,l=this.getEditEvent(e,s,null);this.trigger("nodeEdited",l,function(l){s=l.cancel?l.oldText:l.newText;var r=t.setValue(o.editFields.text,s,o.editData);if(t.isNullOrUndefined(o.nodeTemplateFn))i.innerHTML=s;else{i.innerHTML="";var a=o.nodeTemplateFn(r,void 0,void 0,o.element.id+"nodeTemplate",o.isStringTemplate);a=Array.prototype.slice.call(a),t.append(a,i),o.updateBlazorTemplate()}n&&(t.removeClass([e],"e-editing"),i.focus()),l.oldText!==s&&o.triggerEvent()})},r.prototype.getElement=function(e){return t.isNullOrUndefined(e)?null:"string"==typeof e?this.element.querySelector('[data-uid="'+e+'"]'):"object"==typeof e?t.getElement(e):null},r.prototype.getId=function(e){return t.isNullOrUndefined(e)?null:"string"==typeof e?e:"object"==typeof e?t.getElement(e).getAttribute("data-uid"):null},r.prototype.getEditEvent=function(e,t,i){return{cancel:!1,newText:t,node:e,nodeData:this.getNodeData(e),oldText:this.oldText,innerHtml:i}},r.prototype.getNodeObject=function(e){if(!t.isNullOrUndefined(e)){if(1!==this.dataType)return this.getChildNodeObject(this.treeData,this.fields,e);for(var i=0,s=this.treeData.length;i<s;i++){var n=t.getValue(this.fields.id,this.treeData[i]);if(!t.isNullOrUndefined(this.treeData[i])&&!t.isNullOrUndefined(n)&&n.toString()===e)return this.treeData[i]}}},r.prototype.getChildNodeObject=function(e,i,s){var n;if(t.isNullOrUndefined(e))return n;for(var l=0,r=e.length;l<r;l++){var a=t.getValue(i.id,e[l]);if(e[l]&&a&&a.toString()===s)return e[l];if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[l]))){if(this.fields.dataSource instanceof o.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[l]))){if(void 0!==(n=this.getChildNodeObject(t.getValue("child",e[l]),this.getChildMapper(i),s)))break}}else{var d=t.getValue(i.child,e[l]);if(void 0!==(n=this.getChildNodeObject(d,this.getChildMapper(i),s)))break}}return n},r.prototype.setDragAndDrop=function(e){e?this.initializeDrag():this.destroyDrag()},r.prototype.initializeDrag=function(){var e,i=this,s=this;this.dragObj=new t.Draggable(this.element,{enableTailMode:!0,enableAutoScroll:!0,dragTarget:"."+ye,helper:function(n){i.dragTarget=n.sender.target;var o=t.closest(i.dragTarget,"."+re),l=t.closest(i.dragTarget,"."+ye);if(i.dragLi=t.closest(i.dragTarget,"."+he),i.fullRowSelect&&!l&&i.dragTarget.classList.contains("e-fullrow")&&(l=i.dragTarget.nextElementSibling),!i.dragTarget||!n.element.isSameNode(o)||!l||i.dragTarget.classList.contains(re)||i.dragTarget.classList.contains(pe)||i.dragTarget.classList.contains(he)||i.dragLi.classList.contains("e-disable"))return!1;var r=l.cloneNode(!0);if(t.isNullOrUndefined(t.select("div."+ge,r))){var a=s.createElement("div",{className:ge+" "+de});r.insertBefore(a,r.children[0])}var d="e-drag-item "+re+" "+i.cssClass+" "+(i.enableRtl?"e-rtl":"");(e=s.createElement("div",{className:d})).appendChild(r);var h=i.selectedNodes.length;if(h>1&&i.allowMultiSelection&&i.dragLi.classList.contains(fe)){var c=s.createElement("span",{className:"e-drop-count",innerHTML:""+h});e.appendChild(c)}return document.body.appendChild(e),document.body.style.cursor="",i.dragData=i.getNodeData(i.dragLi),e},dragStart:function(s){t.addClass([i.element],"e-dragging");var n,o=t.closest(s.target,".e-list-item");o&&(n=parseInt(o.getAttribute("aria-level"),10));var l=i.getDragEvent(s.event,i,null,s.target,null,e,n);l.draggedNode.classList.contains("e-editing")?i.dragCancelAction(e):i.trigger("nodeDragStart",l,function(t){t.cancel?i.dragCancelAction(e):i.dragStartAction=!0})},drag:function(s){(i.isBlazorPlatform&&i.dragStartAction||!i.isBlazorPlatform)&&(i.dragObj.setProperties({cursorAt:{top:!t.isNullOrUndefined(s.event.targetTouches)||t.Browser.isDevice?60:-20}}),i.dragAction(s,e))},dragStop:function(e){t.removeClass([i.element],"e-dragging"),i.removeVirtualEle();var s=e.target,n=t.closest(s,".e-droppable");s&&n||(t.detach(e.helper),document.body.style.cursor="");var o,l=t.closest(s,".e-list-item");l&&(o=parseInt(l.getAttribute("aria-level"),10));var r=i.getDragEvent(e.event,i,s,s,null,e.helper,o);r.preventTargetExpand=!1,(i.isBlazorPlatform&&i.dragStartAction||!i.isBlazorPlatform)&&i.trigger("nodeDragStop",r,function(s){i.dragParent=s.draggedParentNode,i.preventExpand=s.preventTargetExpand,s.cancel&&(e.helper.parentNode&&t.detach(e.helper),document.body.style.cursor=""),i.dragStartAction=!1})}}),this.dropObj=new t.Droppable(this.element,{out:function(e){t.isNullOrUndefined(e)||e.target.classList.contains(be)||(document.body.style.cursor="not-allowed")},over:function(e){document.body.style.cursor=""},drop:function(e){i.dropAction(e)}})},r.prototype.dragCancelAction=function(e){t.detach(e),t.removeClass([this.element],"e-dragging"),this.dragStartAction=!1},r.prototype.dragAction=function(e,i){var s=t.closest(e.target,".e-droppable"),n=t.closest(e.target,"."+ye),o=t.select("div."+ge,i);t.removeClass([o],["e-drop-in",Ce,"e-drop-out","e-no-drop"]),this.removeVirtualEle(),document.body.style.cursor="";var l=e.target.classList;if(this.fullRowSelect&&!n&&!t.isNullOrUndefined(l)&&l.contains("e-fullrow")&&(n=e.target.nextElementSibling),s){var r=t.closest(e.target,"."+he);if(!s.classList.contains(re)||n&&!r.isSameNode(this.dragLi)&&!this.isDescendant(this.dragLi,r))if(r&&e&&e.event.offsetY<7){t.addClass([o],Ce);var a=this.createElement("div",{className:be}),d=this.fullRowSelect?1:0;r.insertBefore(a,r.children[d])}else if(r&&e&&e.target.offsetHeight>0&&e.event.offsetY>e.target.offsetHeight-10){t.addClass([o],Ce);var a=this.createElement("div",{className:be}),d=this.fullRowSelect?2:1;r.insertBefore(a,r.children[d])}else t.addClass([o],"e-drop-in");else"LI"!==e.target.nodeName||r.isSameNode(this.dragLi)||this.isDescendant(this.dragLi,r)?e.target.classList.contains(be)?t.addClass([o],Ce):t.addClass([o],"e-drop-out"):(t.addClass([o],Ce),this.renderVirtualEle(e))}else t.addClass([o],"e-no-drop"),document.body.style.cursor="not-allowed";var h,c=t.closest(e.target,".e-list-item");c&&(h=parseInt(c.getAttribute("aria-level"),10));var p=this.getDragEvent(e.event,this,e.target,e.target,null,i,h);p.dropIndicator&&t.removeClass([o],p.dropIndicator),this.trigger("nodeDragging",p),p.dropIndicator&&t.addClass([o],p.dropIndicator)},r.prototype.dropAction=function(e){for(var i,s,n=e.event.offsetY,l=e.target,r=!1,d=e.dragData.draggable,h=0;h<d.ej2_instances.length;h++)if(d.ej2_instances[h]instanceof a){i=d.ej2_instances[h];break}if(i&&i.dragTarget){var c=i.dragTarget,p=t.closest(c,"."+he),u=t.closest(l,"."+he);if(null==u&&l.classList.contains(re)&&(u=l.firstElementChild),t.detach(e.droppedElement),document.body.style.cursor="",!u||u.isSameNode(p)||this.isDescendant(p,u))return void(this.fields.dataSource instanceof o.DataManager==!1&&(this.preventExpand=!1));if(i.allowMultiSelection&&p.classList.contains(fe)){var f=t.selectAll("."+fe,i.element);if(e.target.offsetHeight<=33&&n>e.target.offsetHeight-10&&n>6)for(h=f.length-1;h>=0;h--)u.isSameNode(f[h])||this.isDescendant(f[h],u)||this.appendNode(l,f[h],u,e,i,n);else for(h=0;h<f.length;h++)u.isSameNode(f[h])||this.isDescendant(f[h],u)||this.appendNode(l,f[h],u,e,i,n)}else this.appendNode(l,p,u,e,i,n);s=parseInt(p.getAttribute("aria-level"),10),r=!0}this.fields.dataSource instanceof o.DataManager==!1&&(this.preventExpand=!1),this.trigger("nodeDropped",this.getDragEvent(e.event,i,l,e.target,e.dragData.draggedElement,null,s,r)),this.triggerEvent()},r.prototype.appendNode=function(e,t,i,s,n,o){t.classList.contains("e-disable")||i.classList.contains("e-disable")||("LI"===e.nodeName?this.dropAsSiblingNode(t,i,s,n):e.firstElementChild&&e.classList.contains(re)?"UL"===e.firstElementChild.nodeName&&this.dropAsSiblingNode(t,i,s,n):this.dropAsChildNode(t,i,n,null,s,o))},r.prototype.dropAsSiblingNode=function(e,i,s,n){var o,l=t.closest(i,"."+pe),r=t.closest(e,"."+pe),a=t.closest(r,"."+he);s.target.offsetHeight>0&&s.event.offsetY>s.target.offsetHeight-2?o=!1:s.event.offsetY<2&&(o=!0),l.insertBefore(e,o?s.target:s.target.nextElementSibling),this.moveData(e,i,l,o,n),this.updateElement(r,a),this.updateAriaLevel(e),n.element.id===this.element.id?this.updateList():(n.updateInstance(),this.updateInstance())},r.prototype.dropAsChildNode=function(e,i,s,n,o,l){var r=t.closest(e,"."+pe),a=t.closest(r,"."+he),d=t.closest(i,"."+pe);if(o&&l<7)d.insertBefore(e,i),this.moveData(e,i,d,!0,s);else if(o&&o.target.offsetHeight>0&&l>o.target.offsetHeight-10)d.insertBefore(e,i.nextElementSibling),this.moveData(e,i,d,!1,s);else{var h=this.expandParent(i),c=h.childNodes[n];h.insertBefore(e,c),this.moveData(e,c,h,!0,s)}this.updateElement(r,a),this.updateAriaLevel(e),s.element.id===this.element.id?this.updateList():(s.updateInstance(),this.updateInstance())},r.prototype.moveData=function(e,i,s,n,o){var l=t.closest(s,"."+he),r=this.getId(e),a=o.updateChildField(o.treeData,o.fields,r,null,null,!0),d=this.getId(i),h=this.getDataPos(this.treeData,this.fields,d),c=this.getId(l);if(1===this.dataType){this.updateField(this.treeData,this.fields,c,"hasChildren",!0);var p=t.isNullOrUndefined(h)?this.treeData.length:n?h:h+1;if(t.isNullOrUndefined(c)&&!this.hasPid)delete a[0][this.fields.parentID];else{var u=this.isNumberTypeId?parseFloat(c):c;t.setValue(this.fields.parentID,u,a[0])}if(this.treeData.splice(p,0,a[0]),o.element.id!==this.element.id){var f=o.removeChildNodes(r);p++;for(var m=0,v=f.length;m<v;m++)this.treeData.splice(p,0,f[m]),p++;o.groupedData=o.getGroupedData(o.treeData,o.fields.parentID)}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}else this.addChildData(this.treeData,this.fields,c,a,n?h:h+1)},r.prototype.expandParent=function(e){var s=t.select("div."+ge,e);s&&s.classList.contains(de)&&!0!==this.preventExpand&&this.expandAction(e,s,null);var n=t.select("."+pe,e);if(!0===this.preventExpand&&!n&&s&&this.renderChildNodes(e),n=t.select("."+pe,e),t.isNullOrUndefined(n)||!0!==this.preventExpand||(n.style.display="none"),t.isNullOrUndefined(n)||!1!==this.preventExpand||(n.style.display="block"),t.isNullOrUndefined(n)&&!0===this.preventExpand&&(t.isNullOrUndefined(s)&&i.ListBase.generateIcon(this.createElement,e,de,this.listBaseOption),(o=t.select("div."+ge,e))&&o.classList.add("e-icon-expandable"),n=i.ListBase.generateUL(this.createElement,[],null,this.listBaseOption),e.appendChild(n),o?t.removeClass([o],ae):i.ListBase.generateIcon(this.createElement,e,de,this.listBaseOption),e.setAttribute("aria-expanded","false"),n.style.display="none"),t.isNullOrUndefined(n)){this.trigger("nodeExpanding",this.getExpandEvent(e,null)),t.isNullOrUndefined(s)&&i.ListBase.generateIcon(this.createElement,e,ae,this.listBaseOption);var o=t.select("div."+ge,e);o?t.removeClass([o],de):(i.ListBase.generateIcon(this.createElement,e,ae,this.listBaseOption),o=t.select("div."+ge,e),t.removeClass([o],de)),n=i.ListBase.generateUL(this.createElement,[],null,this.listBaseOption),e.appendChild(n),this.addExpand(e),this.trigger("nodeExpanded",this.getExpandEvent(e,null))}return n},r.prototype.updateElement=function(e,i){if(i&&0===e.childElementCount){var s=t.select("div."+ge,i);t.detach(e),t.detach(s);var n=this.getId(i);this.updateField(this.treeData,this.fields,n,"hasChildren",!1),this.removeExpand(i,!0)}},r.prototype.updateAriaLevel=function(e){var i=this.parents(e,"."+pe).length;e.setAttribute("aria-level",""+i),this.updateChildAriaLevel(t.select("."+pe,e),i+1)},r.prototype.updateChildAriaLevel=function(e,i){if(!t.isNullOrUndefined(e))for(var s=e.childNodes,n=0,o=s.length;n<o;n++){var l=s[n];l.setAttribute("aria-level",""+i),this.updateChildAriaLevel(t.select("."+pe,l),i+1)}},r.prototype.renderVirtualEle=function(e){var t;e.event.offsetY>e.target.offsetHeight-2?t=!1:e.event.offsetY<2&&(t=!0);var i=this.createElement("div",{className:be}),s=this.fullRowSelect?t?1:2:t?0:1;e.target.insertBefore(i,e.target.children[s])},r.prototype.removeVirtualEle=function(){var e=t.select("."+be);e&&t.detach(e)},r.prototype.destroyDrag=function(){this.dragObj&&this.dropObj&&(this.dragObj.destroy(),this.dropObj.destroy())},r.prototype.getDragEvent=function(e,i,s,n,l,r,a,d){var h=s?t.closest(s,"."+he):null,c=h?this.getNodeData(h):null,p=i?i.dragLi:l,u=i?i.dragData:null,f=s?this.parents(s,"."+he):null,m=i.dragLi.parentElement,v=i.dragLi?t.closest(m,"."+he):null,g=null,y=null,b=[Ce,"e-drop-in","e-drop-out","e-no-drop"],C=null,N=!0===d?p:h,E=N?t.closest(N,".e-list-parent"):null,x=0;if(v=i.dragLi&&null===v?t.closest(m,"."+re):v,v=!0===d?this.dragParent:v,r)for(;x<4;){if(t.select("."+ge,r).classList.contains(b[x])){C=b[x];break}x++}if(E){var O=0;for(x=0;x<E.childElementCount;x++){if(O=!0!==d&&E.children[x]===p&&h!==p?++O:O,!0!==d&&E.children[x].classList.contains("e-hover")){y=e.offsetY>=23?x+1:x;break}if(E.children[x]===N){e.offsetY,y=x;break}}y=0!==O?--y:y}if(s&&(g=0===f.length?null:s.classList.contains(he)?f[0]:f[1]),h===p&&(g=h),s&&n.offsetHeight<=33&&e.offsetY<n.offsetHeight-10&&e.offsetY>6&&(g=h,!0!==d)){a=++a;var w=g?t.select(".e-list-parent",g):null;if(y=w?w.children.length:0,!(this.fields.dataSource instanceof o.DataManager)&&null===w&&g){var k=g.hasAttribute("data-uid")?this.getChildNodes(this.fields.dataSource,g.getAttribute("data-uid").toString()):null;y=k?k.length:0}}return{cancel:!1,clonedNode:r,event:e,draggedNode:p,draggedNodeData:u,droppedNode:h,droppedNodeData:c,dropIndex:y,dropLevel:a,draggedParentNode:v,dropTarget:g,dropIndicator:C,target:n}},r.prototype.addFullRow=function(e){var i=this.liList.length;if(e)for(s=0;s<i;s++)this.createFullRow(this.liList[s]);else for(var s=0;s<i;s++){var n=t.select(".e-fullrow",this.liList[s]);t.detach(n)}},r.prototype.createFullRow=function(e){var t=this.createElement("div",{className:"e-fullrow"});e.insertBefore(t,e.childNodes[0])},r.prototype.addMultiSelect=function(e){if(e)for(var i=0,s=n=t.selectAll('.e-list-item:not([aria-selected="true"])',this.element);i<s.length;i++)(r=s[i]).setAttribute("aria-selected","false");else for(var n=t.selectAll('.e-list-item[aria-selected="false"]',this.element),o=0,l=n;o<l.length;o++){var r=l[o];r.removeAttribute("aria-selected")}},r.prototype.collapseByLevel=function(e,i,s){if(i>0&&!t.isNullOrUndefined(e))for(var n=this.getVisibleNodes(s,e.childNodes),o=0,l=n.length;o<l;o++){var r=n[o],a=t.select("."+ae,t.select("."+ye,r));t.isNullOrUndefined(a)||this.collapseNode(r,a,null),this.collapseByLevel(t.select("."+pe,r),i-1,s)}},r.prototype.collapseAllNodes=function(e){for(var i=this.getVisibleNodes(e,t.selectAll("."+ae,this.element)),s=0,n=i.length;s<n;s++){var o=i[s],l=t.closest(o,"."+he);this.collapseNode(l,o,null)}},r.prototype.expandByLevel=function(e,i,s){if(i>0&&!t.isNullOrUndefined(e))for(var n=this.getVisibleNodes(s,e.childNodes),o=0,l=n.length;o<l;o++){var r=n[o],a=t.select("."+de,t.select("."+ye,r));t.isNullOrUndefined(a)||this.expandAction(r,a,null),this.expandByLevel(t.select("."+pe,r),i-1,s)}},r.prototype.expandAllNodes=function(e){for(var i=this.getVisibleNodes(e,t.selectAll("."+de,this.element)),s=0,n=i.length;s<n;s++){var o=i[s],l=t.closest(o,"."+he);this.expandAction(l,o,null,!0)}},r.prototype.getVisibleNodes=function(e,i){var s=Array.prototype.slice.call(i);if(e)for(var n=0;n<s.length;n++)t.isVisible(s[n])||(s.splice(n,1),n--);return s},r.prototype.removeNode=function(e){var i=t.closest(e,"."+pe),s=t.closest(i,"."+he);t.detach(e),this.updateElement(i,s),this.updateInstance(),this.removeData(e)},r.prototype.updateInstance=function(){this.updateList(),this.updateSelectedNodes(),this.updateExpandedNodes()},r.prototype.updateList=function(){this.liList=Array.prototype.slice.call(t.selectAll("."+he,this.element))},r.prototype.updateSelectedNodes=function(){this.setProperties({selectedNodes:[]},!0);var e=t.selectAll("."+fe,this.element);this.selectGivenNodes(e)},r.prototype.updateExpandedNodes=function(){this.setProperties({expandedNodes:[]},!0);for(var e=t.selectAll('[aria-expanded="true"]',this.element),i=0,s=e.length;i<s;i++)this.addExpand(e[i])},r.prototype.removeData=function(e){if(1===this.dataType){var t=new o.DataManager(this.treeData),i=this.getId(e),s={},n=this.isNumberTypeId?parseFloat(i):i;s[this.fields.id]=n,t.remove(this.fields.id,s),this.removeChildNodes(i)}else{i=this.getId(e);this.updateChildField(this.treeData,this.fields,i,null,null,!0)}},r.prototype.removeChildNodes=function(e){var i=this.getChildGroup(this.groupedData,e,!1),s=[];if(i)for(var n=0,l=i.length;n<l;n++){var r=new o.DataManager(this.treeData),a=t.getValue(this.fields.id,i[n]).toString(),d={},h=this.isNumberTypeId?parseFloat(a):a;d[this.fields.id]=h;var c=r.remove(this.fields.id,d);s.push(c[0]),this.removeChildNodes(a)}return s},r.prototype.doGivenAction=function(e,i,s){for(var n=0,o=e.length;n<o;n++){var l=this.getElement(e[n]);if(!t.isNullOrUndefined(l)){var r=t.select("."+i,t.select("."+ye,l));t.isNullOrUndefined(r)||(s?this.expandAction(l,r,null):this.collapseNode(l,r,null))}}},r.prototype.addGivenNodes=function(e,s,n,o,l){if(0!==e.length){var r=this.getSortedData(e),a=s?parseFloat(s.getAttribute("aria-level"))+1:1;o&&this.updateMapper(a);for(var d,h=i.ListBase.createListItemFromJson(this.createElement,r,this.listBaseOption,a),c=(d=l||(s?this.expandParent(s):t.select("."+pe,this.element))).childNodes[n],p=0;p<h.length;p++)d.insertBefore(h[p],c);var u=this.getId(s);if(1===this.dataType){this.updateField(this.treeData,this.fields,u,"hasChildren",!0);for(var f=this.getId(c),m=t.isNullOrUndefined(f)?this.treeData.length:this.getDataPos(this.treeData,this.fields,f),v=0;v<e.length;v++){if(!t.isNullOrUndefined(u)){var g=this.isNumberTypeId?parseFloat(u):u;t.setValue(this.fields.parentID,g,e[v])}this.treeData.splice(m,0,e[v]),m++}}else this.addChildData(this.treeData,this.fields,u,e,n);this.finalizeNode(d)}},r.prototype.updateMapper=function(e){var t=1===e?this.fields:this.getChildFields(this.fields,e-1,1);this.updateListProp(t)},r.prototype.updateListProp=function(e){var t=this.getActualProperties(e);this.listBaseOption.fields=t,this.listBaseOption.fields.url=t.hasOwnProperty("navigateUrl")?t.navigateUrl:"navigateUrl"},r.prototype.getDataPos=function(e,i,s){for(var n=null,l=0,r=e.length;l<r;l++){var a=t.getValue(i.id,e[l]);if(e[l]&&a&&a.toString()===s)return l;if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[l]))){if(this.fields.dataSource instanceof o.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[l]))){var d=t.getValue("child",e[l]);if(null!==(n=this.getDataPos(d,this.getChildMapper(i),s)))break}}else{var h=t.getValue(i.child,e[l]);if(null!==(n=this.getDataPos(h,this.getChildMapper(i),s)))break}}return n},r.prototype.addChildData=function(e,i,s,n,l){var r;if(t.isNullOrUndefined(s)){l=t.isNullOrUndefined(l)?e.length:l;for(var a=0,d=n.length;a<d;a++)e.splice(l,0,n[a]),l++;return r}for(var h=0,c=e.length;h<c;h++){var p=t.getValue(i.id,e[h]);if(e[h]&&p&&p.toString()===s){if("string"==typeof i.child&&e[h].hasOwnProperty(i.child)||this.fields.dataSource instanceof o.DataManager&&e[h].hasOwnProperty("child")){var u="string"==typeof i.child?i.child:"child",f=t.getValue(u,e[h]);l=t.isNullOrUndefined(l)?f.length:l;for(var a=0,d=n.length;a<d;a++)f.splice(l,0,n[a]),l++}else{u="string"==typeof i.child?i.child:"child";e[h][u]=n}return!0}if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[h]))){if(this.fields.dataSource instanceof o.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[h]))){f=t.getValue("child",e[h]);if(void 0!==(r=this.addChildData(f,this.getChildMapper(i),s,n,l)))break}}else{var m=t.getValue(i.child,e[h]);if(void 0!==(r=this.addChildData(m,this.getChildMapper(i),s,n,l)))break}}return r},r.prototype.doDisableAction=function(e){for(var i=0,s=e.length;i<s;i++){var n=this.getElement(e[i]);if(t.isNullOrUndefined(n)){(e[i]?e[i].toString():null)&&-1===this.disableNode.indexOf(e[i].toString())&&this.disableNode.push(e[i].toString())}else n.setAttribute("aria-disabled","true"),t.addClass([n],"e-disable")}},r.prototype.doEnableAction=function(e){for(var i=0,s=e.length;i<s;i++){var n=this.getElement(e[i]);if(t.isNullOrUndefined(n)){var o=e[i]?e[i].toString():null;o&&-1!==this.disableNode.indexOf(o)&&this.disableNode.splice(this.disableNode.indexOf(o),1)}else n.removeAttribute("aria-disabled"),t.removeClass([n],"e-disable")}},r.prototype.setTouchClass=function(){var e=t.closest(this.element,".e-bigger");this.touchClass=t.isNullOrUndefined(e)?"":"e-small"},r.prototype.updatePersistProp=function(){this.removeField(this.treeData,this.fields,["selected","expanded"]);for(var e=this.selectedNodes,t=0,i=e.length;t<i;t++)this.updateField(this.treeData,this.fields,e[t],"selected",!0);for(var s=this.expandedNodes,n=0,o=s.length;n<o;n++)this.updateField(this.treeData,this.fields,s[n],"expanded",!0);if(this.showCheckBox){this.removeField(this.treeData,this.fields,["isChecked"]);for(var l=this.checkedNodes,r=0,o=l.length;r<o;r++)this.updateField(this.treeData,this.fields,l[r],"isChecked",!0)}},r.prototype.removeField=function(e,i,s){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(i))for(var n=0,l=e.length;n<l;n++){for(var r=0;r<s.length;r++){var a=this.getMapperProp(i,s[r]);t.isNullOrUndefined(e[n][a])||delete e[n][a]}"string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[n]))?this.fields.dataSource instanceof o.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[n]))&&this.removeField(t.getValue("child",e[n]),this.getChildMapper(i),s):this.removeField(t.getValue(i.child,e[n]),this.getChildMapper(i),s)}},r.prototype.getMapperProp=function(e,i){switch(i){case"selected":return t.isNullOrUndefined(e.selected)?"selected":e.selected;case"expanded":return t.isNullOrUndefined(e.expanded)?"expanded":e.expanded;case"isChecked":return t.isNullOrUndefined(e.isChecked)?"isChecked":e.isChecked;case"hasChildren":return t.isNullOrUndefined(e.hasChildren)?"hasChildren":e.hasChildren;default:return i}},r.prototype.updateField=function(e,i,s,n,l){if(!t.isNullOrUndefined(s))if(1===this.dataType){var r=this.isNumberTypeId?parseFloat(s):s,a=new o.DataManager(this.treeData).executeLocal((new o.Query).where(i.id,"equal",r,!1));t.setValue(this.getMapperProp(i,n),l,a[0])}else this.updateChildField(e,i,s,n,l)},r.prototype.updateChildField=function(e,i,s,n,l,r){var a;if(t.isNullOrUndefined(e))return a;for(var d=0,h=e.length;d<h;d++){var c=t.getValue(i.id,e[d]);if(e[d]&&c&&c.toString()===s)return r?a=e.splice(d,1):(t.setValue(this.getMapperProp(i,n),l,e[d]),a=[]),a;if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[d]))){if(this.fields.dataSource instanceof o.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[d]))){var p=t.getValue("child",e[d]);if(void 0!==(a=this.updateChildField(p,this.getChildMapper(i),s,n,l,r)))break}}else{var u=t.getValue(i.child,e[d]);if(void 0!==(a=this.updateChildField(u,this.getChildMapper(i),s,n,l,r)))break}}return a},r.prototype.triggerEvent=function(){this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate();var e={data:this.treeData};this.trigger("dataSourceChanged",e)},r.prototype.updateBlazorTemplate=function(){t.updateBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate",this,!1)},r.prototype.wireInputEvents=function(e){t.EventHandler.add(e,"blur",this.inputFocusOut,this)},r.prototype.wireEditingEvents=function(e){if(e){var i=this;this.touchEditObj=new t.Touch(this.element,{tap:function(e){2===e.tapCount&&(e.originalEvent.preventDefault(),i.editingHandler(e.originalEvent))}})}else this.touchEditObj&&this.touchEditObj.destroy()},r.prototype.wireClickEvent=function(e){if(e){var i=this;this.touchClickObj=new t.Touch(this.element,{tap:function(e){e.originalEvent.preventDefault(),i.clickHandler(e)}})}else this.touchClickObj&&this.touchClickObj.destroy()},r.prototype.wireExpandOnEvent=function(e){var i=this;if(e){var s=this;this.touchExpandObj=new t.Touch(this.element,{tap:function(e){("Click"===i.expandOnType||"DblClick"===i.expandOnType&&2===e.tapCount)&&s.expandHandler(e)}})}else this.touchExpandObj&&this.touchExpandObj.destroy()},r.prototype.mouseDownHandler=function(e){this.mouseDownStatus=!0,(e.shiftKey||e.ctrlKey)&&e.preventDefault(),e.ctrlKey&&this.allowMultiSelection&&t.EventHandler.add(this.element,"contextmenu",this.preventContextMenu,this)},r.prototype.preventContextMenu=function(e){e.preventDefault()},r.prototype.wireEvents=function(){t.EventHandler.add(this.element,"mousedown",this.mouseDownHandler,this),this.wireClickEvent(!0),"None"!==this.expandOnType&&this.wireExpandOnEvent(!0),t.EventHandler.add(this.element,"focus",this.focusIn,this),t.EventHandler.add(this.element,"blur",this.focusOut,this),t.EventHandler.add(this.element,"mouseover",this.onMouseOver,this),t.EventHandler.add(this.element,"mouseout",this.onMouseLeave,this),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},r.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler),this.wireClickEvent(!1),this.wireExpandOnEvent(!1),t.EventHandler.remove(this.element,"focus",this.focusIn),t.EventHandler.remove(this.element,"blur",this.focusOut),t.EventHandler.remove(this.element,"mouseover",this.onMouseOver),t.EventHandler.remove(this.element,"mouseout",this.onMouseLeave),this.keyboardModule.destroy()},r.prototype.parents=function(e,i){for(var s=[],n=e.parentNode;!t.isNullOrUndefined(n);)t.matches(n,i)&&s.push(n),n=n.parentNode;return s},r.prototype.isDescendant=function(e,i){for(var s=i.parentNode;!t.isNullOrUndefined(s);){if(s===e)return!0;s=s.parentNode}return!1},r.prototype.showSpinner=function(e){t.addClass([e],me),s.createSpinner({target:e,width:t.Browser.isDevice?16:14},this.createElement),s.showSpinner(e)},r.prototype.hideSpinner=function(e){s.hideSpinner(e),e.innerHTML="",t.removeClass([e],me)},r.prototype.setCheckedNodes=function(e){e=JSON.parse(JSON.stringify(e)),this.uncheckAll(this.checkedNodes),this.setIndeterminate(e),e.length>0&&this.checkAll(e)},r.prototype.setValidCheckedNode=function(e){if(1===this.dataType){var i=this.fields,s=new o.DataManager(this.treeData).executeLocal((new o.Query).where(i.id,"equal",e,!0));if(s[0]&&(this.setChildCheckState(s,e,s[0]),this.autoCheck)){for(var n=s[0][this.fields.parentID]?s[0][this.fields.parentID].toString():null,l=this.getChildNodes(this.treeData,n),r=0,a=0;a<l.length;a++){var d=l[a][this.fields.id].toString();-1!==this.checkedNodes.indexOf(d)&&r++}r===l.length&&-1===this.checkedNodes.indexOf(n)&&n&&this.checkedNodes.push(n)}}else if(2===this.dataType)for(var h=0;h<this.treeData.length;h++){if((this.treeData[h][this.fields.id]?this.treeData[h][this.fields.id].toString():"")===e&&-1===this.checkedNodes.indexOf(e)){this.checkedNodes.push(e);break}var c=t.getValue(this.fields.child.toString(),this.treeData[h]);c&&this.setChildCheckState(c,e,this.treeData[h])}},r.prototype.setChildCheckState=function(e,i,s){var n,o=0;if(1===this.dataType){s&&(n=s[this.fields.id]?s[this.fields.id].toString():null);for(r=0;r<e.length;r++){var l=e[r][this.fields.id]?e[r][this.fields.id].toString():null;s&&n&&this.autoCheck&&-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(l)&&this.checkedNodes.push(l),l===i&&-1===this.checkedNodes.indexOf(i)&&this.checkedNodes.push(i),(d=this.getChildNodes(this.treeData,l))&&this.setChildCheckState(d,i,s)}}else{s&&(n=s[this.fields.id]?s[this.fields.id].toString():"");for(var r=0;r<e.length;r++){var a=e[r][this.fields.id]?e[r][this.fields.id].toString():"";s&&n&&this.autoCheck&&-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(a)&&this.checkedNodes.push(a),a===i&&-1===this.checkedNodes.indexOf(i)&&this.checkedNodes.push(i);var d=t.getValue(this.fields.child.toString(),e[r]);d&&this.setChildCheckState(d,i,e[r]),-1!==this.checkedNodes.indexOf(a)&&this.autoCheck&&o++,o===e.length&&-1===this.checkedNodes.indexOf(n)&&this.autoCheck&&this.checkedNodes.push(n)}}},r.prototype.setIndeterminate=function(e){for(var t=0;t<e.length;t++)this.setValidCheckedNode(e[t])},r.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"allowDragAndDrop":this.setDragAndDrop(this.allowDragAndDrop);break;case"allowEditing":this.wireEditingEvents(this.allowEditing);break;case"allowMultiSelection":if(this.selectedNodes.length>1){var o=this.getElement(this.selectedNodes[0]);this.isLoaded=!1,this.removeSelectAll(),this.selectNode(o,null),this.isLoaded=!0}this.setMultiSelect(this.allowMultiSelection),this.addMultiSelect(this.allowMultiSelection);break;case"checkedNodes":this.showCheckBox&&(this.checkedNodes=i.checkedNodes,this.setCheckedNodes(e.checkedNodes));break;case"autoCheck":this.showCheckBox&&(this.autoCheck=e.autoCheck,this.ensureIndeterminate());break;case"cssClass":this.setCssClass(i.cssClass,e.cssClass);break;case"enableRtl":this.setEnableRtl();break;case"expandedNodes":this.isAnimate=!1,this.setProperties({expandedNodes:[]},!0),this.collapseAll(),this.isInitalExpand=!0,this.setProperties({expandedNodes:t.isNullOrUndefined(e.expandedNodes)?[]:e.expandedNodes},!0),this.doExpandAction(),this.isInitalExpand=!1,this.isAnimate=!0;break;case"expandOn":this.wireExpandOnEvent(!1),this.setExpandOnType(),"None"!==this.expandOnType&&this.wireExpandOnEvent(!0);break;case"fields":this.isAnimate=!1,this.initialRender=!0,this.updateListProp(this.fields),this.reRenderNodes(),this.initialRender=!1,this.isAnimate=!0;break;case"fullRowSelect":this.setFullRow(this.fullRowSelect),this.addFullRow(this.fullRowSelect);break;case"loadOnDemand":if(!1===this.loadOnDemand&&!this.onLoaded){for(var l=this.element.querySelectorAll("li"),r=0;r<l.length;)this.renderChildNodes(l[r],!0,null,!0),r++;this.onLoaded=!0}break;case"nodeTemplate":this.nodeTemplateFn=this.templateComplier(this.nodeTemplate),this.reRenderNodes();break;case"selectedNodes":this.removeSelectAll(),this.setProperties({selectedNodes:e.selectedNodes},!0),this.doSelectionAction();break;case"showCheckBox":case"sortOrder":this.reRenderNodes()}},r.prototype.destroy=function(){t.resetBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate"),this.element.removeAttribute("aria-activedescendant"),this.element.removeAttribute("tabindex"),this.unWireEvents(),this.wireEditingEvents(!1),this.rippleFn(),this.rippleIconFn(),this.setCssClass(this.cssClass,null),this.setDragAndDrop(!1),this.setFullRow(!1),this.element.innerHTML="",e.prototype.destroy.call(this)},r.prototype.addNodes=function(e,i,s,n){if(!t.isNullOrUndefined(e)){e=JSON.parse(JSON.stringify(e));var l=this.getElement(i);if(this.preventExpand=n,this.fields.dataSource instanceof o.DataManager){var r,a=l?l.querySelector("."+ge):null,d=this;l&&a&&a.classList.contains(de)&&null===l.querySelector("."+pe)?d.renderChildNodes(l,null,function(){r=l.querySelector("."+pe),d.addGivenNodes(e,l,s,!0,r),d.triggerEvent()}):(this.addGivenNodes(e,l,s,!0),this.triggerEvent())}else if(2===this.dataType)this.addGivenNodes(e,l,s);else{if(l)this.addGivenNodes(e,l,s);else{e=this.getSortedData(e);for(var h=0;h<e.length;h++){var c=t.getValue(this.fields.parentID,e[h]);l=c?this.getElement(c.toString()):c,this.addGivenNodes([e[h]],l,s)}}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}this.showCheckBox&&l&&this.ensureParentCheckState(l),this.fields.dataSource instanceof o.DataManager==!1&&(this.preventExpand=!1,this.triggerEvent())}},r.prototype.beginEdit=function(e){var i=this.getElement(e);t.isNullOrUndefined(i)||this.createTextbox(i,null)},r.prototype.checkAll=function(e){this.showCheckBox&&this.doCheckBoxAction(e,!0)},r.prototype.collapseAll=function(e,i,s){t.isNullOrUndefined(e)?i>0?this.collapseByLevel(t.select("."+pe,this.element),i,s):this.collapseAllNodes(s):this.doGivenAction(e,ae,!1)},r.prototype.disableNodes=function(e){t.isNullOrUndefined(e)||this.doDisableAction(e)},r.prototype.enableNodes=function(e){t.isNullOrUndefined(e)||this.doEnableAction(e)},r.prototype.ensureVisible=function(e){var i=this.getElement(e);if(!t.isNullOrUndefined(i)){var s=this.parents(i,"."+he);this.expandAll(s),setTimeout(function(){i.scrollIntoView(!0)},450)}},r.prototype.expandAll=function(e,i,s){t.isNullOrUndefined(e)?i>0?this.expandByLevel(t.select("."+pe,this.element),i,s):this.expandAllNodes(s):this.doGivenAction(e,de,!0)},r.prototype.getAllCheckedNodes=function(){var e=this.checkedNodes,t=[],i=0,s=this.fields.id;for(i;i<this.treeData.length;i++){var n=null,o=null,l=this.element.querySelector('[data-uid="'+this.treeData[i][s].toString()+'"]');l&&null===l.querySelector(".e-list-item")&&(!0===this.getTreeData()[i][this.fields.isChecked]&&-1===this.checkedElement.indexOf(this.getTreeData()[i][s].toString())&&(t.push(this.treeData[i][s].toString()),n=2),2!==n&&(n=1),null!==(o=this.getChildNodes(this.getTreeData(),this.getTreeData()[i][s].toString()))&&this.autoCheck?this.allCheckNode(o,t,n):o=null)}for(i=0;i<e.length;)if(-1===t.indexOf(e[i])){t.push(e[i]);var r=this.element.querySelector('[data-uid="'+e[i]+'"]');if(r&&null===r.querySelector(".e-list-item")){var a=this.getChildNodes(this.treeData,e[i].toString());a&&this.autoCheck?this.allCheckNode(a,t):a=null}i++}else i++;return t},r.prototype.getNode=function(e){var t=this.getElement(e);return this.getNodeData(t,!0)},r.prototype.getTreeData=function(e){var i=this.getId(e);if(this.updatePersistProp(),t.isNullOrUndefined(i))return this.treeData;var s=this.getNodeObject(i);return t.isNullOrUndefined(s)?[]:[s]},r.prototype.moveNodes=function(e,i,s,n){var l=this.getElement(i);if(!t.isNullOrUndefined(l)){for(var r=0;r<e.length;r++){var a=this.getElement(e[r]);t.isNullOrUndefined(a)||l.isSameNode(a)||this.isDescendant(a,l)||(this.preventExpand=n,this.dropAsChildNode(a,l,this,s))}this.fields.dataSource instanceof o.DataManager==!1&&(this.preventExpand=!1),this.triggerEvent()}},r.prototype.removeNodes=function(e){if(!t.isNullOrUndefined(e)){for(var i=0,s=e.length;i<s;i++){var n=this.getElement(e[i]);t.isNullOrUndefined(n)||this.removeNode(n)}1===this.dataType&&(this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)),this.triggerEvent()}},r.prototype.updateNode=function(e,i){var s=this;if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(i)&&this.allowEditing){var n=this.getElement(e);if(!t.isNullOrUndefined(n)){var o=t.select("."+ce,n);this.updateOldText(n);var l=this.getEditEvent(n,null,null);this.trigger("nodeEditing",l,function(e){e.cancel||s.appendNewText(n,o,i,!1)})}}},r.prototype.uncheckAll=function(e){this.showCheckBox&&this.doCheckBoxAction(e,!1)};var a;return le([t.Property(!1)],r.prototype,"allowDragAndDrop",void 0),le([t.Property(!1)],r.prototype,"allowEditing",void 0),le([t.Property(!1)],r.prototype,"allowMultiSelection",void 0),le([t.Complex({},Se)],r.prototype,"animation",void 0),le([t.Property()],r.prototype,"checkedNodes",void 0),le([t.Property("")],r.prototype,"cssClass",void 0),le([t.Property(!1)],r.prototype,"enablePersistence",void 0),le([t.Property()],r.prototype,"expandedNodes",void 0),le([t.Property("Auto")],r.prototype,"expandOn",void 0),le([t.Complex({},we)],r.prototype,"fields",void 0),le([t.Property(!0)],r.prototype,"fullRowSelect",void 0),le([t.Property(!0)],r.prototype,"loadOnDemand",void 0),le([t.Property()],r.prototype,"nodeTemplate",void 0),le([t.Property()],r.prototype,"selectedNodes",void 0),le([t.Property("None")],r.prototype,"sortOrder",void 0),le([t.Property(!1)],r.prototype,"showCheckBox",void 0),le([t.Property(!0)],r.prototype,"autoCheck",void 0),le([t.Event()],r.prototype,"created",void 0),le([t.Event()],r.prototype,"dataBound",void 0),le([t.Event()],r.prototype,"dataSourceChanged",void 0),le([t.Event()],r.prototype,"drawNode",void 0),le([t.Event()],r.prototype,"destroyed",void 0),le([t.Event()],r.prototype,"keyPress",void 0),le([t.Event()],r.prototype,"nodeChecked",void 0),le([t.Event()],r.prototype,"nodeChecking",void 0),le([t.Event()],r.prototype,"nodeClicked",void 0),le([t.Event()],r.prototype,"nodeCollapsed",void 0),le([t.Event()],r.prototype,"nodeCollapsing",void 0),le([t.Event()],r.prototype,"nodeDragging",void 0),le([t.Event()],r.prototype,"nodeDragStart",void 0),le([t.Event()],r.prototype,"nodeDragStop",void 0),le([t.Event()],r.prototype,"nodeDropped",void 0),le([t.Event()],r.prototype,"nodeEdited",void 0),le([t.Event()],r.prototype,"nodeEditing",void 0),le([t.Event()],r.prototype,"nodeExpanded",void 0),le([t.Event()],r.prototype,"nodeExpanding",void 0),le([t.Event()],r.prototype,"nodeSelected",void 0),le([t.Event()],r.prototype,"nodeSelecting",void 0),r=a=le([t.NotifyPropertyChanges],r)}(t.Component),Ae=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Ie=function(e,t,i,s){var n,o=arguments.length,l=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(o<3?n(l):o>3?n(t,i,l):n(t,i))||l);return o>3&&l&&Object.defineProperty(t,i,l),l},De="e-close",Pe="e-open",Me="e-right",Ue="e-left",He="e-over",Te="e-push",Be="e-sidebar-context",Re=function(e){function i(t,i){return e.call(this,t,i)||this}return Ae(i,e),i.prototype.preRender=function(){this.setWidth()},i.prototype.render=function(){this.initialize(),this.wireEvents(),this.renderComplete()},i.prototype.initialize=function(){this.setTarget(),this.addClass(),this.setZindex(),this.enableDock&&this.setDock(),this.isOpen?this.show():this.setMediaQuery(),this.checkType(!0),this.setType(this.type),this.setCloseOnDocumentClick(),this.setEnableRTL(),t.Browser.isDevice&&(this.windowWidth=window.innerWidth)},i.prototype.setEnableRTL=function(){this.enableRtl?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},i.prototype.setTarget=function(){this.sidebarEleCopy=this.element.cloneNode(!0),"string"==typeof this.target&&this.setProperties({target:document.querySelector(this.target)},!0),this.target&&(this.target.insertBefore(this.element,this.target.children[0]),t.addClass([this.element],"e-sidebar-absolute"),t.addClass([this.target],Be))},i.prototype.setCloseOnDocumentClick=function(){this.closeOnDocumentClick?t.EventHandler.add(document,"mousedown touchstart",this.documentclickHandler,this):t.EventHandler.remove(document,"mousedown touchstart",this.documentclickHandler)},i.prototype.setWidth=function(){this.enableDock&&"Left"===this.position?t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)}):this.enableDock&&"Right"===this.position?t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)}):this.enableDock||t.setStyleAttribute(this.element,{width:this.setDimension(this.width)})},i.prototype.setDimension=function(e){return e="number"==typeof e?t.formatUnit(e):"string"==typeof e?e.match(/px|%|em/)?e:t.formatUnit(e):"100%"},i.prototype.setZindex=function(){t.setStyleAttribute(this.element,{"z-index":""+this.zIndex})},i.prototype.addClass=function(){var e=document.querySelector(".e-main-content");t.isNullOrUndefined(e||this.element.nextElementSibling)||t.addClass([e||this.element.nextElementSibling],["e-content-animation"]),this.enableDock||"Auto"===this.type||t.addClass([this.element],["e-visibility"]),t.removeClass([this.element],[Pe,De,Me,Ue,"e-slide",Te,He]),this.element.classList.add("e-sidebar"),t.addClass([this.element],"Right"===this.position?Me:Ue),"Auto"!==this.type||t.Browser.isDevice?this.isOpen||t.addClass([this.element],De):this.show(),this.enableDock&&t.addClass([this.element],"e-dock"),this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):"0",this.element.setAttribute("tabindex",this.tabIndex)},i.prototype.checkType=function(e){"Push"!==this.type&&"Over"!==this.type&&"Slide"!==this.type?this.type="Auto":this.element.classList.contains(De)||e||this.hide()},i.prototype.transitionEnd=function(e){this.setDock(),t.isNullOrUndefined(e)||e.target!==this.element||this.triggerChange(),t.EventHandler.remove(this.element,"transitionend",this.transitionEnd)},i.prototype.destroyBackDrop=function(){var e=document.querySelector(".e-main-content")||this.element.nextElementSibling;this.target&&this.showBackdrop&&e?t.removeClass([e],"e-backdrop"):this.showBackdrop&&this.modal&&(this.modal.style.display="none",this.modal.outerHTML="",this.modal=null)},i.prototype.hide=function(e){var i=this,s={model:this,element:this.element,cancel:!1,isInteracted:!t.isNullOrUndefined(e),event:e||null};t.isBlazor()&&delete s.model,this.trigger("close",s,function(e){if(!e.cancel){if(i.element.classList.contains(De))return;i.element.classList.contains(Pe)&&!i.animate&&i.triggerChange(),t.addClass([i.element],De),t.removeClass([i.element],Pe),i.enableDock?t.setStyleAttribute(i.element,{width:t.formatUnit(i.dockSize)}):t.setStyleAttribute(i.element,{width:t.formatUnit(i.width)}),i.setType(i.type);var s=document.querySelector(".e-main-content")||i.element.nextElementSibling;!i.enableDock&&s&&(s.style.transform="translateX(0px)","Left"===i.position?s.style.marginLeft="0px":s.style.marginRight="0px"),i.destroyBackDrop(),i.setAnimation(),"Slide"===i.type&&document.body.classList.remove("e-sidebar-overflow"),i.setProperties({isOpen:!1},!0),i.enableDock&&setTimeout(function(){return i.setTimeOut()},50),t.EventHandler.add(i.element,"transitionend",i.transitionEnd,i)}})},i.prototype.setTimeOut=function(){var e=document.querySelector(".e-main-content")||this.element.nextElementSibling;this.element.classList.contains(Pe)&&e?"Left"===this.position?"auto"===this.width?e.style.marginLeft=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginLeft=this.setDimension(this.width):"auto"===this.width?e.style.marginRight=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginRight=this.setDimension(this.width):this.element.classList.contains(De)&&e&&("Left"===this.position?"auto"===this.dockSize?e.style.marginLeft=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginLeft=this.setDimension(this.dockSize):"auto"===this.dockSize?e.style.marginRight=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginRight=this.setDimension(this.dockSize))},i.prototype.show=function(e){var i=this,s={model:this,element:this.element,cancel:!1,isInteracted:!t.isNullOrUndefined(e),event:e||null};t.isBlazor()&&delete s.model,this.trigger("open",s,function(e){if(!e.cancel){if(t.removeClass([i.element],"e-visibility"),i.element.classList.contains(Pe))return;i.element.classList.contains(De)&&!i.animate&&i.triggerChange(),t.addClass([i.element],[Pe,"e-transition"]),t.setStyleAttribute(i.element,{transform:""}),t.removeClass([i.element],De),t.setStyleAttribute(i.element,{width:t.formatUnit(i.width)}),i.setType(i.type),i.createBackDrop(),i.setAnimation(),"Slide"===i.type&&document.body.classList.add("e-sidebar-overflow"),i.setProperties({isOpen:!0},!0),t.EventHandler.add(i.element,"transitionend",i.transitionEnd,i)}})},i.prototype.setAnimation=function(){this.animate?t.removeClass([this.element],"e-disable-animation"):t.addClass([this.element],"e-disable-animation")},i.prototype.triggerChange=function(){var e={name:"change",element:this.element};this.trigger("change",e)},i.prototype.setDock=function(){this.enableDock&&"Left"===this.position&&!this.getState()?t.setStyleAttribute(this.element,{transform:"translateX(-100%) translateX("+this.setDimension(this.dockSize)+")"}):this.enableDock&&"Right"===this.position&&!this.getState()&&t.setStyleAttribute(this.element,{transform:"translateX(100%) translateX(-"+this.setDimension(this.dockSize)+")"}),this.element.classList.contains(De)&&this.enableDock&&t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)})},i.prototype.createBackDrop=function(){if(this.target&&this.showBackdrop&&this.getState()){var e=document.querySelector(".e-main-content")||this.element.nextElementSibling;t.addClass([e],"e-backdrop")}else this.showBackdrop&&!this.modal&&this.getState()&&(this.modal=this.createElement("div"),this.modal.className="e-sidebar-overlay",this.modal.style.display="block",document.body.appendChild(this.modal))},i.prototype.getPersistData=function(){return this.addOnPersist(["type","position","isOpen"])},i.prototype.getModuleName=function(){return"sidebar"},i.prototype.toggle=function(e){this.element.classList.contains(Pe)?this.hide():this.show()},i.prototype.getState=function(){return!!this.element.classList.contains(Pe)},i.prototype.setMediaQuery=function(){if(this.mediaQuery){("string"==typeof this.mediaQuery?window.matchMedia(this.mediaQuery).matches:this.mediaQuery.matches)&&this.windowWidth!==window.innerWidth?this.show():this.getState()&&this.windowWidth!==window.innerWidth&&this.hide()}},i.prototype.resize=function(e){"Auto"===this.type&&(t.Browser.isDevice?t.addClass([this.element],He):t.addClass([this.element],Te)),this.setMediaQuery(),t.Browser.isDevice&&(this.windowWidth=window.innerWidth)},i.prototype.documentclickHandler=function(e){t.closest(e.target,".e-control.e-sidebar")||this.hide(e)},i.prototype.enableGestureHandler=function(e){"Left"===this.position&&"Right"===e.swipeDirection&&e.startX<=20&&e.distanceX>=50&&e.velocity>=.5?this.show():"Left"===this.position&&"Left"===e.swipeDirection?this.hide():"Right"===this.position&&"Right"===e.swipeDirection?this.hide():"Right"===this.position&&"Left"===e.swipeDirection&&window.innerWidth-e.startX<=20&&e.distanceX>=50&&e.velocity>=.5&&this.show()},i.prototype.setEnableGestures=function(){this.enableGestures?(this.mainContentEle=new t.Touch(document.body,{swipe:this.enableGestureHandler.bind(this)}),this.sidebarEle=new t.Touch(this.element,{swipe:this.enableGestureHandler.bind(this)})):this.mainContentEle&&this.sidebarEle&&(this.mainContentEle.destroy(),this.sidebarEle.destroy())},i.prototype.wireEvents=function(){this.setEnableGestures(),window.addEventListener("resize",this.resize.bind(this))},i.prototype.unWireEvents=function(){window.removeEventListener("resize",this.resize.bind(this)),t.EventHandler.remove(document,"mousedown touchstart",this.documentclickHandler),this.mainContentEle&&this.mainContentEle.destroy(),this.sidebarEle&&this.sidebarEle.destroy()},i.prototype.onPropertyChanged=function(i,s){for(var n=document.querySelector(".e-main-content")||this.element.nextElementSibling,o=0,l=Object.keys(i);o<l.length;o++)switch(l[o]){case"isOpen":this.isOpen?this.show():this.hide();break;case"width":this.setWidth(),this.getState()||this.setDock();break;case"animate":this.setAnimation();break;case"type":this.checkType(!1),t.removeClass([this.element],["e-visibility"]),this.addClass(),t.addClass([this.element],"Auto"===this.type?t.Browser.isDevice?["e-over"]:["e-push"]:["e-"+this.type.toLowerCase()]);break;case"position":this.element.style.transform="",this.setDock(),n&&("Left"===this.position?n.style.marginRight="0px":n.style.marginLeft="0px"),"Right"===this.position?(t.removeClass([this.element],Ue),t.addClass([this.element],Me)):(t.removeClass([this.element],Me),t.addClass([this.element],Ue)),this.setType(this.type);break;case"showBackdrop":this.showBackdrop?this.createBackDrop():this.modal&&(this.modal.style.display="none",this.modal.outerHTML="",this.modal=null);break;case"target":"string"==typeof this.target&&this.setProperties({target:document.querySelector(this.target)},!0),t.isNullOrUndefined(this.target)?(t.removeClass([this.element],"e-sidebar-absolute"),t.removeClass([s.target],Be),t.setStyleAttribute(n,{"margin-left":0,"margin-right":0}),document.body.insertAdjacentElement("afterbegin",this.element)):e.prototype.refresh.call(this);break;case"closeOnDocumentClick":this.setCloseOnDocumentClick();break;case"enableDock":this.getState()||this.setDock();break;case"zIndex":this.setZindex();break;case"mediaQuery":this.setMediaQuery();break;case"enableGestures":this.setEnableGestures();break;case"enableRtl":this.setEnableRTL()}},i.prototype.setType=function(e){var i=this.element.getBoundingClientRect().width;this.setZindex();var s=document.querySelector(".e-main-content")||this.element.nextElementSibling;s&&(s.style.transform="translateX(0px)",t.Browser.isDevice||"Auto"===this.type||("Left"===this.position?s.style.marginLeft="0px":s.style.marginRight="0px"));var n=(this.position,i+"px"),o="Left"===this.position?i:-i;switch(t.removeClass([this.element],[Te,He,"e-slide"]),e){case"Push":t.addClass([this.element],[Te]),s&&(this.enableDock||this.element.classList.contains(Pe))&&("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n);break;case"Slide":t.addClass([this.element],["e-slide"]),s&&(this.enableDock||this.element.classList.contains(Pe))&&(s.style.transform="translateX("+o+"px)");break;case"Over":t.addClass([this.element],[He]),this.enableDock&&this.element.classList.contains(De)&&s&&("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n);break;case"Auto":t.addClass([this.element],["e-transition"]),t.Browser.isDevice?s&&this.enableDock&&!this.getState()?("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n,t.addClass([this.element],Te)):t.addClass([this.element],He):(t.addClass([this.element],Te),s&&(this.enableDock||this.element.classList.contains(Pe))&&("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n)),this.createBackDrop()}},i.prototype.destroy=function(){e.prototype.destroy.call(this),t.removeClass([this.element],[Pe,De,Te,"e-slide",He,Ue,Me,"e-transition"]),this.target&&(t.removeClass([this.element],"e-sidebar-absolute"),t.removeClass([this.target],Be)),this.destroyBackDrop(),this.element.style.width="",this.element.style.zIndex="",this.element.style.transform="",this.windowWidth=null,t.isNullOrUndefined(this.sidebarEleCopy.getAttribute("tabindex"))?this.element.removeAttribute("tabindex"):this.element.setAttribute("tabindex",this.tabIndex);var i=document.querySelector(".e-main-content")||this.element.nextElementSibling;t.isNullOrUndefined(i)||(i.style.margin="",i.style.transform=""),this.unWireEvents()},Ie([t.Property("auto")],i.prototype,"dockSize",void 0),Ie([t.Property(null)],i.prototype,"mediaQuery",void 0),Ie([t.Property(!1)],i.prototype,"enableDock",void 0),Ie([t.Property("en-US")],i.prototype,"locale",void 0),Ie([t.Property(!1)],i.prototype,"enablePersistence",void 0),Ie([t.Property(!0)],i.prototype,"enableGestures",void 0),Ie([t.Property(!1)],i.prototype,"isOpen",void 0),Ie([t.Property(!1)],i.prototype,"enableRtl",void 0),Ie([t.Property(!0)],i.prototype,"animate",void 0),Ie([t.Property("auto")],i.prototype,"height",void 0),Ie([t.Property(!1)],i.prototype,"closeOnDocumentClick",void 0),Ie([t.Property("Left")],i.prototype,"position",void 0),Ie([t.Property(null)],i.prototype,"target",void 0),Ie([t.Property(!1)],i.prototype,"showBackdrop",void 0),Ie([t.Property("Auto")],i.prototype,"type",void 0),Ie([t.Property("auto")],i.prototype,"width",void 0),Ie([t.Property(1e3)],i.prototype,"zIndex",void 0),Ie([t.Event()],i.prototype,"created",void 0),Ie([t.Event()],i.prototype,"close",void 0),Ie([t.Event()],i.prototype,"open",void 0),Ie([t.Event()],i.prototype,"change",void 0),Ie([t.Event()],i.prototype,"destroyed",void 0),i=Ie([t.NotifyPropertyChanges],i)}(t.Component);return e.MenuAnimationSettings=x,e.HScroll=d,e.VScroll=p,e.Item=I,e.Toolbar=D,e.AccordionActionSettings=B,e.AccordionAnimationSettings=R,e.AccordionItem=j,e.Accordion=F,e.ContextMenu=W,e.Menu=Y,e.TabActionSettings=ee,e.TabAnimationSettings=te,e.Header=ie,e.TabItem=se,e.Tab=ne,e.FieldsSettings=we,e.ActionSettings=ke,e.NodeAnimationSettings=Se,e.TreeView=Le,e.Sidebar=Re,e}({},ej.base,ej.lists,ej.popups,ej.buttons,ej.data,ej.inputs),this.ejs=ej;
1
+ this.ej=this.ej||{},this.ej.navigations=function(e,t,i,s,n,o,r){"use strict";var l=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),a=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},d=function(e){function i(t,i){return e.call(this,t,i)||this}return l(i,e),i.prototype.preRender=function(){this.browser=t.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=t.Browser.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=t.getUniqueID("hscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add("e-rtl")},i.prototype.render=function(){this.touchModule=new t.Touch(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),t.EventHandler.add(this.scrollEle,"scroll",this.scrollHandler,this),this.isDevice?(this.element.classList.add("e-scroll-device"),this.createOverlay(this.element)):this.createNavIcon(this.element),this.setScrollState()},i.prototype.setScrollState=function(){t.isNullOrUndefined(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetWidth,this.customStep=!1):this.customStep=!0},i.prototype.initialize=function(){var e=this.createElement("div",{className:"e-hscroll-content"}),t=this.createElement("div",{className:"e-hscroll-bar"});t.setAttribute("tabindex","-1");for(var i=this.element,s=0,n=[].slice.call(i.children);s<n.length;s++){var o=n[s];e.appendChild(o)}t.appendChild(e),i.appendChild(t),t.style.overflowX="hidden",this.scrollEle=t,this.scrollItems=e},i.prototype.getPersistData=function(){var e=["scrollStep"];return this.addOnPersist(e)},i.prototype.getModuleName=function(){return"hScroll"},i.prototype.destroy=function(){var i=this.element;i.style.display="",i.classList.remove("e-hscroll"),i.classList.remove("e-scroll-device");var s=t.selectAll(".e-"+i.id+"_nav.e-scroll-nav",i),n=t.selectAll(".e-scroll-overlay",i);[].slice.call(n).forEach(function(e){t.detach(e)});for(var o=0,r=[].slice.call(this.scrollItems.children);o<r.length;o++){var l=r[o];i.appendChild(l)}this.uniqueId&&this.element.removeAttribute("id"),t.detach(this.scrollEle),s.length>0&&(t.detach(s[0]),t.isNullOrUndefined(s[1])||t.detach(s[1])),t.EventHandler.remove(this.scrollEle,"scroll",this.scrollHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},i.prototype.disable=function(e){var i=t.selectAll(".e-scroll-nav:not(.e-overlay)",this.element);e?this.element.classList.add("e-overlay"):this.element.classList.remove("e-overlay"),[].slice.call(i).forEach(function(t){t.setAttribute("tabindex",e?"-1":"0")})},i.prototype.createOverlay=function(e){var t=e.id.concat("_nav"),i=this.createElement("div",{className:"e-scroll-overlay e-scroll-right-overlay"}),s="e-"+e.id.concat("_nav e-scroll-nav e-scroll-right-nav"),n=this.createElement("div",{id:t.concat("_right"),className:s}),o=this.createElement("div",{className:"e-nav-right-arrow e-nav-arrow e-icons"});n.appendChild(o);var r=this.createElement("div",{className:"e-scroll-overlay e-scroll-left-overlay"});this.ieCheck&&n.classList.add("e-ie-align"),e.appendChild(i),e.appendChild(n),e.insertBefore(r,e.firstChild),this.eventBinding([n])},i.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav e-scroll-nav e-scroll-right-nav"),s=this.createElement("div",{id:t.concat("_right"),className:i});s.setAttribute("aria-disabled","false");var n=this.createElement("div",{className:"e-nav-right-arrow e-nav-arrow e-icons"}),o="e-"+e.id.concat("_nav e-scroll-nav e-scroll-left-nav"),r=this.createElement("div",{id:t.concat("_left"),className:o+" e-overlay"});r.setAttribute("aria-disabled","true");var l=this.createElement("div",{className:"e-nav-left-arrow e-nav-arrow e-icons"});r.appendChild(l),s.appendChild(n),e.appendChild(s),e.insertBefore(r,e.firstChild),this.ieCheck&&(s.classList.add("e-ie-align"),r.classList.add("e-ie-align")),this.eventBinding([s,r])},i.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){var i=function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)};this.keyTimer=window.setTimeout(function(){i()},100)}},i.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},i.prototype.eventBinding=function(e){var i=this;[].slice.call(e).forEach(function(e){new t.Touch(e,{tapHold:i.tabHoldHandler.bind(i),tapHoldThreshold:500}),e.addEventListener("keydown",i.onKeyPress.bind(i)),e.addEventListener("keyup",i.onKeyUp.bind(i)),e.addEventListener("mouseup",i.repeatScroll.bind(i)),e.addEventListener("touchend",i.repeatScroll.bind(i)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),t.EventHandler.add(e,"click",i.clickEventHandler,i)})},i.prototype.repeatScroll=function(){clearInterval(this.timeout)},i.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,"e-scroll-nav")?i.firstElementChild:i;var s=function(){t.eleScrolling(10,i,!0)};this.timeout=window.setInterval(function(){s()},50)},i.prototype.contains=function(e,t){return e.classList.contains(t)},i.prototype.eleScrolling=function(e,t,i){var s=this.scrollEle,n=this.element,o=t.classList;o.contains("e-scroll-nav")&&(o=t.querySelector(".e-nav-arrow").classList),this.contains(n,"e-rtl")&&this.browserCheck&&(e=-e);s.scrollLeft;!this.contains(n,"e-rtl")||this.browserCheck||this.ieCheck?o.contains("e-nav-right-arrow")?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i):o.contains("e-nav-left-arrow")?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i)},i.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},i.prototype.swipeHandler=function(e){var t,i=this.scrollEle;t=e.velocity<=1?e.distanceX/(10*e.velocity):e.distanceX/e.velocity;var s=.5,n=function(){var o=Math.sin(s);o<=0?window.cancelAnimationFrame(o):("Left"===e.swipeDirection?i.scrollLeft+=t*o:"Right"===e.swipeDirection&&(i.scrollLeft-=t*o),s-=.02,window.requestAnimationFrame(n))};n()},i.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollLeft+=e:this.scrollEle.scrollLeft-=e},i.prototype.frameScrollRequest=function(e,i,s){var n=this;if(s)return void this.scrollUpdating(e,i);this.customStep||[].slice.call(t.selectAll(".e-scroll-overlay",this.element)).forEach(function(t){e-=t.offsetWidth});var o=function(){var t,s;n.contains(n.element,"e-rtl")&&n.browserCheck?(t=-e,s=-10):(t=e,s=10),t<10?window.cancelAnimationFrame(s):(n.scrollUpdating(s,i),e-=s,window.requestAnimationFrame(o))};o()},i.prototype.touchHandler=function(e){var t,i=this.scrollEle;t=e.distanceX,this.ieCheck&&this.contains(this.element,"e-rtl")&&(t=-t),"Left"===e.scrollDirection?i.scrollLeft=i.scrollLeft+t:"Right"===e.scrollDirection&&(i.scrollLeft=i.scrollLeft-t)},i.prototype.arrowDisabling=function(e,i){if(this.isDevice){var s=(t.isNullOrUndefined(e)?i:e).querySelector(".e-nav-arrow");t.isNullOrUndefined(e)?t.classList(s,["e-nav-right-arrow"],["e-nav-left-arrow"]):t.classList(s,["e-nav-left-arrow"],["e-nav-right-arrow"])}else e.classList.add("e-overlay"),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),i.classList.remove("e-overlay"),i.setAttribute("aria-disabled","false"),i.setAttribute("tabindex","0");this.repeatScroll()},i.prototype.scrollHandler=function(e){var t=e.target,i=t.offsetWidth,s=this.element,n=this.element.querySelector(".e-scroll-left-nav"),o=this.element.querySelector(".e-scroll-right-nav"),r=this.element.querySelector(".e-scroll-left-overlay"),l=this.element.querySelector(".e-scroll-right-overlay"),a=t.scrollLeft;if(a<=0&&(a=-a),this.isDevice&&(!this.enableRtl||this.browserCheck||this.ieCheck||(r=this.element.querySelector(".e-scroll-right-overlay"),l=this.element.querySelector(".e-scroll-left-overlay")),r.style.width=a<40?a+"px":"40px",t.scrollWidth-Math.ceil(i+a)<40?l.style.width=t.scrollWidth-Math.ceil(i+a)+"px":l.style.width="40px"),0===a)!this.contains(s,"e-rtl")||this.browserCheck||this.ieCheck?this.arrowDisabling(n,o):this.arrowDisabling(o,n);else if(Math.ceil(i+a+.1)>=t.scrollWidth)!this.contains(s,"e-rtl")||this.browserCheck||this.ieCheck?this.arrowDisabling(o,n):this.arrowDisabling(n,o);else{var d=this.element.querySelector(".e-scroll-nav.e-overlay");d&&(d.classList.remove("e-overlay"),d.setAttribute("aria-disabled","false"),d.setAttribute("tabindex","0"))}},i.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")}},a([t.Property(null)],i.prototype,"scrollStep",void 0),i=a([t.NotifyPropertyChanges],i)}(t.Component),h=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),c=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},p=function(e){function i(t,i){return e.call(this,t,i)||this}return h(i,e),i.prototype.preRender=function(){this.browser=t.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=t.Browser.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=t.getUniqueID("vscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add("e-rtl")},i.prototype.render=function(){this.touchModule=new t.Touch(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),t.EventHandler.add(this.scrollEle,"scroll",this.scrollEventHandler,this),this.isDevice?(this.element.classList.add("e-scroll-device"),this.createOverlayElement(this.element)):this.createNavIcon(this.element),this.setScrollState(),t.EventHandler.add(this.element,"wheel",this.wheelEventHandler,this)},i.prototype.setScrollState=function(){t.isNullOrUndefined(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetHeight,this.customStep=!1):this.customStep=!0},i.prototype.initialize=function(){var e=t.createElement("div",{className:"e-vscroll-content"}),i=t.createElement("div",{className:"e-vscroll-bar"});i.setAttribute("tabindex","-1");for(var s=this.element,n=0,o=[].slice.call(s.children);n<o.length;n++){var r=o[n];e.appendChild(r)}i.appendChild(e),s.appendChild(i),i.style.overflowY="hidden",this.scrollEle=i,this.scrollItems=e},i.prototype.getPersistData=function(){var e=["scrollStep"];return this.addOnPersist(e)},i.prototype.getModuleName=function(){return"vScroll"},i.prototype.destroy=function(){var i=this.element;i.style.display="",t.removeClass([this.element],["e-vscroll","e-scroll-device"]);var s=t.selectAll(".e-"+i.id+"_nav.e-scroll-nav",i),n=t.selectAll(".e-scroll-overlay",i);[].slice.call(n).forEach(function(e){t.detach(e)});for(var o=0,r=[].slice.call(this.scrollItems.children);o<r.length;o++){var l=r[o];i.appendChild(l)}this.uniqueId&&this.element.removeAttribute("id"),t.detach(this.scrollEle),s.length>0&&(t.detach(s[0]),t.isNullOrUndefined(s[1])||t.detach(s[1])),t.EventHandler.remove(this.scrollEle,"scroll",this.scrollEventHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},i.prototype.disable=function(e){var i=t.selectAll(".e-scroll-nav:not(.e-overlay)",this.element);e?this.element.classList.add("e-overlay"):this.element.classList.remove("e-overlay"),[].slice.call(i).forEach(function(t){t.setAttribute("tabindex",e?"-1":"0")})},i.prototype.createOverlayElement=function(e){var i=e.id.concat("_nav"),s=t.createElement("div",{className:"e-scroll-overlay e-scroll-down-overlay"}),n="e-"+e.id.concat("_nav e-scroll-nav e-scroll-down-nav"),o=t.createElement("div",{id:i.concat("down"),className:n}),r=t.createElement("div",{className:"e-nav-down-arrow e-nav-arrow e-icons"});o.appendChild(r);var l=t.createElement("div",{className:"e-scroll-overlay e-scroll-up-overlay"});this.ieCheck&&o.classList.add("e-ie-align"),e.appendChild(s),e.appendChild(o),e.insertBefore(l,e.firstChild),this.eventBinding([o])},i.prototype.createNavIcon=function(e){var i=e.id.concat("_nav"),s="e-"+e.id.concat("_nav e-scroll-nav e-scroll-down-nav"),n=t.createElement("div",{id:i.concat("_down"),className:s});n.setAttribute("aria-disabled","false");var o=t.createElement("div",{className:"e-nav-down-arrow e-nav-arrow e-icons"}),r="e-"+e.id.concat("_nav e-scroll-nav e-scroll-up-nav"),l=t.createElement("div",{id:i.concat("_up"),className:r+" e-overlay"});l.setAttribute("aria-disabled","true");var a=t.createElement("div",{className:"e-nav-up-arrow e-nav-arrow e-icons"});l.appendChild(a),n.appendChild(o),n.setAttribute("tabindex","0"),e.appendChild(n),e.insertBefore(l,e.firstChild),this.ieCheck&&(n.classList.add("e-ie-align"),l.classList.add("e-ie-align")),this.eventBinding([n,l])},i.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){var i=function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)};this.keyTimer=window.setTimeout(function(){i()},100)}},i.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},i.prototype.eventBinding=function(e){var i=this;[].slice.call(e).forEach(function(e){new t.Touch(e,{tapHold:i.tabHoldHandler.bind(i),tapHoldThreshold:500}),e.addEventListener("keydown",i.onKeyPress.bind(i)),e.addEventListener("keyup",i.onKeyUp.bind(i)),e.addEventListener("mouseup",i.repeatScroll.bind(i)),e.addEventListener("touchend",i.repeatScroll.bind(i)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),t.EventHandler.add(e,"click",i.clickEventHandler,i)})},i.prototype.repeatScroll=function(){clearInterval(this.timeout)},i.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,"e-scroll-nav")?i.firstElementChild:i;var s=function(){t.eleScrolling(10,i,!0)};this.timeout=window.setInterval(function(){s()},50)},i.prototype.contains=function(e,t){return e.classList.contains(t)},i.prototype.eleScrolling=function(e,t,i){this.element;var s=t.classList;s.contains("e-scroll-nav")&&(s=t.querySelector(".e-nav-arrow").classList),s.contains("e-nav-down-arrow")?this.frameScrollRequest(e,"add",i):s.contains("e-nav-up-arrow")&&this.frameScrollRequest(e,"",i)},i.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},i.prototype.wheelEventHandler=function(e){e.preventDefault(),this.frameScrollRequest(this.scrollStep,e.deltaY>0?"add":"",!1)},i.prototype.swipeHandler=function(e){var t,i=this.scrollEle;t=e.velocity<=1?e.distanceY/(10*e.velocity):e.distanceY/e.velocity;var s=.5,n=function(){var o=Math.sin(s);o<=0?window.cancelAnimationFrame(o):("Up"===e.swipeDirection?i.scrollTop+=t*o:"Down"===e.swipeDirection&&(i.scrollTop-=t*o),s-=.02,window.requestAnimationFrame(n))};n()},i.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollTop+=e:this.scrollEle.scrollTop-=e},i.prototype.frameScrollRequest=function(e,i,s){var n=this;if(s)return void this.scrollUpdating(e,i);this.customStep||[].slice.call(t.selectAll(".e-scroll-overlay",this.element)).forEach(function(t){e-=t.offsetHeight});var o=function(){e<10?window.cancelAnimationFrame(10):(n.scrollUpdating(10,i),e-=10,window.requestAnimationFrame(o))};o()},i.prototype.touchHandler=function(e){var t,i=this.scrollEle;t=e.distanceY,"Up"===e.scrollDirection?i.scrollTop=i.scrollTop+t:"Down"===e.scrollDirection&&(i.scrollTop=i.scrollTop-t)},i.prototype.arrowDisabling=function(e,i){if(this.isDevice){var s=(t.isNullOrUndefined(e)?i:e).querySelector(".e-nav-arrow");t.isNullOrUndefined(e)?t.classList(s,["e-nav-down-arrow"],["e-nav-up-arrow"]):t.classList(s,["e-nav-up-arrow"],["e-nav-down-arrow"])}else e.classList.add("e-overlay"),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),i.classList.remove("e-overlay"),i.setAttribute("aria-disabled","false"),i.setAttribute("tabindex","0");this.repeatScroll()},i.prototype.scrollEventHandler=function(e){var t=e.target,i=t.offsetHeight,s=(this.element,this.element.querySelector(".e-scroll-up-nav")),n=this.element.querySelector(".e-scroll-down-nav"),o=this.element.querySelector(".e-scroll-up-overlay"),r=this.element.querySelector(".e-scroll-down-overlay"),l=t.scrollTop;if(l<=0&&(l=-l),this.isDevice&&(o.style.height=l<40?l+"px":"40px",t.scrollHeight-Math.ceil(i+l)<40?r.style.height=t.scrollHeight-Math.ceil(i+l)+"px":r.style.height="40px"),0===l)this.arrowDisabling(s,n);else if(Math.ceil(i+l+.1)>=t.scrollHeight)this.arrowDisabling(n,s);else{var a=this.element.querySelector(".e-scroll-nav.e-overlay");a&&(a.classList.remove("e-overlay"),a.setAttribute("aria-disabled","false"),a.setAttribute("tabindex","0"))}},i.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")}},c([t.Property(null)],i.prototype,"scrollStep",void 0),i=c([t.NotifyPropertyChanges],i)}(t.Component),u=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),f=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},m="e-focused",v="e-menu-header",g="e-selected",y="e-menu-item",b="e-menu-hide",C="e-menu-popup",N=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return u(i,e),f([t.Property("id")],i.prototype,"itemId",void 0),f([t.Property("parentId")],i.prototype,"parentId",void 0),f([t.Property("text")],i.prototype,"text",void 0),f([t.Property("iconCss")],i.prototype,"iconCss",void 0),f([t.Property("url")],i.prototype,"url",void 0),f([t.Property("separator")],i.prototype,"separator",void 0),f([t.Property("items")],i.prototype,"children",void 0),i}(t.ChildProperty),E={OPERA:/(opera|opr)(?:.*version|)[ \/]([\w.]+)/i,EDGE:/(edge)(?:.*version|)[ \/]([\w.]+)/i,CHROME:/(chrome|crios)[ \/]([\w.]+)/i,PANTHOMEJS:/(phantomjs)[ \/]([\w.]+)/i,SAFARI:/(safari)[ \/]([\w.]+)/i,WEBKIT:/(webkit)[ \/]([\w.]+)/i,MSIE:/(msie|trident) ([\w.]+)/i,MOZILLA:/(mozilla)(?:.*? rv:([\w.]+)|)/i},x=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return u(i,e),f([t.Property(null)],i.prototype,"iconCss",void 0),f([t.Property("")],i.prototype,"id",void 0),f([t.Property(!1)],i.prototype,"separator",void 0),f([t.Collection([],i)],i.prototype,"items",void 0),f([t.Property("")],i.prototype,"text",void 0),f([t.Property("")],i.prototype,"url",void 0),i}(t.ChildProperty),O=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return u(i,e),f([t.Property("SlideDown")],i.prototype,"effect",void 0),f([t.Property(400)],i.prototype,"duration",void 0),f([t.Property("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),w=function(e){function n(i,s){var n=e.call(this,i,s)||this;return n.navIdx=[],n.animation=new t.Animation({}),n.isTapHold=!1,n.tempItem=[],n}return u(n,e),n.prototype.preRender=function(){if(!this.isMenu){o=void 0;if("EJS-CONTEXTMENU"===this.element.tagName){o=this.createElement("ul",{id:t.getUniqueID(this.getModuleName()),className:"e-control e-lib e-"+this.getModuleName()});var e=t.getValue("ej2_instances",this.element);t.removeClass([this.element],["e-control","e-lib","e-"+this.getModuleName()]),this.clonedElement=this.element,this.element=o,t.setValue("ej2_instances",e,this.element)}else{o=this.createElement("ul",{id:t.getUniqueID(this.getModuleName())}),t.append([].slice.call(this.element.cloneNode(!0).children),o);var i=this.element.nextElementSibling;i?this.element.parentElement.insertBefore(o,i):this.element.parentElement.appendChild(o),this.clonedElement=o}this.clonedElement.style.display="none"}if("EJS-MENU"===this.element.tagName){for(var s=this.element,n=t.getValue("ej2_instances",s),o=this.createElement("ul"),r=this.createElement("EJS-MENU",{className:"e-"+this.getModuleName()+"-wrapper"}),l=0,a=s.attributes.length;l<a;l++)o.setAttribute(s.attributes[l].nodeName,s.attributes[l].nodeValue);s.parentNode.insertBefore(r,s),t.detach(s),s=o,r.appendChild(s),t.setValue("ej2_instances",n,s),this.clonedElement=r,this.element=s,this.element.id||(this.element.id=t.getUniqueID(this.getModuleName()))}},n.prototype.render=function(){if(this.initialize(),this.renderItems(),this.isMenu&&this.template&&this.isBlazor()){var e=this.element.id+"Template";t.resetBlazorTemplate(e,"Template"),Object.keys(t.blazorTemplates).length&&t.extend(this.tempItem,t.blazorTemplates[e],[],!0),t.updateBlazorTemplate(e,"Template",this)}this.wireEvents(),this.renderComplete()},n.prototype.initialize=function(){var e=this.getWrapper();e||(e=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.isMenu?this.element.parentElement.insertBefore(e,this.element):document.body.appendChild(e)),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),this.enableRtl&&e.classList.add("e-rtl"),e.appendChild(this.element),this.isMenu&&this.hamburgerMode&&(this.target||this.createHeaderContainer(e))},n.prototype.renderItems=function(){if(!this.items.length){var e=i.ListBase.createJsonFromElement(this.element,{fields:{child:"items"}});this.setProperties({items:e},!0),this.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML=""}var s=this.createItems(this.items);t.append(Array.prototype.slice.call(s.children),this.element),this.element.classList.add("e-menu-parent");var n=this.getWrapper();this.element.classList.contains("e-vertical")?this.addScrolling(n,this.element,"vscroll",n.offsetHeight,this.element.offsetHeight):this.addScrolling(n,this.element,"hscroll",n.offsetWidth,this.element.offsetWidth)},n.prototype.wireEvents=function(){var e=this.getWrapper();if(this.target){for(var i=void 0,n=t.selectAll(this.target),o=0,r=n.length;o<r;o++)i=n[o],this.isMenu?t.EventHandler.add(i,"click",this.menuHeaderClickHandler,this):this.menuIos()?new t.Touch(i,{tapHold:this.touchHandler.bind(this)}):t.EventHandler.add(i,"contextmenu",this.cmenuHandler,this);if(this.targetElement=i,!this.isMenu){t.EventHandler.add(this.targetElement,"scroll",this.scrollHandler,this);for(var l=0,a=s.getScrollableParent(this.targetElement);l<a.length;l++){var d=a[l];t.EventHandler.add(d,"scroll",this.scrollHandler,this)}}}t.Browser.isDevice||(this.delegateMoverHandler=this.moverHandler.bind(this),this.delegateMouseDownHandler=this.mouseDownHandler.bind(this),t.EventHandler.add(this.isMenu?document:e,"mouseover",this.delegateMoverHandler,this),t.EventHandler.add(document,"mousedown",this.delegateMouseDownHandler,this)),this.delegateClickHandler=this.clickHandler.bind(this),t.EventHandler.add(document,"click",this.delegateClickHandler,this),this.wireKeyboardEvent(e),this.rippleFn=t.rippleEffect(e,{selector:"."+y})},n.prototype.menuIos=function(){return this.getValue("isIos",/(ipad|iphone|ipod touch)/i)},n.prototype.getValue=function(e,i){var s="undefined"!=typeof window?window.browserDetails:{};return"undefined"!=typeof navigator&&"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1&&!0===t.Browser.isTouch&&!E.CHROME.test(navigator.userAgent)&&(s.isIos=!0,s.isDevice=!0,s.isTouch=!0,s.isPointer=!0),void 0===s[""+e]?s[""+e]=i.test(t.Browser.userAgent):s[""+e]},n.prototype.wireKeyboardEvent=function(e){var i={downarrow:"downarrow",uparrow:"uparrow",enter:"enter",leftarrow:"leftarrow",rightarrow:"rightarrow",escape:"escape"};this.isMenu&&(i.home="home",i.end="end"),new t.KeyboardEvents(e,{keyAction:this.keyBoardHandler.bind(this),keyConfigs:i})},n.prototype.mouseDownHandler=function(e){t.closest(e.target,".e-"+this.getModuleName()+"-wrapper")===this.getWrapper()||t.closest(e.target,".e-"+this.getModuleName()+"-popup")||this.closeMenu(this.isMenu?null:this.navIdx.length,e)},n.prototype.keyBoardHandler=function(e){var i="",s=e.target,n=this.isMenu&&!this.hamburgerMode&&!this.element.classList.contains("e-vertical")&&this.navIdx.length<1;if(e.preventDefault(),this.enableScrolling&&13===e.keyCode&&s.classList.contains("e-scroll-nav")&&this.removeLIStateByClass([m,g],[t.closest(s,".e-"+this.getModuleName()+"-wrapper")]),n)switch(e.action){case"rightarrow":i="rightarrow",e.action="downarrow";break;case"leftarrow":i="leftarrow",e.action="uparrow";break;case"downarrow":i="downarrow",e.action="rightarrow";break;case"uparrow":i="uparrow",e.action=""}else if(this.enableRtl)switch(e.action){case"leftarrow":n=!0,i="leftarrow",e.action="rightarrow";break;case"rightarrow":n=!0,i="rightarrow",e.action="leftarrow"}switch(e.action){case"downarrow":case"uparrow":case"end":case"home":this.upDownKeyHandler(e);break;case"rightarrow":this.rightEnterKeyHandler(e);break;case"leftarrow":this.leftEscKeyHandler(e);break;case"enter":this.hamburgerMode&&"SPAN"===s.tagName&&s.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):this.rightEnterKeyHandler(e);break;case"escape":this.leftEscKeyHandler(e)}n&&(e.action=i)},n.prototype.upDownKeyHandler=function(e){var t=this.getUlByNavIdx(),i="downarrow"===e.action||"home"===e.action?0:t.childElementCount-1,s=i,n=this.getLIByClass(t,m);n&&("end"!==e.action&&"home"!==e.action&&(s=this.getIdx(t,n)),n.classList.remove(m),"end"!==e.action&&"home"!==e.action&&("downarrow"===e.action?s++:s--,s===("downarrow"===e.action?t.childElementCount:-1)&&(s=i)));var o=t.children[s];s=this.isValidLI(o,s,e.action),t.children[s].classList.add(m),t.children[s].focus()},n.prototype.isValidLI=function(e,t,i){this.getWrapper();var s=this.getUlByNavIdx();return(e.classList.contains("e-separator")||e.classList.contains("e-disabled")||e.classList.contains(b))&&("downarrow"===i||"rightarrow"===i?t++:t--),((e=s.children[t]).classList.contains("e-separator")||e.classList.contains("e-disabled")||e.classList.contains(b))&&(t=this.isValidLI(e,t,i)),t},n.prototype.getUlByNavIdx=function(e){if(void 0===e&&(e=this.navIdx.length),this.isMenu){var i=[this.getWrapper()].concat([].slice.call(t.selectAll("."+C)))[e];return t.isNullOrUndefined(i)?null:t.select(".e-menu-parent",i)}return this.getWrapper().children[e]},n.prototype.rightEnterKeyHandler=function(e){var t,i=this.getUlByNavIdx(),s=this.getLIByClass(i,m);if(s){var n=this.getIdx(i,s),o=this.navIdx.concat(n),r=this.getItem(o);r.items.length?(this.navIdx.push(n),this.keyType="right",this.action=e.action,this.openMenu(s,r,null,null,e)):"enter"===e.action&&(this.isMenu&&0===this.navIdx.length?this.removeLIStateByClass([g],[this.getWrapper()]):s.classList.remove(m),s.classList.add(g),t={element:s,item:r,event:e},this.trigger("select",t),this.closeMenu(null,e))}},n.prototype.leftEscKeyHandler=function(e){this.navIdx.length?(this.keyType="left",this.closeMenu(this.navIdx.length,e)):"escape"===e.action&&this.closeMenu(null,e)},n.prototype.scrollHandler=function(e){this.closeMenu(null,e)},n.prototype.touchHandler=function(e){this.isTapHold=!0,this.cmenuHandler(e.originalEvent)},n.prototype.cmenuHandler=function(e){e.preventDefault(),this.isCMenu=!0,this.pageX=e.changedTouches?e.changedTouches[0].pageX+1:e.pageX+1,this.pageY=e.changedTouches?e.changedTouches[0].pageY+1:e.pageY+1,this.closeMenu(null,e),this.isCMenu&&(this.canOpen(e.target)&&this.openMenu(null,null,this.pageY,this.pageX,e),this.isCMenu=!1)},n.prototype.closeMenu=function(e,i){var n=this;if(void 0===e&&(e=0),void 0===i&&(i=null),this.isMenuVisible()){var o,r,l,a=void 0,d=void 0,h=this.getWrapper(),c=this.getPopups(),u=!1,f=this.isMenu?c.length+1:h.childElementCount;o=this.isMenu&&1!==f?t.select(".e-ul",c[f-2]):t.selectAll(".e-menu-parent",h)[f-1],this.isMenu&&o.classList.contains("e-menu")&&((a=this.getLIByClass(o,g))&&a.classList.remove(g),u=!0),u||(r=this.navIdx.length?this.getItem(this.navIdx):null,l=r?r.items:this.items,d={element:o,parentItem:r,items:l,event:i,cancel:!1},this.trigger("beforeClose",d,function(a){var d,h,c,u=!a.cancel;if((u||n.isCMenu)&&(n.isMenu?(d=t.closest(o,"."+C),n.hamburgerMode&&(d.parentElement.style.minHeight=""),n.unWireKeyboardEvent(d),n.destroyScrollObj(t.getInstance(d.children[0],p),d.children[0]),(c=t.getInstance(d,s.Popup)).hide(),c.destroy(),t.detach(d)):n.toggleAnimation(o,!1),h={element:o,parentItem:r,items:l},n.trigger("onClose",h),n.navIdx.pop()),n.isCMenu)n.canOpen(i.target)&&n.openMenu(null,null,n.pageY,n.pageX,i),n.isCMenu=!1;else if(u&&n.hamburgerMode&&null!==e)n.afterCloseMenu(i);else if(u&&!e&&n.navIdx.length)n.closeMenu(null,i);else if(!u||n.isMenu||e||0!==n.navIdx.length||n.isMenusClosed)if(u&&n.isMenu&&i&&i.target&&0!==n.navIdx.length&&t.closest(i.target,".e-menu-parent.e-control"))n.closeMenu(0,i);else if(!u||"right"!==n.keyType&&"click"!==n.keyType){var f=n.getUlByNavIdx(),v=n.getLIByClass(f,g);v&&(v.setAttribute("aria-expanded","false"),v.classList.remove(g),v.classList.add(m),v.focus())}else n.afterCloseMenu(i);else n.isMenusClosed=!0,n.closeMenu(0,i);n.removeStateWrapper()}))}},n.prototype.destroyScrollObj=function(e,i){e&&(e.destroy(),i.parentElement.appendChild(t.select(".e-menu-parent",i)),t.detach(i))},n.prototype.getPopups=function(){var e=this,t=[];return[].slice.call(document.querySelectorAll("."+C)).forEach(function(i){e.getIndex(i.querySelector("."+y).id,!0).length&&t.push(i)}),t},n.prototype.isMenuVisible=function(){return this.navIdx.length>0||this.element.classList.contains("e-contextmenu")&&t.isVisible(this.element).valueOf()},n.prototype.canOpen=function(e){var i=!0;if(this.filter){i=!1;for(var s=this.filter.split(" "),n=0,o=s.length;n<o;n++)if(t.closest(e,"."+s[n])){i=!0;break}}return i},n.prototype.openMenu=function(e,i,n,o,r,l){void 0===n&&(n=0),void 0===o&&(o=0),void 0===r&&(r=null),void 0===l&&(l=this.targetElement);var a=this.getWrapper();this.lItem=e;var d=""!==this.element.id?this.element.id:"menu";if(this.isMenusClosed=!1,e){if(this.uList=this.createItems(i[this.getField("children",this.navIdx.length-1)]),!this.isMenu&&t.Browser.isDevice){a.lastChild.style.display="none";var h={text:i[this.getField("text")].toString(),iconCss:"e-icons e-previous"},c=new x(this.items[0],"items",h,!0),p=this.createItems([c]).children[0];p.classList.add(v),this.uList.insertBefore(p,this.uList.children[0])}this.isMenu?(this.popupWrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper "+C,id:e.id+"-ej2menu-"+d+"-popup"}),this.hamburgerMode?(n=e.offsetHeight,e.appendChild(this.popupWrapper)):document.body.appendChild(this.popupWrapper),this.isNestedOrVertical=this.element.classList.contains("e-vertical")||1!==this.navIdx.length,this.popupObj=this.generatePopup(this.popupWrapper,this.uList,e,this.isNestedOrVertical),this.hamburgerMode?this.calculateIndentSize(this.uList,e):(this.cssClass&&t.addClass([this.popupWrapper],this.cssClass.split(" ")),this.popupObj.hide()),this.triggerBeforeOpen(e,this.uList,i,r,0,0,"menu")):(this.uList.style.zIndex=this.element.style.zIndex,a.appendChild(this.uList),this.triggerBeforeOpen(e,this.uList,i,r,n,o,"none"))}else this.uList=this.element,this.uList.style.zIndex=s.getZindexPartial(l||this.element).toString(),this.triggerBeforeOpen(e,this.uList,i,r,n,o,"none");if(this.isMenu&&this.template&&this.isBlazor()){var u=this.element.id+"Template";if(Object.keys(t.blazorTemplates).length){var f=t.blazorTemplates[u];this.tempItem=this.tempItem.concat(f),t.blazorTemplates[u]=this.tempItem}t.updateBlazorTemplate(u,"Template",this)}},n.prototype.calculateIndentSize=function(e,t){var i=getComputedStyle(t),s=parseInt(i.textIndent,10);this.navIdx.length<2&&!t.classList.contains("e-blankicon")?s*=2:s+=s/4,e.style.textIndent=s+"px";var n=e.querySelectorAll(".e-blankicon");if(n&&n.length){var o=e.querySelector(".e-menu-icon"),r=getComputedStyle(o),l=parseInt(r.marginRight,10)+o.offsetWidth+s;n.forEach(function(e){return e.style.textIndent=l+"px"})}},n.prototype.generatePopup=function(e,i,n,o){var r=this,l=new s.Popup(e,{actionOnScroll:this.hamburgerMode?"none":"reposition",relateTo:n,collision:this.hamburgerMode?{X:"none",Y:"none"}:{X:o||this.enableRtl?"none":"flip",Y:"fit"},position:o&&!this.hamburgerMode?{X:"right",Y:"top"}:{X:"left",Y:"bottom"},targetType:"relative",enableRtl:this.enableRtl,content:i,open:function(){var e=t.select(".e-menu-vscroll",l.element);e&&(e.style.height="inherit",e.style.maxHeight="");var i=t.select(".e-ul",l.element);l.element.style.maxHeight="",i.focus(),r.triggerOpen(i)}});return l},n.prototype.createHeaderContainer=function(e){e=e||this.getWrapper();var t=this.createElement("span",{className:"e-"+this.getModuleName()+"-header"}),i=this.createElement("span",{className:"e-"+this.getModuleName()+"-title",innerHTML:this.title}),s=this.createElement("span",{className:"e-icons e-"+this.getModuleName()+"-icon",attrs:{tabindex:"0"}});t.appendChild(i),t.appendChild(s),e.insertBefore(t,this.element)},n.prototype.openHamburgerMenu=function(e){this.hamburgerMode&&this.triggerBeforeOpen(null,this.element,null,e,0,0,"hamburger")},n.prototype.closeHamburgerMenu=function(e){var t=this;if(this.hamburgerMode){var i=void 0;i={element:this.element,parentItem:null,event:e,items:this.items,cancel:!1},this.trigger("beforeClose",i,function(i){i.cancel||(t.closeMenu(null,e),t.element.classList.add("e-hide-menu"),t.trigger("onClose",{element:t.element,parentItem:null,items:t.items}))})}},n.prototype.callFit=function(e,t,i,n,o){return s.fit(e,null,{X:t,Y:i},{top:n,left:o})},n.prototype.triggerBeforeOpen=function(e,i,n,o,r,l,a){var d=this,h=(this.getIndex(e?e.id:null,!0),{element:i,items:e?n[this.getField("children",this.navIdx.length-1)]:this.items,parentItem:n,event:o,cancel:!1,top:r,left:l}),c=a;this.trigger("beforeOpen",h,function(i){switch(c){case"menu":d.hamburgerMode||(d.top=i.top,d.left=i.left),d.popupWrapper.style.display="block",d.hamburgerMode||(d.popupWrapper.style.maxHeight=d.popupWrapper.getBoundingClientRect().height+"px",d.addScrolling(d.popupWrapper,d.uList,"vscroll",d.popupWrapper.offsetHeight,d.uList.offsetHeight),d.checkScrollOffset(o));var r=void 0;if(d.hamburgerMode||d.left||d.top)d.popupObj.collision={X:"none",Y:"none"};else{if(d.popupObj.refreshPosition(d.lItem,!0),d.left=parseInt(d.popupWrapper.style.left,10),d.top=parseInt(d.popupWrapper.style.top,10),d.enableRtl&&(d.left=d.isNestedOrVertical?d.left-d.popupWrapper.offsetWidth-d.lItem.parentElement.offsetWidth:d.left-d.popupWrapper.offsetWidth+d.lItem.offsetWidth),r=s.isCollide(d.popupWrapper,null,d.left,d.top),(d.isNestedOrVertical||d.enableRtl)&&(r.indexOf("right")>-1||r.indexOf("left")>-1)){d.popupObj.collision.X="none";var l=t.closest(d.lItem,".e-"+d.getModuleName()+"-wrapper").offsetWidth;d.left=d.enableRtl?s.calculatePosition(d.lItem,d.isNestedOrVertical?"right":"left","top").left:d.left-d.popupWrapper.offsetWidth-l}((r=s.isCollide(d.popupWrapper,null,d.left,d.top)).indexOf("left")>-1||r.indexOf("right")>-1)&&(d.left=d.callFit(d.popupWrapper,!0,!1,d.top,d.left).left),d.popupWrapper.style.left=d.left+"px"}d.popupWrapper.style.display="";break;case"none":d.top=i.top,d.left=i.left;break;case"hamburger":i.cancel||(d.element.classList.remove("e-hide-menu"),d.triggerOpen(d.element))}if("hamburger"!==c)if(i.cancel)d.isMenu&&(d.popupObj.destroy(),t.detach(d.popupWrapper)),d.navIdx.pop();else if(d.isMenu)if(d.hamburgerMode)d.popupWrapper.style.top=d.top+"px",d.popupWrapper.style.left="0px",d.toggleAnimation(d.popupWrapper);else{d.wireKeyboardEvent(d.popupWrapper),t.rippleEffect(d.popupWrapper,{selector:"."+y}),d.popupWrapper.style.left=d.left+"px",d.popupWrapper.style.top=d.top+"px";var a="None"!==d.animationSettings.effect?{name:d.animationSettings.effect,duration:d.animationSettings.duration,timingFunction:d.animationSettings.easing}:null;d.popupObj.show(a,d.lItem)}else d.setPosition(d.lItem,d.uList,d.top,d.left),d.toggleAnimation(d.uList);if("right"===d.keyType){var h=d.getUlByNavIdx();if(e.classList.remove(m),d.isMenu&&1===d.navIdx.length&&d.removeLIStateByClass([g],[d.getWrapper()]),e.classList.add(g),"enter"===d.action){var p={element:e,item:n,event:o};d.trigger("select",p)}e.focus(),h=d.getUlByNavIdx();var u=d.isValidLI(h.children[0],0,d.action);h.children[u].classList.add(m),h.children[u].focus()}})},n.prototype.checkScrollOffset=function(e){var i=this.getWrapper();if(i.children[0].classList.contains("e-menu-hscroll")&&1===this.navIdx.length){var s=t.isNullOrUndefined(e)?this.element:t.closest(e.target,"."+y),n=t.select(".e-hscroll-bar",i),o=void 0,r=void 0;n.scrollLeft>s.offsetLeft&&(n.scrollLeft-=n.scrollLeft-s.offsetLeft),(o=n.scrollLeft+n.offsetWidth)<(r=s.offsetLeft+s.offsetWidth)&&(n.scrollLeft+=r-o)}},n.prototype.addScrolling=function(e,i,s,n,o){if(this.enableScrolling&&n<o){var r=this.createElement("div",{className:"e-menu-"+s});e.appendChild(r),r.appendChild(i),r.style.maxHeight=e.style.maxHeight;e.style.overflow="hidden","vscroll"===s?new p({enableRtl:this.enableRtl},r).scrollStep=t.select(".e-"+s+"-bar",e).offsetHeight/2:new d({enableRtl:this.enableRtl},r).scrollStep=t.select(".e-"+s+"-bar",e).offsetWidth}},n.prototype.setPosition=function(e,i,n,o){if(this.toggleVisiblity(i),i===this.element||!t.isNullOrUndefined(o)&&!t.isNullOrUndefined(n))(a=s.isCollide(i,null,o,n)).indexOf("right")>-1&&(o-=i.offsetWidth),a.indexOf("bottom")>-1&&(n=(l=this.callFit(i,!1,!0,n,o)).top-20),(a=s.isCollide(i,null,o,n)).indexOf("left")>-1&&(o=(l=this.callFit(i,!0,!1,n,o)).left);else if(t.Browser.isDevice)n=Number(this.element.style.top.replace("px","")),o=Number(this.element.style.left.replace("px",""));else{var r=this.enableRtl?"left":"right",l=s.calculatePosition(e,r,"top");n=l.top,o=l.left;var a=s.isCollide(i,null,this.enableRtl?o-i.offsetWidth:o,n),d=a.indexOf("left")>-1||a.indexOf("right")>-1;d&&(o=(l=s.calculatePosition(e,this.enableRtl?"right":"left","top")).left),(this.enableRtl||d)&&(o=this.enableRtl&&d?o:o-i.offsetWidth),a.indexOf("bottom")>-1&&(n=(l=this.callFit(i,!1,!0,n,o)).top)}this.toggleVisiblity(i,!1),i.style.top=n+"px",i.style.left=o+"px"},n.prototype.toggleVisiblity=function(e,t){void 0===t&&(t=!0),e.style.visibility=t?"hidden":"",e.style.display=t?"block":"none"},n.prototype.createItems=function(e){var s=this,n=this.navIdx?this.navIdx.length:0,o=this.hasField(e,this.getField("iconCss",n)),r={showIcon:o,moduleName:"menu",fields:this.getFields(n),template:this.template,itemCreating:function(e){e.curData[e.fields.id]||(e.curData[e.fields.id]=t.getUniqueID("menuitem")),e.curData.htmlAttributes={role:"menuitem",tabindex:"-1"},s.isMenu&&!e.curData[s.getField("separator",n)]&&(e.curData.htmlAttributes["aria-label"]=e.curData[e.fields.text]),""===e.curData[e.fields.iconCss]&&(e.curData[e.fields.iconCss]=null)},itemCreated:function(e){if(e.curData[s.getField("separator",n)]&&(e.item.classList.add("e-separator"),e.item.removeAttribute("role")),!o||e.curData[e.fields.iconCss]||e.curData[s.getField("separator",n)]||e.item.classList.add("e-blankicon"),e.curData[e.fields.child]&&e.curData[e.fields.child].length){var t=s.createElement("span",{className:"e-icons e-caret"});e.item.appendChild(t),e.item.setAttribute("aria-haspopup","true"),e.item.setAttribute("aria-expanded","false"),s.isMenu||e.item.removeAttribute("role"),e.item.classList.add("e-menu-caret-icon")}s.isMenu&&s.template&&(e.item.setAttribute("id",e.curData[e.fields.id].toString()),e.item.removeAttribute("data-uid"));var i={item:e.curData,element:e.item};s.trigger("beforeItemRender",i)}};this.setProperties({items:this.items},!0),this.isMenu&&(r.templateID=this.element.id+"Template");var l=i.ListBase.createList(this.createElement,e,r,!this.template);return l.setAttribute("tabindex","0"),this.isMenu&&l.setAttribute("role","menu"),l},n.prototype.moverHandler=function(e){var i=e.target;this.liTrgt=i;var s=this.getLI(i),n=s?t.closest(s,".e-"+this.getModuleName()+"-wrapper"):this.getWrapper(),o=this.getWrapper(),r=new RegExp("-ej2menu-(.*)-popup"),l=!1;if(n){if((""!==n.id?r.exec(n.id)[1]:n.querySelector("ul").id)!==this.element.id){if(this.removeLIStateByClass([m,g],[this.getWrapper()]),!this.navIdx.length)return;l=!0}s&&t.closest(s,".e-"+this.getModuleName()+"-wrapper")&&!l?(this.removeLIStateByClass([m],this.isMenu?[n].concat(this.getPopups()):[n]),this.removeLIStateByClass([m],this.isMenu?[o].concat(this.getPopups()):[o]),s.classList.add(m),this.showItemOnClick||this.clickHandler(e)):this.isMenu&&this.showItemOnClick&&this.removeLIStateByClass([m],[n].concat(this.getPopups())),this.isMenu&&(this.showItemOnClick||i.parentElement===n||t.closest(i,".e-"+this.getModuleName()+"-popup")||s&&(!s||this.getIndex(s.id,!0).length)?l&&this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e)):(this.removeLIStateByClass([m],[n]),this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e))),this.isClosed||this.removeStateWrapper(),this.isClosed=!1)}},n.prototype.removeStateWrapper=function(){if(this.liTrgt){var e=t.closest(this.liTrgt,".e-menu-vscroll");"DIV"===this.liTrgt.tagName&&e&&this.removeLIStateByClass([m,g],[e])}},n.prototype.removeLIStateByClass=function(e,i){for(var s,n=0;n<i.length;n++)!function(n){e.forEach(function(e){(s=t.select("."+e,i[n]))&&s.classList.remove(e)})}(n)},n.prototype.getField=function(e,t){void 0===t&&(t=0);var i=this.fields[e];return"string"==typeof i?i:i[t]?i[t].toString():i[i.length-1].toString()},n.prototype.getFields=function(e){return void 0===e&&(e=0),{id:this.getField("itemId",e),iconCss:this.getField("iconCss",e),text:this.getField("text",e),url:this.getField("url",e),child:this.getField("children",e),separator:this.getField("separator",e)}},n.prototype.hasField=function(e,t){for(var i=0,s=e.length;i<s;i++)if(e[i][t])return!0;return!1},n.prototype.menuHeaderClickHandler=function(e){t.closest(e.target,".e-menu-wrapper").querySelector("ul.e-menu-parent").id===this.element.id&&(this.element.classList.contains("e-hide-menu")?this.openHamburgerMenu(e):this.closeHamburgerMenu(e))},n.prototype.clickHandler=function(e){if(this.isTapHold)this.isTapHold=!1;else{var i=this.getWrapper(),s=e.target,n=this.cli=this.getLI(s),o=new RegExp("-ej2menu-(.*)-popup"),r=n?t.closest(n,".e-"+this.getModuleName()+"-wrapper"):null,l=n&&r&&(this.isMenu?this.getIndex(n.id,!0).length>0:i.firstElementChild.id===r.firstElementChild.id);if(n&&r&&this.isMenu){var a=r.id?o.exec(r.id)[1]:r.querySelector(".e-menu-parent").id;if(this.element.id!==a)return}if(l&&"click"===e.type&&!n.classList.contains(v)){this.setLISelected(n);var d=this.getIndex(n.id,!0),h={element:n,item:this.getItem(d),event:e};this.trigger("select",h)}if(l&&("mouseover"===e.type||t.Browser.isDevice||this.showItemOnClick)){var c=void 0;if(n.classList.contains(v))c=i.children[this.navIdx.length-1],this.toggleAnimation(c),(f=this.getLIByClass(c,g))&&f.classList.remove(g),t.detach(n.parentNode),this.navIdx.pop();else if(!n.classList.contains("e-separator")){this.showSubMenu=!0;var p=n.parentNode;if(this.cliIdx=this.getIdx(p,n),this.isMenu||!t.Browser.isDevice){var u=this.isMenu?Array.prototype.indexOf.call([i].concat(this.getPopups()),t.closest(p,".e-"+this.getModuleName()+"-wrapper")):this.getIdx(i,p);if(this.navIdx[u]===this.cliIdx&&(this.showSubMenu=!1),u!==this.navIdx.length&&("mouseover"!==e.type||this.showSubMenu)){var f=this.getLIByClass(p,g);f&&f.classList.remove(g),this.isClosed=!0,this.keyType="click",this.closeMenu(u+1,e)}}this.isClosed||this.afterCloseMenu(e),this.isClosed=!1}}else if(this.isMenu&&"DIV"===s.tagName&&this.navIdx.length&&t.closest(s,".e-menu-vscroll")){var b=t.closest(s,"."+C),N=Array.prototype.indexOf.call(this.getPopups(),b)+1;N<this.navIdx.length&&(this.closeMenu(N+1,e),this.removeLIStateByClass([m,g],[b]))}else this.isMenu&&this.hamburgerMode&&"SPAN"===s.tagName&&s.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):"UL"===s.tagName&&(this.isMenu?!s.parentElement.classList.contains("e-menu-wrapper")||this.getIndex(s.querySelector("."+y).id,!0).length:s.parentElement===i)||(n||this.removeLIStateByClass([g],[i]),n&&n.querySelector(".e-caret")||this.closeMenu(null,e))}},n.prototype.afterCloseMenu=function(e){if(this.showSubMenu){var i=this.navIdx.concat(this.cliIdx),s=this.getItem(i);s&&s[this.getField("children",i.length-1)]&&s[this.getField("children",i.length-1)].length?(("mouseover"===e.type||t.Browser.isDevice&&this.isMenu)&&this.setLISelected(this.cli),this.cli.setAttribute("aria-expanded","true"),this.navIdx.push(this.cliIdx),this.openMenu(this.cli,s,null,null,e)):"mouseover"!==e.type&&this.closeMenu(null,e)}this.keyType=""},n.prototype.setLISelected=function(e){var t=this.getLIByClass(e.parentElement,g);t&&t.classList.remove(g),this.isMenu||e.classList.remove(m),e.classList.add(g)},n.prototype.getLIByClass=function(e,t){for(var i=0,s=e.children.length;i<s;i++)if(e.children[i].classList.contains(t))return e.children[i];return null},n.prototype.getItem=function(e){var t=(e=e.slice()).pop();return this.getItems(e)[t]},n.prototype.getItems=function(e){for(var t=this.items,i=0;i<e.length;i++)t=t[e[i]][this.getField("children",i)];return t},n.prototype.setItems=function(e,t){var i=this.getItems(t);i.splice(0,i.length);for(var s=0;s<e.length;s++)i.splice(s,0,e[s])},n.prototype.getIdx=function(e,t,i){void 0===i&&(i=!0);var s=Array.prototype.indexOf.call(e.querySelectorAll("li"),t);return s=this.isMenu&&this.template&&this.isBlazor()?Array.prototype.indexOf.call(e.querySelectorAll(t.tagName),t):Array.prototype.indexOf.call(e.children,t),i&&e.children[0].classList.contains(v)&&s--,s},n.prototype.getLI=function(e){return"LI"===e.tagName&&e.classList.contains("e-menu-item")?e:t.closest(e,"li.e-menu-item")},n.prototype.isBlazor=function(){return-1!==Object.keys(window).indexOf("ejsInterop")},n.prototype.removeChildElement=function(e){for(;e.firstElementChild;)e.removeChild(e.firstElementChild);return e},n.prototype.onPropertyChanged=function(e,i){for(var s=this,n=this.getWrapper(),o=this,r=0,l=Object.keys(e);r<l.length;r++)!function(r){switch(r){case"cssClass":i.cssClass&&t.removeClass([n],i.cssClass.split(" ")),e.cssClass&&t.addClass([n],e.cssClass.split(" "));break;case"enableRtl":n.classList.toggle("e-rtl");break;case"showItemOnClick":o.unWireEvents(),o.showItemOnClick=e.showItemOnClick,o.wireEvents();break;case"enableScrolling":if(e.enableScrolling){var l;o.element.classList.contains("e-vertical")?o.addScrolling(n,o.element,"vscroll",n.offsetHeight,o.element.offsetHeight):o.addScrolling(n,o.element,"hscroll",n.offsetWidth,o.element.offsetWidth),o.getPopups().forEach(function(e){l=t.select(".e-ul",e),s.addScrolling(e,l,"vscroll",e.offsetHeight,l.offsetHeight)})}else{var a=n.children[0];o.element.classList.contains("e-vertical")?o.destroyScrollObj(t.getInstance(a,p),a):o.destroyScrollObj(t.getInstance(a,d),a),n.style.overflow="",n.appendChild(o.element),o.getPopups().forEach(function(e){a=e.children[0],s.destroyScrollObj(t.getInstance(a,p),a),e.style.overflow=""})}break;case"items":var h=void 0,c=void 0,u=void 0;if(Object.keys(i.items).length)for(var f=Object.keys(e.items),m=0;m<f.length;m++)(c=o.getChangedItemIndex(e,[],Number(f[m]))).length<=o.getWrapper().children.length&&(h=c.pop(),u=o.getItems(c),o.insertAfter([u[h]],u[h].text),o.removeItem(u,c,h),o.setItems(u,c)),c.length=0;else{var v=o.element;o.isBlazor()?v=o.removeChildElement(o.element):v.innerHTML="",[].slice.call(o.createItems(o.items).children).forEach(function(e){v.appendChild(e)});for(var m=1,g=n.childElementCount;m<g;m++)t.detach(n.lastElementChild);o.navIdx=[]}}}(l[r])},n.prototype.getChangedItemIndex=function(e,t,i){t.push(i);var s=Object.keys(e.items[i]).pop();if("items"===s){var n=e.items[i];this.getChangedItemIndex(n,t,Number(Object.keys(n.items).pop()))}else"isParentArray"===s&&t.length>1&&t.pop();return t},n.prototype.removeItem=function(e,i,s){e.splice(s,1);var n=this.getWrapper().children;i.length<n.length&&t.detach(n[i.length].children[s])},n.prototype.unWireEvents=function(e){void 0===e&&(e=this.target);var i=this.getWrapper();if(e){for(var n=void 0,o=void 0,r=t.selectAll(e),l=0,a=r.length;l<a;l++)n=r[l],this.isMenu?t.EventHandler.remove(n,"click",this.menuHeaderClickHandler):t.Browser.isIos?(o=t.getInstance(n,t.Touch))&&o.destroy():t.EventHandler.remove(n,"contextmenu",this.cmenuHandler);if(!this.isMenu){t.EventHandler.remove(this.targetElement,"scroll",this.scrollHandler);for(var d=0,h=s.getScrollableParent(this.targetElement);d<h.length;d++){var c=h[d];t.EventHandler.remove(c,"scroll",this.scrollHandler)}}}t.Browser.isDevice||(t.EventHandler.remove(this.isMenu?document:i,"mouseover",this.delegateMoverHandler),t.EventHandler.remove(document,"mousedown",this.delegateMouseDownHandler)),t.EventHandler.remove(document,"click",this.delegateClickHandler),this.unWireKeyboardEvent(i),this.rippleFn()},n.prototype.unWireKeyboardEvent=function(e){var i=t.getInstance(e,t.KeyboardEvents);i&&i.destroy()},n.prototype.toggleAnimation=function(e,t){var i=this;void 0===t&&(t=!0);var s,n;"None"!==this.animationSettings.effect&&t?this.animation.animate(e,{name:this.animationSettings.effect,duration:this.animationSettings.duration,timingFunction:this.animationSettings.easing,begin:function(e){i.hamburgerMode?(n=e.element.parentElement,e.element.style.position="absolute",s=n.offsetHeight,e.element.style.maxHeight=e.element.offsetHeight+"px",n.style.maxHeight=""):(e.element.style.display="block",e.element.style.maxHeight=e.element.getBoundingClientRect().height+"px")},progress:function(e){i.hamburgerMode&&(n.style.minHeight=s+e.element.offsetHeight+"px")},end:function(e){i.hamburgerMode?(e.element.style.position="",e.element.style.maxHeight="",n.style.minHeight="",e.element.style.top="0px",e.element.children[0].focus(),i.triggerOpen(e.element.children[0])):i.end(e.element,t)}}):this.end(e,t)},n.prototype.triggerOpen=function(e){var t=this.navIdx.length?this.getItem(this.navIdx):null,i={element:e,parentItem:t,items:t?t.items:this.items};this.trigger("onOpen",i)},n.prototype.end=function(e,i){if(i)if(e.style.display="block",e.style.maxHeight="",this.triggerOpen(e),e.querySelector("."+m))e.querySelector("."+m).focus();else{var s=void 0;(s=this.getWrapper().children[this.getIdx(this.getWrapper(),e)-1])?s.querySelector("."+g).focus():this.element.focus()}else if(e===this.element){var n=this.getLIByClass(this.element,m);n&&n.classList.remove(m);var o=this.getLIByClass(this.element,g);o&&o.classList.remove(g),e.style.display="none"}else t.detach(e)},n.prototype.getPersistData=function(){return""},n.prototype.getWrapper=function(){return t.closest(this.element,".e-"+this.getModuleName()+"-wrapper")},n.prototype.getIndex=function(e,t,i,s,n,o){void 0===i&&(i=this.items),void 0===s&&(s=[]),void 0===n&&(n=!1),void 0===o&&(o=0);var r;o=n?o+1:0;for(var l=0,a=i.length;l<a;l++){if(r=i[l],(t?r[this.getField("itemId",o)]:r[this.getField("text",o)])===e){s.push(l);break}if(r[this.getField("children",o)]&&r[this.getField("children",o)].length){if(-1!==(s=this.getIndex(e,t,r[this.getField("children",o)],s,!0,o))[s.length-1]){s.unshift(l);break}l!==a-1&&s.pop()}else l===a-1&&s.push(-1)}return n||-1!==s[0]?s:[]},n.prototype.enableItems=function(e,i,s){void 0===i&&(i=!0);for(var n,o,r,l,a="e-disabled",d=0;d<e.length;d++){if(r=this.getIndex(e[d],s),this.navIdx.length){if(1!==r.length){l=!1;for(var h=0,c=r.length-1;h<c;h++)if(r[h]!==this.navIdx[h]){l=!0;break}if(l)continue}}else if(1!==r.length)continue;o=r.pop(),(n=this.getUlByNavIdx(r.length))&&(i?this.isMenu?(n.children[o].classList.remove(a),n.children[o].removeAttribute("aria-disabled")):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[o+1].classList.remove(a):n.children[o].classList.remove(a):this.isMenu?(n.children[o].classList.add(a),n.children[o].setAttribute("aria-disabled","true")):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[o+1].classList.add(a):n.children[o].classList.add(a))}},n.prototype.showItems=function(e,t){this.showHideItems(e,!1,t)},n.prototype.hideItems=function(e,t){this.showHideItems(e,!0,t)},n.prototype.showHideItems=function(e,i,s){for(var n,o,r,l=0;l<e.length;l++)o=(r=this.getIndex(e[l],s)).pop(),(n=this.getUlByNavIdx(r.length))&&(i?t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[o+1].classList.add(b):n.children[o].classList.add(b):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[o+1].classList.remove(b):n.children[o].classList.remove(b))},n.prototype.removeItems=function(e,t){for(var i,s,n,o=0;o<e.length;o++)i=(s=this.getIndex(e[o],t)).pop(),n=this.getItems(s),this.removeItem(n,s,i)},n.prototype.insertAfter=function(e,t,i){this.insertItems(e,t,i)},n.prototype.insertBefore=function(e,t,i){this.insertItems(e,t,i,!1)},n.prototype.insertItems=function(e,i,s,n){void 0===n&&(n=!0);for(var o,r,l,a,d,h=0;h<e.length;h++){r=(l=this.getIndex(i,s)).pop(),a=this.getItems(l),d=new x(a[0],"items",e[h],!0),a.splice(n?r+1:r,0,d);var c=this.isMenu?[this.getWrapper()].concat(this.getPopups()):[].slice.call(this.getWrapper().children);if(l.length<c.length){r=n?r+1:r,this.hasField(a,this.getField("iconCss",l.length-1)),o=this.createItems(a).children[r];var p=this.isMenu?t.select(".e-menu-parent",c[l.length]):c[l.length];p.insertBefore(o,p.children[r])}}},n.prototype.removeAttributes=function(){var e=this;["top","left","display","z-index"].forEach(function(t){e.element.style.removeProperty(t)}),["role","tabindex","class","style"].forEach(function(t){"class"===t&&e.element.classList.contains("e-menu-parent")&&e.element.classList.remove("e-menu-parent"),-1!==["class","style"].indexOf(t)&&e.element.getAttribute(t)||e.element.removeAttribute(t),e.isMenu&&"class"===t&&e.element.classList.contains("e-vertical")&&e.element.classList.remove("e-vertical")})},n.prototype.destroy=function(){var i=this.getWrapper();if(i){if(this.unWireEvents(),this.isMenu)this.closeMenu(),this.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML="",this.removeAttributes(),i.parentNode.insertBefore(this.element,i);else{if(this.clonedElement.style.display="","EJS-CONTEXTMENU"===this.clonedElement.tagName)t.addClass([this.clonedElement],["e-control","e-lib","e-"+this.getModuleName()]),this.element=this.clonedElement;else if(this.refreshing&&this.clonedElement.childElementCount&&"LI"===this.clonedElement.children[0].tagName&&this.setProperties({items:[]},!0),document.getElementById(this.clonedElement.id)){var s=this.clonedElement.nextElementSibling;s&&s!==i?this.clonedElement.parentElement.insertBefore(this.element,s):this.clonedElement.parentElement.appendChild(this.element),this.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML="",t.append([].slice.call(this.clonedElement.children),this.element),t.detach(this.clonedElement),this.removeAttributes()}this.clonedElement=null}this.isMenu&&this.clonedElement?(t.detach(this.element),i.style.display="",i.classList.remove("e-"+this.getModuleName()+"-wrapper"),i.removeAttribute("data-ripple")):t.detach(i),e.prototype.destroy.call(this)}},f([t.Event()],n.prototype,"beforeItemRender",void 0),f([t.Event()],n.prototype,"beforeOpen",void 0),f([t.Event()],n.prototype,"onOpen",void 0),f([t.Event()],n.prototype,"beforeClose",void 0),f([t.Event()],n.prototype,"onClose",void 0),f([t.Event()],n.prototype,"select",void 0),f([t.Event()],n.prototype,"created",void 0),f([t.Property("")],n.prototype,"cssClass",void 0),f([t.Property(!1)],n.prototype,"showItemOnClick",void 0),f([t.Property("")],n.prototype,"target",void 0),f([t.Property("")],n.prototype,"filter",void 0),f([t.Property(null)],n.prototype,"template",void 0),f([t.Property(!1)],n.prototype,"enableScrolling",void 0),f([t.Complex({},N)],n.prototype,"fields",void 0),f([t.Collection([],x)],n.prototype,"items",void 0),f([t.Complex({},O)],n.prototype,"animationSettings",void 0),n=f([t.NotifyPropertyChanges],n)}(t.Component),k=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),S=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},L="e-toolbar-items",I="e-toolbar-item",A="e-toolbar-popup",D=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return k(i,e),S([t.Property("")],i.prototype,"id",void 0),S([t.Property("")],i.prototype,"text",void 0),S([t.Property("auto")],i.prototype,"width",void 0),S([t.Property("")],i.prototype,"cssClass",void 0),S([t.Property(!1)],i.prototype,"showAlwaysInPopup",void 0),S([t.Property("")],i.prototype,"prefixIcon",void 0),S([t.Property("")],i.prototype,"suffixIcon",void 0),S([t.Property("None")],i.prototype,"overflow",void 0),S([t.Property("")],i.prototype,"template",void 0),S([t.Property("Button")],i.prototype,"type",void 0),S([t.Property("Both")],i.prototype,"showTextOn",void 0),S([t.Property(null)],i.prototype,"htmlAttributes",void 0),S([t.Property("")],i.prototype,"tooltipText",void 0),S([t.Property("Left")],i.prototype,"align",void 0),S([t.Event()],i.prototype,"click",void 0),i}(t.ChildProperty),P=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.resizeContext=s.resize.bind(s),s.keyConfigs={moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow",popupOpen:"enter",popupClose:"escape",tab:"tab",home:"home",end:"end"},s}return k(i,e),i.prototype.destroy=function(){var i=this,s=this.element;for(e.prototype.destroy.call(this),this.unwireEvents(),this.tempId.forEach(function(e){t.isNullOrUndefined(i.element.querySelector(e))||(document.body.appendChild(i.element.querySelector(e)).style.display="none")});s.firstElementChild;)s.removeChild(s.firstElementChild);this.trgtEle&&s.appendChild(this.ctrlTem),this.clearProperty(),this.popObj=null,this.tbarAlign=null,this.remove(this.element,"e-toolpop"),s.removeAttribute("style"),["aria-disabled","aria-orientation","aria-haspopup","role"].forEach(function(e){i.element.removeAttribute(e)})},i.prototype.preRender=function(){var e={enableCollision:this.enableCollision,scrollStep:this.scrollStep};this.trigger("beforeCreate",e),this.enableCollision=e.enableCollision,this.scrollStep=e.scrollStep,this.scrollModule=null,this.popObj=null,this.tempId=[],this.tbarItemsCol=this.items,this.isVertical=!!this.element.classList.contains("e-vertical"),this.isExtendedOpen=!1,this.popupPriCount=0,this.enableRtl&&this.add(this.element,"e-rtl")},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this),window.addEventListener("resize",this.resizeContext),this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs}),t.EventHandler.add(this.element,"keydown",this.docKeyDown,this),this.element.setAttribute("tabIndex","0")},i.prototype.docKeyDown=function(e){if("INPUT"!==e.target.tagName){var i=!t.isNullOrUndefined(this.popObj)&&t.isVisible(this.popObj.element)&&"Extended"!==this.overflowMode;9===e.keyCode&&!0===e.target.classList.contains("e-hor-nav")&&i&&this.popObj.hide({name:"FadeOut",duration:100}),(40===e.keyCode||38===e.keyCode||35===e.keyCode||36===e.keyCode)&&e.preventDefault()}},i.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),this.destroyScroll(),this.keyModule.destroy(),window.removeEventListener("resize",this.resizeContext),t.EventHandler.remove(document,"scroll",this.docEvent),t.EventHandler.remove(this.element,"keydown",this.docKeyDown),t.EventHandler.remove(document,"click",this.docEvent)},i.prototype.clearProperty=function(){this.tbarEle=[],this.tbarAlgEle={lefts:[],centers:[],rights:[]}},i.prototype.docEvent=function(e){var i=t.closest(e.target,".e-popup");this.popObj&&t.isVisible(this.popObj.element)&&!i&&"Popup"===this.overflowMode&&this.popObj.hide({name:"FadeOut",duration:100})},i.prototype.destroyScroll=function(){this.scrollModule&&(this.tbarAlign&&this.add(this.scrollModule.element,"e-tbar-pos"),this.scrollModule.destroy(),this.scrollModule=null)},i.prototype.destroyItems=function(){[].slice.call(this.element.querySelectorAll("."+I)).forEach(function(e){t.detach(e)});var e=this.element.querySelector("."+L);this.tbarAlign&&([].slice.call(e.children).forEach(function(e){t.detach(e)}),this.tbarAlign=!1,this.remove(e,"e-tbar-pos")),this.clearProperty()},i.prototype.destroyMode=function(){this.scrollModule&&(this.remove(this.scrollModule.element,"e-rtl"),this.destroyScroll()),this.remove(this.element,"e-tbar-extended"),this.remove(this.element,"e-extended-toolbar");var e=this.element.querySelector(".e-toolbar-multirow");e&&this.remove(e,"e-toolbar-multirow"),this.popObj&&this.popupRefresh(this.popObj.element,!0)},i.prototype.add=function(e,t){e.classList.add(t)},i.prototype.remove=function(e,t){e.classList.remove(t)},i.prototype.elementFocus=function(e){var t=e.firstElementChild;t?(t.focus(),this.activeEleSwitch(e)):e.focus()},i.prototype.clstElement=function(e,i){return e&&this.popObj&&t.isVisible(this.popObj.element)?this.popObj.element.querySelector("."+I):this.element===i||e?this.element.querySelector("."+I+":not(.e-overlay ):not(.e-separator ):not(.e-hidden )"):t.closest(i,"."+I)},i.prototype.keyHandling=function(e,i,s,n,o){var r=this.popObj,l=this.element,a={name:"FadeOut",duration:100};switch(i.action){case"moveRight":if(this.isVertical)return;l===s?this.elementFocus(e):n||this.eleFocus(e,"next");break;case"moveLeft":if(this.isVertical)return;n||this.eleFocus(e,"previous");break;case"home":case"end":var d=void 0,h=void 0;if(e){var c=t.closest(e,".e-popup");c?t.isVisible(this.popObj.element)&&(h=[].slice.call(c.children),d="home"===i.action?h[0]:h[h.length-1]):(h=this.element.querySelectorAll("."+L+" ."+I),d="home"===i.action?h[0]:h[h.length-1]),d&&this.elementFocus(d)}break;case"moveUp":case"moveDown":var p="moveUp"===i.action?"previous":"next";if(this.isVertical)"moveUp"===i.action?this.eleFocus(e,"previous"):this.eleFocus(e,"next");else if(r&&t.closest(s,".e-popup")){var u=r.element,f=u.firstElementChild;if("previous"===p&&f===e||"next"===p&&u.lastElementChild===e)return;this.eleFocus(e,p)}else"moveDown"===i.action&&r&&t.isVisible(r.element)&&this.elementFocus(e);break;case"tab":if(!o&&!n){var m=e.firstElementChild;l===s&&(this.activeEle?this.activeEle.focus():(this.activeEleRemove(m),m.focus()),this.element.removeAttribute("tabindex"))}break;case"popupClose":r&&"Extended"!==this.overflowMode&&r.hide(a);break;case"popupOpen":if(!n)return;r&&!t.isVisible(r.element)?(r.element.style.top=l.offsetHeight+"px",r.show({name:"FadeIn",duration:100})):r.hide(a)}},i.prototype.keyActionHandler=function(e){var t=e.target;if("INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!this.element.classList.contains("e-overlay")){e.preventDefault();var i,s=t.classList.contains("e-hor-nav"),n=t.classList.contains("e-scroll-nav");((i=this.clstElement(s,t))||n)&&this.keyHandling(i,e,t,s,n)}},i.prototype.disable=function(e){var i=this.element;e?i.classList.add("e-overlay"):i.classList.remove("e-overlay"),i.setAttribute("tabindex",e?"-1":"0"),this.activeEle&&this.activeEle.setAttribute("tabindex",e?"-1":"0"),this.scrollModule&&this.scrollModule.disable(e),this.popObj&&(t.isVisible(this.popObj.element)&&"Extended"!==this.overflowMode&&this.popObj.hide(),i.querySelector("#"+i.id+"_nav").setAttribute("tabindex",e?"-1":"0"))},i.prototype.eleContains=function(e){return e.classList.contains("e-separator")||e.classList.contains("e-overlay")||e.getAttribute("disabled")||e.classList.contains("e-hidden")||!t.isVisible(e)},i.prototype.eleFocus=function(e,i){var s=Object(e)[i+"ElementSibling"];if(s){if(this.eleContains(s))return void this.eleFocus(s,i);this.elementFocus(s)}else if(this.tbarAlign){var n=Object(e.parentElement)[i+"ElementSibling"];if(t.isNullOrUndefined(n)||0!==n.children.length||(n=Object(n)[i+"ElementSibling"]),!t.isNullOrUndefined(n)&&n.children.length>0)if("next"===i){o=n.querySelector("."+I);this.eleContains(o)?this.eleFocus(o,i):(o.firstElementChild.focus(),this.activeEleSwitch(o))}else{var o=n.lastElementChild;this.eleContains(o)?this.eleFocus(o,i):this.elementFocus(o)}}},i.prototype.clickHandler=function(e){var i=this,s=e.target,n=s.classList,o=this.element,r=!t.isNullOrUndefined(t.closest(s,".e-toolbar-pop")),l=t.closest(s,".e-hor-nav");l||(l=s),o.children[0].classList.contains("e-hscroll")||o.children[0].classList.contains("e-vscroll")||!n.contains("e-hor-nav")||(n=s.querySelector(".e-icons").classList),(n.contains("e-popup-up-icon")||n.contains("e-popup-down-icon"))&&this.popupClickHandler(o,l,"e-rtl");var a,d=t.closest(e.target,"."+I);if(!t.isNullOrUndefined(d)&&!d.classList.contains("e-overlay")||l.classList.contains("e-hor-nav")){d&&(a=this.items[this.tbarEle.indexOf(d)]);var h={originalEvent:e,item:a};a&&!t.isNullOrUndefined(a.click)&&this.trigger("items["+this.tbarEle.indexOf(d)+"].click",h),h.cancel||this.trigger("clicked",h,function(e){!t.isNullOrUndefined(i.popObj)&&r&&!e.cancel&&"Popup"===i.overflowMode&&e.item&&"Input"!==e.item.type&&i.popObj.hide({name:"FadeOut",duration:100})})}},i.prototype.popupClickHandler=function(e,i,s){var n=this.popObj;t.isVisible(n.element)?(i.classList.remove("e-nav-active"),n.hide({name:"FadeOut",duration:100})):(e.classList.contains(s)&&(n.enableRtl=!0,n.position={X:"left",Y:"top"}),0!==n.offsetX||e.classList.contains(s)||(n.enableRtl=!1,n.position={X:"right",Y:"top"}),n.dataBind(),n.refreshPosition(),n.element.style.top=this.getElementOffsetY()+"px","Extended"===this.overflowMode&&(n.element.style.minHeight="0px"),i.classList.add("e-nav-active"),n.show({name:"FadeIn",duration:100}))},i.prototype.render=function(){this.initialize(),this.renderControl(),this.separator(),this.refreshToolbarTemplate(),this.wireEvents(),t.isBlazor()&&this.renderComplete()},i.prototype.initialize=function(){var e=t.formatUnit(this.width),i=t.formatUnit(this.height);"msie"===t.Browser.info.name&&"auto"===this.height&&"MultiRow"!==this.overflowMode||t.setStyleAttribute(this.element,{height:i}),t.setStyleAttribute(this.element,{width:e});var s={role:"toolbar","aria-disabled":"false","aria-haspopup":"false","aria-orientation":this.isVertical?"vertical":"horizontal"};t.attributes(this.element,s)},i.prototype.renderControl=function(){this.trgtEle=this.element.children.length>0?this.element.querySelector("div"):null,this.tbarAlgEle={lefts:[],centers:[],rights:[]},this.renderItems(),this.renderOverflowMode(),this.tbarAlign&&this.itemPositioning(),this.popObj&&this.popObj.element.childElementCount>1&&this.checkPopupRefresh(this.element,this.popObj.element)&&this.popupRefresh(this.popObj.element,!1)},i.prototype.changeOrientation=function(){var e=this.element;this.isVertical?(e.classList.remove("e-vertical"),this.isVertical=!1,"auto"!==this.height&&"100%"!==this.height||(e.style.height=this.height),e.setAttribute("aria-orientation","horizontal")):(e.classList.add("e-vertical"),this.isVertical=!0,e.setAttribute("aria-orientation","vertical"),t.setStyleAttribute(this.element,{height:t.formatUnit(this.height),width:t.formatUnit(this.width)})),this.destroyMode(),this.refreshOverflow()},i.prototype.initScroll=function(e,i){!this.scrollModule&&this.checkOverflow(e,i[0])&&(this.tbarAlign&&this.element.querySelector("."+L+" .e-toolbar-center").removeAttribute("style"),this.isVertical?this.scrollModule=new p({scrollStep:this.scrollStep,enableRtl:this.enableRtl},i[0]):this.scrollModule=new d({scrollStep:this.scrollStep,enableRtl:this.enableRtl},i[0]),this.remove(this.scrollModule.element,"e-tbar-pos"),t.setStyleAttribute(this.element,{overflow:"hidden"}))},i.prototype.itemWidthCal=function(e){var i,s=this,n=0;return[].slice.call(t.selectAll("."+I,e)).forEach(function(e){t.isVisible(e)&&(i=window.getComputedStyle(e),n+=s.isVertical?e.offsetHeight:e.offsetWidth,n+=parseFloat(s.isVertical?i.marginTop:i.marginRight),n+=parseFloat(s.isVertical?i.marginBottom:i.marginLeft))}),n},i.prototype.getScrollCntEle=function(e){var t=this.isVertical?".e-vscroll-content":".e-hscroll-content";return e.querySelector(t)},i.prototype.checkOverflow=function(e,i){if(t.isNullOrUndefined(e)||t.isNullOrUndefined(i)||!t.isVisible(e))return!1;var s=this.isVertical?e.offsetHeight:e.offsetWidth,n=this.isVertical?i.offsetHeight:i.offsetWidth;(this.tbarAlign||this.scrollModule||s===n)&&(n=this.itemWidthCal(this.scrollModule?this.getScrollCntEle(i):i));var o=e.querySelector(".e-hor-nav"),r=e.querySelector(".e-scroll-nav"),l=0;return o?l=this.isVertical?o.offsetHeight:o.offsetWidth:r&&(l=this.isVertical?2*r.offsetHeight:2*r.offsetWidth),n>s-l},i.prototype.refreshOverflow=function(){this.resize()},i.prototype.toolbarAlign=function(e){this.tbarAlign&&(this.add(e,"e-tbar-pos"),this.itemPositioning())},i.prototype.renderOverflowMode=function(){var e=this.element,i=e.querySelector("."+L),s=this.popupPriCount>0;if(e&&e.children.length>0)switch(this.offsetWid=e.offsetWidth,this.remove(this.element,"e-toolpop"),"msie"===t.Browser.info.name&&"auto"===this.height&&(e.style.height=""),this.overflowMode){case"Scrollable":t.isNullOrUndefined(this.scrollModule)&&this.initScroll(e,[].slice.call(e.getElementsByClassName(L)));break;case"Popup":this.add(this.element,"e-toolpop"),this.tbarAlign&&this.removePositioning(),(this.checkOverflow(e,i)||s)&&this.setOverflowAttributes(e),this.toolbarAlign(i);break;case"MultiRow":this.add(i,"e-toolbar-multirow"),this.checkOverflow(e,i)&&this.tbarAlign&&(this.removePositioning(),this.add(i,"e-multirow-pos")),"hidden"===e.style.overflow&&(e.style.overflow=""),"msie"!==t.Browser.info.name&&"auto"===e.style.height||(e.style.height="auto");break;case"Extended":this.add(this.element,"e-extended-toolbar"),(this.checkOverflow(e,i)||s)&&(this.tbarAlign&&this.removePositioning(),this.setOverflowAttributes(e)),this.toolbarAlign(i)}},i.prototype.setOverflowAttributes=function(e){this.createPopupEle(e,[].slice.call(t.selectAll("."+L+" ."+I,e))),this.element.querySelector(".e-hor-nav").setAttribute("tabIndex","0"),this.element.querySelector(".e-hor-nav").setAttribute("role","list")},i.prototype.separator=function(){var e,t=this.element,i=[].slice.call(t.querySelectorAll(".e-separator")),s=t.querySelector(".e-multirow-separator"),n=t.querySelector(".e-extended-separator");null!==(e="MultiRow"===this.overflowMode?s:n)&&("MultiRow"===this.overflowMode?e.classList.remove("e-multirow-separator"):"Extended"===this.overflowMode&&e.classList.remove("e-extended-separator"));for(var o=0;o<=i.length-1;o++)i[o].offsetLeft<30&&0!==i[o].offsetLeft&&("MultiRow"===this.overflowMode?i[o].classList.add("e-multirow-separator"):"Extended"===this.overflowMode&&i[o].classList.add("e-extended-separator"))},i.prototype.createPopupEle=function(e,i){var s=e.querySelector(".e-hor-nav"),n=this.isVertical;s||this.createPopupIcon(e),s=e.querySelector(".e-hor-nav");var o=n?s.offsetHeight:s.offsetWidth,r=(n?e.offsetHeight:e.offsetWidth)-o;this.element.classList.remove("e-rtl"),t.setStyleAttribute(this.element,{direction:"initial"}),this.checkPriority(e,i,r,!0),this.enableRtl&&this.element.classList.add("e-rtl"),this.element.style.removeProperty("direction"),this.createPopup()},i.prototype.pushingPoppedEle=function(e,i,s,n,o){var r=e.element,l=t.selectAll(".e-overflow-show",s),a=0,d=0;[].slice.call(t.selectAll("."+A,r.querySelector("."+L))).forEach(function(r,h){l=t.selectAll(".e-overflow-show",s),r.classList.contains("e-overflow-show")&&l.length>0?e.tbResize&&l.length>h?(s.insertBefore(r,l[h]),++d):(s.insertBefore(r,s.children[l.length]),++d):r.classList.contains("e-overflow-show")?(s.insertBefore(r,s.firstChild),++d):e.tbResize&&r.classList.contains("e-overflow-hide")&&s.children.length>0&&0===l.length?(s.insertBefore(r,s.firstChild),++d):r.classList.contains("e-overflow-hide")?i.push(r):e.tbResize?(s.insertBefore(r,s.childNodes[a+d]),++a):s.appendChild(r),r.classList.contains("e-separator")?t.setStyleAttribute(r,{display:"",height:o+"px"}):t.setStyleAttribute(r,{display:"",height:n+"px"})}),i.forEach(function(e){s.appendChild(e)});for(var h=t.selectAll("."+I,r.querySelector("."+L)),c=h.length-1;c>=0;c--){var p=h[c];if(!p.classList.contains("e-separator")||"Extended"===this.overflowMode)break;t.setStyleAttribute(p,{display:"none"})}},i.prototype.createPopup=function(){var e,t,i,s,n=this.element;"Extended"===this.overflowMode&&(s=n.querySelector(".e-separator:not(."+A+")"),i="auto"===n.style.height||""===n.style.height?null:s.offsetHeight),t=n.querySelector("."+I+":not(.e-separator):not(."+A+")"),e="auto"===n.style.height||""===n.style.height?null:t&&t.offsetHeight;var o,r=[];if(n.querySelector("#"+n.id+"_popup.e-toolbar-pop"))o=n.querySelector("#"+n.id+"_popup.e-toolbar-pop");else{var l=this.createElement("div",{id:n.id+"_popup",className:"e-toolbar-pop e-toolbar-extended"}),a=this.createElement("div",{id:n.id+"_popup",className:"e-toolbar-pop"});o="Extended"===this.overflowMode?l:a}this.pushingPoppedEle(this,r,o,e,i),this.popupInit(n,o)},i.prototype.getElementOffsetY=function(){return"Extended"===this.overflowMode&&"border-box"===window.getComputedStyle(this.element).getPropertyValue("box-sizing")?this.element.clientHeight:this.element.offsetHeight},i.prototype.popupInit=function(e,i){if(this.popObj){var n=this.popObj.element;t.setStyleAttribute(n,{maxHeight:"",display:"block"}),t.setStyleAttribute(n,{maxHeight:n.offsetHeight+"px",display:""})}else{e.appendChild(i),t.setStyleAttribute(this.element,{overflow:""});var o=window.getComputedStyle(this.element),r=new s.Popup(null,{relateTo:this.element,offsetY:this.isVertical?0:this.getElementOffsetY(),enableRtl:this.enableRtl,open:this.popupOpen.bind(this),close:this.popupClose.bind(this),collision:{Y:this.enableCollision?"flip":"none"},position:this.enableRtl?{X:"left",Y:"top"}:{X:"right",Y:"top"}});if(r.appendTo(i),"Extended"===this.overflowMode&&(r.width=parseFloat(o.width)+2*parseFloat(o.borderRightWidth),r.offsetX=0),t.EventHandler.add(document,"scroll",this.docEvent.bind(this)),t.EventHandler.add(document,"click ",this.docEvent.bind(this)),r.element.style.maxHeight=r.element.offsetHeight+"px",this.isVertical&&(r.element.style.visibility="hidden"),this.isExtendedOpen){var l=this.element.querySelector(".e-hor-nav");l.classList.add("e-nav-active"),t.classList(l.firstElementChild,["e-popup-up-icon"],["e-popup-down-icon"]),this.element.querySelector(".e-toolbar-extended").classList.add("e-popup-open")}else r.hide();this.popObj=r,this.element.setAttribute("aria-haspopup","true")}},i.prototype.tbarPopupHandler=function(e){"Extended"===this.overflowMode&&(e?this.add(this.element,"e-tbar-extended"):this.remove(this.element,"e-tbar-extended"))},i.prototype.popupOpen=function(e){var i=this.popObj;this.isVertical||(i.offsetY=this.getElementOffsetY(),i.dataBind());var n=this.popObj.element,o=this.popObj.element.parentElement,r=o.querySelector(".e-hor-nav");t.setStyleAttribute(i.element,{height:"auto",maxHeight:""}),i.element.style.maxHeight=i.element.offsetHeight+"px","Extended"===this.overflowMode&&(i.element.style.minHeight="");var l=n.offsetTop+n.offsetHeight+s.calculatePosition(o).top,a=r.firstElementChild;r.classList.add("e-nav-active"),t.classList(a,["e-popup-up-icon"],["e-popup-down-icon"]),this.tbarPopupHandler(!0);var d=t.isNullOrUndefined(window.scrollY)?0:window.scrollY;if(!this.isVertical&&window.innerHeight+d<l&&this.element.offsetTop<n.offsetHeight){var h=n.offsetHeight-(l-window.innerHeight-d+5);i.height=h+"px";for(var c=0;c<=n.childElementCount;c++){var p=n.children[c];if(p.offsetTop+p.offsetHeight>h){h=p.offsetTop;break}}t.setStyleAttribute(i.element,{maxHeight:h+"px"})}else if(this.isVertical){var u=this.element.getBoundingClientRect();t.setStyleAttribute(i.element,{maxHeight:u.top+this.element.offsetHeight+"px",bottom:0,visibility:""})}},i.prototype.popupClose=function(e){var i=this.element.querySelector(".e-hor-nav"),s=i.firstElementChild;i.classList.remove("e-nav-active"),t.classList(s,["e-popup-down-icon"],["e-popup-up-icon"]),this.tbarPopupHandler(!1)},i.prototype.checkPriority=function(e,i,s,n){for(var o,r=this.popupPriCount>0,l=s,a=0,d=0,h=0,c=function(e,t){var i=!1;return t.forEach(function(t){e.classList.contains(t)&&(i=!0)}),i},p=i.length-1;p>=0;p--){var u=void 0,f=window.getComputedStyle(i[p]);this.isVertical?(u=parseFloat(f.marginTop),u+=parseFloat(f.marginBottom)):(u=parseFloat(f.marginRight),u+=parseFloat(f.marginLeft));var m=i[p]===this.tbarEle[0];m&&(this.tbarEleMrgn=u),o=this.isVertical?i[p].offsetHeight:i[p].offsetWidth;var v=m?o+u:o;if(c(i[p],["e-popup-alone"])&&r&&(i[p].classList.add(A),this.isVertical?t.setStyleAttribute(i[p],{display:"none",minHeight:v+"px"}):t.setStyleAttribute(i[p],{display:"none",minWidth:v+"px"}),h++),this.isVertical?i[p].offsetTop+i[p].offsetHeight+u>s:i[p].offsetLeft+i[p].offsetWidth+u>s){if(i[p].classList.contains("e-separator")){if("Extended"===this.overflowMode)d===h&&c(g=i[p],["e-separator","e-ignore"])&&(i[p].classList.add(A),h++),d++;else if("Popup"===this.overflowMode){if(a>0&&d===h){var g=i[p+d+(a-1)];c(g,["e-separator","e-ignore"])&&t.setStyleAttribute(g,{display:"none"})}a++,d=0,h=0}}else d++;i[p].classList.contains("e-overflow-show")&&n?s-=(this.isVertical?i[p].offsetHeight:i[p].offsetWidth)+u:c(i[p],["e-separator","e-ignore"])?s-=(this.isVertical?i[p].offsetHeight:i[p].offsetWidth)+u:(i[p].classList.add(A),this.isVertical?t.setStyleAttribute(i[p],{display:"none",minHeight:v+"px"}):t.setStyleAttribute(i[p],{display:"none",minWidth:v+"px"}),h++)}}if(n){var y=t.selectAll("."+I+":not(."+A+")",this.element);this.checkPriority(e,y,l,!1)}},i.prototype.createPopupIcon=function(e){var i=e.id.concat("_nav"),s="e-"+e.id.concat("_nav e-hor-nav");s="Extended"===this.overflowMode?s+" e-expended-nav":s;var n=this.createElement("div",{id:i,className:s});"msie"!==t.Browser.info.name&&"edge"!==t.Browser.info.name||n.classList.add("e-ie-align");var o=this.createElement("div",{className:"e-popup-down-icon e-icons"});n.appendChild(o),n.setAttribute("tabindex","0"),n.setAttribute("role","list"),e.appendChild(n)},i.prototype.tbarPriRef=function(e,i,s,n,o,r,l,a){var d=a,h=this.popObj.element,c=t.selectAll("."+A+":not(.e-overflow-show)",h).length,p=function(e,t){return e.classList.contains(t)};if(0===t.selectAll(".e-toolbar-item:not(.e-separator):not(.e-overflow-show)",e).length){var u=e.children[i-(i-s)-1],f=!t.isNullOrUndefined(u)&&p(u,"e-ignore");if(!t.isNullOrUndefined(u)&&p(u,"e-separator")&&!t.isVisible(u)||f){u.style.display="inherit";var m=u.offsetWidth+2*parseFloat(window.getComputedStyle(u).marginRight),v=u.previousElementSibling;r+m<l||o?(e.insertBefore(n,e.children[i+d-(i-s)]),t.isNullOrUndefined(v)||(v.style.display="")):v.classList.contains("e-separator")&&(v.style.display="none"),u.style.display=""}else e.insertBefore(n,e.children[i+d-(i-s)])}else e.insertBefore(n,e.children[i+d-c])},i.prototype.popupRefresh=function(e,i){var s=this,n=this.element,o=this.isVertical,r=n.querySelector(".e-hor-nav"),l=n.querySelector("."+L);if(!t.isNullOrUndefined(r)){l.removeAttribute("style"),e.style.display="block";var a;a=o?n.offsetHeight-(r.offsetHeight+l.offsetHeight):n.offsetWidth-(r.offsetWidth+l.offsetWidth);var d=0;[].slice.call(e.children).forEach(function(e){d+=s.popupEleWidth(e),t.setStyleAttribute(e,{position:""})}),a+(o?r.offsetHeight:r.offsetWidth)>d&&0===this.popupPriCount&&(i=!0),this.popupEleRefresh(a,e,i),e.style.display="",0===e.children.length&&r&&this.popObj&&(t.detach(r),r=null,this.popObj.destroy(),t.detach(this.popObj.element),this.popObj=null,n.setAttribute("aria-haspopup","false"))}},i.prototype.ignoreEleFetch=function(e,t){var i=[].slice.call(t.querySelectorAll(".e-ignore")),s=[],n=0;return i.length>0?(i.forEach(function(e){s.push([].slice.call(t.children).indexOf(e))}),s.forEach(function(t){t<=e&&n++}),n):0},i.prototype.checkPopupRefresh=function(e,t){t.style.display="block";var i=this.popupEleWidth(t.firstElementChild);t.firstElementChild.style.removeProperty("Position");var s=e.offsetWidth-e.querySelector(".e-hor-nav").offsetWidth,n=e.querySelector("."+L).offsetWidth;return t.style.removeProperty("display"),s>i+n},i.prototype.popupEleWidth=function(e){e.style.position="absolute";var i=this.isVertical?e.offsetHeight:e.offsetWidth,s=e.querySelector(".e-tbar-btn-text");if(e.classList.contains("e-tbtn-align")||e.classList.contains("e-popup-text")){var n=e.children[0];!t.isNullOrUndefined(s)&&e.classList.contains("e-popup-text")?s.style.display="none":!t.isNullOrUndefined(s)&&e.classList.contains("e-toolbar-text")&&(s.style.display="block"),n.style.minWidth="0%",i=parseFloat(this.isVertical?e.style.minHeight:e.style.minWidth),n.style.minWidth="",n.style.minHeight="",t.isNullOrUndefined(s)||(s.style.display="")}return i},i.prototype.popupEleRefresh=function(e,i,s){for(var n,o,r=this.popupPriCount>0,l=this.tbarEle,a=this.element.querySelector("."+L),d=0,h=this,c=0,p=[].slice.call(i.children);c<p.length&&"break"!==function(i){if(i.classList.contains("e-popup-alone")&&r&&!s)return"continue";var c=h.popupEleWidth(i);if(i===h.tbarEle[0]&&(c+=h.tbarEleMrgn),i.style.position="",!(c<e||s))return"break";if(t.setStyleAttribute(i,{minWidth:"",height:"",minHeight:""}),i.classList.contains("e-overflow-hide")||i.classList.remove(A),o=h.tbarEle.indexOf(i),h.tbarAlign){var p=h.items[o].align;o=h.tbarAlgEle[(p+"s").toLowerCase()].indexOf(i),l=h.tbarAlgEle[(p+"s").toLowerCase()],a=h.element.querySelector("."+L+" .e-toolbar-"+p.toLowerCase())}var u=0;"Extended"!==h.overflowMode&&l.slice(0,o).forEach(function(t){(t.classList.contains("e-overflow-show")||t.classList.contains("e-separator"))&&(t.classList.contains("e-separator")&&(t.style.display="",e-=t.offsetWidth),u++)}),d=h.ignoreEleFetch(o,a),i.classList.contains("e-overflow-show")?(h.tbarPriRef(a,o,u,i,s,c,e,d),e-=i.offsetWidth):0===o?(a.insertBefore(i,a.firstChild),e-=i.offsetWidth):(n=t.selectAll(".e-overflow-show",h.popObj.element).length,a.insertBefore(i,a.children[o+d-n]),e-=i.offsetWidth),i.style.height=""}(p[c]);c++);this.checkOverflow(this.element,this.element.getElementsByClassName(L)[0])&&!s&&this.renderOverflowMode()},i.prototype.removePositioning=function(){var e=this.element.querySelector("."+L);if(!t.isNullOrUndefined(e)&&e.classList.contains("e-tbar-pos")){this.remove(e,"e-tbar-pos");var i=[].slice.call(e.childNodes);i[1].removeAttribute("style"),i[2].removeAttribute("style")}},i.prototype.refreshPositioning=function(){var e=this.element.querySelector("."+L);this.add(e,"e-tbar-pos"),this.itemPositioning()},i.prototype.itemPositioning=function(){var e,i=this.element.querySelector("."+L);if(!t.isNullOrUndefined(i)&&i.classList.contains("e-tbar-pos")){var s,n=this.element.querySelector(".e-hor-nav");if(this.scrollModule){var o=this.isVertical?"e-vscroll-content":"e-hscroll-content";s=[].slice.call(i.querySelector("."+o).children)}else s=[].slice.call(i.childNodes);e=this.isVertical?s[0].offsetHeight+s[2].offsetHeight:s[0].offsetWidth+s[2].offsetWidth;var r=this.isVertical?this.element.offsetHeight:this.element.offsetWidth;if(n){r-=this.isVertical?n.offsetHeight:n.offsetWidth;var l=(this.isVertical?n.offsetHeight:n.offsetWidth)+"px";s[2].removeAttribute("style"),this.isVertical?this.enableRtl?s[2].style.top=l:s[2].style.bottom=l:this.enableRtl?s[2].style.left=l:s[2].style.right=l}if(!(r<=e)){var a=(r-e-(this.isVertical?s[1].offsetHeight:s[1].offsetWidth))/2;s[1].removeAttribute("style");var d=(this.isVertical?s[0].offsetHeight:s[0].offsetWidth)+a+"px";this.isVertical?this.enableRtl?s[1].style.marginBottom=d:s[1].style.marginTop=d:this.enableRtl?s[1].style.marginRight=d:s[1].style.marginLeft=d}}},i.prototype.tbarItemAlign=function(e,t,i){var s=this;if(!e.showAlwaysInPopup||"Show"===e.overflow){var n=[];if(n.push(this.createElement("div",{className:"e-toolbar-left"})),n.push(this.createElement("div",{className:"e-toolbar-center"})),n.push(this.createElement("div",{className:"e-toolbar-right"})),0===i&&"Left"!==e.align)n.forEach(function(e){t.appendChild(e)}),this.tbarAlign=!0,this.add(t,"e-tbar-pos");else if("Left"!==e.align){var o=t.childNodes,r=n[0];[].slice.call(o).forEach(function(e){s.tbarAlgEle.lefts.push(e),r.appendChild(e)}),t.appendChild(r),t.appendChild(n[1]),t.appendChild(n[2]),this.tbarAlign=!0,this.add(t,"e-tbar-pos")}}},i.prototype.ctrlTemplate=function(){var e=this;this.ctrlTem=this.trgtEle.cloneNode(!0),this.add(this.trgtEle,L),this.tbarEle=[],[].slice.call(this.trgtEle.children).forEach(function(t){"DIV"===t.tagName&&(e.tbarEle.push(t),t.setAttribute("aria-disabled","false"),e.add(t,I))})},i.prototype.renderItems=function(){var e,t,i,s=this.element,n=this.items;if(s&&s.children.length>0&&(e=s.querySelector("."+L)),null!=this.trgtEle)this.ctrlTemplate();else if(s&&n.length>0){e||(e=this.createElement("div",{className:L}));for(var o=0;o<n.length;o++)t=this.renderSubComponent(n[o],o),-1===this.tbarEle.indexOf(t)&&this.tbarEle.push(t),this.tbarAlign||this.tbarItemAlign(n[o],e,o),(i=e.querySelector(".e-toolbar-"+n[o].align.toLowerCase()))?(n[o].showAlwaysInPopup&&"Show"!==n[o].overflow||this.tbarAlgEle[(n[o].align+"s").toLowerCase()].push(t),i.appendChild(t)):e.appendChild(t);s.appendChild(e)}},i.prototype.setAttr=function(e,t){for(var i,s=Object.keys(e),n=0;n<s.length;n++)"class"===(i=s[n])?this.add(t,e[i]):t.setAttribute(i,e[i])},i.prototype.enableItems=function(e,i){var s,n=e,o=n.length;t.isNullOrUndefined(i)&&(i=!0);var r=function(e,t){e?(t.classList.remove("e-overlay"),t.setAttribute("aria-disabled","false")):(t.classList.add("e-overlay"),t.setAttribute("aria-disabled","true"))};if(!t.isNullOrUndefined(o)&&o>=1){for(var l=0,a=[].slice.call(n);l<o;l++){var d=a[l];if("number"==typeof d){if(s=this.getElementByIndex(d),t.isNullOrUndefined(s))return;n[l]=s}else s=d;r(i,s)}i?t.removeClass(n,"e-overlay"):t.addClass(n,"e-overlay")}else{if("number"==typeof n){if(s=this.getElementByIndex(n),t.isNullOrUndefined(s))return}else s=e;r(i,s)}},i.prototype.getElementByIndex=function(e){return this.tbarEle[e]?this.tbarEle[e]:null},i.prototype.addItems=function(e,i){var s;this.extendedOpen();var n=this.element.querySelector("."+L);if(t.isNullOrUndefined(n))return void this.itemsRerender(e);var o,r="Left";t.isNullOrUndefined(i)&&(i=0),e.forEach(function(e){t.isNullOrUndefined(e.align)||"Left"===e.align||"Left"!==r||(r=e.align)});for(var l=0,a=e;l<a.length;l++){var d=a[l];if(t.isNullOrUndefined(d.type)&&(d.type="Button"),s=t.selectAll("."+I,this.element),d.align=r,o=this.renderSubComponent(d,i),this.tbarEle.length>=i&&s.length>=0){t.isNullOrUndefined(this.scrollModule)&&this.destroyMode();var h="L"===d.align[0]?0:"C"===d.align[0]?1:2,c=void 0;this.tbarAlign||"Left"===r?this.tbarAlign?((c=t.closest(s[0],"."+L).children[h]).insertBefore(o,c.children[i]),this.tbarAlgEle[(d.align+"s").toLowerCase()].splice(i,0,o),this.refreshPositioning()):0===s.length?(s=t.selectAll("."+L,this.element))[0].appendChild(o):s[0].parentNode.insertBefore(o,s[i]):(this.tbarItemAlign(d,n,1),this.tbarAlign=!0,(c=t.closest(s[0],"."+L).children[h]).appendChild(o),this.tbarAlgEle[(d.align+"s").toLowerCase()].push(o),this.refreshPositioning()),this.items.splice(i,0,d),this.tbarEle.splice(i,0,o),i++,this.offsetWid=n.offsetWidth}}n.style.width="",this.renderOverflowMode()},i.prototype.removeItems=function(e){var i,s=e,n=[].slice.call(t.selectAll("."+I,this.element));if("number"==typeof s)i=parseInt(e.toString(),10),this.removeItemByIndex(i,n);else if(s&&s.length>1)for(var o=0,r=[].slice.call(s);o<r.length;o++){l=r[o];i=this.tbarEle.indexOf(l),this.removeItemByIndex(i,n),n=t.selectAll("."+I,this.element)}else{var l=s&&s.length&&1===s.length?s[0]:e;i=n.indexOf(l),this.removeItemByIndex(i,n)}this.resize()},i.prototype.removeItemByIndex=function(e,i){if(this.tbarEle[e]&&i[e]){var s=this.tbarEle.indexOf(i[e]);if(this.tbarAlign){var n=void 0;n=this.tbarAlgEle[(this.items[s].align+"s").toLowerCase()].indexOf(this.tbarEle[s]),this.tbarAlgEle[(this.items[s].align+"s").toLowerCase()].splice(n,1)}t.detach(i[e]),this.items.splice(s,1),this.tbarEle.splice(s,1)}},i.prototype.templateRender=function(e,i,s,n){var o,r=s.type,l=e;if("object"==typeof e&&(o="function"==typeof l.appendTo),"string"!=typeof e&&o){if("Input"===r){var a=this.createElement("input");s.id?a.id=s.id:a.id=t.getUniqueID("tbr-ipt"),i.appendChild(a),l.appendTo(a)}}else{var d=void 0,h=e;h="string"==typeof e?e.trim():e;try{if("object"!=typeof e||t.isNullOrUndefined(e.tagName)){if(document.querySelectorAll(h).length){var c=(a=document.querySelector(h)).outerHTML.trim();i.appendChild(a),a.style.display="",t.isNullOrUndefined(c)||this.tempId.push(h)}}else i.appendChild(e)}catch(e){d=t.compile(h)}var p=void 0;t.isNullOrUndefined(d)||(p=d({},this,"template",this.element.id+n+"_template",this.isStringTemplate)),!t.isNullOrUndefined(p)&&p.length>0&&[].slice.call(p).forEach(function(e){t.isNullOrUndefined(e.tagName)||(e.style.display=""),i.appendChild(e)})}this.add(i,"e-template"),this.tbarEle.push(i)},i.prototype.buttonRendering=function(e,i){var s=this.createElement("button",{className:"e-tbar-btn"});s.setAttribute("type","button");var o,r,l=e.text;e.id?s.id=e.id:s.id=t.getUniqueID("e-tbr-btn");var a=this.createElement("span",{className:"e-tbar-btn-text"});l?(a.innerHTML=l,s.appendChild(a),s.classList.add("e-tbtn-txt")):this.add(i,"e-tbtn-align"),(e.prefixIcon||e.suffixIcon)&&(e.prefixIcon&&e.suffixIcon||e.prefixIcon?(o=e.prefixIcon+" e-icons",r="Left"):(o=e.suffixIcon+" e-icons",r="Right"));var d=new n.Button({iconCss:o,iconPosition:r});return d.createElement=this.createElement,d.appendTo(s),e.width&&t.setStyleAttribute(s,{width:t.formatUnit(e.width)}),s},i.prototype.renderSubComponent=function(e,t){var i,s;if((i=this.createElement("div",{className:I})).setAttribute("aria-disabled","false"),this.tbarEle||(this.tbarEle=[]),e.htmlAttributes&&this.setAttr(e.htmlAttributes,i),e.tooltipText){var n=this.createElement("div",{innerHTML:e.tooltipText});i.setAttribute("title",n.textContent)}if(e.cssClass&&(i.className=i.className+" "+e.cssClass),e.template)this.templateRender(e.template,i,e,t);else switch(e.type){case"Button":(s=this.buttonRendering(e,i)).setAttribute("tabindex","-1"),s.setAttribute("aria-label",e.text||e.tooltipText),i.appendChild(s),i.addEventListener("click",this.itemClick.bind(this));break;case"Separator":this.add(i,"e-separator")}if(e.showTextOn){var o=e.showTextOn;"Toolbar"===o?(this.add(i,"e-toolbar-text"),this.add(i,"e-tbtn-align")):"Overflow"===o&&this.add(i,"e-popup-text")}if(e.overflow){var r=e.overflow;"Show"===r?this.add(i,"e-overflow-show"):"Hide"===r&&(i.classList.contains("e-separator")||this.add(i,"e-overflow-hide"))}return"Show"!==e.overflow&&e.showAlwaysInPopup&&!i.classList.contains("e-separator")&&(this.add(i,"e-popup-alone"),this.popupPriCount++),i},i.prototype.refreshToolbarTemplate=function(){for(var e=Object.keys(window),i=0,s=this.items.length;i<s;i++){var n=this.items[i];n.template&&e.indexOf("Blazor")>-1&&!this.isStringTemplate&&0===n.template.indexOf("<div>Blazor")&&(t.resetBlazorTemplate(this.element.id+i+"_template","Template"),t.updateBlazorTemplate(this.element.id+i+"_template","Template",n))}},i.prototype.itemClick=function(e){this.activeEleSwitch(e.currentTarget)},i.prototype.activeEleSwitch=function(e){this.activeEleRemove(e.firstElementChild),this.activeEle.focus()},i.prototype.activeEleRemove=function(e){t.isNullOrUndefined(this.activeEle)||this.activeEle.setAttribute("tabindex","-1"),this.activeEle=e,t.isNullOrUndefined(this.trgtEle)&&!e.parentElement.classList.contains("e-template")?e.removeAttribute("tabindex"):this.activeEle.setAttribute("tabindex","0")},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.getModuleName=function(){return"toolbar"},i.prototype.itemsRerender=function(e){this.items=this.tbarItemsCol,this.destroyMode(),this.destroyItems(),this.items=e,this.tbarItemsCol=this.items,this.renderItems(),this.renderOverflowMode()},i.prototype.resize=function(){var e=this.element;this.tbResize=!0,this.tbarAlign&&this.itemPositioning(),this.popObj&&"Popup"===this.overflowMode&&this.popObj.hide();var i=this.checkOverflow(e,e.getElementsByClassName(L)[0]);if(!i){this.destroyScroll();var s=e.querySelector("."+L);t.isNullOrUndefined(s)||(this.remove(s,"e-multirow-pos"),this.tbarAlign&&this.add(s,"e-tbar-pos"))}if(!i||!this.scrollModule||this.offsetWid!==e.offsetWidth){if((this.offsetWid>e.offsetWidth||i)&&this.renderOverflowMode(),this.popObj){if("Extended"===this.overflowMode){var n=window.getComputedStyle(this.element);this.popObj.width=parseFloat(n.width)+2*parseFloat(n.borderRightWidth)}this.tbarAlign&&this.removePositioning(),this.popupRefresh(this.popObj.element,!1),this.tbarAlign&&this.refreshPositioning()}this.offsetWid=e.offsetWidth,this.tbResize=!1,this.separator()}},i.prototype.extendedOpen=function(){var e=this.element.querySelector(".e-toolbar-extended");"Extended"===this.overflowMode&&e&&(this.isExtendedOpen=e.classList.contains("e-popup-open"))},i.prototype.onPropertyChanged=function(e,i){var s=this.element;this.extendedOpen();for(var n=0,o=Object.keys(e);n<o.length;n++)switch(o[n]){case"items":if(e.items instanceof Array&&i.items instanceof Array)this.itemsRerender(e.items);else for(var r=Object.keys(e.items),l=0;l<r.length;l++){var a=parseInt(Object.keys(e.items)[l],10),d=Object.keys(e.items[a])[0],h=(Object(i.items[a])[d],Object(e.items[a])[d]);if(this.tbarAlign||"align"===d){this.refresh(),this.trigger("created");break}var c="showAlwaysInPopup"===d&&!h,p="overflow"===d&&0!==this.popupPriCount;(c||this.items[a].showAlwaysInPopup&&p)&&--this.popupPriCount,t.isNullOrUndefined(this.scrollModule)&&this.destroyMode();var u=[].slice.call(t.selectAll("."+L+" ."+I,s));t.detach(u[a]),this.tbarEle.splice(a,1),this.addItems([this.items[a]],a),this.items.splice(a,1),this.items[a].template&&this.tbarEle.splice(this.items.length,1)}break;case"width":var f=s.offsetWidth;t.setStyleAttribute(s,{width:t.formatUnit(e.width)}),this.renderOverflowMode(),this.popObj&&f<s.offsetWidth&&this.popupRefresh(this.popObj.element,!1);break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)});break;case"overflowMode":this.destroyMode(),this.renderOverflowMode(),this.enableRtl&&this.add(s,"e-rtl"),this.refreshOverflow();break;case"enableRtl":e.enableRtl?this.add(s,"e-rtl"):this.remove(s,"e-rtl"),t.isNullOrUndefined(this.scrollModule)||(e.enableRtl?this.add(this.scrollModule.element,"e-rtl"):this.remove(this.scrollModule.element,"e-rtl")),t.isNullOrUndefined(this.popObj)||(e.enableRtl?this.add(this.popObj.element,"e-rtl"):this.remove(this.popObj.element,"e-rtl")),this.tbarAlign&&this.itemPositioning();break;case"scrollStep":this.scrollModule&&(this.scrollModule.scrollStep=this.scrollStep);break;case"enableCollision":this.popObj&&(this.popObj.collision={Y:this.enableCollision?"flip":"none"})}},i.prototype.hideItem=function(e,i){var s,n,o="object"==typeof e,r=e,l=[].slice.call(t.selectAll("."+I,this.element));if(o?n=e:this.tbarEle[r]&&(n=[].slice.call(t.selectAll("."+I,this.element))[r]),n){if(i?n.classList.add("e-hidden"):n.classList.remove("e-hidden"),i&&t.isNullOrUndefined(this.element.getAttribute("tabindex"))&&!n.classList.contains("e-separator")){if(t.isNullOrUndefined(n.firstElementChild.getAttribute("tabindex"))){n.firstElementChild.setAttribute("tabindex","-1");var a=[].slice.call(t.selectAll("."+I,this.element));o&&(r=a.indexOf(n));for(var d=a[++r];d;){if(!(u=this.eleContains(d))){d.firstElementChild.removeAttribute("tabindex");break}d=a[++r]}}}else if(t.isNullOrUndefined(this.element.getAttribute("tabindex"))&&!n.classList.contains("e-separator"))for(var h=!1,c=!1,p=l[s=0];p;)if(p.classList.contains("e-separator"))p=l[++s];else if(t.isNullOrUndefined(p.firstElementChild.getAttribute("tabindex")))p.firstElementChild.setAttribute("tabindex","-1"),h=!0;else{if(h&&c)break;var u=this.eleContains(p);u||(p.firstElementChild.removeAttribute("tabindex"),c=!0),p=l[++s]}this.refreshOverflow()}},S([t.Collection([],D)],i.prototype,"items",void 0),S([t.Property("auto")],i.prototype,"width",void 0),S([t.Property("auto")],i.prototype,"height",void 0),S([t.Property("Scrollable")],i.prototype,"overflowMode",void 0),S([t.Property()],i.prototype,"scrollStep",void 0),S([t.Property(!0)],i.prototype,"enableCollision",void 0),S([t.Event()],i.prototype,"clicked",void 0),S([t.Event()],i.prototype,"created",void 0),S([t.Event()],i.prototype,"destroyed",void 0),S([t.Event()],i.prototype,"beforeCreate",void 0),i=S([t.NotifyPropertyChanges],i)}(t.Component),T=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),M=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},H="e-acrdn-item",U="e-acrdn-header",B="e-acrdn-panel",R=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return T(i,e),M([t.Property("SlideDown")],i.prototype,"effect",void 0),M([t.Property(400)],i.prototype,"duration",void 0),M([t.Property("linear")],i.prototype,"easing",void 0),i}(t.ChildProperty),j=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return T(i,e),M([t.Complex({effect:"SlideUp",duration:400,easing:"linear"},R)],i.prototype,"collapse",void 0),M([t.Complex({effect:"SlideDown",duration:400,easing:"linear"},R)],i.prototype,"expand",void 0),i}(t.ChildProperty),F=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return T(i,e),M([t.Property(null)],i.prototype,"content",void 0),M([t.Property(null)],i.prototype,"header",void 0),M([t.Property(null)],i.prototype,"cssClass",void 0),M([t.Property(null)],i.prototype,"iconCss",void 0),M([t.Property(!1)],i.prototype,"expanded",void 0),i}(t.ChildProperty),q=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.keyConfigs={moveUp:"uparrow",moveDown:"downarrow",enter:"enter",space:"space",home:"home",end:"end"},s}return T(i,e),i.prototype.destroy=function(){var t=this,i=this.element;for(e.prototype.destroy.call(this),this.unwireEvents(),this.isDestroy=!0,this.restoreContent(null);i.firstElementChild;)i.removeChild(i.firstElementChild);if(this.trgtEle)for(;this.ctrlTem.firstElementChild;)i.appendChild(this.ctrlTem.firstElementChild);i.classList.remove("e-acrdn-root"),i.removeAttribute("style"),["aria-disabled","aria-multiselectable","role","data-ripple"].forEach(function(e){t.element.removeAttribute(e)})},i.prototype.preRender=function(){var e=t.closest(this.element,"."+B);this.isNested=!1,this.templateEle=[],this.isDestroy||(this.isDestroy=!1),t.isNullOrUndefined(e)?this.element.classList.add("e-acrdn-root"):(e.classList.add("e-nested"),this.isNested=!0),this.enableRtl&&this.add(this.element,"e-rtl"),this.enablePersistence&&!t.isNullOrUndefined(this.expandedItems)||(this.expandedItems=[])},i.prototype.add=function(e,t){e.classList.add(t)},i.prototype.remove=function(e,t){e.classList.remove(t)},i.prototype.render=function(){this.initializeheaderTemplate(),this.initializeItemTemplate(),this.initialize(),this.renderControl(),this.wireEvents(),this.renderComplete()},i.prototype.initialize=function(){var e=t.formatUnit(this.width),i=t.formatUnit(this.height);t.setStyleAttribute(this.element,{width:e,height:i});var s={"aria-disabled":"false",role:"presentation","aria-multiselectable":"true"};this.expandedItems.length>0&&(this.initExpand=this.expandedItems),t.attributes(this.element,s),"Single"===this.expandMode&&this.element.setAttribute("aria-multiselectable","false")},i.prototype.renderControl=function(){this.trgtEle=this.element.children.length>0?t.select("div",this.element):null,this.renderItems(),this.initItemExpand()},i.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),t.isNullOrUndefined(this.keyModule)||this.keyModule.destroy()},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this),this.isNested||this.isDestroy||t.rippleEffect(this.element,{selector:"."+U}),this.isNested||(this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}))},i.prototype.templateParser=function(e){if(e)try{if(document.querySelectorAll(e).length)return t.compile(document.querySelector(e).innerHTML.trim())}catch(i){return t.compile(e)}},i.prototype.initializeheaderTemplate=function(){this.headerTemplate&&(this.headerTemplateFn=this.templateParser(this.headerTemplate))},i.prototype.initializeItemTemplate=function(){this.itemTemplate&&(this.itemTemplateFn=this.templateParser(this.itemTemplate))},i.prototype.getheaderTemplate=function(){return this.headerTemplateFn},i.prototype.getItemTemplate=function(){return this.itemTemplateFn},i.prototype.updateContentBlazorTemplate=function(e,i){this.itemTemplate&&t.isBlazor()&&!this.isStringTemplate&&t.updateBlazorTemplate(this.element.id+"_itemTemplate","ItemTemplate",this,!1),e&&e.content&&t.isBlazor()&&!this.isStringTemplate&&0===e.content.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+i+"_content","ContentTemplate",e)},i.prototype.updateHeaderBlazorTemplate=function(e,i){this.headerTemplate&&t.isBlazor()&&!this.isStringTemplate&&t.updateBlazorTemplate(this.element.id+"_headerTemplate","HeaderTemplate",this,!1),e&&e.header&&t.isBlazor()&&!this.isStringTemplate&&0===e.header.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+i+"_header","HeaderTemplate",e)},i.prototype.focusIn=function(e){e.target.parentElement.classList.add("e-item-focus")},i.prototype.focusOut=function(e){e.target.parentElement.classList.remove("e-item-focus")},i.prototype.ctrlTemplate=function(){this.ctrlTem=this.element.cloneNode(!0);var e,i=t.select(".e-accordion-container",this.element);e=i?i.children:this.element.children;var s=[];[].slice.call(e).forEach(function(e){s.push({header:e.childElementCount>0&&e.children[0]?e.children[0]:"",content:e.childElementCount>1&&e.children[1]?e.children[1]:""}),e.parentNode.removeChild(e)}),i&&this.element.removeChild(i),this.setProperties({items:s},!0)},i.prototype.toggleIconGenerate=function(){var e=this.createElement("div",{className:"e-toggle-icon"}),t=this.createElement("span",{className:"e-tgl-collapse-icon e-icons"});return e.appendChild(t),e},i.prototype.initItemExpand=function(){var e=this.initExpand.length;if(0!==e)if("Single"===this.expandMode)this.expandItem(!0,this.initExpand[e-1]);else for(var t=0;t<e;t++)this.expandItem(!0,this.initExpand[t])},i.prototype.renderItems=function(){var e,i,s=this,n=this.element;if(t.isNullOrUndefined(this.initExpand)&&(this.initExpand=[]),t.isNullOrUndefined(this.trgtEle)||this.ctrlTemplate(),this.dataSource.length>0)this.dataSource.forEach(function(e,o){i=s.renderInnerItem(e,o),n.appendChild(i),i.childElementCount>0&&(t.EventHandler.add(i.querySelector("."+U),"focus",s.focusIn,s),t.EventHandler.add(i.querySelector("."+U),"blur",s.focusOut,s))}),this.updateHeaderBlazorTemplate();else{var o=this.items;n&&o.length>0&&o.forEach(function(i,o){e=s.renderInnerItem(i,o),n.appendChild(e),s.updateHeaderBlazorTemplate(i,o),e.childElementCount>0&&(t.EventHandler.add(e.querySelector("."+U),"focus",s.focusIn,s),t.EventHandler.add(e.querySelector("."+U),"blur",s.focusOut,s))})}},i.prototype.clickHandler=function(e){var i,s,n=this,o=e.target,r=this.getItems(),l={};if(t.closest(o,".e-accordion")===this.element){o.classList.add("e-target");var a=t.closest(o,"."+H),d=t.closest(o,"."+U),h=t.closest(o,"."+B);a&&(t.isNullOrUndefined(d)||t.isNullOrUndefined(h))&&(d=a.children[0],h=a.children[1]),d&&(s=t.select(".e-toggle-icon",d));var c;d?c=t.closest(d,"."+H):h&&(c=t.closest(h,"."+H));var p=[];i=this.getIndexByItem(a),c&&(l.item=r[this.getIndexByItem(c)]),l.originalEvent=e,!(!t.isNullOrUndefined(s)&&a.childElementCount<=1)||!t.isNullOrUndefined(h)&&t.isNullOrUndefined(t.select(".e-acrdn-header .e-toggle-icon",c))||(a.appendChild(this.contentRendering(i)),this.updateContentBlazorTemplate(l.item,i),this.ariaAttrUpdate(a)),this.trigger("clicked",l);var u=h&&!t.isNullOrUndefined(t.select(".e-target",h)),f=h&&!t.isNullOrUndefined(t.select(".e-accordion",h))&&t.isNullOrUndefined(t.closest(o,".e-acrdn-panel .e-accordion")),m=h&&t.isNullOrUndefined(t.select(".e-accordion",h))||!(t.closest(o,".e-accordion")===this.element);if(u=u&&(f||m),o.classList.remove("e-target"),!(o.classList.contains(B)||o.classList.contains("e-acrdn-content")||u)){var v=this.element.querySelector(".e-accordion-container"),g=v?v.children:this.element.children;[].slice.call(g).forEach(function(e){e.classList.contains("e-active")&&p.push(e)});var y=[].slice.call(this.element.querySelectorAll(".e-acrdn-item [e-animate]"));if(y.length>0)for(var b=0,C=y;b<C.length;b++){var N=C[b];p.push(N.parentElement)}var E=-1!==p.indexOf(c)&&"true"===h.getAttribute("e-animate"),x=!1;if(!t.isNullOrUndefined(a)&&!t.isNullOrUndefined(d)){var O=t.select("."+B,a),w=t.closest(a,".e-acrdn-root").querySelector(".e-expand-state");if(t.isNullOrUndefined(O))return;x=w===a,!t.isVisible(O)||E&&!c.classList.contains("e-selected")?(p.length>0&&"Single"===this.expandMode&&!E&&p.forEach(function(e){n.collapse(t.select("."+B,e)),e.classList.remove("e-expand-state")}),this.expand(O)):this.collapse(O),t.isNullOrUndefined(w)||x||w.classList.remove("e-expand-state")}}}},i.prototype.eleMoveFocus=function(e,i,s){var n,o=t.closest(s,"."+H);s===i?n=("moveUp"===e?s.lastElementChild:s).querySelector("."+U):s.classList.contains(U)&&(o="moveUp"===e?o.previousElementSibling:o.nextElementSibling)&&(n=t.select("."+U,o)),n&&n.focus()},i.prototype.keyActionHandler=function(e){var i=e.target,s=t.closest(e.target,U);if(!t.isNullOrUndefined(s)||i.classList.contains("e-accordion")||i.classList.contains(U)){var n,o=this.element;switch(e.action){case"moveUp":case"moveDown":this.eleMoveFocus(e.action,o,i);break;case"space":case"enter":n=i.nextElementSibling,!t.isNullOrUndefined(n)&&n.classList.contains(B)?"true"!==n.getAttribute("e-animate")&&i.click():i.click();break;case"home":case"end":("home"===e.action?o.firstElementChild.children[0]:o.lastElementChild.children[0]).focus()}}},i.prototype.headerEleGenerate=function(){var e=this.createElement("div",{className:U,id:t.getUniqueID("acrdn_header")}),i={tabindex:"0",role:"heading","aria-selected":"false","aria-disabled":"false","aria-level":this.getItems().length.toString()};return t.attributes(e,i),e},i.prototype.renderInnerItem=function(e,i){var s;if(s=this.createElement("div",{className:H}),s.id=t.getUniqueID("acrdn_item"),t.attributes(s,{"aria-expanded":"false"}),this.headerTemplate){var n=this.headerEleGenerate(),o=this.createElement("div",{className:"e-acrdn-header-content"});return n.appendChild(o),t.append(this.getheaderTemplate()(e,this,"headerTemplate",this.element.id+"_headerTemplate",!1),o),s.appendChild(n),n.appendChild(this.toggleIconGenerate()),this.add(s,"e-select"),s}if(e.header&&this.angularnativeCondiCheck(e,"header")){var n=this.headerEleGenerate(),o=this.createElement("div",{className:"e-acrdn-header-content"});n.appendChild(o),n.appendChild(this.fetchElement(o,e.header,i,!0)),s.appendChild(n)}var r=t.select("."+U,s);if(!e.expanded||t.isNullOrUndefined(i)||this.enablePersistence||-1===this.initExpand.indexOf(i)&&this.initExpand.push(i),e.cssClass){e.cssClass.split(" ").forEach(function(e){t.addClass([s],e)})}if(e.iconCss){var l=this.createElement("div",{className:"e-acrdn-header-icon"}),a=this.createElement("span",{className:e.iconCss+" e-icons"});l.appendChild(a),t.isNullOrUndefined(r)?((r=this.headerEleGenerate()).appendChild(l),s.appendChild(r)):r.insertBefore(l,r.childNodes[0])}if(e.content&&this.angularnativeCondiCheck(e,"content")){var d=this.toggleIconGenerate();t.isNullOrUndefined(r)&&(r=this.headerEleGenerate(),s.appendChild(r)),r.appendChild(d),this.add(s,"e-select")}return s},i.prototype.angularnativeCondiCheck=function(e,i){var s="content"===i?e.content:e.header;if(this.isAngular&&!t.isNullOrUndefined(s.elementRef)){var n=s.elementRef.nativeElement.data;if(t.isNullOrUndefined(n)||""===n||-1===n.indexOf("bindings="))return!0;var o=JSON.parse(s.elementRef.nativeElement.data.replace("bindings=",""));return!(!t.isNullOrUndefined(o)&&"false"===o["ng-reflect-ng-if"])}return!0},i.prototype.fetchElement=function(e,i,s,n){var o,r;try{if(document.querySelectorAll(i).length){var l=document.querySelector(i);r=l.outerHTML.trim(),e.appendChild(l),l.style.display=""}}catch(s){"string"==typeof i&&t.isBlazor()&&0!==i.indexOf("<div>Blazor")?e.innerHTML=i:!t.isNullOrUndefined(this.trgtEle)&&i instanceof HTMLElement?(e.appendChild(i),e.firstElementChild.style.display=""):o=t.compile(i)}var a;if(!t.isNullOrUndefined(o)){var d=void 0;e.classList.contains("e-acrdn-header-content")?d=this.element.id+s+"_header":e.classList.contains("e-acrdn-content")&&(d=this.element.id+s+"_content"),a=o({},null,null,d,this.isStringTemplate)}return t.isNullOrUndefined(a)||!(a.length>0)||t.isNullOrUndefined(a[0].tagName)&&1===a.length?0===e.childElementCount&&(e.innerHTML=i):[].slice.call(a).forEach(function(i){t.isNullOrUndefined(i.tagName)||(i.style.display=""),e.appendChild(i)}),t.isNullOrUndefined(r)||-1===this.templateEle.indexOf(i)&&this.templateEle.push(i),e},i.prototype.ariaAttrUpdate=function(e){var i=t.select("."+U,e),s=t.select("."+B,e);i.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",i.id),s.setAttribute("role","definition")},i.prototype.contentRendering=function(e){var i=this.createElement("div",{className:B+" e-content-hide",id:t.getUniqueID("acrdn_panel")});t.attributes(i,{"aria-hidden":"true"});var s=this.createElement("div",{className:"e-acrdn-content"});return this.dataSource.length>0?(t.append(this.getItemTemplate()(this.dataSource[e],this,"itemTemplate",this.element.id+"_itemTemplate",!1),s),i.appendChild(s)):i.appendChild(this.fetchElement(s,this.items[e].content,e,!1)),i},i.prototype.expand=function(e){var i,s=this,n=this.getItems(),o=t.closest(e,"."+H);if(!(t.isNullOrUndefined(e)||t.isVisible(e)&&"true"!==e.getAttribute("e-animate")||o.classList.contains("e-overlay"))){var r=t.closest(o,".e-acrdn-root").querySelector(".e-expand-state"),l={name:this.animation.expand.effect,duration:this.animation.expand.duration,timingFunction:this.animation.expand.easing},a=t.select(".e-toggle-icon",o).firstElementChild;i={element:o,item:n[this.getIndexByItem(o)],index:this.getIndexByItem(o),content:o.querySelector("."+B),isExpanded:!0};var d=l.name;this.trigger("expanding",i,function(i){i.cancel||(a.classList.add("e-toggle-animation"),s.expandedItemsPush(o),t.isNullOrUndefined(r)||r.classList.remove("e-expand-state"),o.classList.add("e-expand-state"),"None"===l.name?(s.expandProgress("begin",a,e,o,i),s.expandProgress("end",a,e,o,i)):s.expandAnimation(d,a,e,o,l,i))})}},i.prototype.expandAnimation=function(e,i,s,n,o,r){var l,a,d=this;this.lastActiveItemId=n.id,"SlideDown"===e?(o.begin=function(){d.expandProgress("begin",i,s,n,r),s.style.position="absolute",l=n.offsetHeight,a=s.offsetHeight,s.style.maxHeight=s.offsetHeight+"px",n.style.maxHeight=""},o.progress=function(){n.style.minHeight=l+s.offsetHeight+"px"},o.end=function(){t.setStyleAttribute(s,{position:"",maxHeight:""}),n.style.minHeight="",d.expandProgress("end",i,s,n,r)}):(o.begin=function(){d.expandProgress("begin",i,s,n,r)},o.end=function(){d.expandProgress("end",i,s,n,r)}),new t.Animation(o).animate(s)},i.prototype.expandProgress=function(e,i,s,n,o){this.remove(s,"e-content-hide"),this.add(n,"e-selected"),this.add(i,"e-expand-icon"),"end"===e&&(this.add(n,"e-active"),s.setAttribute("aria-hidden","false"),t.attributes(n,{"aria-expanded":"true"}),t.attributes(s.previousElementSibling,{"aria-selected":"true"}),i.classList.remove("e-toggle-animation"),this.trigger("expanded",o))},i.prototype.expandedItemsPush=function(e){var t=this.getIndexByItem(e);-1===this.expandedItems.indexOf(t)&&this.expandedItems.push(t)},i.prototype.getIndexByItem=function(e){var t=this.getItemElements();return[].slice.call(t).indexOf(e)},i.prototype.getItemElements=function(){var e=[],t=this.element.children;return[].slice.call(t).forEach(function(t){t.classList.contains(H)&&e.push(t)}),e},i.prototype.expandedItemsPop=function(e){var t=this.getIndexByItem(e);this.expandedItems.splice(this.expandedItems.indexOf(t),1)},i.prototype.collapse=function(e){var i,s=this,n=this.getItems(),o=t.closest(e,"."+H);if(!t.isNullOrUndefined(e)&&t.isVisible(e)&&!o.classList.contains("e-overlay")){var r={name:this.animation.collapse.effect,duration:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing},l=t.select(".e-toggle-icon",o).firstElementChild;i={element:o,item:n[this.getIndexByItem(o)],index:this.getIndexByItem(o),content:o.querySelector("."+B),isExpanded:!1};var a=r.name;this.trigger("expanding",i,function(t){t.cancel||(s.expandedItemsPop(o),o.classList.add("e-expand-state"),l.classList.add("e-toggle-animation"),"None"===r.name?(s.collapseProgress("begin",l,e,o,t),s.collapseProgress("end",l,e,o,t)):s.collapseAnimation(a,e,o,l,r,t))})}},i.prototype.collapseAnimation=function(e,i,s,n,o,r){var l,a,d,h,c=this;this.lastActiveItemId=s.id,"SlideUp"===e?(o.begin=function(){d=s.offsetHeight,s.style.minHeight=d+"px",i.style.position="absolute",l=s.offsetHeight,a=i.offsetHeight,i.style.maxHeight=a+"px",c.collapseProgress("begin",n,i,s,r)},o.progress=function(){(h=l-(a-i.offsetHeight))<d&&(s.style.minHeight=h+"px")},o.end=function(){i.style.display="none",c.collapseProgress("end",n,i,s,r),s.style.minHeight="",t.setStyleAttribute(i,{position:"",maxHeight:"",display:""})}):(o.begin=function(){c.collapseProgress("begin",n,i,s,r)},o.end=function(){c.collapseProgress("end",n,i,s,r)}),new t.Animation(o).animate(i)},i.prototype.collapseProgress=function(e,i,s,n,o){this.remove(i,"e-expand-icon"),this.remove(n,"e-selected"),"end"===e&&(this.add(s,"e-content-hide"),i.classList.remove("e-toggle-animation"),this.remove(n,"e-active"),s.setAttribute("aria-hidden","true"),t.attributes(n,{"aria-expanded":"false"}),t.attributes(s.previousElementSibling,{"aria-selected":"false"}),this.trigger("expanded",o))},i.prototype.getModuleName=function(){return"accordion"},i.prototype.itemAttribUpdate=function(){var e=this.getItems(),i=this.getItemElements(),s=e.length;i.forEach(function(e){t.select("."+U,e).setAttribute("aria-level",""+s)})},i.prototype.getItems=function(){return this.itemTemplate&&this.headerTemplate?this.dataSource:this.items},i.prototype.addItem=function(e,i){var s=this.element,n=this.getItemElements(),o=this.getItems();if(t.isNullOrUndefined(i)&&(i=o.length),s.childElementCount>=i){o.splice(i,0,e);var r=this.renderInnerItem(e,i);s.childElementCount===i?s.appendChild(r):s.insertBefore(r,n[i]),this.updateHeaderBlazorTemplate(),t.EventHandler.add(r.querySelector("."+U),"focus",this.focusIn,this),t.EventHandler.add(r.querySelector("."+U),"blur",this.focusOut,this),this.itemAttribUpdate()}this.expandedItems=[],this.expandedItemRefresh(s),e&&e.expanded&&this.expandItem(!0,i)},i.prototype.expandedItemRefresh=function(e){var t=this,i=this.getItemElements();[].slice.call(i).forEach(function(e){e.classList.contains("e-selected")&&t.expandedItemsPush(e)})},i.prototype.removeItem=function(e){var i=this.getItemElements()[e],s=this.getItems();t.isNullOrUndefined(i)||(this.restoreContent(e),t.detach(i),s.splice(e,1),this.itemAttribUpdate(),this.expandedItems=[],this.expandedItemRefresh(this.element))},i.prototype.select=function(e){var i=this.getItemElements()[e];t.isNullOrUndefined(i)||t.isNullOrUndefined(t.select("."+U,i))||i.children[0].focus()},i.prototype.hideItem=function(e,i){var s=this.getItemElements()[e];t.isNullOrUndefined(s)||(t.isNullOrUndefined(i)&&(i=!0),i?this.add(s,"e-hide"):this.remove(s,"e-hide"))},i.prototype.enableItem=function(e,i){var s=this.getItemElements()[e];if(!t.isNullOrUndefined(s)){var n=s.firstElementChild;i?(this.remove(s,"e-overlay"),t.attributes(n,{tabindex:"0","aria-disabled":"false"}),n.focus()):(s.classList.contains("e-active")&&(this.expandItem(!1,e),this.eleMoveFocus("movedown",this.element,n)),this.add(s,"e-overlay"),n.setAttribute("aria-disabled","true"),n.removeAttribute("tabindex"))}},i.prototype.expandItem=function(e,i){var s=this,n=(this.element,this.getItemElements());if(t.isNullOrUndefined(i))if("Single"===this.expandMode&&e){l=n[n.length-1];this.itemExpand(e,l,this.getIndexByItem(l))}else{var o=t.select("#"+this.lastActiveItemId,this.element);[].slice.call(n).forEach(function(t){s.itemExpand(e,t,s.getIndexByItem(t)),t.classList.remove("e-expand-state")});var r=t.select(".e-expand-state",this.element);r&&r.classList.remove("e-expand-state"),o&&o.classList.add("e-expand-state")}else{var l=n[i];if(t.isNullOrUndefined(l)||!l.classList.contains("e-select")||l.classList.contains("e-active")&&e)return;"Single"===this.expandMode&&this.expandItem(!1),this.itemExpand(e,l,i)}},i.prototype.itemExpand=function(e,i,s){var n=i.children[1],o=this.getItems();if(!i.classList.contains("e-overlay")){if(t.isNullOrUndefined(n)&&e)n=this.contentRendering(s),i.appendChild(n),this.updateContentBlazorTemplate(o[s],s),this.ariaAttrUpdate(i);else if(t.isNullOrUndefined(n))return;e?this.expand(n):this.collapse(n)}},i.prototype.destroyItems=function(){this.restoreContent(null),[].slice.call(this.element.querySelectorAll("."+H)).forEach(function(e){t.detach(e)})},i.prototype.restoreContent=function(e){var i;i=t.isNullOrUndefined(e)?this.element:this.element.querySelectorAll("."+H)[e],this.templateEle.forEach(function(e){t.isNullOrUndefined(i.querySelector(e))||(document.body.appendChild(i.querySelector(e)).style.display="none")})},i.prototype.updateItem=function(e,i){if(!t.isNullOrUndefined(e)){var s=this.getItems(),n=s[i];s.splice(i,1),this.restoreContent(i),t.detach(e),this.addItem(n,i)}},i.prototype.getPersistData=function(){var e=["expandedItems"];return this.addOnPersist(e)},i.prototype.onPropertyChanged=function(e,i){for(var s=this.element,n=!1,o=0,r=Object.keys(e);o<r.length;o++)switch(r[o]){case"items":if(e.items instanceof Array&&i.items instanceof Array)n=!0;else for(var l=Object.keys(e.items),a=0;a<l.length;a++){var d=parseInt(Object.keys(e.items)[a],10),h=Object.keys(e.items[d])[0],c=t.selectAll("."+H,this.element)[d],p=Object(i.items[d])[h],u=Object(e.items[d])[h],f=h;("header"===f||"iconCss"===f||"expanded"===f||"content"===f&&""===p)&&this.updateItem(c,d),"cssClass"!==h||t.isNullOrUndefined(c)||(c.classList.remove(p),c.classList.add(u)),"content"!==h||t.isNullOrUndefined(c)||2!==c.children.length||(c.classList.contains("e-selected")&&this.expandItem(!1,d),t.detach(c.querySelector("."+B)))}break;case"dataSource":n=!0;break;case"headerTemplate":this.initializeheaderTemplate(),n=!0;break;case"itemTemplate":this.initializeItemTemplate(),n=!0;break;case"enableRtl":e.enableRtl?this.add(s,"e-rtl"):this.remove(s,"e-rtl");break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)});break;case"width":t.setStyleAttribute(this.element,{width:t.formatUnit(e.width)});break;case"expandMode":"Single"===e.expandMode?(this.element.setAttribute("aria-multiselectable","false"),this.expandedItems.length>1&&this.expandItem(!1)):this.element.setAttribute("aria-multiselectable","true")}n&&(this.destroyItems(),this.renderItems(),this.initItemExpand())},M([t.Collection([],F)],i.prototype,"items",void 0),M([t.Property([])],i.prototype,"dataSource",void 0),M([t.Property()],i.prototype,"itemTemplate",void 0),M([t.Property()],i.prototype,"headerTemplate",void 0),M([t.Property("100%")],i.prototype,"width",void 0),M([t.Property("auto")],i.prototype,"height",void 0),M([t.Property("Multiple")],i.prototype,"expandMode",void 0),M([t.Complex({},j)],i.prototype,"animation",void 0),M([t.Event()],i.prototype,"clicked",void 0),M([t.Event()],i.prototype,"expanding",void 0),M([t.Event()],i.prototype,"expanded",void 0),M([t.Event()],i.prototype,"created",void 0),M([t.Event()],i.prototype,"destroyed",void 0),i=M([t.NotifyPropertyChanges],i)}(t.Component),V=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),z=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},W=function(e){function i(t,i){return e.call(this,t,i)||this}return V(i,e),i.prototype.preRender=function(){this.isMenu=!1,this.element.id=this.element.id||t.getUniqueID("ej2-contextmenu"),e.prototype.preRender.call(this)},i.prototype.initialize=function(){e.prototype.initialize.call(this),t.attributes(this.element,{role:"menu",tabindex:"0"}),this.element.style.zIndex=s.getZindexPartial(this.element).toString()},i.prototype.open=function(t,i,s){e.prototype.openMenu.call(this,null,null,t,i,null,s)},i.prototype.close=function(){e.prototype.closeMenu.call(this)},i.prototype.onPropertyChanged=function(t,i){e.prototype.onPropertyChanged.call(this,t,i);for(var s=0,n=Object.keys(t);s<n.length;s++)switch(n[s]){case"filter":this.close(),this.filter=t.filter;break;case"target":this.unWireEvents(i.target),this.wireEvents()}},i.prototype.getModuleName=function(){return"contextmenu"},z([t.Property("")],i.prototype,"target",void 0),z([t.Property("")],i.prototype,"filter",void 0),z([t.Collection([],x)],i.prototype,"items",void 0),i=z([t.NotifyPropertyChanges],i)}(w),_=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),K=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Y="e-vertical",G=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.tempItems=[],s}return _(i,e),i.prototype.getModuleName=function(){return"menu"},i.prototype.preRender=function(){if(this.isMenu=!0,this.element.id=this.element.id||t.getUniqueID("ej2-menu"),this.template)try{document.querySelectorAll(this.template).length&&(this.template=document.querySelector(this.template).innerHTML.trim(),this.clearChanges())}catch(e){}else this.updateMenuItems(this.items);e.prototype.preRender.call(this)},i.prototype.initialize=function(){e.prototype.initialize.call(this),t.attributes(this.element,{role:"menubar",tabindex:"0"}),"Vertical"===this.orientation?(this.element.classList.add(Y),this.hamburgerMode&&!this.target&&this.element.previousElementSibling.classList.add(Y),this.element.setAttribute("aria-orientation","vertical")):t.Browser.isDevice&&!this.enableScrolling&&this.element.parentElement.classList.add("e-scrollable"),this.hamburgerMode&&(this.element.parentElement.classList.add("e-hamburger"),"Horizontal"===this.orientation&&this.element.classList.add("e-hide-menu"))},i.prototype.updateMenuItems=function(e){this.tempItems=e,this.items=[],this.tempItems.map(this.createMenuItems,this),this.setProperties({items:this.items},!0),this.tempItems=[]},i.prototype.onPropertyChanged=function(t,i){for(var s=0,n=Object.keys(t);s<n.length;s++)switch(n[s]){case"orientation":"Vertical"===t.orientation?(this.element.classList.add(Y),this.hamburgerMode&&(this.target||this.element.previousElementSibling.classList.add(Y),this.element.classList.remove("e-hide-menu")),this.element.setAttribute("aria-orientation","vertical")):(this.element.classList.remove(Y),this.hamburgerMode&&(this.target||this.element.previousElementSibling.classList.remove(Y),this.element.classList.add("e-hide-menu")),this.element.removeAttribute("aria-orientation"));break;case"items":Object.keys(i.items).length||this.updateMenuItems(t.items);break;case"hamburgerMode":this.element.previousElementSibling||e.prototype.createHeaderContainer.call(this),t.hamburgerMode?this.element.parentElement.classList.add("e-hamburger"):this.element.parentElement.classList.remove("e-hamburger"),"Vertical"===this.orientation?(this.target||this.element.previousElementSibling.classList.add(Y),this.element.classList.remove("e-hide-menu")):(this.target?this.element.previousElementSibling.classList.add(Y):this.element.previousElementSibling.classList.remove(Y),this.element.classList[t.hamburgerMode?"add":"remove"]("e-hide-menu"));break;case"title":this.hamburgerMode&&this.element.previousElementSibling&&(this.element.previousElementSibling.querySelector(".e-menu-title").innerHTML=t.title);break;case"target":this.hamburgerMode&&(this.unWireEvents(i.target),this.wireEvents(),"Horizontal"===this.orientation&&(t.target?this.element.previousElementSibling.classList.add(Y):(this.element.previousElementSibling||e.prototype.createHeaderContainer.call(this),this.element.previousElementSibling.classList.remove(Y)),this.element.classList.add("e-hide-menu")))}e.prototype.onPropertyChanged.call(this,t,i)},i.prototype.createMenuItems=function(e){var t,i,s,n=this.items;if(t=this.getField("parentId"),e[t]){for(i=this.getIndex(e[t].toString(),!0),s=0;s<i.length;s++)n[i[s]].items||(n[i[s]].items=[]),n=n[i[s]].items;n.push(e)}else this.items.push(e)},i.prototype.open=function(){e.prototype.openHamburgerMenu.call(this)},i.prototype.close=function(){e.prototype.closeHamburgerMenu.call(this)},K([t.Property("Horizontal")],i.prototype,"orientation",void 0),K([t.Property("")],i.prototype,"target",void 0),K([t.Property(null)],i.prototype,"template",void 0),K([t.Property(!1)],i.prototype,"enableScrolling",void 0),K([t.Property(!1)],i.prototype,"hamburgerMode",void 0),K([t.Property("Menu")],i.prototype,"title",void 0),K([t.Complex({},N)],i.prototype,"fields",void 0),i=K([t.NotifyPropertyChanges],i)}(w),X=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Q=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},J="e-toolbar-items",Z="e-toolbar-item",$=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Q([t.Property("SlideLeftIn")],i.prototype,"effect",void 0),Q([t.Property(600)],i.prototype,"duration",void 0),Q([t.Property("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Q([t.Complex({effect:"SlideLeftIn",duration:600,easing:"ease"},$)],i.prototype,"previous",void 0),Q([t.Complex({effect:"SlideRightIn",duration:600,easing:"ease"},$)],i.prototype,"next",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Q([t.Property("")],i.prototype,"text",void 0),Q([t.Property("")],i.prototype,"iconCss",void 0),Q([t.Property("left")],i.prototype,"iconPosition",void 0),i}(t.ChildProperty),ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Q([t.Complex({},te)],i.prototype,"header",void 0),Q([t.Property(null)],i.prototype,"headerTemplate",void 0),Q([t.Property("")],i.prototype,"content",void 0),Q([t.Property("")],i.prototype,"cssClass",void 0),Q([t.Property(!1)],i.prototype,"disabled",void 0),i}(t.ChildProperty),se=function(e){function i(i,s){var n=e.call(this,i,s)||this;return n.show={},n.hide={},n.animateOptions={},n.animObj=new t.Animation(n.animateOptions),n.maxHeight=0,n.title="Close",n.lastIndex=0,n.isAdd=!1,n.isIconAlone=!1,n.resizeContext=n.refreshActElePosition.bind(n),n.keyConfigs={tab:"tab",home:"home",end:"end",enter:"enter",space:"space",delete:"delete",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow"},n}return X(i,e),i.prototype.destroy=function(){var i=this;if(t.isNullOrUndefined(this.tbObj)||this.tbObj.destroy(),this.unWireEvents(),["role","aria-disabled","aria-activedescendant","tabindex","aria-orientation"].forEach(function(e){i.element.removeAttribute(e)}),this.expTemplateContent(),this.isTemplate){var s=t.select(".e-tab > .e-content",this.element);this.element.classList.remove("e-template"),t.isNullOrUndefined(s)||(s.innerHTML=this.cnt)}else for(;this.element.firstElementChild;)t.remove(this.element.firstElementChild);e.prototype.destroy.call(this),this.trigger("destroyed")},i.prototype.preRender=function(){var e=t.closest(this.element,".e-content");this.prevIndex=0,this.isNested=!1,this.isPopup=!1,this.initRender=!0,this.isSwipeed=!1,this.itemIndexArray=[],this.templateEle=[],t.isNullOrUndefined(e)||(e.parentElement.classList.add("e-nested"),this.isNested=!0);var i=t.Browser.info.name,s="msie"===i?"e-ie":"edge"===i?"e-edge":"safari"===i?"e-safari":"";t.setStyleAttribute(this.element,{width:t.formatUnit(this.width),height:t.formatUnit(this.height)}),this.setCssClass(this.element,this.cssClass,!0),t.attributes(this.element,{role:"tablist","aria-disabled":"false","aria-activedescendant":""}),this.setCssClass(this.element,s,!0),this.updatePopAnimationConfig()},i.prototype.render=function(){this.btnCls=this.createElement("span",{className:"e-icons e-close-icon",attrs:{title:this.title}}),this.tabId=this.element.id.length>0?"-"+this.element.id:t.getRandomId(),this.renderContainer(),this.wireEvents(),this.initRender=!1,t.isBlazor()&&this.renderComplete()},i.prototype.renderContainer=function(){var e=this.element;if(this.items.length>0&&0===e.children.length)e.appendChild(this.createElement("div",{className:"e-content"})),this.setOrientation(this.headerPlacement,this.createElement("div",{className:"e-tab-header"})),this.isTemplate=!1;else if(this.element.children.length>0){this.isTemplate=!0,e.classList.add("e-template");var i=e.querySelector(".e-tab-header");i&&"Bottom"===this.headerPlacement&&this.setOrientation(this.headerPlacement,i)}if(!t.isNullOrUndefined(t.select(".e-tab-header",this.element))&&!t.isNullOrUndefined(t.select(".e-content",this.element))){if(this.renderHeader(),this.tbItems=t.select(".e-tab-header ."+J,this.element),t.isNullOrUndefined(this.tbItems)||t.rippleEffect(this.tbItems,{selector:".e-tab-wrap"}),this.renderContent(),t.selectAll("."+Z,this.element).length>0){var s=void 0;this.tbItems=t.select(".e-tab-header ."+J,this.element),this.bdrLine=this.createElement("div",{className:"e-indicator e-hidden e-ignore"}),s=t.select("."+this.scrCntClass,this.tbItems),t.isNullOrUndefined(s)?this.tbItems.insertBefore(this.bdrLine,this.tbItems.firstChild):s.insertBefore(this.bdrLine,s.firstChild),this.setContentHeight(!0),this.select(this.selectedItem)}this.setRTL(this.enableRtl)}},i.prototype.renderHeader=function(){var e=this,i=this.headerPlacement,s=[];if(this.hdrEle=this.getTabHeader(),this.addVerticalClass(),this.isTemplate){this.element.children.length>1&&this.element.children[1].classList.contains("e-tab-header")&&this.setProperties({headerPlacement:"Bottom"},!0);for(var n=this.hdrEle.children.length,o=[],r=0;r<n;r++)o.push(this.hdrEle.children.item(r).innerHTML);if(n>0){for(;this.hdrEle.firstElementChild;)t.detach(this.hdrEle.firstElementChild);var l=this.createElement("div",{className:"e-items"});this.hdrEle.appendChild(l),o.forEach(function(i,s){e.lastIndex=s;var n={className:"e-item",id:"e-item"+e.tabId+"_"+s,attrs:{role:"tab","aria-controls":"e-content"+e.tabId+"_"+s,"aria-selected":"false"}},o=e.createElement("span",{className:"e-tab-text",innerHTML:i,attrs:{role:"presentation"}}).outerHTML,r=e.createElement("div",{className:"e-text-wrap",innerHTML:o+e.btnCls.outerHTML}).outerHTML,a=e.createElement("div",{className:"e-tab-wrap",innerHTML:r,attrs:{tabIndex:"-1"}});l.appendChild(e.createElement("div",n)),t.selectAll(".e-item",l)[s].appendChild(a)})}}else s=this.parseObject(this.items,0);this.tbObj=new P({width:"Left"===i||"Right"===i?"auto":"100%",height:"Left"===i||"Right"===i?"100%":"auto",overflowMode:this.overflowMode,items:0!==s.length?s:[],clicked:this.clickHandler.bind(this),scrollStep:this.scrollStep}),this.tbObj.isStringTemplate=!0,this.tbObj.createElement=this.createElement,this.tbObj.appendTo(this.hdrEle),t.attributes(this.hdrEle,{"aria-label":"tab-header"});for(r=0;r<this.items.length;r++){var a=this.items[r];a.headerTemplate&&t.isBlazor()&&!this.isStringTemplate&&0===a.headerTemplate.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+r+"_headerTemplate","HeaderTemplate",a)}this.updateOrientationAttribute(),this.setCloseButton(this.showCloseButton)},i.prototype.renderContent=function(){this.cntEle=t.select(".e-content",this.element);var e=t.selectAll("."+Z,this.element);if(this.isTemplate){this.cnt=this.cntEle.children.length>0?this.cntEle.innerHTML:"";for(var i=this.cntEle.children,s=0;s<e.length;s++)i.length-1>=s&&(i.item(s).className+="e-item",t.attributes(i.item(s),{role:"tabpanel","aria-labelledby":"e-item"+this.tabId+"_"+s}),i.item(s).id="e-content"+this.tabId+"_"+s)}},i.prototype.reRenderItems=function(){this.renderContainer(),t.isNullOrUndefined(this.cntEle)||(this.touchModule=new t.Touch(this.cntEle,{swipe:this.swipeHandler.bind(this)}))},i.prototype.parseObject=function(e,i){var s,n=this,o=t.selectAll("."+Z,this.element).length,r=[],l=[];return e.forEach(function(e,a){var d=t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.iconPosition)?"":e.header.iconPosition,h=t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.iconCss)?"":e.header.iconCss;if(t.isNullOrUndefined(e.headerTemplate)&&(t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.text)||0===e.header.text.length&&""===h))return void l.push(a);var c=e.headerTemplate||e.header.text;n.lastIndex=0===o?a:n.isReplace?i+a:n.lastIndex+1;var p=e.disabled?" e-disable e-overlay":"";s=n.createElement("div",{className:"e-tab-text",attrs:{role:"presentation"}});var u=c instanceof Object?c.outerHTML:c,f=!t.isNullOrUndefined(u)&&""!==u;t.isNullOrUndefined(c.tagName)?n.headerTextCompile(s,c,a):s.appendChild(c);var m=n.createElement("span",{className:"e-icons e-tab-icon e-icon-"+d+" "+h}),v=n.createElement("div",{className:"e-text-wrap"});v.appendChild(s),""!==c&&void 0!==c&&""!==h?("left"===d||"top"===d?v.insertBefore(m,v.firstElementChild):v.appendChild(m),s,n.isIconAlone=!1):(""===h?s:m)===m&&(t.detach(s),v.appendChild(m),n.isIconAlone=!0);var g=e.disabled?{}:{tabIndex:"-1"};v.appendChild(n.btnCls.cloneNode(!0));var y=n.createElement("div",{className:"e-tab-wrap",attrs:g});y.appendChild(v),n.itemIndexArray===[]?n.itemIndexArray.push("e-item"+n.tabId+"_"+n.lastIndex):n.itemIndexArray.splice(i+a,0,"e-item"+n.tabId+"_"+n.lastIndex);var b={htmlAttributes:{id:"e-item"+n.tabId+"_"+n.lastIndex,role:"tab","aria-selected":"false"},template:y};b.cssClass=e.cssClass+" "+p+" "+(""!==h?"e-i"+d:"")+" "+(f?"":"e-icon"),"top"!==d&&"bottom"!==d||n.element.classList.add("e-vertical-icon"),r.push(b),a++}),this.isAdd||l.forEach(function(e){n.items.splice(e,1)}),this.isIconAlone?this.element.classList.add("e-icon-tab"):this.element.classList.remove("e-icon-tab"),r},i.prototype.removeActiveClass=function(){var e=this.getTabHeader();if(e){var i=t.selectAll(".e-toolbar-item.e-active",e);[].slice.call(i).forEach(function(e){return e.classList.remove("e-active")})}},i.prototype.checkPopupOverflow=function(e){this.tbPop=t.select(".e-toolbar-pop",this.element);var i=t.select(".e-hor-nav",this.element),s=t.select("."+J,this.element),n=s.lastChild,o=!1;return!this.isVertical()&&(this.enableRtl&&i.offsetLeft+i.offsetWidth>s.offsetLeft||!this.enableRtl&&i.offsetLeft<s.offsetWidth)?o=!0:this.isVertical()&&i.offsetTop<n.offsetTop+n.offsetHeight&&(o=!0),o&&(e.classList.add("e-toolbar-popup"),this.tbPop.insertBefore(e.cloneNode(!0),t.selectAll(".e-toolbar-popup",this.tbPop)[0]),e.outerHTML=""),!0},i.prototype.popupHandler=function(e){var i=e.querySelector(".e-ripple-element");t.isNullOrUndefined(i)||(i.outerHTML="",e.querySelector(".e-tab-wrap").classList.remove("e-ripple")),this.tbItem=t.selectAll(".e-toolbar-items ."+Z,this.hdrEle);var s=this.tbItem[this.tbItem.length-1];if(0!==this.tbItem.length){if(e.classList.remove("e-toolbar-popup"),e.removeAttribute("style"),this.tbItems.appendChild(e.cloneNode(!0)),this.actEleId=e.id,e.outerHTML="",this.checkPopupOverflow(s)){var n=this.tbItems.lastChild.previousElementSibling;this.checkPopupOverflow(n)}this.isPopup=!0}return t.selectAll("."+Z,this.tbItems).length-1},i.prototype.updateOrientationAttribute=function(){t.attributes(this.element,{"aria-orientation":this.isVertical()?"vertical":"horizontal"})},i.prototype.setCloseButton=function(e){var i=t.select(".e-tab-header",this.element);!0===e?i.classList.add("e-close-show"):i.classList.remove("e-close-show"),this.tbObj.refreshOverflow(),this.refreshActElePosition()},i.prototype.prevCtnAnimation=function(e,t){this.enableRtl||this.element.classList.contains("e-rtl");return this.isPopup||e<=t?"SlideLeftIn"===this.animation.previous.effect?{name:"SlideLeftOut",duration:this.animation.previous.duration,timingFunction:this.animation.previous.easing}:null:"SlideRightIn"===this.animation.next.effect?{name:"SlideRightOut",duration:this.animation.next.duration,timingFunction:this.animation.next.easing}:null},i.prototype.triggerPrevAnimation=function(e,i){var s=this,n=this.prevCtnAnimation(i,this.selectedItem);t.isNullOrUndefined(n)?e.classList.remove("e-active"):(n.begin=function(){t.setStyleAttribute(e,{position:"absolute"}),e.classList.add("e-progress"),e.classList.add("e-view")},n.end=function(){e.style.display="none",e.classList.remove("e-active"),e.classList.remove("e-progress"),e.classList.remove("e-view"),t.setStyleAttribute(e,{display:"",position:""}),0!==e.childNodes.length||s.isTemplate||t.detach(e)},new t.Animation(n).animate(e))},i.prototype.triggerAnimation=function(e,i){var s,n=this,o=this.prevIndex;[].slice.call(this.element.querySelector(".e-content").children).forEach(function(e){e.id===n.prevActiveEle&&(s=e)});var r=this.tbItem[o],l=this.extIndex(this.tbItem[this.selectedItem].id),a=this.getTrgContent(this.cntEle,l);if(t.isNullOrUndefined(s)&&!t.isNullOrUndefined(r)){var d=this.extIndex(r.id);s=this.getTrgContent(this.cntEle,d)}if(this.prevActiveEle=a.id,this.initRender||!1===i||this.animation==={}||t.isNullOrUndefined(this.animation))return void(s&&s!==a&&s.classList.remove("e-active"));var h,c=t.select(".e-content",this.element);if(this.prevIndex>this.selectedItem&&!this.isPopup){var p=this.animation.previous.effect;h={name:"None"===p?"":"SlideLeftIn"!==p?p:"SlideLeftIn",duration:this.animation.previous.duration,timingFunction:this.animation.previous.easing}}else if(this.isPopup||this.prevIndex<this.selectedItem||this.prevIndex===this.selectedItem){var u=this.animation.next.effect;h={name:"None"===u?"":"SlideRightIn"!==u?u:"SlideRightIn",duration:this.animation.next.duration,timingFunction:this.animation.next.easing}}h.progress=function(){c.classList.add("e-progress"),n.setActiveBorder()},h.end=function(){c.classList.remove("e-progress"),a.classList.add("e-active")},this.initRender||t.isNullOrUndefined(s)||this.triggerPrevAnimation(s,o),this.isPopup=!1,""===h.name?a.classList.add("e-active"):new t.Animation(h).animate(a)},i.prototype.keyPressed=function(e){var i=t.closest(e,".e-tab-header ."+Z),s=this.getEleIndex(i);!t.isNullOrUndefined(this.popEle)&&e.classList.contains("e-hor-nav")?this.popEle.classList.contains("e-popup-open")?this.popObj.hide(this.hide):this.popObj.show(this.show):e.classList.contains("e-scroll-nav")?e.click():t.isNullOrUndefined(i)||!1!==i.classList.contains("e-active")||(this.select(s),t.isNullOrUndefined(this.popEle)||this.popObj.hide(this.hide))},i.prototype.getTabHeader=function(){var e=[].slice.call(this.element.children).filter(function(e){return e.classList.contains("e-tab-header")});if(e.length>0)return e[0];var t=[].slice.call(this.element.children).filter(function(e){return!e.classList.contains("blazor-template")})[0];if(t)return[].slice.call(t.children).filter(function(e){return e.classList.contains("e-tab-header")})[0]},i.prototype.getEleIndex=function(e){return Array.prototype.indexOf.call(t.selectAll("."+Z,this.getTabHeader()),e)},i.prototype.extIndex=function(e){return e.replace("e-item"+this.tabId+"_","")},i.prototype.expTemplateContent=function(){var e=this;this.templateEle.forEach(function(i){t.isNullOrUndefined(e.element.querySelector(i))||(document.body.appendChild(e.element.querySelector(i)).style.display="none")})},i.prototype.templateCompile=function(e,i,s){var n=this.createElement("div");if(this.compileElement(n,i,"content",s),0!==n.childNodes.length){e.appendChild(n);var o=this.items[s];t.isNullOrUndefined(o)||o.content&&t.isBlazor()&&!this.isStringTemplate&&0===o.content.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+s+"_content","ContentTemplate",o)}},i.prototype.compileElement=function(e,i,s,n){var o;"string"==typeof i&&t.isBlazor()&&0!==i.indexOf("<div>Blazor")?(i=i.trim(),e.innerHTML=i):o=t.compile(i);var r;t.isNullOrUndefined(o)||(r=t.isBlazor()&&!this.isStringTemplate&&0===i.indexOf("<div>Blazor")?o({},this,s,this.element.id+n+"_"+s,this.isStringTemplate):o({},this,s)),!t.isNullOrUndefined(o)&&r.length>0&&[].slice.call(r).forEach(function(t){e.appendChild(t)})},i.prototype.headerTextCompile=function(e,t,i){this.compileElement(e,t,"headerTemplate",i)},i.prototype.getContent=function(e,i,s,n){var o;if("string"==typeof i||t.isNullOrUndefined(i.innerHTML))if("."===i[0]||"#"===i[0])if(document.querySelectorAll(i).length){var r=document.querySelector(i);o=r.outerHTML.trim(),"clone"===s?e.appendChild(r.cloneNode(!0)):(e.appendChild(r),r.style.display="")}else this.templateCompile(e,i,n);else this.templateCompile(e,i,n);else e.appendChild(i);t.isNullOrUndefined(o)||-1===this.templateEle.indexOf(i.toString())&&this.templateEle.push(i.toString())},i.prototype.getTrgContent=function(e,i){return this.element.classList.contains("e-nested")?t.select(".e-nested> .e-content > #e-content"+this.tabId+"_"+i,this.element):this.findEle(e.children,"e-content"+this.tabId+"_"+i)},i.prototype.findEle=function(e,t){for(var i,s=0;s<e.length;s++)if(e[s].id===t){i=e[s];break}return i},i.prototype.isVertical=function(){var e="Left"===this.headerPlacement||"Right"===this.headerPlacement;return this.scrCntClass=e?"e-vscroll-content":"e-hscroll-content",e},i.prototype.addVerticalClass=function(){if(this.isVertical()){var e="Left"===this.headerPlacement?"e-vertical-left":"e-vertical-right";t.addClass([this.hdrEle],["e-vertical",e]),this.element.classList.add("e-vertical-tab")}"Bottom"===this.headerPlacement&&this.hdrEle.classList.add("e-horizontal-bottom")},i.prototype.updatePopAnimationConfig=function(){this.show={name:this.isVertical()?"FadeIn":"SlideDown",duration:100},this.hide={name:this.isVertical()?"FadeOut":"SlideUp",duration:100}},i.prototype.changeOrientation=function(e){this.setOrientation(e,this.hdrEle);var i=!!this.hdrEle.classList.contains("e-vertical");t.removeClass([this.element],["e-vertical-tab"]),t.removeClass([this.hdrEle],["e-vertical","e-vertical-left","e-vertical-right"]),i!==this.isVertical()&&(this.tbObj.setProperties({height:this.isVertical()?"100%":"auto",width:this.isVertical()?"auto":"100%"},!0),this.tbObj.changeOrientation(),this.updatePopAnimationConfig()),this.addVerticalClass(),this.updateOrientationAttribute(),this.select(this.selectedItem)},i.prototype.setOrientation=function(e,i){var s=Array.prototype.indexOf.call(this.element.children,i),n=Array.prototype.indexOf.call(this.element.children,this.element.querySelector(".e-content"));"Bottom"===e&&n>s?this.element.appendChild(i):this.element.insertBefore(i,t.select(".e-content",this.element))},i.prototype.setCssClass=function(e,t,i){if(""!==t)for(var s=t.split(" "),n=0;n<s.length;n++)i?e.classList.add(s[n]):e.classList.remove(s[n])},i.prototype.setContentHeight=function(e){if(this.element.classList.contains("e-fill-mode")&&t.removeClass([this.element],["e-fill-mode"]),!t.isNullOrUndefined(this.cntEle)){var i=this.getTabHeader();if("None"===this.heightAdjustMode){if("auto"===this.height)return;this.isVertical()||t.setStyleAttribute(this.cntEle,{height:this.element.offsetHeight-i.offsetHeight+"px"})}else if("Fill"===this.heightAdjustMode)t.addClass([this.element],["e-fill-mode"]),t.setStyleAttribute(this.element,{height:"100%"}),t.setStyleAttribute(this.cntEle,{height:"100%"});else if("Auto"===this.heightAdjustMode){var s=t.selectAll(".e-content > .e-item",this.element);if(!0===this.isTemplate)for(o=0;o<s.length;o++)s[o].setAttribute("style","display:block; visibility: visible"),this.maxHeight=Math.max(this.maxHeight,this.getHeight(s[o])),s[o].style.removeProperty("display"),s[o].style.removeProperty("visibility");else{this.cntEle=t.select(".e-content",this.element),!0===e&&this.cntEle.appendChild(this.createElement("div",{id:"e-content"+this.tabId+"_0",className:"e-item e-active",attrs:{role:"tabpanel","aria-labelledby":"e-item"+this.tabId+"_0"}}));for(var n=this.cntEle.children.item(0),o=0;o<this.items.length;o++)for(this.getContent(n,this.items[o].content,"clone",o),this.maxHeight=Math.max(this.maxHeight,this.getHeight(n));n.firstChild;)n.removeChild(n.firstChild);this.clearTemplate(["content"]),this.templateEle=[],this.getContent(n,this.items[0].content,"render",0),n.classList.remove("e-active")}t.setStyleAttribute(this.cntEle,{height:this.maxHeight+"px"})}else t.setStyleAttribute(this.cntEle,{height:"auto"})}},i.prototype.getHeight=function(e){var t=window.getComputedStyle(e);return e.offsetHeight+parseFloat(t.getPropertyValue("padding-top"))+parseFloat(t.getPropertyValue("padding-bottom"))+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))},i.prototype.setActiveBorder=function(){var e,i,s=this.getTabHeader(),n=t.select(".e-toolbar-item.e-active",s);if(null!==n){var o=t.closest(n,".e-tab");if(this.element===o){if(this.tbItems=t.select("."+J,s),e=t.select(".e-indicator",s),i=t.select(".e-toolbar-items ."+this.scrCntClass,s),this.isVertical())t.setStyleAttribute(e,{left:"",right:""}),0!==(t.isNullOrUndefined(i)?this.tbItems.offsetHeight:i.offsetHeight)?t.setStyleAttribute(e,{top:n.offsetTop+"px",height:n.offsetHeight+"px"}):t.setStyleAttribute(e,{top:0,height:0});else{t.setStyleAttribute(e,{top:"",height:""});var r=t.isNullOrUndefined(i)?this.tbItems.offsetWidth:i.offsetWidth;0!==r?t.setStyleAttribute(e,{left:n.offsetLeft+"px",right:r-(n.offsetLeft+n.offsetWidth)+"px"}):t.setStyleAttribute(e,{left:"auto",right:"auto"})}t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.remove("e-hidden")}}},i.prototype.setActive=function(e){this.tbItem=t.selectAll("."+Z,this.getTabHeader());var i=this.tbItem[e];if(e>=0&&this.setProperties({selectedItem:e},!0),!(e<0||isNaN(e)||0===this.tbItem.length)){if(i.classList.contains("e-active"))return void this.setActiveBorder();if(!this.isTemplate){var s=this.tbItem[this.prevIndex];t.isNullOrUndefined(s)||s.removeAttribute("aria-controls"),t.attributes(i,{"aria-controls":"e-content"+this.tabId+"_"+e})}var n=i.id;this.removeActiveClass(),i.classList.add("e-active"),i.setAttribute("aria-selected","true");var o=Number(this.extIndex(n));if(t.isNullOrUndefined(this.prevActiveEle)&&(this.prevActiveEle="e-content"+this.tabId+"_"+o),t.attributes(this.element,{"aria-activedescendant":n}),this.isTemplate){if(t.select(".e-content",this.element).children.length>0){var r=this.findEle(t.select(".e-content",this.element).children,"e-content"+this.tabId+"_"+o);t.isNullOrUndefined(r)||r.classList.add("e-active"),this.triggerAnimation(n,this.enableAnimation)}}else{this.cntEle=t.select(".e-tab > .e-content",this.element);var l=this.getTrgContent(this.cntEle,this.extIndex(n));if(t.isNullOrUndefined(l)){this.cntEle.appendChild(this.createElement("div",{id:"e-content"+this.tabId+"_"+this.extIndex(n),className:"e-item e-active",attrs:{role:"tabpanel","aria-labelledby":"e-item"+this.tabId+"_"+this.extIndex(n)}}));var a=this.getTrgContent(this.cntEle,this.extIndex(n)),d=Array.prototype.indexOf.call(this.itemIndexArray,i.id);this.getContent(a,this.items[d].content,"render",d)}else l.classList.add("e-active");this.triggerAnimation(n,this.enableAnimation)}this.setActiveBorder();var h=t.select(".e-tab-header #"+n,this.element);this.refreshItemVisibility(h),this.initRender||h.firstChild.focus();var c={previousItem:this.prevItem,previousIndex:this.prevIndex,selectedItem:i,selectedIndex:e,selectedContent:t.select("#e-content"+this.tabId+"_"+this.selectingID,this.content),isSwiped:this.isSwipeed};this.initRender&&0===this.selectedItem||this.trigger("selected",c)}},i.prototype.setItems=function(e){this.isReplace=!0,this.tbItems=t.select("."+J,this.getTabHeader()),this.tbObj.items=this.parseObject(e,0),this.tbObj.dataBind(),this.isReplace=!1},i.prototype.setRTL=function(e){this.tbObj.enableRtl=e,this.tbObj.dataBind(),this.setCssClass(this.element,"e-rtl",e),this.refreshActiveBorder()},i.prototype.refreshActiveBorder=function(){t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.add("e-hidden"),this.setActiveBorder()},i.prototype.showPopup=function(e){var i=t.select(".e-popup.e-toolbar-pop",this.hdrEle);if(i.classList.contains("e-popup-close")){var s=i&&i.ej2_instances[0];s.position.X="Left"===this.headerPlacement?"left":"right",s.dataBind(),s.show(e)}},i.prototype.wireEvents=function(){window.addEventListener("resize",this.resizeContext),t.EventHandler.add(this.element,"mouseover",this.hoverHandler,this),t.EventHandler.add(this.element,"keydown",this.spaceKeyDown,this),t.isNullOrUndefined(this.cntEle)||(this.touchModule=new t.Touch(this.cntEle,{swipe:this.swipeHandler.bind(this)})),this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyHandler.bind(this),keyConfigs:this.keyConfigs}),this.tabKeyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyHandler.bind(this),keyConfigs:{openPopup:"shift+f10",tab:"tab",shiftTab:"shift+tab"},eventName:"keydown"})},i.prototype.unWireEvents=function(){this.keyModule.destroy(),this.tabKeyModule.destroy(),t.isNullOrUndefined(this.cntEle)||this.touchModule.destroy(),window.removeEventListener("resize",this.resizeContext),t.EventHandler.remove(this.element,"mouseover",this.hoverHandler),t.EventHandler.remove(this.element,"keydown",this.spaceKeyDown),this.element.classList.remove("e-rtl"),this.element.classList.remove("e-focused")},i.prototype.clickHandler=function(e){this.element.classList.remove("e-focused");var i=e.originalEvent.target,s=t.closest(i,"."+Z),n=this.getEleIndex(s);i.classList.contains("e-close-icon")?this.removeTab(n):this.isVertical()&&t.closest(i,".e-hor-nav")?this.showPopup(this.show):(this.isPopup=!1,t.isNullOrUndefined(s)||n===this.selectedItem||this.select(n))},i.prototype.swipeHandler=function(e){if(!(e.velocity<3&&t.isNullOrUndefined(e.originalEvent.changedTouches))){if(this.isSwipeed=!0,"Right"===e.swipeDirection&&0!==this.selectedItem){for(var i=this.selectedItem-1;i>=0;i--)if(!this.tbItem[i].classList.contains("e-hidden")){this.select(i);break}}else if("Left"===e.swipeDirection&&this.selectedItem!==t.selectAll("."+Z,this.element).length-1)for(var s=this.selectedItem+1;s<this.tbItem.length;s++)if(!this.tbItem[s].classList.contains("e-hidden")){this.select(s);break}this.isSwipeed=!1}},i.prototype.spaceKeyDown=function(e){if(32===e.keyCode&&32===e.which||35===e.keyCode&&35===e.which){var i=t.closest(e.target,".e-tab-header");t.isNullOrUndefined(i)||e.preventDefault()}},i.prototype.keyHandler=function(e){if(!this.element.classList.contains("e-disable")){this.element.classList.add("e-focused");var i=e.target,s=this.getTabHeader(),n=t.select(".e-active",s);switch(this.popEle=t.select(".e-toolbar-pop",s),t.isNullOrUndefined(this.popEle)||(this.popObj=this.popEle.ej2_instances[0]),e.action){case"space":case"enter":if(i.parentElement.classList.contains("e-disable"))return;if("enter"===e.action&&i.classList.contains("e-hor-nav")){this.showPopup(this.show);break}this.keyPressed(i);break;case"tab":case"shiftTab":i.classList.contains("e-tab-wrap")&&!1===t.closest(i,"."+Z).classList.contains("e-active")&&i.setAttribute("tabindex","-1"),this.popObj&&t.isVisible(this.popObj.element)&&this.popObj.hide(this.hide),n.children.item(0).setAttribute("tabindex","0");break;case"moveLeft":case"moveRight":var o=t.closest(document.activeElement,"."+Z);t.isNullOrUndefined(o)||this.refreshItemVisibility(o);break;case"openPopup":e.preventDefault(),!t.isNullOrUndefined(this.popEle)&&this.popEle.classList.contains("e-popup-close")&&this.popObj.show(this.show);break;case"delete":var r=t.closest(i,"."+Z);if(!0===this.showCloseButton&&!t.isNullOrUndefined(r)){var l=r.nextSibling;!t.isNullOrUndefined(l)&&l.classList.contains(Z)&&l.firstChild.focus(),this.removeTab(this.getEleIndex(r))}this.setActiveBorder()}}},i.prototype.refreshActElePosition=function(){var e=t.select(".e-toolbar-item.e-toolbar-popup.e-active",this.element);t.isNullOrUndefined(e)||this.select(this.getEleIndex(e)),this.refreshActiveBorder()},i.prototype.refreshItemVisibility=function(e){var i=t.select("."+this.scrCntClass,this.tbItems);if(!this.isVertical()&&!t.isNullOrUndefined(i)){var s=t.select(".e-hscroll-bar",this.tbItems),n=s.scrollLeft,o=n+s.offsetWidth,r=e.offsetLeft,l=e.offsetWidth,a=e.offsetLeft+e.offsetWidth;if(n<r&&o<a){d=o-r;s.scrollLeft=n+(l-d)}else if(n>r&&o>a){var d=a-n;s.scrollLeft=n-(l-d)}}},i.prototype.hoverHandler=function(e){var i=e.target;!t.isNullOrUndefined(i.classList)&&i.classList.contains("e-close-icon")&&i.setAttribute("title",new t.L10n("tab",{closeButtonTitle:this.title},this.locale).getConstant("closeButtonTitle"))},i.prototype.evalOnPropertyChangeItems=function(e,i){if(e.items instanceof Array&&i.items instanceof Array)if(this.lastIndex=0,t.isNullOrUndefined(this.tbObj))this.reRenderItems();else{for(var s=e.items,n=0;n<s.length;n++)this.resetBlazorTemplates(s[n],n);this.setItems(e.items),this.templateEle.length>0&&this.expTemplateContent(),this.templateEle=[];for(var o=t.select(".e-tab > .e-content",this.element);o.firstElementChild;)t.detach(o.firstElementChild);this.select(this.selectedItem)}else for(var r=Object.keys(e.items),n=0;n<r.length;n++){var l=parseInt(Object.keys(e.items)[n],10),a=Object.keys(e.items[l])[0],d=Object(i.items[l])[a],h=Object(e.items[l])[a],c=t.select(".e-toolbar-items #e-item"+this.tabId+"_"+l,this.element),p=t.select(".e-content #e-content"+this.tabId+"_"+l,this.element);if("header"===a||"headerTemplate"===a){var u=t.isNullOrUndefined(this.items[l].header)||t.isNullOrUndefined(this.items[l].header.iconCss)?"":this.items[l].header.iconCss;if(""===(this.items[l].headerTemplate||this.items[l].header.text)&&""===u)this.removeTab(l);else{var f=[];f.push(this.items[l]),this.items.splice(l,1),this.itemIndexArray.splice(l,1),this.tbObj.items.splice(l,1);var m=c.classList.contains("e-hidden");t.detach(c),this.isReplace=!0,this.addTab(f,l),m&&this.hideTab(l),this.isReplace=!1}}if("content"===a&&!t.isNullOrUndefined(p))if(("string"==typeof h||t.isNullOrUndefined(h.innerHTML))&&("."===h[0]||"#"===h[0])&&h.length){var v=document.querySelector(h);p.appendChild(v),v.style.display=""}else""===h&&"#"===d[0]?(document.body.appendChild(this.element.querySelector(d)).style.display="none",p.innerHTML=h):p.innerHTML=h;"cssClass"===a&&(t.isNullOrUndefined(c)||(c.classList.remove(d),c.classList.add(h)),t.isNullOrUndefined(p)||(p.classList.remove(d),p.classList.add(h))),"disabled"===a&&this.enableTab(l,!0!==h)}},i.prototype.resetBlazorTemplates=function(e,i){t.isBlazor()&&(e.headerTemplate&&!this.isStringTemplate&&0===e.headerTemplate.indexOf("<div>Blazor")&&t.resetBlazorTemplate(this.element.id+i+"_headerTemplate","HeaderTemplate"),e.content&&!this.isStringTemplate&&0===e.content.indexOf("<div>Blazor")&&t.resetBlazorTemplate(this.element.id+i+"_content","ContentTemplate"))},i.prototype.enableTab=function(e,i){var s=t.selectAll("."+Z,this.element)[e];t.isNullOrUndefined(s)||(!0===i?(s.classList.remove("e-disable","e-overlay"),s.firstChild.setAttribute("tabindex","-1")):(s.classList.add("e-disable","e-overlay"),s.firstChild.removeAttribute("tabindex"),s.classList.contains("e-active")&&this.select(e+1)),t.isNullOrUndefined(this.items[e])||(this.items[e].disabled=!i,this.dataBind()),s.setAttribute("aria-disabled",!0===i?"false":"true"))},i.prototype.addTab=function(e,t){var i=this,s={addedItems:e,cancel:!1};this.isReplace?this.addingTabContent(e,t):this.trigger("adding",s,function(s){s.cancel||i.addingTabContent(e,t)})},i.prototype.addingTabContent=function(e,i){var s=this,n=0;if(this.hdrEle=t.select(".e-tab-header",this.element),t.isNullOrUndefined(this.hdrEle))this.items=e,this.reRenderItems();else{var o=t.selectAll("."+Z,this.element).length;if(0!==o&&(n=this.lastIndex+1),t.isNullOrUndefined(i)&&(i=o-1),o<i||i<0||isNaN(i))return;0!==o||t.isNullOrUndefined(this.hdrEle)||(this.hdrEle.style.display=""),t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.add("e-hidden"),this.tbItems=t.select("."+J,this.getTabHeader()),this.isAdd=!0;var r=this.parseObject(e,i);this.isAdd=!1;var l,a=0;e.forEach(function(e,o){if(l=e.headerTemplate||e.header.text,t.isNullOrUndefined(e.headerTemplate||e.header)||t.isNullOrUndefined(l)||0===l.length&&t.isNullOrUndefined(e.header.iconCss)||(s.items.splice(i+a,0,e),a++),s.isTemplate&&!t.isNullOrUndefined(e.header)&&!t.isNullOrUndefined(e.header.text)){var r=n+o,d=s.createElement("div",{id:"e-content"+s.tabId+"_"+r,className:"e-item",attrs:{role:"tabpanel","aria-labelledby":"e-item"+s.tabId+"_"+r}});s.cntEle.insertBefore(d,s.cntEle.children[i+o]);var h=s.getTrgContent(s.cntEle,r.toString());s.getContent(h,e.content,"render",i)}}),this.tbObj.addItems(r,i),this.isReplace||this.trigger("added",{addedItems:e}),this.selectedItem===i?this.select(i):this.setActiveBorder()}},i.prototype.removeTab=function(e){var i=this,s=t.selectAll("."+Z,this.element)[e];if(!t.isNullOrUndefined(s)){var n={removedItem:s,removedIndex:e,cancel:!1};this.trigger("removing",n,function(n){if(!n.cancel){i.resetBlazorTemplates(i.items[e],e),i.tbObj.removeItems(e),i.items.splice(e,1),i.itemIndexArray.splice(e,1),i.refreshActiveBorder();var o=t.select("#e-content"+i.tabId+"_"+i.extIndex(s.id),t.select(".e-content",i.element));t.isNullOrUndefined(o)||t.detach(o),i.trigger("removed",n),s.classList.contains("e-active")&&(e=e>t.selectAll(".e-toolbar-item:not(.e-toolbar-popup)",i.element).length-1?e-1:e,i.enableAnimation=!1,i.selectedItem=e,i.select(e)),0===t.selectAll("."+Z,i.element).length&&(i.hdrEle.style.display="none"),i.enableAnimation=!0}})}},i.prototype.hideTab=function(e,i){var s,n=t.selectAll("."+Z,this.element)[e];if(!t.isNullOrUndefined(n)){if(t.isNullOrUndefined(i)&&(i=!0),this.bdrLine.classList.add("e-hidden"),!0===i)if(n.classList.add("e-hidden"),0!==(s=t.selectAll(".e-toolbar-item:not(.e-hidden)",this.tbItems)).length&&n.classList.contains("e-active")){if(0!==e)for(var o=e-1;o>=0;o--){if(!this.tbItem[o].classList.contains("e-hidden")){this.select(o);break}if(0===o)for(r=e+1;r<this.tbItem.length;r++)if(!this.tbItem[r].classList.contains("e-hidden")){this.select(r);break}}else for(var r=e+1;r<this.tbItem.length;r++)if(!this.tbItem[r].classList.contains("e-hidden")){this.select(r);break}}else 0===s.length&&this.element.classList.add("e-hidden");else this.element.classList.remove("e-hidden"),0===(s=t.selectAll(".e-toolbar-item:not(.e-hidden)",this.tbItems)).length&&this.select(e),n.classList.remove("e-hidden");this.setActiveBorder(),n.setAttribute("aria-hidden",""+i)}},i.prototype.select=function(e){var i=this,s=this.getTabHeader();this.tbItems=t.select("."+J,s),this.tbItem=t.selectAll("."+Z,s),this.content=t.select(".e-content",this.element),this.prevItem=this.tbItem[this.prevIndex],t.isNullOrUndefined(this.selectedItem)||this.selectedItem<0||this.tbItem.length<=this.selectedItem||isNaN(this.selectedItem)?this.selectedItem=0:this.selectedID=this.extIndex(this.tbItem[this.selectedItem].id);var n=this.tbItem[e];t.isNullOrUndefined(n)?this.selectedID="0":this.selectingID=this.extIndex(n.id),t.isNullOrUndefined(this.prevItem)||this.prevItem.classList.contains("e-disable")||this.prevItem.children.item(0).setAttribute("tabindex","-1");var o={previousItem:this.prevItem,previousIndex:this.prevIndex,selectedItem:this.tbItem[this.selectedItem],selectedIndex:this.selectedItem,selectedContent:t.isNullOrUndefined(this.content)?null:t.select("#e-content"+this.tabId+"_"+this.selectedID,this.content),selectingItem:n,selectingIndex:e,selectingContent:t.isNullOrUndefined(this.content)?null:t.select("#e-content"+this.tabId+"_"+this.selectingID,this.content),isSwiped:this.isSwipeed,cancel:!1};this.initRender&&0===this.selectedItem?this.selectingContent(e):this.trigger("selecting",o,function(t){t.cancel||i.selectingContent(e)})},i.prototype.selectingContent=function(e){if("number"==typeof e){if(!t.isNullOrUndefined(this.tbItem[e])&&this.tbItem[e].classList.contains("e-disable"))for(var i=e+1;i<this.items.length;i++){if(!1===this.items[i].disabled){e=i;break}e=0}this.tbItem.length>e&&e>=0&&!isNaN(e)?(this.prevIndex=this.selectedItem,this.tbItem[e].classList.contains("e-toolbar-popup")?this.setActive(this.popupHandler(this.tbItem[e])):this.setActive(e)):this.setActive(0)}else e instanceof HTMLElement&&this.setActive(this.getEleIndex(e))},i.prototype.disable=function(e){this.setCssClass(this.element,"e-disable",e),this.element.setAttribute("aria-disabled",""+e)},i.prototype.getPersistData=function(){return this.addOnPersist(["selectedItem","actEleId"])},i.prototype.getModuleName=function(){return"tab"},i.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"width":t.setStyleAttribute(this.element,{width:t.formatUnit(e.width)});break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)}),this.setContentHeight(!1);break;case"cssClass":""!==i.cssClass?(this.setCssClass(this.element,i.cssClass,!1),this.setCssClass(this.element,e.cssClass,!0)):this.setCssClass(this.element,e.cssClass,!0);break;case"items":this.evalOnPropertyChangeItems(e,i);break;case"showCloseButton":this.setCloseButton(e.showCloseButton);break;case"selectedItem":this.selectedItem=i.selectedItem,this.select(e.selectedItem);break;case"headerPlacement":this.changeOrientation(e.headerPlacement);break;case"enableRtl":this.setRTL(e.enableRtl);break;case"overflowMode":this.tbObj.overflowMode=e.overflowMode,this.tbObj.dataBind(),this.refreshActElePosition();break;case"heightAdjustMode":this.setContentHeight(!1),this.select(this.selectedItem);break;case"scrollStep":this.tbObj&&(this.tbObj.scrollStep=this.scrollStep)}},Q([t.Collection([],ie)],i.prototype,"items",void 0),Q([t.Property("100%")],i.prototype,"width",void 0),Q([t.Property("auto")],i.prototype,"height",void 0),Q([t.Property("")],i.prototype,"cssClass",void 0),Q([t.Property(0)],i.prototype,"selectedItem",void 0),Q([t.Property("Top")],i.prototype,"headerPlacement",void 0),Q([t.Property("Content")],i.prototype,"heightAdjustMode",void 0),Q([t.Property("Scrollable")],i.prototype,"overflowMode",void 0),Q([t.Property(!1)],i.prototype,"enablePersistence",void 0),Q([t.Property(!1)],i.prototype,"showCloseButton",void 0),Q([t.Property()],i.prototype,"scrollStep",void 0),Q([t.Complex({},ee)],i.prototype,"animation",void 0),Q([t.Event()],i.prototype,"created",void 0),Q([t.Event()],i.prototype,"adding",void 0),Q([t.Event()],i.prototype,"added",void 0),Q([t.Event()],i.prototype,"selecting",void 0),Q([t.Event()],i.prototype,"selected",void 0),Q([t.Event()],i.prototype,"removing",void 0),Q([t.Event()],i.prototype,"removed",void 0),Q([t.Event()],i.prototype,"destroyed",void 0),i=Q([t.NotifyPropertyChanges],i)}(t.Component),ne=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),oe=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},re="e-treeview",le="e-icon-collapsible",ae="e-icon-expandable",de="e-list-item",he="e-list-text",ce="e-list-parent",pe="e-hover",ue="e-active",fe="e-icons-spinner",me="e-process",ve="e-icons",ge="e-text-content",ye="e-sibling",be="e-drop-next",Ce="e-check",Ne="e-checkbox-wrapper",Ee="e-node-focus",xe={treeRole:"tree",itemRole:"treeitem",listRole:"group",itemText:"",wrapperRole:""},Oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ne(i,e),oe([t.Property("child")],i.prototype,"child",void 0),oe([t.Property([])],i.prototype,"dataSource",void 0),oe([t.Property("expanded")],i.prototype,"expanded",void 0),oe([t.Property("hasChildren")],i.prototype,"hasChildren",void 0),oe([t.Property("htmlAttributes")],i.prototype,"htmlAttributes",void 0),oe([t.Property("iconCss")],i.prototype,"iconCss",void 0),oe([t.Property("id")],i.prototype,"id",void 0),oe([t.Property("imageUrl")],i.prototype,"imageUrl",void 0),oe([t.Property("isChecked")],i.prototype,"isChecked",void 0),oe([t.Property("parentID")],i.prototype,"parentID",void 0),oe([t.Property(null)],i.prototype,"query",void 0),oe([t.Property("selected")],i.prototype,"selected",void 0),oe([t.Property(null)],i.prototype,"tableName",void 0),oe([t.Property("text")],i.prototype,"text",void 0),oe([t.Property("tooltip")],i.prototype,"tooltip",void 0),oe([t.Property("navigateUrl")],i.prototype,"navigateUrl",void 0),i}(t.ChildProperty),we=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ne(i,e),oe([t.Property("SlideDown")],i.prototype,"effect",void 0),oe([t.Property(400)],i.prototype,"duration",void 0),oe([t.Property("linear")],i.prototype,"easing",void 0),i}(t.ChildProperty),ke=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ne(i,e),oe([t.Complex({effect:"SlideUp",duration:400,easing:"linear"},we)],i.prototype,"collapse",void 0),oe([t.Complex({effect:"SlideDown",duration:400,easing:"linear"},we)],i.prototype,"expand",void 0),i}(t.ChildProperty),Se=function(e){function l(t,i){var s=e.call(this,t,i)||this;return s.preventExpand=!1,s.checkedElement=[],s.disableNode=[],s.parentNodeCheck=[],s.expandChildren=[],s.isFieldChange=!1,s.mouseDownStatus=!1,s}ne(l,e),a=l,l.prototype.getModuleName=function(){return"treeview"},l.prototype.preRender=function(){var e=this;this.checkActionNodes=[],this.dragStartAction=!1,this.isAnimate=!1,this.keyConfigs={escape:"escape",end:"end",enter:"enter",f2:"f2",home:"home",moveDown:"downarrow",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",ctrlDown:"ctrl+downarrow",ctrlUp:"ctrl+uparrow",ctrlEnter:"ctrl+enter",ctrlHome:"ctrl+home",ctrlEnd:"ctrl+end",ctrlA:"ctrl+A",shiftDown:"shift+downarrow",shiftUp:"shift+uparrow",shiftEnter:"shift+enter",shiftHome:"shift+home",shiftEnd:"shift+end",csDown:"ctrl+shift+downarrow",csUp:"ctrl+shift+uparrow",csEnter:"ctrl+shift+enter",csHome:"ctrl+shift+home",csEnd:"ctrl+shift+end",space:"space"},this.listBaseOption={expandCollapse:!0,showIcon:!0,expandIconClass:ae,ariaAttributes:xe,expandIconPosition:"Left",itemCreated:function(t){e.beforeNodeCreate(t)}},this.updateListProp(this.fields),this.aniObj=new t.Animation({}),this.treeList=[],this.isLoaded=!1,this.isInitalExpand=!1,this.expandChildren=[],this.index=0,this.setTouchClass(),t.isNullOrUndefined(this.selectedNodes)&&this.setProperties({selectedNodes:[]},!0),t.isNullOrUndefined(this.checkedNodes)&&this.setProperties({checkedNodes:[]},!0),t.isNullOrUndefined(this.expandedNodes)?this.setProperties({expandedNodes:[]},!0):this.isInitalExpand=!0},l.prototype.getPersistData=function(){var e=["selectedNodes","checkedNodes","expandedNodes"];return this.addOnPersist(e)},l.prototype.render=function(){this.initialRender=!0,this.initialize(),this.setDataBinding(),this.setExpandOnType(),this.setRipple(),this.wireEditingEvents(this.allowEditing),this.setDragAndDrop(this.allowDragAndDrop),this.wireEvents(),this.initialRender=!1,this.renderComplete()},l.prototype.initialize=function(){this.element.setAttribute("role","tree"),this.element.setAttribute("tabindex","0"),this.element.setAttribute("aria-activedescendant",this.element.id+"_active"),this.isBlazorPlatform=t.isBlazor(),this.setCssClass(null,this.cssClass),this.setEnableRtl(),this.setFullRow(this.fullRowSelect),this.nodeTemplateFn=this.templateComplier(this.nodeTemplate)},l.prototype.setEnableRtl=function(){this.enableRtl?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},l.prototype.setRipple=function(){var e={selector:".e-fullrow,.e-text-content",ignore:"."+ge+" > ."+ve+",.e-input-group,.e-input, ."+Ne};this.rippleFn=t.rippleEffect(this.element,e);var i={selector:"."+ge+" > ."+ve,isCenterRipple:!0};this.rippleIconFn=t.rippleEffect(this.element,i)},l.prototype.setFullRow=function(e){e?t.addClass([this.element],"e-fullrow-wrap"):t.removeClass([this.element],"e-fullrow-wrap")},l.prototype.setMultiSelect=function(e){var i=t.select("."+ce,this.element);e?i.setAttribute("aria-multiselectable","true"):i.removeAttribute("aria-multiselectable")},l.prototype.templateComplier=function(e){if(e)try{if(document.querySelectorAll(e).length)return t.compile(document.querySelector(e).innerHTML.trim())}catch(i){return t.compile(e)}},l.prototype.setDataBinding=function(){var e=this;this.treeList.push("false"),this.fields.dataSource instanceof o.DataManager?this.fields.dataSource.ready?this.fields.dataSource.ready.then(function(t){e.fields.dataSource instanceof o.DataManager&&e.fields.dataSource.dataSource.offline&&(e.treeList.pop(),e.treeData=t.result,e.isNumberTypeId=e.getType(),e.setRootData(),e.renderItems(!0),0!==e.treeList.length||e.isLoaded||e.finalize())}):this.fields.dataSource.executeQuery(this.getQuery(this.fields)).then(function(t){e.treeList.pop(),e.treeData=t.result,e.isNumberTypeId=e.getType(),e.setRootData(),e.renderItems(!0),0!==e.treeList.length||e.isLoaded||e.finalize()}):(this.treeList.pop(),t.isNullOrUndefined(this.fields.dataSource)?this.rootData=this.treeData=[]:(this.treeData=JSON.parse(JSON.stringify(this.fields.dataSource)),this.setRootData()),this.isNumberTypeId=this.getType(),this.renderItems(!1)),0!==this.treeList.length||this.isLoaded||this.finalize()},l.prototype.getQuery=function(e,s){void 0===s&&(s=null);var n,r=[];if(e.query)n=e.query.clone();else{n=new o.Query;for(var l=this.getActualProperties(e),a=0,d=Object.keys(l);a<d.length;a++){var h=d[a];"dataSource"!==h&&"tableName"!==h&&"child"!==h&&e[h]&&-1===r.indexOf(e[h])&&r.push(e[h])}n.select(r),l.hasOwnProperty("tableName")&&n.from(e.tableName)}return i.ListBase.addSorting(this.sortOrder,e.text,n),t.isNullOrUndefined(s)||t.isNullOrUndefined(e.parentID)||n.where(e.parentID,"equal",this.isNumberTypeId?parseFloat(s):s),n},l.prototype.getType=function(){return!!this.treeData[0]&&"number"==typeof t.getValue(this.fields.id,this.treeData[0])},l.prototype.setRootData=function(){if(this.dataType=this.getDataType(this.treeData,this.fields),1===this.dataType){this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID);var e=this.getChildNodes(this.treeData,void 0,!0);t.isNullOrUndefined(e)?this.rootData=[]:this.rootData=e}else this.rootData=this.treeData},l.prototype.renderItems=function(e){if(this.listBaseOption.ariaAttributes.level=1,this.ulElement=i.ListBase.createList(this.createElement,e?this.rootData:this.getSortedData(this.rootData),this.listBaseOption),this.element.appendChild(this.ulElement),!1===this.loadOnDemand)for(var t=this.ulElement.querySelectorAll(".e-list-item"),s=0;s<t.length;)this.renderChildNodes(t[s],!0,null,!0),s++;else this.finalizeNode(this.element);this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate(),this.parentNodeCheck=[],this.parentCheckData=[],this.updateCheckedStateFromDS(),this.autoCheck&&this.showCheckBox&&!this.isLoaded&&this.updateParentCheckState()},l.prototype.updateCheckedStateFromDS=function(e){if(this.treeData&&this.showCheckBox)if(1===this.dataType){for(var i=this.fields,s=new o.DataManager(this.treeData).executeLocal((new o.Query).where(i.isChecked,"equal",!0,!1)),n=0;n<s.length;n++){var r=s[n][this.fields.id]?s[n][this.fields.id].toString():null;s[n][this.fields.parentID]&&s[n][this.fields.parentID].toString();if(-1!==this.checkedNodes.indexOf(r)||this.isLoaded||this.checkedNodes.push(r),s[n][this.fields.hasChildren])for(var l=s[n][this.fields.id],a=new o.DataManager(this.treeData).executeLocal((new o.Query).where(i.parentID,"equal",l,!1)),d=0;d<a.length;d++){var h=a[d][this.fields.id]?a[d][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(h)&&this.autoCheck&&this.checkedNodes.push(h)}}for(n=0;n<this.checkedNodes.length;n++){var c=this.fields,p=new o.DataManager(this.treeData).executeLocal((new o.Query).where(c.id,"equal",this.checkedNodes[n],!0));p[0]&&this.autoCheck&&(this.getCheckedNodeDetails(c,p),this.checkIndeterminateState(p[0]));for(var u=new o.DataManager(this.treeData).executeLocal((new o.Query).where(c.parentID,"equal",this.checkedNodes[n],!0)),f=0;f<u.length;f++){var m=u[f][this.fields.id]?u[f][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(m)&&this.autoCheck&&this.checkedNodes.push(m)}}}else if(2===this.dataType||this.fields.dataSource instanceof o.DataManager&&this.fields.dataSource.dataSource.offline||this.fields.dataSource instanceof o.DataManager&&!this.loadOnDemand)for(f=0;f<this.treeData.length;f++){var v=this.treeData[f][this.fields.id]?this.treeData[f][this.fields.id].toString():"";this.treeData[f][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(v)&&this.checkedNodes.push(v);var g=t.getValue(this.fields.child.toString(),this.treeData[f]);g&&this.updateChildCheckState(g,this.treeData[f])}},l.prototype.getCheckedNodeDetails=function(e,i){var s=i[0][this.fields.parentID]?i[0][this.fields.parentID].toString():null,n=0,r=this.element.querySelector('[data-uid="'+i[0][this.fields.id]+'"]'),l=this.element.querySelector('[data-uid="'+i[0][this.fields.parentID]+'"]');if(r||l)l&&(t.select("."+Ce,l)||this.changeState(l,"indeterminate",null,!0,!0));else{this.parentNodeCheck.length;-1===this.parentNodeCheck.indexOf(s)&&this.parentNodeCheck.push(s);for(var a=this.getChildNodes(this.treeData,s),d=0;d<a.length;d++){var h=a[d][this.fields.id]?a[d][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(h)&&n++,n===a.length&&-1===this.checkedNodes.indexOf(s)&&this.checkedNodes.push(s)}var c=new o.DataManager(this.treeData).executeLocal((new o.Query).where(e.id,"equal",s,!0));this.getCheckedNodeDetails(e,c)}},l.prototype.updateParentCheckState=function(){for(var e,i=t.selectAll(".e-stop",this.element),s=0;s<i.length;s++){var n=t.closest(i[s],"."+de),r=n.getAttribute("data-uid").toString(),l=0;if(e=1===this.dataType?new o.DataManager(this.treeData).executeLocal((new o.Query).where(this.fields.parentID,"equal",r,!0)):this.getChildNodes(this.treeData,r)){for(var a=0;a<e.length;a++){var d=e[a][this.fields.id].toString();-1!==this.checkedNodes.indexOf(d)&&l++}if(l===e.length){var h=n.getAttribute("data-uid");-1===this.checkedNodes.indexOf(h)&&this.checkedNodes.push(h),this.changeState(n,"check",null,!0,!0)}else 0===l&&0===this.checkedNodes.length&&this.changeState(n,"uncheck",null,!0,!0)}}},l.prototype.checkIndeterminateState=function(e){var t;if(t=1===this.dataType?this.element.querySelector('[data-uid="'+e[this.fields.parentID]+'"]'):this.element.querySelector('[data-uid="'+e[this.fields.id]+'"]'))"true"!==t.querySelector("."+Ne).getAttribute("aria-checked")&&this.changeState(t,"indeterminate",null,!0,!0);else if(2===this.dataType){this.parentNodeCheck.length;-1===this.parentNodeCheck.indexOf(e[this.fields.id].toString())&&this.parentNodeCheck.push(e[this.fields.id].toString())}},l.prototype.updateChildCheckState=function(e,i){for(var s=0,n=i[this.fields.id]?i[this.fields.id].toString():"",o=0;o<e.length;o++){var r=e[o][this.fields.id]?e[o][this.fields.id].toString():"";e[o][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(r)&&this.checkedNodes.push(r),-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(r)&&this.autoCheck&&this.checkedNodes.push(r),-1!==this.checkedNodes.indexOf(r)&&this.autoCheck&&s++;var l=t.getValue(this.fields.child.toString(),e[o]);l&&(this.parentCheckData.push(i),this.updateChildCheckState(l,e[o])),s===e.length&&this.autoCheck&&-1===this.checkedNodes.indexOf(n)&&this.checkedNodes.push(n)}if(0!==s&&this.autoCheck){this.checkIndeterminateState(i);for(var a=0;a<this.parentCheckData.length;a++)i!==this.parentCheckData[a]&&this.parentCheckData[a]&&this.checkIndeterminateState(this.parentCheckData[a])}this.parentCheckData=[]},l.prototype.beforeNodeCreate=function(e){if(this.showCheckBox){var i=n.createCheckBox(this.createElement,!0,{cssClass:this.touchClass});i.setAttribute("role","checkbox");var s=t.select("div."+ve,e.item),o=e.item.getAttribute("data-uid");e.item.childNodes[0].insertBefore(i,e.item.childNodes[0].childNodes[t.isNullOrUndefined(s)?0:1]);var r=t.getValue(e.fields.isChecked,e.curData);this.checkedNodes.indexOf(o)>-1?(t.select(".e-frame",i).classList.add(Ce),i.setAttribute("aria-checked","true"),this.addCheck(e.item)):t.isNullOrUndefined(r)||"true"!==r.toString()?i.setAttribute("aria-checked","false"):(t.select(".e-frame",i).classList.add(Ce),i.setAttribute("aria-checked","true"),this.addCheck(e.item));var l=t.select(".e-frame",i);t.EventHandler.add(l,"mousedown",this.frameMouseHandler,this),t.EventHandler.add(l,"mouseup",this.frameMouseHandler,this)}this.fullRowSelect&&this.createFullRow(e.item),this.allowMultiSelection&&!e.item.classList.contains("e-selected")&&e.item.setAttribute("aria-selected","false");var a=e.fields;if(this.addActionClass(e,a.selected,"e-selected"),this.addActionClass(e,a.expanded,"e-expanded"),!t.isNullOrUndefined(this.nodeTemplateFn)){var d=e.item.querySelector("."+he);d.innerHTML="";var h=this.nodeTemplateFn(e.curData,void 0,void 0,this.element.id+"nodeTemplate",this.isStringTemplate);h=Array.prototype.slice.call(h),t.append(h,d)}var c={node:e.item,nodeData:e.curData,text:e.text};this.trigger("drawNode",c)},l.prototype.frameMouseHandler=function(e){var i=t.select(".e-ripple-container",e.target.parentElement);n.rippleMouseHandler(e,i)},l.prototype.addActionClass=function(e,i,s){var n=e.curData,o=t.getValue(i,n);t.isNullOrUndefined(o)||"false"===o.toString()||e.item.classList.add(s)},l.prototype.getDataType=function(e,i){if(this.fields.dataSource instanceof o.DataManager){for(s=0;s<e.length;s++)if("string"==typeof i.child&&t.isNullOrUndefined(t.getValue(i.child,e[s])))return 1;return 2}for(var s=0,n=e.length;s<n;s++){if("string"==typeof i.child&&!t.isNullOrUndefined(t.getValue(i.child,e[s])))return 2;if(!t.isNullOrUndefined(t.getValue(i.parentID,e[s]))||!t.isNullOrUndefined(t.getValue(i.hasChildren,e[s])))return 1}return 1},l.prototype.getGroupedData=function(e,t){for(var s=(new o.Query).group(t),n=i.ListBase.getDataSource(e,s),r=[],l=0;l<n.length;l++){var a=n[l].items;r.push(a)}return r},l.prototype.getSortedData=function(e){return e&&"None"!==this.sortOrder&&(e=i.ListBase.getDataSource(e,i.ListBase.addSorting(this.sortOrder,this.fields.text))),e},l.prototype.finalizeNode=function(e){for(var i=t.selectAll(".e-list-img",e),s=0;s<i.length;s++)i[s].setAttribute("alt","e-list-img");if(this.isLoaded){for(var n=t.selectAll(".e-selected",e),o=0;o<n.length;o++){this.selectNode(n[o],null);break}t.removeClass(n,"e-selected")}for(var r=t.selectAll(".e-list-item:not(.e-expanded)",e),l=0;l<r.length;l++){var a=t.select("div."+ve,r[l]);a&&a.classList.contains(ae)&&this.disableExpandAttr(r[l])}var d=t.selectAll(".e-expanded",e);if(!this.isInitalExpand)for(o=0;o<d.length;o++)this.renderChildNodes(d[o]);t.removeClass(d,"e-expanded"),this.updateList(),this.isLoaded&&this.updateCheckedProp()},l.prototype.updateCheckedProp=function(){if(this.showCheckBox){var e=[].concat([],this.checkedNodes);this.setProperties({checkedNodes:e},!0)}},l.prototype.ensureIndeterminate=function(){if(this.autoCheck)for(var e=t.selectAll("li",this.element),i=0;i<e.length;i++)e[i].classList.contains(de)&&(t.select("."+ce,e[i])?this.ensureParentCheckState(e[i]):this.ensureChildCheckState(e[i]));else for(var s=t.selectAll(".e-stop",this.element),i=0;i<s.length;i++)s[i].classList.remove("e-stop")},l.prototype.ensureParentCheckState=function(e){if(!t.isNullOrUndefined(e)){if(e.classList.contains(re))return;var i=e;e.classList.contains(de)&&(i=t.select("."+ce,e));var s=t.selectAll("."+Ce,i),n=t.selectAll(".e-stop",i),o=t.selectAll("."+de,i),r=e.getElementsByClassName(Ne)[0];o.length===s.length?this.changeState(r,"check",null,!0,!0):s.length>0||n.length>0?this.changeState(r,"indeterminate",null,!0,!0):0===s.length&&this.changeState(r,"uncheck",null,!0,!0);var l=t.closest(e,"."+ce);if(!t.isNullOrUndefined(l)){var a=t.closest(l,"."+de);this.ensureParentCheckState(a)}}},l.prototype.ensureChildCheckState=function(e,i){if(!t.isNullOrUndefined(e)){var s=t.select("."+ce,e),n=void 0;if(!t.isNullOrUndefined(s)){n=t.selectAll("."+Ne,s);for(var o=e.getElementsByClassName("e-frame")[0].classList.contains(Ce),r=e.getElementsByClassName("e-frame")[0].classList.contains("e-stop"),l=s.querySelectorAll("li"),a=(s.parentElement.getAttribute("aria-expanded"),void 0),d=0;d<n.length;d++){if(t.isNullOrUndefined(this.currentLoadData)||t.isNullOrUndefined(t.getValue(this.fields.isChecked,this.currentLoadData[d]))){var h=n[d].getElementsByClassName("e-frame")[0].classList.contains(Ce),c=l[d].getAttribute("data-uid");o?a="check":h&&!this.isLoaded?a="check":-1!==this.checkedNodes.indexOf(c)&&this.isLoaded&&(r||o)?a="check":l[d].classList.contains("e-has-child")&&!t.isUndefined(this.parentNodeCheck)&&this.autoCheck&&(o||r)&&-1!==this.parentNodeCheck.indexOf(c)?(a="indeterminate",this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(c),1)):1===this.dataType&&!t.isUndefined(this.parentNodeCheck)&&this.autoCheck&&(o||r)&&-1!==this.parentNodeCheck.indexOf(c)?(a="indeterminate",this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(c),1)):a="uncheck"}else a=t.getValue(this.fields.isChecked,this.currentLoadData[d])?"check":"uncheck",-1!==this.ele&&(a=o?"check":"uncheck");this.changeState(n[d],a,i,!0,!0)}}this.autoCheck&&this.isLoaded&&this.updateParentCheckState()}},l.prototype.doCheckBoxAction=function(e,i){t.selectAll("."+de,this.element);if(t.isNullOrUndefined(e)){var s=t.selectAll("."+Ne,this.element);if(this.loadOnDemand)for(n=0;n<s.length;n++)this.updateFieldChecked(s[n],i),this.changeState(s[n],i?"check":"uncheck",null,null,null,i);else for(var n=0;n<s.length;n++)this.updateFieldChecked(s[n],i),this.changeState(s[n],i?"check":"uncheck")}else for(var o=e.length;o>=0;o--){var r=void 0;if(r=1===e.length?this.getElement(e[o-1]):this.getElement(e[o]),t.isNullOrUndefined(r)){p=void 0;if(""!==(p=e[o-e.length]?e[o-e.length].toString():e[o]?e[o].toString():null)&&i&&p)this.setValidCheckedNode(p),this.dynamicCheckState(p,i);else if(-1!==this.checkedNodes.indexOf(p)&&""!==p&&!i){this.checkedNodes.splice(this.checkedNodes.indexOf(p),1);var l=this.getChildNodes(this.treeData,p);if(l){for(var a=0;a<l.length;a++){var d=l[a][this.fields.id]?l[a][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(d)&&this.checkedNodes.splice(this.checkedNodes.indexOf(d),1)}-1!==this.parentNodeCheck.indexOf(p)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(p),1)}p&&this.dynamicCheckState(p,i),this.updateField(this.treeData,this.fields,p,"isChecked",null)}}else{var h=t.select(".e-list-parent ."+Ne,r);this.validateCheckNode(h,!i,r,null)}}if(e)for(var c=0;c<e.length;c++){var p=e[c]?e[c].toString():"";i||this.updateField(this.treeData,this.fields,p,"isChecked",null)}this.autoCheck&&this.updateParentCheckState()},l.prototype.updateFieldChecked=function(e,i){var s=t.closest(e,"."+de),n=s.getAttribute("data-uid");"true"!==this.getNodeData(s).isChecked||i||this.updateField(this.treeData,this.fields,n,"isChecked",null)},l.prototype.dynamicCheckState=function(e,i){if(1===this.dataType){var s=0,n=new o.DataManager(this.treeData).executeLocal((new o.Query).where(this.fields.id,"equal",e,!0));if(n[0]){var r=n[0][this.fields.id]?n[0][this.fields.id].toString():null,l=n[0][this.fields.parentID]?n[0][this.fields.parentID].toString():null,a=((p=this.element.querySelector('[data-uid="'+l+'"]'))&&t.select(".e-stop",p),p?t.select("."+Ce,p):null),d=this.element.querySelector('[data-uid="'+r+'"]'),h=this.getChildNodes(this.treeData,l);if(h)for(u=0;u<h.length;u++){var c=h[u][this.fields.id]?h[u][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(c)&&s++}-1!==this.checkedNodes.indexOf(e)&&p&&r===e&&this.autoCheck?this.changeState(p,"indeterminate",null):-1===this.checkedNodes.indexOf(e)&&d&&r===e&&!i?this.changeState(d,"uncheck",null):-1!==this.checkedNodes.indexOf(e)&&d&&r===e&&i?this.changeState(d,"check",null):-1===this.checkedNodes.indexOf(e)&&!d&&p&&r===e&&this.autoCheck&&0!==s?this.changeState(p,"indeterminate",null):-1===this.checkedNodes.indexOf(e)&&!d&&p&&r===e&&this.autoCheck&&0===s?this.changeState(p,"uncheck",null):d||p||r!==e||!this.autoCheck||this.updateIndeterminate(e,i)}}else if(2===this.dataType||this.fields.dataSource instanceof o.DataManager&&this.fields.dataSource.dataSource.offline||this.fields.dataSource instanceof o.DataManager&&!this.loadOnDemand)for(var r=void 0,p=void 0,a=void 0,u=0;u<this.treeData.length;u++){r=this.treeData[u][this.fields.id]?this.treeData[u][this.fields.id].toString():"",a=(p=this.element.querySelector('[data-uid="'+r+'"]'))?t.select("."+Ce,p):null,-1===this.checkedNodes.indexOf(r)&&p&&a&&!i&&this.changeState(p,"uncheck",null);var f=t.getValue(this.fields.child.toString(),this.treeData[u]);f&&this.updateChildIndeterminate(f,r,e,i,r)}},l.prototype.updateIndeterminate=function(e,t){var i,s=this.getTreeData(e),n=0;1===this.dataType&&(i=s[0][this.fields.parentID]?s[0][this.fields.parentID].toString():null);var o=this.getChildNodes(this.treeData,i);if(o)for(var r=0;r<o.length;r++){var l=o[r][this.fields.id]?o[r][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(l)&&n++}var a=this.element.querySelector('[data-uid="'+i+'"]');a&&t?this.changeState(a,"indeterminate",null):!t&&a&&-1===this.parentNodeCheck.indexOf(i)&&0!==n?this.changeState(a,"indeterminate",null):!t&&a&&-1===this.parentNodeCheck.indexOf(i)&&0===n?this.changeState(a,"uncheck",null):a||(t||-1!==this.checkedNodes.indexOf(i)||-1===this.parentNodeCheck.indexOf(i)?t&&-1===this.checkedNodes.indexOf(i)&&-1===this.parentNodeCheck.indexOf(i)?this.parentNodeCheck.push(i):t||-1===this.checkedNodes.indexOf(i)||-1!==this.parentNodeCheck.indexOf(i)||0===n||this.parentNodeCheck.push(i):this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(i),1),this.updateIndeterminate(i,t),-1===this.checkedNodes.indexOf(i)||t||this.checkedNodes.splice(this.checkedNodes.indexOf(i),1))},l.prototype.updateChildIndeterminate=function(e,i,s,n,o){for(var r=0,l=0;l<e.length;l++){var a=e[l][this.fields.id]?e[l][this.fields.id].toString():"";-1!==this.checkedNodes.indexOf(a)&&r++;var d=this.element.querySelector('[data-uid="'+i+'"]'),h=d?t.select(".e-stop",d):null,c=d?t.select("."+Ce,d):null,p=this.element.querySelector('[data-uid="'+a+'"]'),u=p?t.select("."+Ce,p):null;if(-1!==this.checkedNodes.indexOf(s)&&d&&a===s&&this.autoCheck)this.changeState(d,"indeterminate",null);else if(-1!==this.checkedNodes.indexOf(s)||!d||p||a!==s||n){if(-1===this.checkedNodes.indexOf(s)&&p&&a===s&&!n)this.changeState(p,"uncheck",null);else if(-1===this.checkedNodes.indexOf(s)&&h&&a===s&&this.autoCheck&&0===r&&!n)h.classList.remove("e-stop");else if(-1===this.checkedNodes.indexOf(s)&&!p&&c&&a===s&&0===r)this.changeState(d,"uncheck",null);else if(-1===this.checkedNodes.indexOf(a)&&p&&u&&0===r)this.changeState(p,"uncheck",null);else if(!p&&!d&&a===s||-1!==this.parentNodeCheck.indexOf(i)&&this.autoCheck){var f=this.element.querySelector('[data-uid="'+o+'"]');n&&0!==r?this.changeState(f,"indeterminate",null):n&&r===e.length&&-1===this.checkedNodes.indexOf(i)?this.checkedNodes.push(i):n||0!==r||-1===this.parentNodeCheck.indexOf(i)||this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(i)),-1===this.parentNodeCheck.indexOf(i)&&this.parentNodeCheck.push(i)}}else this.autoCheck?this.changeState(d,"uncheck",null):0!==r?this.changeState(d,"indeterminate",null):this.changeState(d,"uncheck",null);var m=t.getValue(this.fields.child.toString(),e[l]);m&&this.updateChildIndeterminate(m,a,s,n,o)}},l.prototype.changeState=function(e,i,s,n,o,r){var l,a=this,d=t.closest(e,"."+de);n?this.nodeCheckAction(e,i,d,l,s,n,o,r):(this.checkActionNodes=[],l=this.getCheckEvent(d,i,s),this.trigger("nodeChecking",l,function(t){t.cancel||a.nodeCheckAction(e,i,d,t,s,n,o,r)}))},l.prototype.nodeCheckAction=function(e,i,s,n,o,r,l,a){var d,h=e.getElementsByClassName("e-frame")[0];if("check"!==i||h.classList.contains(Ce)?"uncheck"===i&&(h.classList.contains(Ce)||h.classList.contains("e-stop"))?(t.removeClass([h],[Ce,"e-stop"]),this.removeCheck(s),d="false"):"indeterminate"===i&&!h.classList.contains("e-stop")&&this.autoCheck&&(h.classList.remove(Ce),h.classList.add("e-stop"),this.removeCheck(s),d="mixed"):(h.classList.remove("e-stop"),h.classList.add(Ce),this.addCheck(s),d="true"),d="check"===i?"true":"uncheck"===i?"false":d,t.isNullOrUndefined(d)||e.setAttribute("aria-checked",d),l){var c=[].concat([],this.checkActionNodes);n=this.getCheckEvent(s,i,o),t.isUndefined(r)&&(n.data=c)}void 0!==a&&this.ensureStateChange(s,a),r||t.isNullOrUndefined(d)||(e.setAttribute("aria-checked",d),n.data[0].checked=d,this.trigger("nodeChecked",n),this.checkActionNodes=[])},l.prototype.addCheck=function(e){var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.checkedNodes.indexOf(i)||this.checkedNodes.push(i)},l.prototype.removeCheck=function(e){var t=this.checkedNodes.indexOf(e.getAttribute("data-uid"));t>-1&&this.checkedNodes.splice(t,1)},l.prototype.getCheckEvent=function(e,i,s){this.checkActionNodes.push(this.getNodeData(e));var n=this.checkActionNodes;return{action:i,cancel:!1,isInteracted:!t.isNullOrUndefined(s),node:e,data:n}},l.prototype.finalize=function(){t.select("."+ce,this.element).setAttribute("role",xe.treeRole),this.setMultiSelect(this.allowMultiSelection);var e=t.select("."+de,this.element);e&&(t.addClass([e],Ee),this.updateIdAttr(null,e)),this.hasPid=!!this.rootData[0]&&this.rootData[0].hasOwnProperty(this.fields.parentID),this.doExpandAction()},l.prototype.doExpandAction=function(){var e=this.expandedNodes;if(this.isInitalExpand&&e.length>0)if(this.setProperties({expandedNodes:[]},!0),this.fields.dataSource instanceof o.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName)this.expandGivenNodes(e);else{for(var i=0;i<e.length;i++){var s=t.select('[data-uid="'+e[i]+'"]',this.element);if(t.isNullOrUndefined(s))e[i]&&-1===this.expandChildren.indexOf(e[i])&&this.expandChildren.push(e[i].toString());else{var n=t.select("."+ae,t.select("."+ge,s));t.isNullOrUndefined(n)||this.expandAction(s,n,null)}}this.afterFinalized()}else this.afterFinalized()},l.prototype.expandGivenNodes=function(e){var t=this;this.expandCallback(e[this.index],function(){++t.index<e.length?t.expandGivenNodes(e):t.afterFinalized()})},l.prototype.expandCallback=function(e,i){var s=t.select('[data-uid="'+e+'"]',this.element);if(t.isNullOrUndefined(s))i();else{var n=t.select("."+ae,t.select("."+ge,s));t.isNullOrUndefined(n)?i():this.expandAction(s,n,null,!1,i)}},l.prototype.afterFinalized=function(){if(this.doSelectionAction(),this.updateCheckedProp(),this.isAnimate=!0,this.isInitalExpand=!1,!this.isLoaded||this.isFieldChange){var e={data:this.treeData};this.trigger("dataBound",e)}this.isLoaded=!0},l.prototype.doSelectionAction=function(){var e=t.selectAll(".e-selected",this.element),i=this.selectedNodes;if(i.length>0){this.setProperties({selectedNodes:[]},!0);for(var s=0;s<i.length;s++){var n=t.select('[data-uid="'+i[s]+'"]',this.element);if(n&&!n.classList.contains("e-active")?this.selectNode(n,null,!0):this.selectedNodes.push(i[s]),!this.allowMultiSelection)break}}else this.selectGivenNodes(e);t.removeClass(e,"e-selected")},l.prototype.selectGivenNodes=function(e){for(var t=0;t<e.length&&(e[t].classList.contains("e-disable")||this.selectNode(e[t],null,!0),this.allowMultiSelection);t++);},l.prototype.clickHandler=function(e){var i=e.originalEvent.target;if(t.EventHandler.remove(this.element,"contextmenu",this.preventContextMenu),i&&!this.dragStartAction){var s=i.classList,n=t.closest(i,"."+de);if(n){if(this.removeHover(),this.setFocusElement(n),this.showCheckBox&&!n.classList.contains("e-disable")){var o=t.closest(i,"."+Ne);if(!t.isNullOrUndefined(o)){var r=t.select(".e-frame",o);return this.validateCheckNode(o,r.classList.contains(Ce),n,e.originalEvent),void this.triggerClickEvent(e.originalEvent,n)}}s.contains(ae)?this.expandAction(n,i,e):s.contains(le)?this.collapseNode(n,i,e):s.contains(ce)||s.contains(de)||this.toggleSelect(n,e.originalEvent,!1),this.triggerClickEvent(e.originalEvent,n)}}},l.prototype.nodeCheckedEvent=function(e,i,s){t.closest(e,"."+de);var n=this.getCheckEvent(e,i?"uncheck":"check",s);n.data=n.data.splice(0,n.data.length-1),this.trigger("nodeChecked",n)},l.prototype.triggerClickEvent=function(e,t){var i={event:e,node:t};this.trigger("nodeClicked",i)},l.prototype.expandNode=function(e,i,s){var n=this;if(i.classList.contains(fe)&&this.hideSpinner(i),this.initialRender||i.classList.add("interaction"),!0!==s||!0===s&&e.classList.contains("e-expanded")){if(!0!==this.preventExpand){t.removeClass([i],ae),t.addClass([i],le);var r=0,l=0,a=this,d=t.select("."+ce,e),h=e;this.setHeight(h,d);var c=t.select(".e-list-item."+ue,e);this.isAnimate?this.aniObj.animate(d,{name:this.animation.expand.effect,duration:this.animation.expand.duration,timingFunction:this.animation.expand.easing,begin:function(i){h.style.overflow="hidden",!t.isNullOrUndefined(c)&&c instanceof HTMLElement&&c.classList.add("e-animation-active"),r=h.offsetHeight,l=t.select("."+ge,e).offsetHeight},progress:function(e){e.element.style.display="block",a.animateHeight(e,r,l)},end:function(e){e.element.style.display="block",!t.isNullOrUndefined(c)&&c instanceof HTMLElement&&c.classList.remove("e-animation-active"),n.expandedNode(h,d,i)}}):this.expandedNode(h,d,i)}}else t.select("."+ce,e).style.display="none",this.fields.dataSource instanceof o.DataManager==!0&&(this.preventExpand=!1);this.initialRender&&i.classList.add("interaction")},l.prototype.expandedNode=function(e,i,s){i.style.display="block",e.style.display="block",e.style.overflow="",e.style.height="",t.removeClass([s],me),this.addExpand(e),this.isLoaded&&this.expandArgs&&(this.expandArgs=this.getExpandEvent(e,null),this.trigger("nodeExpanded",this.expandArgs))},l.prototype.addExpand=function(e){e.setAttribute("aria-expanded","true"),t.removeClass([e],"e-node-collapsed");var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.expandedNodes.indexOf(i)||(this.isBlazorPlatform?this.setProperties({expandedNodes:[].concat([],this.expandedNodes,[i])},!0):this.expandedNodes.push(i))},l.prototype.collapseNode=function(e,i,s){var n=this;if(!i.classList.contains(me)){t.addClass([i],me);var o;this.isLoaded?(o=this.getExpandEvent(e,s),this.trigger("nodeCollapsing",o,function(s){s.cancel?t.removeClass([i],me):n.nodeCollapseAction(e,i,s)})):this.nodeCollapseAction(e,i,o)}},l.prototype.nodeCollapseAction=function(e,i,s){var n=this;t.removeClass([i],le),t.addClass([i],ae);var o=0,r=0,l=this,a=t.select("."+ce,e),d=e,h=t.select(".e-list-item."+ue,e);this.isAnimate?this.aniObj.animate(a,{name:this.animation.collapse.effect,duration:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing,begin:function(i){d.style.overflow="hidden",!t.isNullOrUndefined(h)&&h instanceof HTMLElement&&h.classList.add("e-animation-active"),o=t.select("."+ge,e).offsetHeight,r=d.offsetHeight},progress:function(e){l.animateHeight(e,o,r)},end:function(e){e.element.style.display="none",!t.isNullOrUndefined(h)&&h instanceof HTMLElement&&h.classList.remove("e-animation-active"),n.collapsedNode(d,a,i,s)}}):this.collapsedNode(d,a,i,s)},l.prototype.collapsedNode=function(e,i,s,n){i.style.display="none",e.style.overflow="",e.style.height="",t.removeClass([s],me),this.removeExpand(e),this.isLoaded&&this.trigger("nodeCollapsed",n)},l.prototype.removeExpand=function(e,t){t?e.removeAttribute("aria-expanded"):this.disableExpandAttr(e);var i=this.expandedNodes.indexOf(e.getAttribute("data-uid"));if(i>-1)if(this.isBlazorPlatform){var s=this.expandedNodes.slice(0);s.splice(i,1),this.setProperties({expandedNodes:[].concat([],s)},!0)}else this.expandedNodes.splice(i,1)},l.prototype.disableExpandAttr=function(e){e.setAttribute("aria-expanded","false"),t.addClass([e],"e-node-collapsed")},l.prototype.setHeight=function(e,t){t.style.display="block",t.style.visibility="hidden",e.style.height=e.offsetHeight+"px",t.style.display="none",t.style.visibility=""},l.prototype.animateHeight=function(e,t,i){var s=(i-t)*((e.duration-e.timeStamp)/e.duration)+t;e.element.parentElement.style.height=s+"px"},l.prototype.renderChildNodes=function(e,s,n,r){var l=this,a=t.select("div."+ve,e);if(!t.isNullOrUndefined(a)){this.showSpinner(a);var d;if(this.fields.dataSource instanceof o.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName){var h=this.parents(e,"."+ce).length,c=this.getChildFields(this.fields,h,1);if(t.isNullOrUndefined(c)||t.isNullOrUndefined(c.dataSource))return t.detach(a),void this.removeExpand(e,!0);this.treeList.push("false"),this.fields.dataSource instanceof o.DataManager&&this.fields.dataSource.dataSource.offline||this.fields.dataSource instanceof o.DataManager&&!this.loadOnDemand?(this.treeList.pop(),d=this.getChildNodes(this.treeData,e.getAttribute("data-uid")),this.loadChild(d,c,a,e,s,n,r),this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate()):this.fields.dataSource instanceof o.DataManager&&this.loadOnDemand&&c.dataSource.executeQuery(this.getQuery(c,e.getAttribute("data-uid"))).then(function(t){l.treeList.pop(),d=t.result,1===l.dataType&&(l.dataType=2),l.loadChild(d,c,a,e,s,n,r),l.nodeTemplate&&l.isBlazorPlatform&&!l.isStringTemplate&&l.updateBlazorTemplate()})}else{if(d=this.getChildNodes(this.treeData,e.getAttribute("data-uid")),this.currentLoadData=d,t.isNullOrUndefined(d)||0===d.length)return t.detach(a),void this.removeExpand(e,!0);this.listBaseOption.ariaAttributes.level=parseFloat(e.getAttribute("aria-level"))+1,e.appendChild(i.ListBase.createList(this.createElement,this.getSortedData(d),this.listBaseOption)),this.expandNode(e,a,r),this.setSelectionForChildNodes(d),this.ensureCheckNode(e),this.finalizeNode(e),this.loadOnDemand&&this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate(),this.disableTreeNodes(d),this.renderSubChild(e,s,r)}}},l.prototype.loadChild=function(e,s,n,r,l,a,d){if(this.currentLoadData=e,t.isNullOrUndefined(e)||0===e.length)t.detach(n),this.removeExpand(r,!0);else{if(this.updateListProp(s),this.fields.dataSource instanceof o.DataManager&&!this.fields.dataSource.dataSource.offline){var h=r.getAttribute("data-uid"),c=this.getNodeObject(h);t.setValue("child",e,c)}this.listBaseOption.ariaAttributes.level=parseFloat(r.getAttribute("aria-level"))+1,r.appendChild(i.ListBase.createList(this.createElement,e,this.listBaseOption)),this.expandNode(r,n,d),this.setSelectionForChildNodes(e),this.ensureCheckNode(r),this.finalizeNode(r),this.disableTreeNodes(e),this.renderSubChild(r,l,d)}a&&a(),0!==this.treeList.length||this.isLoaded||this.finalize()},l.prototype.disableTreeNodes=function(e){for(var t=0;t<e.length;){var i=e[t][this.fields.id].toString();void 0!==this.disableNode&&-1!==this.disableNode.indexOf(i)&&this.doDisableAction([i]),t++}},l.prototype.setSelectionForChildNodes=function(e){var t;for(t=0;t<e.length;t++){var i=e[t][this.fields.id].toString();void 0!==this.selectedNodes&&-1!==this.selectedNodes.indexOf(i)&&this.doSelectionAction()}},l.prototype.ensureCheckNode=function(e){this.showCheckBox&&(this.ele=this.checkedElement?this.checkedElement.indexOf(e.getAttribute("data-uid")):null,this.autoCheck&&(this.ensureChildCheckState(e),this.ensureParentCheckState(e))),this.currentLoadData=null},l.prototype.getFields=function(e,t,i){return t===i?e:this.getFields(this.getChildMapper(e),t,i+1)},l.prototype.getChildFields=function(e,t,i){return t===i?this.getChildMapper(e):this.getChildFields(this.getChildMapper(e),t,i+1)},l.prototype.getChildMapper=function(e){return"string"==typeof e.child||t.isNullOrUndefined(e.child)?e:e.child},l.prototype.getChildNodes=function(e,i,s){void 0===s&&(s=!1);var n;if(t.isNullOrUndefined(e))return n;if(1===this.dataType)return this.getChildGroup(this.groupedData,i,s);if("string"==typeof this.fields.child)for(var o=0,r=e.length;o<r;o++){var l=t.getValue(this.fields.id,e[o]);if(l&&l.toString()===i)return t.getValue(this.fields.child,e[o]);if(!t.isNullOrUndefined(t.getValue(this.fields.child,e[o]))&&void 0!==(n=this.getChildNodes(t.getValue(this.fields.child,e[o]),i)))break}return n},l.prototype.getChildGroup=function(e,i,s){if(!t.isNullOrUndefined(e))for(var n=0,o=e.length;n<o;n++){if(t.isNullOrUndefined(e[n][0])||t.isNullOrUndefined(t.getValue(this.fields.parentID,e[n][0])))return s?e[n]:[];if(t.getValue(this.fields.parentID,e[n][0]).toString()===i)return e[n]}},l.prototype.renderSubChild=function(e,i,s){if(i)for(var n=t.selectAll("."+ae,e),o=0,r=n.length;o<r;o++){var l=n[o];if(e.querySelector(".e-icons")!==n[o]){var a=t.closest(l,"."+de);this.expandArgs=this.getExpandEvent(a,null),!0!==s&&this.trigger("nodeExpanding",this.expandArgs),this.renderChildNodes(a,i,null,s)}}},l.prototype.toggleSelect=function(e,t,i){e.classList.contains("e-disable")||(this.allowMultiSelection&&(t&&t.ctrlKey||i)&&this.isActive(e)?this.unselectNode(e,t):this.selectNode(e,t,i))},l.prototype.isActive=function(e){return!!e.classList.contains(ue)},l.prototype.selectNode=function(e,i,s){var n=this;if(t.isNullOrUndefined(e)||!this.allowMultiSelection&&this.isActive(e)&&!t.isNullOrUndefined(i))return void this.setFocusElement(e);var o;this.isLoaded?(o=this.getSelectEvent(e,"select",i),this.trigger("nodeSelecting",o,function(t){t.cancel||n.nodeSelectAction(e,i,t,s)})):this.nodeSelectAction(e,i,o,s)},l.prototype.nodeSelectAction=function(e,i,s,n){if(this.allowMultiSelection&&(n||i&&(!i||i.ctrlKey))||this.removeSelectAll(),this.allowMultiSelection&&i&&i.shiftKey){this.startNode||(this.startNode=e);var o=this.liList.indexOf(this.startNode),r=this.liList.indexOf(e);if(o>r){var l=o;o=r,r=l}for(var a=o;a<=r;a++){var d=this.liList[a];t.isVisible(d)&&!d.classList.contains("e-disable")&&this.addSelect(d)}}else this.startNode=e,this.addSelect(e);this.setFocusElement(e),this.isLoaded&&(s.nodeData=this.getNodeData(e),this.trigger("nodeSelected",s))},l.prototype.unselectNode=function(e,t){var i,s=this;this.isLoaded?(i=this.getSelectEvent(e,"un-select",t),this.trigger("nodeSelecting",i,function(t){t.cancel||s.nodeUnselectAction(e,t)})):this.nodeUnselectAction(e,i)},l.prototype.nodeUnselectAction=function(e,t){this.removeSelect(e),this.setFocusElement(e),this.isLoaded&&(t.nodeData=this.getNodeData(e),this.trigger("nodeSelected",t))},l.prototype.setFocusElement=function(e){if(!t.isNullOrUndefined(e)){var i=this.getFocusedNode();i&&t.removeClass([i],Ee),t.addClass([e],Ee),this.updateIdAttr(i,e)}},l.prototype.addSelect=function(e){e.setAttribute("aria-selected","true"),t.addClass([e],ue);var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.selectedNodes.indexOf(i)||this.selectedNodes.push(i)},l.prototype.removeSelect=function(e){this.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),t.removeClass([e],ue);var i=this.selectedNodes.indexOf(e.getAttribute("data-uid"));i>-1&&this.selectedNodes.splice(i,1)},l.prototype.removeSelectAll=function(){for(var e=this.element.querySelectorAll("."+ue),i=0,s=e;i<s.length;i++){var n=s[i];this.allowMultiSelection?n.setAttribute("aria-selected","false"):n.removeAttribute("aria-selected")}t.removeClass(e,ue),this.setProperties({selectedNodes:[]},!0)},l.prototype.getSelectEvent=function(e,i,s){var n=this.getNodeData(e);return{action:i,cancel:!1,isInteracted:!t.isNullOrUndefined(s),node:e,nodeData:n}},l.prototype.setExpandOnType=function(){this.expandOnType="Auto"===this.expandOn?t.Browser.isDevice?"Click":"DblClick":this.expandOn},l.prototype.expandHandler=function(e){var i=e.originalEvent.target;!i||i.classList.contains("e-input")||i.classList.contains(re)||i.classList.contains(ce)||i.classList.contains(de)||i.classList.contains(ve)||this.showCheckBox&&t.closest(i,"."+Ne)||this.expandCollapseAction(t.closest(i,"."+de),e)},l.prototype.expandCollapseAction=function(e,i){var s=t.select("div."+ve,e);if(s&&!s.classList.contains(me)){var n=s.classList;n.contains(ae)?this.expandAction(e,s,i):n.contains(le)&&this.collapseNode(e,s,i)}},l.prototype.expandAction=function(e,i,s,n,o){var r=this;i.classList.contains(me)||(t.addClass([i],me),this.isLoaded?(this.expandArgs=this.getExpandEvent(e,s),this.trigger("nodeExpanding",this.expandArgs,function(s){s.cancel?t.removeClass([i],me):r.nodeExpandAction(e,i,n,o)})):this.nodeExpandAction(e,i,n,o))},l.prototype.nodeExpandAction=function(e,i,s,n){var o=t.select("."+ce,e);if(o&&"UL"===o.nodeName)this.expandNode(e,i);else{this.renderChildNodes(e,s,n);for(var r=t.selectAll("."+de,e),l=0;l<r.length;l++){var a=this.getId(r[l]);if(-1!==this.expandChildren.indexOf(a)&&void 0!==this.expandChildren){var d=t.select("."+ae,t.select("."+ge,r[l]));t.isNullOrUndefined(d)||this.expandAction(r[l],d,null),this.expandChildren.splice(this.expandChildren.indexOf(a),1)}}}},l.prototype.keyActionHandler=function(e){var i=this,s=e.target,n=this.getFocusedNode();if(s&&s.classList.contains("e-input")){var o=s;return void("enter"===e.action?(o.blur(),this.element.focus(),t.addClass([n],pe)):"escape"===e.action&&(o.value=this.oldText,o.blur(),this.element.focus(),t.addClass([n],pe)))}e.preventDefault();var r={cancel:!1,event:e,node:n};this.trigger("keyPress",r,function(s){if(!s.cancel)switch(e.action){case"space":i.showCheckBox&&i.checkNode(e);break;case"moveRight":i.openNode(!i.enableRtl,e);break;case"moveLeft":i.openNode(!!i.enableRtl,e);break;case"shiftDown":i.shiftKeySelect(!0,e);break;case"moveDown":case"ctrlDown":case"csDown":i.navigateNode(!0);break;case"shiftUp":i.shiftKeySelect(!1,e);break;case"moveUp":case"ctrlUp":case"csUp":i.navigateNode(!1);break;case"home":case"shiftHome":case"ctrlHome":case"csHome":i.navigateRootNode(!0);break;case"end":case"shiftEnd":case"ctrlEnd":case"csEnd":i.navigateRootNode(!1);break;case"enter":case"ctrlEnter":case"shiftEnter":case"csEnter":i.toggleSelect(n,e);break;case"f2":i.allowEditing&&!n.classList.contains("e-disable")&&i.createTextbox(n,e);break;case"ctrlA":if(i.allowMultiSelection){var o=t.selectAll(".e-list-item:not(.e-active)",i.element);i.selectGivenNodes(o)}}})},l.prototype.navigateToFocus=function(e){var i=this.getFocusedNode().querySelector("."+ge),s=i.getBoundingClientRect(),n=this.getScrollParent(this.element);if(!t.isNullOrUndefined(n)){var o=n.getBoundingClientRect();s.bottom>o.bottom?n.scrollTop+=s.bottom-o.bottom:s.top<o.top&&(n.scrollTop-=o.top-s.top)}this.isVisibleInViewport(i)||i.scrollIntoView(e)},l.prototype.isVisibleInViewport=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},l.prototype.getScrollParent=function(e){return t.isNullOrUndefined(e)?null:e.scrollHeight>e.clientHeight?e:this.getScrollParent(e.parentElement)},l.prototype.shiftKeySelect=function(e,t){if(this.allowMultiSelection){var i=this.getFocusedNode(),s=e?this.getNextNode(i):this.getPrevNode(i);this.removeHover(),this.setFocusElement(s),this.toggleSelect(s,t,!1),this.navigateToFocus(!e)}else this.navigateNode(e)},l.prototype.checkNode=function(e){var i=this.getFocusedNode(),s=t.select("."+Ne,i),n=t.select(" .e-frame",s).classList.contains(Ce);i.classList.contains("e-disable")||0==i.getElementsByClassName("e-checkbox-disabled").length&&this.validateCheckNode(s,n,i,e)},l.prototype.validateCheckNode=function(e,i,s,n){var o=this,r=t.closest(e,"."+de);this.checkActionNodes=[];var l=i?"false":"true";t.isNullOrUndefined(l)||e.setAttribute("aria-checked",l);var a=this.getCheckEvent(r,i?"uncheck":"check",n);this.trigger("nodeChecking",a,function(t){t.cancel||o.nodeCheckingAction(e,i,s,t,n)})},l.prototype.nodeCheckingAction=function(e,i,s,n,o){if(-1===this.checkedElement.indexOf(s.getAttribute("data-uid"))){this.checkedElement.push(s.getAttribute("data-uid"));var r=this.getChildNodes(this.treeData,s.getAttribute("data-uid"));null!==r?this.allCheckNode(r,this.checkedElement,null,null,!1):r=null}if(this.changeState(e,i?"uncheck":"check",o,!0),this.autoCheck){this.ensureChildCheckState(s),this.ensureParentCheckState(t.closest(t.closest(s,"."+ce),"."+de));var l=void 0;"check"===n.action?l=!0:"uncheck"===n.action&&(l=!1),this.ensureStateChange(s,l)}this.nodeCheckedEvent(e,i,o)},l.prototype.ensureStateChange=function(e,i){var s=t.select("."+ce,e),n=e.getAttribute("data-uid"),r=this.fields;if(1===this.dataType&&this.autoCheck)for(var l=new o.DataManager(this.treeData).executeLocal((new o.Query).where(r.parentID,"equal",n,!0)),a=0;a<l.length;a++){var d=l[a][this.fields.id]?l[a][this.fields.id].toString():null,h=l[a][this.fields.isChecked]?l[a][this.fields.isChecked].toString():null;if(-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(d)){this.checkedNodes.push(d);p=this.getChildNodes(this.treeData,d);this.getChildItems(p,i),-1!==this.parentNodeCheck.indexOf(d)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(d),1)}else if(-1===this.checkedNodes.indexOf(n)&&null===s&&-1!==this.checkedNodes.indexOf(d)){if(this.checkedNodes.splice(this.checkedNodes.indexOf(d),1),"true"===h&&this.updateField(this.treeData,this.fields,d,"isChecked",null),-1===this.checkedNodes.indexOf(n)&&null===s||-1!==this.parentNodeCheck.indexOf(d)){var c=this.getChildNodes(this.treeData,d);this.getChildItems(c,i),-1!==this.parentNodeCheck.indexOf(d)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(d),1)}}else{var p=this.getChildNodes(this.treeData,d);this.getChildItems(p,i)}}else if(1!==this.dataType||this.autoCheck)(p=this.getChildNodes(this.treeData,n))&&this.childStateChange(p,n,s,i);else if(i)for(a=0;a<this.treeData.length;a++){var u=this.treeData[a][this.fields.id]?this.treeData[a][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(u)&&this.checkedNodes.push(u)}else{for(var f=new o.DataManager(this.treeData).executeLocal((new o.Query).where(r.isChecked,"equal",!0,!1)),a=0;a<f.length;a++){var m=f[a][this.fields.id]?f[a][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(m)&&this.checkedNodes.splice(this.checkedNodes.indexOf(m),1),this.updateField(this.treeData,this.fields,m,"isChecked",null)}this.checkedNodes=[]}},l.prototype.getChildItems=function(e,t){for(var i=0;i<e.length;i++){var s=e[i][this.fields.id]?e[i][this.fields.id].toString():null,n=e[i][this.fields.isChecked]?e[i][this.fields.isChecked].toString():null;-1===this.checkedNodes.indexOf(s)||t||this.checkedNodes.splice(this.checkedNodes.indexOf(s),1),-1===this.checkedNodes.indexOf(s)&&t&&this.checkedNodes.push(s),"true"!==n||t||this.updateField(this.treeData,this.fields,s,"isChecked",null);var o=this.getChildNodes(this.treeData,s);o.length>0&&this.getChildItems(o,t)}},l.prototype.childStateChange=function(e,t,i,s){for(var n=0;n<e.length;n++){var o=e[n][this.fields.id]?e[n][this.fields.id].toString():"",r=e[n][this.fields.isChecked]?e[n][this.fields.isChecked].toString():null;this.autoCheck?-1!==this.checkedNodes.indexOf(t)&&-1===this.checkedNodes.indexOf(o)?(this.checkedNodes.push(o),-1!==this.parentNodeCheck.indexOf(o)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(o),1)):-1!==this.checkedNodes.indexOf(t)||null!==i||s||(this.checkedNodes.splice(this.checkedNodes.indexOf(o),1),"true"===r&&this.updateField(this.treeData,this.fields,o,"isChecked",null)):this.autoCheck||(s?-1===this.checkedNodes.indexOf(o)&&this.checkedNodes.push(o):(-1!==this.checkedNodes.indexOf(o)&&this.checkedNodes.splice(this.checkedNodes.indexOf(o),1),this.updateField(this.treeData,this.fields,o,"isChecked",null),this.checkedNodes=[]));var l=this.getChildNodes(this.treeData,o);l&&this.childStateChange(l,t,i,s)}},l.prototype.allCheckNode=function(e,i,s,n,o){if(e)for(var r=0;r<e.length;r++){var l=t.getValue(this.fields.id,e[r]),a=this.element.querySelector('[data-uid="'+l+'"]');if(!1!==o&&-1===this.checkedElement.indexOf(l.toString())&&(null===a&&!t.isNullOrUndefined(e[r][this.fields.isChecked])&&-1===i.indexOf(l.toString())||0===n||2===s)&&(!1!==e[r][this.fields.isChecked]||2===s?i.push(l.toString()):n=null,n=!1!==e[r][this.fields.isChecked]||2===s?0:null),-1===i.indexOf(l.toString())&&t.isNullOrUndefined(s)&&i.push(l.toString()),!0===t.getValue(this.fields.hasChildren,e[r])||t.getValue(this.fields.child.toString(),e[r])){var d=t.getValue(this.fields.id,e[r]),h=this.getChildNodes(this.treeData,d.toString());h&&(t.isNullOrUndefined(o)?this.allCheckNode(h,i,s,n):this.allCheckNode(h,i,s,n,o),n=null)}n=null}},l.prototype.openNode=function(e,i){var s=this.getFocusedNode(),n=t.select("div."+ve,s);if(e){if(!n)return;n.classList.contains(ae)?this.expandAction(s,n,i):this.focusNextNode(s,!0)}else if(n&&n.classList.contains(le))this.collapseNode(s,n,i);else{var o=t.closest(t.closest(s,"."+ce),"."+de);if(!o)return;o.classList.contains("e-disable")||(this.setFocus(s,o),this.navigateToFocus(!0))}},l.prototype.navigateNode=function(e){var t=this.getFocusedNode();this.focusNextNode(t,e)},l.prototype.navigateRootNode=function(e){var t=this.getFocusedNode(),i=e?this.getRootNode():this.getEndNode();i.classList.contains("e-disable")||(this.setFocus(t,i),this.navigateToFocus(e))},l.prototype.getFocusedNode=function(){var e,i=t.select(".e-list-item."+Ee,this.element);return t.isNullOrUndefined(i)&&(e=t.select("."+de,this.element)),t.isNullOrUndefined(i)?t.isNullOrUndefined(e)?this.element.firstElementChild:e:i},l.prototype.focusNextNode=function(e,t){var i=t?this.getNextNode(e):this.getPrevNode(e);if(this.setFocus(e,i),this.navigateToFocus(!t),i.classList.contains("e-disable")){var s=i.lastChild;null==i.previousSibling&&i.classList.contains("e-level-1")?this.focusNextNode(i,!0):null==i.nextSibling&&i.classList.contains("e-node-collapsed")?this.focusNextNode(i,!1):null==i.nextSibling&&s.classList.contains("e-text-content")?this.focusNextNode(i,!1):this.focusNextNode(i,t)}},l.prototype.getNextNode=function(e){var i,s=this.liList.indexOf(e);do{if(s++,i=this.liList[s],t.isNullOrUndefined(i))return e}while(!t.isVisible(i));return i},l.prototype.getPrevNode=function(e){var i,s=this.liList.indexOf(e);do{if(s--,i=this.liList[s],t.isNullOrUndefined(i))return e}while(!t.isVisible(i));return i},l.prototype.getRootNode=function(){var e,i=0;do{e=this.liList[i],i++}while(!t.isVisible(e));return e},l.prototype.getEndNode=function(){var e,i=this.liList.length-1;do{e=this.liList[i],i--}while(!t.isVisible(e));return e},l.prototype.setFocus=function(e,i){t.removeClass([e],[pe,Ee]),i.classList.contains("e-disable")||(t.addClass([i],[pe,Ee]),this.updateIdAttr(e,i))},l.prototype.updateIdAttr=function(e,t){this.element.removeAttribute("aria-activedescendant"),e&&e.removeAttribute("id"),t.setAttribute("id",this.element.id+"_active"),this.element.setAttribute("aria-activedescendant",this.element.id+"_active")},l.prototype.focusIn=function(){this.mouseDownStatus||t.addClass([this.getFocusedNode()],pe),this.mouseDownStatus=!1},l.prototype.focusOut=function(){t.removeClass([this.getFocusedNode()],pe)},l.prototype.onMouseOver=function(e){var i=e.target,s=i.classList,n=t.closest(i,"."+de);if(!n||s.contains(ce)||s.contains(de))return void this.removeHover();n&&!n.classList.contains("e-disable")&&this.setHover(n)},l.prototype.setHover=function(e){e.classList.contains(pe)||(this.removeHover(),t.addClass([e],pe))},l.prototype.onMouseLeave=function(e){this.removeHover()},l.prototype.removeHover=function(){var e=t.selectAll("."+pe,this.element);e&&e.length&&t.removeClass(e,pe)},l.prototype.getNodeData=function(e,i){if(!t.isNullOrUndefined(e)&&e.classList.contains(de)&&!t.isNullOrUndefined(t.closest(e,".e-control"))&&t.closest(e,".e-control").classList.contains(re)){var s=e.getAttribute("data-uid"),n=this.getText(e,i),o=t.closest(e.parentNode,"."+de),r=o?o.getAttribute("data-uid"):null,l=e.classList.contains(ue),a="true"===e.getAttribute("aria-expanded"),d=null!==e.getAttribute("aria-expanded"),h=null;return this.showCheckBox&&(h=t.select("."+Ne,e).getAttribute("aria-checked")),{id:s,text:n,parentID:r,selected:l,expanded:a,isChecked:h,hasChildren:d}}return{id:"",text:"",parentID:"",selected:!1,expanded:!1,isChecked:"",hasChildren:!1}},l.prototype.getText=function(e,i){if(i){var s=this.getNodeObject(e.getAttribute("data-uid")),n=parseFloat(e.getAttribute("aria-level")),o=this.getFields(this.fields,n,1);return t.getValue(o.text,s)}return t.select("."+he,e).textContent},l.prototype.getExpandEvent=function(e,i){var s=this.getNodeData(e);return{cancel:!1,isInteracted:!t.isNullOrUndefined(i),node:e,nodeData:s,event:i}},l.prototype.destroyTemplate=function(e){this.clearTemplate(["nodeTemplate"])},l.prototype.reRenderNodes=function(){t.resetBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate"),this.isBlazorPlatform&&this.element.firstElementChild?this.element.removeChild(this.element.firstElementChild):this.element.innerHTML="",t.isNullOrUndefined(this.nodeTemplateFn)||this.destroyTemplate(this.nodeTemplate),this.setTouchClass(),this.setProperties({selectedNodes:[],checkedNodes:[],expandedNodes:[]},!0),this.checkedElement=[],this.isLoaded=!1,this.setDataBinding()},l.prototype.setCssClass=function(e,i){t.isNullOrUndefined(e)||""===e||t.removeClass([this.element],e.split(" ")),t.isNullOrUndefined(i)||""===i||t.addClass([this.element],i.split(" "))},l.prototype.editingHandler=function(e){var i=e.target;if(!(!i||i.classList.contains(re)||i.classList.contains(ce)||i.classList.contains(de)||i.classList.contains(ve)||i.classList.contains("e-input")||i.classList.contains("e-input-group"))){var s=t.closest(i,"."+de);this.createTextbox(s,e)}},l.prototype.createTextbox=function(e,i){var s=this,n=t.select(".e-tree-input",this.element);n&&n.blur();var o=t.select("."+he,e);this.updateOldText(e);var l=this.createElement("input",{className:"e-tree-input",attrs:{value:this.oldText}}),a=this.getEditEvent(e,null,l.outerHTML);this.trigger("nodeEditing",a,function(i){if(!i.cancel){var n="width:"+(o.offsetWidth+5)+"px";t.addClass([e],"e-editing"),o.innerHTML=a.innerHtml;var l=t.select(".e-tree-input",o);s.inputObj=r.Input.createInput({element:l,properties:{enableRtl:s.enableRtl}},s.createElement),s.inputObj.container.setAttribute("style",n),l.focus();var d=l;d.setSelectionRange(0,d.value.length),s.wireInputEvents(l)}})},l.prototype.updateOldText=function(e){var i=e.getAttribute("data-uid");this.editData=this.getNodeObject(i);var s=parseFloat(e.getAttribute("aria-level"));this.editFields=this.getFields(this.fields,s,1),this.oldText=t.getValue(this.editFields.text,this.editData)},l.prototype.inputFocusOut=function(e){if(t.select(".e-tree-input",this.element)){var i=e.target,s=i.value,n=t.closest(i,"."+he),o=t.closest(i,"."+de);t.detach(this.inputObj.container),this.appendNewText(o,n,s,!0)}},l.prototype.appendNewText=function(e,i,s,n){var o=this,r=this.getEditEvent(e,s,null);this.trigger("nodeEdited",r,function(r){s=r.cancel?r.oldText:r.newText;var l=t.setValue(o.editFields.text,s,o.editData);if(t.isNullOrUndefined(o.nodeTemplateFn))i.innerText=s;else{i.innerText="";var a=o.nodeTemplateFn(l,void 0,void 0,o.element.id+"nodeTemplate",o.isStringTemplate);a=Array.prototype.slice.call(a),t.append(a,i),o.updateBlazorTemplate()}n&&(t.removeClass([e],"e-editing"),i.focus()),r.oldText!==s&&o.triggerEvent()})},l.prototype.getElement=function(e){return t.isNullOrUndefined(e)?null:"string"==typeof e?this.element.querySelector('[data-uid="'+e+'"]'):"object"==typeof e?t.getElement(e):null},l.prototype.getId=function(e){return t.isNullOrUndefined(e)?null:"string"==typeof e?e:"object"==typeof e?t.getElement(e).getAttribute("data-uid"):null},l.prototype.getEditEvent=function(e,t,i){return{cancel:!1,newText:t,node:e,nodeData:this.getNodeData(e),oldText:this.oldText,innerHtml:i}},l.prototype.getNodeObject=function(e){if(!t.isNullOrUndefined(e)){if(1!==this.dataType)return this.getChildNodeObject(this.treeData,this.fields,e);for(var i=0,s=this.treeData.length;i<s;i++){var n=t.getValue(this.fields.id,this.treeData[i]);if(!t.isNullOrUndefined(this.treeData[i])&&!t.isNullOrUndefined(n)&&n.toString()===e)return this.treeData[i]}}},l.prototype.getChildNodeObject=function(e,i,s){var n;if(t.isNullOrUndefined(e))return n;for(var r=0,l=e.length;r<l;r++){var a=t.getValue(i.id,e[r]);if(e[r]&&a&&a.toString()===s)return e[r];if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[r]))){if(this.fields.dataSource instanceof o.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[r]))){if(void 0!==(n=this.getChildNodeObject(t.getValue("child",e[r]),this.getChildMapper(i),s)))break}}else{var d=t.getValue(i.child,e[r]);if(void 0!==(n=this.getChildNodeObject(d,this.getChildMapper(i),s)))break}}return n},l.prototype.setDragAndDrop=function(e){e?this.initializeDrag():this.destroyDrag()},l.prototype.initializeDrag=function(){var e,i=this,s=this;this.dragObj=new t.Draggable(this.element,{enableTailMode:!0,enableAutoScroll:!0,dragTarget:"."+ge,helper:function(n){i.dragTarget=n.sender.target;var o=t.closest(i.dragTarget,"."+re),r=t.closest(i.dragTarget,"."+ge);if(i.dragLi=t.closest(i.dragTarget,"."+de),i.fullRowSelect&&!r&&i.dragTarget.classList.contains("e-fullrow")&&(r=i.dragTarget.nextElementSibling),!i.dragTarget||!n.element.isSameNode(o)||!r||i.dragTarget.classList.contains(re)||i.dragTarget.classList.contains(ce)||i.dragTarget.classList.contains(de)||i.dragLi.classList.contains("e-disable"))return!1;var l=r.cloneNode(!0);if(t.isNullOrUndefined(t.select("div."+ve,l))){var a=s.createElement("div",{className:ve+" "+ae});l.insertBefore(a,l.children[0])}var d="e-drag-item "+re+" "+i.cssClass+" "+(i.enableRtl?"e-rtl":"");(e=s.createElement("div",{className:d})).appendChild(l);var h=i.selectedNodes.length;if(h>1&&i.allowMultiSelection&&i.dragLi.classList.contains(ue)){var c=s.createElement("span",{className:"e-drop-count",innerHTML:""+h});e.appendChild(c)}return document.body.appendChild(e),document.body.style.cursor="",i.dragData=i.getNodeData(i.dragLi),e},dragStart:function(s){t.addClass([i.element],"e-dragging");var n,o=t.closest(s.target,".e-list-item");o&&(n=parseInt(o.getAttribute("aria-level"),10));var r=i.getDragEvent(s.event,i,null,s.target,null,e,n);r.draggedNode.classList.contains("e-editing")?(i.dragObj.intDestroy(s.event),i.dragCancelAction(e)):i.trigger("nodeDragStart",r,function(n){n.cancel?(i.dragObj.intDestroy(s.event),i.dragCancelAction(e)):i.dragStartAction=!0,t.isBlazor()&&s.bindEvents(t.getElement(s.dragElement))})},drag:function(s){i.dragObj.setProperties({cursorAt:{top:!t.isNullOrUndefined(s.event.targetTouches)||t.Browser.isDevice?60:-20}}),i.dragAction(s,e)},dragStop:function(e){t.removeClass([i.element],"e-dragging"),i.removeVirtualEle();var s=e.target,n=t.closest(s,".e-droppable");s&&n||(t.detach(e.helper),document.body.style.cursor="");var o,r=t.closest(s,".e-list-item");r&&(o=parseInt(r.getAttribute("aria-level"),10));var l=i.getDragEvent(e.event,i,s,s,null,e.helper,o);l.preventTargetExpand=!1,(i.isBlazorPlatform&&i.dragStartAction||!i.isBlazorPlatform)&&i.trigger("nodeDragStop",l,function(s){i.dragParent=s.draggedParentNode,i.preventExpand=s.preventTargetExpand,s.cancel&&(e.helper.parentNode&&t.detach(e.helper),document.body.style.cursor=""),i.dragStartAction=!1})}}),this.dropObj=new t.Droppable(this.element,{out:function(e){t.isNullOrUndefined(e)||e.target.classList.contains(ye)||(document.body.style.cursor="not-allowed")},over:function(e){document.body.style.cursor=""},drop:function(e){i.dropAction(e)}})},l.prototype.dragCancelAction=function(e){t.detach(e),t.removeClass([this.element],"e-dragging"),this.dragStartAction=!1},l.prototype.dragAction=function(e,i){var s=t.closest(e.target,".e-droppable"),n=t.closest(e.target,"."+ge),o=t.select("div."+ve,i);t.removeClass([o],["e-drop-in",be,"e-drop-out","e-no-drop"]),this.removeVirtualEle(),document.body.style.cursor="";var r=e.target.classList;if(this.fullRowSelect&&!n&&!t.isNullOrUndefined(r)&&r.contains("e-fullrow")&&(n=e.target.nextElementSibling),s){var l=t.closest(e.target,"."+de),a=t.closest(e.target,"."+Ne),d=t.closest(e.target,"."+le),h=t.closest(e.target,"."+ae);if(!s.classList.contains(re)||n&&!l.isSameNode(this.dragLi)&&!this.isDescendant(this.dragLi,l))if(l&&e&&!h&&!d&&e.event.offsetY<7&&!a||h&&e.event.offsetY<5||d&&e.event.offsetX<3){t.addClass([o],be);var c=this.createElement("div",{className:ye}),p=this.fullRowSelect?1:0;l.insertBefore(c,l.children[p])}else if(l&&e&&!h&&!d&&e.target.offsetHeight>0&&e.event.offsetY>e.target.offsetHeight-10&&!a||h&&e.event.offsetY>19||d&&e.event.offsetX>19){t.addClass([o],be);var c=this.createElement("div",{className:ye}),p=this.fullRowSelect?2:1;l.insertBefore(c,l.children[p])}else t.addClass([o],"e-drop-in");else"LI"!==e.target.nodeName||l.isSameNode(this.dragLi)||this.isDescendant(this.dragLi,l)?e.target.classList.contains(ye)?t.addClass([o],be):t.addClass([o],"e-drop-out"):(t.addClass([o],be),this.renderVirtualEle(e))}else t.addClass([o],"e-no-drop"),document.body.style.cursor="not-allowed";var u,f=t.closest(e.target,".e-list-item");f&&(u=parseInt(f.getAttribute("aria-level"),10));var m=this.getDragEvent(e.event,this,e.target,e.target,null,i,u);m.dropIndicator&&t.removeClass([o],m.dropIndicator),this.trigger("nodeDragging",m),m.dropIndicator&&t.addClass([o],m.dropIndicator)},l.prototype.dropAction=function(e){for(var i,s,n=e.event.offsetY,r=e.target,l=!1,d=e.dragData.draggable,h=0;h<d.ej2_instances.length;h++)if(d.ej2_instances[h]instanceof a){i=d.ej2_instances[h];break}if(i&&i.dragTarget){var c=i.dragTarget,p=t.closest(c,"."+de),u=t.closest(r,"."+de);if(null==u&&r.classList.contains(re)&&(u=r.firstElementChild),t.detach(e.droppedElement),document.body.style.cursor="",!u||u.isSameNode(p)||this.isDescendant(p,u))return void(this.fields.dataSource instanceof o.DataManager==!1&&(this.preventExpand=!1));if(i.allowMultiSelection&&p.classList.contains(ue)){var f=t.selectAll("."+ue,i.element);if(e.target.offsetHeight<=33&&n>e.target.offsetHeight-10&&n>6)for(h=f.length-1;h>=0;h--)u.isSameNode(f[h])||this.isDescendant(f[h],u)||this.appendNode(r,f[h],u,e,i,n);else for(h=0;h<f.length;h++)u.isSameNode(f[h])||this.isDescendant(f[h],u)||this.appendNode(r,f[h],u,e,i,n)}else this.appendNode(r,p,u,e,i,n);s=parseInt(p.getAttribute("aria-level"),10),l=!0}this.fields.dataSource instanceof o.DataManager==!1&&(this.preventExpand=!1),this.trigger("nodeDropped",this.getDragEvent(e.event,i,r,e.target,e.dragData.draggedElement,null,s,l)),this.triggerEvent()},l.prototype.appendNode=function(e,i,s,n,o,r){var l=t.closest(e,"."+Ne),a=t.closest(n.target,"."+le),d=t.closest(n.target,"."+ae);i.classList.contains("e-disable")||l||!(d&&n.event.offsetY<5||a&&n.event.offsetX<3||d&&n.event.offsetY>19||a&&n.event.offsetX>19||!d&&!a)?this.dropAsChildNode(i,s,o,null,n,r,!0):"LI"===e.nodeName?this.dropAsSiblingNode(i,s,n,o):e.firstElementChild&&e.classList.contains(re)?"UL"===e.firstElementChild.nodeName&&this.dropAsSiblingNode(i,s,n,o):e.classList.contains("e-icon-collapsible")||e.classList.contains("e-icon-expandable")?this.dropAsSiblingNode(i,s,n,o):this.dropAsChildNode(i,s,o,null,n,r)},l.prototype.dropAsSiblingNode=function(e,i,s,n){var o,r=t.closest(i,"."+ce),l=t.closest(e,"."+ce),a=t.closest(l,"."+de);if(s.target.offsetHeight>0&&s.event.offsetY>s.target.offsetHeight-2?o=!1:s.event.offsetY<2?o=!0:(s.target.classList.contains("e-icon-expandable")||s.target.classList.contains("e-icon-collapsible"))&&(s.event.offsetY<5||s.event.offsetX<3?o=!0:(s.event.offsetY>15||s.event.offsetX>17)&&(o=!1)),s.target.classList.contains("e-icon-expandable")||s.target.classList.contains("e-icon-collapsible")){var d=s.target.closest("li");r.insertBefore(e,o?d:d.nextElementSibling)}else r.insertBefore(e,o?s.target:s.target.nextElementSibling);this.moveData(e,i,r,o,n),this.updateElement(l,a),this.updateAriaLevel(e),n.element.id===this.element.id?this.updateList():(n.updateInstance(),this.updateInstance())},l.prototype.dropAsChildNode=function(e,i,s,n,o,r,l){var a=t.closest(e,"."+ce),d=t.closest(a,"."+de),h=t.closest(i,"."+ce);if(o&&r<7&&!l)h.insertBefore(e,i),this.moveData(e,i,h,!0,s);else if(o&&o.target.offsetHeight>0&&r>o.target.offsetHeight-10&&!l)h.insertBefore(e,i.nextElementSibling),this.moveData(e,i,h,!1,s);else{var c=this.expandParent(i),p=c.childNodes[n];c.insertBefore(e,p),this.moveData(e,p,c,!0,s)}this.updateElement(a,d),this.updateAriaLevel(e),s.element.id===this.element.id?this.updateList():(s.updateInstance(),this.updateInstance())},l.prototype.moveData=function(e,i,s,n,o){var r=t.closest(s,"."+de),l=this.getId(e),a=o.updateChildField(o.treeData,o.fields,l,null,null,!0),d=this.getId(i),h=this.getDataPos(this.treeData,this.fields,d),c=this.getId(r);if(1===this.dataType){this.updateField(this.treeData,this.fields,c,"hasChildren",!0);var p=t.isNullOrUndefined(h)?this.treeData.length:n?h:h+1;if(t.isNullOrUndefined(c)&&!this.hasPid)delete a[0][this.fields.parentID];else{var u=this.isNumberTypeId?parseFloat(c):c;t.setValue(this.fields.parentID,u,a[0])}if(this.treeData.splice(p,0,a[0]),o.element.id!==this.element.id){var f=o.removeChildNodes(l);p++;for(var m=0,v=f.length;m<v;m++)this.treeData.splice(p,0,f[m]),p++;o.groupedData=o.getGroupedData(o.treeData,o.fields.parentID)}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}else this.addChildData(this.treeData,this.fields,c,a,n?h:h+1)},l.prototype.expandParent=function(e){var s=t.select("div."+ve,e);s&&s.classList.contains(ae)&&!0!==this.preventExpand&&this.expandAction(e,s,null);var n=t.select("."+ce,e);if(!0===this.preventExpand&&!n&&s&&this.renderChildNodes(e),n=t.select("."+ce,e),t.isNullOrUndefined(n)||!0!==this.preventExpand||(n.style.display="none"),t.isNullOrUndefined(n)||!1!==this.preventExpand||(n.style.display="block"),t.isNullOrUndefined(n)&&!0===this.preventExpand&&(t.isNullOrUndefined(s)&&i.ListBase.generateIcon(this.createElement,e,ae,this.listBaseOption),(o=t.select("div."+ve,e))&&o.classList.add("e-icon-expandable"),n=i.ListBase.generateUL(this.createElement,[],null,this.listBaseOption),e.appendChild(n),o?t.removeClass([o],le):i.ListBase.generateIcon(this.createElement,e,ae,this.listBaseOption),e.setAttribute("aria-expanded","false"),n.style.display="none"),t.isNullOrUndefined(n)){this.trigger("nodeExpanding",this.getExpandEvent(e,null)),t.isNullOrUndefined(s)&&i.ListBase.generateIcon(this.createElement,e,le,this.listBaseOption);var o=t.select("div."+ve,e);o?t.removeClass([o],ae):(i.ListBase.generateIcon(this.createElement,e,le,this.listBaseOption),o=t.select("div."+ve,e),t.removeClass([o],ae)),n=i.ListBase.generateUL(this.createElement,[],null,this.listBaseOption),e.appendChild(n),this.addExpand(e),this.trigger("nodeExpanded",this.getExpandEvent(e,null))}return n},l.prototype.updateElement=function(e,i){if(i&&0===e.childElementCount){var s=t.select("div."+ve,i);t.detach(e),t.detach(s);var n=this.getId(i);this.updateField(this.treeData,this.fields,n,"hasChildren",!1),this.removeExpand(i,!0)}},l.prototype.updateAriaLevel=function(e){var i=this.parents(e,"."+ce).length;e.setAttribute("aria-level",""+i),this.updateChildAriaLevel(t.select("."+ce,e),i+1)},l.prototype.updateChildAriaLevel=function(e,i){if(!t.isNullOrUndefined(e))for(var s=e.childNodes,n=0,o=s.length;n<o;n++){var r=s[n];r.setAttribute("aria-level",""+i),this.updateChildAriaLevel(t.select("."+ce,r),i+1)}},l.prototype.renderVirtualEle=function(e){var t;e.event.offsetY>e.target.offsetHeight-2?t=!1:e.event.offsetY<2&&(t=!0);var i=this.createElement("div",{className:ye}),s=this.fullRowSelect?t?1:2:t?0:1;e.target.insertBefore(i,e.target.children[s])},l.prototype.removeVirtualEle=function(){var e=t.select("."+ye);e&&t.detach(e)},l.prototype.destroyDrag=function(){this.dragObj&&this.dropObj&&(this.dragObj.destroy(),this.dropObj.destroy())},l.prototype.getDragEvent=function(e,i,s,n,r,l,a,d){var h=s?t.closest(s,"."+de):null,c=h?this.getNodeData(h):null,p=i?i.dragLi:r,u=i?i.dragData:null,f=s?this.parents(s,"."+de):null,m=i.dragLi.parentElement,v=i.dragLi?t.closest(m,"."+de):null,g=null,y=null,b=[be,"e-drop-in","e-drop-out","e-no-drop"],C=null,N=!0===d?p:h,E=N?t.closest(N,".e-list-parent"):null,x=0;if(v=i.dragLi&&null===v?t.closest(m,"."+re):v,v=!0===d?this.dragParent:v,l)for(;x<4;){if(t.select("."+ve,l).classList.contains(b[x])){C=b[x];break}x++}if(E){var O=0;for(x=0;x<E.childElementCount;x++){if(O=!0!==d&&E.children[x]===p&&h!==p?++O:O,!0!==d&&E.children[x].classList.contains("e-hover")){y=e.offsetY>=23?x+1:x;break}if(E.children[x]===N){e.offsetY,y=x;break}}y=0!==O?--y:y}if(s&&(g=0===f.length?null:s.classList.contains(de)?f[0]:f[1]),h===p&&(g=h),s&&n.offsetHeight<=33&&e.offsetY<n.offsetHeight-10&&e.offsetY>6&&(g=h,!0!==d)){a=++a;var w=g?t.select(".e-list-parent",g):null;if(y=w?w.children.length:0,!(this.fields.dataSource instanceof o.DataManager)&&null===w&&g){var k=g.hasAttribute("data-uid")?this.getChildNodes(this.fields.dataSource,g.getAttribute("data-uid").toString()):null;y=k?k.length:0}}return{cancel:!1,clonedNode:l,event:e,draggedNode:p,draggedNodeData:u,droppedNode:h,droppedNodeData:c,dropIndex:y,dropLevel:a,draggedParentNode:v,dropTarget:g,dropIndicator:C,target:n}},l.prototype.addFullRow=function(e){var i=this.liList.length;if(e)for(s=0;s<i;s++)this.createFullRow(this.liList[s]);else for(var s=0;s<i;s++){var n=t.select(".e-fullrow",this.liList[s]);t.detach(n)}},l.prototype.createFullRow=function(e){var t=this.createElement("div",{className:"e-fullrow"});e.insertBefore(t,e.childNodes[0])},l.prototype.addMultiSelect=function(e){if(e)for(var i=0,s=n=t.selectAll('.e-list-item:not([aria-selected="true"])',this.element);i<s.length;i++)(l=s[i]).setAttribute("aria-selected","false");else for(var n=t.selectAll('.e-list-item[aria-selected="false"]',this.element),o=0,r=n;o<r.length;o++){var l=r[o];l.removeAttribute("aria-selected")}},l.prototype.collapseByLevel=function(e,i,s){if(i>0&&!t.isNullOrUndefined(e))for(var n=this.getVisibleNodes(s,e.childNodes),o=0,r=n.length;o<r;o++){var l=n[o],a=t.select("."+le,t.select("."+ge,l));t.isNullOrUndefined(a)||this.collapseNode(l,a,null),this.collapseByLevel(t.select("."+ce,l),i-1,s)}},l.prototype.collapseAllNodes=function(e){for(var i=this.getVisibleNodes(e,t.selectAll("."+le,this.element)),s=0,n=i.length;s<n;s++){var o=i[s],r=t.closest(o,"."+de);this.collapseNode(r,o,null)}},l.prototype.expandByLevel=function(e,i,s){if(i>0&&!t.isNullOrUndefined(e))for(var n=this.getVisibleNodes(s,e.childNodes),o=0,r=n.length;o<r;o++){var l=n[o],a=t.select("."+ae,t.select("."+ge,l));t.isNullOrUndefined(a)||this.expandAction(l,a,null),this.expandByLevel(t.select("."+ce,l),i-1,s)}},l.prototype.expandAllNodes=function(e){for(var i=this.getVisibleNodes(e,t.selectAll("."+ae,this.element)),s=0,n=i.length;s<n;s++){var o=i[s],r=t.closest(o,"."+de);this.expandAction(r,o,null,!0)}},l.prototype.getVisibleNodes=function(e,i){var s=Array.prototype.slice.call(i);if(e)for(var n=0;n<s.length;n++)t.isVisible(s[n])||(s.splice(n,1),n--);return s},l.prototype.removeNode=function(e){var i=t.closest(e,"."+ce),s=t.closest(i,"."+de);t.detach(e),this.updateElement(i,s),this.updateInstance(),this.removeData(e)},l.prototype.updateInstance=function(){this.updateList(),this.updateSelectedNodes(),this.updateExpandedNodes()},l.prototype.updateList=function(){this.liList=Array.prototype.slice.call(t.selectAll("."+de,this.element))},l.prototype.updateSelectedNodes=function(){this.setProperties({selectedNodes:[]},!0);var e=t.selectAll("."+ue,this.element);this.selectGivenNodes(e)},l.prototype.updateExpandedNodes=function(){this.setProperties({expandedNodes:[]},!0);for(var e=t.selectAll('[aria-expanded="true"]',this.element),i=0,s=e.length;i<s;i++)this.addExpand(e[i])},l.prototype.removeData=function(e){if(1===this.dataType){var t=new o.DataManager(this.treeData),i=this.getId(e),s={},n=this.isNumberTypeId?parseFloat(i):i;s[this.fields.id]=n,t.remove(this.fields.id,s),this.removeChildNodes(i)}else{i=this.getId(e);this.updateChildField(this.treeData,this.fields,i,null,null,!0)}},l.prototype.removeChildNodes=function(e){var i=this.getChildGroup(this.groupedData,e,!1),s=[];if(i)for(var n=0,r=i.length;n<r;n++){var l=new o.DataManager(this.treeData),a=t.getValue(this.fields.id,i[n]).toString(),d={},h=this.isNumberTypeId?parseFloat(a):a;d[this.fields.id]=h;var c=l.remove(this.fields.id,d);s.push(c[0]),this.removeChildNodes(a)}return s},l.prototype.doGivenAction=function(e,i,s){for(var n=0,o=e.length;n<o;n++){var r=this.getElement(e[n]);if(!t.isNullOrUndefined(r)){var l=t.select("."+i,t.select("."+ge,r));t.isNullOrUndefined(l)||(s?this.expandAction(r,l,null):this.collapseNode(r,l,null))}}},l.prototype.addGivenNodes=function(e,s,n,o,r){if(0!==e.length){var l=this.getSortedData(e),a=s?parseFloat(s.getAttribute("aria-level"))+1:1;o&&this.updateMapper(a);for(var d,h=i.ListBase.createListItemFromJson(this.createElement,l,this.listBaseOption,a),c=(d=r||(s?this.expandParent(s):t.select("."+ce,this.element))).childNodes[n],p=0;p<h.length;p++)d.insertBefore(h[p],c);var u=this.getId(s);if(1===this.dataType){this.updateField(this.treeData,this.fields,u,"hasChildren",!0);for(var f=this.getId(c),m=t.isNullOrUndefined(f)?this.treeData.length:this.getDataPos(this.treeData,this.fields,f),v=0;v<e.length;v++){if(!t.isNullOrUndefined(u)){var g=this.isNumberTypeId?parseFloat(u):u;t.setValue(this.fields.parentID,g,e[v])}this.treeData.splice(m,0,e[v]),m++}}else this.addChildData(this.treeData,this.fields,u,e,n);this.finalizeNode(d)}},l.prototype.updateMapper=function(e){var t=1===e?this.fields:this.getChildFields(this.fields,e-1,1);this.updateListProp(t)},l.prototype.updateListProp=function(e){var t=this.getActualProperties(e);this.listBaseOption.fields=t,this.listBaseOption.fields.url=t.hasOwnProperty("navigateUrl")?t.navigateUrl:"navigateUrl"},l.prototype.getDataPos=function(e,i,s){for(var n=null,r=0,l=e.length;r<l;r++){var a=t.getValue(i.id,e[r]);if(e[r]&&a&&a.toString()===s)return r;if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[r]))){if(this.fields.dataSource instanceof o.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[r]))){var d=t.getValue("child",e[r]);if(null!==(n=this.getDataPos(d,this.getChildMapper(i),s)))break}}else{var h=t.getValue(i.child,e[r]);if(null!==(n=this.getDataPos(h,this.getChildMapper(i),s)))break}}return n},l.prototype.addChildData=function(e,i,s,n,r){var l;if(t.isNullOrUndefined(s)){r=t.isNullOrUndefined(r)?e.length:r;for(var a=0,d=n.length;a<d;a++)e.splice(r,0,n[a]),r++;return l}for(var h=0,c=e.length;h<c;h++){var p=t.getValue(i.id,e[h]);if(e[h]&&p&&p.toString()===s){if("string"==typeof i.child&&e[h].hasOwnProperty(i.child)||this.fields.dataSource instanceof o.DataManager&&e[h].hasOwnProperty("child")){var u="string"==typeof i.child?i.child:"child",f=t.getValue(u,e[h]);r=t.isNullOrUndefined(r)?f.length:r;for(var a=0,d=n.length;a<d;a++)f.splice(r,0,n[a]),r++}else{u="string"==typeof i.child?i.child:"child";e[h][u]=n}return!0}if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[h]))){if(this.fields.dataSource instanceof o.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[h]))){f=t.getValue("child",e[h]);if(void 0!==(l=this.addChildData(f,this.getChildMapper(i),s,n,r)))break}}else{var m=t.getValue(i.child,e[h]);if(void 0!==(l=this.addChildData(m,this.getChildMapper(i),s,n,r)))break}}return l},l.prototype.doDisableAction=function(e){for(var i=0,s=e.length;i<s;i++){var n=this.getElement(e[i]);if(t.isNullOrUndefined(n)){(e[i]?e[i].toString():null)&&-1===this.disableNode.indexOf(e[i].toString())&&this.disableNode.push(e[i].toString())}else n.setAttribute("aria-disabled","true"),t.addClass([n],"e-disable")}},l.prototype.doEnableAction=function(e){for(var i=0,s=e.length;i<s;i++){var n=this.getElement(e[i]);if(t.isNullOrUndefined(n)){var o=e[i]?e[i].toString():null;o&&-1!==this.disableNode.indexOf(o)&&this.disableNode.splice(this.disableNode.indexOf(o),1)}else n.removeAttribute("aria-disabled"),t.removeClass([n],"e-disable")}},l.prototype.setTouchClass=function(){var e=t.closest(this.element,".e-bigger");this.touchClass=t.isNullOrUndefined(e)?"":"e-small"},l.prototype.updatePersistProp=function(){this.removeField(this.treeData,this.fields,["selected","expanded"]);for(var e=this.selectedNodes,t=0,i=e.length;t<i;t++)this.updateField(this.treeData,this.fields,e[t],"selected",!0);for(var s=this.expandedNodes,n=0,o=s.length;n<o;n++)this.updateField(this.treeData,this.fields,s[n],"expanded",!0);if(this.showCheckBox){this.removeField(this.treeData,this.fields,["isChecked"]);for(var r=this.checkedNodes,l=0,o=r.length;l<o;l++)this.updateField(this.treeData,this.fields,r[l],"isChecked",!0)}},l.prototype.removeField=function(e,i,s){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(i))for(var n=0,r=e.length;n<r;n++){for(var l=0;l<s.length;l++){var a=this.getMapperProp(i,s[l]);t.isNullOrUndefined(e[n][a])||delete e[n][a]}"string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[n]))?this.fields.dataSource instanceof o.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[n]))&&this.removeField(t.getValue("child",e[n]),this.getChildMapper(i),s):this.removeField(t.getValue(i.child,e[n]),this.getChildMapper(i),s)}},l.prototype.getMapperProp=function(e,i){switch(i){case"selected":return t.isNullOrUndefined(e.selected)?"selected":e.selected;case"expanded":return t.isNullOrUndefined(e.expanded)?"expanded":e.expanded;case"isChecked":return t.isNullOrUndefined(e.isChecked)?"isChecked":e.isChecked;case"hasChildren":return t.isNullOrUndefined(e.hasChildren)?"hasChildren":e.hasChildren;default:return i}},l.prototype.updateField=function(e,i,s,n,r){if(!t.isNullOrUndefined(s))if(1===this.dataType){var l=this.isNumberTypeId?parseFloat(s):s,a=new o.DataManager(this.treeData).executeLocal((new o.Query).where(i.id,"equal",l,!1));t.setValue(this.getMapperProp(i,n),r,a[0])}else this.updateChildField(e,i,s,n,r)},l.prototype.updateChildField=function(e,i,s,n,r,l){var a;if(t.isNullOrUndefined(e))return a;for(var d=0,h=e.length;d<h;d++){var c=t.getValue(i.id,e[d]);if(e[d]&&c&&c.toString()===s)return l?a=e.splice(d,1):(t.setValue(this.getMapperProp(i,n),r,e[d]),a=[]),a;if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[d]))){if(this.fields.dataSource instanceof o.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[d]))){var p=t.getValue("child",e[d]);if(void 0!==(a=this.updateChildField(p,this.getChildMapper(i),s,n,r,l)))break}}else{var u=t.getValue(i.child,e[d]);if(void 0!==(a=this.updateChildField(u,this.getChildMapper(i),s,n,r,l)))break}}return a},l.prototype.triggerEvent=function(){this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate();var e={data:this.treeData};this.trigger("dataSourceChanged",e)},l.prototype.updateBlazorTemplate=function(){t.updateBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate",this,!1)},l.prototype.wireInputEvents=function(e){t.EventHandler.add(e,"blur",this.inputFocusOut,this)},l.prototype.wireEditingEvents=function(e){if(e){var i=this;this.touchEditObj=new t.Touch(this.element,{tap:function(e){2===e.tapCount&&(e.originalEvent.preventDefault(),i.editingHandler(e.originalEvent))}})}else this.touchEditObj&&this.touchEditObj.destroy()},l.prototype.wireClickEvent=function(e){if(e){var i=this;this.touchClickObj=new t.Touch(this.element,{tap:function(e){e.originalEvent.preventDefault(),i.clickHandler(e)}})}else this.touchClickObj&&this.touchClickObj.destroy()},l.prototype.wireExpandOnEvent=function(e){var i=this;if(e){var s=this;this.touchExpandObj=new t.Touch(this.element,{tap:function(e){("Click"===i.expandOnType||"DblClick"===i.expandOnType&&2===e.tapCount)&&s.expandHandler(e)}})}else this.touchExpandObj&&this.touchExpandObj.destroy()},l.prototype.mouseDownHandler=function(e){this.mouseDownStatus=!0,(e.shiftKey||e.ctrlKey)&&e.preventDefault(),e.ctrlKey&&this.allowMultiSelection&&t.EventHandler.add(this.element,"contextmenu",this.preventContextMenu,this)},l.prototype.preventContextMenu=function(e){e.preventDefault()},l.prototype.wireEvents=function(){t.EventHandler.add(this.element,"mousedown",this.mouseDownHandler,this),this.wireClickEvent(!0),"None"!==this.expandOnType&&this.wireExpandOnEvent(!0),t.EventHandler.add(this.element,"focus",this.focusIn,this),t.EventHandler.add(this.element,"blur",this.focusOut,this),t.EventHandler.add(this.element,"mouseover",this.onMouseOver,this),t.EventHandler.add(this.element,"mouseout",this.onMouseLeave,this),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},l.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler),this.wireClickEvent(!1),this.wireExpandOnEvent(!1),t.EventHandler.remove(this.element,"focus",this.focusIn),t.EventHandler.remove(this.element,"blur",this.focusOut),t.EventHandler.remove(this.element,"mouseover",this.onMouseOver),t.EventHandler.remove(this.element,"mouseout",this.onMouseLeave),this.keyboardModule.destroy()},l.prototype.parents=function(e,i){for(var s=[],n=e.parentNode;!t.isNullOrUndefined(n);)t.matches(n,i)&&s.push(n),n=n.parentNode;return s},l.prototype.isDescendant=function(e,i){for(var s=i.parentNode;!t.isNullOrUndefined(s);){if(s===e)return!0;s=s.parentNode}return!1},l.prototype.showSpinner=function(e){t.addClass([e],fe),s.createSpinner({target:e,width:t.Browser.isDevice?16:14},this.createElement),s.showSpinner(e)},l.prototype.hideSpinner=function(e){s.hideSpinner(e),e.innerHTML="",t.removeClass([e],fe)},l.prototype.setCheckedNodes=function(e){e=JSON.parse(JSON.stringify(e)),this.uncheckAll(this.checkedNodes),this.setIndeterminate(e),e.length>0&&this.checkAll(e)},l.prototype.setValidCheckedNode=function(e){if(1===this.dataType){var i=this.fields,s=new o.DataManager(this.treeData).executeLocal((new o.Query).where(i.id,"equal",e,!0));if(s[0]&&(this.setChildCheckState(s,e,s[0]),this.autoCheck)){for(var n=s[0][this.fields.parentID]?s[0][this.fields.parentID].toString():null,r=this.getChildNodes(this.treeData,n),l=0,a=0;a<r.length;a++){var d=r[a][this.fields.id].toString();-1!==this.checkedNodes.indexOf(d)&&l++}l===r.length&&-1===this.checkedNodes.indexOf(n)&&n&&this.checkedNodes.push(n)}}else if(2===this.dataType)for(var h=0;h<this.treeData.length;h++){if((this.treeData[h][this.fields.id]?this.treeData[h][this.fields.id].toString():"")===e&&-1===this.checkedNodes.indexOf(e)){this.checkedNodes.push(e);break}var c=t.getValue(this.fields.child.toString(),this.treeData[h]);c&&this.setChildCheckState(c,e,this.treeData[h])}},l.prototype.setChildCheckState=function(e,i,s){var n,o=0;if(1===this.dataType){s&&(n=s[this.fields.id]?s[this.fields.id].toString():null);for(l=0;l<e.length;l++){var r=e[l][this.fields.id]?e[l][this.fields.id].toString():null;s&&n&&this.autoCheck&&-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(r)&&this.checkedNodes.push(r),r===i&&-1===this.checkedNodes.indexOf(i)&&this.checkedNodes.push(i),(d=this.getChildNodes(this.treeData,r))&&this.setChildCheckState(d,i,s)}}else{s&&(n=s[this.fields.id]?s[this.fields.id].toString():"");for(var l=0;l<e.length;l++){var a=e[l][this.fields.id]?e[l][this.fields.id].toString():"";s&&n&&this.autoCheck&&-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(a)&&this.checkedNodes.push(a),a===i&&-1===this.checkedNodes.indexOf(i)&&this.checkedNodes.push(i);var d=t.getValue(this.fields.child.toString(),e[l]);d&&this.setChildCheckState(d,i,e[l]),-1!==this.checkedNodes.indexOf(a)&&this.autoCheck&&o++,o===e.length&&-1===this.checkedNodes.indexOf(n)&&this.autoCheck&&this.checkedNodes.push(n)}}},l.prototype.setIndeterminate=function(e){for(var t=0;t<e.length;t++)this.setValidCheckedNode(e[t])},l.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"allowDragAndDrop":this.setDragAndDrop(this.allowDragAndDrop);break;case"allowEditing":this.wireEditingEvents(this.allowEditing);break;case"allowMultiSelection":if(this.selectedNodes.length>1){var o=this.getElement(this.selectedNodes[0]);this.isLoaded=!1,this.removeSelectAll(),this.selectNode(o,null),this.isLoaded=!0}this.setMultiSelect(this.allowMultiSelection),this.addMultiSelect(this.allowMultiSelection);break;case"checkedNodes":this.showCheckBox&&(this.checkedNodes=i.checkedNodes,this.setCheckedNodes(e.checkedNodes));break;case"autoCheck":this.showCheckBox&&(this.autoCheck=e.autoCheck,this.ensureIndeterminate());break;case"cssClass":this.setCssClass(i.cssClass,e.cssClass);break;case"enableRtl":this.setEnableRtl();break;case"expandedNodes":this.isAnimate=!1,this.isBlazorPlatform||this.setProperties({expandedNodes:[]},!0),this.collapseAll(),this.isInitalExpand=!0,this.isBlazorPlatform||this.setProperties({expandedNodes:t.isNullOrUndefined(e.expandedNodes)?[]:e.expandedNodes},!0),this.doExpandAction(),this.isInitalExpand=!1,this.isAnimate=!0;break;case"expandOn":this.wireExpandOnEvent(!1),this.setExpandOnType(),"None"!==this.expandOnType&&this.wireExpandOnEvent(!0);break;case"fields":this.isAnimate=!1,this.isFieldChange=!0,this.initialRender=!0,this.updateListProp(this.fields),this.reRenderNodes(),this.initialRender=!1,this.isAnimate=!0,this.isFieldChange=!1;break;case"fullRowSelect":this.setFullRow(this.fullRowSelect),this.addFullRow(this.fullRowSelect);break;case"loadOnDemand":if(!1===this.loadOnDemand&&!this.onLoaded){for(var r=this.element.querySelectorAll("li"),l=0;l<r.length;)this.renderChildNodes(r[l],!0,null,!0),l++;this.onLoaded=!0}break;case"nodeTemplate":this.nodeTemplateFn=this.templateComplier(this.nodeTemplate),this.reRenderNodes();break;case"selectedNodes":this.removeSelectAll(),this.setProperties({selectedNodes:e.selectedNodes},!0),this.doSelectionAction();break;case"showCheckBox":case"sortOrder":this.reRenderNodes()}},l.prototype.destroy=function(){t.resetBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate"),this.element.removeAttribute("aria-activedescendant"),this.element.removeAttribute("tabindex"),this.unWireEvents(),this.wireEditingEvents(!1),this.rippleFn(),this.rippleIconFn(),this.setCssClass(this.cssClass,null),this.setDragAndDrop(!1),this.setFullRow(!1),this.ulElement&&this.ulElement.parentElement&&this.ulElement.parentElement.removeChild(this.ulElement),e.prototype.destroy.call(this)},l.prototype.addNodes=function(e,i,s,n){if(!t.isNullOrUndefined(e)){e=JSON.parse(JSON.stringify(e));var r=this.getElement(i);if(this.preventExpand=n,this.fields.dataSource instanceof o.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName){var l,a=r?r.querySelector("."+ve):null,d=this;r&&a&&a.classList.contains(ae)&&null===r.querySelector("."+ce)?d.renderChildNodes(r,null,function(){l=r.querySelector("."+ce),d.addGivenNodes(e,r,s,!0,l),d.triggerEvent()}):(this.addGivenNodes(e,r,s,!0),this.triggerEvent())}else if(2===this.dataType)this.addGivenNodes(e,r,s);else{if(r)this.addGivenNodes(e,r,s);else{e=this.getSortedData(e);for(var h=0;h<e.length;h++){var c=t.getValue(this.fields.parentID,e[h]);r=c?this.getElement(c.toString()):c,this.addGivenNodes([e[h]],r,s)}}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}this.showCheckBox&&r&&this.ensureParentCheckState(r),(this.fields.dataSource instanceof o.DataManager==!1||this.fields.dataSource instanceof o.DataManager&&"BlazorAdaptor"===this.fields.dataSource.adaptorName)&&(this.preventExpand=!1,this.triggerEvent())}},l.prototype.beginEdit=function(e){var i=this.getElement(e);t.isNullOrUndefined(i)||this.createTextbox(i,null)},l.prototype.checkAll=function(e){this.showCheckBox&&this.doCheckBoxAction(e,!0)},l.prototype.collapseAll=function(e,i,s){t.isNullOrUndefined(e)?i>0?this.collapseByLevel(t.select("."+ce,this.element),i,s):this.collapseAllNodes(s):this.doGivenAction(e,le,!1)},l.prototype.disableNodes=function(e){t.isNullOrUndefined(e)||this.doDisableAction(e)},l.prototype.enableNodes=function(e){t.isNullOrUndefined(e)||this.doEnableAction(e)},l.prototype.ensureVisible=function(e){var i=this.getElement(e);if(!t.isNullOrUndefined(i)){var s=this.parents(i,"."+de);this.expandAll(s),setTimeout(function(){i.scrollIntoView(!0)},450)}},l.prototype.expandAll=function(e,i,s){t.isNullOrUndefined(e)?i>0?this.expandByLevel(t.select("."+ce,this.element),i,s):this.expandAllNodes(s):this.doGivenAction(e,ae,!0)},l.prototype.getAllCheckedNodes=function(){return this.checkedNodes},l.prototype.getNode=function(e){var t=this.getElement(e);return this.getNodeData(t,!0)},l.prototype.getTreeData=function(e){var i=this.getId(e);if(this.updatePersistProp(),t.isNullOrUndefined(i))return this.treeData;var s=this.getNodeObject(i);return t.isNullOrUndefined(s)?[]:[s]},l.prototype.moveNodes=function(e,i,s,n){var r=this.getElement(i);if(!t.isNullOrUndefined(r)){for(var l=0;l<e.length;l++){var a=this.getElement(e[l]);t.isNullOrUndefined(a)||r.isSameNode(a)||this.isDescendant(a,r)||(this.preventExpand=n,this.dropAsChildNode(a,r,this,s))}this.fields.dataSource instanceof o.DataManager==!1&&(this.preventExpand=!1),this.triggerEvent()}},l.prototype.removeNodes=function(e){if(!t.isNullOrUndefined(e)){for(var i=0,s=e.length;i<s;i++){var n=this.getElement(e[i]);t.isNullOrUndefined(n)||this.removeNode(n)}1===this.dataType&&(this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)),this.triggerEvent()}},l.prototype.updateNode=function(e,i){var s=this;if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(i)&&this.allowEditing){var n=this.getElement(e);if(!t.isNullOrUndefined(n)){var o=t.select("."+he,n);this.updateOldText(n);var r=this.getEditEvent(n,null,null);this.trigger("nodeEditing",r,function(e){e.cancel||s.appendNewText(n,o,i,!1)})}}},l.prototype.uncheckAll=function(e){this.showCheckBox&&this.doCheckBoxAction(e,!1)};var a;return oe([t.Property(!1)],l.prototype,"allowDragAndDrop",void 0),oe([t.Property(!1)],l.prototype,"allowEditing",void 0),oe([t.Property(!1)],l.prototype,"allowMultiSelection",void 0),oe([t.Complex({},ke)],l.prototype,"animation",void 0),oe([t.Property()],l.prototype,"checkedNodes",void 0),oe([t.Property("")],l.prototype,"cssClass",void 0),oe([t.Property(!1)],l.prototype,"enablePersistence",void 0),oe([t.Property()],l.prototype,"expandedNodes",void 0),oe([t.Property("Auto")],l.prototype,"expandOn",void 0),oe([t.Complex({},Oe)],l.prototype,"fields",void 0),oe([t.Property(!0)],l.prototype,"fullRowSelect",void 0),oe([t.Property(!0)],l.prototype,"loadOnDemand",void 0),oe([t.Property()],l.prototype,"nodeTemplate",void 0),oe([t.Property()],l.prototype,"selectedNodes",void 0),oe([t.Property("None")],l.prototype,"sortOrder",void 0),oe([t.Property(!1)],l.prototype,"showCheckBox",void 0),oe([t.Property(!0)],l.prototype,"autoCheck",void 0),oe([t.Event()],l.prototype,"created",void 0),oe([t.Event()],l.prototype,"dataBound",void 0),oe([t.Event()],l.prototype,"dataSourceChanged",void 0),oe([t.Event()],l.prototype,"drawNode",void 0),oe([t.Event()],l.prototype,"destroyed",void 0),oe([t.Event()],l.prototype,"keyPress",void 0),oe([t.Event()],l.prototype,"nodeChecked",void 0),oe([t.Event()],l.prototype,"nodeChecking",void 0),oe([t.Event()],l.prototype,"nodeClicked",void 0),oe([t.Event()],l.prototype,"nodeCollapsed",void 0),oe([t.Event()],l.prototype,"nodeCollapsing",void 0),oe([t.Event()],l.prototype,"nodeDragging",void 0),oe([t.Event()],l.prototype,"nodeDragStart",void 0),oe([t.Event()],l.prototype,"nodeDragStop",void 0),oe([t.Event()],l.prototype,"nodeDropped",void 0),oe([t.Event()],l.prototype,"nodeEdited",void 0),oe([t.Event()],l.prototype,"nodeEditing",void 0),oe([t.Event()],l.prototype,"nodeExpanded",void 0),oe([t.Event()],l.prototype,"nodeExpanding",void 0),oe([t.Event()],l.prototype,"nodeSelected",void 0),oe([t.Event()],l.prototype,"nodeSelecting",void 0),l=a=oe([t.NotifyPropertyChanges],l)}(t.Component),Le=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Ie=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ae="e-close",De="e-open",Pe="e-right",Te="e-left",Me="e-over",He="e-push",Ue="e-sidebar-context",Be=function(e){function i(t,i){return e.call(this,t,i)||this}return Le(i,e),i.prototype.preRender=function(){this.setWidth()},i.prototype.render=function(){this.initialize(),this.wireEvents(),this.renderComplete()},i.prototype.initialize=function(){this.setTarget(),this.addClass(),this.setZindex(),this.enableDock&&this.setDock(),this.isOpen?this.show():this.setMediaQuery(),this.checkType(!0),this.setType(this.type),this.setCloseOnDocumentClick(),this.setEnableRTL(),t.Browser.isDevice&&(this.windowWidth=window.innerWidth)},i.prototype.setEnableRTL=function(){this.enableRtl?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},i.prototype.setTarget=function(){this.sidebarEleCopy=this.element.cloneNode(!0),"string"==typeof this.target&&this.setProperties({target:document.querySelector(this.target)},!0),this.target&&(this.target.insertBefore(this.element,this.target.children[0]),t.addClass([this.element],"e-sidebar-absolute"),t.addClass([this.target],Ue))},i.prototype.setCloseOnDocumentClick=function(){this.closeOnDocumentClick?t.EventHandler.add(document,"mousedown touchstart",this.documentclickHandler,this):t.EventHandler.remove(document,"mousedown touchstart",this.documentclickHandler)},i.prototype.setWidth=function(){this.enableDock&&"Left"===this.position?t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)}):this.enableDock&&"Right"===this.position?t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)}):this.enableDock||t.setStyleAttribute(this.element,{width:this.setDimension(this.width)})},i.prototype.setDimension=function(e){return e="number"==typeof e?t.formatUnit(e):"string"==typeof e?e.match(/px|%|em/)?e:t.formatUnit(e):"100%"},i.prototype.setZindex=function(){t.setStyleAttribute(this.element,{"z-index":""+this.zIndex})},i.prototype.addClass=function(){var e=document.querySelector(".e-main-content");t.isNullOrUndefined(e||this.element.nextElementSibling)||t.addClass([e||this.element.nextElementSibling],["e-content-animation"]),this.enableDock||"Auto"===this.type||t.addClass([this.element],["e-visibility"]),t.removeClass([this.element],[De,Ae,Pe,Te,"e-slide",He,Me]),this.element.classList.add("e-sidebar"),t.addClass([this.element],"Right"===this.position?Pe:Te),"Auto"!==this.type||t.Browser.isDevice?this.isOpen||t.addClass([this.element],Ae):this.show(),this.enableDock&&t.addClass([this.element],"e-dock"),this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):"0",this.element.setAttribute("tabindex",this.tabIndex)},i.prototype.checkType=function(e){"Push"!==this.type&&"Over"!==this.type&&"Slide"!==this.type?this.type="Auto":this.element.classList.contains(Ae)||e||this.hide()},i.prototype.transitionEnd=function(e){this.setDock(),t.isNullOrUndefined(e)||e.target!==this.element||this.triggerChange(),t.EventHandler.remove(this.element,"transitionend",this.transitionEnd)},i.prototype.destroyBackDrop=function(){var e=document.querySelector(".e-main-content")||this.element.nextElementSibling;this.target&&this.showBackdrop&&e?t.removeClass([e],"e-backdrop"):this.showBackdrop&&this.modal&&(this.modal.style.display="none",this.modal.outerHTML="",this.modal=null)},i.prototype.hide=function(e){var i=this,s={model:this,element:this.element,cancel:!1,isInteracted:!t.isNullOrUndefined(e),event:e||null};t.isBlazor()&&delete s.model,this.trigger("close",s,function(e){if(!e.cancel){if(i.element.classList.contains(Ae))return;i.element.classList.contains(De)&&!i.animate&&i.triggerChange(),t.addClass([i.element],Ae),t.removeClass([i.element],De),i.enableDock?t.setStyleAttribute(i.element,{width:t.formatUnit(i.dockSize)}):t.setStyleAttribute(i.element,{width:t.formatUnit(i.width)}),i.setType(i.type);var s=document.querySelector(".e-main-content")||i.element.nextElementSibling;!i.enableDock&&s&&(s.style.transform="translateX(0px)","Left"===i.position?s.style.marginLeft="0px":s.style.marginRight="0px"),i.destroyBackDrop(),i.setAnimation(),"Slide"===i.type&&document.body.classList.remove("e-sidebar-overflow"),i.setProperties({isOpen:!1},!0),i.enableDock&&setTimeout(function(){return i.setTimeOut()},50),t.EventHandler.add(i.element,"transitionend",i.transitionEnd,i)}})},i.prototype.setTimeOut=function(){var e=document.querySelector(".e-main-content")||this.element.nextElementSibling;this.element.classList.contains(De)&&e?"Left"===this.position?"auto"===this.width?e.style.marginLeft=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginLeft=this.setDimension(this.width):"auto"===this.width?e.style.marginRight=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginRight=this.setDimension(this.width):this.element.classList.contains(Ae)&&e&&("Left"===this.position?"auto"===this.dockSize?e.style.marginLeft=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginLeft=this.setDimension(this.dockSize):"auto"===this.dockSize?e.style.marginRight=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginRight=this.setDimension(this.dockSize))},i.prototype.show=function(e){var i=this,s={model:this,element:this.element,cancel:!1,isInteracted:!t.isNullOrUndefined(e),event:e||null};t.isBlazor()&&delete s.model,this.trigger("open",s,function(e){if(!e.cancel){if(t.removeClass([i.element],"e-visibility"),i.element.classList.contains(De))return;i.element.classList.contains(Ae)&&!i.animate&&i.triggerChange(),t.addClass([i.element],[De,"e-transition"]),t.setStyleAttribute(i.element,{transform:""}),t.removeClass([i.element],Ae),t.setStyleAttribute(i.element,{width:t.formatUnit(i.width)}),i.setType(i.type),i.createBackDrop(),i.setAnimation(),"Slide"===i.type&&document.body.classList.add("e-sidebar-overflow"),i.setProperties({isOpen:!0},!0),t.EventHandler.add(i.element,"transitionend",i.transitionEnd,i)}})},i.prototype.setAnimation=function(){this.animate?t.removeClass([this.element],"e-disable-animation"):t.addClass([this.element],"e-disable-animation")},i.prototype.triggerChange=function(){var e={name:"change",element:this.element};this.trigger("change",e)},i.prototype.setDock=function(){this.enableDock&&"Left"===this.position&&!this.getState()?t.setStyleAttribute(this.element,{transform:"translateX(-100%) translateX("+this.setDimension(this.dockSize)+")"}):this.enableDock&&"Right"===this.position&&!this.getState()&&t.setStyleAttribute(this.element,{transform:"translateX(100%) translateX(-"+this.setDimension(this.dockSize)+")"}),this.element.classList.contains(Ae)&&this.enableDock&&t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)})},i.prototype.createBackDrop=function(){if(this.target&&this.showBackdrop&&this.getState()){var e=document.querySelector(".e-main-content")||this.element.nextElementSibling;t.addClass([e],"e-backdrop")}else this.showBackdrop&&!this.modal&&this.getState()&&(this.modal=this.createElement("div"),this.modal.className="e-sidebar-overlay",this.modal.style.display="block",document.body.appendChild(this.modal))},i.prototype.getPersistData=function(){return this.addOnPersist(["type","position","isOpen"])},i.prototype.getModuleName=function(){return"sidebar"},i.prototype.toggle=function(e){this.element.classList.contains(De)?this.hide():this.show()},i.prototype.getState=function(){return!!this.element.classList.contains(De)},i.prototype.setMediaQuery=function(){if(this.mediaQuery){("string"==typeof this.mediaQuery?window.matchMedia(this.mediaQuery).matches:this.mediaQuery.matches)&&this.windowWidth!==window.innerWidth?this.show():this.getState()&&this.windowWidth!==window.innerWidth&&this.hide()}},i.prototype.resize=function(e){"Auto"===this.type&&(t.Browser.isDevice?t.addClass([this.element],Me):t.addClass([this.element],He)),this.setMediaQuery(),t.Browser.isDevice&&(this.windowWidth=window.innerWidth)},i.prototype.documentclickHandler=function(e){t.closest(e.target,".e-control.e-sidebar")||this.hide(e)},i.prototype.enableGestureHandler=function(e){"Left"===this.position&&"Right"===e.swipeDirection&&e.startX<=20&&e.distanceX>=50&&e.velocity>=.5?this.show():"Left"===this.position&&"Left"===e.swipeDirection?this.hide():"Right"===this.position&&"Right"===e.swipeDirection?this.hide():"Right"===this.position&&"Left"===e.swipeDirection&&window.innerWidth-e.startX<=20&&e.distanceX>=50&&e.velocity>=.5&&this.show()},i.prototype.setEnableGestures=function(){this.enableGestures?(this.mainContentEle=new t.Touch(document.body,{swipe:this.enableGestureHandler.bind(this)}),this.sidebarEle=new t.Touch(this.element,{swipe:this.enableGestureHandler.bind(this)})):this.mainContentEle&&this.sidebarEle&&(this.mainContentEle.destroy(),this.sidebarEle.destroy())},i.prototype.wireEvents=function(){this.setEnableGestures(),window.addEventListener("resize",this.resize.bind(this))},i.prototype.unWireEvents=function(){window.removeEventListener("resize",this.resize.bind(this)),t.EventHandler.remove(document,"mousedown touchstart",this.documentclickHandler),this.mainContentEle&&this.mainContentEle.destroy(),this.sidebarEle&&this.sidebarEle.destroy()},i.prototype.onPropertyChanged=function(i,s){for(var n=document.querySelector(".e-main-content")||this.element.nextElementSibling,o=0,r=Object.keys(i);o<r.length;o++)switch(r[o]){case"isOpen":this.isOpen?this.show():this.hide();break;case"width":this.setWidth(),this.getState()||this.setDock();break;case"animate":this.setAnimation();break;case"type":this.checkType(!1),t.removeClass([this.element],["e-visibility"]),this.addClass(),t.addClass([this.element],"Auto"===this.type?t.Browser.isDevice?["e-over"]:["e-push"]:["e-"+this.type.toLowerCase()]);break;case"position":this.element.style.transform="",this.setDock(),n&&("Left"===this.position?n.style.marginRight="0px":n.style.marginLeft="0px"),"Right"===this.position?(t.removeClass([this.element],Te),t.addClass([this.element],Pe)):(t.removeClass([this.element],Pe),t.addClass([this.element],Te)),this.setType(this.type);break;case"showBackdrop":this.showBackdrop?this.createBackDrop():this.modal&&(this.modal.style.display="none",this.modal.outerHTML="",this.modal=null);break;case"target":"string"==typeof this.target&&this.setProperties({target:document.querySelector(this.target)},!0),t.isNullOrUndefined(this.target)?(t.removeClass([this.element],"e-sidebar-absolute"),t.removeClass([s.target],Ue),t.setStyleAttribute(n,{"margin-left":0,"margin-right":0}),document.body.insertAdjacentElement("afterbegin",this.element)):e.prototype.refresh.call(this);break;case"closeOnDocumentClick":this.setCloseOnDocumentClick();break;case"enableDock":this.getState()||this.setDock();break;case"zIndex":this.setZindex();break;case"mediaQuery":this.setMediaQuery();break;case"enableGestures":this.setEnableGestures();break;case"enableRtl":this.setEnableRTL()}},i.prototype.setType=function(e){var i=this.element.getBoundingClientRect().width;this.setZindex();var s=document.querySelector(".e-main-content")||this.element.nextElementSibling;s&&(s.style.transform="translateX(0px)",t.Browser.isDevice||"Auto"===this.type||("Left"===this.position?s.style.marginLeft="0px":s.style.marginRight="0px"));var n=(this.position,i+"px"),o="Left"===this.position?i:-i;switch(t.removeClass([this.element],[He,Me,"e-slide"]),e){case"Push":t.addClass([this.element],[He]),s&&(this.enableDock||this.element.classList.contains(De))&&("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n);break;case"Slide":t.addClass([this.element],["e-slide"]),s&&(this.enableDock||this.element.classList.contains(De))&&(s.style.transform="translateX("+o+"px)");break;case"Over":t.addClass([this.element],[Me]),this.enableDock&&this.element.classList.contains(Ae)&&s&&("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n);break;case"Auto":t.addClass([this.element],["e-transition"]),t.Browser.isDevice?s&&this.enableDock&&!this.getState()?("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n,t.addClass([this.element],He)):t.addClass([this.element],Me):(t.addClass([this.element],He),s&&(this.enableDock||this.element.classList.contains(De))&&("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n)),this.createBackDrop()}},i.prototype.destroy=function(){e.prototype.destroy.call(this),t.removeClass([this.element],[De,Ae,He,"e-slide",Me,Te,Pe,"e-transition"]),this.target&&(t.removeClass([this.element],"e-sidebar-absolute"),t.removeClass([this.target],Ue)),this.destroyBackDrop(),this.element.style.width="",this.element.style.zIndex="",this.element.style.transform="",this.windowWidth=null,t.isNullOrUndefined(this.sidebarEleCopy.getAttribute("tabindex"))?this.element.removeAttribute("tabindex"):this.element.setAttribute("tabindex",this.tabIndex);var i=document.querySelector(".e-main-content")||this.element.nextElementSibling;t.isNullOrUndefined(i)||(i.style.margin="",i.style.transform=""),this.unWireEvents()},Ie([t.Property("auto")],i.prototype,"dockSize",void 0),Ie([t.Property(null)],i.prototype,"mediaQuery",void 0),Ie([t.Property(!1)],i.prototype,"enableDock",void 0),Ie([t.Property("en-US")],i.prototype,"locale",void 0),Ie([t.Property(!1)],i.prototype,"enablePersistence",void 0),Ie([t.Property(!0)],i.prototype,"enableGestures",void 0),Ie([t.Property(!1)],i.prototype,"isOpen",void 0),Ie([t.Property(!1)],i.prototype,"enableRtl",void 0),Ie([t.Property(!0)],i.prototype,"animate",void 0),Ie([t.Property("auto")],i.prototype,"height",void 0),Ie([t.Property(!1)],i.prototype,"closeOnDocumentClick",void 0),Ie([t.Property("Left")],i.prototype,"position",void 0),Ie([t.Property(null)],i.prototype,"target",void 0),Ie([t.Property(!1)],i.prototype,"showBackdrop",void 0),Ie([t.Property("Auto")],i.prototype,"type",void 0),Ie([t.Property("auto")],i.prototype,"width",void 0),Ie([t.Property(1e3)],i.prototype,"zIndex",void 0),Ie([t.Event()],i.prototype,"created",void 0),Ie([t.Event()],i.prototype,"close",void 0),Ie([t.Event()],i.prototype,"open",void 0),Ie([t.Event()],i.prototype,"change",void 0),Ie([t.Event()],i.prototype,"destroyed",void 0),i=Ie([t.NotifyPropertyChanges],i)}(t.Component);return e.MenuAnimationSettings=O,e.MenuItem=x,e.HScroll=d,e.VScroll=p,e.Item=D,e.Toolbar=P,e.AccordionActionSettings=R,e.AccordionAnimationSettings=j,e.AccordionItem=F,e.Accordion=q,e.ContextMenu=W,e.Menu=G,e.TabActionSettings=$,e.TabAnimationSettings=ee,e.Header=te,e.TabItem=ie,e.Tab=se,e.FieldsSettings=Oe,e.ActionSettings=we,e.NodeAnimationSettings=ke,e.TreeView=Se,e.Sidebar=Be,e}({},ej.base,ej.lists,ej.popups,ej.buttons,ej.data,ej.inputs),this.ejs=ej;
11
2
  //# sourceMappingURL=ej2-navigations.min.js.map