@syncfusion/ej2-filemanager 25.1.35 → 25.1.38

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.
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * filename: ej2-filemanager.min.js
3
- * version : 25.1.35
3
+ * version : 25.1.38
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
8
8
  * applicable laws.
9
9
  */
10
- this.ej=this.ej||{},this.ej.filemanager=function(e,t,i,n,s,a,r,o,l,h,d){"use strict";function p(e,t){var i=/\.\S+/.test(e),n=/\.\S+/.test(t);if(i&&!n)return 1;if(!i&&n)return-1;var s=[],a=[];for((e+"").replace(/(\d+)|(\D+)/g,function(e,t,i){return s.push([t||1/0,i||""]),""}),(t+"").replace(/(\d+)|(\D+)/g,function(e,t,i){return a.push([t||1/0,i||""]),""});s.length&&a.length;){var r=s.shift(),o=a.shift(),l=r[0]-o[0]||r[1].localeCompare(o[1]);if(l)return l}return s.length-a.length}function c(e,i,n){var s=t.getValue("name",i),a=e.getAttribute("data-id"),r=t.isNullOrUndefined(a)?s:a;n.setProperties({path:u(e,r,n.hasId)},!0),n.pathId=f(e),n.pathNames=g(e,s)}function u(e,t,i){for(var n=m(e,t,!1,i),s=i?"":"/",a=n.length-(i?1:2);a>=0;a--)s+=n[a]+"/";return s}function f(e){for(var t=m(e,e.getAttribute("data-uid"),!0),i=[],n=t.length-1;n>=0;n--)i.push(t[n]);return i}function g(e,t){for(var i=m(e,t,!1),n=[],s=i.length-1;s>=0;s--)n.push(i[s]);return n}function m(e,i,n,s){for(var a=[i],r=e.parentNode;!t.isNullOrUndefined(r);){if(t.matches(r,"."+gi)){var o=n?r.getAttribute("data-uid"):s?r.getAttribute("data-id"):t.select("."+mi,r).textContent;a.push(o)}if((r=r.parentNode).classList.contains(_i))break}return a}function b(e){var i=e.hasId?"id":"name",n=e.hasId?"":"/",s=e.hasId?0:1;for(s;s<e.pathId.length;s++){var a=t.getValue(e.pathId[s],e.feParent);n+=t.getValue(i,a)+"/"}e.setProperties({path:n},!0)}function v(e){e.isCut&&(O(e),e.selectedNodes=[],e.actionRecords=[],e.enablePaste=!1,e.notify(xn,{}))}function y(e,i){if(i.isSearchCut=!1,i.actionRecords=[],i.activeElements=[],i.notify(Pn,{}),0===i.activeElements.length)return!1;O(i);var n=i.activeElements;"navigationpane"!==i.activeModule?i.targetPath=i.path:i.targetPath=Q(i.path);var s=0;if(n&&(w(i,n[0]),"cut"===e))for(;s<n.length;)I(n[s]),s++;for(s=0,i.selectedNodes=[],i.enablePaste=!0,i.notify(jn,{});s<i.activeRecords.length;)i.actionRecords.push(i.activeRecords[s]),i.selectedNodes.push(t.getValue("name",i.activeRecords[s])),s++;if((""!==i.breadcrumbbarModule.searchObj.element.value||i.isFiltered)&&"navigationpane"!==i.activeModule){i.selectedNodes=[],i.isSearchCut=!0;for(var a=0;a<i.selectedItems.length;)i.selectedNodes.push(i.selectedItems[a]),a++}return!0}function I(e){e.classList.add(yi)}function O(e,t){for(var i=t?e.element.querySelectorAll("."+Oi):e.element.querySelectorAll("."+yi),n=0;n<i.length;)i[n].classList.remove(t?Oi:yi),n++}function w(e,i){i&&(i.classList.contains(ji)?e.activeModule="detailsview":t.closest(i,"."+Fi)?e.activeModule="largeiconsview":e.activeModule="navigationpane")}function D(e,t,i){var n;if(0!==t.length||e.isFiltered||e.notify(kn,{args:e}),n="startsWith"===e.searchSettings.filterType?t+"*":"endsWith"===e.searchSettings.filterType?"*"+t:"*"+t+"*",e.searchWord=n,e.itemData=[P(e)],t.length>0){var s=e.searchSettings.ignoreCase,a=e.showHiddenItems;ze(e,i?yn:fn,e.path,n,a,!s)}else e.isFiltered?xe(e,yn):e.isSortByClicked?(e.notify(yn,{files:"Details"===e.oldView?e.detailsviewModule.gridObj.dataSource:e.largeiconsviewModule.allItems}),e.isSortByClicked=!1):Se(e,i?yn:fn,e.path)}function C(e,t){e.oldView=e.view,e.setProperties({view:t},!0),(""!==e.breadcrumbbarModule.searchObj.element.value||e.isFiltered)&&(e.layoutSelectedItems=e.selectedItems);var i="";e.breadcrumbbarModule.searchObj.element.value&&(i=e.breadcrumbbarModule.searchObj.element.value),e.isLayoutChange=!0,D(e,i,!0)}function S(e,i){var n="";i&&(n=t.closest(i,"."+hi+"."+di+" ."+zi)?"detailsview":t.closest(i,"."+fi)?"largeiconsview":i.classList.contains("e-fullrow")||i.classList.contains("e-icon-expandable")?"navigationpane":t.closest(i,".e-address-list-item")?"breadcrumbbar":""),e.targetModule=n}function j(e){e.itemData=[P(e)],ve(e.itemData[0])?Se(e,rn,e.path):me(e,e.itemData[0],_n)}function x(e){Se(e,mn,e.path)}function P(e){return t.getValue(e.pathId[e.pathId.length-1],e.feParent)}function N(e){y("copy",e)&&(e.fileAction="copy")}function E(e){y("cut",e)&&(e.isCut=!0,e.fileAction="move")}function R(e){if(!t.getValue("isFile",e))return ki;var i=["bmp","dib","jpg","jpeg","jpe","jfif","gif","tif","tiff","png","ico"],n=["mp3","wav","aac","ogg","wma","aif","fla","m4a"],s=["webm","mkv","flv","vob","ogv","ogg","avi","wmv","mp4","3gp"],a=["css","exe","html","js","msi","pdf","pptx","ppt","rar","zip","txt","docx","doc","xlsx","xls","xml","rtf","php"],r=t.getValue("type",e);-1!==(r=r.toLowerCase()).indexOf(".")&&(r=r.split(".").join(""));return-1!==i.indexOf(r)?Li:-1!==n.indexOf(r)?Ti:-1!==s.indexOf(r)?Ai:-1!==a.indexOf(r)?"e-fe-"+r:"e-fe-unknown e-fe-"+r}function M(e,i){var n,s=e.ajaxSettings.getImageUrl?e.ajaxSettings.getImageUrl:e.ajaxSettings.url,a=-1!==s.indexOf("?")?"&path=":"?path=",r=encodeURIComponent(t.getValue("name",i)),o=t.getValue("filterPath",i);if(e.hasId){var l=t.getValue("id",i);n=s+a+e.path+"&id="+l}else n=t.isNullOrUndefined(o)?s+a+e.path+r:s+a+encodeURIComponent(o.replace(/\\/g,"/"))+r;var h={fileDetails:[i],imageUrl:n=n+"&time="+(new Date).getTime().toString()};return e.trigger("beforeImageLoad",h),h.imageUrl}function k(e,i,n){var s=t.getValue(e.hasId?"id":"name",i)+"/",a=t.getValue(e.hasId?"filterId":"filterPath",i);return t.isNullOrUndefined(a)?n+s:a.replace(/\\/g,"/")+s}function L(e,i){var n=t.getValue("name",i),s=t.getValue("filterPath",i);return""===e.breadcrumbbarModule.searchObj.element.value&&!e.isFiltered||t.isNullOrUndefined(s)||(n=(s=s.replace(/\\/g,"/")).replace(e.path,"")+n),n}function T(e,i){if(0===i.length)return i;var n;n="None"!==e.sortOrder?(new s.Query).sortBy(e.sortBy,e.sortOrder.toLowerCase(),!0).group("isFile"):(new s.Query).group("isFile");var a=new s.DataManager(i).executeLocal(n);return t.getValue("records",a)}function A(e,i,n){var a=t.getValue(e.pathId[e.pathId.length-1],e.feFiles),r=(new s.Query).where(i,"equal",n);return new s.DataManager(a).executeLocal(r)[0]}function F(e,i,n){var s,a=t.select("#"+e.element.id+ei,e.element),r=t.select("#"+e.element.id+oi,a).offsetHeight;if(s=a.offsetHeight-r,"Details"===e.view&&(s-=t.select("."+Vi,a).offsetHeight),t.isNullOrUndefined(i.querySelector("."+xi))){var o=t.createElement("div",{className:xi}),l=t.createElement("div",{className:Ui}),h=t.createElement("div",{className:Pi}),d=t.createElement("div",{className:Ni});"Details"===e.view?i.querySelector("."+Bi).appendChild(o):i.appendChild(o),o.appendChild(l),o.appendChild(h),o.appendChild(d)}i.querySelector("."+xi)&&(t.isNullOrUndefined(n.error)?e.isFiltered?(i.querySelector("."+Pi).innerHTML=H(e,"Filter-Empty"),i.querySelector("."+Ni).innerHTML=H(e,"Filter-Key")):""!==e.breadcrumbbarModule.searchObj.element.value?(i.querySelector("."+Pi).innerHTML=H(e,"Search-Empty"),i.querySelector("."+Ni).innerHTML=H(e,"Search-Key")):(i.querySelector("."+Pi).innerHTML=H(e,"Folder-Empty"),i.querySelector("."+Ni).innerHTML=H(e,"File-Upload")):(i.querySelector("."+Pi).innerHTML=H(e,"Access-Denied"),i.querySelector("."+Ni).innerHTML=H(e,"Access-Details")));var p=t.select("."+xi,i);s=(s-p.offsetHeight)/2,p.style.marginTop=s+"px"}function U(e){return new s.DataManager(e).executeLocal((new s.Query).where(Xi,"equal",!1,!1))}function V(e,i){for(var n=U(e.files),s=0,a=n.length;s<a;s++)t.setValue("_fm_id",i+"_"+s,n[s])}function _(e,i,n){for(var s=0;s<e.length;s++){var a=new Date(t.getValue("dateCreated",e[s])),r=new Date(t.getValue("dateModified",e[s]));t.isNullOrUndefined(n)&&(n="MM/dd/yyyy"),t.setValue("_fm_created",i.formatDate(a,{format:n}),e[s]),t.setValue("_fm_modified",i.formatDate(r,{format:n}),e[s])}}function H(e,t){var i=e.localeObj.getConstant(t);return""===i?t:i}function B(e,i){var n=e.cssClass;return n=t.isNullOrUndefined(n)||""===n?i:n+" "+i}function z(e,t){e.isSortByClicked=!0,-1!==t.item.id.indexOf("ascending")||-1!==t.item.id.indexOf("descending")||-1!==t.item.id.indexOf("none")?e.sortOrder=q(t.item.id):e.sortBy=q(t.item.id,e),e.itemData=[P(e)],"Details"===e.view&&(e.isMobile?C(e,"Details"):(e.notify(Mn,{module:"detailsview"}),e.isSortByClicked=!1)),"LargeIcons"===e.view&&C(e,"LargeIcons"),e.notify(In,{})}function q(e,t){var i,n=e.substring(e.lastIndexOf("_")+1),s=n;switch(t&&(i=t.detailsViewSettings.columns),n){case"date":for(var a=0,r=i.length;a<r;a++){if("dateModified"===i[a].field||"dateCreated"===i[a].field){s=i[a].field;break}s="_fm_modified"}break;case"ascending":s="Ascending";break;case"descending":s="Descending";break;case"none":s="None"}return s}function W(e,i){for(var n=i.split("/"),s=e.originalPath.split("/"),a=t.getValue(e.pathId[0],e.feParent),r=t.isNullOrUndefined(t.getValue("id",a))?"name":"id",o=n.length-1,l=s.length-1;o<l;o++){var h=""===s[o+1]?en:Zi,d=""===s[o]?"/":e.path+s[o]+"/",p=A(e,r,s[o]),c=t.getValue("_fm_id",p);e.setProperties({path:d},!0),e.pathId.push(c),e.itemData=[p],e.pathNames.push(t.getValue("name",p)),Se(e,h,e.path);break}}function K(e,i){e.originalPath=k(e,i,e.path);var n=t.getValue(e.pathId[0],e.feParent),s="fe_tree"==t.getValue("_fm_id",e.itemData[0]),a=A(e,t.isNullOrUndefined(t.getValue("id",n))?"name":"id",t.getValue("name",i));if(t.isNullOrUndefined(a)){if(s)return void W(e,e.path);e.notify(vn,{selectedNode:e.pathId[e.pathId.length-1]})}else{var r=t.getValue("_fm_id",a);e.setProperties({path:e.originalPath},!0),e.pathId.push(r),e.itemData=[a],e.pathNames.push(t.getValue("name",a))}Se(e,e.path!==e.originalPath?Zi:en,e.path)}function G(e){if(e.isDragDrop=!1,0!==e.selectedNodes.length&&e.enablePaste){var t=""===e.folderPath?e.path:e.folderPath;Y(e,e.actionRecords,t,e.path)||("move"===e.fileAction&&e.targetPath!==t||"copy"===e.fileAction?(e.notify(Nn,{}),Ne(e,e.targetPath,e.selectedNodes,t,e.fileAction,[],e.actionRecords)):(e.enablePaste=!1,e.notify(xn,{}),O(e),Ke(e,"Error",{files:null,error:{code:"402",message:H(e,"Same-Folder-Error"),fileExists:null}})))}}function Y(e,i,n,s){for(var a=!1,r=0;r<i.length;r++)if(t.getValue("isFile",i[r])){var o=e.dragNodes[r],l=0;o&&(l=o.lastIndexOf("/"));var h="";if(l>0&&(h=s+o.substring(0,l+1)),h===n){var d={files:null,error:{code:"402",message:H(e,"Same-Folder-Error"),fileExists:null}};Ke(e,"Error",d),a=!0;break}}else{var p=k(e,i[r],s);if(0===n.indexOf(p)){Ke(e,"Error",d={files:null,error:{code:"402",message:H(e,"Sub-Folder-Error"),fileExists:null}}),a=!0;break}}return a}function J(e){e.isDragDrop=!0,0!==e.dragData.length&&(e.dragPath=e.dragPath.replace(/\\/g,"/"),e.dropPath=e.dropPath.replace(/\\/g,"/"),Y(e,e.dragData,e.dropPath,e.dragPath)||e.dragPath===e.dropPath||(e.itemData=[e.dropData],Ne(e,e.dragPath,e.dragNodes,e.dropPath,"move",[],e.dragData),e.notify(Nn,{})))}function Q(e){for(var t=e.split("/"),i=t[0]+"/",n=1;n<t.length-2;n++)i+=t[n]+"/";return i}function X(e,i){var n=t.getValue(e.hasId?"id":"name",i.cwd)+"/",s=t.getValue(e.hasId?"filterId":"filterPath",i.cwd);return t.isNullOrUndefined(s)?e.path+n:""===s?e.hasId?n:"/":s.replace(/\\/g,"/")+n}function $(e,t,i){"move"===t&&(e.isDragDrop?e.notify(An,i):(e.enablePaste=!1,e.notify(xn,{}),e.notify(Rn,i))),0===e.duplicateItems.length&&(e.pasteNodes=[]);for(var n=0;n<i.files.length;n++)e.pasteNodes.push(i.files[n][e.hasId?"id":"name"]),e.isDragDrop&&e.droppedObjects.push(i.files[n]);e.duplicateItems=[],e.duplicateRecords=[],e.isDragDrop&&!e.isPasteError?e.isDropEnd=!0:e.isDropEnd=!1,!e.isDragDrop||e.path===e.dragPath||e.path===e.dropPath||e.isSearchDrag?(e.isPathDrag=!1,Se(e,En,e.path)):Z(e),e.trigger("success",{action:t,result:i})}function Z(e){var i=t.getValue("_fm_id",e.dropData);if(e.expandedId=i,e.itemData=[e.dropData],e.isPathDrag)e.notify(nn,e.itemData);else{if(e.navigationpaneModule){var n=t.select('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element);n||(i=document.querySelector('[data-id = "'+t.getValue("id",e.dropData)+'"]').getAttribute("data-uid"),n=t.select('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element)),c(n,e.dropData,e)}Se(e,Fn,e.dropPath)}}function ee(e,i){for(var n=null,s=e.isDragDrop?e.dragData:e.actionRecords,a=0;a<s.length;a++)if(t.getValue("name",s[a])===i){n=s[a];break}return n}function te(e){if(e.isSearchDrag=!1,""!==e.breadcrumbbarModule.searchObj.element.value&&(e.isSearchDrag=!0),"navigationpane"!==e.activeModule){e.dragNodes=[];for(var t=0;t<e.selectedItems.length;)e.dragNodes.push(e.selectedItems[t]),t++;0===e.selectedItems.length&&e.dragData&&1===e.dragData.length&&e.dragNodes.push(de(e,e.dragData[0]))}var i=e.createElement("div",{className:"e-fe-icon "+R(e.dragData[0])}),n=e.createElement("div",{className:"e-fe-name",innerHTML:e.dragData[0].name}),s=e.createElement("div",{className:"e-fe-content"});s.appendChild(i),s.appendChild(n);var a=e.createElement("div",{className:Ei});if(a.appendChild(s),e.dragNodes.length>1){var r=e.createElement("span",{className:"e-fe-count",innerHTML:e.dragNodes.length.toString(10)});a.appendChild(r)}e.virtualDragElement=a,e.element.appendChild(e.virtualDragElement)}function ie(e,i){var n=i;n.cancel=!1,null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),ae(e),e.element.classList.remove("e-fe-drop","e-no-drop"),O(e),e.uploadObj.dropArea=t.select("#"+e.element.id+ri,e.element);var s=t.select("."+Ei,e.element);s&&t.detach(s),S(e,i.target),e.notify(Tn,i),O(e,"hover"),n.fileDetails=e.dragData,e.trigger("fileDragStop",n,function(i){!i.cancel&&!t.isNullOrUndefined(e.targetModule)&&""!==e.targetModule&&e.dragCount>2&&J(e),e.dragCount=0})}function ne(e,i,n){var s=i;if(s.cancel=!1,s.fileDetails=e.dragData,e.dragCount=0,e.droppedObjects=[],(!e.allowDragAndDrop||"navigationpane"===e.activeModule&&t.closest(i.element,"li").getAttribute("data-uid")===e.pathId[0])&&(s.cancel=!0),"navigationpane"===e.activeModule&&-1!==e.pathId.indexOf(t.closest(i.element,"li").getAttribute("data-uid"))?e.isPathDrag=!0:e.isPathDrag=!1,O(e),s.cancel)n.intDestroy(i.event),se(e);else if(!s.cancel){for(var a=0;a<e.activeElements.length;)I(e.activeElements[a]),a++;e.trigger("fileDragStart",s,function(t){t.cancel?(n.intDestroy(i.event),se(e)):e.uploadObj.dropArea=null})}}function se(e){O(e);var i=t.select("."+Ei,e.element);i&&t.detach(i)}function ae(e){re(e,Ri),re(e,Mi)}function re(e,t){for(var i=e.element.querySelectorAll("."+t),n=0;n<i.length;n++)i[n].classList.remove(t)}function oe(e,i,n,s,a){var r,o=e.getBoundingClientRect(),l=t.select("."+n,e);s>=o.top+e.clientHeight-30&&!t.isNullOrUndefined(l)&&(r="navigationpane"===i.targetModule||"detailsview"===i.targetModule?l.offsetHeight/2.5:l.offsetHeight/4.5,e.scrollBy(0,r)),!t.isNullOrUndefined(l)&&a<=o.top+30&&(r="navigationpane"===i.targetModule||"detailsview"===i.targetModule?l.offsetHeight/2.5:l.offsetHeight/4.5,e.scrollBy(0,-r))}function le(e,i){var n=i;n.fileDetails=e.dragData;var s=!1;S(e,i.target),ae(e),null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),O(e,"hover");var a=null;"navigationpane"===e.targetModule?((a=t.closest(i.target,"li")).classList.add(Oi,Ri),s=!0,e.treeExpandTimer=window.setTimeout(function(){e.notify(Un,i)},800),oe(e.navigationpaneModule.treeObj.element.parentElement,e,"e-level-2",i.event.screenY,i.event.y)):"detailsview"===e.targetModule?((a=t.closest(i.target,"tr"))&&a.querySelector("."+ki)&&!a.classList.contains(yi)?a.classList.add(Ri):!a||a.querySelector("."+ki)||a.classList.contains(yi)||a.classList.add(Mi),s=!0,oe(e.detailsviewModule.gridObj.element.querySelector(".e-content"),e,"e-row",i.event.screenY,i.event.y)):"largeiconsview"===e.targetModule?((a=t.closest(i.target,"li"))&&a.querySelector("."+ki)&&!a.classList.contains(yi)&&a.classList.add(Oi,Ri),s=!0,oe(e.largeiconsviewModule.element.firstElementChild,e,"e-large-icon",i.event.screenY,i.event.y)):"breadcrumbbar"===e.targetModule&&(s=!0),e.element.classList.remove("e-fe-drop","e-no-drop"),e.element.classList.add(s?"e-fe-drop":"e-no-drop"),e.dragCount=e.dragCount+1,e.trigger("fileDragging",n)}function he(e){for(var i="",n=Object.keys(e),s=0;s<n.length;s++)"message"!==n[s]&&(i+=(0===s?"":", ")+n[s]+": "+t.getValue(n[s],e));return i}function de(e,i){return e.hasId?t.getValue("id",i):L(e,i)}function pe(e,i){e.itemData=[i],e.currentItemText=t.getValue("name",i),e.isFile=t.getValue("isFile",i),e.filterPath=t.getValue("filterPath",i)}function ce(e){ye(e.itemData[0])?Ke(e,"Rename"):me(e,e.itemData[0],Hn)}function ue(e){for(var t=e.itemData,i=0;i<t.length;i++)if(!we(t[i]))return void me(e,t[i],qn);e.selectedItems.length>0&&We(e,e.path,e.selectedItems)}function fe(e,t,i){for(var n=0;n<t.length;n++)if(!ye(t[n]))return void me(e,t[n],Hn);e.itemData=t,Ee(e,i,e.path,"delete")}function ge(e,t,i){for(var n=0;n<t.length;n++)if(!we(t[n]))return void me(e,t[n],qn);e.itemData=t,i.length>0&&We(e,e.path,i)}function me(e,i,n){var s=t.getValue("message",t.getValue("permission",i));""===s&&(s=H(e,"Access-Message").replace("{0}",t.getValue("name",i)).replace("{1}",n)),Ke(e,"Error",{error:{code:"401",fileExists:null,message:s}})}function be(e){return ve(e)?"e-fe-locked":"e-fe-locked e-fe-hidden"}function ve(e){var i=t.getValue("permission",e);return!(i&&!t.getValue("read",i))}function ye(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("write",i)}function Ie(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("writeContents",i)}function Oe(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("upload",i)}function we(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("download",i)}function De(e){var t=e.itemData[0];Ie(t)?Ke(e,"NewFolder"):me(e,t,Bn)}function Ce(e){var t=e.itemData[0];if(Oe(t)){var i="#"+e.element.id+li;document.querySelector(i).click()}else me(e,t,zn)}function Se(e,i,n){for(var s=e.itemData,a=0;a<s.length;a++)t.isNullOrUndefined(t.getValue("hasChild",s[a]))&&t.setValue("hasChild",!1,s[a]);ke(e,{action:"read",path:n,showHiddenItems:e.showHiddenItems,data:s},Te,i)}function je(e,t){ke(e,{action:"create",path:e.path,name:t,data:e.itemData},Fe,t)}function xe(e,i){var n={action:"filter",path:e.path,showHiddenItems:e.showHiddenItems,data:[P(e)]},s=e.filterData?t.extend(void 0,n,e.filterData):n;ke(e,s,Ae,i,t.getValue("action",s))}function Pe(e,t,i){var n,s;if(""!==e.breadcrumbbarModule.searchObj.element.value||e.isFiltered){var a=e.filterPath;e.hasId?(n=e.currentItemText,s=i):(n=(a=a.replace(/\\/g,"/")).replace(t,"")+e.currentItemText,s=a.replace(t,"")+i)}else n=e.currentItemText,s=i;ke(e,{action:"rename",path:t,name:n,newName:s,data:e.itemData,showFileExtension:e.showFileExtension},Ue,t)}function Ne(e,t,i,n,s,a,r){var o={action:s,path:t,targetData:e.itemData[0],targetPath:n,names:i,renameFiles:a,data:r};e.destinationPath=n,ke(e,o,Ve,t,s,n)}function Ee(e,t,i,n){ke(e,{action:n,path:i,names:t,data:e.itemData},_e,i)}function Re(e,t,i,n){ke(e,{action:n,path:i,names:t,data:e.itemData},He,i,n)}function Me(e){for(var i,n=e.detailsViewSettings.columns,s=0;s<n.length;s++)if("_fm_modified"===n[s].field){t.isNullOrUndefined(n[s].format)||(i=n[s].format.toString());break}return i}function ke(e,i,n,s,a,r){var o={url:e.ajaxSettings.url,type:"POST",mode:!0,dataType:"json",contentType:"application/json",data:JSON.stringify(i),onSuccess:null,onFailure:null,beforeSend:null},l={action:t.getValue("action",i),ajaxSettings:o,cancel:!1};e.trigger("beforeSend",l,function(o){o.cancel||(e.notify(dn,{}),new t.Ajax({url:t.getValue("url",o.ajaxSettings),type:t.getValue("type",o.ajaxSettings),mode:t.getValue("mode",o.ajaxSettings),dataType:t.getValue("dataType",o.ajaxSettings),contentType:t.getValue("contentType",o.ajaxSettings),data:t.getValue("data",o.ajaxSettings),beforeSend:t.getValue("beforeSend",o.ajaxSettings),onSuccess:function(l){if(t.isNullOrUndefined(l)){var h={error:{fileExists:null,message:H(e,"Server-Error")+" "+e.ajaxSettings.url,code:"406"},files:null};return void Le(e,o,n,h,s,a,r)}"string"==typeof l&&(l=JSON.parse(l)),e.notify(cn,{action:"success"});var d=e.expandedId?e.expandedId:e.pathId[e.pathId.length-1];if(!t.isNullOrUndefined(l.cwd)&&"read"===t.getValue("action",i)&&(l.cwd.name=1===e.pathId.length?e.rootAliasName||l.cwd.name:l.cwd.name,t.setValue("_fm_id",d,l.cwd),t.setValue(d,l.cwd,e.feParent),!t.isNullOrUndefined(l.files)||"401"===l.error.code)){if(("finalize-end"===s||"initial-end"===s)&&0===e.pathNames.length){var p=t.getValue(e.pathId[0],e.feParent);e.pathNames[0]=t.getValue("name",p),e.hasId=!t.isNullOrUndefined(t.getValue("id",p))}"finalize-end"===s&&b(e)}var c=new t.Internationalization(e.locale);if(!t.isNullOrUndefined(l.files)){_(l.files,c,Me(e));for(var u=0,f=l.files.length;u<f;u++){var g=l.files[u];t.setValue("_fm_iconClass",R(g),g)}"read"===t.getValue("action",i)&&(V(l,d),t.setValue(d,l.files,e.feFiles))}if(!t.isNullOrUndefined(l.details)&&!t.isNullOrUndefined(e.rootAliasName)){var m=e.rootAliasName||t.getValue("name",l.details),v=t.getValue("location",l.details).replace(new RegExp("/","g"),"\\");("/"===t.getValue("path",i)||e.hasId&&1===t.getValue("path",i).match(/[\/]/g).length)&&0===t.getValue("names",i).length?(t.setValue("name",m,l.details),v=m):v=v.replace(v.substring(0,v.indexOf("\\")),m),t.setValue("location",v,l.details)}n(e,l,s,a,r),t.isNullOrUndefined(l.files)||"path-changed"!==s&&"finalize-end"!==s&&"open-end"!==s&&"drop-path"!==s||e.notify(Ln,l),"function"==typeof t.getValue("onSuccess",o.ajaxSettings)&&t.getValue("onSuccess",o.ajaxSettings)()},onFailure:function(){var t={files:null,error:{code:"404",message:H(e,"Network-Error")+" "+e.ajaxSettings.url,fileExists:null}};Le(e,o,n,t,s,a,r)}}).send())})}function Le(e,i,n,s,a,r,o){e.notify(cn,{action:"failure"}),n(e,s,a,r,o),"function"==typeof t.getValue("onFailure",i.ajaxSettings)&&t.getValue("onFailure",i.ajaxSettings)()}function Te(e,i,n){if(t.isNullOrUndefined(i.files))"401"===i.error.code&&(i.files=[],e.notify(n,i),e.notify(bn,{})),Be(e,i,"read"),e.setProperties({path:e.oldPath},!0),e.pathNames.pop();else{e.notify(n,i),e.notify(bn,{});s={action:"read",result:i};e.trigger("success",s)}if(e.isDragDrop&&e.isDropEnd){if(0!==e.droppedObjects.length){var s={fileDetails:e.droppedObjects};e.trigger("fileDropped",s)}e.isDropEnd=e.isDragDrop=!1}}function Ae(e,i,n,s){if(t.isNullOrUndefined(i.files))Be(e,i,s);else{e.notify(n,i);var a={action:s,result:i};e.trigger("success",a)}}function Fe(e,i,n){if(t.isNullOrUndefined(i.files))if("400"===i.error.code){if(e.dialogObj&&e.dialogObj.visible){var s=t.select("#newname",e.dialogObj.element),a=H(e,"Validation-NewFolder-Exists").replace("{0}",'"'+s.value+'"');s.parentElement.nextElementSibling.innerHTML=a}else Ke(e,"Error",{files:null,error:{code:"400",message:H(e,"Validation-NewFolder-Exists").replace("{0}",'"'+n+'"'),fileExists:null}});r={action:"create",error:i.error};e.trigger("failure",r)}else e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),Be(e,i,"create");else{e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),e.createdItem=i.files[0],e.breadcrumbbarModule.searchObj.value="";var r={action:"create",result:i};e.trigger("success",r),e.itemData=[P(e)],Se(e,tn,e.path)}}function Ue(e,i,n){if(t.isNullOrUndefined(i.files))if("400"===i.error.code&&e.dialogObj&&e.dialogObj.visible){var s=t.select("#rename",e.dialogObj.element),a=H(e,"Validation-Rename-Exists").replace("{0}",'"'+e.currentItemText+'"');a=a.replace("{1}",'"'+s.value+'"'),s.parentElement.nextElementSibling.innerHTML=a;r={action:"rename",error:i.error};e.trigger("failure",r)}else t.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide(),Be(e,i,"rename");else{t.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide();var r={action:"rename",result:i};e.trigger("success",r),e.renamedItem=Array.isArray(i.files)?i.files[0]:i.files,"navigationpane"===e.activeModule?(e.pathId.pop(),e.itemData=[t.getValue(e.pathId[e.pathId.length-1],e.feParent)],Se(e,Cn,t.getValue("filterPath",e.renamedItem).replace(/\\/g,"/")),e.itemData[0]=e.renamedItem,Se(e,ln,"/"===e.path?e.path:t.getValue("filterPath",e.renamedItem).replace(/\\/g,"/")+e.renamedItem.name+"/"),t.getValue("filterPath",e.renamedItem)===t.getValue("filterPath",e.itemData[0])&&e.pathNames.length>1&&(e.pathNames[e.pathNames.length-1]=e.renameText)):(e.itemData=[P(e)],""!==e.breadcrumbbarModule.searchObj.value?ze(e,Sn,e.path,e.searchWord,e.showHiddenItems,!e.searchSettings.ignoreCase):e.isFiltered?xe(e,Sn):Se(e,Sn,e.path))}}function Ve(e,i,n,s){i.error&&i.error.fileExists?(e.fileLength=0,t.isNullOrUndefined(i.files)||(e.isPasteError=!0,$(e,s,i)),Ge(e,"DuplicateItems",i.error.fileExists),"404"===i.error.code&&Ke(e,"Error",i)):i.error||t.isNullOrUndefined(i.files)?i.error&&!t.isNullOrUndefined(i.files)?(e.isPasteError=!0,$(e,s,i),Ke(e,"Error",i)):Be(e,i,s):(e.isPasteError=!1,$(e,s,i))}function _e(e,i,n){if(t.isNullOrUndefined(i.files))Be(e,i,"delete");else if(e.setProperties({path:n},!0),e.itemData=[P(e)],Se(e,an,e.path),i.error)Be(e,i,"delete");else{var s={action:"delete",result:i};e.trigger("success",s)}}function He(e,i,n,s){if(t.isNullOrUndefined(i.details))Be(e,i,"details");else{Ke(e,s,null,i.details);var a={action:"details",result:i};e.trigger("success",a)}}function Be(e,t,i){Ke(e,"Error",t);var n={action:i,error:t.error};e.trigger("failure",n)}function ze(e,t,i,n,s,a){ke(e,{action:"search",path:i,searchString:n,showHiddenItems:s,caseSensitive:a,data:e.itemData},qe,t)}function qe(e,i,n){if(t.isNullOrUndefined(i.files))Be(e,i,"search");else{e.notify(n,i);var s={action:"search",result:i};e.trigger("success",s)}}function We(e,i,n){var s=e.ajaxSettings.downloadUrl?e.ajaxSettings.downloadUrl:e.ajaxSettings.url,a={action:"download",path:i,names:n,data:e.itemData},r={data:a,cancel:!1,useFormPost:!0,ajaxSettings:{url:s,type:"POST",contentType:"application/json",responseType:"blob",data:JSON.stringify(a),onSuccess:null,onFailure:null,beforeSend:null}};e.trigger("beforeDownload",r,function(i){if(!i.cancel)if(i.useFormPost){var n=t.createElement("form",{id:e.element.id+"_downloadForm",attrs:{action:s,method:"post",name:"downloadForm",download:""}}),a=t.createElement("input",{id:e.element.id+"_hiddenForm",attrs:{name:"downloadInput",value:JSON.stringify(i.data),type:"hidden"}});n.appendChild(a),e.element.appendChild(n),document.forms.namedItem("downloadForm").submit(),e.element.removeChild(n)}else{var r,o;new t.Fetch({url:t.getValue("url",i.ajaxSettings),type:t.getValue("type",i.ajaxSettings),contentType:t.getValue("contentType",i.ajaxSettings),responseType:t.getValue("responseType",i.ajaxSettings),beforeSend:t.getValue("beforeSend",i.ajaxSettings),onLoad:function(i){if(r=i.headers.get("Content-Disposition")){var n=r.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/),s=n&&n[1];o=s?s.replace(/['"]/g,""):o}else o=e.itemData.length>1?"files.zip":t.getValue("isFile",e.itemData[0])?t.getValue("name",e.itemData[0]):t.getValue("name",e.itemData[0])+".zip"},onSuccess:function(t){e.trigger("success",i);var n=t,s=URL.createObjectURL(n),a=document.createElement("a");a.href=s,a.download=o,document.body.appendChild(a),a.click(),document.body.removeChild(a)},onFailure:function(t){var n={error:{code:t.status.toString(),message:H(e,"Network-Error")+" "+e.ajaxSettings.downloadUrl}};Ke(e,"Error",n),e.trigger("failure",i)}}).send(JSON.stringify(i.data))}})}function Ke(e,i,s,a,r){var o=ht(e,i,s,a,r);t.isNullOrUndefined(e.dialogObj)?(e.dialogObj=new n.Dialog({beforeOpen:dt.bind(this,e,o.dialogName),beforeClose:function(t){Je(e,e.dialogObj,t,o.dialogName)},header:o.header,content:o.content,buttons:o.buttons,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,allowDragging:!0,isModal:!0,target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:B(e,e.isMobile?ci:pi),width:"350px",open:o.open,close:o.close,enableRtl:e.enableRtl,enableHtmlSanitizer:e.enableHtmlSanitizer,locale:e.locale}),e.dialogObj.isStringTemplate=!0,e.dialogObj.appendTo("#"+e.element.id+ni)):ut(e,o)}function Ge(e,i,s,a){var r=$e(e,i,s,a);e.isApplySame=!1,t.isNullOrUndefined(e.extDialogObj)?(e.extDialogObj=new n.Dialog({beforeOpen:pt.bind(this,e,r.dialogName),beforeClose:function(t){Je(e,e.extDialogObj,t,r.dialogName)},content:r.content,header:r.header,closeOnEscape:!0,allowDragging:!0,animationSettings:{effect:"None"},target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:B(e,e.isMobile?ci:pi),enableRtl:e.enableRtl,showCloseIcon:!0,isModal:!0,width:350,buttons:r.buttons,open:r.open,close:r.close,enableHtmlSanitizer:e.enableHtmlSanitizer,locale:e.locale}),e.extDialogObj.isStringTemplate=!0,e.extDialogObj.appendTo("#"+e.element.id+ai)):(e.extDialogObj.header=r.header,e.extDialogObj.close=r.close,e.extDialogObj.open=r.open,e.extDialogObj.close=r.close,e.extDialogObj.content=r.content,e.extDialogObj.buttons=r.buttons,e.extDialogObj.enableRtl=e.enableRtl,e.extDialogObj.locale=e.locale,e.extDialogObj.beforeOpen=pt.bind(this,e,r.dialogName),e.extDialogObj.beforeClose=function(t){Je(e,e.extDialogObj,t,r.dialogName)},e.extDialogObj.dataBind(),e.extDialogObj.show())}function Ye(e,t,i,n){var s={cancel:i.cancel,popupName:n,popupModule:t};e.trigger("beforePopupOpen",s,function(e){i.cancel=e.cancel})}function Je(e,t,i,n){var s={cancel:i.cancel,popupModule:t,popupName:n};e.trigger("beforePopupClose",s,function(t){i.cancel=t.cancel,i.cancel||!i.isInteracted||"Rename"!==n&&"Create Folder"!==n||e.trigger(un,{})})}function Qe(e,t,i){var n={popupModule:t,element:t.element,popupName:i};e.trigger("popupOpen",n)}function Xe(e,t,i){var n={popupModule:t,element:t.element,popupName:i};e.trigger("popupClose",n)}function $e(e,t,i,n){var s,a,r,o={header:"",content:"",buttons:[],dialogName:""};switch(o.open=function(){Qe(e,e.extDialogObj,o.dialogName)},o.close=function(){Xe(e,e.extDialogObj,o.dialogName)},t){case"Extension":o.header=H(e,"Header-Rename-Confirmation"),o.content="<div>"+H(e,"Content-Rename-Confirmation")+"</div>",o.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Yes")},click:function(){e.extDialogObj.hide(),Pe(e,n,e.renameText)}},{buttonModel:{content:H(e,"Button-No")},click:function(){e.extDialogObj.hide(),e.dialogObj.hide()}}],o.dialogName="Extension Change";break;case"DuplicateItems":o.dialogName="Duplicate Items",e.replaceItems=i,a=-1===(r=(a=e.replaceItems[e.fileLength]).lastIndexOf("/"))?a:a.substring(r),o.header=H(e,"Header-Duplicate"),s="<div>"+H(e,"Content-Duplicate")+"</div>",o.content=s.replace("{0}",a),o.close=function(){if(!e.isDropEnd&&0===e.duplicateItems.length){var t={fileDetails:e.droppedObjects};e.trigger("fileDropped",t),e.isDropEnd=e.isDragDrop=!1}Xe(e,e.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Yes")},click:function(){if(e.duplicateItems.push(e.replaceItems[e.fileLength]),e.duplicateRecords.push(ee(e,e.replaceItems[e.fileLength])),e.fileLength++,i[e.fileLength]){var t=e.replaceItems[e.fileLength],n=t.lastIndexOf("/");t=-1===n?t:t.substring(n),e.extDialogObj.content=s.replace("{0}",t),e.extDialogObj.show()}else{e.extDialogObj.hide();var a=e.isDragDrop?e.dragPath:e.targetPath,r=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath,o=e.isDragDrop?"move":e.fileAction;Ne(e,a,e.duplicateItems,r,o,e.duplicateItems,e.duplicateRecords)}}},{buttonModel:{content:H(e,"Button-No")},click:function(){if(e.fileLength++,i[e.fileLength]){var t=e.replaceItems[e.fileLength],n=t.lastIndexOf("/");t=-1===n?t:t.substring(n),e.extDialogObj.content=s.replace("{0}",t),e.extDialogObj.show()}else if(e.extDialogObj.hide(),0!==e.duplicateItems.length){var a=e.isDragDrop?"move":e.fileAction,r=e.isDragDrop?e.dragPath:e.targetPath,o=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath;Ne(e,r,e.duplicateItems,o,a,e.duplicateItems,e.duplicateRecords)}}}];break;case"UploadRetry":o.dialogName="Retry Upload",o.header=H(e,"Header-Retry"),o.content=e.retryFiles[0].name+'<div class="e-fe-retrycontent">'+H(e,"Content-Retry")+"</div>",o.open=tt.bind(this,e),o.close=function(){e.isRetryOpened=!1,et(e),Xe(e,e.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Keep-Both")},click:function(){Ze(e,!0)}},{buttonModel:{isPrimary:!0,content:H(e,"Button-Replace")},click:function(){Ze(e,!1)}},{buttonModel:{isPrimary:!0,content:H(e,"Button-Skip")},click:function(){var t=0;e.isApplySame?(t=e.retryFiles.length,e.retryFiles=[],et(e)):(t=1,e.retryFiles.splice(0,1),0!==e.retryFiles.length?Ge(e,"UploadRetry"):et(e)),e.notify(pn,{count:t})}}]}return o}function Ze(e,t){e.isApplySame?(t?it(e):nt(e),et(e)):(e.retryArgs.push({action:t?"keepboth":"replace",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1),0!==e.retryFiles.length?Ge(e,"UploadRetry"):et(e))}function et(e){var i=!0;e.isRetryOpened?e.isRetryOpened=!1:i=!1;var n=t.select(".e-dlg-checkbox",e.extDialogObj.element);n&&t.remove(n),i?e.extDialogObj.hide():e.retryFiles=[]}function tt(e,i){e.isRetryOpened=!0;var n=t.getValue("element",i),s=t.select(".e-dlg-content",n),a=e.createElement("div",{className:"e-dlg-checkbox"}),o=e.createElement("input",{id:e.element.id+"_applyall"});a.appendChild(o),s.appendChild(a),new r.CheckBox({label:H(e,"ApplyAll-Label"),change:function(t){e.isApplySame=t.checked}}).appendTo("#"+e.element.id+"_applyall"),Qe(e,e.extDialogObj,"Retry Upload")}function it(e){for(;0!==e.retryFiles.length;)e.retryArgs.push({action:"keepboth",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1)}function nt(e){for(;0!==e.retryFiles.length;)e.retryArgs.push({action:"replace",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1)}function st(e){var i=t.select("#newname",e.dialogObj.element);i.focus(),i.value="";var n=i.value.length;i.setSelectionRange(0,n)}function at(e){var i=t.select("#newname",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||lt(i,H(e,"Content-NewFolder")),i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){bt(e,i)},i.onkeyup=function(t){13===It(t)&&ft(e)},st(e),Qe(e,e.dialogObj,"Create Folder")}function rt(e){var i=t.select("#rename",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||lt(i,H(e,"Content-Rename")),i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){bt(e,i)},i.onkeyup=function(t){13===It(t)&&gt(e)},ot(e,i),Qe(e,e.dialogObj,"Rename")}function ot(e,t){t.focus();var i="";if(e.isFile&&!e.showFileExtension){var n=e.currentItemText.lastIndexOf(".");i=-1===n?e.currentItemText:e.currentItemText.substring(0,n)}else i=e.currentItemText;t.value=i,e.isFile&&e.showFileExtension&&-1!==t.value.indexOf(".")?t.setSelectionRange(0,t.value.lastIndexOf(".")):t.setSelectionRange(0,t.value.length)}function lt(e,t){a.Input.createInput({element:e,properties:{placeholder:t}})}function ht(e,i,n,s,a){var r,o,l,h,d,p={header:"",content:"",buttons:[],dialogName:""};switch(p.open=function(){Qe(e,e.dialogObj,p.dialogName)},p.close=function(){Xe(e,e.dialogObj,p.dialogName)},i=s&&!0===s.multipleFiles?"MultipleFileDetails":i){case"NewFolder":p.dialogName="Create Folder",p.header=H(e,"Header-NewFolder"),p.content='<input type="text" value="New folder" id="newname"><div class="e-fe-error"></div>',p.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Create")},click:function(t){"keydown"!==t.type&&ft(e)}}],p.open=at.bind(this,e);break;case"Delete":p.dialogName="Delete",e.selectedItems.length>1?(p.content=("<div>"+H(e,"Content-Multiple-Delete")+"</div>").replace("{0}",e.selectedItems.length.toString()),p.header=H(e,"Header-Multiple-Delete")):(p.content="<div>"+H(e,e.isFile?"Content-Delete":"Content-Folder-Delete")+"</div>",p.header=H(e,e.isFile?"Header-Delete":"Header-Folder-Delete")),p.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Yes")},click:function(t){mt(e)}},{buttonModel:{content:H(e,"Button-No")},click:function(){e.dialogObj.hide()}}];break;case"Rename":p.dialogName="Rename",p.header=H(e,"Header-Rename"),p.content='<input type="text" class="e-input" id="rename"><div class="e-fe-error"></div>',p.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Save")},click:function(t){"keydown"!==t.type&&gt(e)}}],p.open=rt.bind(this,e);break;case"details":p.dialogName="File Details",o=new t.Internationalization(e.locale).formatDate(new Date(s.modified),{format:"MMMM dd, yyyy HH:mm:ss"}),r="",t.isNullOrUndefined(s.permission)||(r="<tr><td>"+H(e,"Permission")+'</td><td class="'+Qi+'" >'+he(s.permission)+"</td></tr>"),p.header=s.name,p.content="<table><tr><td>"+H(e,"Type")+'</td><td class="'+Qi+'" title="'+(s.isFile?"File":"Folder")+'">'+(s.isFile?"File":"Folder")+"</td></tr><tr><td>"+H(e,"Size")+'</td><td><span class="'+Qi+'" title ="'+s.size+'">'+s.size+"</span></td></tr><tr><td>"+H(e,"Location")+'</td><td class="'+Qi+'" title="'+s.location+'">'+s.location+"</td></tr><tr><td>"+H(e,"Modified")+'</td><td class="'+Qi+'" >'+o+"</td></tr>"+r+"</table>",p.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Ok")},click:function(t){e.dialogObj.hide()}}];break;case"MultipleFileDetails":var c;p.dialogName="File Details",void 0==(l=e.itemData.map(function(e){return c=e.name.indexOf(".")+1,0!==c||e.isFile?0!==c?e.name.substr(c).replace(" ",""):"undetermined":"Folder"}))[0]&&(l=s.name.split(",").map(function(e){return c=e.indexOf(".")+1,0===c?"Folder":e.substr(c).replace(" ","")})),h=l.every(function(e,t,i){return e===i[0]})?"Folder"===l[0]?"Folder":l[0].toLocaleUpperCase()+" Type":"Multiple Types",d=s.location,p.header=s.name,p.content="<table><tr><td>"+H(e,"Type")+':</td><td class="'+Qi+'">'+h+"</td></tr><tr><td>"+H(e,"Size")+":</td><td>"+s.size+'<span class="'+Qi+'" title ="'+s.size+'"></span></td></tr><tr><td>'+H(e,"Location")+':</td><td class="'+Qi+'" title="'+d+'">'+d+"</td></tr></table>",p.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Ok")},click:function(t){"keydown"!==t.type&&e.dialogObj.hide()}}];break;case"Error":e.notify(un,{}),p.dialogName="Error","401"===n.error.code?p.header='<span class="e-fe-icon e-fe-access-error"></span><div class="e-fe-access-header">'+H(e,"Access-Denied")+"</div>":p.header=H(e,"Error"),p.content='<div class="'+Gi+'">'+n.error.message+"</div>",p.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Ok")},click:function(t){e.dialogObj.hide()}}]}return p}function dt(e,i,n){ct(t.selectAll(".e-btn",e.dialogObj.element)),Ye(e,e.dialogObj,n,i)}function pt(e,i,n){ct(t.selectAll(".e-btn",e.extDialogObj.element)),Ye(e,e.extDialogObj,n,i)}function ct(e){for(var t=0;t<e.length;t++)!function(t){e[t].onkeydown=function(e){13===e.keyCode&&e.preventDefault()},e[t].onkeyup=function(i){13===i.keyCode&&e[t].click()}}(t)}function ut(e,t){e.dialogObj.header=t.header,e.dialogObj.content=t.content,e.dialogObj.buttons=t.buttons,e.dialogObj.enableRtl=e.enableRtl,e.dialogObj.open=t.open,e.dialogObj.close=t.close,e.dialogObj.beforeOpen=dt.bind(this,e,t.dialogName),e.dialogObj.beforeClose=function(i){Je(e,e.dialogObj,i,t.dialogName)},e.dialogObj.dataBind(),e.dialogObj.show()}function ft(e){var i=t.select("#newname",e.dialogObj.element);vt(e,i),""===i.parentElement.nextElementSibling.innerHTML&&je(e,i.value)}function gt(e){var i=t.select("#rename",e.dialogObj.element);if(vt(e,i),""===i.parentElement.nextElementSibling.innerHTML){var n=i.value,s=e.currentItemText.lastIndexOf(".");if(e.isFile&&!e.showFileExtension&&(n+=-1===s?"":e.currentItemText.substr(s)),e.renameText=n,e.currentItemText===n)return void e.dialogObj.hide();var a="navigationpane"===e.activeModule?t.getValue("filterPath",e.itemData[0]).replace(/\\/g,"/"):e.path;if(e.renamedId=t.getValue("id",e.itemData[0]),e.isFile){var r=-1===s?"":e.currentItemText.substr(s),o=n.lastIndexOf("."),l=-1===o?"":n.substr(o);e.showFileExtension&&r!==l?Ge(e,"Extension",null,a):Pe(e,a,n)}else Pe(e,a,n)}}function mt(e){e.dialogObj.hide(),e.notify(sn,{})}function bt(e,t){/[\/\\|*?"<>:]/.test(t.value)?yt(e,t):""===t.value?t.parentElement.nextElementSibling.innerHTML=H(e,"Validation-Empty"):t.parentElement.nextElementSibling.innerHTML=""}function vt(e,t){bt(e,t);var i=t.value.length-1;""===t.value||t.value.lastIndexOf(".")!==i&&t.value.lastIndexOf(" ")!==i||!e.showFileExtension&&-1!==t.value.lastIndexOf(".")&&0!==t.value.substring(t.value.indexOf(".")+1).length||yt(e,t)}function yt(e,t){var i=H(e,"Validation-Invalid").replace("{0}",'"'+t.value+'"');e.enableHtmlSanitizer?t.parentElement.nextElementSibling.textContent=i:t.parentElement.nextElementSibling.innerHTML=i}function It(e){return e.keyCode?e.keyCode:e.which?e.which:e.charCode}function Ot(e,i,s){var a=t.createElement("div",{className:"e-image-wrap"}),r=t.createElement("img",{className:"e-image",attrs:{src:s,alt:i}});a.appendChild(r),t.isNullOrUndefined(e.viewerObj)?(e.viewerObj=new n.Dialog({header:i,content:a,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,isModal:!0,width:"350px",height:"350px",target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:B(e,e.isMobile?ci:pi),locale:e.locale,enableResize:!0,allowDragging:!0,enableHtmlSanitizer:e.enableHtmlSanitizer,position:{X:"center",Y:"center"},enableRtl:e.enableRtl,open:wt.bind(this,e),close:function(){Xe(e,e.viewerObj,"Image Preview")},beforeOpen:function(t){Ye(e,e.viewerObj,t,"Image Preview")},beforeClose:function(t){Je(e,e.viewerObj,t,"Image Preview")},resizing:Dt.bind(this,e),resizeStop:Dt.bind(this,e)}),e.viewerObj.isStringTemplate=!0,e.viewerObj.appendTo("#"+e.element.id+si)):(e.viewerObj.refresh(),e.viewerObj.header=i,e.viewerObj.content=a,e.viewerObj.enableRtl=e.enableRtl,e.viewerObj.dataBind(),e.viewerObj.show())}function wt(e){setTimeout(function(){e.viewerObj&&e.viewerObj.element.focus()}),Dt(e),Qe(e,e.viewerObj,"Image Preview")}function Dt(e){var i=t.select(".e-dlg-content",e.viewerObj.element),n=t.select(".e-image-wrap",e.viewerObj.element),s=window.getComputedStyle(i,null),a=s?2*parseFloat(s.paddingRight):36,r=s?2*parseFloat(s.paddingBottom):20;n.style.width=i.offsetWidth-a+"px",n.style.height=i.offsetHeight-r+"px"}var Ct=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),St=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},jt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ct(i,e),St([t.Property(null)],i.prototype,"downloadUrl",void 0),St([t.Property(null)],i.prototype,"getImageUrl",void 0),St([t.Property(null)],i.prototype,"uploadUrl",void 0),St([t.Property(null)],i.prototype,"url",void 0),i}(t.ChildProperty),xt=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Nt=["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"],Et=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Pt([t.Property(Nt)],i.prototype,"items",void 0),Pt([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),Rt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Pt([t.Property("")],i.prototype,"id",void 0),Pt([t.Property("")],i.prototype,"text",void 0),Pt([t.Property("auto")],i.prototype,"width",void 0),Pt([t.Property("")],i.prototype,"cssClass",void 0),Pt([t.Property(!1)],i.prototype,"showAlwaysInPopup",void 0),Pt([t.Property(!1)],i.prototype,"disabled",void 0),Pt([t.Property("")],i.prototype,"prefixIcon",void 0),Pt([t.Property("")],i.prototype,"suffixIcon",void 0),Pt([t.Property(!0)],i.prototype,"visible",void 0),Pt([t.Property("None")],i.prototype,"overflow",void 0),Pt([t.Property("")],i.prototype,"template",void 0),Pt([t.Property("Button")],i.prototype,"type",void 0),Pt([t.Property("Both")],i.prototype,"showTextOn",void 0),Pt([t.Property(null)],i.prototype,"htmlAttributes",void 0),Pt([t.Property("")],i.prototype,"tooltipText",void 0),Pt([t.Property("Left")],i.prototype,"align",void 0),Pt([t.Property(-1)],i.prototype,"tabIndex",void 0),Pt([t.Property()],i.prototype,"name",void 0),i}(t.ChildProperty),Mt=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),kt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Lt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Mt(i,e),kt([t.Property(!0)],i.prototype,"allowSearchOnTyping",void 0),kt([t.Property("contains")],i.prototype,"filterType",void 0),kt([t.Property(!0)],i.prototype,"ignoreCase",void 0),kt([t.Property(null)],i.prototype,"placeholder",void 0),i}(t.ChildProperty),Tt=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),At=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Ft=[{field:"name",headerText:"Name",minWidth:120,isPrimaryKey:!0,template:'<span class="e-fe-text">${name}</span>',customAttributes:{class:"e-fe-grid-name"}},{field:"_fm_modified",headerText:"DateModified",type:"dateTime",format:"MMMM dd, yyyy HH:mm",minWidth:120,width:"190"},{field:"size",headerText:"Size",minWidth:90,width:"110",template:t.initializeCSPTemplate(function(e){return'<span class="e-fe-size">'+e.size+"</span>"}),format:"n2"}],Ut=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Tt(i,e),At([t.Property(!0)],i.prototype,"columnResizing",void 0),At([t.Property(Ft)],i.prototype,"columns",void 0),i}(t.ChildProperty),Vt=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_t=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Ht=["Open","|","Cut","Copy","|","Delete","Download","Rename","|","Details"],Bt=["Open","|","Cut","Copy","Paste","|","Delete","Rename","Download","|","Details"],zt=["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"],qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),_t([t.Property(Ht)],i.prototype,"file",void 0),_t([t.Property(Bt)],i.prototype,"folder",void 0),_t([t.Property(zt)],i.prototype,"layout",void 0),_t([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),Wt=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Kt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Gt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Wt(i,e),Kt([t.Property("650px")],i.prototype,"maxWidth",void 0),Kt([t.Property("240px")],i.prototype,"minWidth",void 0),Kt([t.Property(!0)],i.prototype,"visible",void 0),Kt([t.Property("None")],i.prototype,"sortOrder",void 0),i}(t.ChildProperty),Yt=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Jt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Yt(i,e),Jt([t.Property("")],i.prototype,"allowedExtensions",void 0),Jt([t.Property(!0)],i.prototype,"autoUpload",void 0),Jt([t.Property(!1)],i.prototype,"autoClose",void 0),Jt([t.Property(!1)],i.prototype,"directoryUpload",void 0),Jt([t.Property(0)],i.prototype,"minFileSize",void 0),Jt([t.Property(3e7)],i.prototype,"maxFileSize",void 0),i}(t.ChildProperty),Xt=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$t=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Xt(i,e),$t([t.Property("")],i.prototype,"field",void 0),$t([t.Property("")],i.prototype,"headerText",void 0),$t([t.Property("")],i.prototype,"width",void 0),$t([t.Property("")],i.prototype,"minWidth",void 0),$t([t.Property("")],i.prototype,"maxWidth",void 0),$t([t.Property("Left")],i.prototype,"textAlign",void 0),$t([t.Property(null)],i.prototype,"headerTextAlign",void 0),$t([t.Property(null)],i.prototype,"type",void 0),$t([t.Property(null)],i.prototype,"format",void 0),$t([t.Property(null)],i.prototype,"template",void 0),$t([t.Property(null)],i.prototype,"sortComparer",void 0),$t([t.Property(null)],i.prototype,"headerTemplate",void 0),$t([t.Property(!0)],i.prototype,"allowSorting",void 0),$t([t.Property(!0)],i.prototype,"allowResizing",void 0),$t([t.Property(null)],i.prototype,"customAttributes",void 0),$t([t.Property("")],i.prototype,"hideAtMedia",void 0),$t([t.Property(null)],i.prototype,"customFormat",void 0),$t([t.Property(!1)],i.prototype,"isPrimaryKey",void 0),i}(t.ChildProperty),ei="_layout",ti="_grid",ii="_largeicons",ni="_dialog",si="_img_dialog",ai="_extn_dialog",ri="_content",oi="_breadcrumbbar",li="_upload",hi="e-filemanager",di="e-control",pi="e-fe-popup",ci="e-fe-popup e-fe-mobile",ui="e-fe-m-filter",fi="e-large-icons",gi="e-list-item",mi="e-list-text",bi="e-icons e-fe-tick",vi="e-icons e-fe-dot",yi="e-blur",Ii="e-active",Oi="e-hover",wi="e-focus",Di="e-focused",Ci="e-check",Si="e-checkbox-wrapper",ji="e-row",xi="e-empty",Pi="e-empty-content",Ni="e-empty-inner-content",Ei="e-fe-clone",Ri="e-fe-drop-folder",Mi="e-fe-drop-file",ki="e-fe-folder",Li="e-fe-image",Ti="e-fe-music",Ai="e-fe-video",Fi="e-large-icon",Ui="e-empty-icon e-fe-folder",Vi="e-gridheader",_i="e-treeview",Hi="e-menu-icon",Bi="e-content",zi="e-gridcontent",qi="e-icons e-fe-cut",Wi="e-icons e-fe-grid",Ki="e-icons e-fe-large",Gi="e-fe-errorcontent",Yi="e-rtl",Ji="e-display-none",Qi="e-fe-value",Xi="isFile",$i="model-changed",Zi="initial-end",en="finalize-end",tn="create-end",nn="path-drag",sn="delete-init",an="delete-end",rn="refresh-end",on="resize-end",ln="path-changed",hn="destroy",dn="before-request",pn="skip-upload",cn="after-request",un="actionFailure",fn="search",gn="open-init",mn="open-end",bn="selection-changed",vn="clear-path-init",yn="layout-change",In="sort-by-change",On="details-init",wn="menu-item-data",Dn="rename-init",Cn="rename-end-parent",Sn="rename-end",jn="show-paste",xn="hide-paste",Pn="cut-copy-init",Nn="paste-init",En="paste-end",Rn="cut-end",Mn="sort-column",kn="path-column",Ln="search-change",Tn="drop-init",An="drag-end",Fn="drop-path",Un="dragging",Vn="method-call",_n="read",Hn="write",Bn="writeContents",zn="upload",qn="download",Wn=function(){function e(e){this.isInteraction=!0,this.uploadOperation=!1,this.count=0,this.isRendered=!0,this.tapCount=0,this.isSelectAllCalled=!1,this.isPasteOperation=!1,this.isInteracted=!0,this.parent=e,this.element=t.select("#"+this.parent.element.id+ii,this.parent.element),t.addClass([this.element],fi),this.addEventListener(),this.keyConfigs={end:"end",home:"home",tab:"tab",moveDown:"downarrow",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",ctrlEnd:"ctrl+end",ctrlHome:"ctrl+home",ctrlDown:"ctrl+downarrow",ctrlLeft:"ctrl+leftarrow",ctrlRight:"ctrl+rightarrow",ctrlUp:"ctrl+uparrow",shiftEnd:"shift+end",shiftHome:"shift+home",shiftDown:"shift+downarrow",shiftLeft:"shift+leftarrow",shiftRight:"shift+rightarrow",shiftUp:"shift+uparrow",csEnd:"ctrl+shift+end",csHome:"ctrl+shift+home",csDown:"ctrl+shift+downarrow",csLeft:"ctrl+shift+leftarrow",csRight:"ctrl+shift+rightarrow",csUp:"ctrl+shift+uparrow",space:"space",ctrlSpace:"ctrl+space",shiftSpace:"shift+space",csSpace:"ctrl+shift+space",ctrlA:"ctrl+a",enter:"enter",altEnter:"alt+enter",esc:"escape",del:"delete",ctrlX:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"ctrl+v",f2:"f2",shiftdel:"shift+delete",back:"backspace",ctrlD:"ctrl+d"}}return e.prototype.render=function(e){if(this.parent.visitedItem=null,this.startItem=null,n.showSpinner(this.parent.element),"LargeIcons"===this.parent.view){this.resetMultiSelect(),this.element.setAttribute("tabindex","0"),this.listObj&&(this.unWireEvents(),this.removeEventListener()),this.parent.notify("hide-layout",{});var i=t.select("#"+this.parent.element.id+ii,this.parent.element),a=t.select("ul",i);if(a&&t.remove(a),this.listObj={ariaAttributes:{itemRole:"option",listRole:"listbox",itemText:"",groupItemRole:"group",wrapperRole:""},showIcon:!0,fields:{text:"name",iconCss:"_fm_icon",imageUrl:"_fm_imageUrl",htmlAttributes:"_fm_htmlAttr"},sortOrder:this.parent.sortOrder,itemCreated:this.onItemCreated.bind(this),enableHtmlSanitizer:this.parent.enableHtmlSanitizer},this.items=[],this.items=this.renderList(e),this.parent.sortComparer&&"None"!==this.parent.sortBy?this.items=this.allItems=s.DataUtil.sort(this.items,this.parent.sortBy,this.comparer.bind(this)):this.items=this.allItems=T(this.parent,this.items),i.classList.remove(Ji),this.parent.enableVirtualization&&this.allItems.length>0&&(this.element.style.height||this.adjustHeight(),this.parent.virtualizationModule.setUIVirtualization()),this.listElements=o.ListBase.createListFromJson(t.createElement,this.items,this.listObj),this.itemList=Array.prototype.slice.call(t.selectAll("."+gi,this.listElements)),this.element.appendChild(this.listElements),this.listElements.setAttribute("aria-label","listbox"),this.preventImgDrag(),this.createDragObj(),0===this.itemList.length){var r=this.element.querySelector(".e-list-parent");this.element.removeChild(r),F(this.parent,this.element,e)}else 0!==this.itemList.length&&this.element.querySelector("."+xi)&&this.element.removeChild(this.element.querySelector("."+xi));!0===this.isPasteOperation&&(this.selectItems(this.parent.pasteNodes),this.isPasteOperation=!1),!0===this.uploadOperation&&(this.selectItems(this.parent.uploadItem),this.parent.setProperties({selectedItems:[]},!0),++this.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[]));var l=this.element.querySelectorAll("."+Ii);0!==l.length&&(this.parent.activeModule="largeiconsview");for(var h=0;h<l.length;h++)l[h].setAttribute("aria-selected","true");this.adjustHeight(),this.element.style.maxHeight="100%",this.getItemCount(),this.addEventListener(),this.wireEvents(),this.parent.enableVirtualization&&this.allItems.length>0&&(this.parent.virtualizationModule.setUlElementHeight(),this.parent.virtualizationModule.wireScrollEvent(!1)),this.isRendered=!0,n.hideSpinner(this.parent.element),this.parent.selectedItems.length&&this.checkItem()}},e.prototype.comparer=function(e,t,i,n){if("Descending"===this.parent.sortOrder){var s=e;e=t,t=s}return this.parent.sortComparer(e,t)},e.prototype.preventImgDrag=function(){for(var e=0;e<this.itemList.length;)this.itemList[e].querySelector("img")&&(this.itemList[e].ondragstart=function(){return!1}),e++},e.prototype.createDragObj=function(){var e=this;this.listObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.listElements,{enableTailMode:!0,distance:5,enableAutoScroll:!1,dragTarget:"."+Fi,helper:this.dragHelper.bind(this),cursorAt:this.parent.dragCursorPosition,dragArea:this.parent.element,dragStop:ie.bind(this,this.parent),drag:le.bind(this,this.parent),clone:!0,dragStart:function(t){ne(e.parent,t,e.dragObj)}})):this.dragObj&&!this.parent.allowDragAndDrop&&this.dragObj.destroy())},e.prototype.dragHelper=function(e){var i=e.sender.target,n=t.closest(i,".e-list-item");if(!n)return null;n&&!n.classList.contains("e-active")&&this.setFocus(n);var s=this.element.querySelectorAll("."+Ii);this.parent.activeElements=[],this.parent.dragData=[];for(var a=0;a<s.length;a++)this.parent.dragData.push(this.getItemObject(s[a])),this.parent.activeElements.push(s[a]);return w(this.parent,n),this.parent.dragPath=this.parent.path,te(this.parent),this.parent.virtualDragElement},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=t.closest(e.target,".e-list-item"),n=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent);if(i){var s=this.getItemObject(i);this.parent.dropPath=s.isFile?this.parent.path:k(this.parent,s,this.parent.path),this.parent.dropData=s.isFile?n:s}else this.parent.dropPath=this.parent.path,this.parent.dropData=n}},e.prototype.getModuleName=function(){return"largeiconsview"},e.prototype.adjustHeight=function(){var e=t.select("#"+this.parent.element.id+ri,this.parent.element),i=t.select("#"+this.parent.element.id+oi,this.parent.element);this.element.style.height=e.offsetHeight-i.offsetHeight+"px"},e.prototype.onItemCreated=function(e){if(e.item.removeAttribute("aria-level"),!this.parent.showFileExtension&&t.getValue("isFile",e.curData)){var i=e.item.querySelector("."+mi),n=t.getValue("name",e.curData),s=t.getValue("type",e.curData);i.innerHTML=n.substr(0,n.length-s.length)}this.renderCheckbox(e);var a={element:e.item,fileDetails:e.curData,module:"LargeIconsView"};this.parent.trigger("fileLoad",a)},e.prototype.renderCheckbox=function(e){if(this.parent.showItemCheckBoxes){var i=r.createCheckBox(t.createElement,!1,{checked:!1,cssClass:"e-small"});i.setAttribute("role","checkbox"),i.setAttribute("aria-checked","false"),i.setAttribute("aria-label","checkbox"),e.item.firstElementChild.insertBefore(i,e.item.firstElementChild.childNodes[0])}},e.prototype.onLayoutChange=function(e){if("LargeIcons"===this.parent.view){if(this.destroy(),this.parent.enableVirtualization&&this.parent.setProperties({selectedItems:[]},!0),this.render(e),"layout-change"===t.getValue("name",e)&&"move"===this.parent.fileAction&&this.parent.isCut&&this.parent.selectedNodes&&0!==this.parent.selectedNodes.length)for(var i=this.getIndexes(this.parent.selectedNodes),n=0;n<i.length;)I(this.itemList[i[n]]),n++;0!==this.element.querySelectorAll("."+Ii).length&&this.element.focus(),this.checkItem(),this.parent.isLayoutChange=!1}else this.element.setAttribute("tabindex","-1")},e.prototype.checkItem=function(){var e=this.element.querySelectorAll("."+Ii);if(e)for(var t=0;t<e.length;)this.checkState(e[t],!0),t++},e.prototype.renderList=function(e){for(var i=0,n=JSON.parse(JSON.stringify(e.files));i<n.length;){var s=R(n[i]),a=t.getValue("name",n[i]),r=de(this.parent,n[i]),o=this.parent.selectedItems&&-1!==this.parent.selectedItems.indexOf(r)?Fi+" e-active":Fi;if(ye(n[i])||(o+=" "+be(n[i])),s===Li&&this.parent.showThumbnail&&ve(n[i])){var l=M(this.parent,n[i]);t.setValue("_fm_imageUrl",l,n[i]),t.setValue("_fm_imageAttr",{alt:a},n[i])}else t.setValue("_fm_icon",s,n[i]);t.setValue("_fm_htmlAttr",{class:o,title:a},n[i]),i++}return n},e.prototype.onFinalizeEnd=function(e){this.render(e)},e.prototype.onCreateEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.clearSelect(),this.selectItems([t.getValue(this.parent.hasId?"id":"name",this.parent.createdItem)]),this.parent.createdItem=null,this.parent.largeiconsviewModule.element.focus(),this.parent.activeModule="largeiconsview")},e.prototype.onSelectedData=function(){"largeiconsview"===this.parent.activeModule&&this.updateSelectedData()},e.prototype.onDeleteInit=function(){"largeiconsview"===this.parent.activeModule&&Ee(this.parent,this.parent.selectedItems,this.parent.path,"delete")},e.prototype.onDeleteEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.parent.setProperties({selectedItems:[]},!0),this.clearSelect())},e.prototype.onRefreshEnd=function(e){"LargeIcons"===this.parent.view&&this.onLayoutChange(e)},e.prototype.onRenameInit=function(){"largeiconsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},e.prototype.onPathChanged=function(e){this.parent.isCut=!1,""===this.parent.breadcrumbbarModule.searchObj.element.value&&(this.parent.searchedItems=[]),"LargeIcons"===this.parent.view&&(O(this.parent),this.parent.setProperties({selectedItems:[]},!0),this.onLayoutChange(e),this.parent.renamedItem&&(this.clearSelect(),this.addSelection(this.parent.renamedItem),this.parent.renamedItem=null))},e.prototype.onOpenInit=function(e){"largeiconsview"===this.parent.activeModule&&this.doOpenAction(e.target)},e.prototype.onHideLayout=function(){"LargeIcons"!==this.parent.view&&this.element&&this.element.classList.add(Ji)},e.prototype.onSelectAllInit=function(){if("LargeIcons"===this.parent.view){this.startItem=this.getFirstItem();var e=this.getLastItem(),t={ctrlKey:!0,shiftKey:!0};this.doSelection(e,t),this.isInteraction=!0,this.isInteracted=!0}},e.prototype.onClearAllInit=function(){"LargeIcons"===this.parent.view&&(this.clearSelection(),this.isInteraction=!0,this.isInteracted=!0)},e.prototype.onBeforeRequest=function(){this.isRendered=!1},e.prototype.onAfterRequest=function(){this.isRendered=!0},e.prototype.onSearch=function(e){"LargeIcons"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(bn,{}),this.parent.searchedItems=e.files,this.onLayoutChange(e))},e.prototype.onLayoutRefresh=function(){"LargeIcons"===this.parent.view&&this.adjustHeight()},e.prototype.onUpdateSelectionData=function(){"LargeIcons"===this.parent.view&&this.updateSelectedData()},e.prototype.onPathColumn=function(){"LargeIcons"!==this.parent.view||t.isNullOrUndefined(this.listObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||"filterPath"!==this.parent.sortBy||(this.parent.sortBy="name",this.parent.notify(In,{}))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(kn,this.onPathColumn),this.parent.off(en,this.onFinalizeEnd),this.parent.off(tn,this.onCreateEnd),this.parent.off("selected-data",this.onSelectedData),this.parent.off(sn,this.onDeleteInit),this.parent.off(an,this.onDeleteEnd),this.parent.off(rn,this.onRefreshEnd),this.parent.off(ln,this.onPathChanged),this.parent.off(yn,this.onLayoutChange),this.parent.off(fn,this.onSearch),this.parent.off(gn,this.onOpenInit),this.parent.off(mn,this.onPathChanged),this.parent.off($i,this.onPropertyChanged),this.parent.off(Vn,this.onMethodCall),this.parent.off(un,this.onActionFailure),this.parent.off(Dn,this.onRenameInit),this.parent.off(Sn,this.onPathChanged),this.parent.off("hide-layout",this.onHideLayout),this.parent.off("select-all-init",this.onSelectAllInit),this.parent.off("clear-all-init",this.onClearAllInit),this.parent.off(wn,this.onMenuItemData),this.parent.off(dn,this.onBeforeRequest),this.parent.off(cn,this.onAfterRequest),this.parent.off("splitter-resize",this.splitterResizeHandler),this.parent.off(on,this.resizeHandler),this.parent.off(Nn,this.onpasteInit),this.parent.off(En,this.onpasteEnd),this.parent.off(Pn,this.oncutCopyInit),this.parent.off(Tn,this.onDropInit),this.parent.off(On,this.onDetailsInit),this.parent.off("layout-refresh",this.onLayoutRefresh),this.parent.off(Fn,this.onDropPath),this.parent.off("update-selection-data",this.onUpdateSelectionData),this.parent.off("filter-end",this.onPathChanged))},e.prototype.addEventListener=function(){this.parent.on(kn,this.onPathColumn,this),this.parent.on(en,this.onFinalizeEnd,this),this.parent.on(tn,this.onCreateEnd,this),this.parent.on(rn,this.onRefreshEnd,this),this.parent.on("selected-data",this.onSelectedData,this),this.parent.on(ln,this.onPathChanged,this),this.parent.on(sn,this.onDeleteInit,this),this.parent.on(Nn,this.onpasteInit,this),this.parent.on(an,this.onDeleteEnd,this),this.parent.on(yn,this.onLayoutChange,this),this.parent.on(fn,this.onSearch,this),this.parent.on(gn,this.onOpenInit,this),this.parent.on(Dn,this.onRenameInit,this),this.parent.on(Sn,this.onPathChanged,this),this.parent.on(mn,this.onPathChanged,this),this.parent.on($i,this.onPropertyChanged,this),this.parent.on(Vn,this.onMethodCall,this),this.parent.on(un,this.onActionFailure,this),this.parent.on("hide-layout",this.onHideLayout,this),this.parent.on("select-all-init",this.onSelectAllInit,this),this.parent.on("clear-all-init",this.onClearAllInit,this),this.parent.on(wn,this.onMenuItemData,this),this.parent.on(dn,this.onBeforeRequest,this),this.parent.on(cn,this.onAfterRequest,this),this.parent.on(Tn,this.onDropInit,this),this.parent.on(On,this.onDetailsInit,this),this.parent.on("splitter-resize",this.splitterResizeHandler,this),this.parent.on(on,this.resizeHandler,this),this.parent.on(En,this.onpasteEnd,this),this.parent.on(Pn,this.oncutCopyInit,this),this.parent.on("layout-refresh",this.onLayoutRefresh,this),this.parent.on(Fn,this.onDropPath,this),this.parent.on("update-selection-data",this.onUpdateSelectionData,this),this.parent.on("filter-end",this.onPathChanged,this)},e.prototype.onActionFailure=function(){this.isInteraction=!0,this.isInteracted=!0},e.prototype.onMenuItemData=function(e){if(this.parent.activeModule===this.getModuleName()){var i=t.closest(e.target,"li");this.parent.itemData=[this.getItemObject(i)]}},e.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.updateSelectedData():this.parent.itemData=[t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},e.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""===this.parent.folderPath?[P(this.parent)]:[this.getItemObject(t.select(".e-active",this.element))])},e.prototype.oncutCopyInit=function(){if(this.parent.activeModule===this.getModuleName()){var e=this.element.querySelectorAll("."+Ii);this.parent.activeRecords=[],this.parent.activeElements=[];for(var t=0;t<e.length;t++)this.parent.activeElements.push(e[t]),this.parent.activeRecords.push(this.getItemObject(e[t]))}},e.prototype.onpasteEnd=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,this.parent.path!==this.parent.destinationPath&&this.parent.path!==X(this.parent,e)||this.onPathChanged(e))},e.prototype.onDropPath=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},e.prototype.onPropertyChanged=function(e){var i;if(e.module===this.getModuleName()||"common"===e.module)for(var n=0,s=Object.keys(e.newProp);n<s.length;n++)switch(s[n]){case"allowDragAndDrop":this.createDragObj();break;case"height":this.adjustHeight();break;case"selectedItems":this.isInteraction=!1,this.isInteracted=!1,i=t.isNullOrUndefined(this.parent.selectedItems)?[]:this.parent.selectedItems.slice(0),i=this.parent.allowMultiSelection?i:i.slice(i.length-1),this.parent.setProperties({selectedItems:[]},!0),this.onClearAllInit(),i.length&&this.selectItems(i),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),this.isInteraction=!0,this.isInteracted=!0;break;case"showThumbnail":j(this.parent);break;case"showFileExtension":case"showHiddenItems":Se(this.parent,ln,this.parent.path);break;case"allowMultiSelection":if("LargeIcons"!==this.parent.view)break;j(this.parent);break;case"view":C(this.parent,"LargeIcons")}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.listObj&&this.unWireEvents(),this.startItem=null,this.listElements=null)},e.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new t.KeyboardEvents(this.element,{keyAction:this.keydownActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),t.EventHandler.add(this.element,"mouseover",this.onMouseOver,this)},e.prototype.unWireEvents=function(){this.wireClickEvent(!1),t.EventHandler.remove(this.element,"mouseover",this.onMouseOver),this.keyboardModule.destroy(),this.keyboardDownModule.destroy()},e.prototype.onMouseOver=function(e){var i=t.closest(e.target,".e-list-item");O(this.parent,"hover"),null!==i&&i.classList.add(Oi)},e.prototype.wireClickEvent=function(e){if(e){var i=this;this.clickObj=new t.Touch(this.element,{tap:function(e){e.originalEvent.preventDefault(),i.parent.isDevice?(i.tapCount=e.tapCount,i.tapEvent=e,setTimeout(function(){i.tapCount>0&&i.doTapAction(i.tapEvent),i.tapCount=0},350)):2===e.tapCount&&3!==e.originalEvent.which?i.dblClickHandler(e):i.clickHandler(e)},tapHold:function(e){i.parent.isDevice&&(i.multiSelect=!!i.parent.allowMultiSelection,i.parent.allowMultiSelection&&t.addClass([i.parent.element],"e-fe-m-select"),i.clickHandler(e))}})}else this.clickObj&&this.clickObj.destroy()},e.prototype.doTapAction=function(e){var i=e.originalEvent.target,n=t.closest(i,"."+gi);this.multiSelect||i.classList.contains("e-list-parent")||t.isNullOrUndefined(n)?this.clickHandler(e):(this.parent.isFile=!1,this.updateType(n),this.parent.isFile?2===e.tapCount?(this.clickHandler(e),this.dblClickHandler(e)):this.clickHandler(e):this.dblClickHandler(e))},e.prototype.clickHandler=function(e){var t=e.originalEvent.target;O(this.parent,"hover"),this.doSelection(t,e.originalEvent),this.parent.activeModule="largeiconsview"},e.prototype.doSelection=function(e,i){var n=t.closest(e,"."+gi),s=e.classList;this.parent.isFile=!1;var a="select";if(3===i.which&&!t.isNullOrUndefined(n)&&n.classList.contains(Ii))return void this.updateType(n);if(t.isNullOrUndefined(n))this.parent.selectedItems.length===this.itemList.length&&(this.isSelectAllCalled=!0),this.clearSelection();else if(this.parent.allowMultiSelection&&n.classList.contains(Ii)&&(i.ctrlKey||e.classList.contains(Ci))&&(a="unselect"),i.ctrlKey&&i.shiftKey&&(this.isSelectAllCalled=!0),!0!==this.triggerSelection(a,n).cancel){if(this.parent.allowMultiSelection&&(this.multiSelect||!i||i.ctrlKey)||s.contains("e-frame")||(this.updateType(n),this.clearSelect()),this.parent.allowMultiSelection&&i.shiftKey){i&&i.ctrlKey||this.clearSelect(),this.startItem||(this.startItem=n);var r=this.itemList.indexOf(this.startItem),o=this.itemList.indexOf(n);if(r>o)for(l=r;l>=o;l--)this.addActive(this.itemList[l]);else for(var l=r;l<=o;l++)this.addActive(this.itemList[l]);this.addFocus(this.itemList[o])}else this.startItem=n,this.parent.allowMultiSelection&&n.classList.contains(Ii)?this.removeActive(n):this.addActive(n),this.addFocus(n);0===this.parent.selectedItems.length&&this.resetMultiSelect(),this.parent.notify(bn,{}),this.triggerSelect(a,n)}t.isNullOrUndefined(n)||(this.isSelectAllCalled=!1,this.updateType(n))},e.prototype.dblClickHandler=function(e){this.parent.activeModule="largeiconsview";var t=e.originalEvent.target;this.doOpenAction(t)},e.prototype.clearSelection=function(){this.clearSelect(),this.resetMultiSelect(),this.parent.notify(bn,{})},e.prototype.resetMultiSelect=function(){this.multiSelect=!1,t.removeClass([this.parent.element],"e-fe-m-select")},e.prototype.doOpenAction=function(e){var i=this;if(!t.isNullOrUndefined(e)){var n=t.closest(e,"."+gi);if(this.parent.isFile=!1,!t.isNullOrUndefined(n)){this.updateType(n);var s=this.getItemObject(n);if(!ve(s))return void me(this.parent,s,_n);var a={cancel:!1,fileDetails:s,module:"LargeIconsView"};this.parent.trigger("fileOpen",a,function(e){if(!e.cancel){var n=t.getValue("name",s);if(i.parent.isFile){if(R(s)===Li){var a=M(i.parent,s);Ot(i.parent,n,a)}}else{if(""!==i.parent.breadcrumbbarModule.searchObj.element.value||i.parent.isFiltered)K(i.parent,s);else{var r=t.getValue("id",s);i.parent.oldPath=i.parent.path;var o=i.parent.path+(t.isNullOrUndefined(r)?n:r)+"/";i.parent.setProperties({path:o},!0),i.parent.pathNames.push(n),i.parent.pathId.push(t.getValue("_fm_id",s)),i.parent.itemData=[s],x(i.parent)}i.parent.isFiltered=!1,i.parent.setProperties({selectedItems:[]},!0)}}})}}},e.prototype.updateType=function(e){var i=t.select("."+ki,e);this.parent.isFile=!!t.isNullOrUndefined(i)},e.prototype.keydownActionHandler=function(e){if(this.isRendered)switch(e.action){case"end":case"home":case"moveDown":case"moveLeft":case"moveRight":case"moveUp":case"ctrlEnd":case"shiftEnd":case"csEnd":case"ctrlHome":case"shiftHome":case"csHome":case"ctrlDown":case"shiftDown":case"csDown":case"ctrlLeft":case"shiftLeft":case"csLeft":case"ctrlRight":case"shiftRight":case"csRight":case"space":case"ctrlSpace":case"shiftSpace":case"csSpace":case"ctrlA":case"enter":case"altEnter":case"esc":case"del":case"shiftdel":case"ctrlC":case"ctrlV":case"ctrlX":case"f2":case"ctrlD":e.preventDefault()}},e.prototype.keyActionHandler=function(e){var i=this;if(this.isRendered){var n=this.getFocusedItem(),s=this.getFirstItem(),a=this.getLastItem();switch(e.action){case"end":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTo(0,this.element.firstElementChild.scrollHeight),setTimeout(function(){i.navigateItem(i.itemList[i.itemList.length-1])},10)):this.navigateItem(a);break;case"home":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTop=0,setTimeout(function(){i.navigateItem(i.itemList[0])},10)):this.navigateItem(s);break;case"tab":t.isNullOrUndefined(n)?t.isNullOrUndefined(s)||this.addFocus(s):this.addFocus(n);break;case"moveDown":this.navigateDown(n,!0);break;case"moveLeft":this.navigateRight(n,!1);break;case"moveRight":this.navigateRight(n,!0);break;case"moveUp":this.navigateDown(n,!1);break;case"ctrlEnd":case"shiftEnd":case"csEnd":this.csEndKey(a,e);break;case"ctrlHome":case"shiftHome":case"csHome":this.csHomeKey(s,e);break;case"ctrlDown":case"shiftDown":case"csDown":this.csDownKey(n,e);break;case"ctrlLeft":case"shiftLeft":case"csLeft":this.csLeftKey(n,e);break;case"ctrlRight":case"shiftRight":case"csRight":this.csRightKey(n,e);break;case"ctrlUp":case"shiftUp":case"csUp":this.csUpKey(n,e);break;case"space":this.spaceKey(n);break;case"ctrlSpace":case"shiftSpace":case"csSpace":t.isNullOrUndefined(n)||this.doSelection(n,e);break;case"ctrlA":this.ctrlAKey(s,a);break;case"enter":this.doOpenAction(this.parent.visitedItem?this.parent.visitedItem:this.getVisitedItem());break;case"altEnter":this.parent.notify(On,{}),Re(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":v(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"ctrlC":N(this.parent);break;case"ctrlV":this.parent.folderPath="",G(this.parent);break;case"ctrlX":E(this.parent);break;case"f2":this.performRename();break;case"ctrlD":this.doDownload()}}},e.prototype.doDownload=function(){this.updateSelectedData(),ue(this.parent)},e.prototype.performDelete=function(){if(this.parent.selectedItems&&this.parent.selectedItems.length>0){this.updateSelectedData();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!ye(e[t]))return void me(this.parent,e[t],Hn);Ke(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),ce(this.parent))},e.prototype.updateRenameData=function(){var e=t.select("."+gi+"."+Ii,this.element),i=this.getItemObject(e);pe(this.parent,i)},e.prototype.getVisitedItem=function(){var e=this.parent.selectedItems[this.parent.selectedItems.length-1],t=this.getIndexes([e],this.parent.hasId);return this.itemList[t[0]]},e.prototype.getFocusedItem=function(){return t.select("."+gi+"."+wi,this.element)},e.prototype.getActiveItem=function(){return t.select("."+gi+"."+Ii,this.element)},e.prototype.getFirstItem=function(){return this.itemList[0]},e.prototype.getLastItem=function(){return this.itemList[this.itemList.length-1]},e.prototype.navigateItem=function(e){this.setFocus(e)},e.prototype.navigateDown=function(e,t){var i=this.getNextItem(e,t,this.perRow);this.setFocus(i)},e.prototype.navigateRight=function(e,t){var i=this.getNextItem(e,t);this.setFocus(i)},e.prototype.getNextItem=function(e,i,n){if(t.isNullOrUndefined(e))return this.getFocusedItem()||this.getActiveItem()||this.getFirstItem();var s,a=this.itemList.indexOf(e);do{if(a=i?n?a+n:a+1:n?a-n:a-1,s=this.itemList[a],this.parent.enableVirtualization&&t.isNullOrUndefined(s)){var r=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-bottom"),10),o=this.itemList[0].getBoundingClientRect().height+r;this.element.firstElementChild.scrollTo(this.element.firstElementChild.scrollTop,this.element.firstElementChild.scrollTop+o)}if(t.isNullOrUndefined(s))return e}while(!t.isVisible(s));return s},e.prototype.setFocus=function(e){t.isNullOrUndefined(e)||!0!==this.triggerSelection("select",e).cancel&&(this.startItem=e,this.clearSelect(),this.addActive(e),this.addFocus(e),this.parent.notify(bn,{}),this.triggerSelect("select",e))},e.prototype.spaceKey=function(e){t.isNullOrUndefined(e)||e.classList.contains(Ii)||!0!==this.triggerSelection("select",e).cancel&&(this.addActive(e),this.parent.notify(bn,{}),this.triggerSelect("select",e))},e.prototype.ctrlAKey=function(e,i){if(this.parent.allowMultiSelection&&!t.isNullOrUndefined(e)){this.startItem=e;var n={ctrlKey:!0,shiftKey:!0},s=this.element.querySelector(".e-list-parent"),a=s.scrollTop,r=this.getFocusedItem();this.doSelection(i,n),s.scrollTop=a,t.isNullOrUndefined(r)||this.addFocus(r)}},e.prototype.csEndKey=function(e,i){this.parent.allowMultiSelection?t.isNullOrUndefined(e)||("ctrlEnd"===i.action?this.addFocus(e):this.doSelection(e,i)):this.navigateItem(e)},e.prototype.csHomeKey=function(e,i){this.parent.allowMultiSelection?t.isNullOrUndefined(e)||("ctrlHome"===i.action?this.addFocus(e):this.doSelection(e,i)):this.navigateItem(e)},e.prototype.csDownKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!0,this.perRow);t.isNullOrUndefined(n)||("ctrlDown"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateDown(e,!0)},e.prototype.csLeftKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!1);t.isNullOrUndefined(n)||("ctrlLeft"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateRight(e,!1)},e.prototype.csRightKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!0);t.isNullOrUndefined(n)||("ctrlRight"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateRight(e,!0)},e.prototype.csUpKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!1,this.perRow);t.isNullOrUndefined(n)||("ctrlUp"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateDown(e,!1)},e.prototype.addActive=function(e){t.isNullOrUndefined(e)||(e.classList.contains(Ii)||(this.parent.selectedItems.push(this.getDataName(e)),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),t.addClass([e],[Ii]),e.setAttribute("aria-selected","true"),this.checkState(e,!0)),this.parent.visitedItem=e)},e.prototype.removeActive=function(e){if(!t.isNullOrUndefined(e)){t.removeClass([e],[Ii]),this.parent.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),this.checkState(e,!1);var i=this.parent.selectedItems.indexOf(this.getDataName(e));i>-1&&(this.parent.selectedItems.splice(i,1),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)),this.parent.visitedItem=null}},e.prototype.getDataName=function(e){var t=this.getItemObject(e);return de(this.parent,t)},e.prototype.addFocus=function(e){this.element.setAttribute("tabindex","-1");var i=this.getFocusedItem();i&&(i.removeAttribute("tabindex"),t.removeClass([i],[wi])),t.addClass([e],[wi]),e.setAttribute("tabindex","0"),e.focus()},e.prototype.checkState=function(e,i){if(this.parent.showItemCheckBoxes){var n=t.select(".e-frame",e);t.isNullOrUndefined(n)||(i?n.classList.contains(Ci)||(t.addClass([n],Ci),t.closest(n,"."+Si).setAttribute("aria-checked","true")):n.classList.contains(Ci)&&(t.removeClass([n],Ci),t.closest(n,"."+Si).setAttribute("aria-checked","false")))}},e.prototype.clearSelect=function(){var e=Array.prototype.slice.call(t.selectAll("."+Ii,this.listElements));if(0!==e.length){if(!0!==this.triggerSelection("unselect",e[0]).cancel)for(var i=0,n=e.length;i<n;i++)this.removeActive(e[i]);this.triggerSelect("unselect",e[0])}},e.prototype.resizeHandler=function(){this.getItemCount(),t.isNullOrUndefined(this.listObj)||this.adjustHeight()},e.prototype.splitterResizeHandler=function(){this.getItemCount()},e.prototype.getItemCount=function(){var e=1;if(this.itemList)for(var t=0,i=this.itemList.length-1;t<i&&this.itemList[t].getBoundingClientRect().top===this.itemList[t+1].getBoundingClientRect().top;t++)e++;this.perRow=e},e.prototype.triggerSelection=function(e,t){var i=[];if(this.isSelectAllCalled)for(var n=0,s=this.itemList.length;n<s;n++)i[n]=this.getItemObject(this.itemList[n]);else i[0]=this.getItemObject(t);var a={action:e,fileDetails:i.length>1?i:i[0],isInteracted:this.isInteraction,cancel:!1,target:this.isSelectAllCalled?null:t};return this.parent.trigger("fileSelection",a),this.isInteraction=!0,a},e.prototype.triggerSelect=function(e,t){var i=[];if(this.isSelectAllCalled){for(var n=0,s=this.itemList.length;n<s;n++)i[n]=this.getItemObject(this.itemList[n]);this.isSelectAllCalled=!1}else i[0]=this.getItemObject(t);this.parent.visitedData=i.length>1?i[i.length-1]:i[0];var a={action:e,fileDetails:i.length>1?i:i[0],isInteracted:this.isInteracted};this.parent.trigger("fileSelect",a),this.isInteracted=!0},e.prototype.selectItems=function(e){for(var t=this.getIndexes(e,this.parent.hasId),i=0,n=t.length;i<n;i++){var s={ctrlKey:!0,shiftKey:!1};this.doSelection(this.itemList[t[i]],s)}},e.prototype.getIndexes=function(e,i){for(var n=[],s=i?"id":"name",a=0,r=this.items.length;a<r;a++)-1!==e.indexOf(t.getValue(s,this.items[a]))&&n.push(a);return n},e.prototype.getItemObject=function(e){var t=this.itemList.indexOf(e);return this.items[t]},e.prototype.addSelection=function(e){var i=[];if(this.parent.hasId)i=new s.DataManager(this.items).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var n=new s.DataManager(this.items).executeLocal((new s.Query).where("name","equal",t.getValue("name",e),!1));n.length>0&&(i=new s.DataManager(n).executeLocal((new s.Query).where("filterPath","equal",this.parent.filterPath,!1)))}if(i.length>0){var a=this.items.indexOf(i[0]),r={ctrlKey:!0,shiftKey:!1};this.doSelection(this.itemList[a],r)}},e.prototype.updateSelectedData=function(){for(var e=[],i=t.selectAll("."+gi+"."+Ii,this.element),n=0;n<i.length;n++)e[n]=this.getItemObject(i[n]);this.parent.itemData=e},e.prototype.onMethodCall=function(e){if("LargeIcons"===this.parent.view)switch(t.getValue("action",e)){case"deleteFiles":this.deleteFiles(t.getValue("ids",e));break;case"downloadFiles":this.downloadFiles(t.getValue("ids",e));break;case"openFile":this.openFile(t.getValue("id",e));break;case"renameFile":this.isInteraction=!1,this.isInteracted=!1,this.renameFile(t.getValue("id",e),t.getValue("newName",e));break;case"createFolder":this.isInteraction=!1,this.isInteracted=!1;break;case"clearSelection":this.isInteraction=!1,this.isInteracted=!1,this.onClearAllInit();break;case"selectAll":this.isInteraction=!1,this.isInteracted=!1,this.onSelectAllInit()}},e.prototype.getItemsIndex=function(e){var i=[],n=!(""===this.parent.breadcrumbbarModule.searchObj.element.value&&!this.parent.isFiltered),s=this.parent.hasId?"id":"name";if(this.parent.hasId||!n)for(var a=0,r=this.items.length;a<r;a++)-1!==e.indexOf(t.getValue(s,this.items[a]))&&i.push(a);else for(var a=0,r=this.items.length;a<r;a++){var o=t.getValue("filterPath",this.items[a])+t.getValue("name",this.items[a]);-1===e.indexOf(o)&&-1===e.indexOf(t.getValue(s,this.items[a]))||i.push(a)}return i},e.prototype.deleteFiles=function(e){if(this.parent.activeModule="largeiconsview",t.isNullOrUndefined(e))return void this.performDelete();var i=this.getItemsIndex(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=this.items[i[a]],s[a]=de(this.parent,n[a]);fe(this.parent,n,s)}},e.prototype.downloadFiles=function(e){if(t.isNullOrUndefined(e))return void this.doDownload();var i=this.getItemsIndex(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=this.items[i[a]],s[a]=de(this.parent,n[a]);ge(this.parent,n,s)}},e.prototype.openFile=function(e){if(!t.isNullOrUndefined(e)){var i=this.getItemsIndex([e]);i.length>0&&this.doOpenAction(this.itemList[i[0]])}},e.prototype.renameFile=function(e,i){if(this.parent.activeModule="largeiconsview",t.isNullOrUndefined(e))return void this.performRename();var n=this.getItemsIndex([e]);n.length>0&&(pe(this.parent,this.items[n[0]]),t.isNullOrUndefined(i)?ce(this.parent):ye(this.parent.itemData[0])?Pe(this.parent,this.parent.path,i):me(this.parent,this.parent.itemData[0],Hn))},e}(),Kn=function(){function e(e){this.addressPath="",this.addressBarLink="",this.searchTimer=null,this.searchWrapWidth=null,this.parent=e,this.keyConfigs={enter:"enter"},this.render()}return e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var i=0,n=Object.keys(e.newProp);i<n.length;i++){var s=n[i],a=e.newProp.searchSettings;switch(s){case"searchSettings":t.isNullOrUndefined(a.allowSearchOnTyping)||this.searchEventBind(a.allowSearchOnTyping),!this.parent.breadcrumbbarModule.searchObj.value||""===this.parent.breadcrumbbarModule.searchObj.value||!t.isNullOrUndefined(a.allowSearchOnTyping)&&t.isNullOrUndefined(a.filterType)&&t.isNullOrUndefined(a.ignoreCase)||D(this.parent,this.parent.breadcrumbbarModule.searchObj.value,!1)}}},e.prototype.render=function(){this.addEventListener()},e.prototype.onPathChange=function(){var e=this.parent.pathNames,i=this.parent.path.split("/"),n=this.parent.createElement("ul",{className:"e-addressbar-ul"}),s=null,a=e.length;if(e.length>0){for(var r="",o=0;o<a;o++){var l=null;s=this.parent.createElement("li",{className:"e-address-list-item"});for(var h=0;h<=o;h++)r=r+i[h]+"/";if(s.setAttribute("data-utext",r),0!==o){var d=t.createElement("span",{className:"e-icons"});s.appendChild(d)}a-o!=1?(l=t.createElement("a",{className:mi}),s.setAttribute("tabindex","0")):l=t.createElement("span",{className:mi}),r="",l.innerText=e[o],s.appendChild(l),n.appendChild(s)}var p=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul");t.isNullOrUndefined(p)||(t.isNullOrUndefined(this.subMenuObj)||this.subMenuObj.destroy(),t.remove(p));var c=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");c?this.parent.breadCrumbBarNavigation.appendChild(n):this.parent.breadCrumbBarNavigation.insertBefore(n,c),this.updateBreadCrumbBar(n)}},e.prototype.updateBreadCrumbBar=function(e){for(var i=e.querySelectorAll("li"),n=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul"),s=window.getComputedStyle(n,null),r=parseFloat(s.getPropertyValue("padding-right")),o=parseFloat(s.getPropertyValue("padding-left")),h=n.offsetWidth-r-o,d=this.parent.createElement("ul",{className:"e-addressbar-ul"}),p=0,c=[],u=0;u<i.length;u++){var f=i[u].clientWidth;c.push(f),p+=f}t.isNullOrUndefined(n)||t.remove(n);var g=this.parent.createElement("div");g.setAttribute("class","e-search-wrap");var m=this.parent.element.id+"_search",b=t.createElement("input",{id:m,attrs:{autocomplete:"off","aria-label":H(this.parent,"Search")}});g.appendChild(b);var v=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap .e-input");if(t.isNullOrUndefined(v)){this.parent.breadCrumbBarNavigation.appendChild(g);var y=t.createElement("span",{className:"e-icons e-fe-search"});t.EventHandler.add(y,"click",this.onShowInput,this),b.parentElement.insertBefore(y,b),this.searchObj=new a.TextBox({value:"",showClearButton:!0,placeholder:H(this.parent,"Search"),focus:this.onFocus.bind(this),blur:this.onBlur.bind(this)}),this.searchObj.appendTo("#"+this.parent.element.id+"_search"),this.searchEventBind(this.parent.searchSettings.allowSearchOnTyping);var I=this.searchObj.element.nextElementSibling;t.EventHandler.add(I,"mousedown",this.searchChangeHandler.bind(this),this),t.EventHandler.add(this.searchObj.element,"keyup",this.onKeyUp.bind(this),this)}var O=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");if(h-=this.searchWrapWidth?this.searchWrapWidth:O.offsetWidth,p>h){for(u=i.length;u--;){var w=h-c[u];if(!(w>40)){for(var D=[],C=0;C<=u;C++){var S=i[C];D.push({text:S.innerText,utext:S.getAttribute("data-utext")})}var j=this.parent.createElement("li",{className:"e-breadcrumb-menu"}),x={className:"e-breadcrumb-submenu"},P=this.parent.createElement("button",x);j.appendChild(P),d.insertBefore(j,d.querySelector("li")),this.subMenuObj=new l.DropDownButton({items:D,cssClass:"e-caret-hide e-submenu",iconCss:"e-icons e-fe-breadcrumb",iconPosition:"Top",enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.addSubMenuAttributes.bind(this),select:this.subMenuSelectOperations.bind(this)}),this.subMenuObj.isStringTemplate=!0,this.subMenuObj.appendTo(P);break}d.insertBefore(i[u],d.querySelector("li")),h=w}this.parent.breadCrumbBarNavigation.insertBefore(d,O)}else this.parent.breadCrumbBarNavigation.insertBefore(e,O)},e.prototype.onFocus=function(){t.closest(this.searchObj.element,".e-search-wrap").classList.add("e-focus")},e.prototype.onKeyUp=function(){this.parent.notify(kn,{args:this.parent})},e.prototype.onBlur=function(){t.closest(this.searchObj.element,".e-search-wrap").classList.remove("e-focus")},e.prototype.subMenuSelectOperations=function(e){var t={target:e.element};this.addressPathClickHandler(t)},e.prototype.addSubMenuAttributes=function(e){e.element.setAttribute("data-utext",t.getValue("utext",e.item));var i=this.parent.createElement("a",{className:"e-list-text"});e.element.appendChild(i)},e.prototype.searchEventBind=function(e){e?(this.searchObj.input=this.searchChangeHandler.bind(this),this.searchObj.change=null):(this.searchObj.change=this.searchChangeHandler.bind(this),this.searchObj.input=null)},e.prototype.searchChangeHandler=function(e){var i=this;t.isNullOrUndefined(e.value)||(this.parent.isFiltered=!1,this.parent.searchSettings.allowSearchOnTyping?(window.clearTimeout(this.searchTimer),this.searchTimer=window.setTimeout(function(){D(i.parent,e.value,!1)},300)):D(this.parent,e.value,!1))},e.prototype.addressPathClickHandler=function(e){var i=e.target;if("LI"===i.nodeName||"A"===i.nodeName){var n="LI"===i.nodeName?i.children[0]:i;if(!t.isNullOrUndefined(n)){this.parent.isFiltered=!1;var s=this.updatePath(n);this.parent.itemData=[t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)],this.triggerFileOpen(this.parent.itemData[0]),Se(this.parent,ln,s);var a=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify("update-tree-selection",{module:"treeview",selectedNode:a})}}},e.prototype.triggerFileOpen=function(e){var t={cancel:!1,fileDetails:e,module:"BreadCrumbBar"};delete t.cancel,this.parent.trigger("fileOpen",t)},e.prototype.onShowInput=function(){if(this.parent.isMobile)if(this.parent.element.classList.contains(ui))t.removeClass([this.parent.element],ui),this.searchWrapWidth=null;else{var e=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");this.searchWrapWidth=e.offsetWidth,t.addClass([this.parent.element],ui),this.searchObj.element.focus()}},e.prototype.updatePath=function(e){var i=t.closest(e,"li").getAttribute("data-utext");this.addressBarLink=i;var n=this.addressBarLink.split("/"),s=this.parent.pathId,a=this.parent.pathNames;this.parent.pathId=[],this.parent.pathNames=[];for(var r="",o=0,l=n.length-1;o<l;o++)this.parent.pathId.push(s[o]),this.parent.pathNames.push(a[o]),r+=n[o]+"/";return this.parent.setProperties({path:r},!0),r},e.prototype.onUpdatePath=function(){this.onPathChange(),this.removeSearchValue()},e.prototype.onCreateEnd=function(){this.onPathChange()},e.prototype.onRenameEnd=function(){this.onPathChange()},e.prototype.onDeleteEnd=function(){this.onUpdatePath()},e.prototype.removeSearchValue=function(){this.parent.isFiltered=!1,!this.searchObj||""===this.searchObj.value&&""===this.searchObj.element.value||(this.searchObj.value="",this.searchObj.element.value="",this.searchObj.dataBind())},e.prototype.onResize=function(){this.onPathChange()},e.prototype.onPasteEnd=function(){this.onPathChange()},e.prototype.addEventListener=function(){this.keyboardModule=new t.KeyboardEvents(this.parent.breadCrumbBarNavigation,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.parent.on($i,this.onPropertyChanged,this),t.EventHandler.add(this.parent.breadCrumbBarNavigation,"click",this.addressPathClickHandler,this),this.parent.on(hn,this.destroy,this),this.parent.on(ln,this.onUpdatePath,this),this.parent.on(en,this.onUpdatePath,this),this.parent.on(rn,this.onUpdatePath,this),this.parent.on(mn,this.onUpdatePath,this),this.parent.on(tn,this.onCreateEnd,this),this.parent.on(Sn,this.onRenameEnd,this),this.parent.on(an,this.onDeleteEnd,this),this.parent.on("splitter-resize",this.onResize,this),this.parent.on(En,this.onPasteEnd,this),this.parent.on(on,this.onResize,this),this.parent.on(Ln,this.onSearchTextChange,this),this.parent.on(Tn,this.onDropInit,this),this.parent.on("layout-refresh",this.onResize,this),this.parent.on(Fn,this.onPathChange,this)},e.prototype.keyActionHandler=function(e){switch(e.action){case"enter":this.addressPathClickHandler(e)}},e.prototype.removeEventListener=function(){this.keyboardModule.destroy(),this.parent.off(ln,this.onUpdatePath),this.parent.off(en,this.onUpdatePath),this.parent.off(rn,this.onUpdatePath),this.parent.off(mn,this.onUpdatePath),this.parent.off(En,this.onPasteEnd),this.parent.off(tn,this.onCreateEnd),this.parent.off(Sn,this.onRenameEnd),this.parent.off(an,this.onDeleteEnd),this.parent.off("splitter-resize",this.onResize),this.parent.off(on,this.onResize),this.parent.off(Ln,this.onSearchTextChange),this.parent.off(Tn,this.onDropInit),this.parent.off("layout-refresh",this.onResize),this.parent.off(Fn,this.onPathChange)},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=e.target.closest("li");this.parent.dropPath=this.updatePath(i.children[0]),this.parent.dropData=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent),this.triggerFileOpen(this.parent.dropData);var n=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify("update-tree-selection",{module:"treeview",selectedNode:n})}},e.prototype.getModuleName=function(){return"breadcrumbbar"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),t.isNullOrUndefined(this.subMenuObj)||this.subMenuObj.destroy(),t.isNullOrUndefined(this.searchObj)||this.searchObj.destroy())},e.prototype.onSearchTextChange=function(e){this.searchObj.element.placeholder=null!=this.parent.searchSettings.placeholder?this.parent.searchSettings.placeholder:H(this.parent,"Search")+" "+H(this.parent,e.cwd.name.toString())},e}(),Gn=function(){function e(e){this.isMenuItemClicked=!1,this.currentItems=[],this.currentElement=null,this.disabledItems=[],this.parent=e,this.render()}return e.prototype.render=function(){this.keyConfigs={downarrow:"downarrow",uparrow:"uparrown"},this.contextMenu=new h.ContextMenu({enableRtl:this.parent.enableRtl,locale:this.parent.locale,target:"#"+this.parent.element.id,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.onBeforeItemRender.bind(this),select:this.onSelect.bind(this),beforeOpen:this.onBeforeOpen.bind(this),beforeClose:this.onBeforeClose.bind(this),cssClass:B(this.parent,pi)}),this.contextMenu.isStringTemplate=!0,this.contextMenu.appendTo("#"+this.parent.element.id+"_contextmenu"),this.addEventListener()},e.prototype.onBeforeItemRender=function(e){if(e.item.id===this.getMenuId("largeiconsview")){i=t.createElement("span");(n=e.element).insertBefore(i,"LargeIcons"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",Ki+" "+Hi)}if(e.item.id===this.getMenuId("detailsview")){var i=t.createElement("span"),n=e.element;n.insertBefore(i,"Details"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",Wi+" "+Hi)}},e.prototype.onBeforeClose=function(){if(this.menuTarget=null,!this.isMenuItemClicked&&this.parent.pathId.length>1&&"navigationpane"==this.parent.activeModule){this.parent.pathId.pop();for(var e=[],i=0,n=Object.keys(this.parent.feParent);i<n.length;i++){var s=n[i],a=t.getValue(s,this.parent.feParent);-1!==this.parent.pathNames.indexOf(a.name)&&e.push(a._fm_id)}this.parent.pathId.push(e[e.length-1]),this.parent.navigationpaneModule.treeObj.selectedNodes=[this.parent.pathId[this.parent.pathId.length-1]]}this.isMenuItemClicked=!1},e.prototype.onBeforeOpen=function(e){var i=this;this.disabledItems=[];var n,s,a=!1,r=!1,o=e.event.target;this.menuTarget=this.targetNodeElement=o,this.currentElement=e.element,o.classList.contains("e-spinner-pane")&&(o=this.parent.navigationpaneModule.activeNode.getElementsByClassName("e-fullrow")[0],this.menuTarget=this.targetNodeElement=o),this.targetElement="Details"===this.parent.view?t.closest(o,"tr.e-row"):o,this.parent.enableVirtualization&&(o.classList.contains("e-virtual-bottom")||o.classList.contains("e-virtualtable"))&&(o=o.parentElement.closest("div"));var l=this.getTargetView(o);if(this.updateActiveModule(),o.classList.contains(_i)||t.closest(o,"th")||t.closest(o,"#"+this.parent.element.id+oi)||t.closest(o,"#"+this.parent.element.id+"_toolbar"))e.cancel=!0;else if("LargeIcons"!==this.parent.view&&this.targetElement&&this.targetElement.classList.contains("e-emptyrow"))this.setLayoutItem(o);else if(t.closest(o,"."+xi))this.setLayoutItem(o);else if(!o.classList.contains("e-menu-item")&&!o.classList.contains(Hi)&&!o.classList.contains("e-caret")){if("LargeIcons"!==this.parent.view||t.isNullOrUndefined(t.closest(o,"li"))||t.closest(o,"#"+this.parent.element.id+"_tree"))t.isNullOrUndefined(t.closest(o,"tr.e-row"))?t.closest(o,"#"+this.parent.element.id+"_tree")&&(n=t.closest(o,"li").getAttribute("data-uid"),r=!0):(n=this.targetElement.getAttribute("data-uid"),s=this.parent.detailsviewModule.gridObj.getRowObjectFromUID(n).data,t.isNullOrUndefined(this.targetElement.getAttribute("aria-selected"))&&this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute("data-rowindex"),10)]),a=!0);else{var h={ctrlKey:!0,shiftKey:!0};t.closest(o,"li").classList.contains("e-active")||this.parent.largeiconsviewModule.doSelection(o,h),s=this.parent.visitedData,a=!0}a?!0===t.getValue("isFile",s)?this.setFileItem():this.setFolderItem(!1):r?(this.setFolderItem(!0),n===this.parent.pathId[0]&&this.disabledItems.push("Delete","Rename","Cut","Copy")):"TreeView"===l||"GridView"===l||"LargeIcon"===l?this.setLayoutItem(o):e.cancel=!0}var d=t.select("#"+this.getMenuId("Paste"),this.contextMenu.element);if(e.cancel||this.parent.enablePaste||!d||d.classList.contains("e-disabled")||this.disabledItems.push("Paste"),e.cancel)return void(this.menuTarget=this.currentElement=null);this.contextMenu.dataBind();var p=!1;(o.classList.contains("e-menu-item")||o.classList.contains(Hi)||o.classList.contains("e-caret"))&&(p=!0),this.menuItemData=p?this.menuItemData:this.getMenuItemData();var c={fileDetails:[this.menuItemData],element:e.element,target:o,items:p?e.items:this.contextMenu.items,menuModule:this.contextMenu,cancel:!1,menuType:this.menuType,isSubMenu:p};this.currentItems=c.items,this.parent.trigger("menuOpen",c,function(t){p||(i.contextMenu.dataBind(),i.contextMenu.items=t.items,i.contextMenu.dataBind()),i.enableItems(i.disabledItems,!1,!0),e.cancel=t.cancel,t.cancel&&(i.menuTarget=i.targetNodeElement=i.currentElement=null)})},e.prototype.updateActiveModule=function(){this.parent.activeModule=t.closest(this.menuTarget,"#"+this.parent.element.id+"_tree")?"navigationpane":t.closest(this.menuTarget,"#"+this.parent.element.id+ti)?"detailsview":t.closest(this.menuTarget,"#"+this.parent.element.id+ii)?"largeiconsview":this.parent.activeModule},e.prototype.getTargetView=function(e){return e.classList.contains(_i)?"TreeView":e.classList.contains(Bi)?"GridView":e.classList.contains("e-list-parent")?"LargeIcon":e.classList.contains(fi)?"LargeIcon":""},e.prototype.getItemIndex=function(e){for(var t=this.getMenuId(e),i=0;i<this.currentItems.length;i++)if(this.currentItems[i].id===t||this.currentItems[i].id===e)return i;return-1},e.prototype.disableItem=function(e){0!==e.length&&(this.disabledItems=this.disabledItems.concat(e))},e.prototype.enableItems=function(e,t,i){for(var n=0;n<e.length;n++)1===this.checkValidItem(e[n])?this.contextMenu.enableItems([this.getMenuId(e[n])],t,i):2===this.checkValidItem(e[n])&&this.contextMenu.enableItems([e[n]],t,i)},e.prototype.setFolderItem=function(e){if(this.menuType="folder",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.folder.map(function(e){return e.trim()})),this.contextMenu.dataBind(),e){var i=t.select('[data-uid="'+this.parent.navigationpaneModule.treeObj.selectedNodes[0]+'"]',this.parent.navigationpaneModule.treeObj.element);this.parent.pathNames[this.parent.pathNames.length-1]===i.querySelector(".e-list-text").innerHTML&&"navigationpane"===this.parent.activeModule&&this.disabledItems.push("Open")}else 1!==this.parent.selectedItems.length&&"navigationpane"!==this.parent.activeModule&&this.disabledItems.push("Rename","Paste")},e.prototype.setFileItem=function(){this.menuType="file",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.file.map(function(e){return e.trim()})),this.contextMenu.dataBind(),1!==this.parent.selectedItems.length&&this.disabledItems.push("Rename")},e.prototype.setLayoutItem=function(e){this.menuType="layout",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.layout.map(function(e){return e.trim()})),this.contextMenu.dataBind(),(!this.parent.allowMultiSelection||"LargeIcons"===this.parent.view&&0!==t.closest(e,"#"+this.parent.element.id+ii).getElementsByClassName(xi).length||"Details"===this.parent.view&&0!==t.closest(e,"#"+this.parent.element.id+ti).getElementsByClassName(xi).length)&&this.disabledItems.push("SelectAll"),0===this.parent.selectedNodes.length&&this.disabledItems.push("Paste"),this.contextMenu.dataBind()},e.prototype.checkValidItem=function(e){return t.isNullOrUndefined(t.select("#"+this.getMenuId(e),this.currentElement))?t.isNullOrUndefined(t.select("#"+e,this.currentElement))?-1:2:1},e.prototype.getMenuItemData=function(){if("layout"===this.menuType)return P(this.parent);var e={target:this.menuTarget};return this.parent.notify(wn,e),this.parent.itemData[0]},e.prototype.onSelect=function(e){var i=this;if(!t.isNullOrUndefined(e.item)&&e.item.id){var n,s=e.item.id.substr((this.parent.element.id+"_cm_").length);"refresh"===s||"newfolder"===s||"upload"===s?(n=[P(this.parent)],this.parent.itemData=n):(this.parent.notify("selected-data",{}),n="navigationpane"===this.parent.activeModule&&"open"===s?[this.menuItemData]:this.parent.itemData);var a={cancel:!1,element:e.element,fileDetails:n,item:e.item};this.parent.trigger("menuClick",a,function(a){var r;if(!a.cancel)switch(i.isMenuItemClicked=!0,s){case"cut":E(i.parent);break;case"copy":N(i.parent);break;case"paste":"folder"===i.menuType&&("largeiconsview"===i.parent.activeModule||"detailsview"===i.parent.activeModule)?i.parent.folderPath=k(i.parent,i.menuItemData,i.parent.path):i.parent.folderPath="",G(i.parent);break;case"delete":for(var o=0;o<n.length;o++)if(!ye(n[o]))return void me(i.parent,n[o],Hn);Ke(i.parent,"Delete");break;case"download":for(var l=0;l<n.length;l++)if(!we(n[l]))return void me(i.parent,n[l],qn);"navigationpane"===i.parent.activeModule?i.parent.notify("download-init",{}):i.parent.selectedItems.length>0&&We(i.parent,i.parent.path,i.parent.selectedItems);break;case"rename":ye(n[0])?(i.parent.notify(Dn,{}),Ke(i.parent,"Rename")):me(i.parent,n[0],Hn);break;case"selectall":i.parent.notify("select-all-init",{});break;case"refresh":j(i.parent);break;case"open":i.parent.visitedItem&&"navigationpane"!==i.parent.activeModule?i.parent.notify(gn,{target:i.parent.visitedItem}):"navigationpane"===i.parent.activeModule&&(i.parent.visitedItem&&i.parent.notify(gn,{target:i.parent.visitedItem}),i.parent.navigationpaneModule.openFileOnContextMenuClick(t.closest(i.targetNodeElement,"li")));break;case"details":i.parent.notify(On,{}),r=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(r=[],i.parent.navigationpaneModule.openFileOnContextMenuClick(t.closest(i.targetNodeElement,"li"))),Re(i.parent,r,i.parent.path,"details");break;case"newfolder":De(i.parent);break;case"upload":Ce(i.parent);break;case"name":case"size":case"date":case"ascending":case"descending":case"none":z(i.parent,e);break;case"largeiconsview":C(i.parent,"LargeIcons");break;case"detailsview":C(i.parent,"Details")}})}},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++)switch(i[t]){case"cssClass":this.contextMenu.cssClass=B(this.parent,pi)}},e.prototype.addEventListener=function(){this.parent.on(hn,this.destroy,this),this.parent.on($i,this.onPropertyChanged,this),this.keyboardModule=new t.KeyboardEvents(this.contextMenu.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},e.prototype.removeEventListener=function(){this.parent.off(hn,this.destroy),this.parent.off($i,this.onPropertyChanged),this.keyboardModule.destroy()},e.prototype.keyActionHandler=function(e){switch(e.action){case"uparrow":case"downarrow":e.preventDefault()}},e.prototype.getModuleName=function(){return"contextmenu"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.contextMenu.destroy(),this.targetElement=null)},e.prototype.getItemData=function(e){for(var t=[],i=0;i<e.length;i++){var n=void 0,s=this.getMenuId(e[i]),a=H(this.parent,e[i]);switch(e[i]){case"|":n={separator:!0};break;case"Open":n={id:s,text:a,iconCss:"e-icons e-fe-open"};break;case"Upload":n={id:s,text:a,iconCss:"e-icons e-fe-upload"};break;case"Cut":n={id:s,text:a,iconCss:qi};break;case"Copy":n={id:s,text:a,iconCss:"e-icons e-fe-copy"};break;case"Paste":n={id:s,text:a,iconCss:"e-icons e-fe-paste"};break;case"Delete":n={id:s,text:a,iconCss:"e-icons e-fe-delete"};break;case"Rename":n={id:s,text:a,iconCss:"e-icons e-fe-rename"};break;case"NewFolder":n={id:s,text:a,iconCss:"e-icons e-fe-newfolder"};break;case"Details":n={id:s,text:a,iconCss:"e-icons e-fe-details"};break;case"SortBy":n={id:s,text:a,iconCss:"e-icons e-fe-sort",items:[{id:this.getMenuId("Name"),text:H(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?vi:null},{id:this.getMenuId("Size"),text:H(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?vi:null},{id:this.getMenuId("Date"),text:H(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?vi:null},{separator:!0},{id:this.getMenuId("Ascending"),text:H(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?bi:null},{id:this.getMenuId("Descending"),text:H(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?bi:null},{id:this.getMenuId("None"),text:H(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?bi:null}]};break;case"View":n={id:s,text:a,iconCss:"Details"===this.parent.view?Wi:Ki,items:[{id:this.getMenuId("largeiconsview"),text:H(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?null:bi},{id:this.getMenuId("detailsview"),text:H(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?bi:null}]};break;case"Refresh":n={id:s,text:a,iconCss:"e-icons e-fe-refresh"};break;case"SelectAll":n={id:s,text:a,iconCss:"e-icons e-fe-select"};break;case"Download":n={id:s,text:a,iconCss:"e-icons e-fe-download"};break;default:n={id:s,text:a}}t.push(n)}return t},e.prototype.getMenuId=function(e){return this.parent.element.id+"_cm_"+e.toLowerCase()},e}(),Yn={NewFolder:"New folder",Upload:"Upload",Delete:"Delete",Rename:"Rename",Download:"Download",Cut:"Cut",Copy:"Copy",Paste:"Paste",SortBy:"Sort by",Refresh:"Refresh","Item-Selection":"item selected","Items-Selection":"items selected",View:"View",Details:"Details",SelectAll:"Select all",Open:"Open","Tooltip-NewFolder":"New folder","Tooltip-Upload":"Upload","Tooltip-Delete":"Delete","Tooltip-Rename":"Rename","Tooltip-Download":"Download","Tooltip-Cut":"Cut","Tooltip-Copy":"Copy","Tooltip-Paste":"Paste","Tooltip-SortBy":"Sort by","Tooltip-Refresh":"Refresh","Tooltip-Selection":"Clear selection","Tooltip-View":"View","Tooltip-Details":"Details","Tooltip-SelectAll":"Select all",Name:"Name",Size:"Size",DateModified:"Modified",DateCreated:"Date created",Path:"Path",Modified:"Modified",Created:"Created",Location:"Location",Type:"Type",Permission:"Permission",Ascending:"Ascending",Descending:"Descending",None:"None","View-LargeIcons":"Large icons","View-Details":"Details",Search:"Search","Button-Ok":"OK","Button-Cancel":"Cancel","Button-Yes":"Yes","Button-No":"No","Button-Create":"Create","Button-Save":"Save","Header-NewFolder":"Folder","Content-NewFolder":"Enter your folder name","Header-Rename":"Rename","Content-Rename":"Enter your new name","Header-Rename-Confirmation":"Rename Confirmation","Content-Rename-Confirmation":"If you change a file name extension, the file might become unstable. Are you sure you want to change it?","Header-Delete":"Delete File","Content-Delete":"Are you sure you want to delete this file?","Header-Folder-Delete":"Delete Folder","Content-Folder-Delete":"Are you sure you want to delete this folder?","Header-Multiple-Delete":"Delete Multiple Items","Content-Multiple-Delete":"Are you sure you want to delete these {0} items?","Header-Duplicate":"File/Folder exists","Content-Duplicate":"{0} already exists. Do you want to rename and paste?","Header-Upload":"Upload Files",Error:"Error","Validation-Empty":"The file or folder name cannot be empty.","Validation-Invalid":'The file or folder name {0} contains invalid characters. Please use a different name. Valid file or folder names cannot end with a dot or space, and cannot contain any of the following characters: \\/:*?"<>|',"Validation-NewFolder-Exists":"A file or folder with the name {0} already exists.","Validation-Rename-Exists":"Cannot rename {0} to {1}: destination already exists.","Folder-Empty":"This folder is empty","File-Upload":"Drag files here to upload","Search-Empty":"No results found","Search-Key":"Try with different keywords","Filter-Empty":"No results found","Filter-Key":"Try with different filter","Sub-Folder-Error":"The destination folder is the subfolder of the source folder.","Same-Folder-Error":"The destination folder is the same as the source folder.","Access-Denied":"Access Denied","Access-Details":'You don"t have permission to access this folder.',"Header-Retry":"File Already Exists","Content-Retry":"A file with this name already exists in this folder. What would you like to do?","Button-Keep-Both":"Keep both","Button-Replace":"Replace","Button-Skip":"Skip","ApplyAll-Label":"Do this for all current items",KB:"KB","Access-Message":"{0} is not accessible. You need permission to perform the {1} action.","Network-Error":"NetworkError: Failed to send on XMLHTTPRequest: Failed to load","Server-Error":"ServerError: Invalid response from"},Jn=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Qn=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Xn=function(e){function s(t,i){var n=e.call(this,t,i)||this;return n.filterData=null,n.selectedNodes=[],n.duplicateItems=[],n.duplicateRecords=[],n.previousPath=[],n.nextPath=[],n.isLayoutChange=!1,n.layoutSelectedItems=[],n.renamedId=null,n.uploadItem=[],n.deleteRecords=[],n.isFile=!1,n.isCut=!1,n.isSearchCut=!1,n.isSearchDrag=!1,n.isPasteError=!1,n.folderPath="",n.isSameAction=!1,n.isFiltered=!1,n.isSortByClicked=!1,n.enablePaste=!1,n.persistData=!1,n.retryArgs=[],n.isOpened=!1,n.isRetryOpened=!1,n.isPathDrag=!1,n.searchedItems=[],n.retryFiles=[],n.isApplySame=!1,n.dragData=[],n.dragNodes=[],n.dragPath="",n.dropPath="",n.isDragDrop=!1,n.treeExpandTimer=null,n.dragCursorPosition={left:44,top:18},n.isDropEnd=!1,n.dragCount=0,n.droppedObjects=[],n.uploadingCount=0,n.uploadedCount=0,n.isMac=!1,r.Inject(Kn,Wn,Gn),n}Jn(s,e),r=s,s.prototype.getModuleName=function(){return"filemanager"},s.prototype.preRender=function(){(t.isNullOrUndefined(this.element.id)||""===this.element.id)&&this.element.setAttribute("id",t.getUniqueID("filemanager")),this.ensurePath(),this.feParent=[],this.feFiles=[],t.setStyleAttribute(this.element,{width:t.formatUnit(this.width),height:t.formatUnit(this.height)}),this.isDevice=t.Browser.isDevice,this.isMobile=this.checkMobile(),this.isMobile&&this.setProperties({navigationPaneSettings:{visible:!1}},!0);var e=t.closest(this.element,".e-bigger");this.isBigger=!!e,this.activeModule="LargeIcons"===this.view?"largeiconsview":"detailsview",n.createSpinner({target:this.element},t.createElement),this.addWrapper(),this.keyConfigs={altN:"alt+n",f5:"f5",ctrlShift1:"ctrl+shift+1",ctrlShift2:"ctrl+shift+2",ctrlU:"ctrl+u"},this.localeObj=new t.L10n(this.getModuleName(),Yn,this.locale)},s.prototype.getPersistData=function(){var e=["view","path","selectedItems"];return this.addOnPersist(e)},s.prototype.requiredModules=function(){var e=[];return e.push({member:"breadcrumbbar",args:[this]}),e.push({member:"largeiconsview",args:[this]}),this.toolbarSettings.visible&&e.push({member:"toolbar",args:[this],name:"Toolbar"}),this.navigationPaneSettings.visible&&e.push({member:"navigationpane",args:[this],name:"NavigationPane"}),this.view&&e.push({member:"detailsview",args:[this],name:"DetailsView"}),this.contextMenuSettings.visible&&!this.isDevice&&e.push({member:"contextmenu",args:[this],name:"ContextMenu"}),this.enableVirtualization&&e.push({member:"virtualization",args:[this],name:"Virtualization"}),e},s.prototype.render=function(){this.initialize();var e=t.isNullOrUndefined(this.selectedItems)?[]:this.allowMultiSelection?this.selectedItems:this.selectedItems.slice(this.selectedItems.length-1);this.setProperties({selectedItems:e},!0),this.fileView=this.view,this.isMac=navigator.platform.toUpperCase().indexOf("MAC")>=0,this.setRtl(this.enableRtl),this.addEventListeners(),Se(this,this.path!==this.originalPath?Zi:en,this.path),this.adjustHeight(),t.isNullOrUndefined(this.navigationpaneModule)&&(this.splitterObj.collapse(this.enableRtl?1:0),t.select(".e-split-bar",this.element).classList.add(Ji)),this.wireEvents(),this.renderComplete()},s.prototype.ensurePath=function(){var e=this.path;t.isNullOrUndefined(e)&&(e="/"),e.lastIndexOf("/")!==e.length-1&&(e+="/"),this.originalPath=e;var i=e.split("/");this.setProperties({path:i[0]+"/"},!0),this.pathNames=[],this.pathId=["fe_tree"],this.itemData=[]},s.prototype.initialize=function(){this.isMobile&&t.addClass([this.element],"e-fe-mobile"),this.allowMultiSelection&&t.addClass([this.element],"e-fe-cb-select"),this.addCssClass(null,this.cssClass),this.renderFileUpload()},s.prototype.addWrapper=function(){var e=this.createElement("div",{id:this.element.id+"_toolbar"});this.element.appendChild(e);var t=this.createElement("div",{id:this.element.id+ei,className:"e-layout"});this.element.appendChild(t);var n=this.createElement("div",{id:this.element.id+"_navigation",className:"e-navigation"}),s=this.createElement("div",{id:this.element.id+"_tree"});n.appendChild(s);var a=this.createElement("div",{id:this.element.id+ri,className:"e-layout-content"});this.breadCrumbBarNavigation=this.createElement("div",{id:this.element.id+oi,className:"e-address"}),a.appendChild(this.breadCrumbBarNavigation);var r=this.createElement("div",{id:this.element.id+ti});a.appendChild(r);var o=this.createElement("div",{id:this.element.id+ii,className:fi,attrs:{role:"group"}});a.appendChild(o);var l=this.createElement("span",{className:"e-fe-overlay"});a.appendChild(l);var h;this.enableRtl?(t.appendChild(a),t.appendChild(n),h=[{size:"75%",min:"270px"},{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()}]):(t.appendChild(n),t.appendChild(a),h=[{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()},{size:"75%",min:"270px"}]),this.splitterObj=new i.Splitter({paneSettings:h,width:"100%",enableRtl:!1,enableHtmlSanitizer:this.enableHtmlSanitizer,resizing:this.splitterResize.bind(this)}),this.splitterObj.isStringTemplate=!0,this.splitterObj.appendTo(t);var d=this.createElement("div",{id:this.element.id+ni});this.element.appendChild(d);var p=this.createElement("ul",{id:this.element.id+"_contextmenu"});this.element.appendChild(p);var c=this.createElement("div",{id:this.element.id+si});this.element.appendChild(c);var u=this.createElement("div",{id:this.element.id+ai});this.element.appendChild(u);var f=this.createElement("div",{id:this.element.id+"_upload_dialog"});this.element.appendChild(f)},s.prototype.adjustHeight=function(){var e=t.select("#"+this.element.id+"_toolbar",this.element),i=e?e.offsetHeight:0;this.splitterObj&&(this.splitterObj.height=(this.element.clientHeight-i).toString(),this.splitterObj.dataBind())},s.prototype.splitterResize=function(){this.notify("splitter-resize",{})},s.prototype.splitterAdjust=function(){var e=t.select(".e-split-bar",this.element);this.navigationPaneSettings.visible?(this.splitterObj.expand(this.enableRtl?1:0),e.classList.remove(Ji)):(this.splitterObj.collapse(this.enableRtl?1:0),e.classList.add(Ji))},s.prototype.addCssClass=function(e,i){t.isNullOrUndefined(e)||""===e||t.removeClass([this.element],e.split(" ")),t.isNullOrUndefined(i)||""===i||t.addClass([this.element],i.split(" "))},s.prototype.showSpinner=function(){n.showSpinner(this.element)},s.prototype.hideSpinner=function(){n.hideSpinner(this.element)},s.prototype.onContextMenu=function(e){e.preventDefault()},s.prototype.checkMobile=function(){return/iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile/i.test(t.Browser.userAgent.toLowerCase())&&/mobile/i.test(t.Browser.userAgent.toLowerCase())},s.prototype.renderFileUpload=function(){var e=this.element.id+li,t=this.createElement("input",{id:e,attrs:{name:"uploadFiles",type:"file"}});this.element.appendChild(t),this.uploadDialogObj=new n.Dialog({header:H(this,"Header-Upload"),content:t,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!1,isModal:!0,width:"350px",target:this.popupTarget?this.popupTarget:"#"+this.element.id,cssClass:B(this,this.isMobile?ci:pi),locale:this.locale,allowDragging:!0,position:{X:"center",Y:"center"},enableRtl:this.enableRtl,enableHtmlSanitizer:this.enableHtmlSanitizer,open:this.onOpen.bind(this),close:this.onClose.bind(this),beforeOpen:this.onBeforeOpen.bind(this),beforeClose:this.onBeforeClose.bind(this)}),this.uploadDialogObj.appendTo("#"+this.element.id+"_upload_dialog"),this.renderUploadBox()},s.prototype.renderUploadBox=function(){var e=this.ajaxSettings.uploadUrl?this.ajaxSettings.uploadUrl:this.ajaxSettings.url;this.uploadObj=new a.Uploader({dropArea:t.select("#"+this.element.id+ri,this.element),asyncSettings:{saveUrl:e,removeUrl:e},locale:this.locale,enableRtl:this.enableRtl,uploading:this.onUploading.bind(this),removing:this.onRemoving.bind(this),canceling:this.onCancel.bind(this),clearing:this.onClearing.bind(this),selected:this.onSelected.bind(this),success:this.onUploadSuccess.bind(this),failure:this.onUploadFailure.bind(this),autoUpload:this.uploadSettings.autoUpload,minFileSize:this.uploadSettings.minFileSize,maxFileSize:this.uploadSettings.maxFileSize,allowedExtensions:this.uploadSettings.allowedExtensions,directoryUpload:this.uploadSettings.directoryUpload,fileListRendering:this.onFileListRender.bind(this)}),this.uploadObj.appendTo("#"+this.element.id+li)},s.prototype.onFileListRender=function(e){this.trigger("uploadListCreate",e)},s.prototype.updateUploader=function(){this.uploadObj.autoUpload=this.uploadSettings.autoUpload,this.uploadObj.minFileSize=this.uploadSettings.minFileSize,this.uploadObj.maxFileSize=this.uploadSettings.maxFileSize,this.uploadObj.allowedExtensions=this.uploadSettings.allowedExtensions,this.uploadObj.directoryUpload=this.uploadSettings.directoryUpload,this.uploadObj.dataBind()},s.prototype.onBeforeOpen=function(e){var t={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupOpen",t,function(t){e.cancel=t.cancel})},s.prototype.onBeforeClose=function(e){var t={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupClose",t,function(t){e.cancel=t.cancel})},s.prototype.onOpen=function(){this.isOpened=!0,this.uploadDialogObj.element.focus();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};this.trigger("popupOpen",e)},s.prototype.onClose=function(){this.isOpened=!1,this.uploadObj.clearAll();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};this.trigger("popupClose",e)},s.prototype.onUploading=function(e){var i="save";if(0!==this.retryArgs.length)for(var n=0;n<this.retryArgs.length;n++)e.fileData.name===this.retryArgs[n].file.name&&(i=this.retryArgs[n].action,this.retryArgs.splice(n,1),n=this.retryArgs.length);var s=JSON.stringify(t.getValue(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{action:i},{data:s},{filename:e.fileData.name}];var a={url:this.ajaxSettings.uploadUrl?this.ajaxSettings.uploadUrl:this.ajaxSettings.url,type:"POST",mode:!0,dataType:null,contentType:null,data:JSON.stringify(e.customFormData),onSuccess:null,onFailure:null,beforeSend:null};this.uploadEventArgs={action:"Upload",ajaxSettings:a,cancel:!1},this.trigger("beforeSend",this.uploadEventArgs,function(i){e.customFormData=JSON.parse(t.getValue("data",i.ajaxSettings)),e.cancel=i.cancel;var n={cancel:!1,httpRequest:e.currentRequest};"function"==typeof t.getValue("beforeSend",i.ajaxSettings)&&(t.getValue("beforeSend",i.ajaxSettings)(n),t.getValue("cancel",n)&&(e.cancel=t.getValue("cancel",n)))})},s.prototype.onRemoving=function(){this.onFileUploadSuccess({count:1}),1===this.uploadObj.getFilesData().length&&this.uploadDialogObj.hide()},s.prototype.onCancel=function(e){var i=JSON.stringify(t.getValue(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{action:"remove"},{data:i}]},s.prototype.onClearing=function(){this.isOpened&&this.uploadDialogObj.hide()},s.prototype.onSelected=function(e){if(0!==e.filesData.length){this.uploadingCount=e.filesData.length,this.uploadedCount=0;var t=P(this);if(!Oe(t))return e.cancel=!0,void me(this,t,zn);this.uploadDialogObj.show()}},s.prototype.onFileUploadSuccess=function(e){this.uploadedCount=this.uploadedCount+e.count,this.uploadSettings.autoClose&&this.uploadingCount===this.uploadedCount&&this.uploadDialogObj.hide()},s.prototype.onUploadSuccess=function(e){var i={action:"Upload",result:e};this.trigger("success",i),this.itemData=[t.getValue(this.pathId[this.pathId.length-1],this.feParent)],Se(this,ln,this.path),this.onFileUploadSuccess({count:1}),"function"==typeof t.getValue("onSuccess",this.uploadEventArgs.ajaxSettings)&&t.getValue("onSuccess",this.uploadEventArgs.ajaxSettings)()},s.prototype.onUploadFailure=function(e){var i=t.getValue("response",e),n=t.getValue("statusText",i);""!==n&&t.setValue("statusText",n,e);var s={action:"Upload",error:e};this.trigger("failure",s),400===t.getValue("statusCode",i)&&(this.retryFiles.push(t.getValue("file",e)),this.isRetryOpened||Ge(this,"UploadRetry")),"function"==typeof t.getValue("onFailure",this.uploadEventArgs.ajaxSettings)&&t.getValue("onFailure",this.uploadEventArgs.ajaxSettings)()},s.prototype.onInitialEnd=function(){W(this,this.path)},s.prototype.addEventListeners=function(){this.on(dn,this.showSpinner,this),this.on(cn,this.hideSpinner,this),this.on(Zi,this.onInitialEnd,this),this.on(On,this.onDetailsInit,this),this.on(pn,this.onFileUploadSuccess,this),t.EventHandler.add(this.element,"contextmenu",this.onContextMenu,this)},s.prototype.removeEventListeners=function(){this.isDestroyed||(this.off(dn,this.showSpinner),this.off(cn,this.hideSpinner),this.off(Zi,this.onInitialEnd),this.off(On,this.onDetailsInit),this.off(pn,this.onFileUploadSuccess),t.EventHandler.remove(this.element,"contextmenu",this.onContextMenu))},s.prototype.onDetailsInit=function(){t.isNullOrUndefined(this.activeModule)&&(this.itemData=[t.getValue(this.pathId[this.pathId.length-1],this.feParent)])},s.prototype.resizeHandler=function(){this.adjustHeight(),this.notify(on,{})},s.prototype.keyActionHandler=function(e){switch(e.action){case"altN":e.preventDefault(),this.itemData=[P(this)],Ie(this.itemData[0])?Ke(this,"NewFolder"):me(this,this.itemData[0],Bn);break;case"f5":e.preventDefault(),j(this);break;case"ctrlShift1":e.preventDefault(),this.fileView="Details",this.setProperties({view:"Details"},!0),n.showSpinner(this.element),C(this,"Details");break;case"ctrlShift2":e.preventDefault(),this.fileView="LargeIcons",this.setProperties({view:"LargeIcons"},!0),n.showSpinner(this.element),C(this,"LargeIcons");break;case"ctrlU":e.preventDefault(),-1!=this.toolbarSettings.items.indexOf("Upload")&&t.select("#"+this.element.id+li,this.element).click()}},s.prototype.wireEvents=function(){t.EventHandler.add(window,"resize",this.resizeHandler,this),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},s.prototype.unWireEvents=function(){t.EventHandler.remove(window,"resize",this.resizeHandler),this.keyboardModule.destroy()},s.prototype.setPath=function(){this.setProperties({selectedItems:[]},!0),this.ensurePath(),this.notify(vn,{selectedNode:this.pathId[0]}),Se(this,this.path!==this.originalPath?Zi:en,this.path)},s.prototype.onPropertyChanged=function(e,i){for(var n,s=0,a=Object.keys(e);s<a.length;s++)switch(a[s]){case"ajaxSettings":this.ajaxSettingSetModel(e);break;case"allowDragAndDrop":this.allowDragAndDrop=e.allowDragAndDrop,this.notify($i,{module:"common",newProp:e,oldProp:i});break;case"allowMultiSelection":this.allowMultiSelection?t.addClass([this.element],"e-fe-cb-select"):(this.selectedItems.length>1&&this.setProperties({selectedItems:this.selectedItems.slice(this.selectedItems.length-1)},!0),t.removeClass([this.element],"e-fe-cb-select")),this.notify($i,{module:"common",newProp:e,oldProp:i});break;case"cssClass":this.addCssClass(i.cssClass,e.cssClass),this.notify($i,{module:"common",newProp:e,oldProp:i});break;case"detailsViewSettings":this.notify($i,{module:"detailsview",newProp:e,oldProp:i});break;case"enableRtl":this.enableRtl=e.enableRtl,this.refresh();break;case"rootAliasName":this.rootAliasName=e.rootAliasName,this.refresh();break;case"height":n=t.isNullOrUndefined(e.height)?e.height:t.formatUnit(e.height),t.setStyleAttribute(this.element,{height:n}),this.adjustHeight(),this.notify($i,{module:"common",newProp:e,oldProp:i});break;case"locale":t.isNullOrUndefined(e.enableRtl)||this.setProperties({enableRtl:e.enableRtl},!0),this.localeSetModelOption(e);break;case"navigationPaneSettings":this.splitterAdjust(),this.notify($i,{module:"navigationpane",newProp:e,oldProp:i});break;case"path":this.setPath();break;case"searchSettings":t.isNullOrUndefined(e.searchSettings.allowSearchOnTyping)||this.setProperties({searchSettings:{allowSearchOnTyping:e.searchSettings.allowSearchOnTyping}},!0),t.isNullOrUndefined(e.searchSettings.ignoreCase)&&this.setProperties({searchSettings:{ignoreCase:e.searchSettings.ignoreCase}},!0),t.isNullOrUndefined(e.searchSettings.filterType)&&this.setProperties({searchSettings:{filterType:e.searchSettings.filterType}},!0),this.notify($i,{module:"breadcrumbbar",newProp:e,oldProp:i});break;case"selectedItems":"Details"===this.view?this.notify($i,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===this.view&&this.notify($i,{module:"largeiconsview",newProp:e,oldProp:i});break;case"showFileExtension":case"showHiddenItems":this.notify($i,{module:"common",newProp:e,oldProp:i});break;case"showThumbnail":this.notify($i,{module:"largeiconsview",newProp:e,oldProp:i});break;case"toolbarSettings":case"toolbarItems":this.adjustHeight(),this.notify($i,{module:"toolbar",newProp:e,oldProp:i});break;case"uploadSettings":this.updateUploader();break;case"view":"Details"===e.view?this.notify($i,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===e.view&&this.notify($i,{module:"largeiconsview",newProp:e,oldProp:i});break;case"width":t.setStyleAttribute(this.element,{width:t.isNullOrUndefined(e.width)?e.width:t.formatUnit(e.width)}),this.notify($i,{module:"common",newProp:e,oldProp:i});break;case"sortOrder":j(this),this.notify(In,{});break;case"sortBy":j(this),this.notify(In,{}),"Details"===this.view&&this.notify(Mn,{});break;case"popupTarget":this.uploadDialogObj&&(this.uploadDialogObj.target=e.popupTarget),this.dialogObj&&(this.dialogObj.target=e.popupTarget),this.extDialogObj&&(this.extDialogObj.target=e.popupTarget),this.viewerObj&&(this.viewerObj.target=e.popupTarget)}},s.prototype.ajaxSettingSetModel=function(i){t.isNullOrUndefined(i.ajaxSettings.url)||this.setProperties({ajaxSettings:{url:i.ajaxSettings.url}},!0),t.isNullOrUndefined(i.ajaxSettings.uploadUrl)||this.setProperties({ajaxSettings:{uploadUrl:i.ajaxSettings.uploadUrl}},!0),t.isNullOrUndefined(i.ajaxSettings.downloadUrl)||this.setProperties({ajaxSettings:{downloadUrl:i.ajaxSettings.downloadUrl}},!0),t.isNullOrUndefined(i.ajaxSettings.getImageUrl)||this.setProperties({ajaxSettings:{getImageUrl:i.ajaxSettings.getImageUrl}},!0),this.setProperties({path:"/"},!0),this.setProperties({selectedItems:[]},!0),e.prototype.refresh.call(this)},s.prototype.localeSetModelOption=function(t){this.uploadObj.locale=t.locale,e.prototype.refresh.call(this)},s.prototype.destroy=function(){this.isDestroyed||(this.refreshing||this.notify(hn,{}),this.uploadObj.destroy(),this.uploadObj=null,this.uploadDialogObj.destroy(),this.uploadDialogObj=null,this.splitterObj.destroy(),this.splitterObj=null,this.dialogObj&&(this.dialogObj.destroy(),this.dialogObj=null),this.viewerObj&&(this.viewerObj.destroy(),this.viewerObj=null),this.extDialogObj&&(this.extDialogObj.destroy(),this.extDialogObj=null),this.element.removeAttribute("style"),this.element.removeAttribute("tabindex"),this.removeEventListeners(),this.unWireEvents(),this.addCssClass(this.cssClass,null),t.removeClass([this.element],[Yi,"e-fe-mobile","e-fe-cb-select"]),this.element.innerHTML="",this.breadCrumbBarNavigation=null,this.activeElements=null,this.virtualDragElement=null,this.visitedItem=null,e.prototype.destroy.call(this),this.virtualizationModule=null,this.navigationpaneModule=null,this.toolbarModule=null,this.contextmenuModule=null,this.largeiconsviewModule=null,this.detailsviewModule=null,this.breadcrumbbarModule=null)},s.prototype.createFolder=function(e){this.notify(Vn,{action:"createFolder"});var t=[P(this)];this.itemData=t,e?/[\/\\|*?"<>:]/.test(e)?Ke(this,"Error",{files:null,error:{code:"402",message:H(this,"Validation-Invalid").replace("{0}",'"'+e+'"'),fileExists:null}}):Ie(t[0])?je(this,e):me(this,t[0],Bn):De(this)},s.prototype.deleteFiles=function(e){this.notify(Vn,{action:"deleteFiles",ids:e})},s.prototype.disableToolbarItems=function(e){!t.isNullOrUndefined(e)&&this.toolbarModule&&this.toolbarModule.enableItems(e,!1)},s.prototype.downloadFiles=function(e){this.notify(Vn,{action:"downloadFiles",ids:e})},s.prototype.enableToolbarItems=function(e){!t.isNullOrUndefined(e)&&this.toolbarModule&&this.toolbarModule.enableItems(e,!0)},s.prototype.disableMenuItems=function(e){t.isNullOrUndefined(e)||t.isNullOrUndefined(this.contextmenuModule.contextMenu)||this.contextmenuModule.disableItem(e)},s.prototype.getMenuItemIndex=function(e){return this.contextmenuModule?this.contextmenuModule.getItemIndex(e):-1},s.prototype.getToolbarItemIndex=function(e){return this.toolbarModule?this.toolbarModule.getItemIndex(e):-1},s.prototype.filterFiles=function(e){this.filterData=e||null,this.setProperties({selectedItems:[]},!0),this.notify(bn,{}),this.isFiltered=!0,""!==this.breadcrumbbarModule.searchObj.element.value&&(this.breadcrumbbarModule.searchObj.element.value=""),xe(this,"filter-end")},s.prototype.getSelectedFiles=function(){return this.notify("update-selection-data",{}),this.itemData},s.prototype.openFile=function(e){this.notify(Vn,{action:"openFile",id:e})},s.prototype.refreshFiles=function(){j(this)},s.prototype.refreshLayout=function(){this.adjustHeight(),this.notify("layout-refresh",{})},s.prototype.selectAll=function(){this.notify(Vn,{action:"selectAll"})},s.prototype.clearSelection=function(){this.notify(Vn,{action:"clearSelection"})},s.prototype.renameFile=function(e,t){this.notify(Vn,{action:"renameFile",id:e,newName:t})},s.prototype.uploadFiles=function(){var e=[P(this)];this.itemData=e,Ce(this)},s.prototype.setRtl=function(e){e?this.addCssClass(null,Yi):this.addCssClass(Yi,null),this.uploadObj&&(this.uploadDialogObj.enableRtl=e,this.uploadObj.enableRtl=e)};var r;return Qn([t.Complex({},jt)],s.prototype,"ajaxSettings",void 0),Qn([t.Property(!1)],s.prototype,"allowDragAndDrop",void 0),Qn([t.Property(!0)],s.prototype,"allowMultiSelection",void 0),Qn([t.Property(!0)],s.prototype,"showItemCheckBoxes",void 0),Qn([t.Complex({},qt)],s.prototype,"contextMenuSettings",void 0),Qn([t.Property("")],s.prototype,"cssClass",void 0),Qn([t.Complex({},Ut)],s.prototype,"detailsViewSettings",void 0),Qn([t.Property(!0)],s.prototype,"enableHtmlSanitizer",void 0),Qn([t.Property(!1)],s.prototype,"enablePersistence",void 0),Qn([t.Property(!1)],s.prototype,"enableVirtualization",void 0),Qn([t.Property("400px")],s.prototype,"height",void 0),Qn([t.Property("LargeIcons")],s.prototype,"view",void 0),Qn([t.Complex({},Gt)],s.prototype,"navigationPaneSettings",void 0),Qn([t.Property("/")],s.prototype,"path",void 0),Qn([t.Property(null)],s.prototype,"popupTarget",void 0),Qn([t.Complex({},Lt)],s.prototype,"searchSettings",void 0),Qn([t.Property()],s.prototype,"selectedItems",void 0),Qn([t.Property(!0)],s.prototype,"showFileExtension",void 0),Qn([t.Property(null)],s.prototype,"rootAliasName",void 0),Qn([t.Property(!1)],s.prototype,"showHiddenItems",void 0),Qn([t.Property(!0)],s.prototype,"showThumbnail",void 0),Qn([t.Property("Ascending")],s.prototype,"sortOrder",void 0),Qn([t.Property("name")],s.prototype,"sortBy",void 0),Qn([t.Property(null)],s.prototype,"sortComparer",void 0),Qn([t.Complex({},Et)],s.prototype,"toolbarSettings",void 0),Qn([t.Collection([],Rt)],s.prototype,"toolbarItems",void 0),Qn([t.Complex({},Qt)],s.prototype,"uploadSettings",void 0),Qn([t.Property("100%")],s.prototype,"width",void 0),Qn([t.Event()],s.prototype,"fileLoad",void 0),Qn([t.Event()],s.prototype,"fileOpen",void 0),Qn([t.Event()],s.prototype,"beforeDownload",void 0),Qn([t.Event()],s.prototype,"beforeImageLoad",void 0),Qn([t.Event()],s.prototype,"beforePopupClose",void 0),Qn([t.Event()],s.prototype,"beforePopupOpen",void 0),Qn([t.Event()],s.prototype,"beforeSend",void 0),Qn([t.Event()],s.prototype,"created",void 0),Qn([t.Event()],s.prototype,"destroyed",void 0),Qn([t.Event()],s.prototype,"fileDragStart",void 0),Qn([t.Event()],s.prototype,"fileDragging",void 0),Qn([t.Event()],s.prototype,"fileDragStop",void 0),Qn([t.Event()],s.prototype,"fileDropped",void 0),Qn([t.Event()],s.prototype,"fileSelection",void 0),Qn([t.Event()],s.prototype,"fileSelect",void 0),Qn([t.Event()],s.prototype,"menuClick",void 0),Qn([t.Event()],s.prototype,"menuOpen",void 0),Qn([t.Event()],s.prototype,"failure",void 0),Qn([t.Event()],s.prototype,"popupClose",void 0),Qn([t.Event()],s.prototype,"popupOpen",void 0),Qn([t.Event()],s.prototype,"success",void 0),Qn([t.Event()],s.prototype,"toolbarClick",void 0),Qn([t.Event()],s.prototype,"toolbarCreate",void 0),Qn([t.Event()],s.prototype,"uploadListCreate",void 0),s=r=Qn([t.NotifyPropertyChanges],s)}(t.Component),$n=function(){return($n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e}).apply(this,arguments)},Zn=function(){function e(e){this.default=["Delete","Rename","Download","Cut","Copy","Paste"],this.single=["Delete","Rename","Download","Cut","Copy"],this.multiple=["Delete","Download","Cut","Copy","Refresh"],this.selection=["NewFolder","Upload","SortBy","Refresh"],this.parent=e,this.render(),this.addEventListener()}return e.prototype.render=function(){var e=this;this.items=this.toolbarItemData(this.getItems(this.parent.toolbarSettings.items.map(function(e){return e.trim()})));var t={items:this.items};this.parent.trigger("toolbarCreate",t,function(t){e.items=t.items,e.toolbarObj=new h.Toolbar({items:e.items,created:e.toolbarCreateHandler.bind(e),overflowMode:"Popup",clicked:e.onClicked.bind(e),enableHtmlSanitizer:e.parent.enableHtmlSanitizer,enableRtl:e.parent.enableRtl}),e.toolbarObj.isStringTemplate=!0,e.toolbarObj.root=e.parent.root?e.parent.root:e.parent,e.toolbarObj.appendTo("#"+e.parent.element.id+"_toolbar")})},e.prototype.getItemIndex=function(e){for(var t=this.getId(e),i=0;i<this.items.length;i++)if(this.items[i].id===t)return i;return-1},e.prototype.getItems=function(e){var t=e.slice();return this.parent.isDevice&&this.parent.allowMultiSelection&&t.push("SelectAll"),this.parent.toolbarItems.length>0&&(t=this.parent.toolbarItems.map(function(e){return e.name})),t},e.prototype.onClicked=function(e){var i=this;if(!t.isNullOrUndefined(e.item)&&e.item.id){var n,s=e.item.id.substr((this.parent.element.id+"_tb_").length);"refresh"===s||"newfolder"===s||"upload"===s?(n=[P(this.parent)],this.parent.itemData=n):(this.parent.notify("selected-data",{}),n=this.parent.itemData);var a={cancel:!1,fileDetails:n,item:e.item};this.parent.trigger("toolbarClick",a,function(a){var r,o;if(!a.cancel)switch(s){case"sortby":(o=t.closest(e.originalEvent.target,".e-toolbar-item"))&&o.classList.contains("e-toolbar-popup")&&(e.cancel=!0);break;case"newfolder":De(i.parent);break;case"cut":E(i.parent);break;case"copy":N(i.parent);break;case"delete":for(var l=0;l<n.length;l++)if(!ye(n[l]))return void me(i.parent,n[l],Hn);Ke(i.parent,"Delete");break;case"details":i.parent.notify(On,{}),r=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(r=[]),Re(i.parent,r,i.parent.path,"details");break;case"paste":i.parent.folderPath="",G(i.parent);break;case"refresh":j(i.parent);break;case"download":ue(i.parent);break;case"rename":ye(n[0])?(i.parent.notify(Dn,{}),Ke(i.parent,"Rename")):me(i.parent,n[0],Hn);break;case"upload":Ce(i.parent);break;case"selectall":i.parent.notify("select-all-init",{});break;case"selection":i.parent.notify("clear-all-init",{})}})}},e.prototype.toolbarCreateHandler=function(){var e=this;if(!t.isNullOrUndefined(t.select("#"+this.getId("SortBy"),this.parent.element))){var i=[{id:this.getPupupId("name"),text:H(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?vi:""},{id:this.getPupupId("size"),text:H(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?vi:""},{id:this.getPupupId("date"),text:H(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?vi:""},{separator:!0},{id:this.getPupupId("ascending"),text:H(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?bi:""},{id:this.getPupupId("descending"),text:H(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?bi:""},{id:this.getPupupId("none"),text:H(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?bi:""}];this.buttonObj=new l.DropDownButton({items:i,cssClass:B(this.parent,pi),select:z.bind(this,this.parent),enableHtmlSanitizer:this.parent.enableHtmlSanitizer,enableRtl:this.parent.enableRtl,iconCss:"e-icons e-fe-sort"}),this.buttonObj.isStringTemplate=!0,this.buttonObj.appendTo("#"+this.getId("SortBy"))}if(!t.isNullOrUndefined(t.select("#"+this.getId("View"),this.parent.element))){var n=[{id:this.getPupupId("large"),text:H(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?"":bi},{id:this.getPupupId("details"),text:H(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?bi:""}];this.layoutBtnObj=new l.DropDownButton({iconCss:"Details"===this.parent.view?Wi:Ki,cssClass:B(this.parent,"e-caret-hide "+pi),items:n,select:this.layoutChange.bind(this),enableRtl:this.parent.enableRtl,content:'<span class="e-tbar-btn-text">'+H(this.parent,"View")+"</span>",beforeItemRender:function(t){var i=t.item.iconCss,n=t.item.text===H(e.parent,"View-LargeIcons"),s=i?" e-menu-icon "+i:"";t.element.innerHTML='<span class="'+s+'"></span>'+(n?'<span class="e-icons e-fe-large e-menu-icon"></span>':'<span class="e-icons e-fe-grid e-menu-icon"></span>')+t.item.text;var a=t.element.firstChild;a&&""===a.className&&t.element.removeChild(a)}}),this.layoutBtnObj.isStringTemplate=!0,this.layoutBtnObj.appendTo("#"+this.getId("View"))}this.hideItems(this.default,!0),this.hideStatus(),this.parent.portals&&this.toolbarObj.portals&&(this.parent.portals=this.parent.portals.concat(this.toolbarObj.portals),this.parent.renderReactTemplates());for(var s=t.selectAll(".e-btn",this.toolbarObj.element),a=0;a<s.length;a++)!function(e){s[e].onkeydown=function(e){13!==e.keyCode||e.target.classList.contains("e-fe-popup")||e.preventDefault()},s[e].onkeyup=function(t){13!==t.keyCode||t.target.classList.contains("e-fe-popup")||s[e].click()}}(a);this.parent.refreshLayout()},e.prototype.updateSortByButton=function(){if(this.buttonObj)for(var e=this.buttonObj.items,t=0;t<e.length;t++)e[t].id===this.getPupupId("name")?e[t].iconCss="name"===this.parent.sortBy?vi:"":e[t].id===this.getPupupId("size")?e[t].iconCss="size"===this.parent.sortBy?vi:"":e[t].id===this.getPupupId("date")?"dateModified"===this.parent.sortBy||"dateCreated"===this.parent.sortBy?e[t].iconCss=this.parent.sortBy===this.parent.sortBy?vi:"":e[t].iconCss="_fm_modified"===this.parent.sortBy?vi:"":e[t].id===this.getPupupId("ascending")?e[t].iconCss="Ascending"===this.parent.sortOrder?bi:"":e[t].id===this.getPupupId("descending")?e[t].iconCss="Descending"===this.parent.sortOrder?bi:"":e[t].id===this.getPupupId("none")&&(e[t].iconCss="None"===this.parent.sortOrder?bi:"")},e.prototype.getPupupId=function(e){return this.parent.element.id+"_ddl_"+e.toLowerCase()},e.prototype.layoutChange=function(e){"Details"===this.parent.view?e.item.id===this.getPupupId("large")&&C(this.parent,"LargeIcons"):e.item.id===this.getPupupId("details")&&C(this.parent,"Details")},e.prototype.toolbarItemData=function(e){var t=[],i="Both";this.parent.isMobile&&(i="Overflow");for(var n=0;n<e.length;n++){var s=void 0,a=void 0;this.parent.toolbarItems.length>0&&(a=this.getItemModel(this.parent.toolbarItems[parseInt(n.toString(),10)]));var r=this.getId(e[n]),o=H(this.parent,e[n]),l=H(this.parent,"Tooltip-"+e[n]);switch(e[n]){case"|":s={type:"Separator"};break;case"Upload":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-upload",showTextOn:i};break;case"SortBy":var h='<span class="e-tbar-btn-text e-tbar-ddb-text">'+o+"</span>";a&&a.text&&(h='<span class="e-tbar-btn-text e-tbar-ddb-text">'+a.text+"</span>"),s={id:r,tooltipText:l,template:'<button id="'+r+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1">'+h+"</button>"};break;case"Refresh":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-refresh",showTextOn:i};break;case"Selection":s={id:r,text:o,tooltipText:l,suffixIcon:"e-icons e-fe-clear",overflow:"Show",align:"Right"};break;case"View":var d=void 0;d=a&&a.text?a.text:H(this.parent,"View"),s={id:r,tooltipText:l,prefixIcon:"Details"===this.parent.view?Wi:Ki,overflow:"Show",align:"Right",text:o,showTextOn:"Overflow",template:'<button id="'+r+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1" aria-label='+d+"></button>"};break;case"Details":s={id:r,tooltipText:l,prefixIcon:"e-icons e-fe-details",overflow:"Show",align:"Right",text:o,showTextOn:"Overflow"};break;case"NewFolder":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-newfolder",showTextOn:i};break;case"Cut":s={id:r,text:o,tooltipText:l,prefixIcon:qi,showTextOn:i};break;case"Copy":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-copy",showTextOn:i};break;case"Paste":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-paste",showTextOn:i};break;case"Delete":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-delete",showTextOn:i};break;case"Rename":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-rename",showTextOn:i};break;case"Download":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-download",showTextOn:i};break;case"SelectAll":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-select",showTextOn:i};break;default:s={id:r,text:o,tooltipText:l,template:""}}if(this.parent.toolbarItems.length>0&&a){var p=$n({},s,a);t.push(p)}else t.push(s)}return t},e.prototype.getItemModel=function(e){var t={};return e.id&&(t.id=e.id),e.text&&(t.text=e.text),e.tooltipText&&(t.tooltipText=e.tooltipText),e.prefixIcon&&(t.prefixIcon=e.prefixIcon),e.cssClass&&(t.cssClass=e.cssClass),"Both"!==e.showTextOn&&(t.showTextOn=e.showTextOn),e.template&&(t.template=e.template),e.disabled&&(t.disabled=e.disabled),"auto"!==e.width&&(t.width=e.width),e.suffixIcon&&(t.suffixIcon=e.suffixIcon),"Left"!==e.align&&(t.align=e.align),"None"!==e.overflow&&(t.overflow=e.overflow),e.htmlAttributes&&(t.htmlAttributes=e.htmlAttributes),"Button"!==e.type&&(t.type=e.type),!0!==e.visible&&(t.visible=e.visible),e.showAlwaysInPopup&&(t.showAlwaysInPopup=e.showAlwaysInPopup),-1!==e.tabIndex&&(t.tabIndex=e.tabIndex),t},e.prototype.getId=function(e){return this.parent.element.id+"_tb_"+e.toLowerCase()},e.prototype.addEventListener=function(){this.parent.on($i,this.onPropertyChanged,this),this.parent.on(bn,this.onSelectionChanged,this),this.parent.on(yn,this.onLayoutChange,this),this.parent.on(jn,this.showPaste,this),this.parent.on(xn,this.hidePaste,this),this.parent.on(hn,this.destroy,this),this.parent.on(In,this.updateSortByButton,this)},e.prototype.reRenderToolbar=function(e){var t=this,i=[];if(this.parent.toolbarItems.length>0?i=this.parent.toolbarItems.map(function(e){return e.name}):void 0!==e.newProp.toolbarSettings.items&&(i=e.newProp.toolbarSettings.items.map(function(e){return e.trim()})),i.length>0){this.items=this.toolbarItemData(this.getItems(i));var n={items:this.items};this.parent.trigger("toolbarCreate",n,function(e){t.buttonObj&&t.buttonObj.destroy(),t.layoutBtnObj&&t.layoutBtnObj.destroy(),t.items=e.items,t.toolbarObj.items=t.items,t.toolbarObj.dataBind(),t.toolbarCreateHandler()})}},e.prototype.onSelectionChanged=function(){this.hideStatus(),this.hideItems(this.single,!0),this.hideItems(this.selection,!1),1===this.parent.selectedItems.length?(this.hideItems(this.single,!1),this.hideItems(this.selection,!0)):this.parent.selectedItems.length>1&&(this.hideItems(this.multiple,!1),this.hideItems(this.selection,!0));var e=t.select("#"+this.getId("Selection"),this.toolbarObj.element);if(this.parent.selectedItems.length>0&&e&&!this.parent.enableVirtualization){var i=void 0;i=1===this.parent.selectedItems.length?this.parent.selectedItems.length+" "+H(this.parent,"Item-Selection"):this.parent.selectedItems.length+" "+H(this.parent,"Items-Selection"),t.select(".e-tbar-btn-text",e).textContent=i,this.toolbarObj.hideItem(e.parentElement,!1)}},e.prototype.hideItems=function(e,i){for(var n=0;n<e.length;n++){var s=t.select("#"+this.getId(e[n]),this.parent.element);s&&this.toolbarObj.hideItem(s.parentElement,i)}},e.prototype.hideStatus=function(){var e=t.select("#"+this.getId("Selection"),this.toolbarObj.element);e&&this.toolbarObj.hideItem(e.parentElement,!0)},e.prototype.showPaste=function(){this.hideItems(["Paste"],!1)},e.prototype.hidePaste=function(){this.hideItems(["Paste"],!0)},e.prototype.onLayoutChange=function(){if(this.layoutBtnObj){this.layoutBtnObj.iconCss="Details"===this.parent.view?Wi:Ki;for(var e=this.layoutBtnObj.items,t=0;t<e.length;t++)e[t].id===this.getPupupId("large")?e[t].iconCss="LargeIcons"===this.parent.view?bi:"":e[t].id===this.getPupupId("details")&&(e[t].iconCss="Details"===this.parent.view?bi:"")}},e.prototype.removeEventListener=function(){this.parent.off($i,this.onPropertyChanged),this.parent.off(bn,this.onSelectionChanged),this.parent.off(yn,this.onLayoutChange),this.parent.off(jn,this.showPaste),this.parent.off(xn,this.hidePaste),this.parent.off(hn,this.destroy),this.parent.off(In,this.updateSortByButton)},e.prototype.getModuleName=function(){return"toolbar"},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++)switch(i[t]){case"cssClass":this.buttonObj&&(this.buttonObj.cssClass=B(this.parent,pi)),this.layoutBtnObj&&(this.layoutBtnObj.cssClass=B(this.parent,"e-caret-hide "+pi));break;case"height":case"width":this.toolbarObj.refreshOverflow();break;case"toolbarSettings":case"toolbarItems":this.reRenderToolbar(e)}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.buttonObj&&this.buttonObj.destroy(),this.layoutBtnObj&&this.layoutBtnObj.destroy(),this.toolbarObj.destroy(),this.parent.refreshLayout())},e.prototype.enableItems=function(e,i){for(var n=0;n<e.length;n++){var s=t.select("#"+this.getId(e[n]),this.parent.element);s&&this.toolbarObj.enableItems(s.parentElement,i)}},e}(),es=function(){function e(e){this.filemanagerInstance=e,this.largeIconInstance=e.largeiconsviewModule}return e.prototype.setUIVirtualization=function(){var e=this.largeIconInstance.items,i=e.slice(0,1),n=o.ListBase.createListFromJson(t.createElement,i,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(t.selectAll("."+gi,n)),this.largeIconInstance.element.appendChild(n),0!==this.itemList.length&&this.largeIconInstance.element.querySelector("."+xi)&&this.largeIconInstance.element.removeChild(this.largeIconInstance.element.querySelector("."+xi)),this.itemCount=this.getItemCount(Object.keys(this.largeIconInstance.allItems).length),this.largeIconInstance.element.firstChild.remove(),this.largeIconInstance.items=e.slice(0,this.itemCount)},e.prototype.setUlElementHeight=function(){this.lastRowCount=(this.largeIconInstance.allItems.length-this.itemCount)%this.rowItemCount?(this.largeIconInstance.allItems.length-this.itemCount)%this.rowItemCount:this.rowItemCount,this.topElement=this.filemanagerInstance.createElement("div"),this.topElement.classList.add("e-virtual-top"),this.largeIconInstance.element.firstElementChild.insertBefore(this.topElement,this.largeIconInstance.element.firstElementChild.firstChild),this.bottomElement=this.filemanagerInstance.createElement("div"),this.bottomElement.classList.add("e-virtual-bottom"),this.largeIconInstance.element.firstElementChild.insertBefore(this.bottomElement,null);var e=parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue("margin-bottom"),10);this.listItemHeight=this.largeIconInstance.itemList[0].getBoundingClientRect().height+e,this.totalHeight=Object.keys(this.largeIconInstance.allItems).length/this.rowItemCount*this.listItemHeight,this.topElement.style.height="0px",this.bottomElement.style.height=this.totalHeight+"px",this.topElementHeight=0,this.bottomElementHeight=this.totalHeight,this.listDiff=0,this.renderedCount=this.itemCount},e.prototype.getItemCount=function(e){var i=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-right"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-left"),10);this.rowItemCount=Math.floor(parseFloat(t.formatUnit(this.largeIconInstance.element.firstElementChild.clientWidth))/(this.itemList[0].offsetWidth+i));var n=this.rowItemCount*Math.round(parseFloat(t.formatUnit(this.largeIconInstance.element.clientHeight))/this.itemList[0].offsetHeight);return n>e&&(n=e),n},e.prototype.wireScrollEvent=function(e){e?t.EventHandler.remove(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll):t.EventHandler.add(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll,this)},e.prototype.onVirtualUiScroll=function(){var e;this.scrollPosition=t.isNullOrUndefined(this.scrollPosition)?0:this.scrollPosition;var i=this.getscrollerHeight(0);if(this.topElementHeight=this.listItemHeight*Math.floor(i/this.listItemHeight),this.bottomElementHeight=this.totalHeight-this.topElementHeight,e=i<=this.totalHeight?[this.topElementHeight,this.bottomElementHeight]:[this.totalHeight,0],this.topElementHeight=e[0],this.bottomElementHeight=e[1],this.topElementHeight!==parseFloat(this.topElement.style.height))if(this.topElement.style.height=this.topElementHeight+"px",this.bottomElement.style.height=this.bottomElementHeight+"px",i>this.scrollPosition){n=Math.round(this.topElementHeight/this.listItemHeight-this.listDiff);this.onNormalScroll(n,!0)}else{var n=Math.round(this.listDiff-this.topElementHeight/this.listItemHeight);this.onNormalScroll(n,!1)}this.listDiff=Math.round(this.topElementHeight/this.listItemHeight),this.scrollPosition=i,this.largeIconInstance.itemList=Array.prototype.slice.call(t.selectAll("."+gi,this.largeIconInstance.element)),this.largeIconInstance.items=this.largeIconInstance.allItems.slice(this.renderedCount-this.itemCount,this.renderedCount)},e.prototype.getscrollerHeight=function(e){return this.largeIconInstance.element.firstElementChild.scrollTop-e<=0?0:this.largeIconInstance.element.firstElementChild.scrollTop-e},e.prototype.onNormalScroll=function(e,t){for(var i=0;i<e;i++)this.updateUI(t)},e.prototype.updateUI=function(e){var i=this;if(e){if(this.items=this.largeIconInstance.allItems.slice(this.renderedCount,this.renderedCount+this.rowItemCount),this.items.length>0){r=o.ListBase.createListFromJson(t.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(t.selectAll("."+gi,r)),this.itemList.forEach(function(e){i.largeIconInstance.element.firstElementChild.insertBefore(e,i.bottomElement)}),this.renderedCount=this.largeIconInstance.allItems.length>=this.renderedCount+this.rowItemCount?this.renderedCount+this.rowItemCount:this.renderedCount+this.lastRowCount;for(h=0;h<this.rowItemCount;h++)t.detach(this.topElement.nextElementSibling)}}else{var n=void 0,s=void 0;this.renderedCount===this.largeIconInstance.allItems.length?(n=this.renderedCount-(this.itemCount-this.rowItemCount+this.lastRowCount),this.renderedCount=this.renderedCount-this.lastRowCount<this.itemCount?this.itemCount:this.renderedCount-this.lastRowCount,s=!0):(n=this.renderedCount-this.itemCount,this.renderedCount=this.renderedCount-this.rowItemCount<this.itemCount?this.itemCount:this.renderedCount-this.rowItemCount);var a=n-this.rowItemCount>0?n-this.rowItemCount:0;if(this.items=this.largeIconInstance.allItems.slice(a,n),this.items.length>0){var r=o.ListBase.createListFromJson(t.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(t.selectAll("."+gi,r));for(var l=this.itemList.length;l>0;l--)this.largeIconInstance.element.firstElementChild.insertBefore(this.itemList[l-1],this.topElement.nextElementSibling);for(var h=0;h<(s?this.lastRowCount:this.rowItemCount);h++)t.detach(this.bottomElement.previousElementSibling)}}},e.prototype.getModuleName=function(){return"virtualization"},e.prototype.destroy=function(){this.filemanagerInstance.isDestroyed||t.isNullOrUndefined(this.largeIconInstance.element.firstElementChild)||this.wireScrollEvent(!0)},e}(),ts=function(){function e(e){this.removeNodes=[],this.moveNames=[],this.expandTree=!1,this.isDrag=!1,this.isPathDragged=!1,this.isRenameParent=!1,this.isRightClick=!1,this.isSameNodeClicked=!1,this.isNodeExpandCalled=!1,this.renameParent=null,this.previousSelected=null,this.isNodeClickCalled=!1,this.restrictSelecting=!1,this.parent=e,this.addEventListener(),this.keyConfigs={altEnter:"alt+enter",esc:"escape",del:"delete",ctrlX:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"ctrl+v",ctrlShiftN:"ctrl+shift+n",shiftF10:"shift+F10",f2:"f2"}}return e.prototype.onInit=function(){if(t.isNullOrUndefined(this.treeObj)){var e=t.getValue(this.parent.pathId[0],this.parent.feParent);t.setValue("_fm_icon","e-fe-folder",e);var i={},n=t.getValue("id",e);t.isNullOrUndefined(n)||t.setValue("data-id",n,i),ye(e)||t.setValue("class",be(e),i),t.isNullOrUndefined(i)||t.setValue("_fm_htmlAttr",i,e),this.treeObj=new h.TreeView({fields:{dataSource:[e],id:"_fm_id",parentID:"_fm_pId",expanded:"_fm_expanded",selected:"_fm_selected",text:"name",hasChildren:"hasChild",iconCss:"_fm_icon",htmlAttributes:"_fm_htmlAttr",tooltip:"name"},enableHtmlSanitizer:this.parent.enableHtmlSanitizer,sortOrder:this.parent.navigationPaneSettings.sortOrder,nodeSelecting:this.onNodeSelecting.bind(this),nodeSelected:this.onNodeSelected.bind(this),nodeExpanding:this.onNodeExpand.bind(this),nodeClicked:this.onNodeClicked.bind(this),allowEditing:!0,nodeEditing:this.onNodeEditing.bind(this),drawNode:this.onDrowNode.bind(this),enableRtl:this.parent.enableRtl,dataBound:this.addDragDrop.bind(this)}),this.treeObj.isStringTemplate=!0,this.treeObj.appendTo("#"+this.parent.element.id+"_tree"),this.wireEvents()}},e.prototype.addDragDrop=function(){var e=this;!this.parent.isMobile&&this.treeObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.treeObj.element,{cursorAt:this.parent.dragCursorPosition,dragTarget:".e-fullrow",distance:5,dragArea:this.parent.element,drag:le.bind(this,this.parent),dragStart:function(t){ne(e.parent,t,e.dragObj)},dragStop:ie.bind(this,this.parent),enableTailMode:!0,enableAutoScroll:!1,helper:this.dragHelper.bind(this)})):!this.parent.allowDragAndDrop&&this.dragObj&&this.dragObj.destroy())},e.prototype.dragHelper=function(e){var i=e.sender.target;if(!i.classList.contains("e-fullrow"))return null;var n=t.closest(i,"li");return this.parent.dragPath="",this.parent.dragData=[],this.parent.activeElements=[],this.parent.activeElements=[n],this.parent.dragNodes=[],w(this.parent,n),this.parent.dragData=this.getTreeData(n),this.parent.dragPath=this.getDragPath(n,this.parent.dragData[0].name),this.parent.dragNodes.push(this.parent.dragData[0].name),te(this.parent),this.parent.virtualDragElement},e.prototype.getDragPath=function(e,t){return Q(this.getDropPath(e,t))},e.prototype.getDropPath=function(e,t){var i=e.getAttribute("data-id");return u(e,this.parent.hasId?i:t,this.parent.hasId)},e.prototype.onDrowNode=function(e){var t={element:e.node,fileDetails:e.nodeData,module:"NavigationPane"};this.parent.trigger("fileLoad",t)},e.prototype.addChild=function(e,i,n){var s=U(e);if(s.length>0&&(null==s[0].filterPath||null==this.getTreeData(i)[0].filterPath||s[0].filterPath!==this.getTreeData(i)[0].filterPath)){for(var a=0,r=s;a<s.length;){r[a]._fm_icon="e-fe-folder";var o={},l=t.getValue("id",r[a]);t.isNullOrUndefined(l)||t.setValue("data-id",l,o),ye(r[a])||t.setValue("class",be(r[a]),o),t.isNullOrUndefined(o)||t.setValue("_fm_htmlAttr",o,r[a]),a++}var h=t.select('[data-uid="'+i+'"]',this.treeObj.element),d=t.select("ul",h);t.isNullOrUndefined(d)&&this.treeObj.addNodes(s,i,null,n)}},e.prototype.onNodeSelecting=function(e){if(!e.isInteracted&&!this.isRightClick&&!this.isSameNodeClicked&&!this.isPathDragged&&!this.isRenameParent||this.restrictSelecting)return this.restrictSelecting=!1,void(this.isNodeClickCalled=!1);if(!this.renameParent){this.parent.activeModule="navigationpane";var i=this.getTreeData(t.getValue("id",e.nodeData));if(e.node.getAttribute("data-uid")!==this.parent.pathId[this.parent.pathId.length-1]&&!this.isRightClick&&!this.isNodeClickCalled||this.isSameNodeClicked){if(this.isNodeClickCalled=!1,!this.isSameNodeClicked){this.isSameNodeClicked=!0;s={action:e.action,fileDetails:i[0],isInteracted:e.isInteracted};this.parent.trigger("fileSelect",s)}if(!this.isRightClick){var n={cancel:!1,fileDetails:i[0],module:"NavigationPane"};this.parent.trigger("fileOpen",n),e.cancel=n.cancel}e.cancel&&(this.restrictSelecting=!!this.isNodeClickCalled&&this.previousSelected[0]!==e.node.getAttribute("data-uid"),this.isNodeClickCalled=!0,this.isSameNodeClicked=!1,this.previousSelected=this.treeObj.selectedNodes,this.treeObj.selectedNodes=[e.node.getAttribute("data-uid")])}else if(this.previousSelected[0]!==e.node.getAttribute("data-uid")){var s={action:e.action,fileDetails:i[0],isInteracted:this.isNodeClickCalled};this.parent.trigger("fileSelect",s)}}},e.prototype.openFileOnContextMenuClick=function(e){var t=this.treeObj.getTreeData(e);this.parent.selectedItems=[],this.parent.itemData=t,this.activeNode=e,this.parent.activeModule="navigationpane";var i={cancel:!1,fileDetails:t[0],module:"NavigationPane"};this.parent.trigger("fileOpen",i),this.isNodeClickCalled=!0,i.cancel||(c(e,this.parent.itemData[0],this.parent),Se(this.parent,this.isPathDragged?En:ln,this.parent.path),this.parent.visitedItem=e,this.isPathDragged=this.isRenameParent=this.isRightClick=!1,this.treeObj.selectedNodes=[e.getAttribute("data-uid")])},e.prototype.onNodeSelected=function(e){if(this.parent.breadcrumbbarModule&&this.parent.breadcrumbbarModule.searchObj&&!this.renameParent&&(this.parent.breadcrumbbarModule.searchObj.element.value="",this.parent.isFiltered=!1,this.isNodeClickCalled=!1),this.parent.searchedItems=[],!(e.isInteracted||this.isRightClick||this.isSameNodeClicked||this.isPathDragged||this.isRenameParent))return void(this.parent.pathId=f(e.node));this.activeNode=e.node,this.parent.activeModule="navigationpane";var i=this.getTreeData(t.getValue("id",e.nodeData));this.parent.selectedItems=[],this.parent.itemData=i;var n=this.parent.path;!this.isRightClick&&this.isSameNodeClicked?c(e.node,this.parent.itemData[0],this.parent):(this.parent.pathId=f(e.node),this.parent.visitedItem=e.node),e.node.querySelector(".e-icons")&&null===e.node.querySelector("."+gi)&&(this.expandNodeTarget="add"),n!==this.parent.path&&(!this.isRightClick&&this.isSameNodeClicked&&(Se(this.parent,this.isPathDragged?En:ln,this.parent.path),this.isNodeClickCalled=!0),this.parent.visitedItem=e.node),this.isPathDragged=this.isRenameParent=this.isRightClick=this.isSameNodeClicked=!1},e.prototype.onPathDrag=function(e){this.isPathDragged=!0,this.selectResultNode(e[0])},e.prototype.onNodeExpand=function(e){if((e.isInteracted||this.isDrag)&&null===e.node.querySelector("."+gi)){var i=t.getValue("text",e.nodeData),n=e.node.getAttribute("data-id"),s=!t.isNullOrUndefined(n),a=t.isNullOrUndefined(n)?i:n,r=u(e.node,a,s);this.expandNodeTarget=e.node.getAttribute("data-uid"),this.parent.expandedId=this.expandNodeTarget,this.parent.itemData=this.getTreeData(t.getValue("id",e.nodeData)),this.parent.pathId.push(t.getValue("id",e.nodeData)),Se(this.parent,"node-expand",r),this.isNodeExpandCalled=!0}},e.prototype.onNodeExpanded=function(e){this.addChild(e.files,this.expandNodeTarget,!1),this.parent.expandedId=null,this.isNodeExpandCalled=!1},e.prototype.onNodeClicked=function(e){if(this.parent.activeModule="navigationpane",this.previousSelected=this.treeObj.selectedNodes,this.activeNode=e.node,3===e.event.which&&e.node.getAttribute("data-uid")!==this.treeObj.selectedNodes[0])this.isRightClick=!0,this.isNodeClickCalled=!0,this.treeObj.selectedNodes=[e.node.getAttribute("data-uid")];else if(e.node.getAttribute("data-uid")===this.treeObj.selectedNodes[0]&&0!==this.parent.selectedItems.length){this.parent.setProperties({selectedItems:[]},!0);var t="LargeIcons"===this.parent.view?"largeiconsview":"detailsview";this.parent.notify($i,{module:t,newProp:{selectedItems:[]}})}else e.node.getAttribute("data-uid")!==this.treeObj.selectedNodes[0]||this.isNodeClickCalled||this.isNodeExpandCalled||(3===e.event.which&&(this.isRightClick=!0),this.isSameNodeClicked=!0,this.isNodeClickCalled=!0,this.treeObj.selectedNodes=[e.node.getAttribute("data-uid")])},e.prototype.onNodeEditing=function(e){t.isNullOrUndefined(e.innerHtml)||(e.cancel=!0)},e.prototype.onPathChanged=function(e){this.parent.isCut=!1;var i=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feFiles);if("add"===this.expandNodeTarget){var n=t.select('[data-uid="'+this.treeObj.selectedNodes[0]+'"]',this.treeObj.element),s=t.isNullOrUndefined(n)?null:t.select(".e-list-parent",n);t.isNullOrUndefined(s)&&this.addChild(e.files,this.treeObj.selectedNodes[0],!this.expandTree),this.expandNodeTarget=""}this.expandTree=!1,t.isNullOrUndefined(i)&&t.setValue(this.parent.pathId[this.parent.pathId.length-1],e.files,this.parent.feFiles),this.parent.uploadObj.directoryUpload&&!this.parent.hasId&&this.updateTree(e)},e.prototype.updateTree=function(e){if(this.treeObj){var t=this.treeObj.selectedNodes[0];this.updateTreeNode(e,t)}},e.prototype.updateTreeNode=function(e,t){var i=-1!==this.treeObj.expandedNodes.indexOf(t);this.removeChildNodes(t),this.addChild(e.files,t,!i)},e.prototype.removeChildNodes=function(e){var i=t.select('[data-uid="'+e+'"]',this.treeObj.element),n=t.select(".e-list-parent",i),s=n?Array.prototype.slice.call(n.children):null;s&&this.treeObj.removeNodes(s)},e.prototype.onOpenEnd=function(e){var t=this.parent.pathId[this.parent.pathId.length-1];this.treeObj.expandAll(this.treeObj.selectedNodes),this.treeObj.selectedNodes=[t],this.expandNodeTarget="add",this.onPathChanged(e)},e.prototype.onOpenInit=function(e){"navigationpane"===this.parent.activeModule&&e.target.querySelector(".e-icons")&&this.treeObj.expandAll(this.treeObj.selectedNodes)},e.prototype.onInitialEnd=function(e){this.onInit(),this.addChild(e.files,t.getValue("_fm_id",e.cwd),!1)},e.prototype.onFinalizeEnd=function(e){this.onInit();var i=t.getValue("_fm_id",e.cwd);this.addChild(e.files,i,!1),this.treeObj.selectedNodes=[this.parent.pathId[this.parent.pathId.length-1]]},e.prototype.onCreateEnd=function(e){this.updateTree(e)},e.prototype.onSelectedData=function(){"navigationpane"===this.parent.activeModule&&this.updateItemData()},e.prototype.onDeleteInit=function(){if("navigationpane"===this.parent.activeModule){this.updateActionData();var e=t.getValue("name",this.parent.itemData[0]);Ee(this.parent,[e],this.parent.path,"delete")}},e.prototype.onDeleteEnd=function(e){if("navigationpane"===this.parent.activeModule){var i=this.treeObj.selectedNodes[0],n=t.select('[data-uid="'+i+'"]',this.treeObj.element),s=t.closest(n,".e-list-parent").parentElement;this.treeObj.selectedNodes=[s.getAttribute("data-uid")],this.treeObj.dataBind()}this.updateTree(e)},e.prototype.onRefreshEnd=function(e){this.updateTree(e)},e.prototype.onRenameInit=function(){"navigationpane"===this.parent.activeModule&&this.updateRenameData()},e.prototype.onRenameEndParent=function(e){var i=this.renameParent?this.renameParent:this.parent.pathId[this.parent.pathId.length-1];if(this.expandTree=-1!==this.treeObj.expandedNodes.indexOf(this.treeObj.selectedNodes[0]),this.updateTreeNode(e,i),this.parent.expandedId=null,this.renameParent)this.renameParent=null;else{var n=[];if(this.parent.hasId)n=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",this.parent.renameText,!1));a.length>0&&(n=new s.DataManager(a).executeLocal((new s.Query).where("_fm_pId","equal",i,!1)))}if(n.length>0){var r=t.getValue(this.treeObj.fields.id,n[0]);this.treeObj.selectedNodes=[r],this.treeObj.dataBind()}}},e.prototype.onRenameEnd=function(e){if(""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered){var i=this.treeObj.getTreeData(),n=[];if(this.parent.hasId)n=new s.DataManager(i).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new s.DataManager(i).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",this.parent.currentItemText,!1));a.length>0&&(n=new s.DataManager(a).executeLocal((new s.Query).where("filterPath","equal",this.parent.filterPath,!1)))}n.length>0&&(this.renameParent=t.getValue(this.treeObj.fields.parentID,n[0]),this.parent.expandedId=this.renameParent,this.parent.itemData=this.getTreeData(this.renameParent),Se(this.parent,Cn,this.parent.filterPath.replace(/\\/g,"/")))}else this.updateTree(e)},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++)switch(i[t]){case"allowDragAndDrop":this.addDragDrop();break;case"navigationPaneSettings":Se(this.parent,en,"/"),e.oldProp.navigationPaneSettings.sortOrder!==e.newProp.navigationPaneSettings.sortOrder&&(this.treeObj.sortOrder=e.newProp.navigationPaneSettings.sortOrder)}},e.prototype.onDownLoadInit=function(){this.doDownload()},e.prototype.onSelectionChanged=function(e){this.treeObj.selectedNodes=[e.selectedNode]},e.prototype.onClearPathInit=function(e){this.removeChildNodes(e.selectedNode)},e.prototype.onDragEnd=function(e){var t=[];t=this.parent.isPasteError||this.parent.isSearchDrag?this.getMoveNames(e.files,this.parent.isSearchDrag,this.parent.dragPath):this.moveNames,this.treeObj.removeNodes(t)},e.prototype.getMoveNames=function(e,i,n){for(var a=[],r=0;r<e.length;r++)if(!e[r].isFile&&!this.parent.hasId){var o=e[r].previousName;if(i){var l=(n+=e[r].previousName).lastIndexOf("/");o=n.substring(l+1),n=n.substring(0,l+1)}for(var h=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",o,!1)),d=0;d<h.length;d++){var p=t.getValue("filterPath",h[d]);if((p=p.replace(/\\/g,"/"))===n){a.push(t.getValue(this.treeObj.fields.id,h[d]));break}}}return a},e.prototype.onCutEnd=function(e){var t=[];this.parent.isPasteError||this.parent.isSearchCut?this.moveNames=this.getMoveNames(e.files,this.parent.isSearchCut,this.parent.targetPath):t=this.moveNames,this.treeObj.removeNodes(t)},e.prototype.selectResultNode=function(e){if(this.parent.hasId){var i=this.treeObj.getTreeData().filter(function(t){return t.name===e.name})[0];this.treeObj.selectedNodes=[t.getValue("_fm_id",i)],this.treeObj.dataBind()}else{var n=t.getValue("filterPath",e),a=t.getValue("name",e),r=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",a,!1));if(r.length>0){var o=new s.DataManager(r).executeLocal((new s.Query).where("filterPath","equal",n,!1));if(o.length>0){var l=t.getValue(this.treeObj.fields.id,o[0]);this.treeObj.selectedNodes=[l],this.treeObj.dataBind()}}}},e.prototype.onDropPath=function(e){this.onpasteEnd(e),this.selectResultNode(this.parent.dropData),this.parent.isDropEnd=!this.parent.isPasteError},e.prototype.onpasteEnd=function(e){var i=[];if(this.parent.hasId)i=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where("id","equal",t.getValue("id",e.cwd),!1));else{var n=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",t.getValue("name",e.cwd),!1));n.length>0&&(i=new s.DataManager(n).executeLocal((new s.Query).where("filterPath","equal",t.getValue("filterPath",e.cwd),!1)))}if(i.length>0){var a=t.getValue(this.treeObj.fields.id,i[0]),r=-1===this.treeObj.expandedNodes.indexOf(a);this.removeChildNodes(a),this.addChild(e.files,a,r)}this.parent.expandedId=null,this.onPathChanged(e),this.parent.isDragDrop&&this.checkDropPath(e)},e.prototype.checkDropPath=function(e){if(this.parent.hasId)return this.parent.isDropEnd=!this.parent.isPasteError,void Z(this.parent);-1===this.parent.dropPath.indexOf(X(this.parent,e))?(this.parent.isDropEnd=!1,Z(this.parent)):this.parent.isDropEnd=!this.parent.isPasteError},e.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&this.updateItemData(),this.moveNames=[];for(var e=this.parent.isDragDrop?this.parent.dragData:this.parent.actionRecords,i=0;i<e.length;i++)!1===t.getValue("isFile",e[i])&&this.moveNames.push(t.getValue("_fm_id",e[i]))},e.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.getTreeData(this.treeObj.selectedNodes[0]),this.parent.activeElements=[this.activeNode])},e.prototype.addEventListener=function(){this.parent.on($i,this.onPropertyChanged,this),this.parent.on("download-init",this.onDownLoadInit,this),this.parent.on(Zi,this.onInitialEnd,this),this.parent.on(en,this.onFinalizeEnd,this),this.parent.on(ln,this.onPathChanged,this),this.parent.on(En,this.onpasteEnd,this),this.parent.on(Rn,this.onCutEnd,this),this.parent.on(Nn,this.onpasteInit,this),this.parent.on("node-expand",this.onNodeExpanded,this),this.parent.on(tn,this.onCreateEnd,this),this.parent.on("selected-data",this.onSelectedData,this),this.parent.on(sn,this.onDeleteInit,this),this.parent.on(an,this.onDeleteEnd,this),this.parent.on(rn,this.onRefreshEnd,this),this.parent.on("update-tree-selection",this.onSelectionChanged,this),this.parent.on(gn,this.onOpenInit,this),this.parent.on(mn,this.onOpenEnd,this),this.parent.on(hn,this.destroy,this),this.parent.on(Dn,this.onRenameInit,this),this.parent.on(Sn,this.onRenameEnd,this),this.parent.on(Cn,this.onRenameEndParent,this),this.parent.on(vn,this.onClearPathInit,this),this.parent.on(Pn,this.oncutCopyInit,this),this.parent.on(Tn,this.onDropInit,this),this.parent.on(wn,this.onMenuItemData,this),this.parent.on(An,this.onDragEnd,this),this.parent.on(Un,this.onDragging,this),this.parent.on(Fn,this.onDropPath,this),this.parent.on(On,this.onDetailsInit,this),this.parent.on(nn,this.onPathDrag,this)},e.prototype.removeEventListener=function(){this.parent.off(Zi,this.onInitialEnd),this.parent.off("download-init",this.onDownLoadInit),this.parent.off(en,this.onFinalizeEnd),this.parent.off("selected-data",this.onSelectedData),this.parent.off($i,this.onPropertyChanged),this.parent.off(ln,this.onPathChanged),this.parent.off(En,this.onpasteEnd),this.parent.off(Rn,this.onCutEnd),this.parent.off(Nn,this.onpasteInit),this.parent.off("update-tree-selection",this.onSelectionChanged),this.parent.off("node-expand",this.onNodeExpanded),this.parent.off(tn,this.onCreateEnd),this.parent.off(rn,this.onRefreshEnd),this.parent.off(gn,this.onOpenInit),this.parent.off(mn,this.onOpenEnd),this.parent.off(hn,this.destroy),this.parent.off(Dn,this.onRenameInit),this.parent.off(Sn,this.onRenameEnd),this.parent.off(Cn,this.onRenameEndParent),this.parent.off(vn,this.onClearPathInit),this.parent.off(sn,this.onDeleteInit),this.parent.off(an,this.onDeleteEnd),this.parent.off(Pn,this.oncutCopyInit),this.parent.off(Tn,this.onDropInit),this.parent.off(An,this.onDragEnd),this.parent.off(Un,this.onDragging),this.parent.off(Fn,this.onDropPath),this.parent.off(On,this.onDetailsInit),this.parent.off(wn,this.onMenuItemData),this.parent.off(nn,this.onPathDrag)},e.prototype.onDetailsInit=function(){if(this.parent.activeModule===this.getModuleName()){var e=this.getTreeData(this.treeObj.selectedNodes[0]);this.parent.itemData=e}},e.prototype.onMenuItemData=function(e){if(this.parent.activeModule===this.getModuleName()){var i=t.closest(e.target,"li");this.parent.itemData=this.getTreeData(i.getAttribute("data-uid"))}},e.prototype.onDragging=function(e){var i=t.closest(e.target,"li");if(i.classList.contains("e-node-collapsed")){this.isDrag=!0;var n=parseInt(i.getAttribute("aria-level"),10);this.treeObj.expandAll([i.getAttribute("data-uid")],n+1),this.isDrag=!1}},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=t.closest(e.target,"li");this.parent.dropData=this.getTreeData(i)[0],this.parent.dropPath=this.getDropPath(i,t.getValue("name",this.parent.dropData))}},e.prototype.getModuleName=function(){return"navigationpane"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.treeObj&&(this.unWireEvents(),this.treeObj.destroy()))},e.prototype.wireEvents=function(){this.keyboardModule=new t.KeyboardEvents(this.treeObj.element,{keyAction:this.keyDown.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},e.prototype.unWireEvents=function(){this.keyboardModule.destroy()},e.prototype.keyDown=function(e){switch(e.action){case"altEnter":this.parent.notify(On,{}),Re(this.parent,[],this.parent.path,"details");break;case"esc":v(this.parent);break;case"del":this.parent.pathId[0]!==this.activeNode.getAttribute("data-uid")&&(this.updateItemData(),ye(this.parent.itemData[0])?(this.removeNodes=[],Ke(this.parent,"Delete")):me(this.parent,this.parent.itemData[0],Hn));break;case"ctrlC":N(this.parent);break;case"ctrlV":this.parent.folderPath="",G(this.parent);break;case"ctrlX":E(this.parent);break;case"shiftF10":if(this.updateItemData(),!we(this.parent.itemData[0]))return void me(this.parent,this.parent.itemData[0],qn);0!==this.parent.selectedItems.length&&this.doDownload();break;case"f2":if(0===this.parent.selectedItems.length){var t=this.getTreeData(this.treeObj.selectedNodes[0])[0];ye(t)?(this.updateRenameData(),Ke(this.parent,"Rename")):me(this.parent,t,Hn)}}},e.prototype.getTreeData=function(e){for(var i=this.treeObj.getTreeData(e),n=0;n<i.length;n++)t.isNullOrUndefined(t.getValue("hasChild",i[n]))&&t.setValue("hasChild",!1,i[n]);return i},e.prototype.updateRenameData=function(){this.updateItemData(),this.parent.currentItemText=t.getValue("name",this.parent.itemData[0])},e.prototype.updateItemData=function(){var e=this.getTreeData(this.treeObj.selectedNodes[0])[0];this.parent.itemData=[e],this.parent.isFile=!1},e.prototype.updateActionData=function(){this.updateItemData();var e=Q(this.parent.path);this.parent.setProperties({path:e},!0),this.parent.pathId.pop(),this.parent.pathNames.pop()},e.prototype.doDownload=function(){var e=Q(this.parent.path),i=this.treeObj.selectedNodes[0]===this.parent.pathId[0]?"":t.getValue("name",this.parent.itemData[0]);We(this.parent,e,[i])},e}(),is=function(){function e(e){this.isInteracted=!0,this.interaction=!0,this.isPasteOperation=!1,this.isColumnRefresh=!1,this.dragObj=null,this.startIndex=null,this.firstItemIndex=null,this.isSelectionUpdate=!1,this.currentSelectedItem=[],this.count=0,this.isRendered=!0,this.isLoaded=!1,this.isNameWidth=!1,this.pasteOperation=!1,this.uploadOperation=!1,this.actionDivert=!1,d.Grid.Inject(d.Resize,d.ContextMenu,d.Sort,d.VirtualScroll),this.parent=e,this.element=t.select("#"+this.parent.element.id+ti,this.parent.element),this.addEventListener(),this.keyConfigs={altEnter:"alt+enter",esc:"escape",tab:"tab",moveDown:"downarrow",ctrlEnd:"ctrl+end",ctrlHome:"ctrl+home",ctrlDown:"ctrl+downarrow",ctrlLeft:"ctrl+leftarrow",ctrlRight:"ctrl+rightarrow",shiftEnd:"shift+end",shiftHome:"shift+home",shiftDown:"shift+downarrow",shiftUp:"shift+uparrow",ctrlUp:"ctrl+uparrow",csEnd:"ctrl+shift+end",csHome:"ctrl+shift+home",csDown:"ctrl+shift+downarrow",csUp:"ctrl+shift+uparrow",space:"space",ctrlSpace:"ctrl+space",shiftSpace:"shift+space",csSpace:"ctrl+shift+space",end:"end",home:"home",moveUp:"uparrow",del:"delete",ctrlX:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"ctrl+v",ctrlShiftN:"ctrl+shift+n",shiftdel:"shift+delete",ctrlD:"ctrl+d",f2:"f2",ctrlA:"ctrl+a",enter:"enter"}}return e.prototype.render=function(e){if(n.showSpinner(this.parent.element),"Details"===this.parent.view){t.removeClass([this.parent.element],"e-fe-m-select");var i=T(this.parent,e.files);this.checkNameWidth();var s=this.getColumns(),a=void 0;this.parent.isMobile?a=[]:"None"!==this.parent.sortOrder&&(a=[{direction:this.parent.sortOrder,field:this.parent.sortBy}]),this.gridObj=new d.Grid({dataSource:i,allowSorting:!0,rowSelecting:this.onSelection.bind(this,"select"),rowDeselecting:this.onSelection.bind(this,"unselect"),rowSelected:this.onSelected.bind(this),rowDeselected:this.onDeSelection.bind(this),allowResizing:this.parent.detailsViewSettings.columnResizing,selectionSettings:{type:this.parent.allowMultiSelection?"Multiple":"Single",checkboxMode:"ResetOnRowClick",persistSelection:!!this.parent.enableVirtualization},enableRtl:this.parent.enableRtl,pageSettings:{pageSize:20},enableVirtualization:this.parent.enableVirtualization,enablePersistence:this.parent.enablePersistence,enableVirtualMaskRow:!0,sortSettings:{allowUnsort:!1,columns:a},columns:s,recordDoubleClick:this.DblClickEvents.bind(this),beforeDataBound:this.onBeforeDataBound.bind(this),dataBound:this.onDataBound.bind(this),rowDataBound:this.onRowDataBound.bind(this),actionBegin:this.onActionBegin.bind(this),headerCellInfo:this.onHeaderCellInfo.bind(this),width:"100%",height:this.parent.enableVirtualization?this.getGridHeight():"auto",beforeCopy:function(e){e.cancel=!0},load:function(e){this.focusModule.destroy()},locale:this.parent.locale}),this.parent.isReact&&(this.gridObj.isReact=!0,this.gridObj.portals=[],this.gridObj.on("reactTemplateRender",this.reactTemplateRender,this)),this.gridObj.isStringTemplate=!0,this.gridObj.appendTo("#"+this.parent.element.id+ti),this.wireEvents(),this.adjustHeight(),this.emptyArgs=e}},e.prototype.reactTemplateRender=function(e){this.parent.portals=e,this.parent.portals&&this.parent.toolbarModule&&this.parent.toolbarModule.toolbarObj&&this.parent.toolbarModule.toolbarObj.portals&&(this.parent.portals=this.parent.portals.concat(this.parent.toolbarModule.toolbarObj.portals)),this.parent.notify("renderReactTemplate",this.parent.portals),this.parent.renderReactTemplates()},e.prototype.getGridHeight=function(){var e=t.select("#"+this.parent.element.id+ri,this.parent.element),i=t.select("#"+this.parent.element.id+oi,this.parent.element);return e.offsetHeight-i.offsetHeight-36},e.prototype.checkNameWidth=function(){var e=this.parent.detailsViewSettings.columns;this.isNameWidth=!1;for(var i=0;i<e.length;i++)if("name"===e[i].field)return void(this.isNameWidth=!t.isNullOrUndefined(e[i].width))},e.prototype.adjustWidth=function(e,t){if(!this.isNameWidth||"name"!==t)for(var i=0;i<e.length;i++)if(e[i].field===t){var n=void 0;n=""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?this.element.clientWidth<=680?"name"===t?"120px":"180px":"auto":this.element.clientWidth<=500?"120px":"auto",e[i].width=n}},e.prototype.getColumns=function(){var e,i=this.parent.enableHtmlSanitizer;if(this.parent.isMobile)e=[{field:"name",headerText:H(this.parent,"Name"),width:"auto",minWidth:120,headerTextAlign:"Left",template:t.initializeCSPTemplate(function(e){return'<div class="e-fe-text">'+(i?t.SanitizeHtmlHelper.sanitize(e.name):e.name)+'</div><div class="e-fe-date">'+e._fm_modified+"</div>' +\n '<span class=\"e-fe-size\">"+e.size+"</span>"})}];else{e=t.extend([],this.parent.detailsViewSettings.columns,null,!0),this.adjustWidth(e,"name");for(var n=this,s=0,a=e.length;s<a;s++)!function(s,a){if(e[s].headerText=H(n.parent,e[s].headerText),"name"===e[s].field&&!t.isNullOrUndefined(e[s].template)){var r=e[s].template;e[s].template=t.initializeCSPTemplate(function(e){var n=i?t.SanitizeHtmlHelper.sanitize(e.name):e.name;return r.replace(/\${name}/g,n)})}}(s)}var r=this.parent.isMobile||this.parent.isBigger?"54":"46",o={field:"type",width:r,minWidth:r,template:t.initializeCSPTemplate(function(e){return'<span class="e-fe-icon '+e._fm_iconClass+'"></span>'}),allowResizing:!1,allowSorting:!0,customAttributes:{class:"e-fe-grid-icon"},headerTemplate:t.initializeCSPTemplate(function(){return'<span class="e-fe-icon e-fe-folder"></span>'})};if(e.unshift(o),this.parent.showItemCheckBoxes){var l=this.parent.isBigger?"36":"26",h={type:"checkbox",width:l,minWidth:l,customAttributes:{class:"e-fe-checkbox"},allowResizing:!1,allowSorting:!1};this.parent.isMobile?e.push(h):e.unshift(h)}for(var s=0,a=e.length;s<a;s++)e[s].disableHtmlEncode=!this.parent.enableHtmlSanitizer;return e},e.prototype.adjustHeight=function(){if(this.gridObj){var e=t.select("#"+this.parent.element.id+ri,this.parent.element),i=t.select("#"+this.parent.element.id+oi,this.parent.element),n=t.select("."+Vi,this.parent.element),s=e.offsetHeight-i.offsetHeight-n.offsetHeight;this.gridObj.height=s,this.gridObj.dataBind()}},e.prototype.renderCheckBox=function(){this.gridObj.columns=this.getColumns(),this.isColumnRefresh=!0,this.gridObj.refreshColumns()},e.prototype.onRowDataBound=function(e){var i=t.select(".e-fe-grid-name",e.row);if(!i)for(var n=this.parent.detailsViewSettings.columns,s=0;s<n.length;s++)if("name"===n[s].field){i=e.row.children[this.parent.allowMultiSelection?s+2:s+1];break}if(i&&i.setAttribute("title",t.getValue("name",e.data)),this.parent.isLayoutChange&&this.parent.isCut&&"move"===this.parent.fileAction&&this.parent.selectedNodes&&0!==this.parent.selectedNodes.length&&-1!==this.parent.selectedNodes.indexOf(t.getValue("name",e.data))&&I(e.row),!this.parent.showFileExtension&&t.getValue("isFile",e.data)){var a=e.row.querySelector(".e-fe-text");if(a){var r=t.getValue("name",e.data),o=t.getValue("type",e.data);a.innerHTML=r.substr(0,r.length-o.length)}}if(void 0!==t.getValue("size",e.data)&&e.row.querySelector(".e-fe-size")){var l=e.row.querySelector(".e-fe-size"),h=void 0;if(t.getValue("isFile",e.data)){for(var d=t.getValue("size",e.data),p=new t.Internationalization(this.parent.locale),c=void 0,n=this.parent.detailsViewSettings.columns,s=0;s<n.length;s++)if("size"===n[s].field){c=t.isNullOrUndefined(n[s].format)?"n":n[s].format.toString();break}h=p.formatNumber(d/1024,{format:c})+" "+H(this.parent,"KB")}else h="";l.innerHTML=h}if(this.parent.isMobile&&void 0!==t.getValue("_fm_modified",e.data)&&e.row.querySelector(".e-fe-date")){for(var u=e.row.querySelector(".e-fe-date"),p=new t.Internationalization(this.parent.locale),n=this.parent.detailsViewSettings.columns,f=void 0,s=0;s<n.length;s++)if("dateModified"===n[s].field){f=n[s].format;break}var g=p.formatDate(new Date(t.getValue("_fm_modified",e.data)),f);u.innerHTML=g}var m=e.row.querySelector("."+Si);m&&m.classList.add("e-small"),ye(e.data)||(e.row.className+=" "+be(e.data));var b={element:e.row,fileDetails:e.data,module:"DetailsView"};this.parent.trigger("fileLoad",b)},e.prototype.onActionBegin=function(e){if("sorting"===e.requestType){if(this.parent.setProperties({sortOrder:e.direction},!0),this.parent.setProperties({sortBy:e.columnName},!0),0!==this.parent.selectedItems.length){this.sortItem=!0;var i=this.gridObj.getSelectedRowIndexes(),n=i.length;for(this.sortSelectedNodes=[];n>0;){var s=this.gridObj.getRowsObject()[i[n-1]].data;this.sortSelectedNodes.push(t.getValue(this.parent.hasId?"id":"name",s)),n--}}this.parent.notify(In,{})}},e.prototype.onHeaderCellInfo=function(e){var t=e.node.querySelector("."+Si);t&&t.classList.add("e-small")},e.prototype.onBeforeDataBound=function(e){var t=this;n.showSpinner(this.parent.element);var i=this.parent.detailsViewSettings.columns.find(function(e){return e.field===t.parent.sortBy});if(i&&!("sortComparer"in i)){var s=T(this.parent,this.parent.enableVirtualization?e.result:this.gridObj.dataSource);e.result=s}},e.prototype.onDataBound=function(){if(this.createDragObj(),(0!==this.parent.selectedItems.length&&!this.parent.enableVirtualization||0!==this.parent.selectedItems.length&&this.parent.enableVirtualization&&0==this.element.querySelector(".e-content").scrollTop)&&this.selectRecords(this.parent.selectedItems),!0===this.isPasteOperation&&(this.isColumnRefresh?this.isColumnRefresh=!1:(this.selectRecords(this.parent.pasteNodes),this.isPasteOperation=!1)),this.parent.createdItem&&(this.selectRecords([t.getValue(this.parent.hasId?"id":"name",this.parent.createdItem)]),this.parent.createdItem=null),this.parent.layoutSelectedItems.length&&this.selectRecords(this.parent.layoutSelectedItems),this.parent.renamedItem&&(this.addSelection(this.parent.renamedItem),this.parent.renamedItem=null),!0===this.sortItem&&(this.selectRecords(this.sortSelectedNodes),this.sortItem=!1),this.isSelectionUpdate&&(this.isColumnRefresh?this.isColumnRefresh=!1:(this.selectRecords(this.currentSelectedItem),this.isSelectionUpdate=!1)),!0===this.uploadOperation&&(this.count++,this.selectRecords(this.parent.uploadItem),this.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[])),this.gridObj.currentViewData.length*this.gridObj.getRowHeight()<this.gridObj.height)(e=this.gridObj.getHeaderContent()).style.paddingRight="",e.style.paddingLeft="",t.select(".e-headercontent",e).style.borderRightWidth="0",(i=this.gridObj.getContent().querySelector(".e-content")).style.overflowY="",i.classList.add("e-scrollShow");else{var e=this.gridObj.getHeaderContent();this.parent.enableRtl?e.style.paddingLeft="16px":e.style.paddingRight="16px";var i=this.gridObj.getContent().querySelector(".e-content");i.classList.remove("e-scrollShow")}this.isRendered=!0,this.parent.isLayoutChange=!1,n.hideSpinner(this.parent.element),this.checkEmptyDiv(this.emptyArgs),this.isInteracted=!!this.isLoaded||this.isInteracted,this.isLoaded=!1},e.prototype.selectRecords=function(e){for(var i=this.gridObj.getCurrentViewRecords(),n=[],s=0,a=i.length;s<a;s++){var r=this.parent.hasId?t.getValue("id",i[s]):L(this.parent,i[s]);if(-1!==e.indexOf(r))n.push(s);else if(!this.parent.showFileExtension&&r.includes(".")){var o=r.split(".").slice(0,-1).join(".");-1!==e.indexOf(o)&&n.push(s)}}0!==n.length&&(this.gridObj.selectRows(n),this.addFocus(this.gridObj.selectedRowIndex))},e.prototype.addSelection=function(e){var i=this.gridObj.getCurrentViewRecords(),n=[];if(this.parent.hasId)n=new s.DataManager(i).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new s.DataManager(i).executeLocal((new s.Query).where("name","equal",t.getValue("name",e),!1));a.length>0&&(n=new s.DataManager(a).executeLocal((new s.Query).where("filterPath","equal",this.parent.filterPath,!1)))}if(n.length>0){var r=i.indexOf(n[0]);this.gridObj.selectRows([r])}},e.prototype.onSortColumn=function(){"None"!==this.parent.sortOrder?this.gridObj.sortModule.sortColumn(this.parent.sortBy,this.parent.sortOrder):this.gridObj.dataSource=T(this.parent,this.gridObj.dataSource),0!==this.element.querySelector(".e-content").scrollTop&&this.gridObj.freezeRefresh()},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var i=0,n=Object.keys(e.newProp);i<n.length;i++)switch(n[i]){case"allowDragAndDrop":this.createDragObj();break;case"height":this.adjustHeight();break;case"detailsViewSettings":if(!t.isNullOrUndefined(this.gridObj)){this.checkNameWidth();var s=this.getColumns();this.gridObj.columns=s,this.gridObj.allowResizing=this.parent.detailsViewSettings.columnResizing,this.gridObj.dataBind(),this.gridObj.refreshColumns()}break;case"selectedItems":if(this.interaction=!1,0!==this.parent.selectedItems.length){if(!this.parent.allowMultiSelection){var a=this.parent.selectedItems.slice(this.parent.selectedItems.length-1);this.parent.setProperties({selectedItems:a},!0)}this.selectRecords(this.parent.selectedItems),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)}else t.isNullOrUndefined(this.gridObj)||(this.gridObj.clearSelection(),this.interaction=!0);break;case"showFileExtension":case"showHiddenItems":Se(this.parent,ln,this.parent.path);break;case"allowMultiSelection":t.isNullOrUndefined(this.gridObj)||(this.currentSelectedItem=this.parent.selectedItems,this.gridObj.selectionSettings.type=e.newProp.allowMultiSelection?"Multiple":"Single",this.isSelectionUpdate=!0,this.renderCheckBox());break;case"view":C(this.parent,"Details");break;case"width":this.onDetailsResize()}},e.prototype.onPathChanged=function(e){this.parent.isCut=!1,""===this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.gridObj&&(this.parent.searchedItems=[],this.parent.isFiltered?this.updatePathColumn():this.removePathColumn(!1)),O(this.parent),"Details"===this.parent.view&&(this.isInteracted=!1,n.showSpinner(this.parent.element),this.parent.setProperties({selectedItems:[]},!0),this.gridObj.dataSource=T(this.parent,e.files),this.gridObj.freezeRefresh(),this.parent.isReact&&this.gridObj.on("reactTemplateRender",this.reactTemplateRender,this)),this.emptyArgs=e},e.prototype.updatePathColumn=function(){var e=this.gridObj.columns.length,t=JSON.parse(JSON.stringify(this.gridObj.columns));if(t[e-1].field&&"filterPath"!==t[e-1].field&&!this.parent.isMobile){var i={field:"filterPath",headerText:H(this.parent,"Path"),minWidth:180,width:"auto"};this.gridObj.columns.push(i),this.adjustWidth(this.gridObj.columns,"filterPath"),this.adjustWidth(this.gridObj.columns,"name"),this.isColumnRefresh=!0,this.gridObj.refreshColumns()}},e.prototype.checkEmptyDiv=function(e){var i=T(this.parent,e.files);if(0!==i.length||t.isNullOrUndefined(this.element.querySelector("."+Bi))){if(0!==i.length&&this.element.querySelector("."+xi))if(this.element.querySelector("."+Bi).querySelector("."+xi)){var n=this.element.querySelector("."+Bi).querySelector("."+xi);this.element.querySelector("."+Bi).removeChild(n)}else this.element.removeChild(this.element.querySelector("."+xi))}else F(this.parent,this.element,e)},e.prototype.onOpenInit=function(){if("detailsview"===this.parent.activeModule){var e=this.gridObj.getSelectedRecords()[0];this.openContent(e)}},e.prototype.DblClickEvents=function(e){this.gridObj.selectRows([e.rowIndex]);var t;e.rowData&&(t=JSON.parse(JSON.stringify(e.rowData)),this.openContent(t))},e.prototype.openContent=function(e){var i=this;if(!ve(e))return void me(this.parent,e,_n);var n={cancel:!1,fileDetails:e,module:"DetailsView"};this.parent.trigger("fileOpen",n,function(n){if(!n.cancel){var s=t.getValue("name",e);if(t.getValue("isFile",e)){if(R(e)===Li){var a=M(i.parent,e);Ot(i.parent,s,a)}}else{if(""!==i.parent.breadcrumbbarModule.searchObj.element.value||i.parent.isFiltered)K(i.parent,e);else{var r=t.getValue("id",e);i.parent.oldPath=i.parent.path;var o=i.parent.path+(t.isNullOrUndefined(r)?s:r)+"/";i.parent.setProperties({path:o},!0),i.parent.pathNames.push(s),i.parent.pathId.push(t.getValue("_fm_id",e)),i.parent.itemData=[e],x(i.parent)}i.parent.isFiltered=!1}i.element.focus(),i.parent.enableVirtualization&&i.parent.element.querySelector("#"+i.parent.element.id+si).focus()}})},e.prototype.onLayoutChange=function(e){"Details"===this.parent.view&&(this.parent.enableVirtualization&&this.parent.setProperties({selectedItems:[]},!0),this.gridObj?this.isLoaded=!0:this.render(e),this.parent.isFiltered&&(this.updatePathColumn(),this.parent.setProperties({selectedItems:[]},!0)),this.gridObj.dataSource=T(this.parent,e.files),this.parent.notify("hide-layout",{}),this.gridObj.element.classList.remove(Ji),this.isInteracted=!1,this.gridObj.clearSelection(),""!==this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.onSearchFiles(e),this.adjustHeight(),this.gridObj.sortSettings.columns.length>0&&this.gridObj.sortSettings.columns[0].field!==this.parent.sortBy&&"None"!==this.parent.sortOrder&&this.gridObj.sortColumn(this.parent.sortBy,this.parent.sortOrder))},e.prototype.onSearchFiles=function(e){"Details"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(bn,{}),this.parent.isLayoutChange||(this.parent.layoutSelectedItems=[]),this.updatePathColumn(),this.parent.searchedItems=e.files,this.onPathChanged(e))},e.prototype.removePathColumn=function(e){var i=this.gridObj.columns.length,n=JSON.parse(JSON.stringify(this.gridObj.columns));n[i-1].field&&"filterPath"===n[i-1].field&&(t.isNullOrUndefined(this.gridObj.sortSettings.columns[0])||"filterPath"!==this.gridObj.sortSettings.columns[0].field||("None"!==this.parent.sortOrder?this.gridObj.sortColumn("name",this.parent.sortOrder):this.gridObj.dataSource=T(this.parent,this.gridObj.dataSource),this.parent.notify(In,{})),this.gridObj.columns.pop(),e||(this.isColumnRefresh=!0,this.gridObj.refreshColumns()))},e.prototype.onFinalizeEnd=function(e){"Details"===this.parent.view&&(this.gridObj?this.onPathChanged(e):this.render(e))},e.prototype.onCreateEnd=function(e){"Details"===this.parent.view&&this.onPathChanged(e)},e.prototype.onRenameInit=function(){"detailsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},e.prototype.onSelectedData=function(){"detailsview"===this.parent.activeModule&&(this.parent.itemData=this.gridObj.getSelectedRecords())},e.prototype.onDeleteInit=function(){"detailsview"===this.parent.activeModule&&Ee(this.parent,this.parent.selectedItems,this.parent.path,"delete")},e.prototype.onDeleteEnd=function(e){"Details"===this.parent.view&&(this.onPathChanged(e),this.parent.setProperties({selectedItems:[]},!0))},e.prototype.onRefreshEnd=function(e){"Details"===this.parent.view&&(this.isInteracted=!1,this.removePathColumn(!1),this.gridObj.dataSource=T(this.parent,e.files),this.emptyArgs=e)},e.prototype.onHideLayout=function(){"Details"!==this.parent.view&&this.gridObj&&this.gridObj.element.classList.add(Ji)},e.prototype.onSelectAllInit=function(){"Details"===this.parent.view&&(this.isInteracted=!1,this.parent.allowMultiSelection?this.gridObj.selectionModule.selectRowsByRange(0,this.gridObj.getRows().length):this.gridObj.selectRow(this.gridObj.getRows().length-1),this.isInteracted=!0,this.interaction=!0)},e.prototype.onClearAllInit=function(){"Details"===this.parent.view&&(this.removeSelection(),this.interaction=!0)},e.prototype.onSelectionChanged=function(){t.removeClass([this.element],"e-headercheck"),this.parent.selectedItems.length>0&&t.addClass([this.element],"e-headercheck")},e.prototype.onLayoutRefresh=function(){"Details"===this.parent.view&&this.adjustHeight()},e.prototype.onBeforeRequest=function(){this.isRendered=!1},e.prototype.onAfterRequest=function(){this.isRendered=!0},e.prototype.onUpdateSelectionData=function(){"Details"===this.parent.view&&(this.parent.itemData=this.gridObj.getSelectedRecords())},e.prototype.addEventListener=function(){this.parent.on(en,this.onFinalizeEnd,this),this.parent.on(hn,this.destroy,this),this.parent.on(yn,this.onLayoutChange,this),this.parent.on(ln,this.onPathChanged,this),this.parent.on(tn,this.onCreateEnd,this),this.parent.on(Tn,this.onDropInit,this),this.parent.on(On,this.onDetailsInit,this),this.parent.on(rn,this.onRefreshEnd,this),this.parent.on(fn,this.onSearchFiles,this),this.parent.on(Vn,this.onMethodCall,this),this.parent.on(un,this.onActionFailure,this),this.parent.on($i,this.onPropertyChanged,this),this.parent.on(sn,this.onDeleteInit,this),this.parent.on(an,this.onDeleteEnd,this),this.parent.on("selected-data",this.onSelectedData,this),this.parent.on(Dn,this.onRenameInit,this),this.parent.on(Sn,this.onPathChanged,this),this.parent.on(gn,this.onOpenInit,this),this.parent.on(Mn,this.onSortColumn,this),this.parent.on(mn,this.onPathChanged,this),this.parent.on("filter-end",this.onPathChanged,this),this.parent.on(Nn,this.onPasteInit,this),this.parent.on("hide-layout",this.onHideLayout,this),this.parent.on("select-all-init",this.onSelectAllInit,this),this.parent.on("clear-all-init",this.onClearAllInit,this),this.parent.on(kn,this.onPathColumn,this),this.parent.on(bn,this.onSelectionChanged,this),this.parent.on(dn,this.onBeforeRequest,this),this.parent.on(cn,this.onAfterRequest,this),this.parent.on(En,this.onpasteEnd,this),this.parent.on(Pn,this.oncutCopyInit,this),this.parent.on(wn,this.onMenuItemData,this),this.parent.on(on,this.onDetailsResizeHandler,this),this.parent.on("splitter-resize",this.onDetailsResize,this),this.parent.on("layout-refresh",this.onLayoutRefresh,this),this.parent.on(Fn,this.onDropPath,this),this.parent.on("update-selection-data",this.onUpdateSelectionData,this)},e.prototype.removeEventListener=function(){this.parent.off(en,this.onFinalizeEnd),this.parent.off(hn,this.destroy),this.parent.off(yn,this.onLayoutChange),this.parent.off(ln,this.onPathChanged),this.parent.off(Nn,this.onPasteInit),this.parent.off(tn,this.onCreateEnd),this.parent.off(rn,this.onRefreshEnd),this.parent.off(fn,this.onSearchFiles),this.parent.off(Vn,this.onMethodCall),this.parent.off(un,this.onActionFailure),this.parent.off($i,this.onPropertyChanged),this.parent.off(Dn,this.onRenameInit),this.parent.off(Sn,this.onPathChanged),this.parent.off("filter-end",this.onPathChanged),this.parent.off(gn,this.onOpenInit),this.parent.off(Mn,this.onSortColumn),this.parent.off(mn,this.onPathChanged),this.parent.off("hide-layout",this.onHideLayout),this.parent.off("select-all-init",this.onSelectAllInit),this.parent.off("clear-all-init",this.onClearAllInit),this.parent.off(sn,this.onDeleteInit),this.parent.off(an,this.onDeleteEnd),this.parent.off(kn,this.onPathColumn),this.parent.off(bn,this.onSelectionChanged),this.parent.off(dn,this.onBeforeRequest),this.parent.off(cn,this.onAfterRequest),this.parent.off(En,this.onpasteEnd),this.parent.off(Pn,this.oncutCopyInit),this.parent.off(Tn,this.onDropInit),this.parent.off("selected-data",this.onSelectedData),this.parent.off(On,this.onDetailsInit),this.parent.off(wn,this.onMenuItemData),this.parent.off(on,this.onDetailsResizeHandler),this.parent.off("splitter-resize",this.onDetailsResize),this.parent.off("layout-refresh",this.onLayoutRefresh),this.parent.off(Fn,this.onDropPath),this.parent.off("update-selection-data",this.onUpdateSelectionData)},e.prototype.onActionFailure=function(){this.interaction=!0},e.prototype.onMenuItemData=function(e){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=[this.gridObj.getRowInfo(e.target).rowData])},e.prototype.onPasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""!==this.parent.folderPath?this.gridObj.getSelectedRecords():[P(this.parent)])},e.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.parent.itemData=this.gridObj.getSelectedRecords():this.parent.itemData=[t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},e.prototype.dragHelper=function(e){var t=e.sender.target.closest("tr.e-row");if(!t)return null;var i;t.getElementsByClassName("e-fe-text")[0]?i=this.parent.hasId?this.gridObj.getRowInfo(t).rowData.id:t.getElementsByClassName("e-fe-text")[0].innerText:t.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling&&(i=this.parent.hasId?this.gridObj.getRowInfo(t).rowData.id:t.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling.innerText),t&&!t.querySelector(".e-active")&&this.selectRecords([i]),w(this.parent,t),this.parent.activeElements=[],this.parent.dragData=[],this.parent.dragData=this.gridObj.getSelectedRecords();var n;return 0===this.parent.dragData.length&&t&&(n=this.gridObj.getRowInfo(t)),n&&this.parent.dragData.push(n.rowData),this.parent.dragPath=this.parent.path,this.parent.activeElements=this.gridObj.getSelectedRows(),te(this.parent),this.parent.virtualDragElement},e.prototype.onDetailsResize=function(){if("Details"===this.parent.view&&!this.parent.isMobile&&!t.isNullOrUndefined(this.gridObj))for(var e=this.gridObj.getHeaderContent().querySelector(".e-headercontent").firstChild.childNodes[0],i=this.gridObj.getContent().querySelector(".e-content .e-table").children[0],n=this.gridObj.getColumns(),s=0;s<n.length;s++)(!this.isNameWidth&&"name"===n[s].field||"filterPath"===n[s].field)&&(""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?this.element.clientWidth<=680?"name"===n[s].field?(e.children[s].setAttribute("style","width: 120px"),i.children[s].setAttribute("style","width: 120px")):(e.children[s].setAttribute("style","width: 180px"),i.children[s].setAttribute("style","width: 180px")):this.element.clientWidth>680&&(e.children[s].setAttribute("style","width: auto"),i.children[s].setAttribute("style","width: auto")):this.element.clientWidth<=500?(e.children[s].setAttribute("style","width: 120px"),i.children[s].setAttribute("style","width: 120px")):this.element.clientWidth>500&&(e.children[s].setAttribute("style","width: auto"),i.children[s].setAttribute("style","width: auto")))},e.prototype.onDetailsResizeHandler=function(){this.onDetailsResize(),"Details"!==this.parent.view||this.parent.isMobile||t.isNullOrUndefined(this.gridObj)||this.adjustHeight()},e.prototype.createDragObj=function(){var e=this;this.gridObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.gridObj.element,{cursorAt:this.parent.dragCursorPosition,distance:5,enableTailMode:!0,dragArea:this.parent.element,dragTarget:"."+ji,drag:le.bind(this,this.parent),dragStart:function(t){ne(e.parent,t,e.dragObj)},dragStop:ie.bind(this,this.parent),enableAutoScroll:!1,helper:this.dragHelper.bind(this)})):!this.parent.allowDragAndDrop&&this.dragObj&&this.dragObj.destroy())},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent);if(e.target.closest("tr")){var n=null;n=this.gridObj.getRowInfo(e.target).rowData,this.parent.dropPath=n.isFile?this.parent.path:k(this.parent,n,this.parent.path),this.parent.dropData=n.isFile?i:n}else this.parent.dropPath=this.parent.path,this.parent.dropData=i}},e.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.gridObj.getSelectedRecords(),this.parent.activeElements=this.gridObj.getSelectedRows())},e.prototype.onpasteEnd=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,this.parent.path!==this.parent.destinationPath&&this.parent.path!==X(this.parent,e)||this.onPathChanged(e))},e.prototype.onDropPath=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},e.prototype.getModuleName=function(){return"detailsview"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.gridObj&&(this.parent.isReact&&this.gridObj.off("reactTemplateRender",this.reactTemplateRender),this.unWireEvents(),this.gridObj.destroy()))},e.prototype.updateType=function(e){var i=t.select("."+ki,e);this.parent.isFile=!!t.isNullOrUndefined(i)},e.prototype.onSelection=function(e,t){var i={action:e,fileDetails:t.data,isInteracted:this.interaction,cancel:!1,target:t.target};this.parent.trigger("fileSelection",i),t.cancel=i.cancel},e.prototype.onSelected=function(e){this.parent.activeModule="detailsview",this.parent.isLayoutChange&&!this.parent.isFiltered||this.selectedRecords(),this.parent.notify(bn,{}),1===this.gridObj.getSelectedRowIndexes().length&&(this.firstItemIndex=this.gridObj.selectedRowIndex),this.gridObj.element.setAttribute("tabindex","-1"),this.triggerSelect("select",e);var i=this.gridObj.getRowByIndex(this.gridObj.selectedRowIndex);if(this.updateType(i),!t.isNullOrUndefined(i)&&!t.isNullOrUndefined(i.querySelector(".e-checkselect"))){if(1!==this.gridObj.getSelectedRowIndexes().length){var n=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2];this.gridObj.getRowByIndex(n).querySelector(".e-checkselect").setAttribute("tabindex","-1")}i.querySelector(".e-rowcell.e-fe-checkbox").removeAttribute("tabindex")}t.isNullOrUndefined(this.gridObj)||t.isNullOrUndefined(this.gridObj.element.querySelector(".e-checkselectall"))||this.gridObj.element.querySelector(".e-checkselectall").setAttribute("tabindex","-1");var s=this.gridObj.getSelectedRowIndexes();if(!this.parent.allowMultiSelection)for(var a=0;a<s.length;a++)s[a]===this.gridObj.selectedRowIndex?this.gridObj.getRowByIndex(s[a]).setAttribute("tabindex","0"):this.gridObj.getRowByIndex(s[a]).removeAttribute("tabindex");var r=s.length;if(this.parent.enableVirtualization)this.parent.currentItemText=t.getValue("name",e.data);else if(r>0){var o=this.gridObj.getRowsObject()[s[r-1]].data;this.parent.currentItemText=t.getValue("name",o)}var l=t.getValue("rowIndexes",e),h=t.getValue("enableSelectMultiTouch",this.gridObj.selectionModule);this.parent.isDevice&&t.isNullOrUndefined(l)&&e.target&&!h&&!e.target.closest(".e-headercell")&&(this.parent.isFile=t.getValue("isFile",e.data),this.parent.isFile||this.openContent(e.data)),this.parent.visitedItem=e.row,this.parent.enableVirtualization&&e.isHeaderCheckboxClicked||this.addFocus(this.gridObj.selectedRowIndex),this.parent.isLayoutChange||(this.isInteracted=!0)},e.prototype.onPathColumn=function(){"Details"!==this.parent.view||t.isNullOrUndefined(this.gridObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||this.removePathColumn(!1)},e.prototype.selectedRecords=function(){this.parent.setProperties({selectedItems:[]},!0);for(var e=this.gridSelectNodes(),t=0;t<e.length;){var i=e[t],n=de(this.parent,i);this.parent.selectedItems.push(n),t++}this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)},e.prototype.onDeSelection=function(e){if(!this.parent.allowMultiSelection&&t.isNullOrUndefined(e.data))this.gridObj.getRowByIndex(e.rowIndex).removeAttribute("tabindex");else if(this.gridObj.getSelectedRowIndexes().length>1){var i=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2];this.gridObj.getRowByIndex(i).querySelector(".e-checkselect").removeAttribute("tabindex")}if(-1===this.gridObj.selectedRowIndex&&this.gridObj.element.setAttribute("tabindex","0"),!this.isInteracted)return void(this.isInteracted=!0);this.selectedRecords(),0===this.parent.selectedItems.length&&(t.setValue("enableSelectMultiTouch",!1,this.gridObj.selectionModule),t.removeClass([this.parent.element],"e-fe-m-select")),this.parent.notify(bn,{}),this.triggerSelect("unselect",e),this.parent.visitedItem=null},e.prototype.triggerSelect=function(e,t){var i={action:e,fileDetails:t.data,isInteracted:this.interaction};this.parent.trigger("fileSelect",i),this.interaction=!0},e.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new t.KeyboardEvents(this.gridObj.element,{keyAction:this.keyupHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new t.KeyboardEvents(this.element,{keyAction:this.keydownHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),t.EventHandler.add(this.gridObj.element,"blur",this.removeFocus,this)},e.prototype.unWireEvents=function(){this.wireClickEvent(!1),this.keyboardModule.destroy(),this.keyboardDownModule.destroy(),t.EventHandler.remove(this.gridObj.element,"blur",this.removeFocus)},e.prototype.wireClickEvent=function(e){if(e){var i=this,n=this.gridObj.getContent();this.clickObj=new t.Touch(n,{tap:function(e){1===e.tapCount&&e.originalEvent.target.classList.contains("e-content")&&i.onClearAllInit()},tapHold:function(e){if(i.parent.isDevice){e.originalEvent.preventDefault(),i.parent.allowMultiSelection&&(t.setValue("enableSelectMultiTouch",i.parent.allowMultiSelection,i.gridObj.selectionModule),t.addClass([i.parent.element],"e-fe-m-select"));var n=e.originalEvent.target;if(n){var s=t.closest(n,"."+ji),a=i.gridObj.getRows().indexOf(s);i.gridObj.selectRow(a)}}}})}else this.clickObj&&this.clickObj.destroy()},e.prototype.removeSelection=function(){t.removeClass([this.parent.element],"e-fe-m-select"),this.gridObj.clearSelection(),this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(bn,{}),-1===this.gridObj.selectedRowIndex&&(this.startIndex=null),this.isInteracted=!0},e.prototype.removeFocus=function(){this.addFocus(null)},e.prototype.getFocusedItemIndex=function(){return t.isNullOrUndefined(this.getFocusedItem())?null:parseInt(this.getFocusedItem().getAttribute("data-rowindex"),10)},e.prototype.keydownHandler=function(e){if(this.isRendered)switch(e.action){case"end":case"home":case"space":case"ctrlSpace":case"shiftSpace":case"csSpace":case"ctrlA":case"enter":case"altEnter":case"ctrlEnd":case"shiftEnd":case"csEnd":case"ctrlHome":case"shiftHome":case"csHome":case"ctrlDown":case"shiftDown":case"csDown":case"ctrlLeft":case"shiftLeft":case"csLeft":case"esc":case"del":case"shiftdel":case"ctrlC":case"ctrlV":case"ctrlX":case"f2":case"moveDown":case"moveUp":case"ctrlD":e.preventDefault()}},e.prototype.keyupHandler=function(e){if(this.isRendered){e.preventDefault();var i,n,s,a=e.action,r=T(this.parent,this.gridObj.dataSource),o=r.length,l=(this.getFocusedItem(),this.getFocusedItemIndex()),h=this.gridObj.selectedRowIndex,d=this.gridObj.getSelectedRowIndexes();switch(a){case"altEnter":this.parent.notify(On,{}),Re(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":v(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"enter":if(-1===this.gridObj.selectedRowIndex)break;if(i=this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data){var p=JSON.parse(JSON.stringify(i));this.openContent(p)}break;case"ctrlC":N(this.parent);break;case"ctrlV":this.parent.folderPath="",G(this.parent);break;case"ctrlX":E(this.parent);break;case"ctrlD":this.doDownload();break;case"f2":this.performRename();break;case"ctrlA":if(!t.isNullOrUndefined(r[0])&&this.parent.allowMultiSelection){var c=this.gridObj.getContent().querySelector(".e-content"),u=c.scrollTop,f=this.gridObj.selectedRowIndex;this.gridObj.selectionModule.selectRowsByRange(0,r.length-1),c.scrollTop=u,-1!==f&&this.addFocus(f)}break;case"ctrlHome":case"tab":if(!t.isNullOrUndefined(r[0]))if(this.parent.allowMultiSelection||"ctrlHome"!==e.action){if(-1!==this.gridObj.selectedRowIndex&&"tab"===e.action)return;this.actionDivert?(this.addFocus(0),this.actionDivert=!1):(this.addHeaderFocus(),this.actionDivert=!0)}else this.gridObj.selectRow(0);break;case"ctrlEnd":t.isNullOrUndefined(r[0])||(this.parent.allowMultiSelection?this.addFocus(o-1):this.gridObj.selectRow(o-1));break;case"shiftHome":case"shiftEnd":case"csHome":case"csEnd":this.parent.allowMultiSelection?t.isNullOrUndefined(r[0])||(t.isNullOrUndefined(h)||-1===h?"csHome"===e.action||"shiftHome"===e.action?this.gridObj.selectRow(0):this.gridObj.selectionModule.selectRowsByRange(0,r.length-1):this.checkRowsKey(r,h,null,e)):this.gridObj.selectRow("shiftHome"===e.action||"csHome"===e.action?0:r.length-1);break;case"space":case"csSpace":case"shiftSpace":case"ctrlSpace":this.spaceSelection(d,l,h,e);break;case"csUp":case"csDown":case"shiftUp":case"shiftDown":this.shiftMoveMethod(r,h,l,d,e);break;case"ctrlUp":case"ctrlDown":this.parent.allowMultiSelection?this.ctrlMoveFunction(r,e,h):this.moveFunction(r,e,h);break;case"home":n=[t.getValue(this.parent.hasId?"id":"name",r[0])],this.parent.setProperties({selectedItems:n},!0),this.selectRecords(n);break;case"moveUp":case"moveDown":this.moveFunction(r,e,h);break;case"end":s=[t.getValue(this.parent.hasId?"id":"name",r[o-1])],this.parent.setProperties({selectedItems:s},!0),this.selectRecords(s)}}},e.prototype.gridSelectNodes=function(){return this.gridObj.getSelectedRecords()},e.prototype.doDownload=function(){if(0!==this.parent.selectedItems.length){this.parent.itemData=this.gridObj.getSelectedRecords();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!we(e[t]))return void me(this.parent,e[t],qn);We(this.parent,this.parent.path,this.parent.selectedItems)}},e.prototype.performDelete=function(){if(this.parent.selectedItems&&this.parent.selectedItems.length>0){this.parent.itemData=this.gridObj.getSelectedRecords();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!ye(e[t]))return void me(this.parent,e[t],Hn);Ke(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),ce(this.parent))},e.prototype.updateRenameData=function(){var e=this.gridSelectNodes()[0];pe(this.parent,e)},e.prototype.shiftMoveMethod=function(e,t,i,n,s){this.parent.allowMultiSelection?-1!==t||"csUp"!==s.action&&"csDown"!==s.action?-1===t||i===t||("csUp"===s.action||"csDown"===s.action)&&this.isSelected(n,i)?this.shiftSelectedItem(t,n,e,s):this.shiftSelectFocusItem(t,i,n,s):this.ctrlMoveFunction(e,s,t):this.moveFunction(e,s,t)},e.prototype.moveFunction=function(e,i,n){!t.isNullOrUndefined(this.getFocusedItem())&&this.parent.allowMultiSelection?"moveDown"===i.action?this.gridObj.selectRow(this.getFocusedItemIndex()+1):this.gridObj.selectRow(this.getFocusedItemIndex()-1):t.isNullOrUndefined(n)||-1===n?t.isNullOrUndefined(e[0])||this.gridObj.selectRow(0):"moveDown"===i.action||"ctrlDown"===i.action||"shiftDown"===i.action||"csDown"===i.action?this.gridObj.selectRow(n+(n!==e.length-1?1:0)):this.gridObj.selectRow(n-(0!==n?1:0))},e.prototype.spaceSelection=function(e,i,n,s){if(this.isSelected(e,i)||-1===n||"shiftSpace"!==s.action&&"csSpace"!==s.action)if(t.isNullOrUndefined(this.getFocusedItem())||i===n)if(-1!==n&&"ctrlSpace"===s.action&&this.parent.allowMultiSelection){var a=n;e.pop(),this.gridObj.selectRows(e),this.addFocus(a)}else"shiftSpace"===s.action&&this.gridObj.selectRow(n);else e.push(this.getFocusedItemIndex()),this.gridObj.selectRows(e);else i<n?this.gridObj.selectionModule.selectRowsByRange(i,n):this.gridObj.selectionModule.selectRowsByRange(n,i)},e.prototype.ctrlMoveFunction=function(e,i,n){var s;if(t.isNullOrUndefined(this.getFocusedItem()))t.isNullOrUndefined(n)||-1===n?t.isNullOrUndefined(e[0])||(s=0):s="ctrlDown"===i.action||"csDown"===i.action?n+(n<e.length?1:0):n-(n<1?0:1);else{var a=this.getFocusedItemIndex();s="ctrlDown"===i.action||"csDown"===i.action?a+(a<e.length-1?1:0):a-(a<1?0:1)}this.addFocus(s)},e.prototype.checkRowsKey=function(e,i,n,s){"Uncheck"===this.gridObj.checkAllRows||"Intermediate"===this.gridObj.checkAllRows?"csHome"!==s.action&&"csEnd"!==s.action?(t.isNullOrUndefined(this.startIndex)&&this.firstItemIndex!==i&&(this.firstItemIndex=i),"shiftEnd"===s.action?this.gridObj.selectionModule.selectRowsByRange(this.firstItemIndex,e.length-1):this.gridObj.selectionModule.selectRowsByRange(0,this.firstItemIndex),this.startIndex=i):"csEnd"===s.action?this.gridObj.selectRows(this.InnerItems(t.isNullOrUndefined(i)?0:i,t.isNullOrUndefined(n)?e.length-1:n,s)):t.isNullOrUndefined(i)?this.gridObj.selectRow(0):this.gridObj.selectRows(this.InnerItems(t.isNullOrUndefined(n)?0:n,i,s)):this.gridObj.selectionModule.selectRow("shiftHome"===s.action||"csHome"===s.action?0:e.length-1)},e.prototype.InnerItems=function(e,t,i){var n=this.gridObj.getSelectedRowIndexes();if("csEnd"===i.action)for(s=e+1;s<=t;s++)n.push(s);else for(var s=t-1;e<=s;s--)n.push(s);return n},e.prototype.shiftSelectFocusItem=function(e,i,n,s){var a=i+("shiftDown"===s.action||"csDown"===s.action?1:-1),r=t.isNullOrUndefined(this.startIndex)?e:n[0];r===a?this.gridObj.selectRow(r):r<a?"shiftDown"===s.action||"csDown"===s.action?this.gridObj.selectionModule.selectRowsByRange(r,a):this.gridObj.selectionModule.selectRowsByRange(a,r):"shiftDown"===s.action||"csDown"===s.action?this.gridObj.selectionModule.selectRowsByRange(a,r):this.gridObj.selectionModule.selectRowsByRange(r,a),this.startIndex=this.gridObj.selectedRowIndex},e.prototype.addFocus=function(e){var i=this.getFocusedItem(),n=this.gridObj.getRowByIndex(e);i&&(i.removeAttribute("tabindex"),t.removeClass([i],[wi,Di])),t.isNullOrUndefined(n)||(this.gridObj.element.setAttribute("tabindex","-1"),n.setAttribute("tabindex","0"),n.focus(),t.addClass([n],[wi,Di]))},e.prototype.addHeaderFocus=function(){var e=t.select(".e-row",this.element);this.gridObj.element.setAttribute("tabindex","-1");var i=t.select("th.e-fe-grid-name",this.element);i.setAttribute("tabindex","0"),i.focus(),t.addClass([i],[wi,Di]),e.setAttribute("tabindex","0"),0===e.tabIndex&&0===i.tabIndex&&t.removeClass([e],[wi,Di])},e.prototype.getFocusedItem=function(){return t.select("."+Di,this.element)},e.prototype.isSelected=function(e,t){for(var i=!1,n=0;n<=e.length-1;n++)if(e[n]===t){i=!0;break}return i},e.prototype.shiftSelectedItem=function(e,i,n,s){-1===e?this.gridObj.selectRow(0):t.isNullOrUndefined(this.startIndex)&&s.shiftKey?(this.startIndex=this.gridObj.selectedRowIndex,this.gridObj.selectRows([e,"shiftDown"===s.action||"csDown"===s.action?e+(e!==n.length-1?1:0):e-(0!==e?1:0)])):"shiftDown"===s.action||"shiftUp"===s.action?("shiftDown"===s.action&&-1===i.indexOf(e+1)?e!==n.length-1&&i.push(e+1):"shiftUp"===s.action&&-1===i.indexOf(e-1)?0!==e&&i.push(e-1):i.pop(),this.gridObj.selectRows(i)):"csDown"===s.action?this.isSelected(i,this.getFocusedItemIndex()+1)?this.addFocus(this.getFocusedItemIndex()+1):(i.push(this.getFocusedItemIndex()+1),this.gridObj.selectRows(i)):this.isSelected(i,this.getFocusedItemIndex()-1)?this.addFocus(this.getFocusedItemIndex()-1):(i.push(this.getFocusedItemIndex()-1),this.gridObj.selectRows(i))},e.prototype.onMethodCall=function(e){if("Details"===this.parent.view)switch(t.getValue("action",e)){case"deleteFiles":this.deleteFiles(t.getValue("ids",e));break;case"downloadFiles":this.downloadFiles(t.getValue("ids",e));break;case"openFile":this.openFile(t.getValue("id",e));break;case"createFolder":this.interaction=!1;break;case"renameFile":this.interaction=!1,this.renameFile(t.getValue("id",e),t.getValue("newName",e));break;case"selectAll":this.interaction=!1,this.onSelectAllInit();break;case"clearSelection":this.interaction=!1,this.onClearAllInit()}},e.prototype.getRecords=function(e){var i=this.gridObj.getCurrentViewRecords(),n=[],s=!(""===this.parent.breadcrumbbarModule.searchObj.element.value&&!this.parent.isFiltered),a=this.parent.hasId?"id":"name";if(this.parent.hasId||!s)for(var r=0,o=i.length;r<o;r++)-1!==e.indexOf(t.getValue(a,i[r]))&&n.push(i[r]);else for(var r=0,o=i.length;r<o;r++){var l=t.getValue("filterPath",i[r])+t.getValue("name",i[r]);-1!==e.indexOf(l)&&n.push(i[r])}return n},e.prototype.deleteFiles=function(e){if(this.parent.activeModule="detailsview",t.isNullOrUndefined(e))return void this.performDelete();var i=this.getRecords(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=i[a],s[a]=de(this.parent,n[a]);fe(this.parent,n,s)}},e.prototype.downloadFiles=function(e){if(t.isNullOrUndefined(e))return void this.doDownload();var i=this.getRecords(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=i[a],s[a]=de(this.parent,n[a]);ge(this.parent,n,s)}},e.prototype.openFile=function(e){if(!t.isNullOrUndefined(e)){var i=this.getRecords([e]);i.length>0&&this.openContent(i[0])}},e.prototype.renameFile=function(e,i){if(this.parent.activeModule="detailsview",t.isNullOrUndefined(e))return void this.performRename();var n=this.getRecords([e]);n.length>0&&(pe(this.parent,n[0]),t.isNullOrUndefined(i)?ce(this.parent):ye(this.parent.itemData[0])?Pe(this.parent,this.parent.path,i):me(this.parent,this.parent.itemData[0],Hn))},e}();return Xn.Inject(is,ts,Wn,Zn,Gn,Kn,es),e.AjaxSettings=jt,e.defaultToolbarItems=Nt,e.ToolbarSettings=Et,e.ToolbarItem=Rt,e.SearchSettings=Lt,e.columnArray=Ft,e.DetailsViewSettings=Ut,e.fileItems=Ht,e.folderItems=Bt,e.layoutItems=zt,e.ContextMenuSettings=qt,e.NavigationPaneSettings=Gt,e.UploadSettings=Qt,e.Column=Zt,e.TOOLBAR_ID="_toolbar",e.LAYOUT_ID=ei,e.NAVIGATION_ID="_navigation",e.TREE_ID="_tree",e.GRID_ID=ti,e.LARGEICON_ID=ii,e.DIALOG_ID=ni,e.ALT_DIALOG_ID="_alt_dialog",e.IMG_DIALOG_ID=si,e.EXTN_DIALOG_ID=ai,e.UPLOAD_DIALOG_ID="_upload_dialog",e.RETRY_DIALOG_ID="_retry_dialog",e.CONTEXT_MENU_ID="_contextmenu",e.SORTBY_ID="_sortby",e.VIEW_ID="_view",e.SPLITTER_ID="_splitter",e.CONTENT_ID=ri,e.BREADCRUMBBAR_ID=oi,e.UPLOAD_ID=li,e.RETRY_ID="_retry",e.SEARCH_ID="_search",e.ROOT=hi,e.CONTROL=di,e.CHECK_SELECT="e-fe-cb-select",e.ROOT_POPUP=pi,e.MOBILE="e-fe-mobile",e.MOB_POPUP=ci,e.MULTI_SELECT="e-fe-m-select",e.FILTER=ui,e.LAYOUT="e-layout",e.NAVIGATION="e-navigation",e.LAYOUT_CONTENT="e-layout-content",e.LARGE_ICONS=fi,e.TB_ITEM="e-toolbar-item",e.LIST_ITEM=gi,e.LIST_TEXT=mi,e.LIST_PARENT="e-list-parent",e.TB_OPTION_TICK=bi,e.TB_OPTION_DOT=vi,e.BLUR=yi,e.ACTIVE=Ii,e.HOVER=Oi,e.FOCUS=wi,e.FOCUSED=Di,e.CHECK=Ci,e.FRAME="e-frame",e.CB_WRAP=Si,e.ROW=ji,e.ROWCELL="e-rowcell",e.EMPTY=xi,e.EMPTY_CONTENT=Pi,e.EMPTY_INNER_CONTENT=Ni,e.CLONE=Ei,e.DROP_FOLDER=Ri,e.DROP_FILE=Mi,e.FOLDER=ki,e.ICON_IMAGE=Li,e.ICON_MUSIC=Ti,e.ICON_VIDEO=Ai,e.LARGE_ICON=Fi,e.LARGE_EMPTY_FOLDER=Ui,e.LARGE_EMPTY_FOLDER_TWO="e-empty-icon.e-fe-folder",e.LARGE_ICON_FOLDER="e-fe-folder",e.SELECTED_ITEMS="e-items",e.TEXT_CONTENT="e-text-content",e.GRID_HEADER=Vi,e.TEMPLATE_CELL="e-templatecell",e.TREE_VIEW=_i,e.MENU_ITEM="e-menu-item",e.MENU_ICON=Hi,e.SUBMENU_ICON="e-caret",e.GRID_VIEW=Bi,e.GRID_CONTENT=zi,e.ICON_VIEW="e-list-parent",e.ICON_OPEN="e-icons e-fe-open",e.ICON_UPLOAD="e-icons e-fe-upload",e.ICON_CUT=qi,e.ICON_COPY="e-icons e-fe-copy",e.ICON_PASTE="e-icons e-fe-paste",e.ICON_DELETE="e-icons e-fe-delete",e.ICON_RENAME="e-icons e-fe-rename",e.ICON_NEWFOLDER="e-icons e-fe-newfolder",e.ICON_DETAILS="e-icons e-fe-details",e.ICON_SHORTBY="e-icons e-fe-sort",e.ICON_REFRESH="e-icons e-fe-refresh",e.ICON_SELECTALL="e-icons e-fe-select",e.ICON_DOWNLOAD="e-icons e-fe-download",e.ICON_OPTIONS="e-icons e-fe-options",e.ICON_GRID=Wi,e.ICON_LARGE=Ki,e.ICON_BREADCRUMB="e-icons e-fe-breadcrumb",e.ICON_CLEAR="e-icons e-fe-clear",e.ICON_DROP_IN="e-icons e-fe-drop-in",e.ICON_DROP_OUT="e-icons e-fe-drop-out",e.ICON_NO_DROP="e-icons e-fe-no-drop",e.ICONS="e-icons",e.DETAILS_LABEL="e-detailslabel",e.ERROR_CONTENT=Gi,e.STATUS="e-status",e.BREADCRUMBS="e-address",e.RTL=Yi,e.DISPLAY_NONE=Ji,e.COLLAPSED="e-node-collapsed",e.FULLROW="e-fullrow",e.ICON_COLLAPSIBLE="e-icon-collapsible",e.SPLIT_BAR="e-split-bar",e.HEADER_CHECK="e-headercheck",e.OVERLAY="e-fe-overlay",e.VALUE=Qi,e.isFile=Xi,e.modelChanged=$i,e.initialEnd=Zi,e.finalizeEnd=en,e.createEnd=tn,e.filterEnd="filter-end",e.beforeDelete="before-delete",e.pathDrag=nn,e.deleteInit=sn,e.deleteEnd=an,e.refreshEnd=rn,e.resizeEnd=on,e.splitterResize="splitter-resize",e.pathChanged=ln,e.destroy=hn,e.beforeRequest=dn,e.upload="upload",e.skipUpload=pn,e.afterRequest=cn,e.download="download",e.layoutRefresh="layout-refresh",e.actionFailure=un,e.search=fn,e.openInit=gn,e.openEnd=mn,e.selectionChanged=bn,e.selectAllInit="select-all-init",e.clearAllInit="clear-all-init",e.clearPathInit=vn,e.layoutChange=yn,e.sortByChange=In,e.nodeExpand="node-expand",e.detailsInit=On,e.menuItemData=wn,e.renameInit=Dn,e.renameEndParent=Cn,e.renameEnd=Sn,e.showPaste=jn,e.hidePaste=xn,e.selectedData="selected-data",e.cutCopyInit=Pn,e.pasteInit=Nn,e.pasteEnd=En,e.cutEnd=Rn,e.hideLayout="hide-layout",e.updateTreeSelection="update-tree-selection",e.treeSelect="select-node",e.sortColumn=Mn,e.pathColumn=kn,e.searchTextChange=Ln,e.beforeDownload="before-download",e.downloadInit="download-init",e.dropInit=Tn,e.dragEnd=An,e.dropPath=Fn,e.dragHelper="drag-helper",e.dragging=Un,e.updateSelectionData="update-selection-data",e.methodCall=Vn,e.permissionRead=_n,e.permissionEdit=Hn,e.permissionEditContents=Bn,e.permissionCopy="copy",e.permissionUpload=zn,e.permissionDownload=qn,e.FileManager=Xn,e.Toolbar=Zn,e.BreadCrumbBar=Kn,e.Virtualization=es,e.NavigationPane=ts,e.DetailsView=is,e.LargeIconsView=Wn,e.createDialog=Ke,e.createExtDialog=Ge,e.createImageDialog=Ot,e.ContextMenu=Gn,e.read=Se,e.createFolder=je,e.filter=xe,e.rename=Pe,e.paste=Ne,e.Delete=Ee,e.GetDetails=Re,e.Search=ze,e.Download=We,e.sortComparer=p,e.updatePath=c,e.getPath=u,e.getPathId=f,e.getPathNames=g,e.getParents=m,e.generatePath=b,e.removeActive=v,e.activeElement=y,e.addBlur=I,e.removeBlur=O,e.getModule=w,e.searchWordHandler=D,e.updateLayout=C,e.getTargetModule=S,e.refresh=j,e.openAction=x,e.getPathObject=P,e.copyFiles=N,e.cutFiles=E,e.fileType=R,e.getImageUrl=M,e.getFullPath=k,e.getName=L,e.getSortedData=T,e.getObject=A,e.createEmptyElement=F,e.getDirectories=U,e.setNodeId=V,e.setDateObject=_,e.getLocaleText=H,e.getCssClass=B,e.sortbyClickHandler=z,e.getSortField=q,e.setNextPath=W,e.openSearchFolder=K,e.pasteHandler=G,e.validateSubFolder=Y,e.dropHandler=J,e.getParentPath=Q,e.getDirectoryPath=X,e.doPasteUpdate=$,e.readDropPath=Z,e.getDuplicateData=ee,e.createVirtualDragElement=te,e.dragStopHandler=ie,e.dragStartHandler=ne,e.dragCancel=se,e.removeDropTarget=ae,e.removeItemClass=re,e.scrollHandler=oe,e.draggingHandler=le,e.objectToString=he,e.getItemName=de,e.updateRenamingData=pe,e.doRename=ce,e.doDownload=ue,e.doDeleteFiles=fe,e.doDownloadFiles=ge,e.createDeniedDialog=me,e.getAccessClass=be,e.hasReadAccess=ve,e.hasEditAccess=ye,e.hasContentAccess=Ie,e.hasUploadAccess=Oe,e.hasDownloadAccess=we,e.createNewFolder=De,e.uploadItem=Ce,e}({},ej.base,ej.layouts,ej.popups,ej.data,ej.inputs,ej.buttons,ej.lists,ej.splitbuttons,ej.navigations,ej.grids),this.ejs=ej;
10
+ this.ej=this.ej||{},this.ej.filemanager=function(e,t,i,n,s,a,r,o,l,h,d){"use strict";function p(e,t){var i=/\.\S+/.test(e),n=/\.\S+/.test(t);if(i&&!n)return 1;if(!i&&n)return-1;var s=[],a=[];for((e+"").replace(/(\d+)|(\D+)/g,function(e,t,i){return s.push([t||1/0,i||""]),""}),(t+"").replace(/(\d+)|(\D+)/g,function(e,t,i){return a.push([t||1/0,i||""]),""});s.length&&a.length;){var r=s.shift(),o=a.shift(),l=r[0]-o[0]||r[1].localeCompare(o[1]);if(l)return l}return s.length-a.length}function c(e,i,n){var s=t.getValue("name",i),a=e.getAttribute("data-id"),r=t.isNullOrUndefined(a)?s:a;n.setProperties({path:u(e,r,n.hasId)},!0),n.pathId=f(e),n.pathNames=g(e,s)}function u(e,t,i){for(var n=m(e,t,!1,i),s=i?"":"/",a=n.length-(i?1:2);a>=0;a--)s+=n[a]+"/";return s}function f(e){for(var t=m(e,e.getAttribute("data-uid"),!0),i=[],n=t.length-1;n>=0;n--)i.push(t[n]);return i}function g(e,t){for(var i=m(e,t,!1),n=[],s=i.length-1;s>=0;s--)n.push(i[s]);return n}function m(e,i,n,s){for(var a=[i],r=e.parentNode;!t.isNullOrUndefined(r);){if(t.matches(r,"."+gi)){var o=n?r.getAttribute("data-uid"):s?r.getAttribute("data-id"):t.select("."+mi,r).textContent;a.push(o)}if((r=r.parentNode).classList.contains(_i))break}return a}function b(e){var i=e.hasId?"id":"name",n=e.hasId?"":"/",s=e.hasId?0:1;for(s;s<e.pathId.length;s++){var a=t.getValue(e.pathId[s],e.feParent);n+=t.getValue(i,a)+"/"}e.setProperties({path:n},!0)}function v(e){e.isCut&&(O(e),e.selectedNodes=[],e.actionRecords=[],e.enablePaste=!1,e.notify(xn,{}))}function y(e,i){if(i.isSearchCut=!1,i.actionRecords=[],i.activeElements=[],i.notify(Pn,{}),0===i.activeElements.length)return!1;O(i);var n=i.activeElements;"navigationpane"!==i.activeModule?i.targetPath=i.path:i.targetPath=Q(i.path);var s=0;if(n&&(w(i,n[0]),"cut"===e))for(;s<n.length;)I(n[s]),s++;for(s=0,i.selectedNodes=[],i.enablePaste=!0,i.notify(jn,{});s<i.activeRecords.length;)i.actionRecords.push(i.activeRecords[s]),i.selectedNodes.push(t.getValue("name",i.activeRecords[s])),s++;if((""!==i.breadcrumbbarModule.searchObj.element.value||i.isFiltered)&&"navigationpane"!==i.activeModule){i.selectedNodes=[],i.isSearchCut=!0;for(var a=0;a<i.selectedItems.length;)i.selectedNodes.push(i.selectedItems[a]),a++}return!0}function I(e){e.classList.add(yi)}function O(e,t){for(var i=t?e.element.querySelectorAll("."+Oi):e.element.querySelectorAll("."+yi),n=0;n<i.length;)i[n].classList.remove(t?Oi:yi),n++}function w(e,i){i&&(i.classList.contains(ji)?e.activeModule="detailsview":t.closest(i,"."+Fi)?e.activeModule="largeiconsview":e.activeModule="navigationpane")}function D(e,t,i){var n;if(0!==t.length||e.isFiltered||e.notify(kn,{args:e}),n="startsWith"===e.searchSettings.filterType?t+"*":"endsWith"===e.searchSettings.filterType?"*"+t:"*"+t+"*",e.searchWord=n,e.itemData=[P(e)],t.length>0){var s=e.searchSettings.ignoreCase,a=e.showHiddenItems;ze(e,i?yn:fn,e.path,n,a,!s)}else e.isFiltered?xe(e,yn):e.isSortByClicked?(e.notify(yn,{files:"Details"===e.oldView?e.detailsviewModule.gridObj.dataSource:e.largeiconsviewModule.allItems}),e.isSortByClicked=!1):Se(e,i?yn:fn,e.path)}function C(e,t){e.oldView=e.view,e.setProperties({view:t},!0),(""!==e.breadcrumbbarModule.searchObj.element.value||e.isFiltered)&&(e.layoutSelectedItems=e.selectedItems);var i="";e.breadcrumbbarModule.searchObj.element.value&&(i=e.breadcrumbbarModule.searchObj.element.value),e.isLayoutChange=!0,D(e,i,!0)}function S(e,i){var n="";i&&(n=t.closest(i,"."+hi+"."+di+" ."+zi)?"detailsview":t.closest(i,"."+fi)?"largeiconsview":i.classList.contains("e-fullrow")||i.classList.contains("e-icon-expandable")?"navigationpane":t.closest(i,".e-address-list-item")?"breadcrumbbar":""),e.targetModule=n}function j(e){e.itemData=[P(e)],ve(e.itemData[0])?Se(e,rn,e.path):me(e,e.itemData[0],_n)}function x(e){Se(e,mn,e.path)}function P(e){return t.getValue(e.pathId[e.pathId.length-1],e.feParent)}function N(e){y("copy",e)&&(e.fileAction="copy")}function E(e){y("cut",e)&&(e.isCut=!0,e.fileAction="move")}function R(e){if(!t.getValue("isFile",e))return ki;var i=["bmp","dib","jpg","jpeg","jpe","jfif","gif","tif","tiff","png","ico"],n=["mp3","wav","aac","ogg","wma","aif","fla","m4a"],s=["webm","mkv","flv","vob","ogv","ogg","avi","wmv","mp4","3gp"],a=["css","exe","html","js","msi","pdf","pptx","ppt","rar","zip","txt","docx","doc","xlsx","xls","xml","rtf","php"],r=t.getValue("type",e);-1!==(r=r.toLowerCase()).indexOf(".")&&(r=r.split(".").join(""));return-1!==i.indexOf(r)?Ti:-1!==n.indexOf(r)?Li:-1!==s.indexOf(r)?Ai:-1!==a.indexOf(r)?"e-fe-"+r:"e-fe-unknown e-fe-"+r}function M(e,i){var n,s=e.ajaxSettings.getImageUrl?e.ajaxSettings.getImageUrl:e.ajaxSettings.url,a=-1!==s.indexOf("?")?"&path=":"?path=",r=encodeURIComponent(t.getValue("name",i)),o=t.getValue("filterPath",i);if(e.hasId){var l=t.getValue("id",i);n=s+a+e.path+"&id="+l}else n=t.isNullOrUndefined(o)?s+a+e.path+r:s+a+encodeURIComponent(o.replace(/\\/g,"/"))+r;var h={fileDetails:[i],imageUrl:n=n+"&time="+(new Date).getTime().toString()};return e.trigger("beforeImageLoad",h),h.imageUrl}function k(e,i,n){var s=t.getValue(e.hasId?"id":"name",i)+"/",a=t.getValue(e.hasId?"filterId":"filterPath",i);return t.isNullOrUndefined(a)?n+s:a.replace(/\\/g,"/")+s}function T(e,i){var n=t.getValue("name",i),s=t.getValue("filterPath",i);return""===e.breadcrumbbarModule.searchObj.element.value&&!e.isFiltered||t.isNullOrUndefined(s)||(n=(s=s.replace(/\\/g,"/")).replace(e.path,"")+n),n}function L(e,i){if(0===i.length)return i;var n;n="None"!==e.sortOrder?(new s.Query).sortBy(e.sortBy,e.sortOrder.toLowerCase(),!0).group("isFile"):(new s.Query).group("isFile");var a=new s.DataManager(i).executeLocal(n);return t.getValue("records",a)}function A(e,i,n){var a=t.getValue(e.pathId[e.pathId.length-1],e.feFiles),r=(new s.Query).where(i,"equal",n);return new s.DataManager(a).executeLocal(r)[0]}function F(e,i,n){var s,a=t.select("#"+e.element.id+ei,e.element),r=t.select("#"+e.element.id+oi,a).offsetHeight;if(s=a.offsetHeight-r,"Details"===e.view&&(s-=t.select("."+Vi,a).offsetHeight),t.isNullOrUndefined(i.querySelector("."+xi))){var o=t.createElement("div",{className:xi}),l=t.createElement("div",{className:Ui}),h=t.createElement("div",{className:Pi}),d=t.createElement("div",{className:Ni});"Details"===e.view?i.querySelector("."+Bi).appendChild(o):i.appendChild(o),o.appendChild(l),o.appendChild(h),o.appendChild(d)}i.querySelector("."+xi)&&(t.isNullOrUndefined(n.error)?e.isFiltered?(i.querySelector("."+Pi).innerHTML=H(e,"Filter-Empty"),i.querySelector("."+Ni).innerHTML=H(e,"Filter-Key")):""!==e.breadcrumbbarModule.searchObj.element.value?(i.querySelector("."+Pi).innerHTML=H(e,"Search-Empty"),i.querySelector("."+Ni).innerHTML=H(e,"Search-Key")):(i.querySelector("."+Pi).innerHTML=H(e,"Folder-Empty"),i.querySelector("."+Ni).innerHTML=H(e,"File-Upload")):(i.querySelector("."+Pi).innerHTML=H(e,"Access-Denied"),i.querySelector("."+Ni).innerHTML=H(e,"Access-Details")));var p=t.select("."+xi,i);s=(s-p.offsetHeight)/2,p.style.marginTop=s+"px"}function U(e){return new s.DataManager(e).executeLocal((new s.Query).where(Xi,"equal",!1,!1))}function V(e,i){for(var n=U(e.files),s=0,a=n.length;s<a;s++)t.setValue("_fm_id",i+"_"+s,n[s])}function _(e,i,n){for(var s=0;s<e.length;s++){var a=new Date(t.getValue("dateCreated",e[s])),r=new Date(t.getValue("dateModified",e[s]));t.isNullOrUndefined(n)&&(n="MM/dd/yyyy"),t.setValue("_fm_created",i.formatDate(a,{format:n}),e[s]),t.setValue("_fm_modified",i.formatDate(r,{format:n}),e[s])}}function H(e,t){var i=e.localeObj.getConstant(t);return""===i?t:i}function B(e,i){var n=e.cssClass;return n=t.isNullOrUndefined(n)||""===n?i:n+" "+i}function z(e,t){e.isSortByClicked=!0,-1!==t.item.id.indexOf("ascending")||-1!==t.item.id.indexOf("descending")||-1!==t.item.id.indexOf("none")?e.sortOrder=q(t.item.id):e.sortBy=q(t.item.id,e),e.itemData=[P(e)],"Details"===e.view&&(e.isMobile?C(e,"Details"):(e.notify(Mn,{module:"detailsview"}),e.isSortByClicked=!1)),"LargeIcons"===e.view&&C(e,"LargeIcons"),e.notify(In,{})}function q(e,t){var i,n=e.substring(e.lastIndexOf("_")+1),s=n;switch(t&&(i=t.detailsViewSettings.columns),n){case"date":for(var a=0,r=i.length;a<r;a++){if("dateModified"===i[a].field||"dateCreated"===i[a].field){s=i[a].field;break}s="_fm_modified"}break;case"ascending":s="Ascending";break;case"descending":s="Descending";break;case"none":s="None"}return s}function W(e,i){for(var n=i.split("/"),s=e.originalPath.split("/"),a=t.getValue(e.pathId[0],e.feParent),r=t.isNullOrUndefined(t.getValue("id",a))?"name":"id",o=n.length-1,l=s.length-1;o<l;o++){var h=""===s[o+1]?en:Zi,d=""===s[o]?"/":e.path+s[o]+"/",p=A(e,r,s[o]),c=t.getValue("_fm_id",p);e.setProperties({path:d},!0),e.pathId.push(c),e.itemData=[p],e.pathNames.push(t.getValue("name",p)),Se(e,h,e.path);break}}function K(e,i){e.originalPath=k(e,i,e.path);var n=t.getValue(e.pathId[0],e.feParent),s="fe_tree"==t.getValue("_fm_id",e.itemData[0]),a=A(e,t.isNullOrUndefined(t.getValue("id",n))?"name":"id",t.getValue("name",i));if(t.isNullOrUndefined(a)){if(s)return void W(e,e.path);e.notify(vn,{selectedNode:e.pathId[e.pathId.length-1]})}else{var r=t.getValue("_fm_id",a);e.setProperties({path:e.originalPath},!0),e.pathId.push(r),e.itemData=[a],e.pathNames.push(t.getValue("name",a))}Se(e,e.path!==e.originalPath?Zi:en,e.path)}function G(e){if(e.isDragDrop=!1,0!==e.selectedNodes.length&&e.enablePaste){var t=""===e.folderPath?e.path:e.folderPath;Y(e,e.actionRecords,t,e.path)||("move"===e.fileAction&&e.targetPath!==t||"copy"===e.fileAction?(e.notify(Nn,{}),Ne(e,e.targetPath,e.selectedNodes,t,e.fileAction,[],e.actionRecords)):(e.enablePaste=!1,e.notify(xn,{}),O(e),Ke(e,"Error",{files:null,error:{code:"402",message:H(e,"Same-Folder-Error"),fileExists:null}})))}}function Y(e,i,n,s){for(var a=!1,r=0;r<i.length;r++)if(t.getValue("isFile",i[r])){var o=e.dragNodes[r],l=0;o&&(l=o.lastIndexOf("/"));var h="";if(l>0&&(h=s+o.substring(0,l+1)),h===n){var d={files:null,error:{code:"402",message:H(e,"Same-Folder-Error"),fileExists:null}};Ke(e,"Error",d),a=!0;break}}else{var p=k(e,i[r],s);if(0===n.indexOf(p)){Ke(e,"Error",d={files:null,error:{code:"402",message:H(e,"Sub-Folder-Error"),fileExists:null}}),a=!0;break}}return a}function J(e){e.isDragDrop=!0,0!==e.dragData.length&&(e.dragPath=e.dragPath.replace(/\\/g,"/"),e.dropPath=e.dropPath.replace(/\\/g,"/"),Y(e,e.dragData,e.dropPath,e.dragPath)||e.dragPath===e.dropPath||(e.itemData=[e.dropData],Ne(e,e.dragPath,e.dragNodes,e.dropPath,"move",[],e.dragData),e.notify(Nn,{})))}function Q(e){for(var t=e.split("/"),i=t[0]+"/",n=1;n<t.length-2;n++)i+=t[n]+"/";return i}function X(e,i){var n=t.getValue(e.hasId?"id":"name",i.cwd)+"/",s=t.getValue(e.hasId?"filterId":"filterPath",i.cwd);return t.isNullOrUndefined(s)?e.path+n:""===s?e.hasId?n:"/":s.replace(/\\/g,"/")+n}function $(e,t,i){"move"===t&&(e.isDragDrop?e.notify(An,i):(e.enablePaste=!1,e.notify(xn,{}),e.notify(Rn,i))),0===e.duplicateItems.length&&(e.pasteNodes=[]);for(var n=0;n<i.files.length;n++)e.pasteNodes.push(i.files[n][e.hasId?"id":"name"]),e.isDragDrop&&e.droppedObjects.push(i.files[n]);e.duplicateItems=[],e.duplicateRecords=[],e.isDragDrop&&!e.isPasteError?e.isDropEnd=!0:e.isDropEnd=!1,!e.isDragDrop||e.path===e.dragPath||e.path===e.dropPath||e.isSearchDrag?(e.isPathDrag=!1,Se(e,En,e.path)):Z(e),e.trigger("success",{action:t,result:i})}function Z(e){var i=t.getValue("_fm_id",e.dropData);if(e.expandedId=i,e.itemData=[e.dropData],e.isPathDrag)e.notify(nn,e.itemData);else{if(e.navigationpaneModule){var n=t.select('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element);n||(i=document.querySelector('[data-id = "'+t.getValue("id",e.dropData)+'"]').getAttribute("data-uid"),n=t.select('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element)),c(n,e.dropData,e)}Se(e,Fn,e.dropPath)}}function ee(e,i){for(var n=null,s=e.isDragDrop?e.dragData:e.actionRecords,a=0;a<s.length;a++)if(t.getValue("name",s[a])===i){n=s[a];break}return n}function te(e){if(e.isSearchDrag=!1,""!==e.breadcrumbbarModule.searchObj.element.value&&(e.isSearchDrag=!0),"navigationpane"!==e.activeModule){e.dragNodes=[];for(var t=0;t<e.selectedItems.length;)e.dragNodes.push(e.selectedItems[t]),t++;0===e.selectedItems.length&&e.dragData&&1===e.dragData.length&&e.dragNodes.push(de(e,e.dragData[0]))}var i=e.createElement("div",{className:"e-fe-icon "+R(e.dragData[0])}),n=e.createElement("div",{className:"e-fe-name",innerHTML:e.dragData[0].name}),s=e.createElement("div",{className:"e-fe-content"});s.appendChild(i),s.appendChild(n);var a=e.createElement("div",{className:Ei});if(a.appendChild(s),e.dragNodes.length>1){var r=e.createElement("span",{className:"e-fe-count",innerHTML:e.dragNodes.length.toString(10)});a.appendChild(r)}e.virtualDragElement=a,e.element.appendChild(e.virtualDragElement)}function ie(e,i){var n=i;n.cancel=!1,null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),ae(e),e.element.classList.remove("e-fe-drop","e-no-drop"),O(e),e.uploadObj.dropArea=t.select("#"+e.element.id+ri,e.element);var s=t.select("."+Ei,e.element);s&&t.detach(s),S(e,i.target),e.notify(Ln,i),O(e,"hover"),n.fileDetails=e.dragData,e.trigger("fileDragStop",n,function(i){!i.cancel&&!t.isNullOrUndefined(e.targetModule)&&""!==e.targetModule&&e.dragCount>2&&J(e),e.dragCount=0})}function ne(e,i,n){var s=i;if(s.cancel=!1,s.fileDetails=e.dragData,e.dragCount=0,e.droppedObjects=[],(!e.allowDragAndDrop||"navigationpane"===e.activeModule&&t.closest(i.element,"li").getAttribute("data-uid")===e.pathId[0])&&(s.cancel=!0),"navigationpane"===e.activeModule&&-1!==e.pathId.indexOf(t.closest(i.element,"li").getAttribute("data-uid"))?e.isPathDrag=!0:e.isPathDrag=!1,O(e),s.cancel)n.intDestroy(i.event),se(e);else if(!s.cancel){for(var a=0;a<e.activeElements.length;)I(e.activeElements[a]),a++;e.trigger("fileDragStart",s,function(t){t.cancel?(n.intDestroy(i.event),se(e)):e.uploadObj.dropArea=null})}}function se(e){O(e);var i=t.select("."+Ei,e.element);i&&t.detach(i)}function ae(e){re(e,Ri),re(e,Mi)}function re(e,t){for(var i=e.element.querySelectorAll("."+t),n=0;n<i.length;n++)i[n].classList.remove(t)}function oe(e,i,n,s,a){var r,o=e.getBoundingClientRect(),l=t.select("."+n,e);s>=o.top+e.clientHeight-30&&!t.isNullOrUndefined(l)&&(r="navigationpane"===i.targetModule||"detailsview"===i.targetModule?l.offsetHeight/2.5:l.offsetHeight/4.5,e.scrollBy(0,r)),!t.isNullOrUndefined(l)&&a<=o.top+30&&(r="navigationpane"===i.targetModule||"detailsview"===i.targetModule?l.offsetHeight/2.5:l.offsetHeight/4.5,e.scrollBy(0,-r))}function le(e,i){var n=i;n.fileDetails=e.dragData;var s=!1;S(e,i.target),ae(e),null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),O(e,"hover");var a=null;"navigationpane"===e.targetModule?((a=t.closest(i.target,"li")).classList.add(Oi,Ri),s=!0,e.treeExpandTimer=window.setTimeout(function(){e.notify(Un,i)},800),oe(e.navigationpaneModule.treeObj.element.parentElement,e,"e-level-2",i.event.screenY,i.event.y)):"detailsview"===e.targetModule?((a=t.closest(i.target,"tr"))&&a.querySelector("."+ki)&&!a.classList.contains(yi)?a.classList.add(Ri):!a||a.querySelector("."+ki)||a.classList.contains(yi)||a.classList.add(Mi),s=!0,oe(e.detailsviewModule.gridObj.element.querySelector(".e-content"),e,"e-row",i.event.screenY,i.event.y)):"largeiconsview"===e.targetModule?((a=t.closest(i.target,"li"))&&a.querySelector("."+ki)&&!a.classList.contains(yi)&&a.classList.add(Oi,Ri),s=!0,oe(e.largeiconsviewModule.element.firstElementChild,e,"e-large-icon",i.event.screenY,i.event.y)):"breadcrumbbar"===e.targetModule&&(s=!0),e.element.classList.remove("e-fe-drop","e-no-drop"),e.element.classList.add(s?"e-fe-drop":"e-no-drop"),e.dragCount=e.dragCount+1,e.trigger("fileDragging",n)}function he(e){for(var i="",n=Object.keys(e),s=0;s<n.length;s++)"message"!==n[s]&&(i+=(0===s?"":", ")+n[s]+": "+t.getValue(n[s],e));return i}function de(e,i){return e.hasId?t.getValue("id",i):T(e,i)}function pe(e,i){e.itemData=[i],e.currentItemText=t.getValue("name",i),e.isFile=t.getValue("isFile",i),e.filterPath=t.getValue("filterPath",i)}function ce(e){ye(e.itemData[0])?Ke(e,"Rename"):me(e,e.itemData[0],Hn)}function ue(e){for(var t=e.itemData,i=0;i<t.length;i++)if(!we(t[i]))return void me(e,t[i],qn);e.selectedItems.length>0&&We(e,e.path,e.selectedItems)}function fe(e,t,i){for(var n=0;n<t.length;n++)if(!ye(t[n]))return void me(e,t[n],Hn);e.itemData=t,Ee(e,i,e.path,"delete")}function ge(e,t,i){for(var n=0;n<t.length;n++)if(!we(t[n]))return void me(e,t[n],qn);e.itemData=t,i.length>0&&We(e,e.path,i)}function me(e,i,n){var s=t.getValue("message",t.getValue("permission",i));""===s&&(s=H(e,"Access-Message").replace("{0}",t.getValue("name",i)).replace("{1}",n)),Ke(e,"Error",{error:{code:"401",fileExists:null,message:s}})}function be(e){return ve(e)?"e-fe-locked":"e-fe-locked e-fe-hidden"}function ve(e){var i=t.getValue("permission",e);return!(i&&!t.getValue("read",i))}function ye(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("write",i)}function Ie(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("writeContents",i)}function Oe(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("upload",i)}function we(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("download",i)}function De(e){var t=e.itemData[0];Ie(t)?Ke(e,"NewFolder"):me(e,t,Bn)}function Ce(e){var t=e.itemData[0];if(Oe(t)){var i="#"+e.element.id+li;document.querySelector(i).click()}else me(e,t,zn)}function Se(e,i,n){for(var s=e.itemData,a=0;a<s.length;a++)t.isNullOrUndefined(t.getValue("hasChild",s[a]))&&t.setValue("hasChild",!1,s[a]);ke(e,{action:"read",path:n,showHiddenItems:e.showHiddenItems,data:s},Le,i)}function je(e,t){ke(e,{action:"create",path:e.path,name:t,data:e.itemData},Fe,t)}function xe(e,i){var n={action:"filter",path:e.path,showHiddenItems:e.showHiddenItems,data:[P(e)]},s=e.filterData?t.extend(void 0,n,e.filterData):n;ke(e,s,Ae,i,t.getValue("action",s))}function Pe(e,t,i){var n,s;if(""!==e.breadcrumbbarModule.searchObj.element.value||e.isFiltered){var a=e.filterPath;e.hasId?(n=e.currentItemText,s=i):(n=(a=a.replace(/\\/g,"/")).replace(t,"")+e.currentItemText,s=a.replace(t,"")+i)}else n=e.currentItemText,s=i;ke(e,{action:"rename",path:t,name:n,newName:s,data:e.itemData,showFileExtension:e.showFileExtension},Ue,t)}function Ne(e,t,i,n,s,a,r){var o={action:s,path:t,targetData:e.itemData[0],targetPath:n,names:i,renameFiles:a,data:r};e.destinationPath=n,ke(e,o,Ve,t,s,n)}function Ee(e,t,i,n){ke(e,{action:n,path:i,names:t,data:e.itemData},_e,i)}function Re(e,t,i,n){ke(e,{action:n,path:i,names:t,data:e.itemData},He,i,n)}function Me(e){for(var i,n=e.detailsViewSettings.columns,s=0;s<n.length;s++)if("_fm_modified"===n[s].field){t.isNullOrUndefined(n[s].format)||(i=n[s].format.toString());break}return i}function ke(e,i,n,s,a,r){var o={url:e.ajaxSettings.url,type:"POST",mode:!0,dataType:"json",contentType:"application/json",data:JSON.stringify(i),onSuccess:null,onFailure:null,beforeSend:null},l={action:t.getValue("action",i),ajaxSettings:o,cancel:!1};e.trigger("beforeSend",l,function(o){o.cancel||(e.notify(dn,{}),new t.Ajax({url:t.getValue("url",o.ajaxSettings),type:t.getValue("type",o.ajaxSettings),mode:t.getValue("mode",o.ajaxSettings),dataType:t.getValue("dataType",o.ajaxSettings),contentType:t.getValue("contentType",o.ajaxSettings),data:t.getValue("data",o.ajaxSettings),beforeSend:t.getValue("beforeSend",o.ajaxSettings),onSuccess:function(l){if(t.isNullOrUndefined(l)){var h={error:{fileExists:null,message:H(e,"Server-Error")+" "+e.ajaxSettings.url,code:"406"},files:null};return void Te(e,o,n,h,s,a,r)}"string"==typeof l&&(l=JSON.parse(l)),e.notify(cn,{action:"success"});var d=e.expandedId?e.expandedId:e.pathId[e.pathId.length-1];if(!t.isNullOrUndefined(l.cwd)&&"read"===t.getValue("action",i)&&(l.cwd.name=1===e.pathId.length?e.rootAliasName||l.cwd.name:l.cwd.name,t.setValue("_fm_id",d,l.cwd),t.setValue(d,l.cwd,e.feParent),!t.isNullOrUndefined(l.files)||"401"===l.error.code)){if(("finalize-end"===s||"initial-end"===s)&&0===e.pathNames.length){var p=t.getValue(e.pathId[0],e.feParent);e.pathNames[0]=t.getValue("name",p),e.hasId=!t.isNullOrUndefined(t.getValue("id",p))}"finalize-end"===s&&b(e)}var c=new t.Internationalization(e.locale);if(!t.isNullOrUndefined(l.files)){_(l.files,c,Me(e));for(var u=0,f=l.files.length;u<f;u++){var g=l.files[u];t.setValue("_fm_iconClass",R(g),g)}"read"===t.getValue("action",i)&&(V(l,d),t.setValue(d,l.files,e.feFiles))}if(!t.isNullOrUndefined(l.details)&&!t.isNullOrUndefined(e.rootAliasName)){var m=e.rootAliasName||t.getValue("name",l.details),v=t.getValue("location",l.details).replace(new RegExp("/","g"),"\\");("/"===t.getValue("path",i)||e.hasId&&1===t.getValue("path",i).match(/[\/]/g).length)&&0===t.getValue("names",i).length?(t.setValue("name",m,l.details),v=m):v=v.replace(v.substring(0,v.indexOf("\\")),m),t.setValue("location",v,l.details)}n(e,l,s,a,r),t.isNullOrUndefined(l.files)||"path-changed"!==s&&"finalize-end"!==s&&"open-end"!==s&&"drop-path"!==s||e.notify(Tn,l),"function"==typeof t.getValue("onSuccess",o.ajaxSettings)&&t.getValue("onSuccess",o.ajaxSettings)()},onFailure:function(){var t={files:null,error:{code:"404",message:H(e,"Network-Error")+" "+e.ajaxSettings.url,fileExists:null}};Te(e,o,n,t,s,a,r)}}).send())})}function Te(e,i,n,s,a,r,o){e.notify(cn,{action:"failure"}),n(e,s,a,r,o),"function"==typeof t.getValue("onFailure",i.ajaxSettings)&&t.getValue("onFailure",i.ajaxSettings)()}function Le(e,i,n){if(t.isNullOrUndefined(i.files))"401"===i.error.code&&(i.files=[],e.notify(n,i),e.notify(bn,{})),Be(e,i,"read"),e.setProperties({path:e.oldPath},!0),e.pathNames.pop();else{e.notify(n,i),e.notify(bn,{});s={action:"read",result:i};e.trigger("success",s)}if(e.isDragDrop&&e.isDropEnd){if(0!==e.droppedObjects.length){var s={fileDetails:e.droppedObjects};e.trigger("fileDropped",s)}e.isDropEnd=e.isDragDrop=!1}}function Ae(e,i,n,s){if(t.isNullOrUndefined(i.files))Be(e,i,s);else{e.notify(n,i);var a={action:s,result:i};e.trigger("success",a)}}function Fe(e,i,n){if(t.isNullOrUndefined(i.files))if("400"===i.error.code){if(e.dialogObj&&e.dialogObj.visible){var s=t.select("#newname",e.dialogObj.element),a=H(e,"Validation-NewFolder-Exists").replace("{0}",'"'+s.value+'"');s.parentElement.nextElementSibling.innerHTML=a}else Ke(e,"Error",{files:null,error:{code:"400",message:H(e,"Validation-NewFolder-Exists").replace("{0}",'"'+n+'"'),fileExists:null}});r={action:"create",error:i.error};e.trigger("failure",r)}else e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),Be(e,i,"create");else{e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),e.createdItem=i.files[0],e.breadcrumbbarModule.searchObj.value="";var r={action:"create",result:i};e.trigger("success",r),e.itemData=[P(e)],Se(e,tn,e.path)}}function Ue(e,i,n){if(t.isNullOrUndefined(i.files))if("400"===i.error.code&&e.dialogObj&&e.dialogObj.visible){var s=t.select("#rename",e.dialogObj.element),a=H(e,"Validation-Rename-Exists").replace("{0}",'"'+e.currentItemText+'"');a=a.replace("{1}",'"'+s.value+'"'),s.parentElement.nextElementSibling.innerHTML=a;r={action:"rename",error:i.error};e.trigger("failure",r)}else t.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide(),Be(e,i,"rename");else{t.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide();var r={action:"rename",result:i};e.trigger("success",r),e.renamedItem=Array.isArray(i.files)?i.files[0]:i.files,"navigationpane"===e.activeModule?(e.pathId.pop(),e.itemData=[t.getValue(e.pathId[e.pathId.length-1],e.feParent)],Se(e,Cn,t.getValue("filterPath",e.renamedItem).replace(/\\/g,"/")),e.itemData[0]=e.renamedItem,Se(e,ln,"/"===e.path?e.path:t.getValue("filterPath",e.renamedItem).replace(/\\/g,"/")+e.renamedItem.name+"/"),t.getValue("filterPath",e.renamedItem)===t.getValue("filterPath",e.itemData[0])&&e.pathNames.length>1&&(e.pathNames[e.pathNames.length-1]=e.renameText)):(e.itemData=[P(e)],""!==e.breadcrumbbarModule.searchObj.value?ze(e,Sn,e.path,e.searchWord,e.showHiddenItems,!e.searchSettings.ignoreCase):e.isFiltered?xe(e,Sn):Se(e,Sn,e.path))}}function Ve(e,i,n,s){i.error&&i.error.fileExists?(e.fileLength=0,t.isNullOrUndefined(i.files)||(e.isPasteError=!0,$(e,s,i)),Ge(e,"DuplicateItems",i.error.fileExists),"404"===i.error.code&&Ke(e,"Error",i)):i.error||t.isNullOrUndefined(i.files)?i.error&&!t.isNullOrUndefined(i.files)?(e.isPasteError=!0,$(e,s,i),Ke(e,"Error",i)):Be(e,i,s):(e.isPasteError=!1,$(e,s,i))}function _e(e,i,n){if(t.isNullOrUndefined(i.files))Be(e,i,"delete");else if(e.setProperties({path:n},!0),e.itemData=[P(e)],Se(e,an,e.path),i.error)Be(e,i,"delete");else{var s={action:"delete",result:i};e.trigger("success",s)}}function He(e,i,n,s){if(t.isNullOrUndefined(i.details))Be(e,i,"details");else{Ke(e,s,null,i.details);var a={action:"details",result:i};e.trigger("success",a)}}function Be(e,t,i){Ke(e,"Error",t);var n={action:i,error:t.error};e.trigger("failure",n)}function ze(e,t,i,n,s,a){ke(e,{action:"search",path:i,searchString:n,showHiddenItems:s,caseSensitive:a,data:e.itemData},qe,t)}function qe(e,i,n){if(t.isNullOrUndefined(i.files))Be(e,i,"search");else{e.notify(n,i);var s={action:"search",result:i};e.trigger("success",s)}}function We(e,i,n){var s=e.ajaxSettings.downloadUrl?e.ajaxSettings.downloadUrl:e.ajaxSettings.url,a={action:"download",path:i,names:n,data:e.itemData},r={data:a,cancel:!1,useFormPost:!0,ajaxSettings:{url:s,type:"POST",contentType:"application/json",responseType:"blob",data:JSON.stringify(a),onSuccess:null,onFailure:null,beforeSend:null}};e.trigger("beforeDownload",r,function(i){if(!i.cancel)if(i.useFormPost){var n=t.createElement("form",{id:e.element.id+"_downloadForm",attrs:{action:s,method:"post",name:"downloadForm",download:""}}),a=t.createElement("input",{id:e.element.id+"_hiddenForm",attrs:{name:"downloadInput",value:JSON.stringify(i.data),type:"hidden"}});n.appendChild(a),e.element.appendChild(n),document.forms.namedItem("downloadForm").submit(),e.element.removeChild(n)}else{var r,o;new t.Fetch({url:t.getValue("url",i.ajaxSettings),type:t.getValue("type",i.ajaxSettings),contentType:t.getValue("contentType",i.ajaxSettings),responseType:t.getValue("responseType",i.ajaxSettings),beforeSend:t.getValue("beforeSend",i.ajaxSettings),onLoad:function(i){if(r=i.headers.get("Content-Disposition")){var n=r.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/),s=n&&n[1];o=s?s.replace(/['"]/g,""):o}else o=e.itemData.length>1?"files.zip":t.getValue("isFile",e.itemData[0])?t.getValue("name",e.itemData[0]):t.getValue("name",e.itemData[0])+".zip"},onSuccess:function(t){e.trigger("success",i);var n=t,s=URL.createObjectURL(n),a=document.createElement("a");a.href=s,a.download=o,document.body.appendChild(a),a.click(),document.body.removeChild(a)},onFailure:function(t){var n={error:{code:t.status.toString(),message:H(e,"Network-Error")+" "+e.ajaxSettings.downloadUrl}};Ke(e,"Error",n),e.trigger("failure",i)}}).send(JSON.stringify(i.data))}})}function Ke(e,i,s,a,r){var o=ht(e,i,s,a,r);t.isNullOrUndefined(e.dialogObj)?(e.dialogObj=new n.Dialog({beforeOpen:dt.bind(this,e,o.dialogName),beforeClose:function(t){Je(e,e.dialogObj,t,o.dialogName)},header:o.header,content:o.content,buttons:o.buttons,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,allowDragging:!0,isModal:!0,target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:B(e,e.isMobile?ci:pi),width:"350px",open:o.open,close:o.close,enableRtl:e.enableRtl,enableHtmlSanitizer:e.enableHtmlSanitizer,locale:e.locale}),e.dialogObj.isStringTemplate=!0,e.dialogObj.appendTo("#"+e.element.id+ni)):ut(e,o)}function Ge(e,i,s,a){var r=$e(e,i,s,a);e.isApplySame=!1,t.isNullOrUndefined(e.extDialogObj)?(e.extDialogObj=new n.Dialog({beforeOpen:pt.bind(this,e,r.dialogName),beforeClose:function(t){Je(e,e.extDialogObj,t,r.dialogName)},content:r.content,header:r.header,closeOnEscape:!0,allowDragging:!0,animationSettings:{effect:"None"},target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:B(e,e.isMobile?ci:pi),enableRtl:e.enableRtl,showCloseIcon:!0,isModal:!0,width:350,buttons:r.buttons,open:r.open,close:r.close,enableHtmlSanitizer:e.enableHtmlSanitizer,locale:e.locale}),e.extDialogObj.isStringTemplate=!0,e.extDialogObj.appendTo("#"+e.element.id+ai)):(e.extDialogObj.header=r.header,e.extDialogObj.close=r.close,e.extDialogObj.open=r.open,e.extDialogObj.close=r.close,e.extDialogObj.content=r.content,e.extDialogObj.buttons=r.buttons,e.extDialogObj.enableRtl=e.enableRtl,e.extDialogObj.locale=e.locale,e.extDialogObj.beforeOpen=pt.bind(this,e,r.dialogName),e.extDialogObj.beforeClose=function(t){Je(e,e.extDialogObj,t,r.dialogName)},e.extDialogObj.dataBind(),e.extDialogObj.show())}function Ye(e,t,i,n){var s={cancel:i.cancel,popupName:n,popupModule:t};e.trigger("beforePopupOpen",s,function(e){i.cancel=e.cancel})}function Je(e,t,i,n){var s={cancel:i.cancel,popupModule:t,popupName:n};e.trigger("beforePopupClose",s,function(t){i.cancel=t.cancel,i.cancel||!i.isInteracted||"Rename"!==n&&"Create Folder"!==n||e.trigger(un,{})})}function Qe(e,t,i){var n={popupModule:t,element:t.element,popupName:i};e.trigger("popupOpen",n)}function Xe(e,t,i){var n={popupModule:t,element:t.element,popupName:i};e.trigger("popupClose",n)}function $e(e,t,i,n){var s,a,r,o={header:"",content:"",buttons:[],dialogName:""};switch(o.open=function(){Qe(e,e.extDialogObj,o.dialogName)},o.close=function(){Xe(e,e.extDialogObj,o.dialogName)},t){case"Extension":o.header=H(e,"Header-Rename-Confirmation"),o.content="<div>"+H(e,"Content-Rename-Confirmation")+"</div>",o.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Yes")},click:function(){e.extDialogObj.hide(),Pe(e,n,e.renameText)}},{buttonModel:{content:H(e,"Button-No")},click:function(){e.extDialogObj.hide(),e.dialogObj.hide()}}],o.dialogName="Extension Change";break;case"DuplicateItems":o.dialogName="Duplicate Items",e.replaceItems=i,a=-1===(r=(a=e.replaceItems[e.fileLength]).lastIndexOf("/"))?a:a.substring(r),o.header=H(e,"Header-Duplicate"),s="<div>"+H(e,"Content-Duplicate")+"</div>",o.content=s.replace("{0}",a),o.close=function(){if(!e.isDropEnd&&0===e.duplicateItems.length){var t={fileDetails:e.droppedObjects};e.trigger("fileDropped",t),e.isDropEnd=e.isDragDrop=!1}Xe(e,e.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Yes")},click:function(){if(e.duplicateItems.push(e.replaceItems[e.fileLength]),e.duplicateRecords.push(ee(e,e.replaceItems[e.fileLength])),e.fileLength++,i[e.fileLength]){var t=e.replaceItems[e.fileLength],n=t.lastIndexOf("/");t=-1===n?t:t.substring(n),e.extDialogObj.content=s.replace("{0}",t),e.extDialogObj.show()}else{e.extDialogObj.hide();var a=e.isDragDrop?e.dragPath:e.targetPath,r=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath,o=e.isDragDrop?"move":e.fileAction;Ne(e,a,e.duplicateItems,r,o,e.duplicateItems,e.duplicateRecords)}}},{buttonModel:{content:H(e,"Button-No")},click:function(){if(e.fileLength++,i[e.fileLength]){var t=e.replaceItems[e.fileLength],n=t.lastIndexOf("/");t=-1===n?t:t.substring(n),e.extDialogObj.content=s.replace("{0}",t),e.extDialogObj.show()}else if(e.extDialogObj.hide(),0!==e.duplicateItems.length){var a=e.isDragDrop?"move":e.fileAction,r=e.isDragDrop?e.dragPath:e.targetPath,o=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath;Ne(e,r,e.duplicateItems,o,a,e.duplicateItems,e.duplicateRecords)}}}];break;case"UploadRetry":o.dialogName="Retry Upload",o.header=H(e,"Header-Retry"),o.content=e.retryFiles[0].name+'<div class="e-fe-retrycontent">'+H(e,"Content-Retry")+"</div>",o.open=tt.bind(this,e),o.close=function(){e.isRetryOpened=!1,et(e),Xe(e,e.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Keep-Both")},click:function(){Ze(e,!0)}},{buttonModel:{isPrimary:!0,content:H(e,"Button-Replace")},click:function(){Ze(e,!1)}},{buttonModel:{isPrimary:!0,content:H(e,"Button-Skip")},click:function(){var t=0;e.isApplySame?(t=e.retryFiles.length,e.retryFiles=[],et(e)):(t=1,e.retryFiles.splice(0,1),0!==e.retryFiles.length?Ge(e,"UploadRetry"):et(e)),e.notify(pn,{count:t})}}]}return o}function Ze(e,t){e.isApplySame?(t?it(e):nt(e),et(e)):(e.retryArgs.push({action:t?"keepboth":"replace",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1),0!==e.retryFiles.length?Ge(e,"UploadRetry"):et(e))}function et(e){var i=!0;e.isRetryOpened?e.isRetryOpened=!1:i=!1;var n=t.select(".e-dlg-checkbox",e.extDialogObj.element);n&&t.remove(n),i?e.extDialogObj.hide():e.retryFiles=[]}function tt(e,i){e.isRetryOpened=!0;var n=t.getValue("element",i),s=t.select(".e-dlg-content",n),a=e.createElement("div",{className:"e-dlg-checkbox"}),o=e.createElement("input",{id:e.element.id+"_applyall"});a.appendChild(o),s.appendChild(a),new r.CheckBox({label:H(e,"ApplyAll-Label"),change:function(t){e.isApplySame=t.checked}}).appendTo("#"+e.element.id+"_applyall"),Qe(e,e.extDialogObj,"Retry Upload")}function it(e){for(;0!==e.retryFiles.length;)e.retryArgs.push({action:"keepboth",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1)}function nt(e){for(;0!==e.retryFiles.length;)e.retryArgs.push({action:"replace",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1)}function st(e){var i=t.select("#newname",e.dialogObj.element);i.focus(),i.value="";var n=i.value.length;i.setSelectionRange(0,n)}function at(e){var i=t.select("#newname",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||lt(i,H(e,"Content-NewFolder")),i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){bt(e,i)},i.onkeyup=function(t){13===It(t)&&ft(e)},st(e),Qe(e,e.dialogObj,"Create Folder")}function rt(e){var i=t.select("#rename",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||lt(i,H(e,"Content-Rename")),i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){bt(e,i)},i.onkeyup=function(t){13===It(t)&&gt(e)},ot(e,i),Qe(e,e.dialogObj,"Rename")}function ot(e,t){t.focus();var i="";if(e.isFile&&!e.showFileExtension){var n=e.currentItemText.lastIndexOf(".");i=-1===n?e.currentItemText:e.currentItemText.substring(0,n)}else i=e.currentItemText;t.value=i,e.isFile&&e.showFileExtension&&-1!==t.value.indexOf(".")?t.setSelectionRange(0,t.value.lastIndexOf(".")):t.setSelectionRange(0,t.value.length)}function lt(e,t){a.Input.createInput({element:e,properties:{placeholder:t}})}function ht(e,i,n,s,a){var r,o,l,h,d,p={header:"",content:"",buttons:[],dialogName:""};switch(p.open=function(){Qe(e,e.dialogObj,p.dialogName)},p.close=function(){Xe(e,e.dialogObj,p.dialogName)},i=s&&!0===s.multipleFiles?"MultipleFileDetails":i){case"NewFolder":p.dialogName="Create Folder",p.header=H(e,"Header-NewFolder"),p.content='<input type="text" value="New folder" id="newname"><div class="e-fe-error"></div>',p.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Create")},click:function(t){"keydown"!==t.type&&ft(e)}}],p.open=at.bind(this,e);break;case"Delete":p.dialogName="Delete",e.selectedItems.length>1?(p.content=("<div>"+H(e,"Content-Multiple-Delete")+"</div>").replace("{0}",e.selectedItems.length.toString()),p.header=H(e,"Header-Multiple-Delete")):(p.content="<div>"+H(e,e.isFile?"Content-Delete":"Content-Folder-Delete")+"</div>",p.header=H(e,e.isFile?"Header-Delete":"Header-Folder-Delete")),p.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Yes")},click:function(t){mt(e)}},{buttonModel:{content:H(e,"Button-No")},click:function(){e.dialogObj.hide()}}];break;case"Rename":p.dialogName="Rename",p.header=H(e,"Header-Rename"),p.content='<input type="text" class="e-input" id="rename"><div class="e-fe-error"></div>',p.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Save")},click:function(t){"keydown"!==t.type&&gt(e)}}],p.open=rt.bind(this,e);break;case"details":p.dialogName="File Details",o=new t.Internationalization(e.locale).formatDate(new Date(s.modified),{format:"MMMM dd, yyyy HH:mm:ss"}),r="",t.isNullOrUndefined(s.permission)||(r="<tr><td>"+H(e,"Permission")+'</td><td class="'+Qi+'" >'+he(s.permission)+"</td></tr>"),p.header=s.name,p.content="<table><tr><td>"+H(e,"Type")+'</td><td class="'+Qi+'" title="'+(s.isFile?"File":"Folder")+'">'+(s.isFile?"File":"Folder")+"</td></tr><tr><td>"+H(e,"Size")+'</td><td><span class="'+Qi+'" title ="'+s.size+'">'+s.size+"</span></td></tr><tr><td>"+H(e,"Location")+'</td><td class="'+Qi+'" title="'+s.location+'">'+s.location+"</td></tr><tr><td>"+H(e,"Modified")+'</td><td class="'+Qi+'" >'+o+"</td></tr>"+r+"</table>",p.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Ok")},click:function(t){e.dialogObj.hide()}}];break;case"MultipleFileDetails":var c;p.dialogName="File Details",void 0==(l=e.itemData.map(function(e){return c=e.name.indexOf(".")+1,0!==c||e.isFile?0!==c?e.name.substr(c).replace(" ",""):"undetermined":"Folder"}))[0]&&(l=s.name.split(",").map(function(e){return c=e.indexOf(".")+1,0===c?"Folder":e.substr(c).replace(" ","")})),h=l.every(function(e,t,i){return e===i[0]})?"Folder"===l[0]?"Folder":l[0].toLocaleUpperCase()+" Type":"Multiple Types",d=s.location,p.header=s.name,p.content="<table><tr><td>"+H(e,"Type")+':</td><td class="'+Qi+'">'+h+"</td></tr><tr><td>"+H(e,"Size")+":</td><td>"+s.size+'<span class="'+Qi+'" title ="'+s.size+'"></span></td></tr><tr><td>'+H(e,"Location")+':</td><td class="'+Qi+'" title="'+d+'">'+d+"</td></tr></table>",p.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Ok")},click:function(t){"keydown"!==t.type&&e.dialogObj.hide()}}];break;case"Error":e.notify(un,{}),p.dialogName="Error","401"===n.error.code?p.header='<span class="e-fe-icon e-fe-access-error"></span><div class="e-fe-access-header">'+H(e,"Access-Denied")+"</div>":p.header=H(e,"Error"),p.content='<div class="'+Gi+'">'+n.error.message+"</div>",p.buttons=[{buttonModel:{isPrimary:!0,content:H(e,"Button-Ok")},click:function(t){e.dialogObj.hide()}}]}return p}function dt(e,i,n){ct(t.selectAll(".e-btn",e.dialogObj.element)),Ye(e,e.dialogObj,n,i)}function pt(e,i,n){ct(t.selectAll(".e-btn",e.extDialogObj.element)),Ye(e,e.extDialogObj,n,i)}function ct(e){for(var t=0;t<e.length;t++)!function(t){e[t].onkeydown=function(e){13===e.keyCode&&e.preventDefault()},e[t].onkeyup=function(i){13===i.keyCode&&e[t].click()}}(t)}function ut(e,t){e.dialogObj.header=t.header,e.dialogObj.content=t.content,e.dialogObj.buttons=t.buttons,e.dialogObj.enableRtl=e.enableRtl,e.dialogObj.open=t.open,e.dialogObj.close=t.close,e.dialogObj.beforeOpen=dt.bind(this,e,t.dialogName),e.dialogObj.beforeClose=function(i){Je(e,e.dialogObj,i,t.dialogName)},e.dialogObj.dataBind(),e.dialogObj.show()}function ft(e){var i=t.select("#newname",e.dialogObj.element);vt(e,i),""===i.parentElement.nextElementSibling.innerHTML&&je(e,i.value)}function gt(e){var i=t.select("#rename",e.dialogObj.element);if(vt(e,i),""===i.parentElement.nextElementSibling.innerHTML){var n=i.value,s=e.currentItemText.lastIndexOf(".");if(e.isFile&&!e.showFileExtension&&(n+=-1===s?"":e.currentItemText.substr(s)),e.renameText=n,e.currentItemText===n)return void e.dialogObj.hide();var a="navigationpane"===e.activeModule?t.getValue("filterPath",e.itemData[0]).replace(/\\/g,"/"):e.path;if(e.renamedId=t.getValue("id",e.itemData[0]),e.isFile){var r=-1===s?"":e.currentItemText.substr(s),o=n.lastIndexOf("."),l=-1===o?"":n.substr(o);e.showFileExtension&&r!==l?Ge(e,"Extension",null,a):Pe(e,a,n)}else Pe(e,a,n)}}function mt(e){e.dialogObj.hide(),e.notify(sn,{})}function bt(e,t){/[\/\\|*?"<>:]/.test(t.value)?yt(e,t):""===t.value?t.parentElement.nextElementSibling.innerHTML=H(e,"Validation-Empty"):t.parentElement.nextElementSibling.innerHTML=""}function vt(e,t){bt(e,t);var i=t.value.length-1;""===t.value||t.value.lastIndexOf(".")!==i&&t.value.lastIndexOf(" ")!==i||!e.showFileExtension&&-1!==t.value.lastIndexOf(".")&&0!==t.value.substring(t.value.indexOf(".")+1).length||yt(e,t)}function yt(e,t){var i=H(e,"Validation-Invalid").replace("{0}",'"'+t.value+'"');e.enableHtmlSanitizer?t.parentElement.nextElementSibling.textContent=i:t.parentElement.nextElementSibling.innerHTML=i}function It(e){return e.keyCode?e.keyCode:e.which?e.which:e.charCode}function Ot(e,i,s){var a=t.createElement("div",{className:"e-image-wrap"}),r=t.createElement("img",{className:"e-image",attrs:{src:s,alt:i}});a.appendChild(r),t.isNullOrUndefined(e.viewerObj)?(e.viewerObj=new n.Dialog({header:i,content:a,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,isModal:!0,width:"350px",height:"350px",target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:B(e,e.isMobile?ci:pi),locale:e.locale,enableResize:!0,allowDragging:!0,enableHtmlSanitizer:e.enableHtmlSanitizer,position:{X:"center",Y:"center"},enableRtl:e.enableRtl,open:wt.bind(this,e),close:function(){Xe(e,e.viewerObj,"Image Preview")},beforeOpen:function(t){Ye(e,e.viewerObj,t,"Image Preview")},beforeClose:function(t){Je(e,e.viewerObj,t,"Image Preview")},resizing:Dt.bind(this,e),resizeStop:Dt.bind(this,e)}),e.viewerObj.isStringTemplate=!0,e.viewerObj.appendTo("#"+e.element.id+si)):(e.viewerObj.refresh(),e.viewerObj.header=i,e.viewerObj.content=a,e.viewerObj.enableRtl=e.enableRtl,e.viewerObj.dataBind(),e.viewerObj.show())}function wt(e){setTimeout(function(){e.viewerObj&&e.viewerObj.element.focus()}),Dt(e),Qe(e,e.viewerObj,"Image Preview")}function Dt(e){var i=t.select(".e-dlg-content",e.viewerObj.element),n=t.select(".e-image-wrap",e.viewerObj.element),s=window.getComputedStyle(i,null),a=s?2*parseFloat(s.paddingRight):36,r=s?2*parseFloat(s.paddingBottom):20;n.style.width=i.offsetWidth-a+"px",n.style.height=i.offsetHeight-r+"px"}var Ct=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),St=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},jt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ct(i,e),St([t.Property(null)],i.prototype,"downloadUrl",void 0),St([t.Property(null)],i.prototype,"getImageUrl",void 0),St([t.Property(null)],i.prototype,"uploadUrl",void 0),St([t.Property(null)],i.prototype,"url",void 0),i}(t.ChildProperty),xt=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Nt=["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"],Et=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Pt([t.Property(Nt)],i.prototype,"items",void 0),Pt([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),Rt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xt(i,e),Pt([t.Property("")],i.prototype,"id",void 0),Pt([t.Property("")],i.prototype,"text",void 0),Pt([t.Property("auto")],i.prototype,"width",void 0),Pt([t.Property("")],i.prototype,"cssClass",void 0),Pt([t.Property(!1)],i.prototype,"showAlwaysInPopup",void 0),Pt([t.Property(!1)],i.prototype,"disabled",void 0),Pt([t.Property("")],i.prototype,"prefixIcon",void 0),Pt([t.Property("")],i.prototype,"suffixIcon",void 0),Pt([t.Property(!0)],i.prototype,"visible",void 0),Pt([t.Property("None")],i.prototype,"overflow",void 0),Pt([t.Property("")],i.prototype,"template",void 0),Pt([t.Property("Button")],i.prototype,"type",void 0),Pt([t.Property("Both")],i.prototype,"showTextOn",void 0),Pt([t.Property(null)],i.prototype,"htmlAttributes",void 0),Pt([t.Property("")],i.prototype,"tooltipText",void 0),Pt([t.Property("Left")],i.prototype,"align",void 0),Pt([t.Property(-1)],i.prototype,"tabIndex",void 0),Pt([t.Property()],i.prototype,"name",void 0),i}(t.ChildProperty),Mt=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),kt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Tt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Mt(i,e),kt([t.Property(!0)],i.prototype,"allowSearchOnTyping",void 0),kt([t.Property("contains")],i.prototype,"filterType",void 0),kt([t.Property(!0)],i.prototype,"ignoreCase",void 0),kt([t.Property(null)],i.prototype,"placeholder",void 0),i}(t.ChildProperty),Lt=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),At=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Ft=[{field:"name",headerText:"Name",minWidth:120,isPrimaryKey:!0,template:'<span class="e-fe-text">${name}</span>',customAttributes:{class:"e-fe-grid-name"}},{field:"_fm_modified",headerText:"DateModified",type:"dateTime",format:"MMMM dd, yyyy HH:mm",minWidth:120,width:"190"},{field:"size",headerText:"Size",minWidth:90,width:"110",template:t.initializeCSPTemplate(function(e){return'<span class="e-fe-size">'+e.size+"</span>"}),format:"n2"}],Ut=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Lt(i,e),At([t.Property(!0)],i.prototype,"columnResizing",void 0),At([t.Property(Ft)],i.prototype,"columns",void 0),i}(t.ChildProperty),Vt=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_t=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Ht=["Open","|","Cut","Copy","|","Delete","Download","Rename","|","Details"],Bt=["Open","|","Cut","Copy","Paste","|","Delete","Rename","Download","|","Details"],zt=["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"],qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),_t([t.Property(Ht)],i.prototype,"file",void 0),_t([t.Property(Bt)],i.prototype,"folder",void 0),_t([t.Property(zt)],i.prototype,"layout",void 0),_t([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),Wt=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Kt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Gt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Wt(i,e),Kt([t.Property("650px")],i.prototype,"maxWidth",void 0),Kt([t.Property("240px")],i.prototype,"minWidth",void 0),Kt([t.Property(!0)],i.prototype,"visible",void 0),Kt([t.Property("None")],i.prototype,"sortOrder",void 0),i}(t.ChildProperty),Yt=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Jt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Yt(i,e),Jt([t.Property("")],i.prototype,"allowedExtensions",void 0),Jt([t.Property(!0)],i.prototype,"autoUpload",void 0),Jt([t.Property(!1)],i.prototype,"autoClose",void 0),Jt([t.Property(!1)],i.prototype,"directoryUpload",void 0),Jt([t.Property(0)],i.prototype,"minFileSize",void 0),Jt([t.Property(3e7)],i.prototype,"maxFileSize",void 0),i}(t.ChildProperty),Xt=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$t=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Xt(i,e),$t([t.Property("")],i.prototype,"field",void 0),$t([t.Property("")],i.prototype,"headerText",void 0),$t([t.Property("")],i.prototype,"width",void 0),$t([t.Property("")],i.prototype,"minWidth",void 0),$t([t.Property("")],i.prototype,"maxWidth",void 0),$t([t.Property("Left")],i.prototype,"textAlign",void 0),$t([t.Property(null)],i.prototype,"headerTextAlign",void 0),$t([t.Property(null)],i.prototype,"type",void 0),$t([t.Property(null)],i.prototype,"format",void 0),$t([t.Property(null)],i.prototype,"template",void 0),$t([t.Property(null)],i.prototype,"sortComparer",void 0),$t([t.Property(null)],i.prototype,"headerTemplate",void 0),$t([t.Property(!0)],i.prototype,"allowSorting",void 0),$t([t.Property(!0)],i.prototype,"allowResizing",void 0),$t([t.Property(null)],i.prototype,"customAttributes",void 0),$t([t.Property("")],i.prototype,"hideAtMedia",void 0),$t([t.Property(null)],i.prototype,"customFormat",void 0),$t([t.Property(!1)],i.prototype,"isPrimaryKey",void 0),i}(t.ChildProperty),ei="_layout",ti="_grid",ii="_largeicons",ni="_dialog",si="_img_dialog",ai="_extn_dialog",ri="_content",oi="_breadcrumbbar",li="_upload",hi="e-filemanager",di="e-control",pi="e-fe-popup",ci="e-fe-popup e-fe-mobile",ui="e-fe-m-filter",fi="e-large-icons",gi="e-list-item",mi="e-list-text",bi="e-icons e-fe-tick",vi="e-icons e-fe-dot",yi="e-blur",Ii="e-active",Oi="e-hover",wi="e-focus",Di="e-focused",Ci="e-check",Si="e-checkbox-wrapper",ji="e-row",xi="e-empty",Pi="e-empty-content",Ni="e-empty-inner-content",Ei="e-fe-clone",Ri="e-fe-drop-folder",Mi="e-fe-drop-file",ki="e-fe-folder",Ti="e-fe-image",Li="e-fe-music",Ai="e-fe-video",Fi="e-large-icon",Ui="e-empty-icon e-fe-folder",Vi="e-gridheader",_i="e-treeview",Hi="e-menu-icon",Bi="e-content",zi="e-gridcontent",qi="e-icons e-fe-cut",Wi="e-icons e-fe-grid",Ki="e-icons e-fe-large",Gi="e-fe-errorcontent",Yi="e-rtl",Ji="e-display-none",Qi="e-fe-value",Xi="isFile",$i="model-changed",Zi="initial-end",en="finalize-end",tn="create-end",nn="path-drag",sn="delete-init",an="delete-end",rn="refresh-end",on="resize-end",ln="path-changed",hn="destroy",dn="before-request",pn="skip-upload",cn="after-request",un="actionFailure",fn="search",gn="open-init",mn="open-end",bn="selection-changed",vn="clear-path-init",yn="layout-change",In="sort-by-change",On="details-init",wn="menu-item-data",Dn="rename-init",Cn="rename-end-parent",Sn="rename-end",jn="show-paste",xn="hide-paste",Pn="cut-copy-init",Nn="paste-init",En="paste-end",Rn="cut-end",Mn="sort-column",kn="path-column",Tn="search-change",Ln="drop-init",An="drag-end",Fn="drop-path",Un="dragging",Vn="method-call",_n="read",Hn="write",Bn="writeContents",zn="upload",qn="download",Wn=function(){function e(e){this.isInteraction=!0,this.uploadOperation=!1,this.count=0,this.isRendered=!0,this.tapCount=0,this.isSelectAllCalled=!1,this.isPasteOperation=!1,this.isInteracted=!0,this.parent=e,this.element=t.select("#"+this.parent.element.id+ii,this.parent.element),t.addClass([this.element],fi),this.addEventListener(),this.keyConfigs={end:"end",home:"home",tab:"tab",moveDown:"downarrow",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",ctrlEnd:"ctrl+end",ctrlHome:"ctrl+home",ctrlDown:"ctrl+downarrow",ctrlLeft:"ctrl+leftarrow",ctrlRight:"ctrl+rightarrow",ctrlUp:"ctrl+uparrow",shiftEnd:"shift+end",shiftHome:"shift+home",shiftDown:"shift+downarrow",shiftLeft:"shift+leftarrow",shiftRight:"shift+rightarrow",shiftUp:"shift+uparrow",csEnd:"ctrl+shift+end",csHome:"ctrl+shift+home",csDown:"ctrl+shift+downarrow",csLeft:"ctrl+shift+leftarrow",csRight:"ctrl+shift+rightarrow",csUp:"ctrl+shift+uparrow",space:"space",ctrlSpace:"ctrl+space",shiftSpace:"shift+space",csSpace:"ctrl+shift+space",ctrlA:"ctrl+a",enter:"enter",altEnter:"alt+enter",esc:"escape",del:"delete",ctrlX:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"ctrl+v",f2:"f2",shiftdel:"shift+delete",back:"backspace",ctrlD:"ctrl+d"}}return e.prototype.render=function(e){if(this.parent.visitedItem=null,this.startItem=null,n.showSpinner(this.parent.element),"LargeIcons"===this.parent.view){this.resetMultiSelect(),this.element.setAttribute("tabindex","0"),this.listObj&&(this.unWireEvents(),this.removeEventListener()),this.parent.notify("hide-layout",{});var i=t.select("#"+this.parent.element.id+ii,this.parent.element),a=t.select("ul",i);if(a&&t.remove(a),this.listObj={ariaAttributes:{itemRole:"option",listRole:"listbox",itemText:"",groupItemRole:"group",wrapperRole:""},showIcon:!0,fields:{text:"name",iconCss:"_fm_icon",imageUrl:"_fm_imageUrl",htmlAttributes:"_fm_htmlAttr"},sortOrder:this.parent.sortOrder,itemCreated:this.onItemCreated.bind(this),enableHtmlSanitizer:this.parent.enableHtmlSanitizer},this.items=[],this.items=this.renderList(e),this.parent.sortComparer&&"None"!==this.parent.sortBy?this.items=this.allItems=s.DataUtil.sort(this.items,this.parent.sortBy,this.comparer.bind(this)):this.items=this.allItems=L(this.parent,this.items),i.classList.remove(Ji),this.parent.enableVirtualization&&this.allItems.length>0&&(this.element.style.height||this.adjustHeight(),this.parent.virtualizationModule.setUIVirtualization()),this.listElements=o.ListBase.createListFromJson(t.createElement,this.items,this.listObj),this.itemList=Array.prototype.slice.call(t.selectAll("."+gi,this.listElements)),this.element.appendChild(this.listElements),this.listElements.setAttribute("aria-label","listbox"),this.preventImgDrag(),this.createDragObj(),0===this.itemList.length){var r=this.element.querySelector(".e-list-parent");this.element.removeChild(r),F(this.parent,this.element,e)}else 0!==this.itemList.length&&this.element.querySelector("."+xi)&&this.element.removeChild(this.element.querySelector("."+xi));!0===this.isPasteOperation&&(this.selectItems(this.parent.pasteNodes),this.isPasteOperation=!1),!0===this.uploadOperation&&(this.selectItems(this.parent.uploadItem),this.parent.setProperties({selectedItems:[]},!0),++this.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[]));var l=this.element.querySelectorAll("."+Ii);0!==l.length&&(this.parent.activeModule="largeiconsview");for(var h=0;h<l.length;h++)l[h].setAttribute("aria-selected","true");this.adjustHeight(),this.element.style.maxHeight="100%",this.getItemCount(),this.addEventListener(),this.wireEvents(),this.parent.enableVirtualization&&this.allItems.length>0&&(this.parent.virtualizationModule.setUlElementHeight(),this.parent.virtualizationModule.wireScrollEvent(!1)),this.isRendered=!0,n.hideSpinner(this.parent.element),this.parent.selectedItems.length&&this.checkItem()}},e.prototype.comparer=function(e,t,i,n){if("Descending"===this.parent.sortOrder){var s=e;e=t,t=s}return this.parent.sortComparer(e,t)},e.prototype.preventImgDrag=function(){for(var e=0;e<this.itemList.length;)this.itemList[e].querySelector("img")&&(this.itemList[e].ondragstart=function(){return!1}),e++},e.prototype.createDragObj=function(){var e=this;this.listObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.listElements,{enableTailMode:!0,distance:5,enableAutoScroll:!1,dragTarget:"."+Fi,helper:this.dragHelper.bind(this),cursorAt:this.parent.dragCursorPosition,dragArea:this.parent.element,dragStop:ie.bind(this,this.parent),drag:le.bind(this,this.parent),clone:!0,dragStart:function(t){ne(e.parent,t,e.dragObj)}})):this.dragObj&&!this.parent.allowDragAndDrop&&this.dragObj.destroy())},e.prototype.dragHelper=function(e){var i=e.sender.target,n=t.closest(i,".e-list-item");if(!n)return null;n&&!n.classList.contains("e-active")&&this.setFocus(n);var s=this.element.querySelectorAll("."+Ii);this.parent.activeElements=[],this.parent.dragData=[];for(var a=0;a<s.length;a++)this.parent.dragData.push(this.getItemObject(s[a])),this.parent.activeElements.push(s[a]);return w(this.parent,n),this.parent.dragPath=this.parent.path,te(this.parent),this.parent.virtualDragElement},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=t.closest(e.target,".e-list-item"),n=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent);if(i){var s=this.getItemObject(i);this.parent.dropPath=s.isFile?this.parent.path:k(this.parent,s,this.parent.path),this.parent.dropData=s.isFile?n:s}else this.parent.dropPath=this.parent.path,this.parent.dropData=n}},e.prototype.getModuleName=function(){return"largeiconsview"},e.prototype.adjustHeight=function(){var e=t.select("#"+this.parent.element.id+ri,this.parent.element),i=t.select("#"+this.parent.element.id+oi,this.parent.element);this.element.style.height=e.offsetHeight-i.offsetHeight+"px"},e.prototype.onItemCreated=function(e){if(e.item.removeAttribute("aria-level"),!this.parent.showFileExtension&&t.getValue("isFile",e.curData)){var i=e.item.querySelector("."+mi),n=t.getValue("name",e.curData),s=t.getValue("type",e.curData);i.innerHTML=n.substr(0,n.length-s.length)}this.renderCheckbox(e);var a={element:e.item,fileDetails:e.curData,module:"LargeIconsView"};this.parent.trigger("fileLoad",a)},e.prototype.renderCheckbox=function(e){if(this.parent.showItemCheckBoxes){var i=r.createCheckBox(t.createElement,!1,{checked:!1,cssClass:"e-small"});i.setAttribute("role","checkbox"),i.setAttribute("aria-checked","false"),i.setAttribute("aria-label","checkbox"),e.item.firstElementChild.insertBefore(i,e.item.firstElementChild.childNodes[0])}},e.prototype.onLayoutChange=function(e){if("LargeIcons"===this.parent.view){if(this.destroy(),this.parent.enableVirtualization&&this.parent.setProperties({selectedItems:[]},!0),this.render(e),"layout-change"===t.getValue("name",e)&&"move"===this.parent.fileAction&&this.parent.isCut&&this.parent.selectedNodes&&0!==this.parent.selectedNodes.length)for(var i=this.getIndexes(this.parent.selectedNodes),n=0;n<i.length;)I(this.itemList[i[n]]),n++;0!==this.element.querySelectorAll("."+Ii).length&&this.element.focus(),this.checkItem(),this.parent.isLayoutChange=!1}else this.element.setAttribute("tabindex","-1")},e.prototype.checkItem=function(){var e=this.element.querySelectorAll("."+Ii);if(e)for(var t=0;t<e.length;)this.checkState(e[t],!0),t++},e.prototype.renderList=function(e){for(var i=0,n=JSON.parse(JSON.stringify(e.files));i<n.length;){var s=R(n[i]),a=t.getValue("name",n[i]),r=de(this.parent,n[i]),o=this.parent.selectedItems&&-1!==this.parent.selectedItems.indexOf(r)?Fi+" e-active":Fi;if(ye(n[i])||(o+=" "+be(n[i])),s===Ti&&this.parent.showThumbnail&&ve(n[i])){var l=M(this.parent,n[i]);t.setValue("_fm_imageUrl",l,n[i]),t.setValue("_fm_imageAttr",{alt:a},n[i])}else t.setValue("_fm_icon",s,n[i]);t.setValue("_fm_htmlAttr",{class:o,title:a},n[i]),i++}return n},e.prototype.onFinalizeEnd=function(e){this.render(e)},e.prototype.onCreateEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.clearSelect(),this.selectItems([t.getValue(this.parent.hasId?"id":"name",this.parent.createdItem)]),this.parent.createdItem=null,this.parent.largeiconsviewModule.element.focus(),this.parent.activeModule="largeiconsview")},e.prototype.onSelectedData=function(){"largeiconsview"===this.parent.activeModule&&this.updateSelectedData()},e.prototype.onDeleteInit=function(){"largeiconsview"===this.parent.activeModule&&Ee(this.parent,this.parent.selectedItems,this.parent.path,"delete")},e.prototype.onDeleteEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.parent.setProperties({selectedItems:[]},!0),this.clearSelect())},e.prototype.onRefreshEnd=function(e){"LargeIcons"===this.parent.view&&this.onLayoutChange(e)},e.prototype.onRenameInit=function(){"largeiconsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},e.prototype.onPathChanged=function(e){this.parent.isCut=!1,""===this.parent.breadcrumbbarModule.searchObj.element.value&&(this.parent.searchedItems=[]),"LargeIcons"===this.parent.view&&(O(this.parent),this.parent.setProperties({selectedItems:[]},!0),this.onLayoutChange(e),this.parent.renamedItem&&(this.clearSelect(),this.addSelection(this.parent.renamedItem),this.parent.renamedItem=null))},e.prototype.onOpenInit=function(e){"largeiconsview"===this.parent.activeModule&&this.doOpenAction(e.target)},e.prototype.onHideLayout=function(){"LargeIcons"!==this.parent.view&&this.element&&this.element.classList.add(Ji)},e.prototype.onSelectAllInit=function(){if("LargeIcons"===this.parent.view){this.startItem=this.getFirstItem();var e=this.getLastItem(),t={ctrlKey:!0,shiftKey:!0};this.doSelection(e,t),this.isInteraction=!0,this.isInteracted=!0}},e.prototype.onClearAllInit=function(){"LargeIcons"===this.parent.view&&(this.clearSelection(),this.isInteraction=!0,this.isInteracted=!0)},e.prototype.onBeforeRequest=function(){this.isRendered=!1},e.prototype.onAfterRequest=function(){this.isRendered=!0},e.prototype.onSearch=function(e){"LargeIcons"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(bn,{}),this.parent.searchedItems=e.files,this.onLayoutChange(e))},e.prototype.onLayoutRefresh=function(){"LargeIcons"===this.parent.view&&this.adjustHeight()},e.prototype.onUpdateSelectionData=function(){"LargeIcons"===this.parent.view&&this.updateSelectedData()},e.prototype.onPathColumn=function(){"LargeIcons"!==this.parent.view||t.isNullOrUndefined(this.listObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||"filterPath"!==this.parent.sortBy||(this.parent.sortBy="name",this.parent.notify(In,{}))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(kn,this.onPathColumn),this.parent.off(en,this.onFinalizeEnd),this.parent.off(tn,this.onCreateEnd),this.parent.off("selected-data",this.onSelectedData),this.parent.off(sn,this.onDeleteInit),this.parent.off(an,this.onDeleteEnd),this.parent.off(rn,this.onRefreshEnd),this.parent.off(ln,this.onPathChanged),this.parent.off(yn,this.onLayoutChange),this.parent.off(fn,this.onSearch),this.parent.off(gn,this.onOpenInit),this.parent.off(mn,this.onPathChanged),this.parent.off($i,this.onPropertyChanged),this.parent.off(Vn,this.onMethodCall),this.parent.off(un,this.onActionFailure),this.parent.off(Dn,this.onRenameInit),this.parent.off(Sn,this.onPathChanged),this.parent.off("hide-layout",this.onHideLayout),this.parent.off("select-all-init",this.onSelectAllInit),this.parent.off("clear-all-init",this.onClearAllInit),this.parent.off(wn,this.onMenuItemData),this.parent.off(dn,this.onBeforeRequest),this.parent.off(cn,this.onAfterRequest),this.parent.off("splitter-resize",this.splitterResizeHandler),this.parent.off(on,this.resizeHandler),this.parent.off(Nn,this.onpasteInit),this.parent.off(En,this.onpasteEnd),this.parent.off(Pn,this.oncutCopyInit),this.parent.off(Ln,this.onDropInit),this.parent.off(On,this.onDetailsInit),this.parent.off("layout-refresh",this.onLayoutRefresh),this.parent.off(Fn,this.onDropPath),this.parent.off("update-selection-data",this.onUpdateSelectionData),this.parent.off("filter-end",this.onPathChanged))},e.prototype.addEventListener=function(){this.parent.on(kn,this.onPathColumn,this),this.parent.on(en,this.onFinalizeEnd,this),this.parent.on(tn,this.onCreateEnd,this),this.parent.on(rn,this.onRefreshEnd,this),this.parent.on("selected-data",this.onSelectedData,this),this.parent.on(ln,this.onPathChanged,this),this.parent.on(sn,this.onDeleteInit,this),this.parent.on(Nn,this.onpasteInit,this),this.parent.on(an,this.onDeleteEnd,this),this.parent.on(yn,this.onLayoutChange,this),this.parent.on(fn,this.onSearch,this),this.parent.on(gn,this.onOpenInit,this),this.parent.on(Dn,this.onRenameInit,this),this.parent.on(Sn,this.onPathChanged,this),this.parent.on(mn,this.onPathChanged,this),this.parent.on($i,this.onPropertyChanged,this),this.parent.on(Vn,this.onMethodCall,this),this.parent.on(un,this.onActionFailure,this),this.parent.on("hide-layout",this.onHideLayout,this),this.parent.on("select-all-init",this.onSelectAllInit,this),this.parent.on("clear-all-init",this.onClearAllInit,this),this.parent.on(wn,this.onMenuItemData,this),this.parent.on(dn,this.onBeforeRequest,this),this.parent.on(cn,this.onAfterRequest,this),this.parent.on(Ln,this.onDropInit,this),this.parent.on(On,this.onDetailsInit,this),this.parent.on("splitter-resize",this.splitterResizeHandler,this),this.parent.on(on,this.resizeHandler,this),this.parent.on(En,this.onpasteEnd,this),this.parent.on(Pn,this.oncutCopyInit,this),this.parent.on("layout-refresh",this.onLayoutRefresh,this),this.parent.on(Fn,this.onDropPath,this),this.parent.on("update-selection-data",this.onUpdateSelectionData,this),this.parent.on("filter-end",this.onPathChanged,this)},e.prototype.onActionFailure=function(){this.isInteraction=!0,this.isInteracted=!0},e.prototype.onMenuItemData=function(e){if(this.parent.activeModule===this.getModuleName()){var i=t.closest(e.target,"li");this.parent.itemData=[this.getItemObject(i)]}},e.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.updateSelectedData():this.parent.itemData=[t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},e.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""===this.parent.folderPath?[P(this.parent)]:[this.getItemObject(t.select(".e-active",this.element))])},e.prototype.oncutCopyInit=function(){if(this.parent.activeModule===this.getModuleName()){var e=this.element.querySelectorAll("."+Ii);this.parent.activeRecords=[],this.parent.activeElements=[];for(var t=0;t<e.length;t++)this.parent.activeElements.push(e[t]),this.parent.activeRecords.push(this.getItemObject(e[t]))}},e.prototype.onpasteEnd=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,this.parent.path!==this.parent.destinationPath&&this.parent.path!==X(this.parent,e)||this.onPathChanged(e))},e.prototype.onDropPath=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},e.prototype.onPropertyChanged=function(e){var i;if(e.module===this.getModuleName()||"common"===e.module)for(var n=0,s=Object.keys(e.newProp);n<s.length;n++)switch(s[n]){case"allowDragAndDrop":this.createDragObj();break;case"height":this.adjustHeight();break;case"selectedItems":this.isInteraction=!1,this.isInteracted=!1,i=t.isNullOrUndefined(this.parent.selectedItems)?[]:this.parent.selectedItems.slice(0),i=this.parent.allowMultiSelection?i:i.slice(i.length-1),this.parent.setProperties({selectedItems:[]},!0),this.onClearAllInit(),i.length&&this.selectItems(i),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),this.isInteraction=!0,this.isInteracted=!0;break;case"showThumbnail":j(this.parent);break;case"showFileExtension":case"showHiddenItems":Se(this.parent,ln,this.parent.path);break;case"allowMultiSelection":if("LargeIcons"!==this.parent.view)break;j(this.parent);break;case"view":C(this.parent,"LargeIcons")}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.listObj&&this.unWireEvents(),this.startItem=null,this.listElements=null)},e.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new t.KeyboardEvents(this.element,{keyAction:this.keydownActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),t.EventHandler.add(this.element,"mouseover",this.onMouseOver,this)},e.prototype.unWireEvents=function(){this.wireClickEvent(!1),t.EventHandler.remove(this.element,"mouseover",this.onMouseOver),this.keyboardModule.destroy(),this.keyboardDownModule.destroy()},e.prototype.onMouseOver=function(e){var i=t.closest(e.target,".e-list-item");O(this.parent,"hover"),null!==i&&i.classList.add(Oi)},e.prototype.wireClickEvent=function(e){if(e){var i=this;this.clickObj=new t.Touch(this.element,{tap:function(e){e.originalEvent.preventDefault(),i.parent.isDevice?(i.tapCount=e.tapCount,i.tapEvent=e,setTimeout(function(){i.tapCount>0&&i.doTapAction(i.tapEvent),i.tapCount=0},350)):2===e.tapCount&&3!==e.originalEvent.which?i.dblClickHandler(e):i.clickHandler(e)},tapHold:function(e){i.parent.isDevice&&(i.multiSelect=!!i.parent.allowMultiSelection,i.parent.allowMultiSelection&&t.addClass([i.parent.element],"e-fe-m-select"),i.clickHandler(e))}})}else this.clickObj&&this.clickObj.destroy()},e.prototype.doTapAction=function(e){var i=e.originalEvent.target,n=t.closest(i,"."+gi);this.multiSelect||i.classList.contains("e-list-parent")||t.isNullOrUndefined(n)?this.clickHandler(e):(this.parent.isFile=!1,this.updateType(n),this.parent.isFile?2===e.tapCount?(this.clickHandler(e),this.dblClickHandler(e)):this.clickHandler(e):this.dblClickHandler(e))},e.prototype.clickHandler=function(e){var t=e.originalEvent.target;O(this.parent,"hover"),this.doSelection(t,e.originalEvent),this.parent.activeModule="largeiconsview"},e.prototype.doSelection=function(e,i){var n=t.closest(e,"."+gi),s=e.classList;this.parent.isFile=!1;var a="select";if(3===i.which&&!t.isNullOrUndefined(n)&&n.classList.contains(Ii))return void this.updateType(n);if(t.isNullOrUndefined(n))this.parent.selectedItems.length===this.itemList.length&&(this.isSelectAllCalled=!0),this.clearSelection();else if(this.parent.allowMultiSelection&&n.classList.contains(Ii)&&(i.ctrlKey||e.classList.contains(Ci))&&(a="unselect"),i.ctrlKey&&i.shiftKey&&(this.isSelectAllCalled=!0),!0!==this.triggerSelection(a,n).cancel){if(this.parent.allowMultiSelection&&(this.multiSelect||!i||i.ctrlKey)||s.contains("e-frame")||(this.updateType(n),this.clearSelect()),this.parent.allowMultiSelection&&i.shiftKey){i&&i.ctrlKey||this.clearSelect(),this.startItem||(this.startItem=n);var r=this.itemList.indexOf(this.startItem),o=this.itemList.indexOf(n);if(r>o)for(l=r;l>=o;l--)this.addActive(this.itemList[l]);else for(var l=r;l<=o;l++)this.addActive(this.itemList[l]);this.addFocus(this.itemList[o])}else this.startItem=n,this.parent.allowMultiSelection&&n.classList.contains(Ii)?this.removeActive(n):this.addActive(n),this.addFocus(n);0===this.parent.selectedItems.length&&this.resetMultiSelect(),this.parent.notify(bn,{}),this.triggerSelect(a,n)}t.isNullOrUndefined(n)||(this.isSelectAllCalled=!1,this.updateType(n))},e.prototype.dblClickHandler=function(e){this.parent.activeModule="largeiconsview";var t=e.originalEvent.target;this.doOpenAction(t)},e.prototype.clearSelection=function(){this.clearSelect(),this.resetMultiSelect(),this.parent.notify(bn,{})},e.prototype.resetMultiSelect=function(){this.multiSelect=!1,t.removeClass([this.parent.element],"e-fe-m-select")},e.prototype.doOpenAction=function(e){var i=this;if(!t.isNullOrUndefined(e)){var n=t.closest(e,"."+gi);if(this.parent.isFile=!1,!t.isNullOrUndefined(n)){this.updateType(n);var s=this.getItemObject(n);if(!ve(s))return void me(this.parent,s,_n);var a={cancel:!1,fileDetails:s,module:"LargeIconsView"};this.parent.trigger("fileOpen",a,function(e){if(!e.cancel){var n=t.getValue("name",s);if(i.parent.isFile){if(R(s)===Ti){var a=M(i.parent,s);Ot(i.parent,n,a)}}else{if(""!==i.parent.breadcrumbbarModule.searchObj.element.value||i.parent.isFiltered)K(i.parent,s);else{var r=t.getValue("id",s);i.parent.oldPath=i.parent.path;var o=i.parent.path+(t.isNullOrUndefined(r)?n:r)+"/";i.parent.setProperties({path:o},!0),i.parent.pathNames.push(n),i.parent.pathId.push(t.getValue("_fm_id",s)),i.parent.itemData=[s],x(i.parent)}i.parent.isFiltered=!1,i.parent.setProperties({selectedItems:[]},!0)}}})}}},e.prototype.updateType=function(e){var i=t.select("."+ki,e);this.parent.isFile=!!t.isNullOrUndefined(i)},e.prototype.keydownActionHandler=function(e){if(this.isRendered)switch(e.action){case"end":case"home":case"moveDown":case"moveLeft":case"moveRight":case"moveUp":case"ctrlEnd":case"shiftEnd":case"csEnd":case"ctrlHome":case"shiftHome":case"csHome":case"ctrlDown":case"shiftDown":case"csDown":case"ctrlLeft":case"shiftLeft":case"csLeft":case"ctrlRight":case"shiftRight":case"csRight":case"space":case"ctrlSpace":case"shiftSpace":case"csSpace":case"ctrlA":case"enter":case"altEnter":case"esc":case"del":case"shiftdel":case"ctrlC":case"ctrlV":case"ctrlX":case"f2":case"ctrlD":e.preventDefault()}},e.prototype.keyActionHandler=function(e){var i=this;if(this.isRendered){var n=this.getFocusedItem(),s=this.getFirstItem(),a=this.getLastItem();switch(e.action){case"end":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTo(0,this.element.firstElementChild.scrollHeight),setTimeout(function(){i.navigateItem(i.itemList[i.itemList.length-1])},10)):this.navigateItem(a);break;case"home":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTop=0,setTimeout(function(){i.navigateItem(i.itemList[0])},10)):this.navigateItem(s);break;case"tab":t.isNullOrUndefined(n)?t.isNullOrUndefined(s)||this.addFocus(s):this.addFocus(n);break;case"moveDown":this.navigateDown(n,!0);break;case"moveLeft":this.navigateRight(n,!1);break;case"moveRight":this.navigateRight(n,!0);break;case"moveUp":this.navigateDown(n,!1);break;case"ctrlEnd":case"shiftEnd":case"csEnd":this.csEndKey(a,e);break;case"ctrlHome":case"shiftHome":case"csHome":this.csHomeKey(s,e);break;case"ctrlDown":case"shiftDown":case"csDown":this.csDownKey(n,e);break;case"ctrlLeft":case"shiftLeft":case"csLeft":this.csLeftKey(n,e);break;case"ctrlRight":case"shiftRight":case"csRight":this.csRightKey(n,e);break;case"ctrlUp":case"shiftUp":case"csUp":this.csUpKey(n,e);break;case"space":this.spaceKey(n);break;case"ctrlSpace":case"shiftSpace":case"csSpace":t.isNullOrUndefined(n)||this.doSelection(n,e);break;case"ctrlA":this.ctrlAKey(s,a);break;case"enter":this.doOpenAction(this.parent.visitedItem?this.parent.visitedItem:this.getVisitedItem());break;case"altEnter":this.parent.notify(On,{}),Re(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":v(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"ctrlC":N(this.parent);break;case"ctrlV":this.parent.folderPath="",G(this.parent);break;case"ctrlX":E(this.parent);break;case"f2":this.performRename();break;case"ctrlD":this.doDownload()}}},e.prototype.doDownload=function(){this.updateSelectedData(),ue(this.parent)},e.prototype.performDelete=function(){if(this.parent.selectedItems&&this.parent.selectedItems.length>0){this.updateSelectedData();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!ye(e[t]))return void me(this.parent,e[t],Hn);Ke(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),ce(this.parent))},e.prototype.updateRenameData=function(){var e=t.select("."+gi+"."+Ii,this.element),i=this.getItemObject(e);pe(this.parent,i)},e.prototype.getVisitedItem=function(){var e=this.parent.selectedItems[this.parent.selectedItems.length-1],t=this.getIndexes([e],this.parent.hasId);return this.itemList[t[0]]},e.prototype.getFocusedItem=function(){return t.select("."+gi+"."+wi,this.element)},e.prototype.getActiveItem=function(){return t.select("."+gi+"."+Ii,this.element)},e.prototype.getFirstItem=function(){return this.itemList[0]},e.prototype.getLastItem=function(){return this.itemList[this.itemList.length-1]},e.prototype.navigateItem=function(e){this.setFocus(e)},e.prototype.navigateDown=function(e,t){var i=this.getNextItem(e,t,this.perRow);this.setFocus(i)},e.prototype.navigateRight=function(e,t){var i=this.getNextItem(e,t);this.setFocus(i)},e.prototype.getNextItem=function(e,i,n){if(t.isNullOrUndefined(e))return this.getFocusedItem()||this.getActiveItem()||this.getFirstItem();var s,a=this.itemList.indexOf(e);do{if(a=i?n?a+n:a+1:n?a-n:a-1,s=this.itemList[a],this.parent.enableVirtualization&&t.isNullOrUndefined(s)){var r=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-bottom"),10),o=this.itemList[0].getBoundingClientRect().height+r;this.element.firstElementChild.scrollTo(this.element.firstElementChild.scrollTop,this.element.firstElementChild.scrollTop+o)}if(t.isNullOrUndefined(s))return e}while(!t.isVisible(s));return s},e.prototype.setFocus=function(e){t.isNullOrUndefined(e)||!0!==this.triggerSelection("select",e).cancel&&(this.startItem=e,this.clearSelect(),this.addActive(e),this.addFocus(e),this.parent.notify(bn,{}),this.triggerSelect("select",e))},e.prototype.spaceKey=function(e){t.isNullOrUndefined(e)||e.classList.contains(Ii)||!0!==this.triggerSelection("select",e).cancel&&(this.addActive(e),this.parent.notify(bn,{}),this.triggerSelect("select",e))},e.prototype.ctrlAKey=function(e,i){if(this.parent.allowMultiSelection&&!t.isNullOrUndefined(e)){this.startItem=e;var n={ctrlKey:!0,shiftKey:!0},s=this.element.querySelector(".e-list-parent"),a=s.scrollTop,r=this.getFocusedItem();this.doSelection(i,n),s.scrollTop=a,t.isNullOrUndefined(r)||this.addFocus(r)}},e.prototype.csEndKey=function(e,i){this.parent.allowMultiSelection?t.isNullOrUndefined(e)||("ctrlEnd"===i.action?this.addFocus(e):this.doSelection(e,i)):this.navigateItem(e)},e.prototype.csHomeKey=function(e,i){this.parent.allowMultiSelection?t.isNullOrUndefined(e)||("ctrlHome"===i.action?this.addFocus(e):this.doSelection(e,i)):this.navigateItem(e)},e.prototype.csDownKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!0,this.perRow);t.isNullOrUndefined(n)||("ctrlDown"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateDown(e,!0)},e.prototype.csLeftKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!1);t.isNullOrUndefined(n)||("ctrlLeft"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateRight(e,!1)},e.prototype.csRightKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!0);t.isNullOrUndefined(n)||("ctrlRight"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateRight(e,!0)},e.prototype.csUpKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!1,this.perRow);t.isNullOrUndefined(n)||("ctrlUp"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateDown(e,!1)},e.prototype.addActive=function(e){t.isNullOrUndefined(e)||(e.classList.contains(Ii)||(this.parent.selectedItems.push(this.getDataName(e)),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),t.addClass([e],[Ii]),e.setAttribute("aria-selected","true"),this.checkState(e,!0)),this.parent.visitedItem=e)},e.prototype.removeActive=function(e){if(!t.isNullOrUndefined(e)){t.removeClass([e],[Ii]),this.parent.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),this.checkState(e,!1);var i=this.parent.selectedItems.indexOf(this.getDataName(e));i>-1&&(this.parent.selectedItems.splice(i,1),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)),this.parent.visitedItem=null}},e.prototype.getDataName=function(e){var t=this.getItemObject(e);return de(this.parent,t)},e.prototype.addFocus=function(e){this.element.setAttribute("tabindex","-1");var i=this.getFocusedItem();i&&(i.removeAttribute("tabindex"),t.removeClass([i],[wi])),t.addClass([e],[wi]),e.setAttribute("tabindex","0"),e.focus()},e.prototype.checkState=function(e,i){if(this.parent.showItemCheckBoxes){var n=t.select(".e-frame",e);t.isNullOrUndefined(n)||(i?n.classList.contains(Ci)||(t.addClass([n],Ci),t.closest(n,"."+Si).setAttribute("aria-checked","true")):n.classList.contains(Ci)&&(t.removeClass([n],Ci),t.closest(n,"."+Si).setAttribute("aria-checked","false")))}},e.prototype.clearSelect=function(){var e=Array.prototype.slice.call(t.selectAll("."+Ii,this.listElements));if(0!==e.length){if(!0!==this.triggerSelection("unselect",e[0]).cancel)for(var i=0,n=e.length;i<n;i++)this.removeActive(e[i]);this.triggerSelect("unselect",e[0])}},e.prototype.resizeHandler=function(){this.getItemCount(),t.isNullOrUndefined(this.listObj)||this.adjustHeight()},e.prototype.splitterResizeHandler=function(){this.getItemCount()},e.prototype.getItemCount=function(){var e=1;if(this.itemList)for(var t=0,i=this.itemList.length-1;t<i&&this.itemList[t].getBoundingClientRect().top===this.itemList[t+1].getBoundingClientRect().top;t++)e++;this.perRow=e},e.prototype.triggerSelection=function(e,t){var i=[];if(this.isSelectAllCalled)for(var n=0,s=this.itemList.length;n<s;n++)i[n]=this.getItemObject(this.itemList[n]);else i[0]=this.getItemObject(t);var a={action:e,fileDetails:i.length>1?i:i[0],isInteracted:this.isInteraction,cancel:!1,target:this.isSelectAllCalled?null:t};return this.parent.trigger("fileSelection",a),this.isInteraction=!0,a},e.prototype.triggerSelect=function(e,t){var i=[];if(this.isSelectAllCalled){for(var n=0,s=this.itemList.length;n<s;n++)i[n]=this.getItemObject(this.itemList[n]);this.isSelectAllCalled=!1}else i[0]=this.getItemObject(t);this.parent.visitedData=i.length>1?i[i.length-1]:i[0];var a={action:e,fileDetails:i.length>1?i:i[0],isInteracted:this.isInteracted};this.parent.trigger("fileSelect",a),this.isInteracted=!0},e.prototype.selectItems=function(e){for(var t=this.getIndexes(e,this.parent.hasId),i=0,n=t.length;i<n;i++){var s={ctrlKey:!0,shiftKey:!1};this.doSelection(this.itemList[t[i]],s)}},e.prototype.getIndexes=function(e,i){for(var n=[],s=i?"id":"name",a=0,r=this.items.length;a<r;a++)-1!==e.indexOf(t.getValue(s,this.items[a]))&&n.push(a);return n},e.prototype.getItemObject=function(e){var t=this.itemList.indexOf(e);return this.items[t]},e.prototype.addSelection=function(e){var i=[];if(this.parent.hasId)i=new s.DataManager(this.items).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var n=new s.DataManager(this.items).executeLocal((new s.Query).where("name","equal",t.getValue("name",e),!1));n.length>0&&(i=new s.DataManager(n).executeLocal((new s.Query).where("filterPath","equal",this.parent.filterPath,!1)))}if(i.length>0){var a=this.items.indexOf(i[0]),r={ctrlKey:!0,shiftKey:!1};this.doSelection(this.itemList[a],r)}},e.prototype.updateSelectedData=function(){for(var e=[],i=t.selectAll("."+gi+"."+Ii,this.element),n=0;n<i.length;n++)e[n]=this.getItemObject(i[n]);this.parent.itemData=e},e.prototype.onMethodCall=function(e){if("LargeIcons"===this.parent.view)switch(t.getValue("action",e)){case"deleteFiles":this.deleteFiles(t.getValue("ids",e));break;case"downloadFiles":this.downloadFiles(t.getValue("ids",e));break;case"openFile":this.openFile(t.getValue("id",e));break;case"renameFile":this.isInteraction=!1,this.isInteracted=!1,this.renameFile(t.getValue("id",e),t.getValue("newName",e));break;case"createFolder":this.isInteraction=!1,this.isInteracted=!1;break;case"clearSelection":this.isInteraction=!1,this.isInteracted=!1,this.onClearAllInit();break;case"selectAll":this.isInteraction=!1,this.isInteracted=!1,this.onSelectAllInit()}},e.prototype.getItemsIndex=function(e){var i=[],n=!(""===this.parent.breadcrumbbarModule.searchObj.element.value&&!this.parent.isFiltered),s=this.parent.hasId?"id":"name";if(this.parent.hasId||!n)for(var a=0,r=this.items.length;a<r;a++)-1!==e.indexOf(t.getValue(s,this.items[a]))&&i.push(a);else for(var a=0,r=this.items.length;a<r;a++){var o=t.getValue("filterPath",this.items[a])+t.getValue("name",this.items[a]);-1===e.indexOf(o)&&-1===e.indexOf(t.getValue(s,this.items[a]))||i.push(a)}return i},e.prototype.deleteFiles=function(e){if(this.parent.activeModule="largeiconsview",t.isNullOrUndefined(e))return void this.performDelete();var i=this.getItemsIndex(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=this.items[i[a]],s[a]=de(this.parent,n[a]);fe(this.parent,n,s)}},e.prototype.downloadFiles=function(e){if(t.isNullOrUndefined(e))return void this.doDownload();var i=this.getItemsIndex(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=this.items[i[a]],s[a]=de(this.parent,n[a]);ge(this.parent,n,s)}},e.prototype.openFile=function(e){if(!t.isNullOrUndefined(e)){var i=this.getItemsIndex([e]);i.length>0&&this.doOpenAction(this.itemList[i[0]])}},e.prototype.renameFile=function(e,i){if(this.parent.activeModule="largeiconsview",t.isNullOrUndefined(e))return void this.performRename();var n=this.getItemsIndex([e]);n.length>0&&(pe(this.parent,this.items[n[0]]),t.isNullOrUndefined(i)?ce(this.parent):ye(this.parent.itemData[0])?Pe(this.parent,this.parent.path,i):me(this.parent,this.parent.itemData[0],Hn))},e}(),Kn=function(){function e(e){this.addressPath="",this.addressBarLink="",this.searchTimer=null,this.searchWrapWidth=null,this.parent=e,this.keyConfigs={enter:"enter"},this.render()}return e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var i=0,n=Object.keys(e.newProp);i<n.length;i++){var s=n[i],a=e.newProp.searchSettings;switch(s){case"searchSettings":t.isNullOrUndefined(a.allowSearchOnTyping)||this.searchEventBind(a.allowSearchOnTyping),!this.parent.breadcrumbbarModule.searchObj.value||""===this.parent.breadcrumbbarModule.searchObj.value||!t.isNullOrUndefined(a.allowSearchOnTyping)&&t.isNullOrUndefined(a.filterType)&&t.isNullOrUndefined(a.ignoreCase)||D(this.parent,this.parent.breadcrumbbarModule.searchObj.value,!1)}}},e.prototype.render=function(){this.addEventListener()},e.prototype.onPathChange=function(){var e=this.parent.pathNames,i=this.parent.path.split("/"),n=this.parent.createElement("ul",{className:"e-addressbar-ul"}),s=null,a=e.length;if(e.length>0){for(var r="",o=0;o<a;o++){var l=null;s=this.parent.createElement("li",{className:"e-address-list-item"});for(var h=0;h<=o;h++)r=r+i[h]+"/";if(s.setAttribute("data-utext",r),0!==o){var d=t.createElement("span",{className:"e-icons"});s.appendChild(d)}a-o!=1?(l=t.createElement("a",{className:mi}),s.setAttribute("tabindex","0")):l=t.createElement("span",{className:mi}),r="",l.innerText=e[o],s.appendChild(l),n.appendChild(s)}var p=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul");t.isNullOrUndefined(p)||(t.isNullOrUndefined(this.subMenuObj)||this.subMenuObj.destroy(),t.remove(p));var c=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");c?this.parent.breadCrumbBarNavigation.appendChild(n):this.parent.breadCrumbBarNavigation.insertBefore(n,c),this.updateBreadCrumbBar(n)}},e.prototype.updateBreadCrumbBar=function(e){for(var i=e.querySelectorAll("li"),n=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul"),s=window.getComputedStyle(n,null),r=parseFloat(s.getPropertyValue("padding-right")),o=parseFloat(s.getPropertyValue("padding-left")),h=n.offsetWidth-r-o,d=this.parent.createElement("ul",{className:"e-addressbar-ul"}),p=0,c=[],u=0;u<i.length;u++){var f=i[u].clientWidth;c.push(f),p+=f}t.isNullOrUndefined(n)||t.remove(n);var g=this.parent.createElement("div");g.setAttribute("class","e-search-wrap");var m=this.parent.element.id+"_search",b=t.createElement("input",{id:m,attrs:{autocomplete:"off","aria-label":H(this.parent,"Search")}});g.appendChild(b);var v=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap .e-input");if(t.isNullOrUndefined(v)){this.parent.breadCrumbBarNavigation.appendChild(g);var y=t.createElement("span",{className:"e-icons e-fe-search"});t.EventHandler.add(y,"click",this.onShowInput,this),b.parentElement.insertBefore(y,b),this.searchObj=new a.TextBox({value:"",showClearButton:!0,placeholder:H(this.parent,"Search"),focus:this.onFocus.bind(this),blur:this.onBlur.bind(this)}),this.searchObj.appendTo("#"+this.parent.element.id+"_search"),this.searchEventBind(this.parent.searchSettings.allowSearchOnTyping);var I=this.searchObj.element.nextElementSibling;t.EventHandler.add(I,"mousedown",this.searchChangeHandler.bind(this),this),t.EventHandler.add(this.searchObj.element,"keyup",this.onKeyUp.bind(this),this)}var O=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");if(h-=this.searchWrapWidth?this.searchWrapWidth:O.offsetWidth,p>h){for(u=i.length;u--;){var w=h-c[u];if(!(w>40)){for(var D=[],C=0;C<=u;C++){var S=i[C];D.push({text:S.innerText,utext:S.getAttribute("data-utext")})}var j=this.parent.createElement("li",{className:"e-breadcrumb-menu"}),x={className:"e-breadcrumb-submenu"},P=this.parent.createElement("button",x);j.appendChild(P),d.insertBefore(j,d.querySelector("li")),this.subMenuObj=new l.DropDownButton({items:D,cssClass:"e-caret-hide e-submenu",iconCss:"e-icons e-fe-breadcrumb",iconPosition:"Top",enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.addSubMenuAttributes.bind(this),select:this.subMenuSelectOperations.bind(this)}),this.subMenuObj.isStringTemplate=!0,this.subMenuObj.appendTo(P);break}d.insertBefore(i[u],d.querySelector("li")),h=w}this.parent.breadCrumbBarNavigation.insertBefore(d,O)}else this.parent.breadCrumbBarNavigation.insertBefore(e,O)},e.prototype.onFocus=function(){t.closest(this.searchObj.element,".e-search-wrap").classList.add("e-focus")},e.prototype.onKeyUp=function(){this.parent.notify(kn,{args:this.parent})},e.prototype.onBlur=function(){t.closest(this.searchObj.element,".e-search-wrap").classList.remove("e-focus")},e.prototype.subMenuSelectOperations=function(e){var t={target:e.element};this.addressPathClickHandler(t)},e.prototype.addSubMenuAttributes=function(e){e.element.setAttribute("data-utext",t.getValue("utext",e.item));var i=this.parent.createElement("a",{className:"e-list-text"});e.element.appendChild(i)},e.prototype.searchEventBind=function(e){e?(this.searchObj.input=this.searchChangeHandler.bind(this),this.searchObj.change=null):(this.searchObj.change=this.searchChangeHandler.bind(this),this.searchObj.input=null)},e.prototype.searchChangeHandler=function(e){var i=this;t.isNullOrUndefined(e.value)||(this.parent.isFiltered=!1,this.parent.searchSettings.allowSearchOnTyping?(window.clearTimeout(this.searchTimer),this.searchTimer=window.setTimeout(function(){D(i.parent,e.value,!1)},300)):D(this.parent,e.value,!1))},e.prototype.addressPathClickHandler=function(e){var i=e.target;if("LI"===i.nodeName||"A"===i.nodeName){var n="LI"===i.nodeName?i.children[0]:i;if(!t.isNullOrUndefined(n)){this.parent.isFiltered=!1;var s=this.updatePath(n);this.parent.itemData=[t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)],this.triggerFileOpen(this.parent.itemData[0]),Se(this.parent,ln,s);var a=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify("update-tree-selection",{module:"treeview",selectedNode:a})}}},e.prototype.triggerFileOpen=function(e){var t={cancel:!1,fileDetails:e,module:"BreadCrumbBar"};delete t.cancel,this.parent.trigger("fileOpen",t)},e.prototype.onShowInput=function(){if(this.parent.isMobile)if(this.parent.element.classList.contains(ui))t.removeClass([this.parent.element],ui),this.searchWrapWidth=null;else{var e=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");this.searchWrapWidth=e.offsetWidth,t.addClass([this.parent.element],ui),this.searchObj.element.focus()}},e.prototype.updatePath=function(e){var i=t.closest(e,"li").getAttribute("data-utext");this.addressBarLink=i;var n=this.addressBarLink.split("/"),s=this.parent.pathId,a=this.parent.pathNames;this.parent.pathId=[],this.parent.pathNames=[];for(var r="",o=0,l=n.length-1;o<l;o++)this.parent.pathId.push(s[o]),this.parent.pathNames.push(a[o]),r+=n[o]+"/";return this.parent.setProperties({path:r},!0),r},e.prototype.onUpdatePath=function(){this.onPathChange(),this.removeSearchValue()},e.prototype.onCreateEnd=function(){this.onPathChange()},e.prototype.onRenameEnd=function(){this.onPathChange()},e.prototype.onDeleteEnd=function(){this.onUpdatePath()},e.prototype.removeSearchValue=function(){this.parent.isFiltered=!1,!this.searchObj||""===this.searchObj.value&&""===this.searchObj.element.value||(this.searchObj.value="",this.searchObj.element.value="",this.searchObj.dataBind())},e.prototype.onResize=function(){this.onPathChange()},e.prototype.onPasteEnd=function(){this.onPathChange()},e.prototype.addEventListener=function(){this.keyboardModule=new t.KeyboardEvents(this.parent.breadCrumbBarNavigation,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.parent.on($i,this.onPropertyChanged,this),t.EventHandler.add(this.parent.breadCrumbBarNavigation,"click",this.addressPathClickHandler,this),this.parent.on(hn,this.destroy,this),this.parent.on(ln,this.onUpdatePath,this),this.parent.on(en,this.onUpdatePath,this),this.parent.on(rn,this.onUpdatePath,this),this.parent.on(mn,this.onUpdatePath,this),this.parent.on(tn,this.onCreateEnd,this),this.parent.on(Sn,this.onRenameEnd,this),this.parent.on(an,this.onDeleteEnd,this),this.parent.on("splitter-resize",this.onResize,this),this.parent.on(En,this.onPasteEnd,this),this.parent.on(on,this.onResize,this),this.parent.on(Tn,this.onSearchTextChange,this),this.parent.on(Ln,this.onDropInit,this),this.parent.on("layout-refresh",this.onResize,this),this.parent.on(Fn,this.onPathChange,this)},e.prototype.keyActionHandler=function(e){switch(e.action){case"enter":this.addressPathClickHandler(e)}},e.prototype.removeEventListener=function(){this.keyboardModule.destroy(),this.parent.off(ln,this.onUpdatePath),this.parent.off(en,this.onUpdatePath),this.parent.off(rn,this.onUpdatePath),this.parent.off(mn,this.onUpdatePath),this.parent.off(En,this.onPasteEnd),this.parent.off(tn,this.onCreateEnd),this.parent.off(Sn,this.onRenameEnd),this.parent.off(an,this.onDeleteEnd),this.parent.off("splitter-resize",this.onResize),this.parent.off(on,this.onResize),this.parent.off(Tn,this.onSearchTextChange),this.parent.off(Ln,this.onDropInit),this.parent.off("layout-refresh",this.onResize),this.parent.off(Fn,this.onPathChange)},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=e.target.closest("li");this.parent.dropPath=this.updatePath(i.children[0]),this.parent.dropData=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent),this.triggerFileOpen(this.parent.dropData);var n=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify("update-tree-selection",{module:"treeview",selectedNode:n})}},e.prototype.getModuleName=function(){return"breadcrumbbar"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),t.isNullOrUndefined(this.subMenuObj)||this.subMenuObj.destroy(),t.isNullOrUndefined(this.searchObj)||this.searchObj.destroy())},e.prototype.onSearchTextChange=function(e){this.searchObj.element.placeholder=null!=this.parent.searchSettings.placeholder?this.parent.searchSettings.placeholder:H(this.parent,"Search")+" "+H(this.parent,e.cwd.name.toString())},e}(),Gn=function(){function e(e){this.isMenuItemClicked=!1,this.currentItems=[],this.currentElement=null,this.disabledItems=[],this.parent=e,this.render()}return e.prototype.render=function(){this.keyConfigs={downarrow:"downarrow",uparrow:"uparrown"},this.contextMenu=new h.ContextMenu({enableRtl:this.parent.enableRtl,locale:this.parent.locale,target:"#"+this.parent.element.id,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.onBeforeItemRender.bind(this),select:this.onSelect.bind(this),beforeOpen:this.onBeforeOpen.bind(this),beforeClose:this.onBeforeClose.bind(this),cssClass:B(this.parent,pi)}),this.contextMenu.isStringTemplate=!0,this.contextMenu.appendTo("#"+this.parent.element.id+"_contextmenu"),this.addEventListener()},e.prototype.onBeforeItemRender=function(e){if(e.item.id===this.getMenuId("largeiconsview")){i=t.createElement("span");(n=e.element).insertBefore(i,"LargeIcons"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",Ki+" "+Hi)}if(e.item.id===this.getMenuId("detailsview")){var i=t.createElement("span"),n=e.element;n.insertBefore(i,"Details"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",Wi+" "+Hi)}},e.prototype.onBeforeClose=function(){if(this.menuTarget=null,!this.isMenuItemClicked&&this.parent.pathId.length>1&&"navigationpane"==this.parent.activeModule){this.parent.pathId.pop();for(var e=[],i=0,n=Object.keys(this.parent.feParent);i<n.length;i++){var s=n[i],a=t.getValue(s,this.parent.feParent);-1!==this.parent.pathNames.indexOf(a.name)&&e.push(a._fm_id)}this.parent.pathId.push(e[e.length-1]),this.parent.navigationpaneModule.treeObj.selectedNodes=[this.parent.pathId[this.parent.pathId.length-1]]}this.isMenuItemClicked=!1},e.prototype.onBeforeOpen=function(e){var i=this;this.disabledItems=[];var n,s,a=!1,r=!1,o=e.event.target;this.menuTarget=this.targetNodeElement=o,this.currentElement=e.element,o.classList.contains("e-spinner-pane")&&(o=this.parent.navigationpaneModule.activeNode.getElementsByClassName("e-fullrow")[0],this.menuTarget=this.targetNodeElement=o),this.targetElement="Details"===this.parent.view?t.closest(o,"tr.e-row"):o,this.parent.enableVirtualization&&(o.classList.contains("e-virtual-bottom")||o.classList.contains("e-virtualtable"))&&(o=o.parentElement.closest("div"));var l=this.getTargetView(o);if(this.updateActiveModule(),o.classList.contains(_i)||t.closest(o,"th")||t.closest(o,"#"+this.parent.element.id+oi)||t.closest(o,"#"+this.parent.element.id+"_toolbar"))e.cancel=!0;else if("LargeIcons"!==this.parent.view&&this.targetElement&&this.targetElement.classList.contains("e-emptyrow"))this.setLayoutItem(o);else if(t.closest(o,"."+xi))this.setLayoutItem(o);else if(!o.classList.contains("e-menu-item")&&!o.classList.contains(Hi)&&!o.classList.contains("e-caret")){if("LargeIcons"!==this.parent.view||t.isNullOrUndefined(t.closest(o,"li"))||t.closest(o,"#"+this.parent.element.id+"_tree"))t.isNullOrUndefined(t.closest(o,"tr.e-row"))?t.closest(o,"#"+this.parent.element.id+"_tree")&&(n=t.closest(o,"li").getAttribute("data-uid"),r=!0):(n=this.targetElement.getAttribute("data-uid"),s=this.parent.detailsviewModule.gridObj.getRowObjectFromUID(n).data,t.isNullOrUndefined(this.targetElement.getAttribute("aria-selected"))&&this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute("data-rowindex"),10)]),a=!0);else{var h={ctrlKey:!0,shiftKey:!0};t.closest(o,"li").classList.contains("e-active")||this.parent.largeiconsviewModule.doSelection(o,h),s=this.parent.visitedData,a=!0}a?!0===t.getValue("isFile",s)?this.setFileItem():this.setFolderItem(!1):r?(this.setFolderItem(!0),n===this.parent.pathId[0]&&this.disabledItems.push("Delete","Rename","Cut","Copy")):"TreeView"===l||"GridView"===l||"LargeIcon"===l?this.setLayoutItem(o):e.cancel=!0}var d=t.select("#"+this.getMenuId("Paste"),this.contextMenu.element);if(e.cancel||this.parent.enablePaste||!d||d.classList.contains("e-disabled")||this.disabledItems.push("Paste"),e.cancel)return void(this.menuTarget=this.currentElement=null);this.contextMenu.dataBind();var p=!1;(o.classList.contains("e-menu-item")||o.classList.contains(Hi)||o.classList.contains("e-caret"))&&(p=!0),this.menuItemData=p?this.menuItemData:this.getMenuItemData();var c={fileDetails:[this.menuItemData],element:e.element,target:o,items:p?e.items:this.contextMenu.items,menuModule:this.contextMenu,cancel:!1,menuType:this.menuType,isSubMenu:p};this.currentItems=c.items,this.parent.trigger("menuOpen",c,function(t){p||(i.contextMenu.dataBind(),i.contextMenu.items=t.items,i.contextMenu.dataBind()),i.enableItems(i.disabledItems,!1,!0),e.cancel=t.cancel,t.cancel&&(i.menuTarget=i.targetNodeElement=i.currentElement=null)})},e.prototype.updateActiveModule=function(){this.parent.activeModule=t.closest(this.menuTarget,"#"+this.parent.element.id+"_tree")?"navigationpane":t.closest(this.menuTarget,"#"+this.parent.element.id+ti)?"detailsview":t.closest(this.menuTarget,"#"+this.parent.element.id+ii)?"largeiconsview":this.parent.activeModule},e.prototype.getTargetView=function(e){return e.classList.contains(_i)?"TreeView":e.classList.contains(Bi)?"GridView":e.classList.contains("e-list-parent")?"LargeIcon":e.classList.contains(fi)?"LargeIcon":""},e.prototype.getItemIndex=function(e){for(var t=this.getMenuId(e),i=0;i<this.currentItems.length;i++)if(this.currentItems[i].id===t||this.currentItems[i].id===e)return i;return-1},e.prototype.disableItem=function(e){0!==e.length&&(this.disabledItems=this.disabledItems.concat(e))},e.prototype.enableItems=function(e,t,i){for(var n=0;n<e.length;n++)1===this.checkValidItem(e[n])?this.contextMenu.enableItems([this.getMenuId(e[n])],t,i):2===this.checkValidItem(e[n])&&this.contextMenu.enableItems([e[n]],t,i)},e.prototype.setFolderItem=function(e){if(this.menuType="folder",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.folder.map(function(e){return e.trim()})),this.contextMenu.dataBind(),e){var i=t.select('[data-uid="'+this.parent.navigationpaneModule.treeObj.selectedNodes[0]+'"]',this.parent.navigationpaneModule.treeObj.element);this.parent.pathNames[this.parent.pathNames.length-1]===i.querySelector(".e-list-text").innerHTML&&"navigationpane"===this.parent.activeModule&&this.disabledItems.push("Open")}else 1!==this.parent.selectedItems.length&&"navigationpane"!==this.parent.activeModule&&this.disabledItems.push("Rename","Paste")},e.prototype.setFileItem=function(){this.menuType="file",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.file.map(function(e){return e.trim()})),this.contextMenu.dataBind(),1!==this.parent.selectedItems.length&&this.disabledItems.push("Rename")},e.prototype.setLayoutItem=function(e){this.menuType="layout",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.layout.map(function(e){return e.trim()})),this.contextMenu.dataBind(),(!this.parent.allowMultiSelection||"LargeIcons"===this.parent.view&&0!==t.closest(e,"#"+this.parent.element.id+ii).getElementsByClassName(xi).length||"Details"===this.parent.view&&0!==t.closest(e,"#"+this.parent.element.id+ti).getElementsByClassName(xi).length)&&this.disabledItems.push("SelectAll"),0===this.parent.selectedNodes.length&&this.disabledItems.push("Paste"),this.contextMenu.dataBind()},e.prototype.checkValidItem=function(e){return t.isNullOrUndefined(t.select("#"+this.getMenuId(e),this.currentElement))?t.isNullOrUndefined(t.select("#"+e,this.currentElement))?-1:2:1},e.prototype.getMenuItemData=function(){if("layout"===this.menuType)return P(this.parent);var e={target:this.menuTarget};return this.parent.notify(wn,e),this.parent.itemData[0]},e.prototype.onSelect=function(e){var i=this;if(!t.isNullOrUndefined(e.item)&&e.item.id){var n,s=e.item.id.substr((this.parent.element.id+"_cm_").length);"refresh"===s||"newfolder"===s||"upload"===s?(n=[P(this.parent)],this.parent.itemData=n):(this.parent.notify("selected-data",{}),n="navigationpane"===this.parent.activeModule&&"open"===s?[this.menuItemData]:this.parent.itemData);var a={cancel:!1,element:e.element,fileDetails:n,item:e.item};this.parent.trigger("menuClick",a,function(a){var r;if(!a.cancel)switch(i.isMenuItemClicked=!0,s){case"cut":E(i.parent);break;case"copy":N(i.parent);break;case"paste":"folder"===i.menuType&&("largeiconsview"===i.parent.activeModule||"detailsview"===i.parent.activeModule)?i.parent.folderPath=k(i.parent,i.menuItemData,i.parent.path):i.parent.folderPath="",G(i.parent);break;case"delete":for(var o=0;o<n.length;o++)if(!ye(n[o]))return void me(i.parent,n[o],Hn);Ke(i.parent,"Delete");break;case"download":for(var l=0;l<n.length;l++)if(!we(n[l]))return void me(i.parent,n[l],qn);"navigationpane"===i.parent.activeModule?i.parent.notify("download-init",{}):i.parent.selectedItems.length>0&&We(i.parent,i.parent.path,i.parent.selectedItems);break;case"rename":ye(n[0])?(i.parent.notify(Dn,{}),Ke(i.parent,"Rename")):me(i.parent,n[0],Hn);break;case"selectall":i.parent.notify("select-all-init",{});break;case"refresh":j(i.parent);break;case"open":i.parent.visitedItem&&"navigationpane"!==i.parent.activeModule?i.parent.notify(gn,{target:i.parent.visitedItem}):"navigationpane"===i.parent.activeModule&&(i.parent.visitedItem&&i.parent.notify(gn,{target:i.parent.visitedItem}),i.parent.navigationpaneModule.openFileOnContextMenuClick(t.closest(i.targetNodeElement,"li")));break;case"details":i.parent.notify(On,{}),r=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(r=[],i.parent.navigationpaneModule.openFileOnContextMenuClick(t.closest(i.targetNodeElement,"li"))),Re(i.parent,r,i.parent.path,"details");break;case"newfolder":De(i.parent);break;case"upload":Ce(i.parent);break;case"name":case"size":case"date":case"ascending":case"descending":case"none":z(i.parent,e);break;case"largeiconsview":C(i.parent,"LargeIcons");break;case"detailsview":C(i.parent,"Details")}})}},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++)switch(i[t]){case"cssClass":this.contextMenu.cssClass=B(this.parent,pi)}},e.prototype.addEventListener=function(){this.parent.on(hn,this.destroy,this),this.parent.on($i,this.onPropertyChanged,this),this.keyboardModule=new t.KeyboardEvents(this.contextMenu.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},e.prototype.removeEventListener=function(){this.parent.off(hn,this.destroy),this.parent.off($i,this.onPropertyChanged),this.keyboardModule.destroy()},e.prototype.keyActionHandler=function(e){switch(e.action){case"uparrow":case"downarrow":e.preventDefault()}},e.prototype.getModuleName=function(){return"contextmenu"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.contextMenu.destroy(),this.targetElement=null)},e.prototype.getItemData=function(e){for(var t=[],i=0;i<e.length;i++){var n=void 0,s=this.getMenuId(e[i]),a=H(this.parent,e[i]);switch(e[i]){case"|":n={separator:!0};break;case"Open":n={id:s,text:a,iconCss:"e-icons e-fe-open"};break;case"Upload":n={id:s,text:a,iconCss:"e-icons e-fe-upload"};break;case"Cut":n={id:s,text:a,iconCss:qi};break;case"Copy":n={id:s,text:a,iconCss:"e-icons e-fe-copy"};break;case"Paste":n={id:s,text:a,iconCss:"e-icons e-fe-paste"};break;case"Delete":n={id:s,text:a,iconCss:"e-icons e-fe-delete"};break;case"Rename":n={id:s,text:a,iconCss:"e-icons e-fe-rename"};break;case"NewFolder":n={id:s,text:a,iconCss:"e-icons e-fe-newfolder"};break;case"Details":n={id:s,text:a,iconCss:"e-icons e-fe-details"};break;case"SortBy":n={id:s,text:a,iconCss:"e-icons e-fe-sort",items:[{id:this.getMenuId("Name"),text:H(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?vi:null},{id:this.getMenuId("Size"),text:H(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?vi:null},{id:this.getMenuId("Date"),text:H(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?vi:null},{separator:!0},{id:this.getMenuId("Ascending"),text:H(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?bi:null},{id:this.getMenuId("Descending"),text:H(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?bi:null},{id:this.getMenuId("None"),text:H(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?bi:null}]};break;case"View":n={id:s,text:a,iconCss:"Details"===this.parent.view?Wi:Ki,items:[{id:this.getMenuId("largeiconsview"),text:H(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?null:bi},{id:this.getMenuId("detailsview"),text:H(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?bi:null}]};break;case"Refresh":n={id:s,text:a,iconCss:"e-icons e-fe-refresh"};break;case"SelectAll":n={id:s,text:a,iconCss:"e-icons e-fe-select"};break;case"Download":n={id:s,text:a,iconCss:"e-icons e-fe-download"};break;default:n={id:s,text:a}}t.push(n)}return t},e.prototype.getMenuId=function(e){return this.parent.element.id+"_cm_"+e.toLowerCase()},e}(),Yn={NewFolder:"New folder",Upload:"Upload",Delete:"Delete",Rename:"Rename",Download:"Download",Cut:"Cut",Copy:"Copy",Paste:"Paste",SortBy:"Sort by",Refresh:"Refresh","Item-Selection":"item selected","Items-Selection":"items selected",View:"View",Details:"Details",SelectAll:"Select all",Open:"Open","Tooltip-NewFolder":"New folder","Tooltip-Upload":"Upload","Tooltip-Delete":"Delete","Tooltip-Rename":"Rename","Tooltip-Download":"Download","Tooltip-Cut":"Cut","Tooltip-Copy":"Copy","Tooltip-Paste":"Paste","Tooltip-SortBy":"Sort by","Tooltip-Refresh":"Refresh","Tooltip-Selection":"Clear selection","Tooltip-View":"View","Tooltip-Details":"Details","Tooltip-SelectAll":"Select all",Name:"Name",Size:"Size",DateModified:"Modified",DateCreated:"Date created",Path:"Path",Modified:"Modified",Created:"Created",Location:"Location",Type:"Type",Permission:"Permission",Ascending:"Ascending",Descending:"Descending",None:"None","View-LargeIcons":"Large icons","View-Details":"Details",Search:"Search","Button-Ok":"OK","Button-Cancel":"Cancel","Button-Yes":"Yes","Button-No":"No","Button-Create":"Create","Button-Save":"Save","Header-NewFolder":"Folder","Content-NewFolder":"Enter your folder name","Header-Rename":"Rename","Content-Rename":"Enter your new name","Header-Rename-Confirmation":"Rename Confirmation","Content-Rename-Confirmation":"If you change a file name extension, the file might become unstable. Are you sure you want to change it?","Header-Delete":"Delete File","Content-Delete":"Are you sure you want to delete this file?","Header-Folder-Delete":"Delete Folder","Content-Folder-Delete":"Are you sure you want to delete this folder?","Header-Multiple-Delete":"Delete Multiple Items","Content-Multiple-Delete":"Are you sure you want to delete these {0} items?","Header-Duplicate":"File/Folder exists","Content-Duplicate":"{0} already exists. Do you want to rename and paste?","Header-Upload":"Upload Files",Error:"Error","Validation-Empty":"The file or folder name cannot be empty.","Validation-Invalid":'The file or folder name {0} contains invalid characters. Please use a different name. Valid file or folder names cannot end with a dot or space, and cannot contain any of the following characters: \\/:*?"<>|',"Validation-NewFolder-Exists":"A file or folder with the name {0} already exists.","Validation-Rename-Exists":"Cannot rename {0} to {1}: destination already exists.","Folder-Empty":"This folder is empty","File-Upload":"Drag files here to upload","Search-Empty":"No results found","Search-Key":"Try with different keywords","Filter-Empty":"No results found","Filter-Key":"Try with different filter","Sub-Folder-Error":"The destination folder is the subfolder of the source folder.","Same-Folder-Error":"The destination folder is the same as the source folder.","Access-Denied":"Access Denied","Access-Details":'You don"t have permission to access this folder.',"Header-Retry":"File Already Exists","Content-Retry":"A file with this name already exists in this folder. What would you like to do?","Button-Keep-Both":"Keep both","Button-Replace":"Replace","Button-Skip":"Skip","ApplyAll-Label":"Do this for all current items",KB:"KB","Access-Message":"{0} is not accessible. You need permission to perform the {1} action.","Network-Error":"NetworkError: Failed to send on XMLHTTPRequest: Failed to load","Server-Error":"ServerError: Invalid response from"},Jn=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 n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Qn=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Xn=function(e){function s(t,i){var n=e.call(this,t,i)||this;return n.filterData=null,n.selectedNodes=[],n.duplicateItems=[],n.duplicateRecords=[],n.previousPath=[],n.nextPath=[],n.isLayoutChange=!1,n.layoutSelectedItems=[],n.renamedId=null,n.uploadItem=[],n.deleteRecords=[],n.isFile=!1,n.isCut=!1,n.isSearchCut=!1,n.isSearchDrag=!1,n.isPasteError=!1,n.folderPath="",n.isSameAction=!1,n.isFiltered=!1,n.isSortByClicked=!1,n.enablePaste=!1,n.persistData=!1,n.retryArgs=[],n.isOpened=!1,n.isRetryOpened=!1,n.isPathDrag=!1,n.searchedItems=[],n.retryFiles=[],n.isApplySame=!1,n.dragData=[],n.dragNodes=[],n.dragPath="",n.dropPath="",n.isDragDrop=!1,n.treeExpandTimer=null,n.dragCursorPosition={left:44,top:18},n.isDropEnd=!1,n.dragCount=0,n.droppedObjects=[],n.uploadingCount=0,n.uploadedCount=0,n.isMac=!1,r.Inject(Kn,Wn,Gn),n}Jn(s,e),r=s,s.prototype.getModuleName=function(){return"filemanager"},s.prototype.preRender=function(){(t.isNullOrUndefined(this.element.id)||""===this.element.id)&&this.element.setAttribute("id",t.getUniqueID("filemanager")),this.ensurePath(),this.feParent=[],this.feFiles=[],t.setStyleAttribute(this.element,{width:t.formatUnit(this.width),height:t.formatUnit(this.height)}),this.isDevice=t.Browser.isDevice,this.isMobile=this.checkMobile(),this.isMobile&&this.setProperties({navigationPaneSettings:{visible:!1}},!0);var e=t.closest(this.element,".e-bigger");this.isBigger=!!e,this.activeModule="LargeIcons"===this.view?"largeiconsview":"detailsview",n.createSpinner({target:this.element},t.createElement),this.addWrapper(),this.keyConfigs={altN:"alt+n",f5:"f5",ctrlShift1:"ctrl+shift+1",ctrlShift2:"ctrl+shift+2",ctrlU:"ctrl+u"},this.localeObj=new t.L10n(this.getModuleName(),Yn,this.locale)},s.prototype.getPersistData=function(){var e=["view","path","selectedItems"];return this.addOnPersist(e)},s.prototype.requiredModules=function(){var e=[];return e.push({member:"breadcrumbbar",args:[this]}),e.push({member:"largeiconsview",args:[this]}),this.toolbarSettings.visible&&e.push({member:"toolbar",args:[this],name:"Toolbar"}),this.navigationPaneSettings.visible&&e.push({member:"navigationpane",args:[this],name:"NavigationPane"}),this.view&&e.push({member:"detailsview",args:[this],name:"DetailsView"}),this.contextMenuSettings.visible&&!this.isDevice&&e.push({member:"contextmenu",args:[this],name:"ContextMenu"}),this.enableVirtualization&&e.push({member:"virtualization",args:[this],name:"Virtualization"}),e},s.prototype.render=function(){this.initialize();var e=t.isNullOrUndefined(this.selectedItems)?[]:this.allowMultiSelection?this.selectedItems:this.selectedItems.slice(this.selectedItems.length-1);this.setProperties({selectedItems:e},!0),this.fileView=this.view,this.isMac=navigator.platform.toUpperCase().indexOf("MAC")>=0,this.setRtl(this.enableRtl),this.addEventListeners(),Se(this,this.path!==this.originalPath?Zi:en,this.path),this.adjustHeight(),t.isNullOrUndefined(this.navigationpaneModule)&&(this.splitterObj.collapse(this.enableRtl?1:0),t.select(".e-split-bar",this.element).classList.add(Ji)),this.wireEvents(),this.renderComplete()},s.prototype.ensurePath=function(){var e=this.path;t.isNullOrUndefined(e)&&(e="/"),e.lastIndexOf("/")!==e.length-1&&(e+="/"),this.originalPath=e;var i=e.split("/");this.setProperties({path:i[0]+"/"},!0),this.pathNames=[],this.pathId=["fe_tree"],this.itemData=[]},s.prototype.initialize=function(){this.isMobile&&t.addClass([this.element],"e-fe-mobile"),this.allowMultiSelection&&t.addClass([this.element],"e-fe-cb-select"),this.addCssClass(null,this.cssClass),this.renderFileUpload()},s.prototype.addWrapper=function(){var e=this.createElement("div",{id:this.element.id+"_toolbar"});this.element.appendChild(e);var t=this.createElement("div",{id:this.element.id+ei,className:"e-layout"});this.element.appendChild(t);var n=this.createElement("div",{id:this.element.id+"_navigation",className:"e-navigation"}),s=this.createElement("div",{id:this.element.id+"_tree"});n.appendChild(s);var a=this.createElement("div",{id:this.element.id+ri,className:"e-layout-content"});this.breadCrumbBarNavigation=this.createElement("div",{id:this.element.id+oi,className:"e-address"}),a.appendChild(this.breadCrumbBarNavigation);var r=this.createElement("div",{id:this.element.id+ti});a.appendChild(r);var o=this.createElement("div",{id:this.element.id+ii,className:fi,attrs:{role:"group"}});a.appendChild(o);var l=this.createElement("span",{className:"e-fe-overlay"});a.appendChild(l);var h;this.enableRtl?(t.appendChild(a),t.appendChild(n),h=[{size:"75%",min:"270px"},{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()}]):(t.appendChild(n),t.appendChild(a),h=[{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()},{size:"75%",min:"270px"}]),this.splitterObj=new i.Splitter({paneSettings:h,width:"100%",enableRtl:!1,enableHtmlSanitizer:this.enableHtmlSanitizer,resizing:this.splitterResize.bind(this)}),this.splitterObj.isStringTemplate=!0,this.splitterObj.appendTo(t);var d=this.createElement("div",{id:this.element.id+ni});this.element.appendChild(d);var p=this.createElement("ul",{id:this.element.id+"_contextmenu"});this.element.appendChild(p);var c=this.createElement("div",{id:this.element.id+si});this.element.appendChild(c);var u=this.createElement("div",{id:this.element.id+ai});this.element.appendChild(u);var f=this.createElement("div",{id:this.element.id+"_upload_dialog"});this.element.appendChild(f)},s.prototype.adjustHeight=function(){var e=t.select("#"+this.element.id+"_toolbar",this.element),i=e?e.offsetHeight:0;this.splitterObj&&(this.splitterObj.height=(this.element.clientHeight-i).toString(),this.splitterObj.dataBind())},s.prototype.splitterResize=function(){this.notify("splitter-resize",{})},s.prototype.splitterAdjust=function(){var e=t.select(".e-split-bar",this.element);this.navigationPaneSettings.visible?(this.splitterObj.expand(this.enableRtl?1:0),e.classList.remove(Ji)):(this.splitterObj.collapse(this.enableRtl?1:0),e.classList.add(Ji))},s.prototype.addCssClass=function(e,i){t.isNullOrUndefined(e)||""===e||t.removeClass([this.element],e.split(" ")),t.isNullOrUndefined(i)||""===i||t.addClass([this.element],i.split(" "))},s.prototype.showSpinner=function(){n.showSpinner(this.element)},s.prototype.hideSpinner=function(){n.hideSpinner(this.element)},s.prototype.onContextMenu=function(e){e.preventDefault()},s.prototype.checkMobile=function(){return/iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile/i.test(t.Browser.userAgent.toLowerCase())&&/mobile/i.test(t.Browser.userAgent.toLowerCase())},s.prototype.renderFileUpload=function(){var e=this.element.id+li,t=this.createElement("input",{id:e,attrs:{name:"uploadFiles",type:"file"}});this.element.appendChild(t),this.uploadDialogObj=new n.Dialog({header:H(this,"Header-Upload"),content:t,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!1,isModal:!0,width:"350px",target:this.popupTarget?this.popupTarget:"#"+this.element.id,cssClass:B(this,this.isMobile?ci:pi),locale:this.locale,allowDragging:!0,position:{X:"center",Y:"center"},enableRtl:this.enableRtl,enableHtmlSanitizer:this.enableHtmlSanitizer,open:this.onOpen.bind(this),close:this.onClose.bind(this),beforeOpen:this.onBeforeOpen.bind(this),beforeClose:this.onBeforeClose.bind(this)}),this.uploadDialogObj.appendTo("#"+this.element.id+"_upload_dialog"),this.renderUploadBox()},s.prototype.renderUploadBox=function(){var e=this.ajaxSettings.uploadUrl?this.ajaxSettings.uploadUrl:this.ajaxSettings.url;this.uploadObj=new a.Uploader({dropArea:t.select("#"+this.element.id+ri,this.element),asyncSettings:{saveUrl:e,removeUrl:e},locale:this.locale,enableRtl:this.enableRtl,uploading:this.onUploading.bind(this),removing:this.onRemoving.bind(this),canceling:this.onCancel.bind(this),clearing:this.onClearing.bind(this),selected:this.onSelected.bind(this),success:this.onUploadSuccess.bind(this),failure:this.onUploadFailure.bind(this),autoUpload:this.uploadSettings.autoUpload,minFileSize:this.uploadSettings.minFileSize,maxFileSize:this.uploadSettings.maxFileSize,allowedExtensions:this.uploadSettings.allowedExtensions,directoryUpload:this.uploadSettings.directoryUpload,fileListRendering:this.onFileListRender.bind(this)}),this.uploadObj.appendTo("#"+this.element.id+li)},s.prototype.onFileListRender=function(e){this.trigger("uploadListCreate",e)},s.prototype.updateUploader=function(){this.uploadObj.autoUpload=this.uploadSettings.autoUpload,this.uploadObj.minFileSize=this.uploadSettings.minFileSize,this.uploadObj.maxFileSize=this.uploadSettings.maxFileSize,this.uploadObj.allowedExtensions=this.uploadSettings.allowedExtensions,this.uploadObj.directoryUpload=this.uploadSettings.directoryUpload,this.uploadObj.dataBind()},s.prototype.onBeforeOpen=function(e){var t={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupOpen",t,function(t){e.cancel=t.cancel})},s.prototype.onBeforeClose=function(e){var t={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupClose",t,function(t){e.cancel=t.cancel})},s.prototype.onOpen=function(){this.isOpened=!0,this.uploadDialogObj.element.focus();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};this.trigger("popupOpen",e)},s.prototype.onClose=function(){this.isOpened=!1,this.uploadObj.clearAll();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};this.trigger("popupClose",e)},s.prototype.onUploading=function(e){var i="save";if(0!==this.retryArgs.length)for(var n=0;n<this.retryArgs.length;n++)e.fileData.name===this.retryArgs[n].file.name&&(i=this.retryArgs[n].action,this.retryArgs.splice(n,1),n=this.retryArgs.length);var s=JSON.stringify(t.getValue(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{action:i},{data:s},{filename:e.fileData.name}];var a={url:this.ajaxSettings.uploadUrl?this.ajaxSettings.uploadUrl:this.ajaxSettings.url,type:"POST",mode:!0,dataType:null,contentType:null,data:JSON.stringify(e.customFormData),onSuccess:null,onFailure:null,beforeSend:null};this.uploadEventArgs={action:"Upload",ajaxSettings:a,cancel:!1},this.trigger("beforeSend",this.uploadEventArgs,function(i){e.customFormData=JSON.parse(t.getValue("data",i.ajaxSettings)),e.cancel=i.cancel;var n={cancel:!1,httpRequest:e.currentRequest};"function"==typeof t.getValue("beforeSend",i.ajaxSettings)&&(t.getValue("beforeSend",i.ajaxSettings)(n),t.getValue("cancel",n)&&(e.cancel=t.getValue("cancel",n)))})},s.prototype.onRemoving=function(){this.onFileUploadSuccess({count:1}),1===this.uploadObj.getFilesData().length&&this.uploadDialogObj.hide()},s.prototype.onCancel=function(e){var i=JSON.stringify(t.getValue(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{action:"remove"},{data:i}]},s.prototype.onClearing=function(){this.isOpened&&this.uploadDialogObj.hide()},s.prototype.onSelected=function(e){if(0!==e.filesData.length){this.uploadingCount=e.filesData.length,this.uploadedCount=0;var t=P(this);if(!Oe(t))return e.cancel=!0,void me(this,t,zn);this.uploadDialogObj.show()}},s.prototype.onFileUploadSuccess=function(e){this.uploadedCount=this.uploadedCount+e.count,this.uploadSettings.autoClose&&this.uploadingCount===this.uploadedCount&&this.uploadDialogObj.hide()},s.prototype.onUploadSuccess=function(e){var i={action:"Upload",result:e};this.trigger("success",i),this.itemData=[t.getValue(this.pathId[this.pathId.length-1],this.feParent)],Se(this,ln,this.path),this.onFileUploadSuccess({count:1}),"function"==typeof t.getValue("onSuccess",this.uploadEventArgs.ajaxSettings)&&t.getValue("onSuccess",this.uploadEventArgs.ajaxSettings)()},s.prototype.onUploadFailure=function(e){var i=t.getValue("response",e),n=t.getValue("statusText",i);""!==n&&t.setValue("statusText",n,e);var s={action:"Upload",error:e};this.trigger("failure",s),400===t.getValue("statusCode",i)&&(this.retryFiles.push(t.getValue("file",e)),this.isRetryOpened||Ge(this,"UploadRetry")),"function"==typeof t.getValue("onFailure",this.uploadEventArgs.ajaxSettings)&&t.getValue("onFailure",this.uploadEventArgs.ajaxSettings)()},s.prototype.onInitialEnd=function(){W(this,this.path)},s.prototype.addEventListeners=function(){this.on(dn,this.showSpinner,this),this.on(cn,this.hideSpinner,this),this.on(Zi,this.onInitialEnd,this),this.on(On,this.onDetailsInit,this),this.on(pn,this.onFileUploadSuccess,this),t.EventHandler.add(this.element,"contextmenu",this.onContextMenu,this)},s.prototype.removeEventListeners=function(){this.isDestroyed||(this.off(dn,this.showSpinner),this.off(cn,this.hideSpinner),this.off(Zi,this.onInitialEnd),this.off(On,this.onDetailsInit),this.off(pn,this.onFileUploadSuccess),t.EventHandler.remove(this.element,"contextmenu",this.onContextMenu))},s.prototype.onDetailsInit=function(){t.isNullOrUndefined(this.activeModule)&&(this.itemData=[t.getValue(this.pathId[this.pathId.length-1],this.feParent)])},s.prototype.resizeHandler=function(){this.adjustHeight(),this.notify(on,{})},s.prototype.keyActionHandler=function(e){switch(e.action){case"altN":e.preventDefault(),this.itemData=[P(this)],Ie(this.itemData[0])?Ke(this,"NewFolder"):me(this,this.itemData[0],Bn);break;case"f5":e.preventDefault(),j(this);break;case"ctrlShift1":e.preventDefault(),this.fileView="Details",this.setProperties({view:"Details"},!0),n.showSpinner(this.element),C(this,"Details");break;case"ctrlShift2":e.preventDefault(),this.fileView="LargeIcons",this.setProperties({view:"LargeIcons"},!0),n.showSpinner(this.element),C(this,"LargeIcons");break;case"ctrlU":e.preventDefault(),-1!=this.toolbarSettings.items.indexOf("Upload")&&t.select("#"+this.element.id+li,this.element).click()}},s.prototype.wireEvents=function(){t.EventHandler.add(window,"resize",this.resizeHandler,this),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},s.prototype.unWireEvents=function(){t.EventHandler.remove(window,"resize",this.resizeHandler),this.keyboardModule.destroy()},s.prototype.setPath=function(){this.setProperties({selectedItems:[]},!0),this.ensurePath(),this.notify(vn,{selectedNode:this.pathId[0]}),Se(this,this.path!==this.originalPath?Zi:en,this.path)},s.prototype.onPropertyChanged=function(e,i){for(var n,s=0,a=Object.keys(e);s<a.length;s++)switch(a[s]){case"ajaxSettings":this.ajaxSettingSetModel(e);break;case"allowDragAndDrop":this.allowDragAndDrop=e.allowDragAndDrop,this.notify($i,{module:"common",newProp:e,oldProp:i});break;case"allowMultiSelection":this.allowMultiSelection?t.addClass([this.element],"e-fe-cb-select"):(this.selectedItems.length>1&&this.setProperties({selectedItems:this.selectedItems.slice(this.selectedItems.length-1)},!0),t.removeClass([this.element],"e-fe-cb-select")),this.notify($i,{module:"common",newProp:e,oldProp:i});break;case"cssClass":this.addCssClass(i.cssClass,e.cssClass),this.notify($i,{module:"common",newProp:e,oldProp:i});break;case"detailsViewSettings":this.notify($i,{module:"detailsview",newProp:e,oldProp:i});break;case"enableRtl":this.enableRtl=e.enableRtl,this.refresh();break;case"rootAliasName":this.rootAliasName=e.rootAliasName,this.refresh();break;case"height":n=t.isNullOrUndefined(e.height)?e.height:t.formatUnit(e.height),t.setStyleAttribute(this.element,{height:n}),this.adjustHeight(),this.notify($i,{module:"common",newProp:e,oldProp:i});break;case"locale":t.isNullOrUndefined(e.enableRtl)||this.setProperties({enableRtl:e.enableRtl},!0),this.localeSetModelOption(e);break;case"navigationPaneSettings":this.splitterAdjust(),this.notify($i,{module:"navigationpane",newProp:e,oldProp:i});break;case"path":this.setPath();break;case"searchSettings":t.isNullOrUndefined(e.searchSettings.allowSearchOnTyping)||this.setProperties({searchSettings:{allowSearchOnTyping:e.searchSettings.allowSearchOnTyping}},!0),t.isNullOrUndefined(e.searchSettings.ignoreCase)&&this.setProperties({searchSettings:{ignoreCase:e.searchSettings.ignoreCase}},!0),t.isNullOrUndefined(e.searchSettings.filterType)&&this.setProperties({searchSettings:{filterType:e.searchSettings.filterType}},!0),this.notify($i,{module:"breadcrumbbar",newProp:e,oldProp:i});break;case"selectedItems":"Details"===this.view?this.notify($i,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===this.view&&this.notify($i,{module:"largeiconsview",newProp:e,oldProp:i});break;case"showFileExtension":case"showHiddenItems":this.notify($i,{module:"common",newProp:e,oldProp:i});break;case"showThumbnail":this.notify($i,{module:"largeiconsview",newProp:e,oldProp:i});break;case"toolbarSettings":case"toolbarItems":this.adjustHeight(),this.notify($i,{module:"toolbar",newProp:e,oldProp:i});break;case"uploadSettings":this.updateUploader();break;case"view":"Details"===e.view?this.notify($i,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===e.view&&this.notify($i,{module:"largeiconsview",newProp:e,oldProp:i});break;case"width":t.setStyleAttribute(this.element,{width:t.isNullOrUndefined(e.width)?e.width:t.formatUnit(e.width)}),this.notify($i,{module:"common",newProp:e,oldProp:i});break;case"sortOrder":j(this),this.notify(In,{});break;case"sortBy":j(this),this.notify(In,{}),"Details"===this.view&&this.notify(Mn,{});break;case"popupTarget":this.uploadDialogObj&&(this.uploadDialogObj.target=e.popupTarget),this.dialogObj&&(this.dialogObj.target=e.popupTarget),this.extDialogObj&&(this.extDialogObj.target=e.popupTarget),this.viewerObj&&(this.viewerObj.target=e.popupTarget)}},s.prototype.ajaxSettingSetModel=function(i){t.isNullOrUndefined(i.ajaxSettings.url)||this.setProperties({ajaxSettings:{url:i.ajaxSettings.url}},!0),t.isNullOrUndefined(i.ajaxSettings.uploadUrl)||this.setProperties({ajaxSettings:{uploadUrl:i.ajaxSettings.uploadUrl}},!0),t.isNullOrUndefined(i.ajaxSettings.downloadUrl)||this.setProperties({ajaxSettings:{downloadUrl:i.ajaxSettings.downloadUrl}},!0),t.isNullOrUndefined(i.ajaxSettings.getImageUrl)||this.setProperties({ajaxSettings:{getImageUrl:i.ajaxSettings.getImageUrl}},!0),this.setProperties({path:"/"},!0),this.setProperties({selectedItems:[]},!0),e.prototype.refresh.call(this)},s.prototype.localeSetModelOption=function(t){this.uploadObj.locale=t.locale,e.prototype.refresh.call(this)},s.prototype.destroy=function(){this.isDestroyed||(this.refreshing||this.notify(hn,{}),this.uploadObj.destroy(),this.uploadObj=null,this.uploadDialogObj.destroy(),this.uploadDialogObj=null,this.splitterObj.destroy(),this.splitterObj=null,this.dialogObj&&(this.dialogObj.destroy(),this.dialogObj=null),this.viewerObj&&(this.viewerObj.destroy(),this.viewerObj=null),this.extDialogObj&&(this.extDialogObj.destroy(),this.extDialogObj=null),this.element.removeAttribute("style"),this.element.removeAttribute("tabindex"),this.removeEventListeners(),this.unWireEvents(),this.addCssClass(this.cssClass,null),t.removeClass([this.element],[Yi,"e-fe-mobile","e-fe-cb-select"]),this.element.innerHTML="",this.breadCrumbBarNavigation=null,this.activeElements=null,this.virtualDragElement=null,this.visitedItem=null,e.prototype.destroy.call(this),this.virtualizationModule=null,this.navigationpaneModule=null,this.toolbarModule=null,this.contextmenuModule=null,this.largeiconsviewModule=null,this.detailsviewModule=null,this.breadcrumbbarModule=null)},s.prototype.createFolder=function(e){this.notify(Vn,{action:"createFolder"});var t=[P(this)];this.itemData=t,e?/[\/\\|*?"<>:]/.test(e)?Ke(this,"Error",{files:null,error:{code:"402",message:H(this,"Validation-Invalid").replace("{0}",'"'+e+'"'),fileExists:null}}):Ie(t[0])?je(this,e):me(this,t[0],Bn):De(this)},s.prototype.deleteFiles=function(e){this.notify(Vn,{action:"deleteFiles",ids:e})},s.prototype.disableToolbarItems=function(e){!t.isNullOrUndefined(e)&&this.toolbarModule&&this.toolbarModule.enableItems(e,!1)},s.prototype.downloadFiles=function(e){this.notify(Vn,{action:"downloadFiles",ids:e})},s.prototype.enableToolbarItems=function(e){!t.isNullOrUndefined(e)&&this.toolbarModule&&this.toolbarModule.enableItems(e,!0)},s.prototype.disableMenuItems=function(e){t.isNullOrUndefined(e)||t.isNullOrUndefined(this.contextmenuModule.contextMenu)||this.contextmenuModule.disableItem(e)},s.prototype.getMenuItemIndex=function(e){return this.contextmenuModule?this.contextmenuModule.getItemIndex(e):-1},s.prototype.getToolbarItemIndex=function(e){return this.toolbarModule?this.toolbarModule.getItemIndex(e):-1},s.prototype.filterFiles=function(e){this.filterData=e||null,this.setProperties({selectedItems:[]},!0),this.notify(bn,{}),this.isFiltered=!0,""!==this.breadcrumbbarModule.searchObj.element.value&&(this.breadcrumbbarModule.searchObj.element.value=""),xe(this,"filter-end")},s.prototype.getSelectedFiles=function(){return this.notify("update-selection-data",{}),this.itemData},s.prototype.openFile=function(e){this.notify(Vn,{action:"openFile",id:e})},s.prototype.refreshFiles=function(){j(this)},s.prototype.refreshLayout=function(){this.adjustHeight(),this.notify("layout-refresh",{})},s.prototype.selectAll=function(){this.notify(Vn,{action:"selectAll"})},s.prototype.clearSelection=function(){this.notify(Vn,{action:"clearSelection"})},s.prototype.renameFile=function(e,t){this.notify(Vn,{action:"renameFile",id:e,newName:t})},s.prototype.uploadFiles=function(){var e=[P(this)];this.itemData=e,Ce(this)},s.prototype.setRtl=function(e){e?this.addCssClass(null,Yi):this.addCssClass(Yi,null),this.uploadObj&&(this.uploadDialogObj.enableRtl=e,this.uploadObj.enableRtl=e)};var r;return Qn([t.Complex({},jt)],s.prototype,"ajaxSettings",void 0),Qn([t.Property(!1)],s.prototype,"allowDragAndDrop",void 0),Qn([t.Property(!0)],s.prototype,"allowMultiSelection",void 0),Qn([t.Property(!0)],s.prototype,"showItemCheckBoxes",void 0),Qn([t.Complex({},qt)],s.prototype,"contextMenuSettings",void 0),Qn([t.Property("")],s.prototype,"cssClass",void 0),Qn([t.Complex({},Ut)],s.prototype,"detailsViewSettings",void 0),Qn([t.Property(!0)],s.prototype,"enableHtmlSanitizer",void 0),Qn([t.Property(!1)],s.prototype,"enablePersistence",void 0),Qn([t.Property(!1)],s.prototype,"enableVirtualization",void 0),Qn([t.Property("400px")],s.prototype,"height",void 0),Qn([t.Property("LargeIcons")],s.prototype,"view",void 0),Qn([t.Complex({},Gt)],s.prototype,"navigationPaneSettings",void 0),Qn([t.Property("/")],s.prototype,"path",void 0),Qn([t.Property(null)],s.prototype,"popupTarget",void 0),Qn([t.Complex({},Tt)],s.prototype,"searchSettings",void 0),Qn([t.Property()],s.prototype,"selectedItems",void 0),Qn([t.Property(!0)],s.prototype,"showFileExtension",void 0),Qn([t.Property(null)],s.prototype,"rootAliasName",void 0),Qn([t.Property(!1)],s.prototype,"showHiddenItems",void 0),Qn([t.Property(!0)],s.prototype,"showThumbnail",void 0),Qn([t.Property("Ascending")],s.prototype,"sortOrder",void 0),Qn([t.Property("name")],s.prototype,"sortBy",void 0),Qn([t.Property(null)],s.prototype,"sortComparer",void 0),Qn([t.Complex({},Et)],s.prototype,"toolbarSettings",void 0),Qn([t.Collection([],Rt)],s.prototype,"toolbarItems",void 0),Qn([t.Complex({},Qt)],s.prototype,"uploadSettings",void 0),Qn([t.Property("100%")],s.prototype,"width",void 0),Qn([t.Event()],s.prototype,"fileLoad",void 0),Qn([t.Event()],s.prototype,"fileOpen",void 0),Qn([t.Event()],s.prototype,"beforeDownload",void 0),Qn([t.Event()],s.prototype,"beforeImageLoad",void 0),Qn([t.Event()],s.prototype,"beforePopupClose",void 0),Qn([t.Event()],s.prototype,"beforePopupOpen",void 0),Qn([t.Event()],s.prototype,"beforeSend",void 0),Qn([t.Event()],s.prototype,"created",void 0),Qn([t.Event()],s.prototype,"destroyed",void 0),Qn([t.Event()],s.prototype,"fileDragStart",void 0),Qn([t.Event()],s.prototype,"fileDragging",void 0),Qn([t.Event()],s.prototype,"fileDragStop",void 0),Qn([t.Event()],s.prototype,"fileDropped",void 0),Qn([t.Event()],s.prototype,"fileSelection",void 0),Qn([t.Event()],s.prototype,"fileSelect",void 0),Qn([t.Event()],s.prototype,"menuClick",void 0),Qn([t.Event()],s.prototype,"menuOpen",void 0),Qn([t.Event()],s.prototype,"failure",void 0),Qn([t.Event()],s.prototype,"popupClose",void 0),Qn([t.Event()],s.prototype,"popupOpen",void 0),Qn([t.Event()],s.prototype,"success",void 0),Qn([t.Event()],s.prototype,"toolbarClick",void 0),Qn([t.Event()],s.prototype,"toolbarCreate",void 0),Qn([t.Event()],s.prototype,"uploadListCreate",void 0),s=r=Qn([t.NotifyPropertyChanges],s)}(t.Component),$n=function(){return($n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e}).apply(this,arguments)},Zn=function(){function e(e){this.default=["Delete","Rename","Download","Cut","Copy","Paste"],this.single=["Delete","Rename","Download","Cut","Copy"],this.multiple=["Delete","Download","Cut","Copy","Refresh"],this.selection=["NewFolder","Upload","SortBy","Refresh"],this.parent=e,this.render(),this.addEventListener()}return e.prototype.render=function(){var e=this;this.items=this.toolbarItemData(this.getItems(this.parent.toolbarSettings.items.map(function(e){return e.trim()})));var t={items:this.items};this.parent.trigger("toolbarCreate",t,function(t){e.items=t.items,e.toolbarObj=new h.Toolbar({items:e.items,created:e.toolbarCreateHandler.bind(e),overflowMode:"Popup",clicked:e.onClicked.bind(e),enableHtmlSanitizer:e.parent.enableHtmlSanitizer,enableRtl:e.parent.enableRtl}),e.toolbarObj.isStringTemplate=!0,e.toolbarObj.root=e.parent.root?e.parent.root:e.parent,e.toolbarObj.appendTo("#"+e.parent.element.id+"_toolbar")})},e.prototype.getItemIndex=function(e){for(var t=this.getId(e),i=0;i<this.items.length;i++)if(this.items[i].id===t)return i;return-1},e.prototype.getItems=function(e){var t=e.slice();return this.parent.isDevice&&this.parent.allowMultiSelection&&t.push("SelectAll"),this.parent.toolbarItems.length>0&&(t=this.parent.toolbarItems.map(function(e){return e.name})),t},e.prototype.onClicked=function(e){var i=this;if(!t.isNullOrUndefined(e.item)&&e.item.id){var n,s=e.item.id.substr((this.parent.element.id+"_tb_").length);"refresh"===s||"newfolder"===s||"upload"===s?(n=[P(this.parent)],this.parent.itemData=n):(this.parent.notify("selected-data",{}),n=this.parent.itemData);var a={cancel:!1,fileDetails:n,item:e.item};this.parent.trigger("toolbarClick",a,function(a){var r,o;if(!a.cancel)switch(s){case"sortby":(o=t.closest(e.originalEvent.target,".e-toolbar-item"))&&o.classList.contains("e-toolbar-popup")&&(e.cancel=!0);break;case"newfolder":De(i.parent);break;case"cut":E(i.parent);break;case"copy":N(i.parent);break;case"delete":for(var l=0;l<n.length;l++)if(!ye(n[l]))return void me(i.parent,n[l],Hn);Ke(i.parent,"Delete");break;case"details":i.parent.notify(On,{}),r=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(r=[]),Re(i.parent,r,i.parent.path,"details");break;case"paste":i.parent.folderPath="",G(i.parent);break;case"refresh":j(i.parent);break;case"download":ue(i.parent);break;case"rename":ye(n[0])?(i.parent.notify(Dn,{}),Ke(i.parent,"Rename")):me(i.parent,n[0],Hn);break;case"upload":Ce(i.parent);break;case"selectall":i.parent.notify("select-all-init",{});break;case"selection":i.parent.notify("clear-all-init",{})}})}},e.prototype.toolbarCreateHandler=function(){var e=this;if(!t.isNullOrUndefined(t.select("#"+this.getId("SortBy"),this.parent.element))){var i=[{id:this.getPupupId("name"),text:H(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?vi:""},{id:this.getPupupId("size"),text:H(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?vi:""},{id:this.getPupupId("date"),text:H(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?vi:""},{separator:!0},{id:this.getPupupId("ascending"),text:H(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?bi:""},{id:this.getPupupId("descending"),text:H(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?bi:""},{id:this.getPupupId("none"),text:H(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?bi:""}];this.buttonObj=new l.DropDownButton({items:i,cssClass:B(this.parent,pi),select:z.bind(this,this.parent),enableHtmlSanitizer:this.parent.enableHtmlSanitizer,enableRtl:this.parent.enableRtl,iconCss:"e-icons e-fe-sort"}),this.buttonObj.isStringTemplate=!0,this.buttonObj.appendTo("#"+this.getId("SortBy"))}if(!t.isNullOrUndefined(t.select("#"+this.getId("View"),this.parent.element))){var n=[{id:this.getPupupId("large"),text:H(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?"":bi},{id:this.getPupupId("details"),text:H(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?bi:""}];this.layoutBtnObj=new l.DropDownButton({iconCss:"Details"===this.parent.view?Wi:Ki,cssClass:B(this.parent,"e-caret-hide "+pi),items:n,select:this.layoutChange.bind(this),enableRtl:this.parent.enableRtl,content:'<span class="e-tbar-btn-text">'+H(this.parent,"View")+"</span>",beforeItemRender:function(t){var i=t.item.iconCss,n=t.item.text===H(e.parent,"View-LargeIcons"),s=i?" e-menu-icon "+i:"";t.element.innerHTML='<span class="'+s+'"></span>'+(n?'<span class="e-icons e-fe-large e-menu-icon"></span>':'<span class="e-icons e-fe-grid e-menu-icon"></span>')+t.item.text;var a=t.element.firstChild;a&&""===a.className&&t.element.removeChild(a)}}),this.layoutBtnObj.isStringTemplate=!0,this.layoutBtnObj.appendTo("#"+this.getId("View"))}this.hideItems(this.default,!0),this.hideStatus(),this.parent.portals&&this.toolbarObj.portals&&(this.parent.portals=this.parent.portals.concat(this.toolbarObj.portals),this.parent.renderReactTemplates());for(var s=t.selectAll(".e-btn",this.toolbarObj.element),a=0;a<s.length;a++)!function(e){s[e].onkeydown=function(e){13!==e.keyCode||e.target.classList.contains("e-fe-popup")||e.preventDefault()},s[e].onkeyup=function(t){13!==t.keyCode||t.target.classList.contains("e-fe-popup")||s[e].click()}}(a);this.parent.refreshLayout()},e.prototype.updateSortByButton=function(){if(this.buttonObj)for(var e=this.buttonObj.items,t=0;t<e.length;t++)e[t].id===this.getPupupId("name")?e[t].iconCss="name"===this.parent.sortBy?vi:"":e[t].id===this.getPupupId("size")?e[t].iconCss="size"===this.parent.sortBy?vi:"":e[t].id===this.getPupupId("date")?"dateModified"===this.parent.sortBy||"dateCreated"===this.parent.sortBy?e[t].iconCss=this.parent.sortBy===this.parent.sortBy?vi:"":e[t].iconCss="_fm_modified"===this.parent.sortBy?vi:"":e[t].id===this.getPupupId("ascending")?e[t].iconCss="Ascending"===this.parent.sortOrder?bi:"":e[t].id===this.getPupupId("descending")?e[t].iconCss="Descending"===this.parent.sortOrder?bi:"":e[t].id===this.getPupupId("none")&&(e[t].iconCss="None"===this.parent.sortOrder?bi:"")},e.prototype.getPupupId=function(e){return this.parent.element.id+"_ddl_"+e.toLowerCase()},e.prototype.layoutChange=function(e){"Details"===this.parent.view?e.item.id===this.getPupupId("large")&&C(this.parent,"LargeIcons"):e.item.id===this.getPupupId("details")&&C(this.parent,"Details")},e.prototype.toolbarItemData=function(e){var t=[],i="Both";this.parent.isMobile&&(i="Overflow");for(var n=0;n<e.length;n++){var s=void 0,a=void 0;this.parent.toolbarItems.length>0&&(a=this.getItemModel(this.parent.toolbarItems[parseInt(n.toString(),10)]));var r=this.getId(e[n]),o=H(this.parent,e[n]),l=H(this.parent,"Tooltip-"+e[n]);switch(e[n]){case"|":s={type:"Separator"};break;case"Upload":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-upload",showTextOn:i};break;case"SortBy":var h='<span class="e-tbar-btn-text e-tbar-ddb-text">'+o+"</span>";a&&a.text&&(h='<span class="e-tbar-btn-text e-tbar-ddb-text">'+a.text+"</span>"),s={id:r,tooltipText:l,template:'<button id="'+r+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1">'+h+"</button>"};break;case"Refresh":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-refresh",showTextOn:i};break;case"Selection":s={id:r,text:o,tooltipText:l,suffixIcon:"e-icons e-fe-clear",overflow:"Show",align:"Right"};break;case"View":var d=void 0;d=a&&a.text?a.text:H(this.parent,"View"),s={id:r,tooltipText:l,prefixIcon:"Details"===this.parent.view?Wi:Ki,overflow:"Show",align:"Right",text:o,showTextOn:"Overflow",template:'<button id="'+r+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1" aria-label='+d+"></button>"};break;case"Details":s={id:r,tooltipText:l,prefixIcon:"e-icons e-fe-details",overflow:"Show",align:"Right",text:o,showTextOn:"Overflow"};break;case"NewFolder":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-newfolder",showTextOn:i};break;case"Cut":s={id:r,text:o,tooltipText:l,prefixIcon:qi,showTextOn:i};break;case"Copy":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-copy",showTextOn:i};break;case"Paste":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-paste",showTextOn:i};break;case"Delete":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-delete",showTextOn:i};break;case"Rename":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-rename",showTextOn:i};break;case"Download":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-download",showTextOn:i};break;case"SelectAll":s={id:r,text:o,tooltipText:l,prefixIcon:"e-icons e-fe-select",showTextOn:i};break;default:s={id:r,text:o,tooltipText:l,template:""}}if(this.parent.toolbarItems.length>0&&a){var p=$n({},s,a);t.push(p)}else t.push(s)}return t},e.prototype.getItemModel=function(e){var t={};return e.id&&(t.id=e.id),e.text&&(t.text=e.text),e.tooltipText&&(t.tooltipText=e.tooltipText),e.prefixIcon&&(t.prefixIcon=e.prefixIcon),e.cssClass&&(t.cssClass=e.cssClass),"Both"!==e.showTextOn&&(t.showTextOn=e.showTextOn),e.template&&(t.template=e.template),e.disabled&&(t.disabled=e.disabled),"auto"!==e.width&&(t.width=e.width),e.suffixIcon&&(t.suffixIcon=e.suffixIcon),"Left"!==e.align&&(t.align=e.align),"None"!==e.overflow&&(t.overflow=e.overflow),e.htmlAttributes&&(t.htmlAttributes=e.htmlAttributes),"Button"!==e.type&&(t.type=e.type),!0!==e.visible&&(t.visible=e.visible),e.showAlwaysInPopup&&(t.showAlwaysInPopup=e.showAlwaysInPopup),-1!==e.tabIndex&&(t.tabIndex=e.tabIndex),t},e.prototype.getId=function(e){return this.parent.element.id+"_tb_"+e.toLowerCase()},e.prototype.addEventListener=function(){this.parent.on($i,this.onPropertyChanged,this),this.parent.on(bn,this.onSelectionChanged,this),this.parent.on(yn,this.onLayoutChange,this),this.parent.on(jn,this.showPaste,this),this.parent.on(xn,this.hidePaste,this),this.parent.on(hn,this.destroy,this),this.parent.on(In,this.updateSortByButton,this)},e.prototype.reRenderToolbar=function(e){var t=this,i=[];if(this.parent.toolbarItems.length>0?i=this.parent.toolbarItems.map(function(e){return e.name}):void 0!==e.newProp.toolbarSettings.items&&(i=e.newProp.toolbarSettings.items.map(function(e){return e.trim()})),i.length>0){this.items=this.toolbarItemData(this.getItems(i));var n={items:this.items};this.parent.trigger("toolbarCreate",n,function(e){t.buttonObj&&t.buttonObj.destroy(),t.layoutBtnObj&&t.layoutBtnObj.destroy(),t.items=e.items,t.toolbarObj.items=t.items,t.toolbarObj.dataBind(),t.toolbarCreateHandler()})}},e.prototype.onSelectionChanged=function(){this.hideStatus(),this.hideItems(this.single,!0),this.hideItems(this.selection,!1),1===this.parent.selectedItems.length?(this.hideItems(this.single,!1),this.hideItems(this.selection,!0)):this.parent.selectedItems.length>1&&(this.hideItems(this.multiple,!1),this.hideItems(this.selection,!0));var e=t.select("#"+this.getId("Selection"),this.toolbarObj.element);if(this.parent.selectedItems.length>0&&e&&!this.parent.enableVirtualization){var i=void 0;i=1===this.parent.selectedItems.length?this.parent.selectedItems.length+" "+H(this.parent,"Item-Selection"):this.parent.selectedItems.length+" "+H(this.parent,"Items-Selection"),t.select(".e-tbar-btn-text",e).textContent=i,this.toolbarObj.hideItem(e.parentElement,!1)}},e.prototype.hideItems=function(e,i){for(var n=0;n<e.length;n++){var s=t.select("#"+this.getId(e[n]),this.parent.element);s&&this.toolbarObj.hideItem(s.parentElement,i)}},e.prototype.hideStatus=function(){var e=t.select("#"+this.getId("Selection"),this.toolbarObj.element);e&&this.toolbarObj.hideItem(e.parentElement,!0)},e.prototype.showPaste=function(){this.hideItems(["Paste"],!1)},e.prototype.hidePaste=function(){this.hideItems(["Paste"],!0)},e.prototype.onLayoutChange=function(){if(this.layoutBtnObj){this.layoutBtnObj.iconCss="Details"===this.parent.view?Wi:Ki;for(var e=this.layoutBtnObj.items,t=0;t<e.length;t++)e[t].id===this.getPupupId("large")?e[t].iconCss="LargeIcons"===this.parent.view?bi:"":e[t].id===this.getPupupId("details")&&(e[t].iconCss="Details"===this.parent.view?bi:"")}},e.prototype.removeEventListener=function(){this.parent.off($i,this.onPropertyChanged),this.parent.off(bn,this.onSelectionChanged),this.parent.off(yn,this.onLayoutChange),this.parent.off(jn,this.showPaste),this.parent.off(xn,this.hidePaste),this.parent.off(hn,this.destroy),this.parent.off(In,this.updateSortByButton)},e.prototype.getModuleName=function(){return"toolbar"},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++)switch(i[t]){case"cssClass":this.buttonObj&&(this.buttonObj.cssClass=B(this.parent,pi)),this.layoutBtnObj&&(this.layoutBtnObj.cssClass=B(this.parent,"e-caret-hide "+pi));break;case"height":case"width":this.toolbarObj.refreshOverflow();break;case"toolbarSettings":case"toolbarItems":this.reRenderToolbar(e)}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.buttonObj&&this.buttonObj.destroy(),this.layoutBtnObj&&this.layoutBtnObj.destroy(),this.toolbarObj.destroy(),this.parent.refreshLayout())},e.prototype.enableItems=function(e,i){for(var n=0;n<e.length;n++){var s=t.select("#"+this.getId(e[n]),this.parent.element);s&&this.toolbarObj.enableItems(s.parentElement,i)}},e}(),es=function(){function e(e){this.filemanagerInstance=e,this.largeIconInstance=e.largeiconsviewModule}return e.prototype.setUIVirtualization=function(){var e=this.largeIconInstance.items,i=e.slice(0,1),n=o.ListBase.createListFromJson(t.createElement,i,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(t.selectAll("."+gi,n)),this.largeIconInstance.element.appendChild(n),0!==this.itemList.length&&this.largeIconInstance.element.querySelector("."+xi)&&this.largeIconInstance.element.removeChild(this.largeIconInstance.element.querySelector("."+xi)),this.itemCount=this.getItemCount(Object.keys(this.largeIconInstance.allItems).length),this.largeIconInstance.element.firstChild.remove(),this.largeIconInstance.items=e.slice(0,this.itemCount)},e.prototype.setUlElementHeight=function(){this.lastRowCount=(this.largeIconInstance.allItems.length-this.itemCount)%this.rowItemCount?(this.largeIconInstance.allItems.length-this.itemCount)%this.rowItemCount:this.rowItemCount,this.topElement=this.filemanagerInstance.createElement("div"),this.topElement.classList.add("e-virtual-top"),this.largeIconInstance.element.firstElementChild.insertBefore(this.topElement,this.largeIconInstance.element.firstElementChild.firstChild),this.bottomElement=this.filemanagerInstance.createElement("div"),this.bottomElement.classList.add("e-virtual-bottom"),this.largeIconInstance.element.firstElementChild.insertBefore(this.bottomElement,null);var e=parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue("margin-bottom"),10);this.listItemHeight=this.largeIconInstance.itemList[0].getBoundingClientRect().height+e,this.totalHeight=Object.keys(this.largeIconInstance.allItems).length/this.rowItemCount*this.listItemHeight,this.topElement.style.height="0px",this.bottomElement.style.height=this.totalHeight+"px",this.topElementHeight=0,this.bottomElementHeight=this.totalHeight,this.listDiff=0,this.renderedCount=this.itemCount},e.prototype.getItemCount=function(e){var i=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-right"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-left"),10);this.rowItemCount=Math.floor(parseFloat(t.formatUnit(this.largeIconInstance.element.firstElementChild.clientWidth))/(this.itemList[0].offsetWidth+i));var n=this.rowItemCount*Math.round(parseFloat(t.formatUnit(this.largeIconInstance.element.clientHeight))/this.itemList[0].offsetHeight);return n>e&&(n=e),n},e.prototype.wireScrollEvent=function(e){e?t.EventHandler.remove(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll):t.EventHandler.add(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll,this)},e.prototype.onVirtualUiScroll=function(){var e;this.scrollPosition=t.isNullOrUndefined(this.scrollPosition)?0:this.scrollPosition;var i=this.getscrollerHeight(0);if(this.topElementHeight=this.listItemHeight*Math.floor(i/this.listItemHeight),this.bottomElementHeight=this.totalHeight-this.topElementHeight,e=i<=this.totalHeight?[this.topElementHeight,this.bottomElementHeight]:[this.totalHeight,0],this.topElementHeight=e[0],this.bottomElementHeight=e[1],this.topElementHeight!==parseFloat(this.topElement.style.height))if(this.topElement.style.height=this.topElementHeight+"px",this.bottomElement.style.height=this.bottomElementHeight+"px",i>this.scrollPosition){n=Math.round(this.topElementHeight/this.listItemHeight-this.listDiff);this.onNormalScroll(n,!0)}else{var n=Math.round(this.listDiff-this.topElementHeight/this.listItemHeight);this.onNormalScroll(n,!1)}this.listDiff=Math.round(this.topElementHeight/this.listItemHeight),this.scrollPosition=i,this.largeIconInstance.itemList=Array.prototype.slice.call(t.selectAll("."+gi,this.largeIconInstance.element)),this.largeIconInstance.items=this.largeIconInstance.allItems.slice(this.renderedCount-this.itemCount,this.renderedCount)},e.prototype.getscrollerHeight=function(e){return this.largeIconInstance.element.firstElementChild.scrollTop-e<=0?0:this.largeIconInstance.element.firstElementChild.scrollTop-e},e.prototype.onNormalScroll=function(e,t){for(var i=0;i<e;i++)this.updateUI(t)},e.prototype.updateUI=function(e){var i=this;if(e){if(this.items=this.largeIconInstance.allItems.slice(this.renderedCount,this.renderedCount+this.rowItemCount),this.items.length>0){r=o.ListBase.createListFromJson(t.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(t.selectAll("."+gi,r)),this.itemList.forEach(function(e){i.largeIconInstance.element.firstElementChild.insertBefore(e,i.bottomElement)}),this.renderedCount=this.largeIconInstance.allItems.length>=this.renderedCount+this.rowItemCount?this.renderedCount+this.rowItemCount:this.renderedCount+this.lastRowCount;for(h=0;h<this.rowItemCount;h++)t.detach(this.topElement.nextElementSibling)}}else{var n=void 0,s=void 0;this.renderedCount===this.largeIconInstance.allItems.length?(n=this.renderedCount-(this.itemCount-this.rowItemCount+this.lastRowCount),this.renderedCount=this.renderedCount-this.lastRowCount<this.itemCount?this.itemCount:this.renderedCount-this.lastRowCount,s=!0):(n=this.renderedCount-this.itemCount,this.renderedCount=this.renderedCount-this.rowItemCount<this.itemCount?this.itemCount:this.renderedCount-this.rowItemCount);var a=n-this.rowItemCount>0?n-this.rowItemCount:0;if(this.items=this.largeIconInstance.allItems.slice(a,n),this.items.length>0){var r=o.ListBase.createListFromJson(t.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(t.selectAll("."+gi,r));for(var l=this.itemList.length;l>0;l--)this.largeIconInstance.element.firstElementChild.insertBefore(this.itemList[l-1],this.topElement.nextElementSibling);for(var h=0;h<(s?this.lastRowCount:this.rowItemCount);h++)t.detach(this.bottomElement.previousElementSibling)}}},e.prototype.getModuleName=function(){return"virtualization"},e.prototype.destroy=function(){this.filemanagerInstance.isDestroyed||t.isNullOrUndefined(this.largeIconInstance.element.firstElementChild)||this.wireScrollEvent(!0)},e}(),ts=function(){function e(e){this.removeNodes=[],this.moveNames=[],this.expandTree=!1,this.isDrag=!1,this.isPathDragged=!1,this.isRenameParent=!1,this.isRightClick=!1,this.isSameNodeClicked=!1,this.isNodeExpandCalled=!1,this.renameParent=null,this.previousSelected=null,this.isNodeClickCalled=!1,this.restrictSelecting=!1,this.parent=e,this.addEventListener(),this.keyConfigs={altEnter:"alt+enter",esc:"escape",del:"delete",ctrlX:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"ctrl+v",ctrlShiftN:"ctrl+shift+n",shiftF10:"shift+F10",f2:"f2"}}return e.prototype.onInit=function(){if(t.isNullOrUndefined(this.treeObj)){var e=t.getValue(this.parent.pathId[0],this.parent.feParent);t.setValue("_fm_icon","e-fe-folder",e);var i={},n=t.getValue("id",e);t.isNullOrUndefined(n)||t.setValue("data-id",n,i),ye(e)||t.setValue("class",be(e),i),t.isNullOrUndefined(i)||t.setValue("_fm_htmlAttr",i,e),this.treeObj=new h.TreeView({fields:{dataSource:[e],id:"_fm_id",parentID:"_fm_pId",expanded:"_fm_expanded",selected:"_fm_selected",text:"name",hasChildren:"hasChild",iconCss:"_fm_icon",htmlAttributes:"_fm_htmlAttr",tooltip:"name"},enableHtmlSanitizer:this.parent.enableHtmlSanitizer,sortOrder:this.parent.navigationPaneSettings.sortOrder,nodeSelecting:this.onNodeSelecting.bind(this),nodeSelected:this.onNodeSelected.bind(this),nodeExpanding:this.onNodeExpand.bind(this),nodeClicked:this.onNodeClicked.bind(this),allowEditing:!0,nodeEditing:this.onNodeEditing.bind(this),drawNode:this.onDrowNode.bind(this),enableRtl:this.parent.enableRtl,dataBound:this.addDragDrop.bind(this)}),this.treeObj.isStringTemplate=!0,this.treeObj.appendTo("#"+this.parent.element.id+"_tree"),this.wireEvents()}},e.prototype.addDragDrop=function(){var e=this;!this.parent.isMobile&&this.treeObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.treeObj.element,{cursorAt:this.parent.dragCursorPosition,dragTarget:".e-fullrow",distance:5,dragArea:this.parent.element,drag:le.bind(this,this.parent),dragStart:function(t){ne(e.parent,t,e.dragObj)},dragStop:ie.bind(this,this.parent),enableTailMode:!0,enableAutoScroll:!1,helper:this.dragHelper.bind(this)})):!this.parent.allowDragAndDrop&&this.dragObj&&this.dragObj.destroy())},e.prototype.dragHelper=function(e){var i=e.sender.target;if(!i.classList.contains("e-fullrow"))return null;var n=t.closest(i,"li");return this.parent.dragPath="",this.parent.dragData=[],this.parent.activeElements=[],this.parent.activeElements=[n],this.parent.dragNodes=[],w(this.parent,n),this.parent.dragData=this.getTreeData(n),this.parent.dragPath=this.getDragPath(n,this.parent.dragData[0].name),this.parent.dragNodes.push(this.parent.dragData[0].name),te(this.parent),this.parent.virtualDragElement},e.prototype.getDragPath=function(e,t){return Q(this.getDropPath(e,t))},e.prototype.getDropPath=function(e,t){var i=e.getAttribute("data-id");return u(e,this.parent.hasId?i:t,this.parent.hasId)},e.prototype.onDrowNode=function(e){var t={element:e.node,fileDetails:e.nodeData,module:"NavigationPane"};this.parent.trigger("fileLoad",t)},e.prototype.addChild=function(e,i,n){var s=U(e);if(s.length>0&&(null==s[0].filterPath||null==this.getTreeData(i)[0].filterPath||s[0].filterPath!==this.getTreeData(i)[0].filterPath)){for(var a=0,r=s;a<s.length;){r[a]._fm_icon="e-fe-folder";var o={},l=t.getValue("id",r[a]);t.isNullOrUndefined(l)||t.setValue("data-id",l,o),ye(r[a])||t.setValue("class",be(r[a]),o),t.isNullOrUndefined(o)||t.setValue("_fm_htmlAttr",o,r[a]),a++}var h=t.select('[data-uid="'+i+'"]',this.treeObj.element),d=t.select("ul",h);t.isNullOrUndefined(d)&&this.treeObj.addNodes(s,i,null,n)}},e.prototype.onNodeSelecting=function(e){if(!e.isInteracted&&!this.isRightClick&&!this.isSameNodeClicked&&!this.isPathDragged&&!this.isRenameParent||this.restrictSelecting)return this.restrictSelecting=!1,void(this.isNodeClickCalled=!1);if(!this.renameParent){this.parent.activeModule="navigationpane";var i=this.getTreeData(t.getValue("id",e.nodeData));if(e.node.getAttribute("data-uid")!==this.parent.pathId[this.parent.pathId.length-1]&&!this.isRightClick&&!this.isNodeClickCalled||this.isSameNodeClicked){if(this.isNodeClickCalled=!1,!this.isSameNodeClicked){this.isSameNodeClicked=!0;s={action:e.action,fileDetails:i[0],isInteracted:e.isInteracted};this.parent.trigger("fileSelect",s)}if(!this.isRightClick){var n={cancel:!1,fileDetails:i[0],module:"NavigationPane"};this.parent.trigger("fileOpen",n),e.cancel=n.cancel}e.cancel&&(this.restrictSelecting=!!this.isNodeClickCalled&&this.previousSelected[0]!==e.node.getAttribute("data-uid"),this.isNodeClickCalled=!0,this.isSameNodeClicked=!1,this.previousSelected=this.treeObj.selectedNodes,this.treeObj.selectedNodes=[e.node.getAttribute("data-uid")])}else if(this.previousSelected[0]!==e.node.getAttribute("data-uid")){var s={action:e.action,fileDetails:i[0],isInteracted:this.isNodeClickCalled};this.parent.trigger("fileSelect",s)}}},e.prototype.openFileOnContextMenuClick=function(e){var t=this.treeObj.getTreeData(e);this.parent.selectedItems=[],this.parent.itemData=t,this.activeNode=e,this.parent.activeModule="navigationpane";var i={cancel:!1,fileDetails:t[0],module:"NavigationPane"};this.parent.trigger("fileOpen",i),this.isNodeClickCalled=!0,i.cancel||(c(e,this.parent.itemData[0],this.parent),Se(this.parent,this.isPathDragged?En:ln,this.parent.path),this.parent.visitedItem=e,this.isPathDragged=this.isRenameParent=this.isRightClick=!1,this.treeObj.selectedNodes=[e.getAttribute("data-uid")])},e.prototype.onNodeSelected=function(e){if(this.parent.breadcrumbbarModule&&this.parent.breadcrumbbarModule.searchObj&&!this.renameParent&&(this.parent.breadcrumbbarModule.searchObj.element.value="",this.parent.isFiltered=!1,this.isNodeClickCalled=!1),this.parent.searchedItems=[],!(e.isInteracted||this.isRightClick||this.isSameNodeClicked||this.isPathDragged||this.isRenameParent))return void(this.parent.pathId=f(e.node));this.activeNode=e.node,this.parent.activeModule="navigationpane";var i=this.getTreeData(t.getValue("id",e.nodeData));this.parent.selectedItems=[],this.parent.itemData=i;var n=this.parent.path;!this.isRightClick&&this.isSameNodeClicked?c(e.node,this.parent.itemData[0],this.parent):(this.parent.pathId=f(e.node),this.parent.visitedItem=e.node),e.node.querySelector(".e-icons")&&null===e.node.querySelector("."+gi)&&(this.expandNodeTarget="add"),n!==this.parent.path&&(!this.isRightClick&&this.isSameNodeClicked&&(Se(this.parent,this.isPathDragged?En:ln,this.parent.path),this.isNodeClickCalled=!0),this.parent.visitedItem=e.node),this.isPathDragged=this.isRenameParent=this.isRightClick=this.isSameNodeClicked=!1},e.prototype.onPathDrag=function(e){this.isPathDragged=!0,this.selectResultNode(e[0])},e.prototype.onNodeExpand=function(e){if((e.isInteracted||this.isDrag)&&null===e.node.querySelector("."+gi)){var i=t.getValue("text",e.nodeData),n=e.node.getAttribute("data-id"),s=!t.isNullOrUndefined(n),a=t.isNullOrUndefined(n)?i:n,r=u(e.node,a,s);this.expandNodeTarget=e.node.getAttribute("data-uid"),this.parent.expandedId=this.expandNodeTarget,this.parent.itemData=this.getTreeData(t.getValue("id",e.nodeData)),this.parent.pathId.push(t.getValue("id",e.nodeData)),Se(this.parent,"node-expand",r),this.isNodeExpandCalled=!0}},e.prototype.onNodeExpanded=function(e){this.addChild(e.files,this.expandNodeTarget,!1),this.parent.expandedId=null,this.isNodeExpandCalled=!1},e.prototype.onNodeClicked=function(e){if(this.parent.activeModule="navigationpane",this.previousSelected=this.treeObj.selectedNodes,this.activeNode=e.node,3===e.event.which&&e.node.getAttribute("data-uid")!==this.treeObj.selectedNodes[0])this.isRightClick=!0,this.isNodeClickCalled=!0,this.treeObj.selectedNodes=[e.node.getAttribute("data-uid")];else if(e.node.getAttribute("data-uid")===this.treeObj.selectedNodes[0]&&0!==this.parent.selectedItems.length){this.parent.setProperties({selectedItems:[]},!0);var t="LargeIcons"===this.parent.view?"largeiconsview":"detailsview";this.parent.notify($i,{module:t,newProp:{selectedItems:[]}})}else e.node.getAttribute("data-uid")!==this.treeObj.selectedNodes[0]||this.isNodeClickCalled||this.isNodeExpandCalled||(3===e.event.which&&(this.isRightClick=!0),this.isSameNodeClicked=!0,this.isNodeClickCalled=!0,this.treeObj.selectedNodes=[e.node.getAttribute("data-uid")])},e.prototype.onNodeEditing=function(e){t.isNullOrUndefined(e.innerHtml)||(e.cancel=!0)},e.prototype.onPathChanged=function(e){this.parent.isCut=!1;var i=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feFiles);if("add"===this.expandNodeTarget){var n=t.select('[data-uid="'+this.treeObj.selectedNodes[0]+'"]',this.treeObj.element),s=t.isNullOrUndefined(n)?null:t.select(".e-list-parent",n);t.isNullOrUndefined(s)&&this.addChild(e.files,this.treeObj.selectedNodes[0],!this.expandTree),this.expandNodeTarget=""}this.expandTree=!1,t.isNullOrUndefined(i)&&t.setValue(this.parent.pathId[this.parent.pathId.length-1],e.files,this.parent.feFiles),this.parent.uploadObj.directoryUpload&&!this.parent.hasId&&this.updateTree(e)},e.prototype.updateTree=function(e){if(this.treeObj){var t=this.treeObj.selectedNodes[0];this.updateTreeNode(e,t)}},e.prototype.updateTreeNode=function(e,t){var i=-1!==this.treeObj.expandedNodes.indexOf(t);this.removeChildNodes(t),this.addChild(e.files,t,!i)},e.prototype.removeChildNodes=function(e){var i=t.select('[data-uid="'+e+'"]',this.treeObj.element),n=t.select(".e-list-parent",i),s=n?Array.prototype.slice.call(n.children):null;s&&this.treeObj.removeNodes(s)},e.prototype.onOpenEnd=function(e){var t=this.parent.pathId[this.parent.pathId.length-1];this.treeObj.expandAll(this.treeObj.selectedNodes),this.treeObj.selectedNodes=[t],this.expandNodeTarget="add",this.onPathChanged(e)},e.prototype.onOpenInit=function(e){"navigationpane"===this.parent.activeModule&&e.target.querySelector(".e-icons")&&this.treeObj.expandAll(this.treeObj.selectedNodes)},e.prototype.onInitialEnd=function(e){this.onInit(),this.addChild(e.files,t.getValue("_fm_id",e.cwd),!1)},e.prototype.onFinalizeEnd=function(e){this.onInit();var i=t.getValue("_fm_id",e.cwd);this.addChild(e.files,i,!1),this.treeObj.selectedNodes=[this.parent.pathId[this.parent.pathId.length-1]]},e.prototype.onCreateEnd=function(e){this.updateTree(e)},e.prototype.onSelectedData=function(){"navigationpane"===this.parent.activeModule&&this.updateItemData()},e.prototype.onDeleteInit=function(){if("navigationpane"===this.parent.activeModule){this.updateActionData();var e=t.getValue("name",this.parent.itemData[0]);Ee(this.parent,[e],this.parent.path,"delete")}},e.prototype.onDeleteEnd=function(e){if("navigationpane"===this.parent.activeModule){var i=this.treeObj.selectedNodes[0],n=t.select('[data-uid="'+i+'"]',this.treeObj.element),s=t.closest(n,".e-list-parent").parentElement;this.treeObj.selectedNodes=[s.getAttribute("data-uid")],this.treeObj.dataBind()}this.updateTree(e)},e.prototype.onRefreshEnd=function(e){this.updateTree(e)},e.prototype.onRenameInit=function(){"navigationpane"===this.parent.activeModule&&this.updateRenameData()},e.prototype.onRenameEndParent=function(e){var i=this.renameParent?this.renameParent:this.parent.pathId[this.parent.pathId.length-1];if(this.expandTree=-1!==this.treeObj.expandedNodes.indexOf(this.treeObj.selectedNodes[0]),this.updateTreeNode(e,i),this.parent.expandedId=null,this.renameParent)this.renameParent=null;else{var n=[];if(this.parent.hasId)n=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",this.parent.renameText,!1));a.length>0&&(n=new s.DataManager(a).executeLocal((new s.Query).where("_fm_pId","equal",i,!1)))}if(n.length>0){var r=t.getValue(this.treeObj.fields.id,n[0]);this.treeObj.selectedNodes=[r],this.treeObj.dataBind()}}},e.prototype.onRenameEnd=function(e){if(""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered){var i=this.treeObj.getTreeData(),n=[];if(this.parent.hasId)n=new s.DataManager(i).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new s.DataManager(i).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",this.parent.currentItemText,!1));a.length>0&&(n=new s.DataManager(a).executeLocal((new s.Query).where("filterPath","equal",this.parent.filterPath,!1)))}n.length>0&&(this.renameParent=t.getValue(this.treeObj.fields.parentID,n[0]),this.parent.expandedId=this.renameParent,this.parent.itemData=this.getTreeData(this.renameParent),Se(this.parent,Cn,this.parent.filterPath.replace(/\\/g,"/")))}else this.updateTree(e)},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++)switch(i[t]){case"allowDragAndDrop":this.addDragDrop();break;case"navigationPaneSettings":Se(this.parent,en,"/"),e.oldProp.navigationPaneSettings.sortOrder!==e.newProp.navigationPaneSettings.sortOrder&&(this.treeObj.sortOrder=e.newProp.navigationPaneSettings.sortOrder)}},e.prototype.onDownLoadInit=function(){this.doDownload()},e.prototype.onSelectionChanged=function(e){this.treeObj.selectedNodes=[e.selectedNode]},e.prototype.onClearPathInit=function(e){this.removeChildNodes(e.selectedNode)},e.prototype.onDragEnd=function(e){var t=[];t=this.parent.isPasteError||this.parent.isSearchDrag?this.getMoveNames(e.files,this.parent.isSearchDrag,this.parent.dragPath):this.moveNames,this.treeObj.removeNodes(t)},e.prototype.getMoveNames=function(e,i,n){for(var a=[],r=0;r<e.length;r++)if(!e[r].isFile&&!this.parent.hasId){var o=e[r].previousName;if(i){var l=(n+=e[r].previousName).lastIndexOf("/");o=n.substring(l+1),n=n.substring(0,l+1)}for(var h=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",o,!1)),d=0;d<h.length;d++){var p=t.getValue("filterPath",h[d]);if((p=p.replace(/\\/g,"/"))===n){a.push(t.getValue(this.treeObj.fields.id,h[d]));break}}}return a},e.prototype.onCutEnd=function(e){var t=[];this.parent.isPasteError||this.parent.isSearchCut?this.moveNames=this.getMoveNames(e.files,this.parent.isSearchCut,this.parent.targetPath):t=this.moveNames,this.treeObj.removeNodes(t)},e.prototype.selectResultNode=function(e){if(this.parent.hasId){var i=this.treeObj.getTreeData().filter(function(t){return t.name===e.name})[0];this.treeObj.selectedNodes=[t.getValue("_fm_id",i)],this.treeObj.dataBind()}else{var n=t.getValue("filterPath",e),a=t.getValue("name",e),r=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",a,!1));if(r.length>0){var o=new s.DataManager(r).executeLocal((new s.Query).where("filterPath","equal",n,!1));if(o.length>0){var l=t.getValue(this.treeObj.fields.id,o[0]);this.treeObj.selectedNodes=[l],this.treeObj.dataBind()}}}},e.prototype.onDropPath=function(e){this.onpasteEnd(e),this.selectResultNode(this.parent.dropData),this.parent.isDropEnd=!this.parent.isPasteError},e.prototype.onpasteEnd=function(e){var i=[];if(this.parent.hasId)i=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where("id","equal",t.getValue("id",e.cwd),!1));else{var n=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",t.getValue("name",e.cwd),!1));n.length>0&&(i=new s.DataManager(n).executeLocal((new s.Query).where("filterPath","equal",t.getValue("filterPath",e.cwd),!1)))}if(i.length>0){var a=t.getValue(this.treeObj.fields.id,i[0]),r=-1===this.treeObj.expandedNodes.indexOf(a);this.removeChildNodes(a),this.addChild(e.files,a,r)}this.parent.expandedId=null,this.onPathChanged(e),this.parent.isDragDrop&&this.checkDropPath(e)},e.prototype.checkDropPath=function(e){if(this.parent.hasId)return this.parent.isDropEnd=!this.parent.isPasteError,void Z(this.parent);-1===this.parent.dropPath.indexOf(X(this.parent,e))?(this.parent.isDropEnd=!1,Z(this.parent)):this.parent.isDropEnd=!this.parent.isPasteError},e.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&this.updateItemData(),this.moveNames=[];for(var e=this.parent.isDragDrop?this.parent.dragData:this.parent.actionRecords,i=0;i<e.length;i++)!1===t.getValue("isFile",e[i])&&this.moveNames.push(t.getValue("_fm_id",e[i]))},e.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.getTreeData(this.treeObj.selectedNodes[0]),this.parent.activeElements=[this.activeNode])},e.prototype.addEventListener=function(){this.parent.on($i,this.onPropertyChanged,this),this.parent.on("download-init",this.onDownLoadInit,this),this.parent.on(Zi,this.onInitialEnd,this),this.parent.on(en,this.onFinalizeEnd,this),this.parent.on(ln,this.onPathChanged,this),this.parent.on(En,this.onpasteEnd,this),this.parent.on(Rn,this.onCutEnd,this),this.parent.on(Nn,this.onpasteInit,this),this.parent.on("node-expand",this.onNodeExpanded,this),this.parent.on(tn,this.onCreateEnd,this),this.parent.on("selected-data",this.onSelectedData,this),this.parent.on(sn,this.onDeleteInit,this),this.parent.on(an,this.onDeleteEnd,this),this.parent.on(rn,this.onRefreshEnd,this),this.parent.on("update-tree-selection",this.onSelectionChanged,this),this.parent.on(gn,this.onOpenInit,this),this.parent.on(mn,this.onOpenEnd,this),this.parent.on(hn,this.destroy,this),this.parent.on(Dn,this.onRenameInit,this),this.parent.on(Sn,this.onRenameEnd,this),this.parent.on(Cn,this.onRenameEndParent,this),this.parent.on(vn,this.onClearPathInit,this),this.parent.on(Pn,this.oncutCopyInit,this),this.parent.on(Ln,this.onDropInit,this),this.parent.on(wn,this.onMenuItemData,this),this.parent.on(An,this.onDragEnd,this),this.parent.on(Un,this.onDragging,this),this.parent.on(Fn,this.onDropPath,this),this.parent.on(On,this.onDetailsInit,this),this.parent.on(nn,this.onPathDrag,this)},e.prototype.removeEventListener=function(){this.parent.off(Zi,this.onInitialEnd),this.parent.off("download-init",this.onDownLoadInit),this.parent.off(en,this.onFinalizeEnd),this.parent.off("selected-data",this.onSelectedData),this.parent.off($i,this.onPropertyChanged),this.parent.off(ln,this.onPathChanged),this.parent.off(En,this.onpasteEnd),this.parent.off(Rn,this.onCutEnd),this.parent.off(Nn,this.onpasteInit),this.parent.off("update-tree-selection",this.onSelectionChanged),this.parent.off("node-expand",this.onNodeExpanded),this.parent.off(tn,this.onCreateEnd),this.parent.off(rn,this.onRefreshEnd),this.parent.off(gn,this.onOpenInit),this.parent.off(mn,this.onOpenEnd),this.parent.off(hn,this.destroy),this.parent.off(Dn,this.onRenameInit),this.parent.off(Sn,this.onRenameEnd),this.parent.off(Cn,this.onRenameEndParent),this.parent.off(vn,this.onClearPathInit),this.parent.off(sn,this.onDeleteInit),this.parent.off(an,this.onDeleteEnd),this.parent.off(Pn,this.oncutCopyInit),this.parent.off(Ln,this.onDropInit),this.parent.off(An,this.onDragEnd),this.parent.off(Un,this.onDragging),this.parent.off(Fn,this.onDropPath),this.parent.off(On,this.onDetailsInit),this.parent.off(wn,this.onMenuItemData),this.parent.off(nn,this.onPathDrag)},e.prototype.onDetailsInit=function(){if(this.parent.activeModule===this.getModuleName()){var e=this.getTreeData(this.treeObj.selectedNodes[0]);this.parent.itemData=e}},e.prototype.onMenuItemData=function(e){if(this.parent.activeModule===this.getModuleName()){var i=t.closest(e.target,"li");this.parent.itemData=this.getTreeData(i.getAttribute("data-uid"))}},e.prototype.onDragging=function(e){var i=t.closest(e.target,"li");if(i.classList.contains("e-node-collapsed")){this.isDrag=!0;var n=parseInt(i.getAttribute("aria-level"),10);this.treeObj.expandAll([i.getAttribute("data-uid")],n+1),this.isDrag=!1}},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=t.closest(e.target,"li");this.parent.dropData=this.getTreeData(i)[0],this.parent.dropPath=this.getDropPath(i,t.getValue("name",this.parent.dropData))}},e.prototype.getModuleName=function(){return"navigationpane"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.treeObj&&(this.unWireEvents(),this.treeObj.destroy()))},e.prototype.wireEvents=function(){this.keyboardModule=new t.KeyboardEvents(this.treeObj.element,{keyAction:this.keyDown.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},e.prototype.unWireEvents=function(){this.keyboardModule.destroy()},e.prototype.keyDown=function(e){switch(e.action){case"altEnter":this.parent.notify(On,{}),Re(this.parent,[],this.parent.path,"details");break;case"esc":v(this.parent);break;case"del":this.parent.pathId[0]!==this.activeNode.getAttribute("data-uid")&&(this.updateItemData(),ye(this.parent.itemData[0])?(this.removeNodes=[],Ke(this.parent,"Delete")):me(this.parent,this.parent.itemData[0],Hn));break;case"ctrlC":N(this.parent);break;case"ctrlV":this.parent.folderPath="",G(this.parent);break;case"ctrlX":E(this.parent);break;case"shiftF10":if(this.updateItemData(),!we(this.parent.itemData[0]))return void me(this.parent,this.parent.itemData[0],qn);0!==this.parent.selectedItems.length&&this.doDownload();break;case"f2":if(0===this.parent.selectedItems.length){var t=this.getTreeData(this.treeObj.selectedNodes[0])[0];ye(t)?(this.updateRenameData(),Ke(this.parent,"Rename")):me(this.parent,t,Hn)}}},e.prototype.getTreeData=function(e){for(var i=this.treeObj.getTreeData(e),n=0;n<i.length;n++)t.isNullOrUndefined(t.getValue("hasChild",i[n]))&&t.setValue("hasChild",!1,i[n]);return i},e.prototype.updateRenameData=function(){this.updateItemData(),this.parent.currentItemText=t.getValue("name",this.parent.itemData[0])},e.prototype.updateItemData=function(){var e=this.getTreeData(this.treeObj.selectedNodes[0])[0];this.parent.itemData=[e],this.parent.isFile=!1},e.prototype.updateActionData=function(){this.updateItemData();var e=Q(this.parent.path);this.parent.setProperties({path:e},!0),this.parent.pathId.pop(),this.parent.pathNames.pop()},e.prototype.doDownload=function(){var e=Q(this.parent.path),i=this.treeObj.selectedNodes[0]===this.parent.pathId[0]?"":t.getValue("name",this.parent.itemData[0]);We(this.parent,e,[i])},e}(),is=function(){function e(e){this.isInteracted=!0,this.interaction=!0,this.isPasteOperation=!1,this.isColumnRefresh=!1,this.dragObj=null,this.startIndex=null,this.firstItemIndex=null,this.isSelectionUpdate=!1,this.currentSelectedItem=[],this.count=0,this.isRendered=!0,this.isLoaded=!1,this.isNameWidth=!1,this.pasteOperation=!1,this.uploadOperation=!1,d.Grid.Inject(d.Resize,d.ContextMenu,d.Sort,d.VirtualScroll),this.parent=e,this.element=t.select("#"+this.parent.element.id+ti,this.parent.element),this.addEventListener(),this.keyConfigs={altEnter:"alt+enter",esc:"escape",tab:"tab",moveDown:"downarrow",ctrlEnd:"ctrl+end",ctrlHome:"ctrl+home",ctrlDown:"ctrl+downarrow",ctrlLeft:"ctrl+leftarrow",ctrlRight:"ctrl+rightarrow",shiftEnd:"shift+end",shiftHome:"shift+home",shiftDown:"shift+downarrow",shiftUp:"shift+uparrow",ctrlUp:"ctrl+uparrow",csEnd:"ctrl+shift+end",csHome:"ctrl+shift+home",csDown:"ctrl+shift+downarrow",csUp:"ctrl+shift+uparrow",space:"space",ctrlSpace:"ctrl+space",shiftSpace:"shift+space",csSpace:"ctrl+shift+space",end:"end",home:"home",moveUp:"uparrow",del:"delete",ctrlX:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"ctrl+v",ctrlShiftN:"ctrl+shift+n",shiftdel:"shift+delete",ctrlD:"ctrl+d",f2:"f2",ctrlA:"ctrl+a",enter:"enter"}}return e.prototype.render=function(e){if(n.showSpinner(this.parent.element),"Details"===this.parent.view){t.removeClass([this.parent.element],"e-fe-m-select");var i=L(this.parent,e.files);this.checkNameWidth();var s=this.getColumns(),a=void 0;this.parent.isMobile?a=[]:"None"!==this.parent.sortOrder&&(a=[{direction:this.parent.sortOrder,field:this.parent.sortBy}]),this.gridObj=new d.Grid({dataSource:i,allowSorting:!0,rowSelecting:this.onSelection.bind(this,"select"),rowDeselecting:this.onSelection.bind(this,"unselect"),rowSelected:this.onSelected.bind(this),rowDeselected:this.onDeSelection.bind(this),allowResizing:this.parent.detailsViewSettings.columnResizing,selectionSettings:{type:this.parent.allowMultiSelection?"Multiple":"Single",checkboxMode:"ResetOnRowClick",persistSelection:!!this.parent.enableVirtualization},enableRtl:this.parent.enableRtl,pageSettings:{pageSize:20},enableVirtualization:this.parent.enableVirtualization,enablePersistence:this.parent.enablePersistence,enableVirtualMaskRow:!0,sortSettings:{allowUnsort:!1,columns:a},columns:s,recordDoubleClick:this.DblClickEvents.bind(this),beforeDataBound:this.onBeforeDataBound.bind(this),dataBound:this.onDataBound.bind(this),rowDataBound:this.onRowDataBound.bind(this),actionBegin:this.onActionBegin.bind(this),headerCellInfo:this.onHeaderCellInfo.bind(this),width:"100%",height:this.parent.enableVirtualization?this.getGridHeight():"auto",beforeCopy:function(e){e.cancel=!0},load:function(e){this.focusModule.destroy()},locale:this.parent.locale}),this.parent.isReact&&(this.gridObj.isReact=!0,this.gridObj.portals=[],this.gridObj.on("reactTemplateRender",this.reactTemplateRender,this)),this.gridObj.isStringTemplate=!0,this.gridObj.appendTo("#"+this.parent.element.id+ti),this.wireEvents(),this.adjustHeight(),this.emptyArgs=e}},e.prototype.reactTemplateRender=function(e){this.parent.portals=e,this.parent.portals&&this.parent.toolbarModule&&this.parent.toolbarModule.toolbarObj&&this.parent.toolbarModule.toolbarObj.portals&&(this.parent.portals=this.parent.portals.concat(this.parent.toolbarModule.toolbarObj.portals)),this.parent.notify("renderReactTemplate",this.parent.portals),this.parent.renderReactTemplates()},e.prototype.getGridHeight=function(){var e=t.select("#"+this.parent.element.id+ri,this.parent.element),i=t.select("#"+this.parent.element.id+oi,this.parent.element);return e.offsetHeight-i.offsetHeight-36},e.prototype.checkNameWidth=function(){var e=this.parent.detailsViewSettings.columns;this.isNameWidth=!1;for(var i=0;i<e.length;i++)if("name"===e[i].field)return void(this.isNameWidth=!t.isNullOrUndefined(e[i].width))},e.prototype.adjustWidth=function(e,t){if(!this.isNameWidth||"name"!==t)for(var i=0;i<e.length;i++)if(e[i].field===t){var n=void 0;n=""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?this.element.clientWidth<=680?"name"===t?"120px":"180px":"auto":this.element.clientWidth<=500?"120px":"auto",e[i].width=n}},e.prototype.getColumns=function(){var e,i=this.parent.enableHtmlSanitizer;if(this.parent.isMobile)e=[{field:"name",headerText:H(this.parent,"Name"),width:"auto",minWidth:120,headerTextAlign:"Left",template:t.initializeCSPTemplate(function(e){return'<div class="e-fe-text">'+(i?t.SanitizeHtmlHelper.sanitize(e.name):e.name)+'</div><div class="e-fe-date">'+e._fm_modified+'</div><span class="e-fe-size">'+e.size+"</span>"})}];else{e=t.extend([],this.parent.detailsViewSettings.columns,null,!0),this.adjustWidth(e,"name");for(var n=this,s=0,a=e.length;s<a;s++)!function(s,a){if(e[s].headerText=H(n.parent,e[s].headerText),"name"===e[s].field&&!t.isNullOrUndefined(e[s].template)&&"function"!=typeof e[s].template){var r=e[s].template;e[s].template=t.initializeCSPTemplate(function(e){var n=i?t.SanitizeHtmlHelper.sanitize(e.name):e.name;return r.replace(/\${name}/g,n)})}}(s)}var r=this.parent.isMobile||this.parent.isBigger?"54":"46",o={field:"type",width:r,minWidth:r,template:t.initializeCSPTemplate(function(e){return'<span class="e-fe-icon '+e._fm_iconClass+'"></span>'}),allowResizing:!1,allowSorting:!0,customAttributes:{class:"e-fe-grid-icon"},headerTemplate:t.initializeCSPTemplate(function(){return'<span class="e-fe-icon e-fe-folder"></span>'})};if(e.unshift(o),this.parent.showItemCheckBoxes){var l=this.parent.isBigger?"36":"26",h={type:"checkbox",width:l,minWidth:l,customAttributes:{class:"e-fe-checkbox"},allowResizing:!1,allowSorting:!1};this.parent.isMobile?e.push(h):e.unshift(h)}for(var s=0,a=e.length;s<a;s++)e[s].disableHtmlEncode=!this.parent.enableHtmlSanitizer;return e},e.prototype.adjustHeight=function(){if(this.gridObj){var e=t.select("#"+this.parent.element.id+ri,this.parent.element),i=t.select("#"+this.parent.element.id+oi,this.parent.element),n=t.select("."+Vi,this.parent.element),s=e.offsetHeight-i.offsetHeight-n.offsetHeight;this.gridObj.height=s,this.gridObj.dataBind()}},e.prototype.renderCheckBox=function(){this.gridObj.columns=this.getColumns(),this.isColumnRefresh=!0,this.gridObj.refreshColumns()},e.prototype.onRowDataBound=function(e){var i=t.select(".e-fe-grid-name",e.row);if(!i)for(var n=this.parent.detailsViewSettings.columns,s=0;s<n.length;s++)if("name"===n[s].field){i=e.row.children[this.parent.allowMultiSelection?s+2:s+1];break}if(i&&i.setAttribute("title",t.getValue("name",e.data)),this.parent.isLayoutChange&&this.parent.isCut&&"move"===this.parent.fileAction&&this.parent.selectedNodes&&0!==this.parent.selectedNodes.length&&-1!==this.parent.selectedNodes.indexOf(t.getValue("name",e.data))&&I(e.row),!this.parent.showFileExtension&&t.getValue("isFile",e.data)){var a=e.row.querySelector(".e-fe-text");if(a){var r=t.getValue("name",e.data),o=t.getValue("type",e.data);a.innerHTML=r.substr(0,r.length-o.length)}}if(void 0!==t.getValue("size",e.data)&&e.row.querySelector(".e-fe-size")){var l=e.row.querySelector(".e-fe-size"),h=void 0;if(t.getValue("isFile",e.data)){for(var d=t.getValue("size",e.data),p=new t.Internationalization(this.parent.locale),c=void 0,n=this.parent.detailsViewSettings.columns,s=0;s<n.length;s++)if("size"===n[s].field){c=t.isNullOrUndefined(n[s].format)?"n":n[s].format.toString();break}h=p.formatNumber(d/1024,{format:c})+" "+H(this.parent,"KB")}else h="";l.innerHTML=h}if(this.parent.isMobile&&void 0!==t.getValue("_fm_modified",e.data)&&e.row.querySelector(".e-fe-date")){for(var u=e.row.querySelector(".e-fe-date"),p=new t.Internationalization(this.parent.locale),n=this.parent.detailsViewSettings.columns,f=void 0,s=0;s<n.length;s++)if("dateModified"===n[s].field){f=n[s].format;break}var g=p.formatDate(new Date(t.getValue("_fm_modified",e.data)),f);u.innerHTML=g}var m=e.row.querySelector("."+Si);m&&m.classList.add("e-small"),ye(e.data)||(e.row.className+=" "+be(e.data));var b={element:e.row,fileDetails:e.data,module:"DetailsView"};this.parent.trigger("fileLoad",b)},e.prototype.onActionBegin=function(e){if("sorting"===e.requestType){if(this.parent.setProperties({sortOrder:e.direction},!0),this.parent.setProperties({sortBy:e.columnName},!0),0!==this.parent.selectedItems.length){this.sortItem=!0;var i=this.gridObj.getSelectedRowIndexes(),n=i.length;for(this.sortSelectedNodes=[];n>0;){var s=this.gridObj.getRowsObject()[i[n-1]].data;this.sortSelectedNodes.push(t.getValue(this.parent.hasId?"id":"name",s)),n--}}this.parent.notify(In,{})}},e.prototype.onHeaderCellInfo=function(e){var t=e.node.querySelector("."+Si);t&&t.classList.add("e-small")},e.prototype.onBeforeDataBound=function(e){var t=this;n.showSpinner(this.parent.element);var i=this.parent.detailsViewSettings.columns.find(function(e){return e.field===t.parent.sortBy});if(i&&!("sortComparer"in i)){var s=L(this.parent,this.parent.enableVirtualization?e.result:this.gridObj.dataSource);e.result=s}},e.prototype.onDataBound=function(){if(this.createDragObj(),(0!==this.parent.selectedItems.length&&!this.parent.enableVirtualization||0!==this.parent.selectedItems.length&&this.parent.enableVirtualization&&0==this.element.querySelector(".e-content").scrollTop)&&this.selectRecords(this.parent.selectedItems),!0===this.isPasteOperation&&(this.isColumnRefresh?this.isColumnRefresh=!1:(this.selectRecords(this.parent.pasteNodes),this.isPasteOperation=!1)),this.parent.createdItem&&(this.selectRecords([t.getValue(this.parent.hasId?"id":"name",this.parent.createdItem)]),this.parent.createdItem=null),this.parent.layoutSelectedItems.length&&this.selectRecords(this.parent.layoutSelectedItems),this.parent.renamedItem&&(this.addSelection(this.parent.renamedItem),this.parent.renamedItem=null),!0===this.sortItem&&(this.selectRecords(this.sortSelectedNodes),this.sortItem=!1),this.isSelectionUpdate&&(this.isColumnRefresh?this.isColumnRefresh=!1:(this.selectRecords(this.currentSelectedItem),this.isSelectionUpdate=!1)),!0===this.uploadOperation&&(this.count++,this.selectRecords(this.parent.uploadItem),this.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[])),this.gridObj.currentViewData.length*this.gridObj.getRowHeight()<this.gridObj.height)(e=this.gridObj.getHeaderContent()).style.paddingRight="",e.style.paddingLeft="",t.select(".e-headercontent",e).style.borderRightWidth="0",(i=this.gridObj.getContent().querySelector(".e-content")).style.overflowY="",i.classList.add("e-scrollShow");else{var e=this.gridObj.getHeaderContent();this.parent.enableRtl?e.style.paddingLeft="16px":e.style.paddingRight="16px";var i=this.gridObj.getContent().querySelector(".e-content");i.classList.remove("e-scrollShow")}this.isRendered=!0,this.parent.isLayoutChange=!1,n.hideSpinner(this.parent.element),this.checkEmptyDiv(this.emptyArgs),this.isInteracted=!!this.isLoaded||this.isInteracted,this.isLoaded=!1},e.prototype.selectRecords=function(e){for(var i=this.gridObj.getCurrentViewRecords(),n=[],s=0,a=i.length;s<a;s++){var r=this.parent.hasId?t.getValue("id",i[s]):T(this.parent,i[s]);if(-1!==e.indexOf(r))n.push(s);else if(!this.parent.showFileExtension&&r.includes(".")){var o=r.split(".").slice(0,-1).join(".");-1!==e.indexOf(o)&&n.push(s)}}0!==n.length&&(this.gridObj.selectRows(n),this.addFocus(this.gridObj.selectedRowIndex))},e.prototype.addSelection=function(e){var i=this.gridObj.getCurrentViewRecords(),n=[];if(this.parent.hasId)n=new s.DataManager(i).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new s.DataManager(i).executeLocal((new s.Query).where("name","equal",t.getValue("name",e),!1));a.length>0&&(n=new s.DataManager(a).executeLocal((new s.Query).where("filterPath","equal",this.parent.filterPath,!1)))}if(n.length>0){var r=i.indexOf(n[0]);this.gridObj.selectRows([r])}},e.prototype.onSortColumn=function(){"None"!==this.parent.sortOrder?this.gridObj.sortModule.sortColumn(this.parent.sortBy,this.parent.sortOrder):this.gridObj.dataSource=L(this.parent,this.gridObj.dataSource),0!==this.element.querySelector(".e-content").scrollTop&&this.gridObj.freezeRefresh()},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var i=0,n=Object.keys(e.newProp);i<n.length;i++)switch(n[i]){case"allowDragAndDrop":this.createDragObj();break;case"height":this.adjustHeight();break;case"detailsViewSettings":if(!t.isNullOrUndefined(this.gridObj)){this.checkNameWidth();var s=this.getColumns();this.gridObj.columns=s,this.gridObj.allowResizing=this.parent.detailsViewSettings.columnResizing,this.gridObj.dataBind(),this.gridObj.refreshColumns()}break;case"selectedItems":if(this.interaction=!1,0!==this.parent.selectedItems.length){if(!this.parent.allowMultiSelection){var a=this.parent.selectedItems.slice(this.parent.selectedItems.length-1);this.parent.setProperties({selectedItems:a},!0)}this.selectRecords(this.parent.selectedItems),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)}else t.isNullOrUndefined(this.gridObj)||(this.gridObj.clearSelection(),this.interaction=!0);break;case"showFileExtension":case"showHiddenItems":Se(this.parent,ln,this.parent.path);break;case"allowMultiSelection":t.isNullOrUndefined(this.gridObj)||(this.currentSelectedItem=this.parent.selectedItems,this.gridObj.selectionSettings.type=e.newProp.allowMultiSelection?"Multiple":"Single",this.isSelectionUpdate=!0,this.renderCheckBox());break;case"view":C(this.parent,"Details");break;case"width":this.onDetailsResize()}},e.prototype.onPathChanged=function(e){this.parent.isCut=!1,""===this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.gridObj&&(this.parent.searchedItems=[],this.parent.isFiltered?this.updatePathColumn():this.removePathColumn(!1)),O(this.parent),"Details"===this.parent.view&&(this.isInteracted=!1,n.showSpinner(this.parent.element),this.parent.setProperties({selectedItems:[]},!0),this.gridObj.dataSource=L(this.parent,e.files),this.gridObj.freezeRefresh(),this.parent.isReact&&this.gridObj.on("reactTemplateRender",this.reactTemplateRender,this)),this.emptyArgs=e},e.prototype.updatePathColumn=function(){var e=this.gridObj.columns.length,t=JSON.parse(JSON.stringify(this.gridObj.columns));if(t[e-1].field&&"filterPath"!==t[e-1].field&&!this.parent.isMobile){var i={field:"filterPath",headerText:H(this.parent,"Path"),minWidth:180,width:"auto"};this.gridObj.columns.push(i),this.adjustWidth(this.gridObj.columns,"filterPath"),this.adjustWidth(this.gridObj.columns,"name"),this.isColumnRefresh=!0,this.gridObj.refreshColumns()}},e.prototype.checkEmptyDiv=function(e){var i=L(this.parent,e.files);if(0!==i.length||t.isNullOrUndefined(this.element.querySelector("."+Bi))){if(0!==i.length&&this.element.querySelector("."+xi))if(this.element.querySelector("."+Bi).querySelector("."+xi)){var n=this.element.querySelector("."+Bi).querySelector("."+xi);this.element.querySelector("."+Bi).removeChild(n)}else this.element.removeChild(this.element.querySelector("."+xi))}else F(this.parent,this.element,e)},e.prototype.onOpenInit=function(){if("detailsview"===this.parent.activeModule){var e=this.gridObj.getSelectedRecords()[0];this.openContent(e)}},e.prototype.DblClickEvents=function(e){this.gridObj.selectRows([e.rowIndex]);var t;e.rowData&&(t=JSON.parse(JSON.stringify(e.rowData)),this.openContent(t))},e.prototype.openContent=function(e){var i=this;if(!ve(e))return void me(this.parent,e,_n);var n={cancel:!1,fileDetails:e,module:"DetailsView"};this.parent.trigger("fileOpen",n,function(n){if(!n.cancel){var s=t.getValue("name",e);if(t.getValue("isFile",e)){if(R(e)===Ti){var a=M(i.parent,e);Ot(i.parent,s,a)}}else{if(""!==i.parent.breadcrumbbarModule.searchObj.element.value||i.parent.isFiltered)K(i.parent,e);else{var r=t.getValue("id",e);i.parent.oldPath=i.parent.path;var o=i.parent.path+(t.isNullOrUndefined(r)?s:r)+"/";i.parent.setProperties({path:o},!0),i.parent.pathNames.push(s),i.parent.pathId.push(t.getValue("_fm_id",e)),i.parent.itemData=[e],x(i.parent)}i.parent.isFiltered=!1}i.element.focus(),i.parent.enableVirtualization&&i.parent.element.querySelector("#"+i.parent.element.id+si).focus()}})},e.prototype.onLayoutChange=function(e){"Details"===this.parent.view&&(this.parent.enableVirtualization&&this.parent.setProperties({selectedItems:[]},!0),this.gridObj?this.isLoaded=!0:this.render(e),this.parent.isFiltered&&(this.updatePathColumn(),this.parent.setProperties({selectedItems:[]},!0)),this.gridObj.dataSource=L(this.parent,e.files),this.parent.notify("hide-layout",{}),this.gridObj.element.classList.remove(Ji),this.isInteracted=!1,this.gridObj.clearSelection(),""!==this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.onSearchFiles(e),this.adjustHeight(),this.gridObj.sortSettings.columns.length>0&&this.gridObj.sortSettings.columns[0].field!==this.parent.sortBy&&"None"!==this.parent.sortOrder&&this.gridObj.sortColumn(this.parent.sortBy,this.parent.sortOrder))},e.prototype.onSearchFiles=function(e){"Details"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(bn,{}),this.parent.isLayoutChange||(this.parent.layoutSelectedItems=[]),this.updatePathColumn(),this.parent.searchedItems=e.files,this.onPathChanged(e))},e.prototype.removePathColumn=function(e){var i=this.gridObj.columns.length,n=JSON.parse(JSON.stringify(this.gridObj.columns));n[i-1].field&&"filterPath"===n[i-1].field&&(t.isNullOrUndefined(this.gridObj.sortSettings.columns[0])||"filterPath"!==this.gridObj.sortSettings.columns[0].field||("None"!==this.parent.sortOrder?this.gridObj.sortColumn("name",this.parent.sortOrder):this.gridObj.dataSource=L(this.parent,this.gridObj.dataSource),this.parent.notify(In,{})),this.gridObj.columns.pop(),e||(this.isColumnRefresh=!0,this.gridObj.refreshColumns()))},e.prototype.onFinalizeEnd=function(e){"Details"===this.parent.view&&(this.gridObj?this.onPathChanged(e):this.render(e))},e.prototype.onCreateEnd=function(e){"Details"===this.parent.view&&this.onPathChanged(e)},e.prototype.onRenameInit=function(){"detailsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},e.prototype.onSelectedData=function(){"detailsview"===this.parent.activeModule&&(this.parent.itemData=this.gridObj.getSelectedRecords())},e.prototype.onDeleteInit=function(){"detailsview"===this.parent.activeModule&&Ee(this.parent,this.parent.selectedItems,this.parent.path,"delete")},e.prototype.onDeleteEnd=function(e){"Details"===this.parent.view&&(this.onPathChanged(e),this.parent.setProperties({selectedItems:[]},!0))},e.prototype.onRefreshEnd=function(e){"Details"===this.parent.view&&(this.isInteracted=!1,this.removePathColumn(!1),this.gridObj.dataSource=L(this.parent,e.files),this.emptyArgs=e)},e.prototype.onHideLayout=function(){"Details"!==this.parent.view&&this.gridObj&&this.gridObj.element.classList.add(Ji)},e.prototype.onSelectAllInit=function(){"Details"===this.parent.view&&(this.isInteracted=!1,this.parent.allowMultiSelection?this.gridObj.selectionModule.selectRowsByRange(0,this.gridObj.getRows().length):this.gridObj.selectRow(this.gridObj.getRows().length-1),this.isInteracted=!0,this.interaction=!0)},e.prototype.onClearAllInit=function(){"Details"===this.parent.view&&(this.removeSelection(),this.interaction=!0)},e.prototype.onSelectionChanged=function(){t.removeClass([this.element],"e-headercheck"),this.parent.selectedItems.length>0&&t.addClass([this.element],"e-headercheck")},e.prototype.onLayoutRefresh=function(){"Details"===this.parent.view&&this.adjustHeight()},e.prototype.onBeforeRequest=function(){this.isRendered=!1},e.prototype.onAfterRequest=function(){this.isRendered=!0},e.prototype.onUpdateSelectionData=function(){"Details"===this.parent.view&&(this.parent.itemData=this.gridObj.getSelectedRecords())},e.prototype.addEventListener=function(){this.parent.on(en,this.onFinalizeEnd,this),this.parent.on(hn,this.destroy,this),this.parent.on(yn,this.onLayoutChange,this),this.parent.on(ln,this.onPathChanged,this),this.parent.on(tn,this.onCreateEnd,this),this.parent.on(Ln,this.onDropInit,this),this.parent.on(On,this.onDetailsInit,this),this.parent.on(rn,this.onRefreshEnd,this),this.parent.on(fn,this.onSearchFiles,this),this.parent.on(Vn,this.onMethodCall,this),this.parent.on(un,this.onActionFailure,this),this.parent.on($i,this.onPropertyChanged,this),this.parent.on(sn,this.onDeleteInit,this),this.parent.on(an,this.onDeleteEnd,this),this.parent.on("selected-data",this.onSelectedData,this),this.parent.on(Dn,this.onRenameInit,this),this.parent.on(Sn,this.onPathChanged,this),this.parent.on(gn,this.onOpenInit,this),this.parent.on(Mn,this.onSortColumn,this),this.parent.on(mn,this.onPathChanged,this),this.parent.on("filter-end",this.onPathChanged,this),this.parent.on(Nn,this.onPasteInit,this),this.parent.on("hide-layout",this.onHideLayout,this),this.parent.on("select-all-init",this.onSelectAllInit,this),this.parent.on("clear-all-init",this.onClearAllInit,this),this.parent.on(kn,this.onPathColumn,this),this.parent.on(bn,this.onSelectionChanged,this),this.parent.on(dn,this.onBeforeRequest,this),this.parent.on(cn,this.onAfterRequest,this),this.parent.on(En,this.onpasteEnd,this),this.parent.on(Pn,this.oncutCopyInit,this),this.parent.on(wn,this.onMenuItemData,this),this.parent.on(on,this.onDetailsResizeHandler,this),this.parent.on("splitter-resize",this.onDetailsResize,this),this.parent.on("layout-refresh",this.onLayoutRefresh,this),this.parent.on(Fn,this.onDropPath,this),this.parent.on("update-selection-data",this.onUpdateSelectionData,this)},e.prototype.removeEventListener=function(){this.parent.off(en,this.onFinalizeEnd),this.parent.off(hn,this.destroy),this.parent.off(yn,this.onLayoutChange),this.parent.off(ln,this.onPathChanged),this.parent.off(Nn,this.onPasteInit),this.parent.off(tn,this.onCreateEnd),this.parent.off(rn,this.onRefreshEnd),this.parent.off(fn,this.onSearchFiles),this.parent.off(Vn,this.onMethodCall),this.parent.off(un,this.onActionFailure),this.parent.off($i,this.onPropertyChanged),this.parent.off(Dn,this.onRenameInit),this.parent.off(Sn,this.onPathChanged),this.parent.off("filter-end",this.onPathChanged),this.parent.off(gn,this.onOpenInit),this.parent.off(Mn,this.onSortColumn),this.parent.off(mn,this.onPathChanged),this.parent.off("hide-layout",this.onHideLayout),this.parent.off("select-all-init",this.onSelectAllInit),this.parent.off("clear-all-init",this.onClearAllInit),this.parent.off(sn,this.onDeleteInit),this.parent.off(an,this.onDeleteEnd),this.parent.off(kn,this.onPathColumn),this.parent.off(bn,this.onSelectionChanged),this.parent.off(dn,this.onBeforeRequest),this.parent.off(cn,this.onAfterRequest),this.parent.off(En,this.onpasteEnd),this.parent.off(Pn,this.oncutCopyInit),this.parent.off(Ln,this.onDropInit),this.parent.off("selected-data",this.onSelectedData),this.parent.off(On,this.onDetailsInit),this.parent.off(wn,this.onMenuItemData),this.parent.off(on,this.onDetailsResizeHandler),this.parent.off("splitter-resize",this.onDetailsResize),this.parent.off("layout-refresh",this.onLayoutRefresh),this.parent.off(Fn,this.onDropPath),this.parent.off("update-selection-data",this.onUpdateSelectionData)},e.prototype.onActionFailure=function(){this.interaction=!0},e.prototype.onMenuItemData=function(e){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=[this.gridObj.getRowInfo(e.target).rowData])},e.prototype.onPasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""!==this.parent.folderPath?this.gridObj.getSelectedRecords():[P(this.parent)])},e.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.parent.itemData=this.gridObj.getSelectedRecords():this.parent.itemData=[t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},e.prototype.dragHelper=function(e){var t=e.sender.target.closest("tr.e-row");if(!t)return null;var i;t.getElementsByClassName("e-fe-text")[0]?i=this.parent.hasId?this.gridObj.getRowInfo(t).rowData.id:t.getElementsByClassName("e-fe-text")[0].innerText:t.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling&&(i=this.parent.hasId?this.gridObj.getRowInfo(t).rowData.id:t.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling.innerText),t&&!t.querySelector(".e-active")&&this.selectRecords([i]),w(this.parent,t),this.parent.activeElements=[],this.parent.dragData=[],this.parent.dragData=this.gridObj.getSelectedRecords();var n;return 0===this.parent.dragData.length&&t&&(n=this.gridObj.getRowInfo(t)),n&&this.parent.dragData.push(n.rowData),this.parent.dragPath=this.parent.path,this.parent.activeElements=this.gridObj.getSelectedRows(),te(this.parent),this.parent.virtualDragElement},e.prototype.onDetailsResize=function(){if("Details"===this.parent.view&&!this.parent.isMobile&&!t.isNullOrUndefined(this.gridObj))for(var e=this.gridObj.getHeaderContent().querySelector(".e-headercontent").firstChild.childNodes[0],i=this.gridObj.getContent().querySelector(".e-content .e-table").children[0],n=this.gridObj.getColumns(),s=0;s<n.length;s++)(!this.isNameWidth&&"name"===n[s].field||"filterPath"===n[s].field)&&(""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?this.element.clientWidth<=680?"name"===n[s].field?(e.children[s].setAttribute("style","width: 120px"),i.children[s].setAttribute("style","width: 120px")):(e.children[s].setAttribute("style","width: 180px"),i.children[s].setAttribute("style","width: 180px")):this.element.clientWidth>680&&(e.children[s].setAttribute("style","width: auto"),i.children[s].setAttribute("style","width: auto")):this.element.clientWidth<=500?(e.children[s].setAttribute("style","width: 120px"),i.children[s].setAttribute("style","width: 120px")):this.element.clientWidth>500&&(e.children[s].setAttribute("style","width: auto"),i.children[s].setAttribute("style","width: auto")))},e.prototype.onDetailsResizeHandler=function(){this.onDetailsResize(),"Details"!==this.parent.view||this.parent.isMobile||t.isNullOrUndefined(this.gridObj)||this.adjustHeight()},e.prototype.createDragObj=function(){var e=this;this.gridObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.gridObj.element,{cursorAt:this.parent.dragCursorPosition,distance:5,enableTailMode:!0,dragArea:this.parent.element,dragTarget:"."+ji,drag:le.bind(this,this.parent),dragStart:function(t){ne(e.parent,t,e.dragObj)},dragStop:ie.bind(this,this.parent),enableAutoScroll:!1,helper:this.dragHelper.bind(this)})):!this.parent.allowDragAndDrop&&this.dragObj&&this.dragObj.destroy())},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent);if(e.target.closest("tr")){var n=null;n=this.gridObj.getRowInfo(e.target).rowData,this.parent.dropPath=n.isFile?this.parent.path:k(this.parent,n,this.parent.path),this.parent.dropData=n.isFile?i:n}else this.parent.dropPath=this.parent.path,this.parent.dropData=i}},e.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.gridObj.getSelectedRecords(),this.parent.activeElements=this.gridObj.getSelectedRows())},e.prototype.onpasteEnd=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,this.parent.path!==this.parent.destinationPath&&this.parent.path!==X(this.parent,e)||this.onPathChanged(e))},e.prototype.onDropPath=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},e.prototype.getModuleName=function(){return"detailsview"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.gridObj&&(this.parent.isReact&&this.gridObj.off("reactTemplateRender",this.reactTemplateRender),this.unWireEvents(),this.gridObj.destroy()))},e.prototype.updateType=function(e){var i=t.select("."+ki,e);this.parent.isFile=!!t.isNullOrUndefined(i)},e.prototype.onSelection=function(e,t){var i={action:e,fileDetails:t.data,isInteracted:this.interaction,cancel:!1,target:t.target};this.parent.trigger("fileSelection",i),t.cancel=i.cancel},e.prototype.onSelected=function(e){this.parent.activeModule="detailsview",this.parent.isLayoutChange&&!this.parent.isFiltered||this.selectedRecords(),this.parent.notify(bn,{}),1===this.gridObj.getSelectedRowIndexes().length&&(this.firstItemIndex=this.gridObj.selectedRowIndex),this.gridObj.element.setAttribute("tabindex","-1"),this.triggerSelect("select",e);var i=this.gridObj.getRowByIndex(this.gridObj.selectedRowIndex);if(this.updateType(i),!t.isNullOrUndefined(i)&&!t.isNullOrUndefined(i.querySelector(".e-checkselect"))){if(1!==this.gridObj.getSelectedRowIndexes().length){var n=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2];this.gridObj.getRowByIndex(n).querySelector(".e-checkselect").setAttribute("tabindex","-1")}i.querySelector(".e-rowcell.e-fe-checkbox").removeAttribute("tabindex")}t.isNullOrUndefined(this.gridObj)||t.isNullOrUndefined(this.gridObj.element.querySelector(".e-checkselectall"))||this.gridObj.element.querySelector(".e-checkselectall").setAttribute("tabindex","-1");var s=this.gridObj.getSelectedRowIndexes();if(!this.parent.allowMultiSelection)for(var a=0;a<s.length;a++)s[a]===this.gridObj.selectedRowIndex?this.gridObj.getRowByIndex(s[a]).setAttribute("tabindex","0"):this.gridObj.getRowByIndex(s[a]).removeAttribute("tabindex");var r=s.length;if(this.parent.enableVirtualization)this.parent.currentItemText=t.getValue("name",e.data);else if(r>0){var o=this.gridObj.getRowsObject()[s[r-1]].data;this.parent.currentItemText=t.getValue("name",o)}var l=t.getValue("rowIndexes",e),h=t.getValue("enableSelectMultiTouch",this.gridObj.selectionModule);this.parent.isDevice&&t.isNullOrUndefined(l)&&e.target&&!h&&!e.target.closest(".e-headercell")&&(this.parent.isFile=t.getValue("isFile",e.data),this.parent.isFile||this.openContent(e.data)),this.parent.visitedItem=e.row,this.parent.enableVirtualization&&e.isHeaderCheckboxClicked||this.addFocus(this.gridObj.selectedRowIndex),this.parent.isLayoutChange||(this.isInteracted=!0)},e.prototype.onPathColumn=function(){"Details"!==this.parent.view||t.isNullOrUndefined(this.gridObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||this.removePathColumn(!1)},e.prototype.selectedRecords=function(){this.parent.setProperties({selectedItems:[]},!0);for(var e=this.gridSelectNodes(),t=0;t<e.length;){var i=e[t],n=de(this.parent,i);this.parent.selectedItems.push(n),t++}this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)},e.prototype.onDeSelection=function(e){if(!this.parent.allowMultiSelection&&t.isNullOrUndefined(e.data))this.gridObj.getRowByIndex(e.rowIndex).removeAttribute("tabindex");else if(this.gridObj.getSelectedRowIndexes().length>1){var i=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2];this.gridObj.getRowByIndex(i).querySelector(".e-checkselect").removeAttribute("tabindex")}if(-1===this.gridObj.selectedRowIndex&&this.gridObj.element.setAttribute("tabindex","0"),!this.isInteracted)return void(this.isInteracted=!0);this.selectedRecords(),0===this.parent.selectedItems.length&&(t.setValue("enableSelectMultiTouch",!1,this.gridObj.selectionModule),t.removeClass([this.parent.element],"e-fe-m-select")),this.parent.notify(bn,{}),this.triggerSelect("unselect",e),this.parent.visitedItem=null},e.prototype.triggerSelect=function(e,t){var i={action:e,fileDetails:t.data,isInteracted:this.interaction};this.parent.trigger("fileSelect",i),this.interaction=!0},e.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new t.KeyboardEvents(this.gridObj.element,{keyAction:this.keyupHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new t.KeyboardEvents(this.element,{keyAction:this.keydownHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),t.EventHandler.add(this.gridObj.element,"blur",this.removeFocus,this),t.EventHandler.add(this.parent.element,"focusout",this.onBlur,this)},e.prototype.unWireEvents=function(){this.wireClickEvent(!1),this.keyboardModule.destroy(),this.keyboardDownModule.destroy(),t.EventHandler.remove(this.gridObj.element,"blur",this.removeFocus),t.EventHandler.remove(this.parent.element,"focusout",this.onBlur)},e.prototype.wireClickEvent=function(e){if(e){var i=this,n=this.gridObj.getContent();this.clickObj=new t.Touch(n,{tap:function(e){1===e.tapCount&&e.originalEvent.target.classList.contains("e-content")&&i.onClearAllInit()},tapHold:function(e){if(i.parent.isDevice){e.originalEvent.preventDefault(),i.parent.allowMultiSelection&&(t.setValue("enableSelectMultiTouch",i.parent.allowMultiSelection,i.gridObj.selectionModule),t.addClass([i.parent.element],"e-fe-m-select"));var n=e.originalEvent.target;if(n){var s=t.closest(n,"."+ji),a=i.gridObj.getRows().indexOf(s);i.gridObj.selectRow(a)}}}})}else this.clickObj&&this.clickObj.destroy()},e.prototype.removeSelection=function(){t.removeClass([this.parent.element],"e-fe-m-select"),this.gridObj.clearSelection(),this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(bn,{}),-1===this.gridObj.selectedRowIndex&&(this.startIndex=null),this.isInteracted=!0},e.prototype.removeFocus=function(){this.addFocus(null)},e.prototype.onBlur=function(e){if((null===e.relatedTarget||t.closest(e.relatedTarget,".e-grid")===e.relatedTarget)&&!t.isNullOrUndefined(this.gridObj.element))for(var i=this.gridObj.element.querySelectorAll("th"),n=0;n<i.length;n++)i[n].classList.contains("e-focus")&&this.addFocus(null)},e.prototype.getFocusedItemIndex=function(){return t.isNullOrUndefined(this.getFocusedItem())?null:parseInt(this.getFocusedItem().getAttribute("data-rowindex"),10)},e.prototype.keydownHandler=function(e){if(this.isRendered)switch(e.action){case"end":case"home":case"space":case"ctrlSpace":case"shiftSpace":case"csSpace":case"ctrlA":case"enter":case"altEnter":case"ctrlEnd":case"shiftEnd":case"csEnd":case"ctrlHome":case"shiftHome":case"csHome":case"ctrlDown":case"shiftDown":case"csDown":case"ctrlLeft":case"shiftLeft":case"csLeft":case"esc":case"del":case"shiftdel":case"ctrlC":case"ctrlV":case"ctrlX":case"f2":case"moveDown":case"moveUp":case"ctrlD":e.preventDefault()}},e.prototype.keyupHandler=function(e){if(this.isRendered){e.preventDefault();var i,n,s,a=e.action,r=L(this.parent,this.gridObj.dataSource),o=r.length,l=(this.getFocusedItem(),this.getFocusedItemIndex()),h=this.gridObj.selectedRowIndex,d=this.gridObj.getSelectedRowIndexes();switch(a){case"altEnter":this.parent.notify(On,{}),Re(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":v(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"enter":if(-1===this.gridObj.selectedRowIndex&&!0===this.gridObj.allowSorting){if(!e.target.classList.contains("e-fe-grid-icon")){var p=e.target.getElementsByClassName("e-ascending").length?"Descending":"Ascending",c=this.gridObj.getColumnByUid(e.target.querySelector(".e-headercelldiv").getAttribute("e-mappinguid")).field;this.gridObj.sortColumn(c,p),t.isNullOrUndefined(this.getFocusedItem().nextSibling)||this.getFocusedItem().nextSibling.setAttribute("tabindex","0")}break}if(i=this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data){var u=JSON.parse(JSON.stringify(i));this.openContent(u)}break;case"ctrlC":N(this.parent);break;case"ctrlV":this.parent.folderPath="",G(this.parent);break;case"ctrlX":E(this.parent);break;case"ctrlD":this.doDownload();break;case"f2":this.performRename();break;case"ctrlA":if(!t.isNullOrUndefined(r[0])&&this.parent.allowMultiSelection){var f=this.gridObj.getContent().querySelector(".e-content"),g=f.scrollTop,m=this.gridObj.selectedRowIndex;this.gridObj.selectionModule.selectRowsByRange(0,r.length-1),f.scrollTop=g,-1!==m&&this.addFocus(m)}break;case"ctrlHome":case"tab":if(!t.isNullOrUndefined(r[0]))if(this.parent.allowMultiSelection||"ctrlHome"!==e.action){if(-1!==this.gridObj.selectedRowIndex&&"tab"===e.action)return;this.addHeaderFocus(e)}else this.gridObj.selectRow(0);break;case"ctrlEnd":t.isNullOrUndefined(r[0])||(this.parent.allowMultiSelection?this.addFocus(o-1):this.gridObj.selectRow(o-1));break;case"shiftHome":case"shiftEnd":case"csHome":case"csEnd":this.parent.allowMultiSelection?t.isNullOrUndefined(r[0])||(t.isNullOrUndefined(h)||-1===h?"csHome"===e.action||"shiftHome"===e.action?this.gridObj.selectRow(0):this.gridObj.selectionModule.selectRowsByRange(0,r.length-1):this.checkRowsKey(r,h,null,e)):this.gridObj.selectRow("shiftHome"===e.action||"csHome"===e.action?0:r.length-1);break;case"space":case"csSpace":case"shiftSpace":case"ctrlSpace":this.spaceSelection(d,l,h,e);break;case"csUp":case"csDown":case"shiftUp":case"shiftDown":this.shiftMoveMethod(r,h,l,d,e);break;case"ctrlUp":case"ctrlDown":this.parent.allowMultiSelection?this.ctrlMoveFunction(r,e,h):this.moveFunction(r,e,h);break;case"home":n=[t.getValue(this.parent.hasId?"id":"name",r[0])],this.parent.setProperties({selectedItems:n},!0),this.selectRecords(n);break;case"moveUp":case"moveDown":this.moveFunction(r,e,h);break;case"end":s=[t.getValue(this.parent.hasId?"id":"name",r[o-1])],this.parent.setProperties({selectedItems:s},!0),this.selectRecords(s)}}},e.prototype.gridSelectNodes=function(){return this.gridObj.getSelectedRecords()},e.prototype.doDownload=function(){if(0!==this.parent.selectedItems.length){this.parent.itemData=this.gridObj.getSelectedRecords();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!we(e[t]))return void me(this.parent,e[t],qn);We(this.parent,this.parent.path,this.parent.selectedItems)}},e.prototype.performDelete=function(){if(this.parent.selectedItems&&this.parent.selectedItems.length>0){this.parent.itemData=this.gridObj.getSelectedRecords();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!ye(e[t]))return void me(this.parent,e[t],Hn);Ke(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),ce(this.parent))},e.prototype.updateRenameData=function(){var e=this.gridSelectNodes()[0];pe(this.parent,e)},e.prototype.shiftMoveMethod=function(e,t,i,n,s){this.parent.allowMultiSelection?-1!==t||"csUp"!==s.action&&"csDown"!==s.action?-1===t||i===t||("csUp"===s.action||"csDown"===s.action)&&this.isSelected(n,i)?this.shiftSelectedItem(t,n,e,s):this.shiftSelectFocusItem(t,i,n,s):this.ctrlMoveFunction(e,s,t):this.moveFunction(e,s,t)},e.prototype.moveFunction=function(e,i,n){!t.isNullOrUndefined(this.getFocusedItem())&&this.parent.allowMultiSelection?"moveDown"===i.action?this.gridObj.selectRow(this.getFocusedItemIndex()+1):this.gridObj.selectRow(this.getFocusedItemIndex()-1):t.isNullOrUndefined(n)||-1===n?t.isNullOrUndefined(e[0])||this.gridObj.selectRow(0):"moveDown"===i.action||"ctrlDown"===i.action||"shiftDown"===i.action||"csDown"===i.action?this.gridObj.selectRow(n+(n!==e.length-1?1:0)):this.gridObj.selectRow(n-(0!==n?1:0))},e.prototype.spaceSelection=function(e,i,n,s){if(this.isSelected(e,i)||-1===n||"shiftSpace"!==s.action&&"csSpace"!==s.action)if(t.isNullOrUndefined(this.getFocusedItem())||i===n)if(-1!==n&&"ctrlSpace"===s.action&&this.parent.allowMultiSelection){var a=n;e.pop(),this.gridObj.selectRows(e),this.addFocus(a)}else"shiftSpace"===s.action&&this.gridObj.selectRow(n);else e.push(this.getFocusedItemIndex()),this.gridObj.selectRows(e);else i<n?this.gridObj.selectionModule.selectRowsByRange(i,n):this.gridObj.selectionModule.selectRowsByRange(n,i)},e.prototype.ctrlMoveFunction=function(e,i,n){var s;if(t.isNullOrUndefined(this.getFocusedItem()))t.isNullOrUndefined(n)||-1===n?t.isNullOrUndefined(e[0])||(s=0):s="ctrlDown"===i.action||"csDown"===i.action?n+(n<e.length?1:0):n-(n<1?0:1);else{var a=this.getFocusedItemIndex();s="ctrlDown"===i.action||"csDown"===i.action?a+(a<e.length-1?1:0):a-(a<1?0:1)}this.addFocus(s)},e.prototype.checkRowsKey=function(e,i,n,s){"Uncheck"===this.gridObj.checkAllRows||"Intermediate"===this.gridObj.checkAllRows?"csHome"!==s.action&&"csEnd"!==s.action?(t.isNullOrUndefined(this.startIndex)&&this.firstItemIndex!==i&&(this.firstItemIndex=i),"shiftEnd"===s.action?this.gridObj.selectionModule.selectRowsByRange(this.firstItemIndex,e.length-1):this.gridObj.selectionModule.selectRowsByRange(0,this.firstItemIndex),this.startIndex=i):"csEnd"===s.action?this.gridObj.selectRows(this.InnerItems(t.isNullOrUndefined(i)?0:i,t.isNullOrUndefined(n)?e.length-1:n,s)):t.isNullOrUndefined(i)?this.gridObj.selectRow(0):this.gridObj.selectRows(this.InnerItems(t.isNullOrUndefined(n)?0:n,i,s)):this.gridObj.selectionModule.selectRow("shiftHome"===s.action||"csHome"===s.action?0:e.length-1)},e.prototype.InnerItems=function(e,t,i){var n=this.gridObj.getSelectedRowIndexes();if("csEnd"===i.action)for(s=e+1;s<=t;s++)n.push(s);else for(var s=t-1;e<=s;s--)n.push(s);return n},e.prototype.shiftSelectFocusItem=function(e,i,n,s){var a=i+("shiftDown"===s.action||"csDown"===s.action?1:-1),r=t.isNullOrUndefined(this.startIndex)?e:n[0];r===a?this.gridObj.selectRow(r):r<a?"shiftDown"===s.action||"csDown"===s.action?this.gridObj.selectionModule.selectRowsByRange(r,a):this.gridObj.selectionModule.selectRowsByRange(a,r):"shiftDown"===s.action||"csDown"===s.action?this.gridObj.selectionModule.selectRowsByRange(a,r):this.gridObj.selectionModule.selectRowsByRange(r,a),this.startIndex=this.gridObj.selectedRowIndex},e.prototype.addFocus=function(e){var i=this.getFocusedItem(),n=this.gridObj.getRowByIndex(e);i&&(i.removeAttribute("tabindex"),t.removeClass([i],[wi,Di])),t.isNullOrUndefined(n)||(this.gridObj.element.setAttribute("tabindex","-1"),n.setAttribute("tabindex","0"),n.focus(),t.addClass([n],[wi,Di]))},e.prototype.addHeaderFocus=function(e){var i=t.select(".e-row",this.element);this.gridObj.element.setAttribute("tabindex","-1");var n;!t.isNullOrUndefined(e.target)&&e.target.classList.contains("e-defaultcursor")?(this.addFocus(0),n=e.target.nextElementSibling):t.isNullOrUndefined(this.gridObj.element.querySelector(".e-focus"))||"TH"!==this.gridObj.element.querySelector(".e-focus").tagName?n=t.select("th.e-fe-grid-icon",this.element):(n=this.gridObj.element.querySelector(".e-focus").nextElementSibling,this.addFocus(0)),t.isNullOrUndefined(n)||(n.setAttribute("tabindex","0"),n.focus(),t.addClass([n],[wi,Di]),i.setAttribute("tabindex","0"),0===i.tabIndex&&0===n.tabIndex&&t.removeClass([i],[wi,Di]))},e.prototype.getFocusedItem=function(){return t.select("."+Di,this.element)},e.prototype.isSelected=function(e,t){for(var i=!1,n=0;n<=e.length-1;n++)if(e[n]===t){i=!0;break}return i},e.prototype.shiftSelectedItem=function(e,i,n,s){-1===e?this.gridObj.selectRow(0):t.isNullOrUndefined(this.startIndex)&&s.shiftKey?(this.startIndex=this.gridObj.selectedRowIndex,this.gridObj.selectRows([e,"shiftDown"===s.action||"csDown"===s.action?e+(e!==n.length-1?1:0):e-(0!==e?1:0)])):"shiftDown"===s.action||"shiftUp"===s.action?("shiftDown"===s.action&&-1===i.indexOf(e+1)?e!==n.length-1&&i.push(e+1):"shiftUp"===s.action&&-1===i.indexOf(e-1)?0!==e&&i.push(e-1):i.pop(),this.gridObj.selectRows(i)):"csDown"===s.action?this.isSelected(i,this.getFocusedItemIndex()+1)?this.addFocus(this.getFocusedItemIndex()+1):(i.push(this.getFocusedItemIndex()+1),this.gridObj.selectRows(i)):this.isSelected(i,this.getFocusedItemIndex()-1)?this.addFocus(this.getFocusedItemIndex()-1):(i.push(this.getFocusedItemIndex()-1),this.gridObj.selectRows(i))},e.prototype.onMethodCall=function(e){if("Details"===this.parent.view)switch(t.getValue("action",e)){case"deleteFiles":this.deleteFiles(t.getValue("ids",e));break;case"downloadFiles":this.downloadFiles(t.getValue("ids",e));break;case"openFile":this.openFile(t.getValue("id",e));break;case"createFolder":this.interaction=!1;break;case"renameFile":this.interaction=!1,this.renameFile(t.getValue("id",e),t.getValue("newName",e));break;case"selectAll":this.interaction=!1,this.onSelectAllInit();break;case"clearSelection":this.interaction=!1,this.onClearAllInit()}},e.prototype.getRecords=function(e){var i=this.gridObj.getCurrentViewRecords(),n=[],s=!(""===this.parent.breadcrumbbarModule.searchObj.element.value&&!this.parent.isFiltered),a=this.parent.hasId?"id":"name";if(this.parent.hasId||!s)for(var r=0,o=i.length;r<o;r++)-1!==e.indexOf(t.getValue(a,i[r]))&&n.push(i[r]);else for(var r=0,o=i.length;r<o;r++){var l=t.getValue("filterPath",i[r])+t.getValue("name",i[r]);-1!==e.indexOf(l)&&n.push(i[r])}return n},e.prototype.deleteFiles=function(e){if(this.parent.activeModule="detailsview",t.isNullOrUndefined(e))return void this.performDelete();var i=this.getRecords(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=i[a],s[a]=de(this.parent,n[a]);fe(this.parent,n,s)}},e.prototype.downloadFiles=function(e){if(t.isNullOrUndefined(e))return void this.doDownload();var i=this.getRecords(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=i[a],s[a]=de(this.parent,n[a]);ge(this.parent,n,s)}},e.prototype.openFile=function(e){if(!t.isNullOrUndefined(e)){var i=this.getRecords([e]);i.length>0&&this.openContent(i[0])}},e.prototype.renameFile=function(e,i){if(this.parent.activeModule="detailsview",t.isNullOrUndefined(e))return void this.performRename();var n=this.getRecords([e]);n.length>0&&(pe(this.parent,n[0]),t.isNullOrUndefined(i)?ce(this.parent):ye(this.parent.itemData[0])?Pe(this.parent,this.parent.path,i):me(this.parent,this.parent.itemData[0],Hn))},e}();return Xn.Inject(is,ts,Wn,Zn,Gn,Kn,es),e.AjaxSettings=jt,e.defaultToolbarItems=Nt,e.ToolbarSettings=Et,e.ToolbarItem=Rt,e.SearchSettings=Tt,e.columnArray=Ft,e.DetailsViewSettings=Ut,e.fileItems=Ht,e.folderItems=Bt,e.layoutItems=zt,e.ContextMenuSettings=qt,e.NavigationPaneSettings=Gt,e.UploadSettings=Qt,e.Column=Zt,e.TOOLBAR_ID="_toolbar",e.LAYOUT_ID=ei,e.NAVIGATION_ID="_navigation",e.TREE_ID="_tree",e.GRID_ID=ti,e.LARGEICON_ID=ii,e.DIALOG_ID=ni,e.ALT_DIALOG_ID="_alt_dialog",e.IMG_DIALOG_ID=si,e.EXTN_DIALOG_ID=ai,e.UPLOAD_DIALOG_ID="_upload_dialog",e.RETRY_DIALOG_ID="_retry_dialog",e.CONTEXT_MENU_ID="_contextmenu",e.SORTBY_ID="_sortby",e.VIEW_ID="_view",e.SPLITTER_ID="_splitter",e.CONTENT_ID=ri,e.BREADCRUMBBAR_ID=oi,e.UPLOAD_ID=li,e.RETRY_ID="_retry",e.SEARCH_ID="_search",e.ROOT=hi,e.CONTROL=di,e.CHECK_SELECT="e-fe-cb-select",e.ROOT_POPUP=pi,e.MOBILE="e-fe-mobile",e.MOB_POPUP=ci,e.MULTI_SELECT="e-fe-m-select",e.FILTER=ui,e.LAYOUT="e-layout",e.NAVIGATION="e-navigation",e.LAYOUT_CONTENT="e-layout-content",e.LARGE_ICONS=fi,e.TB_ITEM="e-toolbar-item",e.LIST_ITEM=gi,e.LIST_TEXT=mi,e.LIST_PARENT="e-list-parent",e.TB_OPTION_TICK=bi,e.TB_OPTION_DOT=vi,e.BLUR=yi,e.ACTIVE=Ii,e.HOVER=Oi,e.FOCUS=wi,e.FOCUSED=Di,e.CHECK=Ci,e.FRAME="e-frame",e.CB_WRAP=Si,e.ROW=ji,e.ROWCELL="e-rowcell",e.EMPTY=xi,e.EMPTY_CONTENT=Pi,e.EMPTY_INNER_CONTENT=Ni,e.CLONE=Ei,e.DROP_FOLDER=Ri,e.DROP_FILE=Mi,e.FOLDER=ki,e.ICON_IMAGE=Ti,e.ICON_MUSIC=Li,e.ICON_VIDEO=Ai,e.LARGE_ICON=Fi,e.LARGE_EMPTY_FOLDER=Ui,e.LARGE_EMPTY_FOLDER_TWO="e-empty-icon.e-fe-folder",e.LARGE_ICON_FOLDER="e-fe-folder",e.SELECTED_ITEMS="e-items",e.TEXT_CONTENT="e-text-content",e.GRID_HEADER=Vi,e.TEMPLATE_CELL="e-templatecell",e.TREE_VIEW=_i,e.MENU_ITEM="e-menu-item",e.MENU_ICON=Hi,e.SUBMENU_ICON="e-caret",e.GRID_VIEW=Bi,e.GRID_CONTENT=zi,e.ICON_VIEW="e-list-parent",e.ICON_OPEN="e-icons e-fe-open",e.ICON_UPLOAD="e-icons e-fe-upload",e.ICON_CUT=qi,e.ICON_COPY="e-icons e-fe-copy",e.ICON_PASTE="e-icons e-fe-paste",e.ICON_DELETE="e-icons e-fe-delete",e.ICON_RENAME="e-icons e-fe-rename",e.ICON_NEWFOLDER="e-icons e-fe-newfolder",e.ICON_DETAILS="e-icons e-fe-details",e.ICON_SHORTBY="e-icons e-fe-sort",e.ICON_REFRESH="e-icons e-fe-refresh",e.ICON_SELECTALL="e-icons e-fe-select",e.ICON_DOWNLOAD="e-icons e-fe-download",e.ICON_OPTIONS="e-icons e-fe-options",e.ICON_GRID=Wi,e.ICON_LARGE=Ki,e.ICON_BREADCRUMB="e-icons e-fe-breadcrumb",e.ICON_CLEAR="e-icons e-fe-clear",e.ICON_DROP_IN="e-icons e-fe-drop-in",e.ICON_DROP_OUT="e-icons e-fe-drop-out",e.ICON_NO_DROP="e-icons e-fe-no-drop",e.ICONS="e-icons",e.DETAILS_LABEL="e-detailslabel",e.ERROR_CONTENT=Gi,e.STATUS="e-status",e.BREADCRUMBS="e-address",e.RTL=Yi,e.DISPLAY_NONE=Ji,e.COLLAPSED="e-node-collapsed",e.FULLROW="e-fullrow",e.ICON_COLLAPSIBLE="e-icon-collapsible",e.SPLIT_BAR="e-split-bar",e.HEADER_CHECK="e-headercheck",e.OVERLAY="e-fe-overlay",e.VALUE=Qi,e.isFile=Xi,e.modelChanged=$i,e.initialEnd=Zi,e.finalizeEnd=en,e.createEnd=tn,e.filterEnd="filter-end",e.beforeDelete="before-delete",e.pathDrag=nn,e.deleteInit=sn,e.deleteEnd=an,e.refreshEnd=rn,e.resizeEnd=on,e.splitterResize="splitter-resize",e.pathChanged=ln,e.destroy=hn,e.beforeRequest=dn,e.upload="upload",e.skipUpload=pn,e.afterRequest=cn,e.download="download",e.layoutRefresh="layout-refresh",e.actionFailure=un,e.search=fn,e.openInit=gn,e.openEnd=mn,e.selectionChanged=bn,e.selectAllInit="select-all-init",e.clearAllInit="clear-all-init",e.clearPathInit=vn,e.layoutChange=yn,e.sortByChange=In,e.nodeExpand="node-expand",e.detailsInit=On,e.menuItemData=wn,e.renameInit=Dn,e.renameEndParent=Cn,e.renameEnd=Sn,e.showPaste=jn,e.hidePaste=xn,e.selectedData="selected-data",e.cutCopyInit=Pn,e.pasteInit=Nn,e.pasteEnd=En,e.cutEnd=Rn,e.hideLayout="hide-layout",e.updateTreeSelection="update-tree-selection",e.treeSelect="select-node",e.sortColumn=Mn,e.pathColumn=kn,e.searchTextChange=Tn,e.beforeDownload="before-download",e.downloadInit="download-init",e.dropInit=Ln,e.dragEnd=An,e.dropPath=Fn,e.dragHelper="drag-helper",e.dragging=Un,e.updateSelectionData="update-selection-data",e.methodCall=Vn,e.permissionRead=_n,e.permissionEdit=Hn,e.permissionEditContents=Bn,e.permissionCopy="copy",e.permissionUpload=zn,e.permissionDownload=qn,e.FileManager=Xn,e.Toolbar=Zn,e.BreadCrumbBar=Kn,e.Virtualization=es,e.NavigationPane=ts,e.DetailsView=is,e.LargeIconsView=Wn,e.createDialog=Ke,e.createExtDialog=Ge,e.createImageDialog=Ot,e.ContextMenu=Gn,e.read=Se,e.createFolder=je,e.filter=xe,e.rename=Pe,e.paste=Ne,e.Delete=Ee,e.GetDetails=Re,e.Search=ze,e.Download=We,e.sortComparer=p,e.updatePath=c,e.getPath=u,e.getPathId=f,e.getPathNames=g,e.getParents=m,e.generatePath=b,e.removeActive=v,e.activeElement=y,e.addBlur=I,e.removeBlur=O,e.getModule=w,e.searchWordHandler=D,e.updateLayout=C,e.getTargetModule=S,e.refresh=j,e.openAction=x,e.getPathObject=P,e.copyFiles=N,e.cutFiles=E,e.fileType=R,e.getImageUrl=M,e.getFullPath=k,e.getName=T,e.getSortedData=L,e.getObject=A,e.createEmptyElement=F,e.getDirectories=U,e.setNodeId=V,e.setDateObject=_,e.getLocaleText=H,e.getCssClass=B,e.sortbyClickHandler=z,e.getSortField=q,e.setNextPath=W,e.openSearchFolder=K,e.pasteHandler=G,e.validateSubFolder=Y,e.dropHandler=J,e.getParentPath=Q,e.getDirectoryPath=X,e.doPasteUpdate=$,e.readDropPath=Z,e.getDuplicateData=ee,e.createVirtualDragElement=te,e.dragStopHandler=ie,e.dragStartHandler=ne,e.dragCancel=se,e.removeDropTarget=ae,e.removeItemClass=re,e.scrollHandler=oe,e.draggingHandler=le,e.objectToString=he,e.getItemName=de,e.updateRenamingData=pe,e.doRename=ce,e.doDownload=ue,e.doDeleteFiles=fe,e.doDownloadFiles=ge,e.createDeniedDialog=me,e.getAccessClass=be,e.hasReadAccess=ve,e.hasEditAccess=ye,e.hasContentAccess=Ie,e.hasUploadAccess=Oe,e.hasDownloadAccess=we,e.createNewFolder=De,e.uploadItem=Ce,e}({},ej.base,ej.layouts,ej.popups,ej.data,ej.inputs,ej.buttons,ej.lists,ej.splitbuttons,ej.navigations,ej.grids),this.ejs=ej;
11
11
  //# sourceMappingURL=ej2-filemanager.min.js.map