(window.webpackJsonp=window.webpackJsonp||[]).push([[152],{1829:function(e,t,a){"use strict";a.r(t);var n=a(3937),r=a(2647);for(var i in r)["default"].indexOf(i)<0&&function(e){a.d(t,e,(function(){return r[e]}))}(i);var o=a(0),s=a(3656),u=a.n(s),l=Object(o.a)(r.default,n.a,n.b,!1,null,null,null);"function"==typeof u.a&&u()(l),t.default=l.exports},1929:function(e,t,a){"use strict";var n=a(1);Object.defineProperty(t,"__esModule",{value:!0}),t.uploadFiles=t.checkExistsMultiple=t.download=t.checkExists=t.getArchive=t.extract=t.copy=t.rename=t.create=t.save=t.read=void 0,a(5),a(24),a(26),a(7);var r=a(28),i=n(a(78)),o=a(12),s="/CMD_FILE_MANAGER",u=i.default.get({url:s,id:"FILE_CONTENT",params:{action:"edit"},schema:{path:i.default.REQUIRED_STRING},after:function(e){return e.flow(e.moveProp({DIRECTORY:"dir",FILENAME:"filename",TEXT:"text"}),e.mapProp("text",e.convert.toAppText),e.deleteProp("BODY"))}});t.read=u;var l=i.default.post({url:s,noQueryArg:!0,params:{action:"edit",json:!0},schema:{path:i.default.REQUIRED_STRING,filename:i.default.REQUIRED_STRING,text:i.default.REQUIRED_STRING}});t.save=l;var c=l.extend({params:{text:""}});t.create=c;var p=i.default.post({url:s,params:{action:"rename"},schema:{old:i.default.REQUIRED_STRING,filename:i.default.REQUIRED_STRING,path:i.default.REQUIRED_STRING}});t.rename=p;var d=p.extend({params:{action:"copy",json:!0},schema:{overwrite:i.default.REQUIRED_BOOL}});t.copy=d;var f=i.default.post({url:s,params:{action:"extract",page:2},schema:{path:i.default.REQUIRED_STRING,directory:i.default.REQUIRED_STRING}});t.extract=f;var m=i.default.get({id:"ARCHIVE",url:s,params:{action:"extract",json:!0},schema:{path:i.default.REQUIRED_STRING},response:[],after:function(e){return e.flow(e.getProp("output"),e.convert.toLines,e.filter(e.notEmpty))}});t.getArchive=m;var E=i.default.get({url:s,id:"FILE_EXISTS",response:!1,params:{action:"exists"},schema:{path:i.default.REQUIRED_STRING},after:function(e){return e.flow(e.getProp("exists"),e.isEqual("1"))}});t.checkExists=E;t.download=function(e){var t=(0,r.State)("app.tokens.SESSION_ID"),a="".concat(s).concat(e.truepath,"?noredirect=true&X-DirectAdmin-Session-ID=").concat(t);(0,o.openInNewTab)(a,e.name)};var h=i.default.get({url:s,id:"FILES_EXISTS",params:{action:"multiple_exist"},schema:{file:i.default.ROWS},response:[],mapResponse:function(e){var t=e.paths;return Object.keys(t).filter((function(e){return"1"===t[e].exists}))}});t.checkExistsMultiple=h;var R=i.default.post({url:"/CMD_FILE_MANAGER",params:{action:"upload"},schema:{file:{required:!0},path:i.default.REQUIRED_STRING},transport:FormData,continous:!0});t.uploadFiles=R},2647:function(e,t,a){"use strict";a.r(t);var n=a(2648),r=a.n(n);for(var i in n)["default"].indexOf(i)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(i);t.default=r.a},2648:function(e,t,a){"use strict";var n=a(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a(38));a(96),a(21),a(61);var i=a(135),o=a(1929),s=n(a(1903)),u={preload:o.read,components:{InputTextEditor:s.default},api:[{command:o.read,bind:"file"}],computed:{content:function(){return(0,i.toAppText)(this.$api.file.text)},path:function(){return"/"===this.$api.file.path[this.$api.file.path.length-1]?this.$api.file.path.slice(0,-1):this.$api.file.path},editorMode:function(){var e=this.$api.file.filename.split(".");return{html:"html",js:"javascript",css:"css",php:"php",pl:"perl",ini:"ini",sql:"sql",json:"json"}[(0,r.default)(e,2)[1]]||"text"}}};t.default=u},3656:function(e,t){},3937:function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return r}));var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("app-page",[a("app-page-section",[a("input-text-editor",{attrs:{value:e.content,mode:e.editorMode,readOnly:""}},[a("div",{directives:[{name:"flex",rawName:"v-flex",value:{cross:"center",main:"between"},expression:"{\n                    cross: 'center',\n                    main: 'between',\n                }"}],attrs:{slot:"header"},slot:"header"},[e._v("\n                "+e._s(e.path)+"/"+e._s(e.$api.file.filename)+"\n                "),a("ui-button-link",{attrs:{icon:"pencil",size:"small",theme:"light",name:"user/filemanager/edit",query:e.$route.query}},[a("translate",[e._v("Edit")])],1)],1)])],1)],1)},r=[]}}]);