airdcpp-webui 2.13.1-beta.9 → 2.13.1
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.
- package/dist/index.html +1 -1
- package/dist/js/223.3c648d224ecdf7df15cb.chunk.js +2 -0
- package/dist/js/223.3c648d224ecdf7df15cb.chunk.js.gz +0 -0
- package/dist/js/223.3c648d224ecdf7df15cb.chunk.js.map +1 -0
- package/dist/js/{filelists.913207a5f957082c811d.chunk.js → filelists.005c956eabdbb3869c6f.chunk.js} +2 -2
- package/dist/js/filelists.005c956eabdbb3869c6f.chunk.js.gz +0 -0
- package/dist/js/filelists.005c956eabdbb3869c6f.chunk.js.map +1 -0
- package/dist/js/hubs.29f2e7fde513aa2aa81a.chunk.js +2 -0
- package/dist/js/hubs.29f2e7fde513aa2aa81a.chunk.js.gz +0 -0
- package/dist/js/hubs.29f2e7fde513aa2aa81a.chunk.js.map +1 -0
- package/dist/js/{main.1408811d6831f662f421.entry.js → main.e2f715744e80ce3a09aa.entry.js} +3 -3
- package/dist/js/main.e2f715744e80ce3a09aa.entry.js.gz +0 -0
- package/dist/js/{main.1408811d6831f662f421.entry.js.map → main.e2f715744e80ce3a09aa.entry.js.map} +1 -1
- package/dist/js/{queue.4095b1ea967e164737e6.chunk.js → queue.493c6d72a2e6d66362a3.chunk.js} +2 -2
- package/dist/js/queue.493c6d72a2e6d66362a3.chunk.js.gz +0 -0
- package/dist/js/queue.493c6d72a2e6d66362a3.chunk.js.map +1 -0
- package/dist/js/settings.ae1be9e0a1c99eed7597.chunk.js +2 -0
- package/dist/js/settings.ae1be9e0a1c99eed7597.chunk.js.gz +0 -0
- package/dist/js/settings.ae1be9e0a1c99eed7597.chunk.js.map +1 -0
- package/dist/sw.js +1 -1
- package/dist/sw.js.gz +0 -0
- package/package.json +1 -1
- package/dist/js/223.e1724bcbb15b37be3e66.chunk.js +0 -2
- package/dist/js/223.e1724bcbb15b37be3e66.chunk.js.gz +0 -0
- package/dist/js/223.e1724bcbb15b37be3e66.chunk.js.map +0 -1
- package/dist/js/filelists.913207a5f957082c811d.chunk.js.gz +0 -0
- package/dist/js/filelists.913207a5f957082c811d.chunk.js.map +0 -1
- package/dist/js/hubs.b1afb9f790924d60d294.chunk.js +0 -2
- package/dist/js/hubs.b1afb9f790924d60d294.chunk.js.gz +0 -0
- package/dist/js/hubs.b1afb9f790924d60d294.chunk.js.map +0 -1
- package/dist/js/main.1408811d6831f662f421.entry.js.gz +0 -0
- package/dist/js/queue.4095b1ea967e164737e6.chunk.js.gz +0 -0
- package/dist/js/queue.4095b1ea967e164737e6.chunk.js.map +0 -1
- package/dist/js/settings.1287a0ef1d611a34ea1c.chunk.js +0 -2
- package/dist/js/settings.1287a0ef1d611a34ea1c.chunk.js.gz +0 -0
- package/dist/js/settings.1287a0ef1d611a34ea1c.chunk.js.map +0 -1
- /package/dist/js/{main.1408811d6831f662f421.entry.js.LICENSE.txt → main.e2f715744e80ce3a09aa.entry.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkairdcpp_webui=self.webpackChunkairdcpp_webui||[]).push([[336],{61987:(e,s,t)=>{t.d(s,{A:()=>a});var i=t(71354),n=t.n(i),o=t(76314),r=t.n(o)()(n());r.push([e.id,".status .error {\n color: red;\n}\n\n@media only screen and (min-width: 767px) {\n .source.modal td {\n max-width: 250px;\n }\n\n /* Can't be applied to dropdown cells */\n .source.modal td:not(.user) {\n overflow-x: hidden;\n }\n}\n","",{version:3,sources:["webpack://./src/routes/Queue/style.css"],names:[],mappings:"AAAA;EACE,UAAU;AACZ;;AAEA;EACE;IACE,gBAAgB;EAClB;;EAEA,uCAAuC;EACvC;IACE,kBAAkB;EACpB;AACF",sourcesContent:[".status .error {\n color: red;\n}\n\n@media only screen and (min-width: 767px) {\n .source.modal td {\n max-width: 250px;\n }\n\n /* Can't be applied to dropdown cells */\n .source.modal td:not(.user) {\n overflow-x: hidden;\n }\n}\n"],sourceRoot:""}]);const a=r},32563:(e,s,t)=>{t.d(s,{mM:()=>d});var i=t(58059),n=t(4425),o=t(86038),r=t(67749);const a={removeBundleSource:{id:"removeBundleSource",displayName:"Remove source",access:o.US.QUEUE_EDIT,icon:n.A.REMOVE,handler:({itemData:e,entity:s,socket:t})=>t.delete(`${i.A.BUNDLES_URL}/${s.id}/sources/${e.user.cid}`)}},d={moduleData:{moduleId:r.KV.QUEUE,subId:"bundleSource"},actions:a}},89478:(e,s,t)=>{t.d(s,{Hi:()=>m,ew:()=>l});var i=t(58059),n=t(4425),o=t(86038),r=t(67749),a=t(47450);const d={id:"search",displayName:"Search (foreground)",access:o.US.SEARCH,icon:n.A.SEARCH,handler:({itemData:e,location:s,navigate:t})=>a.A.search(e,s,t)},c={id:"searchAlternates",displayName:"Search for alternates",access:o.US.QUEUE_EDIT,icon:n.A.SEARCH_ALTERNATES,filter:({itemData:e})=>0===e.time_finished,handler:({itemData:e,socket:s})=>s.post(`${i.A.FILES_URL}/${e.id}/search`)},l={id:"remove",displayName:"Remove",access:o.US.QUEUE_EDIT,icon:n.A.REMOVE,confirmation:{content:"Are you sure that you want to remove the file {{item.name}}?",approveCaption:"Remove file",rejectCaption:"Don't remove",checkboxCaption:"Remove on disk"},handler:({itemData:e,socket:s},t)=>s.post(`${i.A.FILES_URL}/${e.id}/remove`,{remove_finished:t}),notifications:{onSuccess:"File {{item.name}} was removed from queue"}},u={search:d,searchFileAlternates:c,removeFile:l},m={moduleData:{moduleId:r.KV.QUEUE,subId:"file"},actions:u}},34395:(e,s,t)=>{t.d(s,{JN:()=>a});var i=t(58059),n=t(4425),o=t(86038),r=t(67749);const a={id:"removeSource",displayName:"Remove user from queue",access:o.US.QUEUE_EDIT,icon:n.A.REMOVE,handler:({itemData:e,socket:s})=>s.delete(`${i.A.SOURCES_URL}/${e.cid}`),notifications:{onSuccess:"The user {{user.nicks}} was removed from {{result.count}} files"}};r.KV.QUEUE},27415:(e,s,t)=>{t.d(s,{f$:()=>h,vl:()=>R,qZ:()=>N,_q:()=>v,De:()=>x,Hi:()=>_.Hi});var i=t(58059),n=t(4425),o=t(86038),r=t(67749),a=t(48844);const d=(e,s)=>e.post(i.A.BUNDLES_URL+"/priority",{priority:s}),c={id:"removeCompleted",displayName:"Remove completed bundles",access:o.US.QUEUE_EDIT,icon:n.A.REMOVE,handler:({socket:e})=>e.post(i.A.BUNDLES_URL+"/remove_completed"),notifications:{onSuccess:"{{result.count}} completed bundles were removed"}},l={id:"pause",displayName:"Pause all bundles",access:o.US.QUEUE_EDIT,icon:n.A.PAUSE,handler:({socket:e})=>d(e,o.Fm.PAUSED_FORCED)},u={id:"resumeAll",displayName:"Resume all bundles",access:o.US.QUEUE_EDIT,icon:n.A.PLAY,handler:({socket:e})=>d(e,o.Fm.DEFAULT)},m={removeCompleted:c,divider:a.o,pause:l,resume:u},h={moduleData:{moduleId:r.KV.QUEUE},actions:m};var p=t(47450);const E=({itemData:e})=>e.status.id===i.S.COMPLETION_VALIDATION_ERROR,A=({itemData:e})=>0===e.time_finished,U=(e,s,t)=>e.post(`${i.A.BUNDLES_URL}/${s.id}/share`,{skip_validation:t}),x={id:"sources",displayName:"Manage sources...",icon:n.A.USER,filter:e=>e.itemData.sources.total>0&&A(e),handler:({itemData:e,navigate:s})=>{s(`sources/${e.id}`)}},v={id:"content",displayName:"Manage files...",icon:n.A.FILE,filter:({itemData:e})=>"directory"===e.type.id,handler:({itemData:e,navigate:s})=>{s(`content/${e.id}`)}},y={id:"search",displayName:"Search (foreground)",icon:n.A.SEARCH,handler:({itemData:e,location:s,navigate:t})=>p.A.search(e,s,t)},j={id:"searchBundleAlternates",displayName:"Search for alternates",icon:n.A.SEARCH_ALTERNATES,filter:A,handler:({itemData:e,socket:s})=>s.post(`${i.A.BUNDLES_URL}/${e.id}/search`),notifications:{onSuccess:"The bundle {{item.name}} was searched for alternates"}},D={id:"remove",displayName:"Remove",access:o.US.QUEUE_EDIT,icon:n.A.REMOVE,confirmation:{content:"Are you sure that you want to remove the bundle {{item.name}}?",approveCaption:"Remove bundle",rejectCaption:"Don't remove",checkboxCaption:"Remove finished files"},handler:({itemData:e,socket:s},t)=>s.post(`${i.A.BUNDLES_URL}/${e.id}/remove`,{remove_finished:t})},S={id:"rescan",displayName:"Rescan for errors",access:o.US.QUEUE_EDIT,icon:n.A.REFRESH_COLORED,filter:E,handler:({itemData:e,socket:s})=>U(s,e,!1)},f={id:"forceShare",displayName:"Force in share",access:o.US.QUEUE_EDIT,icon:n.A.ERROR,filter:E,handler:({itemData:e,socket:s})=>U(s,e,!0)},w={sources:x,content:v,divider:null,search:y,searchBundleAlternates:j,divider2:null,removeBundle:D,divider3:null,rescan:S,forceShare:f},N={moduleId:r.KV.QUEUE,subId:"bundle"},R={moduleData:N,actions:w};t(32563);var _=t(89478);t(34395)},25364:(e,s,t)=>{t.d(s,{A:()=>r});var i=t(74848),n=(t(96540),t(46942)),o=t.n(n);const r=({className:e,percent:s,caption:t})=>(0,i.jsxs)("div",{className:o()("ui progress",e,{indeterminate:void 0===s}),"data-percent":s,children:[(0,i.jsx)("div",{className:"bar",style:{transitionDuration:"300ms",width:void 0===s?void 0:s+"%",minWidth:"0px"},children:(0,i.jsx)("div",{className:"progress"})}),!!t&&(0,i.jsx)("div",{className:"label",children:t})]})},6066:(e,s,t)=>{t.r(s),t.d(s,{default:()=>Ue});var i=t(74848),n=t(96540),o=t(68465),r=t(22373),a=t(2404),d=t.n(a),c=t(86038);const l={[c.Fm.PAUSED_FORCED]:{str:"Paused (forced)",id:0},[c.Fm.PAUSED]:{str:"Paused",id:1},[c.Fm.LOWEST]:{str:"Lowest",id:2},[c.Fm.LOW]:{str:"Low",id:3},[c.Fm.NORMAL]:{str:"Normal",id:4},[c.Fm.HIGH]:{str:"High",id:5},[c.Fm.HIGHEST]:{str:"Highest",id:6}};var u=t(2690),m=t(67749),h=t(42695),p=t(36076),E=t(43045),A=t(6897),U=t(28286);const x=(0,n.memo)((({item:e,itemPrio:s,prioAction:t,t:n})=>{const{hasAccess:o}=(0,U.w)(),r=s=>(0,p.bd)((()=>t(e,s)),n);let a=(0,h.Tl)(l[s.id].str,n,m.KV.QUEUE);return s.auto&&(a+=` (${(0,h.Tl)("Auto",n,m.KV.QUEUE).toLocaleLowerCase()})`),o(c.US.QUEUE_EDIT)?(0,i.jsx)(u.A,{caption:a,className:"priority-menu",children:t=>{const i=Object.keys(l).map(Number).map((s=>((s,t)=>{const i=e.priority.id;return{id:s.id.toString(),item:{active:i===s.id,onClick:()=>{r(s.id)},children:(0,h.Tl)(s.str,t,m.KV.QUEUE)}}})(l[s],n)));return i.push({id:"divider"}),i.push({id:"auto",item:{active:s.auto,onClick:()=>{r(c.Fm.DEFAULT)},children:(0,h.Tl)("Auto",n,m.KV.QUEUE)}}),(0,A.y)(i,t)}}):(0,i.jsx)(E.b,{caption:a})}),((e,s)=>d()(s.item.priority,e.item.priority)));var v=t(46942),y=t.n(v),j=t(25364);const D=(e,s)=>{if(e.completed)return"success";const t=e.id;return y()({grey:(!t||t===c.$E.QUEUED)&&0===s.speed},{blue:(!t||t===c.$E.QUEUED)&&s.speed>0})},S=({cellData:e,rowDataGetter:s})=>{if(e.failed)return(0,i.jsx)("span",{className:"error",children:e.str});const t=s();return(0,i.jsx)(j.A,{className:D(e,t),caption:e.str,percent:100*t.downloaded_bytes/t.size})};var f=t(22005),w=t.n(f),N=t(58059),R=t(52267);const _=w().createStore({_viewName:"queue_bundle_view",_apiUrl:N.A.MODULE_URL,mixins:[(0,R.A)("name")]});var b=t(99671),C=t(65385),L=t(5945);const I=w().createStore({_viewName:"queue_file_view",_apiUrl:N.A.MODULE_URL,mixins:[(0,R.A)("name")]});var T=t(44247),g=t(85072),V=t.n(g),k=t(97825),F=t.n(k),P=t(77659),Q=t.n(P),K=t(55056),$=t.n(K),B=t(10540),O=t.n(B),q=t(41113),H=t.n(q),M=t(61987),G={};G.styleTagTransform=H(),G.setAttributes=$(),G.insert=Q().bind(null,"head"),G.domAPI=F(),G.insertStyleElement=O(),V()(M.A,G),M.A&&M.A.locals&&M.A.locals;var W=t(56896),z=t(39115),Z=t(27415);const J=({cellData:e,rowDataGetter:s,t})=>(0,i.jsx)(x,{itemPrio:e,item:s(),prioAction:W.nX,t});class X extends n.Component{constructor(){super(...arguments),this.isActive=(e,s)=>!s.status.downloaded,this.isRunning=(e,s)=>s.speed>0}render(){return(0,i.jsxs)(r.A,{store:I,sourceFilter:{pattern:this.props.bundle.id,method:c.Od.EXACT,property:"bundle"},moduleId:m.KV.QUEUE,children:[(0,i.jsx)(o.VP,{name:"Name",width:200,flexGrow:20,columnKey:"name",cell:(0,i.jsx)(T.tC,{actions:Z.Hi,remoteMenuId:z.Ay.QUEUE_FILE})}),(0,i.jsx)(o.VP,{name:"Size",width:70,columnKey:"size",cell:(0,i.jsx)(T.us,{}),flexGrow:1}),(0,i.jsx)(o.VP,{name:"Status",width:120,columnKey:"status",cell:(0,i.jsx)(S,{})}),(0,i.jsx)(o.VP,{name:"Sources",width:65,columnKey:"sources",renderCondition:this.isActive}),(0,i.jsx)(o.VP,{name:"Time left",width:50,columnKey:"seconds_left",renderCondition:this.isRunning,cell:(0,i.jsx)(T.WQ,{})}),(0,i.jsx)(o.VP,{name:"Speed",width:55,columnKey:"speed",cell:(0,i.jsx)(T.kF,{}),renderCondition:this.isRunning}),(0,i.jsx)(o.VP,{name:"Priority",width:80,columnKey:"priority",renderCondition:this.isActive,cell:(0,i.jsx)(J,{}),flexGrow:1})]})}}const Y=X;var ee=t(56484);class se extends n.Component{render(){const{bundle:e}=this.props;return(0,i.jsx)(b.A,{className:"source",title:e.name,subHeader:e.target,closable:!0,icon:(0,i.jsx)(L.A,{typeInfo:e.type}),fullHeight:!0,children:(0,i.jsx)(Y,{bundle:e})})}}se.displayName="BundleFileDialog";const te=(0,C.A)((0,ee.A)(se,{urls:{bundle:({params:e},s)=>s.get(`${N.A.BUNDLES_URL}/${e.bundleId}`)}}),"content/:bundleId");var ie=t(32563),ne=t(74416),oe=t(71352),re=t(86668);const ae=({source:e,bundle:s,t})=>{const{formatSize:n,formatSpeed:o}=(0,ne.k)();return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"user dropdown",children:(0,i.jsx)(oe.Bg,{userIcon:!0,user:e.user,ids:re.F9,contextElement:".source.modal",remoteMenuId:z.Ay.HINTED_USER,children:(0,i.jsx)(oe.Wy,{actions:ie.mM,itemData:e,entity:s})})}),(0,i.jsx)("td",{className:"hubs",children:e.user.hub_names}),(0,i.jsx)("td",{className:"speed",children:e.last_speed>0&&o(e.last_speed)}),(0,i.jsx)("td",{className:"files",children:e.files}),(0,i.jsx)("td",{className:"size",children:n(e.size)})]})},de=(e,s)=>e.user.nicks.localeCompare(s.user.nicks),ce=(0,ee.A)((({sources:e,bundle:s,queueT:t})=>{const{translate:n}=t;return(0,i.jsxs)("div",{className:"sources",children:[(0,i.jsx)("h2",{children:n("Sources")}),(0,i.jsxs)("table",{className:"ui striped table",children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:n("User")}),(0,i.jsx)("th",{children:n("Hubs")}),(0,i.jsx)("th",{children:n("Last known speed")}),(0,i.jsx)("th",{children:n("Files")}),(0,i.jsx)("th",{children:n("Size")})]})}),(0,i.jsx)("tbody",{children:e.slice().sort(de).map((e=>(0,i.jsx)(ae,{source:e,bundle:s,t:t.plainT},e.user.cid)))})]})]})}),{urls:{sources:({bundle:e},s)=>s.get(`${N.A.BUNDLES_URL}/${e.id}/sources`)},onSocketConnected:(e,{refetchData:s,props:t})=>{e(N.A.MODULE_URL,N.A.BUNDLE_SOURCES,(e=>{e.id===t.bundle.id&&s()}))}});class le extends n.Component{render(){const{bundle:e,queueT:s}=this.props;return(0,i.jsx)(b.A,Object.assign({className:"source",title:e.name,subHeader:e.target,closable:!0,icon:(0,i.jsx)(L.A,{typeInfo:e.type}),fullHeight:!0},this.props,{children:(0,i.jsx)(ce,{bundle:e,queueT:s})}))}}le.displayName="SourceDialog";const ue=(0,C.A)((0,ee.A)(le,{urls:{bundle:({params:e},s)=>s.get(`${N.A.BUNDLES_URL}/${e.bundleId}`)}}),"sources/:bundleId");var me=t(32728),he=t(32389),pe=t(4425);const Ee=({cellData:e,rowDataGetter:s,t})=>(0,i.jsx)(x,{itemPrio:e,item:s(),prioAction:W.hh,t});class Ae extends n.Component{constructor(){super(...arguments),this.isActive=(e,s)=>!s.status.downloaded,this.isDownloaded=(e,s)=>s.status.downloaded,this.isRunning=(e,s)=>s.speed>0,this.emptyRowsNodeGetter=()=>{const{t:e}=this.queueT;return(0,i.jsx)(me.A,{title:e("queueEmpty","The queue is empty"),icon:pe.A.FILE,description:e("queueEmptyDesc","New items can be queued from search or filelists")})},this.queueT=(0,h.lw)(this.props.t,m.KV.QUEUE)}render(){const{translate:e}=this.queueT;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.A,{emptyRowsNodeGetter:this.emptyRowsNodeGetter,store:_,footerData:(0,i.jsx)(oe.Wy,{className:"top left pointing",caption:e("Actions..."),actions:Z.f$,header:e("Queue actions"),triggerIcon:"chevron up",button:!0,remoteMenuId:"queue"}),moduleId:m.KV.QUEUE,children:[(0,i.jsx)(o.VP,{name:"Name",width:200,flexGrow:4,columnKey:"name",cell:(0,i.jsx)(T.tC,{actions:Z.vl,remoteMenuId:z.Ay.QUEUE_BUNDLE,ids:["content","sources","divider","search","searchBundleAlternates","divider","removeBundle","divider","rescan","forceShare"]})}),(0,i.jsx)(o.VP,{name:"Size",width:60,columnKey:"size",cell:(0,i.jsx)(T.us,{}),flexGrow:1}),(0,i.jsx)(o.VP,{name:"Type/content",width:150,columnKey:"type",hideWidth:1e3,cell:(0,i.jsx)(T.V9,{action:Z._q,moduleData:Z.qZ})}),(0,i.jsx)(o.VP,{name:"Status",width:120,flexGrow:3,columnKey:"status",cell:(0,i.jsx)(S,{})}),(0,i.jsx)(o.VP,{name:"Sources",width:60,columnKey:"sources",renderCondition:this.isActive,flexGrow:1,cell:(0,i.jsx)(T.V9,{action:Z.De,moduleData:Z.qZ})}),(0,i.jsx)(o.VP,{name:"Time left",width:50,columnKey:"seconds_left",renderCondition:this.isRunning,cell:(0,i.jsx)(T.WQ,{})}),(0,i.jsx)(o.VP,{name:"Speed",width:50,columnKey:"speed",cell:(0,i.jsx)(T.kF,{}),renderCondition:this.isRunning,flexGrow:1}),(0,i.jsx)(o.VP,{name:"Priority",width:80,columnKey:"priority",renderCondition:this.isActive,cell:(0,i.jsx)(Ee,{}),flexGrow:1}),(0,i.jsx)(o.VP,{name:"Added",width:100,columnKey:"time_added",cell:(0,i.jsx)(T.Jo,{}),hideWidth:1400}),(0,i.jsx)(o.VP,{name:"Finished",width:100,columnKey:"time_finished",cell:(0,i.jsx)(T.Jo,{}),renderCondition:this.isDownloaded,hideWidth:1200})]}),(0,i.jsx)(ue,{queueT:this.queueT}),(0,i.jsx)(te,{})]})}}Ae.displayName="Queue";const Ue=(0,he.CI)()(Ae)}}]);
|
|
2
|
-
//# sourceMappingURL=queue.
|
|
1
|
+
"use strict";(self.webpackChunkairdcpp_webui=self.webpackChunkairdcpp_webui||[]).push([[336],{61987:(e,s,t)=>{t.d(s,{A:()=>a});var i=t(71354),n=t.n(i),o=t(76314),r=t.n(o)()(n());r.push([e.id,".status .error {\n color: red;\n}\n\n@media only screen and (min-width: 767px) {\n .source.modal td {\n max-width: 250px;\n }\n\n /* Can't be applied to dropdown cells */\n .source.modal td:not(.user) {\n overflow-x: hidden;\n }\n}\n","",{version:3,sources:["webpack://./src/routes/Queue/style.css"],names:[],mappings:"AAAA;EACE,UAAU;AACZ;;AAEA;EACE;IACE,gBAAgB;EAClB;;EAEA,uCAAuC;EACvC;IACE,kBAAkB;EACpB;AACF",sourcesContent:[".status .error {\n color: red;\n}\n\n@media only screen and (min-width: 767px) {\n .source.modal td {\n max-width: 250px;\n }\n\n /* Can't be applied to dropdown cells */\n .source.modal td:not(.user) {\n overflow-x: hidden;\n }\n}\n"],sourceRoot:""}]);const a=r},32563:(e,s,t)=>{t.d(s,{mM:()=>d});var i=t(58059),n=t(4425),o=t(86038),r=t(67749);const a={removeBundleSource:{id:"removeBundleSource",displayName:"Remove source",access:o.US.QUEUE_EDIT,icon:n.A.REMOVE,handler:({itemData:e,entity:s,socket:t})=>t.delete(`${i.A.BUNDLES_URL}/${s.id}/sources/${e.user.cid}`)}},d={moduleData:{moduleId:r.KV.QUEUE,subId:"bundleSource"},actions:a}},89478:(e,s,t)=>{t.d(s,{Hi:()=>m,ew:()=>l});var i=t(58059),n=t(4425),o=t(86038),r=t(67749),a=t(47450);const d={id:"search",displayName:"Search (foreground)",access:o.US.SEARCH,icon:n.A.SEARCH,handler:({itemData:e,location:s,navigate:t})=>a.A.search(e,s,t)},c={id:"searchAlternates",displayName:"Search for alternates",access:o.US.QUEUE_EDIT,icon:n.A.SEARCH_ALTERNATES,filter:({itemData:e})=>0===e.time_finished,handler:({itemData:e,socket:s})=>s.post(`${i.A.FILES_URL}/${e.id}/search`)},l={id:"remove",displayName:"Remove",access:o.US.QUEUE_EDIT,icon:n.A.REMOVE,confirmation:{content:"Are you sure that you want to remove the file {{item.name}}?",approveCaption:"Remove file",rejectCaption:"Don't remove",checkboxCaption:"Remove on disk"},handler:({itemData:e,socket:s},t)=>s.post(`${i.A.FILES_URL}/${e.id}/remove`,{remove_finished:t}),notifications:{onSuccess:"File {{item.name}} was removed from queue"}},u={search:d,searchFileAlternates:c,removeFile:l},m={moduleData:{moduleId:r.KV.QUEUE,subId:"file"},actions:u}},34395:(e,s,t)=>{t.d(s,{JN:()=>a});var i=t(58059),n=t(4425),o=t(86038),r=t(67749);const a={id:"removeSource",displayName:"Remove user from queue",access:o.US.QUEUE_EDIT,icon:n.A.REMOVE,handler:({itemData:e,socket:s})=>s.delete(`${i.A.SOURCES_URL}/${e.cid}`),notifications:{onSuccess:"The user {{user.nicks}} was removed from {{result.count}} files"}};r.KV.QUEUE},27415:(e,s,t)=>{t.d(s,{f$:()=>h,vl:()=>R,qZ:()=>N,_q:()=>v,De:()=>x,Hi:()=>_.Hi});var i=t(58059),n=t(4425),o=t(86038),r=t(67749),a=t(48844);const d=(e,s)=>e.post(i.A.BUNDLES_URL+"/priority",{priority:s}),c={id:"removeCompleted",displayName:"Remove completed bundles",access:o.US.QUEUE_EDIT,icon:n.A.REMOVE,handler:({socket:e})=>e.post(i.A.BUNDLES_URL+"/remove_completed"),notifications:{onSuccess:"{{result.count}} completed bundles were removed"}},l={id:"pause",displayName:"Pause all bundles",access:o.US.QUEUE_EDIT,icon:n.A.PAUSE,handler:({socket:e})=>d(e,o.Fm.PAUSED_FORCED)},u={id:"resumeAll",displayName:"Resume all bundles",access:o.US.QUEUE_EDIT,icon:n.A.PLAY,handler:({socket:e})=>d(e,o.Fm.DEFAULT)},m={removeCompleted:c,divider:a.o,pause:l,resume:u},h={moduleData:{moduleId:r.KV.QUEUE},actions:m};var p=t(47450);const E=({itemData:e})=>e.status.id===i.S.COMPLETION_VALIDATION_ERROR,A=({itemData:e})=>0===e.time_finished,U=(e,s,t)=>e.post(`${i.A.BUNDLES_URL}/${s.id}/share`,{skip_validation:t}),x={id:"sources",displayName:"Manage sources...",icon:n.A.USER,filter:e=>e.itemData.sources.total>0&&A(e),handler:({itemData:e,navigate:s})=>{s(`sources/${e.id}`)}},v={id:"content",displayName:"Manage files...",icon:n.A.FILE,filter:({itemData:e})=>"directory"===e.type.id,handler:({itemData:e,navigate:s})=>{s(`content/${e.id}`)}},y={id:"search",displayName:"Search (foreground)",icon:n.A.SEARCH,handler:({itemData:e,location:s,navigate:t})=>p.A.search(e,s,t)},j={id:"searchBundleAlternates",displayName:"Search for alternates",icon:n.A.SEARCH_ALTERNATES,filter:A,handler:({itemData:e,socket:s})=>s.post(`${i.A.BUNDLES_URL}/${e.id}/search`),notifications:{onSuccess:"The bundle {{item.name}} was searched for alternates"}},D={id:"remove",displayName:"Remove",access:o.US.QUEUE_EDIT,icon:n.A.REMOVE,confirmation:{content:"Are you sure that you want to remove the bundle {{item.name}}?",approveCaption:"Remove bundle",rejectCaption:"Don't remove",checkboxCaption:"Remove finished files"},handler:({itemData:e,socket:s},t)=>s.post(`${i.A.BUNDLES_URL}/${e.id}/remove`,{remove_finished:t})},S={id:"rescan",displayName:"Rescan for errors",access:o.US.QUEUE_EDIT,icon:n.A.REFRESH_COLORED,filter:E,handler:({itemData:e,socket:s})=>U(s,e,!1)},f={id:"forceShare",displayName:"Force in share",access:o.US.QUEUE_EDIT,icon:n.A.ERROR,filter:E,handler:({itemData:e,socket:s})=>U(s,e,!0)},w={sources:x,content:v,divider:null,search:y,searchBundleAlternates:j,divider2:null,removeBundle:D,divider3:null,rescan:S,forceShare:f},N={moduleId:r.KV.QUEUE,subId:"bundle"},R={moduleData:N,actions:w};t(32563);var _=t(89478);t(34395)},25364:(e,s,t)=>{t.d(s,{A:()=>r});var i=t(74848),n=(t(96540),t(46942)),o=t.n(n);const r=({className:e,percent:s,caption:t})=>(0,i.jsxs)("div",{className:o()("ui progress",e,{indeterminate:void 0===s}),"data-percent":s,children:[(0,i.jsx)("div",{className:"bar",style:{transitionDuration:"300ms",width:void 0===s?void 0:s+"%",minWidth:"0px"},children:(0,i.jsx)("div",{className:"progress"})}),!!t&&(0,i.jsx)("div",{className:"label",children:t})]})},6066:(e,s,t)=>{t.r(s),t.d(s,{default:()=>Ue});var i=t(74848),n=t(96540),o=t(68465),r=t(22373),a=t(2404),d=t.n(a),c=t(86038);const l={[c.Fm.PAUSED_FORCED]:{str:"Paused (forced)",id:0},[c.Fm.PAUSED]:{str:"Paused",id:1},[c.Fm.LOWEST]:{str:"Lowest",id:2},[c.Fm.LOW]:{str:"Low",id:3},[c.Fm.NORMAL]:{str:"Normal",id:4},[c.Fm.HIGH]:{str:"High",id:5},[c.Fm.HIGHEST]:{str:"Highest",id:6}};var u=t(2690),m=t(67749),h=t(42695),p=t(36076),E=t(43045),A=t(6897),U=t(28286);const x=(0,n.memo)((({item:e,itemPrio:s,prioAction:t,t:n})=>{const{hasAccess:o}=(0,U.w)(),r=s=>(0,p.bd)((()=>t(e,s)),n);let a=(0,h.Tl)(l[s.id].str,n,m.KV.QUEUE);return s.auto&&(a+=` (${(0,h.Tl)("Auto",n,m.KV.QUEUE).toLocaleLowerCase()})`),o(c.US.QUEUE_EDIT)?(0,i.jsx)(u.A,{caption:a,className:"priority-menu",children:t=>{const i=Object.keys(l).map(Number).map((s=>((s,t)=>{const i=e.priority.id;return{id:s.id.toString(),item:{active:i===s.id,onClick:()=>{r(s.id)},children:(0,h.Tl)(s.str,t,m.KV.QUEUE)}}})(l[s],n)));return i.push({id:"divider"}),i.push({id:"auto",item:{active:s.auto,onClick:()=>{r(c.Fm.DEFAULT)},children:(0,h.Tl)("Auto",n,m.KV.QUEUE)}}),(0,A.y)(i,t)}}):(0,i.jsx)(E.b,{caption:a})}),((e,s)=>d()(s.item.priority,e.item.priority)));var v=t(46942),y=t.n(v),j=t(25364);const D=(e,s)=>{if(e.completed)return"success";const t=e.id;return y()({grey:(!t||t===c.$E.QUEUED)&&0===s.speed},{blue:(!t||t===c.$E.QUEUED)&&s.speed>0})},S=({cellData:e,rowDataGetter:s})=>{if(e.failed)return(0,i.jsx)("span",{className:"error",children:e.str});const t=s();return(0,i.jsx)(j.A,{className:D(e,t),caption:e.str,percent:100*t.downloaded_bytes/t.size})};var f=t(22005),w=t.n(f),N=t(58059),R=t(52267);const _=w().createStore({_viewName:"queue_bundle_view",_apiUrl:N.A.MODULE_URL,mixins:[(0,R.A)("name")]});var b=t(99671),C=t(65385),L=t(5945);const I=w().createStore({_viewName:"queue_file_view",_apiUrl:N.A.MODULE_URL,mixins:[(0,R.A)("name")]});var T=t(44247),g=t(85072),V=t.n(g),F=t(97825),k=t.n(F),P=t(77659),Q=t.n(P),K=t(55056),$=t.n(K),B=t(10540),O=t.n(B),q=t(41113),H=t.n(q),M=t(61987),G={};G.styleTagTransform=H(),G.setAttributes=$(),G.insert=Q().bind(null,"head"),G.domAPI=k(),G.insertStyleElement=O(),V()(M.A,G),M.A&&M.A.locals&&M.A.locals;var W=t(56896),z=t(39115),Z=t(27415);const J=({cellData:e,rowDataGetter:s,t})=>(0,i.jsx)(x,{itemPrio:e,item:s(),prioAction:W.nX,t});class X extends n.Component{constructor(){super(...arguments),this.isActive=(e,s)=>!s.status.downloaded,this.isRunning=(e,s)=>s.speed>0}render(){return(0,i.jsxs)(r.A,{store:I,sourceFilter:{pattern:this.props.bundle.id,method:c.Od.EXACT,property:"bundle"},moduleId:m.KV.QUEUE,textFilterProps:{autoFocus:!0},children:[(0,i.jsx)(o.VP,{name:"Name",width:200,flexGrow:20,columnKey:"name",cell:(0,i.jsx)(T.tC,{actions:Z.Hi,remoteMenuId:z.Ay.QUEUE_FILE})}),(0,i.jsx)(o.VP,{name:"Size",width:70,columnKey:"size",cell:(0,i.jsx)(T.us,{}),flexGrow:1}),(0,i.jsx)(o.VP,{name:"Status",width:120,columnKey:"status",cell:(0,i.jsx)(S,{})}),(0,i.jsx)(o.VP,{name:"Sources",width:65,columnKey:"sources",renderCondition:this.isActive}),(0,i.jsx)(o.VP,{name:"Time left",width:50,columnKey:"seconds_left",renderCondition:this.isRunning,cell:(0,i.jsx)(T.WQ,{})}),(0,i.jsx)(o.VP,{name:"Speed",width:55,columnKey:"speed",cell:(0,i.jsx)(T.kF,{}),renderCondition:this.isRunning}),(0,i.jsx)(o.VP,{name:"Priority",width:80,columnKey:"priority",renderCondition:this.isActive,cell:(0,i.jsx)(J,{}),flexGrow:1})]})}}const Y=X;var ee=t(56484);class se extends n.Component{render(){const{bundle:e}=this.props;return(0,i.jsx)(b.A,{className:"source",title:e.name,subHeader:e.target,closable:!0,icon:(0,i.jsx)(L.A,{typeInfo:e.type}),fullHeight:!0,children:(0,i.jsx)(Y,{bundle:e})})}}se.displayName="BundleFileDialog";const te=(0,C.A)((0,ee.A)(se,{urls:{bundle:({params:e},s)=>s.get(`${N.A.BUNDLES_URL}/${e.bundleId}`)}}),"content/:bundleId");var ie=t(32563),ne=t(74416),oe=t(71352),re=t(86668);const ae=({source:e,bundle:s,t})=>{const{formatSize:n,formatSpeed:o}=(0,ne.k)();return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"user dropdown",children:(0,i.jsx)(oe.Bg,{userIcon:!0,user:e.user,ids:re.F9,contextElement:".source.modal",remoteMenuId:z.Ay.HINTED_USER,children:(0,i.jsx)(oe.Wy,{actions:ie.mM,itemData:e,entity:s})})}),(0,i.jsx)("td",{className:"hubs",children:e.user.hub_names}),(0,i.jsx)("td",{className:"speed",children:e.last_speed>0&&o(e.last_speed)}),(0,i.jsx)("td",{className:"files",children:e.files}),(0,i.jsx)("td",{className:"size",children:n(e.size)})]})},de=(e,s)=>e.user.nicks.localeCompare(s.user.nicks),ce=(0,ee.A)((({sources:e,bundle:s,queueT:t})=>{const{translate:n}=t;return(0,i.jsxs)("div",{className:"sources",children:[(0,i.jsx)("h2",{children:n("Sources")}),(0,i.jsxs)("table",{className:"ui striped table",children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:n("User")}),(0,i.jsx)("th",{children:n("Hubs")}),(0,i.jsx)("th",{children:n("Last known speed")}),(0,i.jsx)("th",{children:n("Files")}),(0,i.jsx)("th",{children:n("Size")})]})}),(0,i.jsx)("tbody",{children:e.slice().sort(de).map((e=>(0,i.jsx)(ae,{source:e,bundle:s,t:t.plainT},e.user.cid)))})]})]})}),{urls:{sources:({bundle:e},s)=>s.get(`${N.A.BUNDLES_URL}/${e.id}/sources`)},onSocketConnected:(e,{refetchData:s,props:t})=>{e(N.A.MODULE_URL,N.A.BUNDLE_SOURCES,(e=>{e.id===t.bundle.id&&s()}))}});class le extends n.Component{render(){const{bundle:e,queueT:s}=this.props;return(0,i.jsx)(b.A,Object.assign({className:"source",title:e.name,subHeader:e.target,closable:!0,icon:(0,i.jsx)(L.A,{typeInfo:e.type}),fullHeight:!0},this.props,{children:(0,i.jsx)(ce,{bundle:e,queueT:s})}))}}le.displayName="SourceDialog";const ue=(0,C.A)((0,ee.A)(le,{urls:{bundle:({params:e},s)=>s.get(`${N.A.BUNDLES_URL}/${e.bundleId}`)}}),"sources/:bundleId");var me=t(32728),he=t(32389),pe=t(4425);const Ee=({cellData:e,rowDataGetter:s,t})=>(0,i.jsx)(x,{itemPrio:e,item:s(),prioAction:W.hh,t});class Ae extends n.Component{constructor(){super(...arguments),this.isActive=(e,s)=>!s.status.downloaded,this.isDownloaded=(e,s)=>s.status.downloaded,this.isRunning=(e,s)=>s.speed>0,this.emptyRowsNodeGetter=()=>{const{t:e}=this.queueT;return(0,i.jsx)(me.A,{title:e("queueEmpty","The queue is empty"),icon:pe.A.FILE,description:e("queueEmptyDesc","New items can be queued from search or filelists")})},this.queueT=(0,h.lw)(this.props.t,m.KV.QUEUE)}render(){const{translate:e}=this.queueT;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.A,{emptyRowsNodeGetter:this.emptyRowsNodeGetter,store:_,footerData:(0,i.jsx)(oe.Wy,{className:"top left pointing",caption:e("Actions..."),actions:Z.f$,header:e("Queue actions"),triggerIcon:"chevron up",button:!0,remoteMenuId:"queue"}),moduleId:m.KV.QUEUE,children:[(0,i.jsx)(o.VP,{name:"Name",width:200,flexGrow:4,columnKey:"name",cell:(0,i.jsx)(T.tC,{actions:Z.vl,remoteMenuId:z.Ay.QUEUE_BUNDLE,ids:["content","sources","divider","search","searchBundleAlternates","divider","removeBundle","divider","rescan","forceShare"]})}),(0,i.jsx)(o.VP,{name:"Size",width:60,columnKey:"size",cell:(0,i.jsx)(T.us,{}),flexGrow:1}),(0,i.jsx)(o.VP,{name:"Type/content",width:150,columnKey:"type",hideWidth:1e3,cell:(0,i.jsx)(T.V9,{action:Z._q,moduleData:Z.qZ})}),(0,i.jsx)(o.VP,{name:"Status",width:120,flexGrow:3,columnKey:"status",cell:(0,i.jsx)(S,{})}),(0,i.jsx)(o.VP,{name:"Sources",width:60,columnKey:"sources",renderCondition:this.isActive,flexGrow:1,cell:(0,i.jsx)(T.V9,{action:Z.De,moduleData:Z.qZ})}),(0,i.jsx)(o.VP,{name:"Time left",width:50,columnKey:"seconds_left",renderCondition:this.isRunning,cell:(0,i.jsx)(T.WQ,{})}),(0,i.jsx)(o.VP,{name:"Speed",width:50,columnKey:"speed",cell:(0,i.jsx)(T.kF,{}),renderCondition:this.isRunning,flexGrow:1}),(0,i.jsx)(o.VP,{name:"Priority",width:80,columnKey:"priority",renderCondition:this.isActive,cell:(0,i.jsx)(Ee,{}),flexGrow:1}),(0,i.jsx)(o.VP,{name:"Added",width:100,columnKey:"time_added",cell:(0,i.jsx)(T.Jo,{}),hideWidth:1400}),(0,i.jsx)(o.VP,{name:"Finished",width:100,columnKey:"time_finished",cell:(0,i.jsx)(T.Jo,{}),renderCondition:this.isDownloaded,hideWidth:1200})]}),(0,i.jsx)(ue,{queueT:this.queueT}),(0,i.jsx)(te,{})]})}}Ae.displayName="Queue";const Ue=(0,he.CI)()(Ae)}}]);
|
|
2
|
+
//# sourceMappingURL=queue.493c6d72a2e6d66362a3.chunk.js.map
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"js/queue.493c6d72a2e6d66362a3.chunk.js","mappings":"kKAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,wPActC,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,0CAA0C,MAAQ,GAAG,SAAW,6FAA6F,eAAiB,CAAC,yPAAyP,WAAa,MAEnd,S,mFCZA,MAkBMC,EAAsB,CAC1BC,mBAT2C,CAC3CF,GAAI,qBACJG,YAAa,gBACbC,OAAQ,KAAeC,WACvBC,KAAM,IAAcC,OACpBC,QAfkD,EAClDC,SAAUC,EACVC,OAAQC,EACRC,YAEOA,EAAOC,OACZ,GAAG,IAAeC,eAAeH,EAAOZ,cAAcU,EAAOM,KAAKC,SAqBzDC,EAA8B,CACzCC,WAN2C,CAC3CC,SAAU,KAAWC,MACrBC,MAAO,gBAKPC,QAAStB,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GAAgB,MAGvB,EA3JgB,GAAAlO,YAAc,QA8JhC,UAAe,UAAf,CAAiC4O,G","sources":["webpack://airdcpp-webui/./src/routes/Queue/style.css","webpack://airdcpp-webui/./src/actions/ui/queue/QueueBundleSourceActions.ts","webpack://airdcpp-webui/./src/actions/ui/queue/QueueFileActions.ts","webpack://airdcpp-webui/./src/actions/ui/queue/QueueSourceActions.ts","webpack://airdcpp-webui/./src/actions/ui/queue/QueueActions.ts","webpack://airdcpp-webui/./src/actions/ui/queue/QueueBundleActions.ts","webpack://airdcpp-webui/./src/components/semantic/Progress.tsx","webpack://airdcpp-webui/./src/constants/PriorityConstants.ts","webpack://airdcpp-webui/./src/routes/Queue/components/PriorityMenu.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/StatusCell.tsx","webpack://airdcpp-webui/./src/stores/views/QueueBundleViewStore.js","webpack://airdcpp-webui/./src/stores/views/QueueFileViewStore.js","webpack://airdcpp-webui/./src/routes/Queue/style.css?62bc","webpack://airdcpp-webui/./src/routes/Queue/components/BundleFileTable.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/BundleFileDialog.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/BundleSourceTable.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/BundleSourceDialog.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/Queue.tsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.status .error {\n color: red;\n}\n\n@media only screen and (min-width: 767px) {\n .source.modal td {\n max-width: 250px;\n }\n\n /* Can't be applied to dropdown cells */\n .source.modal td:not(.user) {\n overflow-x: hidden;\n }\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/routes/Queue/style.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,UAAU;AACZ;;AAEA;EACE;IACE,gBAAgB;EAClB;;EAEA,uCAAuC;EACvC;IACE,kBAAkB;EACpB;AACF\",\"sourcesContent\":[\".status .error {\\n color: red;\\n}\\n\\n@media only screen and (min-width: 767px) {\\n .source.modal td {\\n max-width: 250px;\\n }\\n\\n /* Can't be applied to dropdown cells */\\n .source.modal td:not(.user) {\\n overflow-x: hidden;\\n }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import { default as QueueConstants } from 'constants/QueueConstants';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\ntype ActionHandlerType = UI.ActionHandler<API.QueueBundleSource, API.QueueBundle>;\r\n\r\nconst handleRemoveBundleSource: ActionHandlerType = ({\r\n itemData: source,\r\n entity: bundle,\r\n socket,\r\n}) => {\r\n return socket.delete(\r\n `${QueueConstants.BUNDLES_URL}/${bundle.id}/sources/${source.user.cid}`,\r\n );\r\n};\r\n\r\nexport const QueueBundleSourceRemoveAction = {\r\n id: 'removeBundleSource',\r\n displayName: 'Remove source',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.REMOVE,\r\n handler: handleRemoveBundleSource,\r\n};\r\n\r\nconst BundleSourceActions = {\r\n removeBundleSource: QueueBundleSourceRemoveAction,\r\n};\r\n\r\nexport const QueueBundleSourceActionModule = {\r\n moduleId: UI.Modules.QUEUE,\r\n subId: 'bundleSource',\r\n};\r\n\r\nexport const QueueBundleSourceActionMenu = {\r\n moduleData: QueueBundleSourceActionModule,\r\n actions: BundleSourceActions,\r\n};\r\n","import QueueConstants from 'constants/QueueConstants';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\nimport SearchActions from 'actions/reflux/SearchActions';\r\n\r\ntype Filter = UI.ActionFilter<API.QueueFile>;\r\nconst itemNotFinished: Filter = ({ itemData: file }) => file.time_finished === 0;\r\n\r\ntype Handler = UI.ActionHandler<API.QueueFile>;\r\nconst handleSearch: Handler = ({ itemData: file, location, navigate }) => {\r\n return SearchActions.search(file, location, navigate);\r\n};\r\n\r\nconst handleRemoveFile: Handler = (\r\n { itemData: file, socket },\r\n removeFinished: boolean,\r\n) => {\r\n return socket.post(`${QueueConstants.FILES_URL}/${file.id}/remove`, {\r\n remove_finished: removeFinished,\r\n });\r\n};\r\n\r\nconst handleSearchFileAlternates: Handler = ({ itemData: file, socket }) => {\r\n return socket.post(`${QueueConstants.FILES_URL}/${file.id}/search`);\r\n};\r\n\r\nexport const QueueFileSearchAction = {\r\n id: 'search',\r\n displayName: 'Search (foreground)',\r\n access: API.AccessEnum.SEARCH,\r\n icon: IconConstants.SEARCH,\r\n handler: handleSearch,\r\n};\r\n\r\nexport const QueueFileSearchAlternatesAction = {\r\n id: 'searchAlternates',\r\n displayName: 'Search for alternates',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.SEARCH_ALTERNATES,\r\n filter: itemNotFinished,\r\n handler: handleSearchFileAlternates,\r\n};\r\n\r\nexport const QueueFileRemoveAction = {\r\n id: 'remove',\r\n displayName: 'Remove',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.REMOVE,\r\n confirmation: {\r\n content: 'Are you sure that you want to remove the file {{item.name}}?',\r\n approveCaption: 'Remove file',\r\n rejectCaption: `Don't remove`,\r\n checkboxCaption: 'Remove on disk',\r\n },\r\n handler: handleRemoveFile,\r\n notifications: {\r\n onSuccess: 'File {{item.name}} was removed from queue',\r\n },\r\n};\r\n\r\nconst QueueFileActions: UI.ActionListType<API.QueueFile> = {\r\n search: QueueFileSearchAction,\r\n searchFileAlternates: QueueFileSearchAlternatesAction,\r\n removeFile: QueueFileRemoveAction,\r\n};\r\n\r\nexport const QueueFileActionModule = {\r\n moduleId: UI.Modules.QUEUE,\r\n subId: 'file',\r\n};\r\n\r\nexport const QueueFileActionMenu = {\r\n moduleData: QueueFileActionModule,\r\n actions: QueueFileActions,\r\n};\r\n","import QueueConstants from 'constants/QueueConstants';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nconst handleRemoveSource: UI.ActionHandler<API.User> = ({ itemData: user, socket }) => {\r\n return socket.delete(`${QueueConstants.SOURCES_URL}/${user.cid}`);\r\n};\r\n\r\nexport const QueueSourceRemoveAction = {\r\n id: 'removeSource',\r\n displayName: 'Remove user from queue',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.REMOVE,\r\n handler: handleRemoveSource,\r\n notifications: {\r\n onSuccess: 'The user {{user.nicks}} was removed from {{result.count}} files',\r\n },\r\n};\r\n\r\nconst QueueSourceActions: UI.ActionListType<API.User> = {\r\n removeSource: QueueSourceRemoveAction,\r\n};\r\n\r\nexport const QueueSourceActionModule = {\r\n moduleId: UI.Modules.QUEUE,\r\n};\r\n\r\nexport const QueueSourceActionMenu = {\r\n moduleData: QueueSourceActionModule,\r\n actions: QueueSourceActions,\r\n};\r\n","import QueueConstants from 'constants/QueueConstants';\n\nimport IconConstants from 'constants/IconConstants';\n\nimport * as API from 'types/api';\nimport * as UI from 'types/ui';\nimport { MENU_DIVIDER } from 'constants/ActionConstants';\nimport { APISocket } from 'services/SocketService';\n\nconst setBundlePriorities = (socket: APISocket, prio: API.QueuePriorityEnum) => {\n return socket.post(QueueConstants.BUNDLES_URL + '/priority', {\n priority: prio,\n });\n};\n\nconst handlePause: UI.ActionHandler<void> = ({ socket }) => {\n return setBundlePriorities(socket, API.QueuePriorityEnum.PAUSED_FORCED);\n};\n\nconst handleResume: UI.ActionHandler<void> = ({ socket }) => {\n return setBundlePriorities(socket, API.QueuePriorityEnum.DEFAULT);\n};\n\nconst handleRemoveCompleted: UI.ActionHandler<void> = ({ socket }) => {\n return socket.post(QueueConstants.BUNDLES_URL + '/remove_completed');\n};\n\nexport const QueueRemoveCompletedAction = {\n id: 'removeCompleted',\n displayName: 'Remove completed bundles',\n access: API.AccessEnum.QUEUE_EDIT,\n icon: IconConstants.REMOVE,\n handler: handleRemoveCompleted,\n notifications: {\n onSuccess: '{{result.count}} completed bundles were removed',\n },\n};\n\nexport const QueuePauseAction = {\n id: 'pause',\n displayName: 'Pause all bundles',\n access: API.AccessEnum.QUEUE_EDIT,\n icon: IconConstants.PAUSE,\n handler: handlePause,\n};\n\nexport const QueueResumeAction = {\n id: 'resumeAll',\n displayName: 'Resume all bundles',\n access: API.AccessEnum.QUEUE_EDIT,\n icon: IconConstants.PLAY,\n handler: handleResume,\n};\n\nconst QueueActions: UI.ActionListType<void> = {\n removeCompleted: QueueRemoveCompletedAction,\n divider: MENU_DIVIDER,\n pause: QueuePauseAction,\n resume: QueueResumeAction,\n};\n\nexport const QueueActionModule = {\n moduleId: UI.Modules.QUEUE,\n};\n\nexport const QueueActionMenu = {\n moduleData: QueueActionModule,\n actions: QueueActions,\n};\n","import { default as QueueConstants, StatusEnum } from 'constants/QueueConstants';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nimport SearchActions from 'actions/reflux/SearchActions';\r\nimport { APISocket } from 'services/SocketService';\r\n\r\ntype Filter = UI.ActionFilter<API.QueueBundle>;\r\nconst bundleValidationFailed: Filter = ({ itemData: bundle }) =>\r\n bundle.status.id === StatusEnum.COMPLETION_VALIDATION_ERROR;\r\nconst itemNotFinished: Filter = ({ itemData: bundle }) => bundle.time_finished === 0;\r\nconst isDirectoryBundle: Filter = ({ itemData: bundle }) =>\r\n bundle.type.id === 'directory';\r\nconst hasSources: Filter = (data) =>\r\n data.itemData.sources.total > 0 && itemNotFinished(data);\r\n\r\nconst shareBundle = (\r\n socket: APISocket,\r\n bundle: API.QueueBundle,\r\n skipValidation: boolean,\r\n) => {\r\n return socket.post(`${QueueConstants.BUNDLES_URL}/${bundle.id}/share`, {\r\n skip_validation: skipValidation,\r\n });\r\n};\r\n\r\n// Handlers\r\ntype Handler = UI.ActionHandler<API.QueueBundle>;\r\n\r\nconst handleRescan: Handler = ({ itemData: bundle, socket }) => {\r\n return shareBundle(socket, bundle, false);\r\n};\r\n\r\nconst handleForceShare: Handler = ({ itemData: bundle, socket }) => {\r\n return shareBundle(socket, bundle, true);\r\n};\r\n\r\nconst handleRemoveBundle: Handler = ({ itemData: bundle, socket }, removeFinished) => {\r\n return socket.post(`${QueueConstants.BUNDLES_URL}/${bundle.id}/remove`, {\r\n remove_finished: removeFinished,\r\n });\r\n};\r\n\r\nconst handleSearch: Handler = ({ itemData: bundle, location, navigate }) => {\r\n return SearchActions.search(bundle, location, navigate);\r\n};\r\n\r\nconst handleSearchBundleAlternates: Handler = ({ itemData: bundle, socket }) => {\r\n return socket.post(`${QueueConstants.BUNDLES_URL}/${bundle.id}/search`);\r\n};\r\n\r\nconst handleSources: Handler = ({ itemData, navigate }) => {\r\n navigate(`sources/${itemData.id}`);\r\n};\r\n\r\nconst handleContent: Handler = ({ itemData, navigate }) => {\r\n navigate(`content/${itemData.id}`);\r\n};\r\n\r\nexport const QueueBundleViewSourcesAction = {\r\n id: 'sources',\r\n displayName: 'Manage sources...',\r\n icon: IconConstants.USER,\r\n filter: hasSources,\r\n handler: handleSources,\r\n};\r\n\r\nexport const QueueBundleViewContentAction = {\r\n id: 'content',\r\n displayName: 'Manage files...',\r\n icon: IconConstants.FILE,\r\n filter: isDirectoryBundle,\r\n handler: handleContent,\r\n};\r\n\r\nexport const QueueBundleSearchAction = {\r\n id: 'search',\r\n displayName: 'Search (foreground)',\r\n icon: IconConstants.SEARCH,\r\n handler: handleSearch,\r\n};\r\n\r\nexport const QueueBundleSearchAlternatesAction = {\r\n id: 'searchBundleAlternates',\r\n displayName: 'Search for alternates',\r\n icon: IconConstants.SEARCH_ALTERNATES,\r\n filter: itemNotFinished,\r\n handler: handleSearchBundleAlternates,\r\n notifications: {\r\n onSuccess: 'The bundle {{item.name}} was searched for alternates',\r\n },\r\n};\r\n\r\nexport const QueueBundleRemoveAction = {\r\n id: 'remove',\r\n displayName: 'Remove',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.REMOVE,\r\n confirmation: {\r\n content: 'Are you sure that you want to remove the bundle {{item.name}}?',\r\n approveCaption: 'Remove bundle',\r\n rejectCaption: `Don't remove`,\r\n checkboxCaption: 'Remove finished files',\r\n },\r\n handler: handleRemoveBundle,\r\n};\r\n\r\nexport const QueueBundleRescanAction = {\r\n id: 'rescan',\r\n displayName: 'Rescan for errors',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.REFRESH_COLORED,\r\n filter: bundleValidationFailed,\r\n handler: handleRescan,\r\n};\r\n\r\nexport const QueueBundleForceShareAction = {\r\n id: 'forceShare',\r\n displayName: 'Force in share',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.ERROR,\r\n filter: bundleValidationFailed,\r\n handler: handleForceShare,\r\n};\r\n\r\nconst QueueBundleActions: UI.ActionListType<API.QueueBundle> = {\r\n sources: QueueBundleViewSourcesAction,\r\n content: QueueBundleViewContentAction,\r\n divider: null,\r\n search: QueueBundleSearchAction,\r\n searchBundleAlternates: QueueBundleSearchAlternatesAction,\r\n divider2: null,\r\n removeBundle: QueueBundleRemoveAction,\r\n divider3: null,\r\n rescan: QueueBundleRescanAction,\r\n forceShare: QueueBundleForceShareAction,\r\n};\r\n\r\nexport const QueueBundleActionModule = {\r\n moduleId: UI.Modules.QUEUE,\r\n subId: 'bundle',\r\n};\r\n\r\nexport const QueueBundleActionMenu = {\r\n moduleData: QueueBundleActionModule,\r\n actions: QueueBundleActions,\r\n} as UI.ModuleActions<API.QueueBundle>;\r\n","import * as React from 'react';\nimport classNames from 'classnames';\n\nexport interface ProgressProps {\n caption?: React.ReactNode;\n className?: string | null;\n percent?: number;\n}\n\nconst Progress: React.FC<ProgressProps> = ({ className, percent, caption }) => (\n <div\n className={classNames('ui progress', className, {\n indeterminate: percent === undefined,\n })}\n data-percent={percent}\n >\n <div\n className=\"bar\"\n style={{\n transitionDuration: 300 + 'ms',\n width: percent === undefined ? undefined : percent + '%',\n minWidth: '0px',\n }}\n >\n <div className=\"progress\" />\n </div>\n {!!caption && <div className=\"label\">{caption}</div>}\n </div>\n);\n\nexport default Progress;\n","import { QueuePriorityEnum } from 'types/api';\n\nexport const PriorityEnum = {\n [QueuePriorityEnum.PAUSED_FORCED]: { str: 'Paused (forced)', id: 0 },\n [QueuePriorityEnum.PAUSED]: { str: 'Paused', id: 1 },\n [QueuePriorityEnum.LOWEST]: { str: 'Lowest', id: 2 },\n [QueuePriorityEnum.LOW]: { str: 'Low', id: 3 },\n [QueuePriorityEnum.NORMAL]: { str: 'Normal', id: 4 },\n [QueuePriorityEnum.HIGH]: { str: 'High', id: 5 },\n [QueuePriorityEnum.HIGHEST]: { str: 'Highest', id: 6 },\n};\n","import { memo } from 'react';\r\nimport isEqual from 'lodash/isEqual';\r\n\r\nimport { PriorityEnum } from 'constants/PriorityConstants';\r\n\r\nimport TableDropdown, { DropdownCloseHandler } from 'components/semantic/TableDropdown';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nimport { translate } from 'utils/TranslationUtils';\r\nimport { runBackgroundSocketAction } from 'utils/ActionUtils';\r\nimport { EmptyDropdownCaption } from 'components/semantic/EmptyDropdown';\r\nimport { buildMenu } from 'components/action-menu/builder/slidingMenuBuilder';\r\nimport { useSession } from 'context/SessionContext';\r\n\r\ninterface PriorityMenuProps {\r\n // Priority object\r\n itemPrio: API.QueuePriority;\r\n\r\n // Item with priority properties\r\n item: API.QueueItemBase;\r\n\r\n prioAction: (item: API.QueueItemBase, priority: API.QueuePriorityEnum) => Promise<any>;\r\n t: UI.TranslateF;\r\n}\r\n\r\nconst PriorityMenu: React.FC<PriorityMenuProps> = ({ item, itemPrio, prioAction, t }) => {\r\n const { hasAccess } = useSession();\r\n\r\n const setPriority = (priorityId: API.QueuePriorityEnum) => {\r\n return runBackgroundSocketAction(() => prioAction(item, priorityId), t);\r\n };\r\n\r\n const getPriorityListItem = (\r\n priority: Omit<API.QueuePriority, 'auto'>,\r\n t: UI.TranslateF,\r\n ): UI.ActionMenuItem => {\r\n const currentPrio = item.priority.id;\r\n return {\r\n id: priority.id.toString(),\r\n item: {\r\n active: currentPrio === priority.id,\r\n onClick: () => {\r\n setPriority(priority.id);\r\n },\r\n children: translate(priority.str, t, UI.Modules.QUEUE),\r\n },\r\n };\r\n };\r\n\r\n const getChildren = (onClose: DropdownCloseHandler) => {\r\n const children = Object.keys(PriorityEnum)\r\n .map(Number)\r\n .map((prioKey) =>\r\n getPriorityListItem(PriorityEnum[prioKey as keyof typeof PriorityEnum], t),\r\n );\r\n\r\n children.push({ id: 'divider' });\r\n children.push({\r\n id: 'auto',\r\n item: {\r\n active: itemPrio.auto,\r\n onClick: () => {\r\n setPriority(API.QueuePriorityEnum.DEFAULT);\r\n },\r\n children: translate('Auto', t, UI.Modules.QUEUE),\r\n },\r\n });\r\n\r\n return buildMenu(children, onClose);\r\n };\r\n\r\n let caption = translate(\r\n PriorityEnum[itemPrio.id as keyof typeof PriorityEnum].str,\r\n t,\r\n UI.Modules.QUEUE,\r\n );\r\n if (itemPrio.auto) {\r\n caption += ` (${translate('Auto', t, UI.Modules.QUEUE).toLocaleLowerCase()})`;\r\n }\r\n\r\n if (!hasAccess(API.AccessEnum.QUEUE_EDIT)) {\r\n return <EmptyDropdownCaption caption={caption} />;\r\n }\r\n\r\n return (\r\n <TableDropdown caption={caption} className=\"priority-menu\">\r\n {getChildren}\r\n </TableDropdown>\r\n );\r\n};\r\n\r\nexport default memo(PriorityMenu, (prevProps, nextProps) => {\r\n return isEqual(nextProps.item.priority, prevProps.item.priority);\r\n});\r\n","import * as React from 'react';\r\nimport classNames from 'classnames';\r\n\r\nimport Progress from 'components/semantic/Progress';\r\nimport { RowWrapperCellChildProps } from 'components/table/RowWrapperCell';\r\n\r\nimport * as API from 'types/api';\r\n\r\nconst getStatusClass = (cellData: API.QueueBundleStatus, rowData: API.QueueBundle) => {\r\n if (cellData.completed) {\r\n return 'success';\r\n }\r\n\r\n const statusId = cellData.id;\r\n return classNames(\r\n {\r\n grey:\r\n (!statusId || statusId === API.QueueBundleStatusEnum.QUEUED) &&\r\n rowData.speed === 0,\r\n },\r\n {\r\n blue:\r\n (!statusId || statusId === API.QueueBundleStatusEnum.QUEUED) && rowData.speed > 0,\r\n },\r\n );\r\n};\r\n\r\nconst StatusCell: React.FC<\r\n RowWrapperCellChildProps<API.QueueBundleStatus, API.QueueBundle>\r\n> = ({ cellData, rowDataGetter }) => {\r\n if (cellData!.failed) {\r\n // There isn't much space for other information\r\n return <span className=\"error\">{cellData!.str}</span>;\r\n }\r\n\r\n const rowData = rowDataGetter!();\r\n return (\r\n <Progress\r\n className={getStatusClass(cellData!, rowData)}\r\n caption={cellData!.str}\r\n percent={(rowData.downloaded_bytes * 100) / rowData.size}\r\n />\r\n );\r\n};\r\n\r\nexport default StatusCell;\r\n","import Reflux from 'reflux';\n\nimport QueueConstants from 'constants/QueueConstants';\nimport ViewStoreMixin from 'mixins/ViewStoreMixin';\n\nexport default Reflux.createStore({\n _viewName: 'queue_bundle_view',\n _apiUrl: QueueConstants.MODULE_URL,\n mixins: [ViewStoreMixin('name')],\n});\n","import Reflux from 'reflux';\n\nimport QueueConstants from 'constants/QueueConstants';\nimport ViewStoreMixin from 'mixins/ViewStoreMixin';\n\nexport default Reflux.createStore({\n _viewName: 'queue_file_view',\n _apiUrl: QueueConstants.MODULE_URL,\n mixins: [ViewStoreMixin('name')],\n});\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","import * as React from 'react';\nimport { Column } from 'fixed-data-table-2';\nimport * as UI from 'types/ui';\n\nimport VirtualTable from 'components/table/VirtualTable';\n\nimport PriorityMenu from 'routes/Queue/components/PriorityMenu';\nimport StatusCell from 'routes/Queue/components/StatusCell';\n\nimport QueueFileViewStore from 'stores/views/QueueFileViewStore';\n\nimport {\n FileActionCell,\n SizeCell,\n SpeedCell,\n AbbreviatedDurationCell,\n} from 'components/table/Cell';\n\nimport '../style.css';\nimport { RowWrapperCellChildProps } from 'components/table/RowWrapperCell';\n\nimport * as API from 'types/api';\nimport { setFilePriority } from 'services/api/QueueApi';\nimport MenuConstants from 'constants/MenuConstants';\nimport { QueueFileActionMenu } from 'actions/ui/queue';\n\nconst PriorityCell: React.FC<\n RowWrapperCellChildProps<API.QueuePriority, API.QueueBundle>\n> = ({ cellData, rowDataGetter, t }) => (\n <PriorityMenu\n itemPrio={cellData!}\n item={rowDataGetter!()}\n prioAction={setFilePriority}\n t={t!}\n />\n);\n\ninterface BundleFileTableProps {\n bundle: API.QueueBundle;\n}\n\nclass BundleFileTable extends React.Component<BundleFileTableProps> {\n isActive = (cellData: any, rowData: API.QueueFile) => {\n return !rowData.status.downloaded;\n };\n\n isRunning = (cellData: any, rowData: API.QueueFile) => {\n return rowData.speed > 0;\n };\n\n render() {\n return (\n <VirtualTable\n store={QueueFileViewStore}\n sourceFilter={{\n pattern: this.props.bundle.id,\n method: API.FilterMethod.EXACT,\n property: 'bundle',\n }}\n moduleId={UI.Modules.QUEUE}\n textFilterProps={{\n autoFocus: true,\n }}\n >\n <Column\n name=\"Name\"\n width={200}\n flexGrow={20}\n columnKey=\"name\"\n cell={\n <FileActionCell\n actions={QueueFileActionMenu}\n remoteMenuId={MenuConstants.QUEUE_FILE}\n />\n }\n />\n <Column\n name=\"Size\"\n width={70}\n columnKey=\"size\"\n cell={<SizeCell />}\n flexGrow={1}\n />\n <Column name=\"Status\" width={120} columnKey=\"status\" cell={<StatusCell />} />\n <Column\n name=\"Sources\"\n width={65}\n columnKey=\"sources\"\n renderCondition={this.isActive}\n />\n <Column\n name=\"Time left\"\n width={50}\n columnKey=\"seconds_left\"\n renderCondition={this.isRunning}\n cell={<AbbreviatedDurationCell />}\n />\n <Column\n name=\"Speed\"\n width={55}\n columnKey=\"speed\"\n cell={<SpeedCell />}\n renderCondition={this.isRunning}\n />\n <Column\n name=\"Priority\"\n width={80}\n columnKey=\"priority\"\n renderCondition={this.isActive}\n cell={<PriorityCell />}\n flexGrow={1}\n />\n </VirtualTable>\n );\n }\n}\n\nexport default BundleFileTable;\n","import { Component } from 'react';\r\nimport RouteModal from 'components/semantic/RouteModal';\r\n\r\nimport ModalRouteDecorator, {\r\n ModalRouteDecoratorChildProps,\r\n} from 'decorators/ModalRouteDecorator';\r\n\r\nimport FileIcon from 'components/icon/FileIcon';\r\nimport BundleFileTable from 'routes/Queue/components/BundleFileTable';\r\nimport DataProviderDecorator, {\r\n DataProviderDecoratorChildProps,\r\n} from 'decorators/DataProviderDecorator';\r\nimport QueueConstants from 'constants/QueueConstants';\r\n\r\nimport * as API from 'types/api';\r\n\r\ninterface BundleFileDialogProps {}\r\n\r\ninterface DataProps extends DataProviderDecoratorChildProps {\r\n bundle: API.QueueBundle;\r\n}\r\n\r\ntype Props = BundleFileDialogProps & DataProps & ModalRouteDecoratorChildProps;\r\n\r\nclass BundleFileDialog extends Component<Props> {\r\n static readonly displayName = 'BundleFileDialog';\r\n\r\n render() {\r\n const { bundle } = this.props;\r\n return (\r\n <RouteModal\r\n className=\"source\"\r\n title={bundle.name}\r\n subHeader={bundle.target}\r\n closable={true}\r\n icon={<FileIcon typeInfo={bundle.type} />}\r\n fullHeight={true}\r\n >\r\n <BundleFileTable bundle={bundle} />\r\n </RouteModal>\r\n );\r\n }\r\n}\r\n\r\nexport default ModalRouteDecorator<BundleFileDialogProps>(\r\n DataProviderDecorator<Omit<Props, keyof DataProps>, DataProps>(BundleFileDialog, {\r\n urls: {\r\n bundle: ({ params }, socket) =>\r\n socket.get(`${QueueConstants.BUNDLES_URL}/${params.bundleId}`),\r\n },\r\n }),\r\n 'content/:bundleId',\r\n);\r\n","import * as React from 'react';\r\n\r\nimport DataProviderDecorator, {\r\n DataProviderDecoratorChildProps,\r\n} from 'decorators/DataProviderDecorator';\r\n\r\nimport { QueueBundleSourceActionMenu } from 'actions/ui/queue/QueueBundleSourceActions';\r\nimport QueueConstants from 'constants/QueueConstants';\r\n\r\nimport { useFormatter } from 'context/FormatterContext';\r\n\r\nimport { ActionMenu, UserMenu } from 'components/action-menu';\r\nimport { UserFileActions } from 'actions/ui/user/UserActions';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\nimport MenuConstants from 'constants/MenuConstants';\r\n\r\ninterface SourceProps {\r\n bundle: API.QueueBundle;\r\n source: API.QueueBundleSource;\r\n t: UI.TranslateF;\r\n}\r\n\r\nconst Source: React.FC<SourceProps> = ({ source, bundle, t }) => {\r\n const { formatSize, formatSpeed } = useFormatter();\r\n return (\r\n <tr>\r\n <td className=\"user dropdown\">\r\n <UserMenu\r\n userIcon={true}\r\n user={source.user}\r\n ids={UserFileActions}\r\n contextElement=\".source.modal\"\r\n remoteMenuId={MenuConstants.HINTED_USER}\r\n >\r\n <ActionMenu\r\n actions={QueueBundleSourceActionMenu}\r\n itemData={source}\r\n entity={bundle}\r\n />\r\n </UserMenu>\r\n </td>\r\n <td className=\"hubs\">{source.user.hub_names}</td>\r\n <td className=\"speed\">{source.last_speed > 0 && formatSpeed(source.last_speed)}</td>\r\n <td className=\"files\">{source.files}</td>\r\n <td className=\"size\">{formatSize(source.size)}</td>\r\n </tr>\r\n );\r\n};\r\n\r\nconst userSort = (a: API.QueueBundleSource, b: API.QueueBundleSource) =>\r\n a.user.nicks.localeCompare(b.user.nicks);\r\n\r\ninterface BundleSourceTableProps {\r\n bundle: API.QueueBundle;\r\n queueT: UI.ModuleTranslator;\r\n}\r\n\r\ninterface BundleSourceTableDataProps extends DataProviderDecoratorChildProps {\r\n sources: API.QueueBundleSource[];\r\n}\r\n\r\nconst BundleSourceTable: React.FC<\r\n BundleSourceTableProps & BundleSourceTableDataProps\r\n> = ({ sources, bundle, queueT }) => {\r\n const { translate } = queueT;\r\n\r\n return (\r\n <div className=\"sources\">\r\n <h2>{translate('Sources')}</h2>\r\n <table className=\"ui striped table\">\r\n <thead>\r\n <tr>\r\n <th>{translate('User')}</th>\r\n <th>{translate('Hubs')}</th>\r\n <th>{translate('Last known speed')}</th>\r\n <th>{translate('Files')}</th>\r\n <th>{translate('Size')}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n {sources\r\n .slice()\r\n .sort(userSort)\r\n .map((source) => (\r\n <Source\r\n key={source.user.cid}\r\n source={source}\r\n bundle={bundle}\r\n t={queueT.plainT}\r\n />\r\n ))}\r\n </tbody>\r\n </table>\r\n </div>\r\n );\r\n};\r\n\r\nexport default DataProviderDecorator<BundleSourceTableProps, BundleSourceTableDataProps>(\r\n BundleSourceTable,\r\n {\r\n urls: {\r\n sources: ({ bundle }, socket) =>\r\n socket.get(`${QueueConstants.BUNDLES_URL}/${bundle.id}/sources`),\r\n },\r\n onSocketConnected: (addSocketListener, { refetchData, props }) => {\r\n addSocketListener<API.QueueBundle>(\r\n QueueConstants.MODULE_URL,\r\n QueueConstants.BUNDLE_SOURCES,\r\n (data) => {\r\n // Avoid flickering when there are many bundles running\r\n if (data.id === props.bundle.id) {\r\n refetchData();\r\n }\r\n },\r\n );\r\n },\r\n },\r\n);\r\n","import { Component } from 'react';\r\nimport RouteModal from 'components/semantic/RouteModal';\r\n\r\nimport ModalRouteDecorator, {\r\n ModalRouteDecoratorChildProps,\r\n} from 'decorators/ModalRouteDecorator';\r\n\r\nimport FileIcon from 'components/icon/FileIcon';\r\n\r\nimport SourceTable from 'routes/Queue/components/BundleSourceTable';\r\nimport DataProviderDecorator, {\r\n DataProviderDecoratorChildProps,\r\n} from 'decorators/DataProviderDecorator';\r\nimport QueueConstants from 'constants/QueueConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\ninterface BundleSourceDialogProps {\r\n queueT: UI.ModuleTranslator;\r\n}\r\n\r\ninterface DataProps extends DataProviderDecoratorChildProps {\r\n bundle: API.QueueBundle;\r\n}\r\n\r\ntype Props = BundleSourceDialogProps & ModalRouteDecoratorChildProps;\r\n\r\nclass SourceDialog extends Component<Props & DataProps> {\r\n static readonly displayName = 'SourceDialog';\r\n\r\n render() {\r\n const { bundle, queueT } = this.props;\r\n return (\r\n <RouteModal\r\n className=\"source\"\r\n title={bundle.name}\r\n subHeader={bundle.target}\r\n closable={true}\r\n icon={<FileIcon typeInfo={bundle.type} />}\r\n fullHeight={true}\r\n {...this.props}\r\n >\r\n <SourceTable bundle={bundle} queueT={queueT} />\r\n </RouteModal>\r\n );\r\n }\r\n}\r\n\r\nexport default ModalRouteDecorator<BundleSourceDialogProps>(\r\n DataProviderDecorator<Props, DataProps>(SourceDialog, {\r\n urls: {\r\n bundle: ({ params }, socket) =>\r\n socket.get(`${QueueConstants.BUNDLES_URL}/${params.bundleId}`),\r\n },\r\n }),\r\n 'sources/:bundleId',\r\n);\r\n","import * as React from 'react';\r\nimport { Column } from 'fixed-data-table-2';\r\n\r\nimport VirtualTable from 'components/table/VirtualTable';\r\n\r\nimport PriorityMenu from 'routes/Queue/components/PriorityMenu';\r\nimport StatusCell from 'routes/Queue/components/StatusCell';\r\nimport QueueBundleViewStore from 'stores/views/QueueBundleViewStore';\r\n\r\nimport BundleFileDialog from 'routes/Queue/components/BundleFileDialog';\r\nimport SourceDialog from 'routes/Queue/components/BundleSourceDialog';\r\n\r\nimport { ActionMenu } from 'components/action-menu';\r\nimport Message from 'components/semantic/Message';\r\n\r\nimport {\r\n ActionLinkCell,\r\n FileActionCell,\r\n SizeCell,\r\n SpeedCell,\r\n AbbreviatedDurationCell,\r\n DurationCell,\r\n} from 'components/table/Cell';\r\n\r\nimport '../style.css';\r\nimport { RowWrapperCellChildProps } from 'components/table/RowWrapperCell';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nimport { withTranslation, WithTranslation } from 'react-i18next';\r\nimport { getModuleT } from 'utils/TranslationUtils';\r\nimport { setBundlePriority } from 'services/api/QueueApi';\r\nimport IconConstants from 'constants/IconConstants';\r\nimport MenuConstants from 'constants/MenuConstants';\r\nimport {\r\n QueueActionMenu,\r\n QueueBundleActionMenu,\r\n QueueBundleActionModule,\r\n QueueBundleViewContentAction,\r\n QueueBundleViewSourcesAction,\r\n} from 'actions/ui/queue';\r\n\r\nconst PriorityCell: React.FC<\r\n RowWrapperCellChildProps<API.QueuePriority, API.QueueBundle>\r\n> = ({ cellData, rowDataGetter, t }) => (\r\n <PriorityMenu\r\n itemPrio={cellData!}\r\n item={rowDataGetter!()}\r\n prioAction={setBundlePriority}\r\n t={t!}\r\n />\r\n);\r\n\r\nclass Queue extends React.Component<WithTranslation> {\r\n static readonly displayName = 'Queue';\r\n\r\n isActive = (cellData: any, rowData: API.QueueBundle) => {\r\n return !rowData.status.downloaded;\r\n };\r\n\r\n isDownloaded = (cellData: any, rowData: API.QueueBundle) => {\r\n return rowData.status.downloaded;\r\n };\r\n\r\n isRunning = (cellData: any, rowData: API.QueueBundle) => {\r\n return rowData.speed > 0;\r\n };\r\n\r\n emptyRowsNodeGetter = () => {\r\n const { t } = this.queueT;\r\n return (\r\n <Message\r\n title={t('queueEmpty', 'The queue is empty')}\r\n icon={IconConstants.FILE}\r\n description={t(\r\n 'queueEmptyDesc',\r\n 'New items can be queued from search or filelists',\r\n )}\r\n />\r\n );\r\n };\r\n\r\n queueT = getModuleT(this.props.t, UI.Modules.QUEUE);\r\n render() {\r\n const { translate } = this.queueT;\r\n return (\r\n <>\r\n <VirtualTable\r\n emptyRowsNodeGetter={this.emptyRowsNodeGetter}\r\n store={QueueBundleViewStore}\r\n footerData={\r\n <ActionMenu\r\n className=\"top left pointing\"\r\n caption={translate('Actions...')}\r\n actions={QueueActionMenu}\r\n header={translate('Queue actions')}\r\n triggerIcon=\"chevron up\"\r\n button={true}\r\n remoteMenuId=\"queue\"\r\n />\r\n }\r\n moduleId={UI.Modules.QUEUE}\r\n >\r\n <Column\r\n name=\"Name\"\r\n width={200}\r\n flexGrow={4}\r\n columnKey=\"name\"\r\n cell={\r\n <FileActionCell\r\n actions={QueueBundleActionMenu}\r\n remoteMenuId={MenuConstants.QUEUE_BUNDLE}\r\n ids={[\r\n 'content',\r\n 'sources',\r\n 'divider',\r\n 'search',\r\n 'searchBundleAlternates',\r\n 'divider',\r\n 'removeBundle',\r\n 'divider',\r\n 'rescan',\r\n 'forceShare',\r\n ]}\r\n />\r\n }\r\n />\r\n <Column\r\n name=\"Size\"\r\n width={60}\r\n columnKey=\"size\"\r\n cell={<SizeCell />}\r\n flexGrow={1}\r\n />\r\n <Column\r\n name=\"Type/content\"\r\n width={150}\r\n columnKey=\"type\"\r\n hideWidth={1000}\r\n cell={\r\n <ActionLinkCell\r\n action={QueueBundleViewContentAction}\r\n moduleData={QueueBundleActionModule}\r\n />\r\n }\r\n />\r\n <Column\r\n name=\"Status\"\r\n width={120}\r\n flexGrow={3}\r\n columnKey=\"status\"\r\n cell={<StatusCell />}\r\n />\r\n <Column\r\n name=\"Sources\"\r\n width={60}\r\n columnKey=\"sources\"\r\n renderCondition={this.isActive}\r\n flexGrow={1}\r\n cell={\r\n <ActionLinkCell\r\n action={QueueBundleViewSourcesAction}\r\n moduleData={QueueBundleActionModule}\r\n />\r\n }\r\n />\r\n <Column\r\n name=\"Time left\"\r\n width={50}\r\n columnKey=\"seconds_left\"\r\n renderCondition={this.isRunning}\r\n cell={<AbbreviatedDurationCell />}\r\n />\r\n <Column\r\n name=\"Speed\"\r\n width={50}\r\n columnKey=\"speed\"\r\n cell={<SpeedCell />}\r\n renderCondition={this.isRunning}\r\n flexGrow={1}\r\n />\r\n <Column\r\n name=\"Priority\"\r\n width={80}\r\n columnKey=\"priority\"\r\n renderCondition={this.isActive}\r\n cell={<PriorityCell />}\r\n flexGrow={1}\r\n />\r\n <Column\r\n name=\"Added\"\r\n width={100}\r\n columnKey=\"time_added\"\r\n cell={<DurationCell />}\r\n hideWidth={1400}\r\n />\r\n <Column\r\n name=\"Finished\"\r\n width={100}\r\n columnKey=\"time_finished\"\r\n cell={<DurationCell />}\r\n renderCondition={this.isDownloaded}\r\n hideWidth={1200}\r\n />\r\n </VirtualTable>\r\n <SourceDialog queueT={this.queueT} />\r\n <BundleFileDialog />\r\n </>\r\n );\r\n }\r\n}\r\n\r\nexport default withTranslation()(Queue);\r\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","BundleSourceActions","removeBundleSource","displayName","access","QUEUE_EDIT","icon","REMOVE","handler","itemData","source","entity","bundle","socket","delete","BUNDLES_URL","user","cid","QueueBundleSourceActionMenu","moduleData","moduleId","QUEUE","subId","actions","QueueFileSearchAction","SEARCH","file","location","navigate","search","QueueFileSearchAlternatesAction","SEARCH_ALTERNATES","filter","time_finished","post","FILES_URL","QueueFileRemoveAction","confirmation","content","approveCaption","rejectCaption","checkboxCaption","removeFinished","remove_finished","notifications","onSuccess","QueueFileActions","searchFileAlternates","removeFile","QueueFileActionMenu","QueueSourceRemoveAction","SOURCES_URL","setBundlePriorities","prio","QueueConstants","priority","QueueRemoveCompletedAction","IconConstants","QueuePauseAction","PAUSE","PAUSED_FORCED","QueueResumeAction","PLAY","DEFAULT","QueueActions","removeCompleted","divider","pause","resume","QueueActionMenu","bundleValidationFailed","status","S","COMPLETION_VALIDATION_ERROR","itemNotFinished","shareBundle","skipValidation","skip_validation","QueueBundleViewSourcesAction","USER","data","sources","total","QueueBundleViewContentAction","FILE","type","QueueBundleSearchAction","SearchActions","QueueBundleSearchAlternatesAction","QueueBundleRemoveAction","QueueBundleRescanAction","REFRESH_COLORED","QueueBundleForceShareAction","ERROR","QueueBundleActions","searchBundleAlternates","divider2","removeBundle","divider3","rescan","forceShare","QueueBundleActionModule","QueueBundleActionMenu","className","percent","caption","indeterminate","undefined","style","transitionDuration","width","minWidth","PriorityEnum","str","PAUSED","LOWEST","LOW","NORMAL","HIGH","HIGHEST","memo","item","itemPrio","prioAction","t","hasAccess","setPriority","priorityId","auto","toLocaleLowerCase","TableDropdown","onClose","children","Object","keys","map","Number","prioKey","currentPrio","toString","active","onClick","getPriorityListItem","EmptyDropdown","prevProps","nextProps","getStatusClass","cellData","rowData","completed","statusId","grey","QUEUED","speed","blue","rowDataGetter","failed","Progress","downloaded_bytes","size","_viewName","_apiUrl","MODULE_URL","mixins","ViewStoreMixin","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","PriorityCell","BundleFileTable","isActive","downloaded","isRunning","render","VirtualTable","store","QueueFileViewStore","sourceFilter","pattern","this","props","method","EXACT","property","textFilterProps","autoFocus","name","flexGrow","columnKey","cell","remoteMenuId","MenuConstants","QUEUE_FILE","renderCondition","BundleFileDialog","Component","RouteModal","title","subHeader","target","closable","FileIcon","typeInfo","fullHeight","ModalRouteDecorator","DataProviderDecorator","urls","params","get","bundleId","Source","formatSize","formatSpeed","userIcon","ids","contextElement","HINTED_USER","hub_names","last_speed","files","userSort","a","b","nicks","localeCompare","queueT","translate","slice","sort","plainT","onSocketConnected","addSocketListener","refetchData","BUNDLE_SOURCES","SourceDialog","Queue","isDownloaded","emptyRowsNodeGetter","Message","description","QueueBundleViewStore","footerData","header","triggerIcon","button","QUEUE_BUNDLE","hideWidth","action"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkairdcpp_webui=self.webpackChunkairdcpp_webui||[]).push([[91],{15911:(e,t,n)=>{n.d(t,{Z:()=>c});const i=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,s=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(i);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},o=e=>"*"===e||"x"===e||"X"===e,a=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},r=(e,t)=>{if(o(e)||o(t))return 0;const[n,i]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(a(e),a(t));return n>i?1:n<i?-1:0},l=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const i=r(e[n]||"0",t[n]||"0");if(0!==i)return i}return 0},c=(e,t)=>{const n=s(e),i=s(t),o=n.pop(),a=i.pop(),r=l(n,i);return 0!==r?r:o&&a?l(o.split("."),a.split(".")):o||a?o?-1:1:0}},28466:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(71354),s=n.n(i),o=n(76314),a=n.n(o)()(s());a.push([e.id,'/*!\n * # Fomantic-UI 2.9.3 - Item\n * https://github.com/fomantic/Fomantic-UI/\n *\n *\n * Released under the MIT license\n * https://opensource.org/licenses/MIT\n *\n */.ui.items>.item{display:flex;margin:1em 0;width:100%;min-height:0;background:0 0;padding:0;border:none;border-radius:0;box-shadow:none;transition:box-shadow .1s ease;z-index:""}.ui.items>.item a{cursor:pointer}.ui.items{margin:1.5em 0}.ui.items:first-child{margin-top:0!important}.ui.items:last-child{margin-bottom:0!important}.ui.items>.item::after{display:block;content:" ";height:0;clear:both;overflow:hidden;visibility:hidden}.ui.items>.item:first-child{margin-top:0}.ui.items>.item:last-child{margin-bottom:0}.ui.items>.item>.image{position:relative;flex:0 0 auto;display:block;float:none;margin:0;padding:0;max-height:"";align-self:start}.ui.items>.item>.image>img{display:block;width:100%;height:auto;border-radius:.125rem;border:none}.ui.items>.item>.image:only-child>img{border-radius:0}.ui.items>.item>.content{display:block;flex:1 1 auto;background:0 0;color:rgba(0,0,0,.87);margin:0;padding:0;box-shadow:none;font-size:1em;border:none;border-radius:0}.ui.items>.item>.content::after{display:block;content:" ";height:0;clear:both;overflow:hidden;visibility:hidden}.ui.items>.item>.image+.content{min-width:0;width:auto;display:block;margin-left:0;align-self:start;padding-left:1.5em}.ui.items>.item>.content>.header{display:inline-block;margin:-.21425em 0 0;font-family:Lato,system-ui,-apple-system,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-weight:700;color:rgba(0,0,0,.85)}.ui.items>.item>.content>.header:not(.ui){font-size:1.28571429em}.ui.items>.item [class*="left floated"]{float:left}.ui.items>.item [class*="right floated"]{float:right}.ui.items>.item .content img{align-self:center;width:""}.ui.items>.item .avatar img,.ui.items>.item img.avatar{width:"";height:"";border-radius:500rem}.ui.items>.item>.content>.description{margin-top:.6em;max-width:none;font-size:1em;line-height:1.4285em;color:rgba(0,0,0,.87)}.ui.items>.item>.content p{margin:0 0 .5em}.ui.items>.item>.content p:last-child{margin-bottom:0}.ui.items>.item .meta{margin:.5em 0 .5em;font-size:1em;line-height:1em;color:rgba(0,0,0,.6)}.ui.items>.item .meta *{margin-right:.3em}.ui.items>.item .meta :last-child{margin-right:0}.ui.items>.item .meta [class*="right floated"]{margin-right:0;margin-left:.3em}.ui.items>.item>.content a:not(.ui){color:"";transition:color .1s ease}.ui.items>.item>.content a:not(.ui):hover{color:""}.ui.items>.item>.content>a.header{color:rgba(0,0,0,.85)}.ui.items>.item>.content>a.header:hover{color:#1e70bf}.ui.items>.item .meta>a:not(.ui){color:rgba(0,0,0,.4)}.ui.items>.item .meta>a:not(.ui):hover{color:rgba(0,0,0,.87)}.ui.items>.item>.content .favorite.icon{cursor:pointer;opacity:.75;transition:color .1s ease}.ui.items>.item>.content .favorite.icon:hover{opacity:1;color:#ffb70a}.ui.items>.item>.content .active.favorite.icon{color:#ffe623}.ui.items>.item>.content .like.icon{cursor:pointer;opacity:.75;transition:color .1s ease}.ui.items>.item>.content .like.icon:hover{opacity:1;color:#ff2733}.ui.items>.item>.content .active.like.icon{color:#ff2733}.ui.items>.item .extra{display:block;position:relative;background:0 0;margin:.5rem 0 0;width:100%;padding:0;top:0;left:0;color:rgba(0,0,0,.4);box-shadow:none;transition:color .1s ease;border-top:none}.ui.items>.item .extra>*{margin:.25rem .5rem .25rem 0}.ui.items>.item .extra>[class*="right floated"]{margin:.25rem 0 .25rem .5rem}.ui.items>.item .extra::after{display:block;content:" ";height:0;clear:both;overflow:hidden;visibility:hidden}.ui.items>.item>.image:not(.ui){width:175px}@media only screen and (min-width:768px) and (max-width:991.98px){.ui.items>.item{margin:1em 0}.ui.items>.item>.image:not(.ui){width:150px}.ui.items>.item>.image+.content{display:block;padding:0 0 0 1em}}@media only screen and (max-width:767.98px){.ui.items:not(.unstackable)>.item{flex-direction:column;margin:2em 0}.ui.items:not(.unstackable)>.item>.image{display:block;margin-left:auto;margin-right:auto}.ui.items:not(.unstackable)>.item>.image,.ui.items:not(.unstackable)>.item>.image>img{max-width:100%!important;width:auto!important;max-height:250px!important}.ui.items:not(.unstackable)>.item>.image+.content{display:block;padding:1.5em 0 0}}.ui.items>.item>.image+[class*="top aligned"].content{align-self:flex-start}.ui.items>.item>.image+[class*="middle aligned"].content{align-self:center}.ui.items>.item>.image+[class*="bottom aligned"].content{align-self:flex-end}.ui.relaxed.items>.item{margin:1.5em 0}.ui[class*="very relaxed"].items>.item{margin:2em 0}.ui.divided.items>.item{border-top:1px solid rgba(34,36,38,.15);margin:0;padding:1em 0}.ui.divided.items>.item:first-child{border-top:none;margin-top:0!important;padding-top:0!important}.ui.divided.items>.item:last-child{margin-bottom:0!important;padding-bottom:0!important}.ui.relaxed.divided.items>.item{margin:0;padding:1.5em 0}.ui[class*="very relaxed"].divided.items>.item{margin:0;padding:2em 0}.ui.items a.item:hover,.ui.link.items>.item:hover{cursor:pointer}.ui.items a.item:hover .content .header,.ui.link.items>.item:hover .content .header{color:#1e70bf}.ui.items>.item{font-size:1em}.ui.mini.items>.item{font-size:.78571429em}.ui.tiny.items>.item{font-size:.85714286em}.ui.small.items>.item{font-size:.92857143em}.ui.large.items>.item{font-size:1.14285714em}.ui.big.items>.item{font-size:1.28571429em}.ui.huge.items>.item{font-size:1.42857143em}.ui.massive.items>.item{font-size:1.71428571em}@media only screen and (max-width:767.98px){.ui.unstackable.items>.item>.image,.ui.unstackable.items>.item>.image>img{width:125px!important}}.ui.inverted.items>.item{background:0 0}.ui.inverted.items>.item>.content{background:0 0;color:rgba(255,255,255,.9)}.ui.inverted.items>.item .extra{background:0 0}.ui.inverted.items>.item>.content>.header{color:rgba(255,255,255,.9)}.ui.inverted.items>.item>.content>.description{color:rgba(255,255,255,.9)}.ui.inverted.items>.item .meta{color:rgba(255,255,255,.8)}.ui.inverted.items>.item>.content a:not(.ui){color:#57a4ef}.ui.inverted.items>.item>.content a:not(.ui):hover{color:#4183c4}.ui.inverted.items>.item>.content>a.header{color:rgba(255,255,255,.9)}.ui.inverted.items>.item>.content>a.header:hover{color:#fff}.ui.inverted.items>.item .meta>a:not(.ui){color:rgba(255,255,255,.7)}.ui.inverted.items>.item .meta>a:not(.ui):hover{color:rgba(255,255,255,.9)}.ui.inverted.items>.item>.content .favorite.icon:hover{color:#ffc63d}.ui.inverted.items>.item>.content .active.favorite.icon{color:#ffec56}.ui.inverted.items>.item>.content .like.icon:hover{color:#ff5a63}.ui.inverted.items>.item>.content .active.like.icon{color:#ff5a63}.ui.inverted.items>.item .extra{color:rgba(255,255,255,.7)}.ui.inverted.items a.item:hover .content .header,.ui.inverted.link.items>.item:hover .content .header{color:#fff}.ui.inverted.divided.items>.item{border-top:1px solid rgba(255,255,255,.1)}.ui.inverted.divided.items>.item:first-child{border-top:none}.ui.disabled.items,.ui.items>.disabled.item{opacity:.45;pointer-events:none}',"",{version:3,sources:["webpack://./node_modules/fomantic-ui-css/components/item.min.css"],names:[],mappings:"AAAA;;;;;;;;EAQE,CAAC,gBAAgB,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC,cAAc,CAAC,SAAS,CAAC,WAAW,CAAC,eAAe,CAAC,eAAe,CAAC,8BAA8B,CAAC,UAAU,CAAC,kBAAkB,cAAc,CAAC,UAAU,cAAc,CAAC,sBAAsB,sBAAsB,CAAC,qBAAqB,yBAAyB,CAAC,uBAAuB,aAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC,iBAAiB,CAAC,4BAA4B,YAAY,CAAC,2BAA2B,eAAe,CAAC,uBAAuB,iBAAiB,CAAC,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,aAAa,CAAC,gBAAgB,CAAC,2BAA2B,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,qBAAqB,CAAC,WAAW,CAAC,sCAAsC,eAAe,CAAC,yBAAyB,aAAa,CAAC,aAAa,CAAC,cAAc,CAAC,qBAAqB,CAAC,QAAQ,CAAC,SAAS,CAAC,eAAe,CAAC,aAAa,CAAC,WAAW,CAAC,eAAe,CAAC,gCAAgC,aAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC,iBAAiB,CAAC,gCAAgC,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,aAAa,CAAC,gBAAgB,CAAC,kBAAkB,CAA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Content:['/*!\n * # Fomantic-UI 2.9.3 - Item\n * https://github.com/fomantic/Fomantic-UI/\n *\n *\n * Released under the MIT license\n * https://opensource.org/licenses/MIT\n *\n */.ui.items>.item{display:flex;margin:1em 0;width:100%;min-height:0;background:0 0;padding:0;border:none;border-radius:0;box-shadow:none;transition:box-shadow .1s ease;z-index:""}.ui.items>.item a{cursor:pointer}.ui.items{margin:1.5em 0}.ui.items:first-child{margin-top:0!important}.ui.items:last-child{margin-bottom:0!important}.ui.items>.item::after{display:block;content:" ";height:0;clear:both;overflow:hidden;visibility:hidden}.ui.items>.item:first-child{margin-top:0}.ui.items>.item:last-child{margin-bottom:0}.ui.items>.item>.image{position:relative;flex:0 0 auto;display:block;float:none;margin:0;padding:0;max-height:"";align-self:start}.ui.items>.item>.image>img{display:block;width:100%;height:auto;border-radius:.125rem;border:none}.ui.items>.item>.image:only-child>img{border-radius:0}.ui.items>.item>.content{display:block;flex:1 1 auto;background:0 0;color:rgba(0,0,0,.87);margin:0;padding:0;box-shadow:none;font-size:1em;border:none;border-radius:0}.ui.items>.item>.content::after{display:block;content:" ";height:0;clear:both;overflow:hidden;visibility:hidden}.ui.items>.item>.image+.content{min-width:0;width:auto;display:block;margin-left:0;align-self:start;padding-left:1.5em}.ui.items>.item>.content>.header{display:inline-block;margin:-.21425em 0 0;font-family:Lato,system-ui,-apple-system,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-weight:700;color:rgba(0,0,0,.85)}.ui.items>.item>.content>.header:not(.ui){font-size:1.28571429em}.ui.items>.item [class*="left floated"]{float:left}.ui.items>.item [class*="right floated"]{float:right}.ui.items>.item .content img{align-self:center;width:""}.ui.items>.item .avatar img,.ui.items>.item img.avatar{width:"";height:"";border-radius:500rem}.ui.items>.item>.content>.description{margin-top:.6em;max-width:none;font-size:1em;line-height:1.4285em;color:rgba(0,0,0,.87)}.ui.items>.item>.content p{margin:0 0 .5em}.ui.items>.item>.content p:last-child{margin-bottom:0}.ui.items>.item .meta{margin:.5em 0 .5em;font-size:1em;line-height:1em;color:rgba(0,0,0,.6)}.ui.items>.item .meta *{margin-right:.3em}.ui.items>.item .meta :last-child{margin-right:0}.ui.items>.item .meta [class*="right floated"]{margin-right:0;margin-left:.3em}.ui.items>.item>.content a:not(.ui){color:"";transition:color .1s ease}.ui.items>.item>.content a:not(.ui):hover{color:""}.ui.items>.item>.content>a.header{color:rgba(0,0,0,.85)}.ui.items>.item>.content>a.header:hover{color:#1e70bf}.ui.items>.item .meta>a:not(.ui){color:rgba(0,0,0,.4)}.ui.items>.item .meta>a:not(.ui):hover{color:rgba(0,0,0,.87)}.ui.items>.item>.content .favorite.icon{cursor:pointer;opacity:.75;transition:color .1s ease}.ui.items>.item>.content .favorite.icon:hover{opacity:1;color:#ffb70a}.ui.items>.item>.content .active.favorite.icon{color:#ffe623}.ui.items>.item>.content .like.icon{cursor:pointer;opacity:.75;transition:color .1s ease}.ui.items>.item>.content .like.icon:hover{opacity:1;color:#ff2733}.ui.items>.item>.content .active.like.icon{color:#ff2733}.ui.items>.item .extra{display:block;position:relative;background:0 0;margin:.5rem 0 0;width:100%;padding:0;top:0;left:0;color:rgba(0,0,0,.4);box-shadow:none;transition:color .1s ease;border-top:none}.ui.items>.item .extra>*{margin:.25rem .5rem .25rem 0}.ui.items>.item .extra>[class*="right floated"]{margin:.25rem 0 .25rem .5rem}.ui.items>.item .extra::after{display:block;content:" ";height:0;clear:both;overflow:hidden;visibility:hidden}.ui.items>.item>.image:not(.ui){width:175px}@media only screen and (min-width:768px) and (max-width:991.98px){.ui.items>.item{margin:1em 0}.ui.items>.item>.image:not(.ui){width:150px}.ui.items>.item>.image+.content{display:block;padding:0 0 0 1em}}@media only screen and (max-width:767.98px){.ui.items:not(.unstackable)>.item{flex-direction:column;margin:2em 0}.ui.items:not(.unstackable)>.item>.image{display:block;margin-left:auto;margin-right:auto}.ui.items:not(.unstackable)>.item>.image,.ui.items:not(.unstackable)>.item>.image>img{max-width:100%!important;width:auto!important;max-height:250px!important}.ui.items:not(.unstackable)>.item>.image+.content{display:block;padding:1.5em 0 0}}.ui.items>.item>.image+[class*="top aligned"].content{align-self:flex-start}.ui.items>.item>.image+[class*="middle aligned"].content{align-self:center}.ui.items>.item>.image+[class*="bottom aligned"].content{align-self:flex-end}.ui.relaxed.items>.item{margin:1.5em 0}.ui[class*="very relaxed"].items>.item{margin:2em 0}.ui.divided.items>.item{border-top:1px solid rgba(34,36,38,.15);margin:0;padding:1em 0}.ui.divided.items>.item:first-child{border-top:none;margin-top:0!important;padding-top:0!important}.ui.divided.items>.item:last-child{margin-bottom:0!important;padding-bottom:0!important}.ui.relaxed.divided.items>.item{margin:0;padding:1.5em 0}.ui[class*="very relaxed"].divided.items>.item{margin:0;padding:2em 0}.ui.items a.item:hover,.ui.link.items>.item:hover{cursor:pointer}.ui.items a.item:hover .content .header,.ui.link.items>.item:hover .content .header{color:#1e70bf}.ui.items>.item{font-size:1em}.ui.mini.items>.item{font-size:.78571429em}.ui.tiny.items>.item{font-size:.85714286em}.ui.small.items>.item{font-size:.92857143em}.ui.large.items>.item{font-size:1.14285714em}.ui.big.items>.item{font-size:1.28571429em}.ui.huge.items>.item{font-size:1.42857143em}.ui.massive.items>.item{font-size:1.71428571em}@media only screen and (max-width:767.98px){.ui.unstackable.items>.item>.image,.ui.unstackable.items>.item>.image>img{width:125px!important}}.ui.inverted.items>.item{background:0 0}.ui.inverted.items>.item>.content{background:0 0;color:rgba(255,255,255,.9)}.ui.inverted.items>.item .extra{background:0 0}.ui.inverted.items>.item>.content>.header{color:rgba(255,255,255,.9)}.ui.inverted.items>.item>.content>.description{color:rgba(255,255,255,.9)}.ui.inverted.items>.item .meta{color:rgba(255,255,255,.8)}.ui.inverted.items>.item>.content a:not(.ui){color:#57a4ef}.ui.inverted.items>.item>.content a:not(.ui):hover{color:#4183c4}.ui.inverted.items>.item>.content>a.header{color:rgba(255,255,255,.9)}.ui.inverted.items>.item>.content>a.header:hover{color:#fff}.ui.inverted.items>.item .meta>a:not(.ui){color:rgba(255,255,255,.7)}.ui.inverted.items>.item .meta>a:not(.ui):hover{color:rgba(255,255,255,.9)}.ui.inverted.items>.item>.content .favorite.icon:hover{color:#ffc63d}.ui.inverted.items>.item>.content .active.favorite.icon{color:#ffec56}.ui.inverted.items>.item>.content .like.icon:hover{color:#ff5a63}.ui.inverted.items>.item>.content .active.like.icon{color:#ff5a63}.ui.inverted.items>.item .extra{color:rgba(255,255,255,.7)}.ui.inverted.items a.item:hover .content .header,.ui.inverted.link.items>.item:hover .content .header{color:#fff}.ui.inverted.divided.items>.item{border-top:1px solid rgba(255,255,255,.1)}.ui.inverted.divided.items>.item:first-child{border-top:none}.ui.disabled.items,.ui.items>.disabled.item{opacity:.45;pointer-events:none}'],sourceRoot:""}]);const r=a},29802:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(71354),s=n.n(i),o=n(76314),a=n.n(o)()(s());a.push([e.id,".settings-layout .detect-panel {\n margin-top: 30px;\n}\n\n.settings-layout .detect-panel .header.column > div {\n overflow: hidden;\n line-height: inherit !important;\n}\n\n.settings-layout .detect-panel .header.column {\n max-width: 200px;\n}\n\n.settings-layout .detect-panel .detect-button {\n margin-top: 20px;\n}\n","",{version:3,sources:["webpack://./src/routes/Settings/routes/Connectivity/style.css"],names:[],mappings:"AAAA;EACE,gBAAgB;AAClB;;AAEA;EACE,gBAAgB;EAChB,+BAA+B;AACjC;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,gBAAgB;AAClB",sourcesContent:[".settings-layout .detect-panel {\n margin-top: 30px;\n}\n\n.settings-layout .detect-panel .header.column > div {\n overflow: hidden;\n line-height: inherit !important;\n}\n\n.settings-layout .detect-panel .header.column {\n max-width: 200px;\n}\n\n.settings-layout .detect-panel .detect-button {\n margin-top: 20px;\n}\n"],sourceRoot:""}]);const r=a},62868:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(71354),s=n.n(i),o=n(76314),a=n.n(o)()(s());a.push([e.id,".settings-layout .profile.miscellaneous .field-nmdc_encoding li {\n margin-bottom: 5px;\n}\n","",{version:3,sources:["webpack://./src/routes/Settings/routes/Profile/style.css"],names:[],mappings:"AAAA;EACE,kBAAkB;AACpB",sourcesContent:[".settings-layout .profile.miscellaneous .field-nmdc_encoding li {\n margin-bottom: 5px;\n}\n"],sourceRoot:""}]);const r=a},14411:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(71354),s=n.n(i),o=n(76314),a=n.n(o)()(s());a.push([e.id,".settings-layout .hash-database.grid {\n padding: 10px 0px 15px 0px;\n}\n\n.settings-layout .hash-database.grid .row {\n padding: 5px 0px;\n}\n\n.settings-layout .sharing.excludes .add.button {\n margin-top: 20px;\n}\n","",{version:3,sources:["webpack://./src/routes/Settings/routes/Sharing/style.css"],names:[],mappings:"AAAA;EACE,0BAA0B;AAC5B;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,gBAAgB;AAClB",sourcesContent:[".settings-layout .hash-database.grid {\n padding: 10px 0px 15px 0px;\n}\n\n.settings-layout .hash-database.grid .row {\n padding: 5px 0px;\n}\n\n.settings-layout .sharing.excludes .add.button {\n margin-top: 20px;\n}\n"],sourceRoot:""}]);const r=a},14160:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(71354),s=n.n(i),o=n(76314),a=n.n(o)()(s());a.push([e.id,".web-user.modal .ui.checkbox {\n width: 100%;\n margin-top: 5px;\n}\n\n.web-user.modal .ui.checkbox.admin {\n margin-bottom: 10px;\n font-weight: bold;\n}\n\n.settings-layout .system.logging .log-section.active {\n background-color: whitesmoke;\n}\n\n.settings-layout .system.logging .sections {\n margin-top: 25px !important;\n}\n","",{version:3,sources:["webpack://./src/routes/Settings/routes/System/style.css"],names:[],mappings:"AAAA;EACE,WAAW;EACX,eAAe;AACjB;;AAEA;EACE,mBAAmB;EACnB,iBAAiB;AACnB;;AAEA;EACE,4BAA4B;AAC9B;;AAEA;EACE,2BAA2B;AAC7B",sourcesContent:[".web-user.modal .ui.checkbox {\n width: 100%;\n margin-top: 5px;\n}\n\n.web-user.modal .ui.checkbox.admin {\n margin-bottom: 10px;\n font-weight: bold;\n}\n\n.settings-layout .system.logging .log-section.active {\n background-color: whitesmoke;\n}\n\n.settings-layout .system.logging .sections {\n margin-top: 25px !important;\n}\n"],sourceRoot:""}]);const r=a},49696:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(71354),s=n.n(i),o=n(76314),a=n.n(o)()(s());a.push([e.id,".settings-layout .view.notifications .field-notify_events_info {\n margin-top: 25px;\n}\n","",{version:3,sources:["webpack://./src/routes/Settings/routes/View/style.css"],names:[],mappings:"AAAA;EACE,gBAAgB;AAClB",sourcesContent:[".settings-layout .view.notifications .field-notify_events_info {\n margin-top: 25px;\n}\n"],sourceRoot:""}]);const r=a},74143:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(71354),s=n.n(i),o=n(76314),a=n.n(o)()(s());a.push([e.id,".settings-layout {\n padding-bottom: 30px;\n max-height: 100% !important;\n display: flex;\n flex-direction: column;\n}\n\n.settings-layout .menu-column .menu {\n max-width: 100%;\n}\n\n.settings-layout .layout.header {\n margin-bottom: 20px;\n}\n\n.settings-layout .setting-form {\n margin-top: 30px;\n}\n\n.settings-layout .setting-form:first-child {\n margin-top: 0px;\n}\n\n.settings-layout h3 {\n margin-bottom: 20px;\n}\n\n.settings-layout h4 {\n margin-top: 15px;\n}\n\n.settings-layout > div,\n.settings-layout .mobile .section-content {\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n margin-bottom: 5px;\n}\n\n.settings-layout .main.grid {\n overflow-y: auto;\n padding: 0px;\n}\n\n.settings-layout .mobile .section-content {\n padding-bottom: 5px;\n /* For possible scrollbar */\n padding-right: 5px;\n}\n\n.settings-layout .mobile .section-content.about {\n margin-top: 10px;\n}\n\n.settings-layout .mobile .section-content.about .options {\n flex-shrink: 0;\n}\n\n.settings-layout .full .section-content {\n height: 100%;\n padding-bottom: 2px;\n}\n\n.settings-layout .top-menu {\n display: flex;\n align-items: center;\n margin-bottom: 10px;\n flex-shrink: 0;\n}\n\n.settings-layout .top-menu > .ui.dropdown,\n.settings-layout .top-menu > .ui.dropdown > .caption {\n display: flex;\n}\n\n.settings-layout .top-menu > i {\n margin: 0px 5px;\n}\n\n.settings-layout .full .top-menu i {\n display: none;\n}\n\n.settings-layout .mobile .save.button {\n margin-bottom: 10px;\n flex-shrink: 0;\n}\n\n.settings-layout .options {\n min-height: 80px;\n}\n\n.settings-layout .options > .ui.grid {\n margin: 0px;\n}\n","",{version:3,sources:["webpack://./src/routes/Settings/style.css"],names:[],mappings:"AAAA;EACE,oBAAoB;EACpB,2BAA2B;EAC3B,aAAa;EACb,sBAAsB;AACxB;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;AAClB;;AAEA;;EAEE,aAAa;EACb,sBAAsB;EACtB,gBAAgB;EAChB,kBAAkB;AACpB;;AAEA;EACE,gBAAgB;EAChB,YAAY;AACd;;AAEA;EACE,mBAAmB;EACnB,2BAA2B;EAC3B,kBAAkB;AACpB;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,YAAY;EACZ,mBAAmB;AACrB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,mBAAmB;EACnB,cAAc;AAChB;;AAEA;;EAEE,aAAa;AACf;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,mBAAmB;EACnB,cAAc;AAChB;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,WAAW;AACb",sourcesContent:[".settings-layout {\n padding-bottom: 30px;\n max-height: 100% !important;\n display: flex;\n flex-direction: column;\n}\n\n.settings-layout .menu-column .menu {\n max-width: 100%;\n}\n\n.settings-layout .layout.header {\n margin-bottom: 20px;\n}\n\n.settings-layout .setting-form {\n margin-top: 30px;\n}\n\n.settings-layout .setting-form:first-child {\n margin-top: 0px;\n}\n\n.settings-layout h3 {\n margin-bottom: 20px;\n}\n\n.settings-layout h4 {\n margin-top: 15px;\n}\n\n.settings-layout > div,\n.settings-layout .mobile .section-content {\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n margin-bottom: 5px;\n}\n\n.settings-layout .main.grid {\n overflow-y: auto;\n padding: 0px;\n}\n\n.settings-layout .mobile .section-content {\n padding-bottom: 5px;\n /* For possible scrollbar */\n padding-right: 5px;\n}\n\n.settings-layout .mobile .section-content.about {\n margin-top: 10px;\n}\n\n.settings-layout .mobile .section-content.about .options {\n flex-shrink: 0;\n}\n\n.settings-layout .full .section-content {\n height: 100%;\n padding-bottom: 2px;\n}\n\n.settings-layout .top-menu {\n display: flex;\n align-items: center;\n margin-bottom: 10px;\n flex-shrink: 0;\n}\n\n.settings-layout .top-menu > .ui.dropdown,\n.settings-layout .top-menu > .ui.dropdown > .caption {\n display: flex;\n}\n\n.settings-layout .top-menu > i {\n margin: 0px 5px;\n}\n\n.settings-layout .full .top-menu i {\n display: none;\n}\n\n.settings-layout .mobile .save.button {\n margin-bottom: 10px;\n flex-shrink: 0;\n}\n\n.settings-layout .options {\n min-height: 80px;\n}\n\n.settings-layout .options > .ui.grid {\n margin: 0px;\n}\n"],sourceRoot:""}]);const r=a},97771:(e,t,n)=>{var i=n(85072),s=n.n(i),o=n(97825),a=n.n(o),r=n(77659),l=n.n(r),c=n(55056),d=n.n(c),A=n(10540),m=n.n(A),u=n(41113),p=n.n(u),h=n(28466),g={};g.styleTagTransform=p(),g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=m(),s()(h.A,g),h.A&&h.A.locals&&h.A.locals},97578:(e,t,n)=>{var i=n(85072),s=n.n(i),o=n(97825),a=n.n(o),r=n(77659),l=n.n(r),c=n(55056),d=n.n(c),A=n(10540),m=n.n(A),u=n(41113),p=n.n(u),h=n(14411),g={};g.styleTagTransform=p(),g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=m(),s()(h.A,g),h.A&&h.A.locals&&h.A.locals},50935:(e,t,n)=>{var i=n(85072),s=n.n(i),o=n(97825),a=n.n(o),r=n(77659),l=n.n(r),c=n(55056),d=n.n(c),A=n(10540),m=n.n(A),u=n(41113),p=n.n(u),h=n(14160),g={};g.styleTagTransform=p(),g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=m(),s()(h.A,g),h.A&&h.A.locals&&h.A.locals},50929:(e,t,n)=>{n.d(t,{Cp:()=>m,Cs:()=>d,Dm:()=>u,YB:()=>A});var i=n(88569),s=n(2141),o=n(4425),a=n(86038),r=n(67749);const l=(e,t,n,i)=>e.post(s.A.DOWNLOAD_URL,{install_id:n||t,url:t,shasum:i}),c=e=>{return t=void 0,n=[e],a=function*({itemData:e,socket:t}){const n=yield(0,i.H)(s.A.NPM_PACKAGE_URL+e.name+"/latest",!0),{tarball:o,shasum:a}=n.dist;return l(t,o,e.name,a)},new((o=void 0)||(o=Promise))((function(e,i){function s(e){try{l(a.next(e))}catch(e){i(e)}}function r(e){try{l(a.throw(e))}catch(e){i(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(s,r)}l((a=a.apply(t,n||[])).next())}));var t,n,o,a},d={id:"installUrl",displayName:"Install from URL",icon:o.A.CREATE,access:a.US.ADMIN,input:{approveCaption:"Install",content:"Enter download URL",inputProps:{placeholder:"Enter URL",type:"url",required:!0}},handler:({socket:e},t)=>l(e,t)},A={id:"installNpm",displayName:"Install",icon:o.A.CREATE,access:a.US.ADMIN,handler:c},m={id:"updateNpm",displayName:"Update",icon:o.A.REFRESH_COLORED,access:a.US.ADMIN,handler:c},u={moduleId:r.KV.EXTENSIONS}},92078:(e,t,n)=>{n.d(t,{Dq:()=>l,_k:()=>c,nQ:()=>a});var i=n(4425),s=n(67749),o=n(47650);const a={id:"create",displayName:"Add type",icon:i.A.CREATE,handler:({navigate:e})=>{e("types")}},r={edit:{id:"edit",displayName:"Edit type",icon:i.A.EDIT,handler:({itemData:e,navigate:t})=>{t(`types/${e.id}`)}},remove:{id:"remove",displayName:"Remove type",icon:i.A.REMOVE,confirmation:{content:"Are you sure that you want to remove the search type {{item.name}}?",approveCaption:"Remove type",rejectCaption:"Don't remove"},filter:({itemData:e})=>!e.default_type,handler:({itemData:e,socket:t})=>t.delete(`${o.A.SEARCH_TYPES_URL}/${e.id}`)}},l={moduleId:s.KV.SETTINGS},c={moduleData:l,actions:r}},29112:(e,t,n)=>{n.d(t,{RS:()=>r,eP:()=>c,t6:()=>d});var i=n(42191),s=n(4425),o=n(86038),a=n(67749);const r={id:"refreshAll",displayName:"Refresh all",access:o.US.SETTINGS_EDIT,icon:s.A.REFRESH_COLORED,handler:({socket:e})=>e.post(i.A.REFRESH_URL)},l={refresh:r},c={moduleId:a.KV.SHARE},d={moduleData:c,actions:l}},91510:(e,t,n)=>{n.d(t,{MB:()=>c,Tw:()=>r,nH:()=>d});var i=n(42191),s=n(4425),o=n(86038),a=n(67749);const r={id:"add",displayName:"Add path",access:o.US.SETTINGS_EDIT,icon:s.A.CREATE,handler:({navigate:e})=>{e("browse")}},l={remove:{id:"remove",displayName:"Remove path",access:o.US.SETTINGS_EDIT,icon:s.A.REMOVE,confirmation:{content:"Are you sure that you want to remove the excluded path {{item}}?",approveCaption:"Remove path",rejectCaption:"Don't remove"},handler:({itemData:e,socket:t})=>t.post(i.A.EXCLUDES_REMOVE_URL,{path:e})}},c={moduleId:a.KV.SETTINGS,subId:"shareExclude"},d={moduleData:c,actions:l}},94899:(e,t,n)=>{n.d(t,{An:()=>p,Ds:()=>f,YS:()=>_,tx:()=>u});var i=n(40599),s=n(82560),o=n(86818),a=n(4425),r=n(86038),l=n(67749),c=n(48844),d=n(68135);const A=({itemData:e})=>!e.default,m=({socket:e},t)=>e.post(o.A.PROFILES_URL,{name:t}),u={id:"create",displayName:"Add profile",access:r.US.SETTINGS_EDIT,icon:a.A.CREATE,input:{approveCaption:"Create",content:"Enter name for the profile",inputProps:{placeholder:"Enter name",required:!0}},handler:m},p={id:"clone",displayName:"Clone profile",access:r.US.SETTINGS_EDIT,icon:a.A.COPY,input:{approveCaption:"Create",content:"Enter name for the profile (cloned from {{item.name}})",inputProps:{placeholder:"Enter name",required:!0}},handler:(e,t)=>{return n=void 0,i=void 0,o=function*(){const n=yield m(e,t),{itemData:i,socket:s}=e,o=yield s.get(`${d.A.MODULE_URL}`);for(const e of o){const t=e.profiles.map((e=>e.id));t.includes(i.id)&&(yield s.patch(`${d.A.MODULE_URL}/${e.id}`,{profiles:[...t,n.id]}))}},new((s=void 0)||(s=Promise))((function(e,t){function a(e){try{l(o.next(e))}catch(e){t(e)}}function r(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(a,r)}l((o=o.apply(n,i||[])).next())}));var n,i,s,o}},h={id:"browse",displayName:"Browse files",access:r.US.FILELISTS_VIEW,icon:a.A.FILELIST,handler:({itemData:e,location:t,navigate:n})=>i.A.ownList(e.id,{location:t,navigate:n,sessionStore:s.A})},g={id:"edit",displayName:"Rename profile",access:r.US.SETTINGS_EDIT,icon:a.A.EDIT,input:e=>({approveCaption:"Rename",content:"Enter new name for the profile {{item.name}}",inputProps:{placeholder:"Enter name",defaultValue:e.name,required:!0}}),handler:({itemData:e,socket:t},n)=>t.patch(`${o.A.PROFILES_URL}/${e.id}`,{name:n})},x={id:"default",displayName:"Set as default",access:r.US.SETTINGS_EDIT,filter:A,icon:a.A.DEFAULT,handler:({itemData:e,socket:t})=>t.post(`${o.A.PROFILES_URL}/${e.id}/default`)},v={id:"remove",displayName:"Remove profile",access:r.US.SETTINGS_EDIT,icon:a.A.REMOVE,filter:A,confirmation:{content:"Are you sure that you want to remove the profile {{item.name}}?",approveCaption:"Remove profile",rejectCaption:"Don't remove"},handler:({itemData:e,socket:t})=>t.delete(o.A.PROFILES_URL+"/"+e.id)},C={browse:h,divider:c.o,edit:g,default:x,remove:v},f={moduleId:l.KV.SETTINGS,subId:"profile"},_={moduleData:f,actions:C}},63252:(e,t,n)=>{n.d(t,{t6:()=>i.t6,Ds:()=>s.Ds,An:()=>s.An,tx:()=>s.tx,QC:()=>A,EU:()=>c,VY:()=>m});var i=n(29112),s=(n(91510),n(94899)),o=n(68135),a=n(4425),r=n(86038),l=n(67749);const c={id:"create",displayName:"Add directory",access:r.US.SETTINGS_EDIT,icon:a.A.CREATE,handler:({navigate:e})=>{e("directories")}},d={edit:{id:"edit",displayName:"Edit directory",access:r.US.SETTINGS_EDIT,icon:a.A.EDIT,handler:({itemData:e,navigate:t})=>{t(`directories/${e.id}`)}},remove:{id:"remove",displayName:"Remove directory",access:r.US.SETTINGS_EDIT,icon:a.A.REMOVE,confirmation:{content:"Are you sure that you want to remove the directory {{item.virtual_name}} from share? It will be removed from all share profiles.",approveCaption:"Remove directory",rejectCaption:"Don't remove"},handler:({itemData:e,socket:t})=>t.delete(o.A.ROOTS_URL+"/"+e.id)}},A={moduleId:l.KV.SHARE,subId:"root"},m={moduleData:A,actions:d}},72384:(e,t,n)=>{n.d(t,{A_:()=>c,Bs:()=>r,yc:()=>l});var i=n(83845),s=n(4425),o=n(86038),a=n(67749);const r={id:"restartWeb",displayName:"Restart web server",access:o.US.ADMIN,icon:s.A.REFRESH_COLORED,confirmation:{content:"When changing the binding options, it's recommended to restart the web server only \n when you are able to access the server for troubleshooting. If the web server won't come back online, you should start the application \n manually to see if there are any error messages. The configuration file is located in your user directory by default (inside .airdc++ directory) in case you need to edit it manually.",approveCaption:"Continue and restart",rejectCaption:"Don't restart"},handler:({socket:e})=>e.post(i.A.MODULE_URL+"/restart_web")},l={id:"shutdown",displayName:"Shut down application",access:o.US.ADMIN,icon:s.A.POWER,confirmation:{content:"Are you sure that you wish to shut down the application?",approveCaption:"Continue and shut down",rejectCaption:"Cancel"},handler:({socket:e})=>e.post(i.A.MODULE_URL+"/shutdown")},c={moduleId:a.KV.COMMON,subId:"system"}},52786:(e,t,n)=>{n.d(t,{F5:()=>d,O6:()=>c,u2:()=>r});var i=n(76865),s=n(4425),o=n(50753),a=n(67749);const r={id:"create",displayName:"Add user",icon:s.A.CREATE,handler:({navigate:e})=>{e("users")}},l={edit:{id:"edit",displayName:"Edit user",icon:s.A.EDIT,handler:({itemData:e,navigate:t})=>{t(`users/${e.id}`)}},remove:{id:"remove",displayName:"Remove user",filter:({itemData:e})=>e.id!==o.A.user.id,icon:s.A.REMOVE,confirmation:{content:"Are you sure that you want to remove the user {{item.username}}?",approveCaption:"Remove user",rejectCaption:"Don't remove"},handler:({itemData:e,socket:t})=>t.delete(`${i.A.USERS_URL}/${e.id}`)}},c={moduleId:a.KV.SETTINGS,subId:"webUser"},d={moduleData:c,actions:l}},18536:(e,t,n)=>{n.d(t,{A_:()=>i.A_,Bs:()=>i.Bs,yc:()=>i.yc});var i=n(72384);n(52786)},98397:(e,t,n)=>{n.d(t,{A:()=>h});var i=n(74848),s=n(96540),o=n(32728),a=n(96529),r=n(4425),l=n(19718),c=n(69640),d=n(95689),A=n(57969),m=n(67749),u=n(42695),p=n(32389);const h=({alwaysShow:e})=>{const t=(0,c.P)(d.A),n=(0,s.useContext)(A.J),{t:h}=(0,p.Bd)();return n?!e&&t[l.xC.NO_INSTALL_PROMPT]?null:(0,i.jsx)(o.A,{title:(0,u.Tl)("Install as local application",h,m.KV.COMMON),description:(0,i.jsxs)("div",{className:"install-prompt",children:[(0,i.jsx)("p",{children:h((0,u.j2)("pwaInstallDesc",m.KV.COMMON),"This web application can be installed locally, providing a better user experience")}),(0,i.jsx)(a.A,{className:"primary",caption:(0,u.Tl)("Install",h,m.KV.COMMON),onClick:()=>n(),icon:r.A.CREATE}),!e&&(0,i.jsx)(a.A,{caption:(0,u.Tl)("Don't install",h,m.KV.COMMON),onClick:()=>d.A.setValue(l.xC.NO_INSTALL_PROMPT,!0)})]})}):null}},73070:(e,t,n)=>{n.d(t,{Y9:()=>A,fI:()=>d,xA:()=>m});var i=n(74848),s=(n(96540),n(46942)),o=n.n(s),a=n(32389),r=n(42695),l=n(67749);const c=e=>e||(0,i.jsx)(a.x6,{i18nKey:(0,r.j2)("na",l.KV.COMMON),children:"N/A"}),d=({title:e,text:t,className:n,titleWidth:s="four",noText:a})=>(0,i.jsxs)("div",{className:o()("ui row",n),children:[(0,i.jsx)("div",{className:o()(a?"sixteen":s,"wide column title"),children:(0,i.jsx)("div",{className:"ui tiny header",style:{overflow:"hidden"},children:e})}),!a&&(0,i.jsx)("div",{className:"column value",children:c(t)})]}),A=({title:e})=>(0,i.jsx)("div",{className:"ui row",children:(0,i.jsx)("div",{className:"sixteen wide column",children:(0,i.jsx)("div",{className:"ui blue section header",children:e})})}),m=e=>{var{className:t,children:n,columns:s,stackable:a}=e,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n}(e,["className","children","columns","stackable"]);return(0,i.jsx)("div",Object.assign({className:o()("ui grid",{[`${s} column`]:!!s},{stackable:a},t)},r,{children:n}))}},2141:(e,t,n)=>{n.d(t,{A:()=>o});const i="extensions",s="https://registry.npmjs.org/",o={MODULE_URL:i,EXTENSIONS_URL:i,DOWNLOAD_URL:i+"/download",ENGINES_URL:i+"/engines",ENGINES_STATUS_URL:i+"/engines/status",DEFAULT_ENGINE:"node",STARTED:"extension_started",STOPPED:"extension_stopped",ADDED:"extension_added",REMOVED:"extension_removed",UPDATED:"extension_updated",INSTALLATION_STARTED:"extension_installation_started",INSTALLATION_SUCCEEDED:"extension_installation_succeeded",INSTALLATION_FAILED:"extension_installation_failed",NPM_PACKAGES_URL:s+"-/v1/search?text=keywords:airdcpp-extensions-public&size=100",NPM_PACKAGE_URL:s,NPM_HOMEPAGE_URL:"https://www.npmjs.com/package/"}},79179:(e,t,n)=>{n.d(t,{A:()=>s});const i="favorite_directories",s={MODULE_URL:i,GROUPED_DIRECTORIES_URL:i+"/grouped_paths",DIRECTORIES_URL:i,DIRECTORIES_UPDATED:"favorite_directories_updated"}},86818:(e,t,n)=>{n.d(t,{A:()=>s});const i="share_profiles",s={MODULE_URL:i,PROFILES_URL:i,PROFILE_ADDED:"share_profile_added",PROFILE_UPDATED:"share_profile_updated",PROFILE_REMOVED:"share_profile_removed",HIDDEN_PROFILE_ID:1}},68135:(e,t,n)=>{n.d(t,{A:()=>s});const i="share_roots",s={MODULE_URL:i,ROOTS_URL:i,CREATED:"share_root_created",UPDATED:"share_root_updated",REMOVED:"share_root_removed"}},76865:(e,t,n)=>{n.d(t,{A:()=>s});const i="web_users",s={MODULE_URL:i,USERS_URL:i,ADDED:"web_user_added",UPDATED:"web_user_updated",REMOVED:"web_user_removed"}},71299:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(2543),s=n(86818),o=n(56484);const a=function(e,t,n){return(0,o.A)(e,(0,i.merge)(n,{urls:{profiles:s.A.PROFILES_URL},dataConverters:{profiles:(e,{t:n})=>e.filter((e=>t||e.id!==s.A.HIDDEN_PROFILE_ID))},onSocketConnected:(e,{refetchData:t})=>{e(s.A.MODULE_URL,s.A.PROFILE_ADDED,(()=>t())),e(s.A.MODULE_URL,s.A.PROFILE_UPDATED,(()=>t())),e(s.A.MODULE_URL,s.A.PROFILE_REMOVED,(()=>t()))}}))}},1076:(e,t,n)=>{n.d(t,{A:()=>d});var i=n(74848),s=n(96540),o=n(32728),a=n(32389),r=n(42695),l=n(67749),c=n(48249);const d=function(e,t,n,d=0){return A=>{const[m,u]=s.useState(null),p=(0,c.F)(),h=e=>{u(e)},g=()=>{p.get(t).then(h).catch((e=>console.error("Failed to fetch stats",e.message)))};return s.useEffect((()=>{g();const e=window.setInterval(g,1e3*d);return()=>{window.clearTimeout(e)}}),[]),null===m?null:void 0===m?(0,i.jsx)(a.wD,{children:e=>(0,i.jsx)(o.A,{title:(0,r.Tl)("Statistics not available",e,l.KV.COMMON),description:n?n(e,A):void 0})}):(0,i.jsx)(e,Object.assign({},A,{stats:m}))}}},56022:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(74848),s=n(96540),o=n(95689),a=n(94413),r=n(47456),l=n(31366);const c=({moduleT:e,keys:t,onFieldChanged:n})=>{const[c,d]=(0,s.useState)(o.A.getValues()),A=(0,s.useMemo)((()=>(0,r.Nn)(o.A.getDefinitions(t),e)),[]),m=(0,s.useContext)(l.XZ);return(0,i.jsx)("div",{className:"local setting-form",children:(0,i.jsx)(a.A,{ref:e=>m.addFormRef(t,e),id:(0,l.KZ)(t),onSave:(e,t)=>(o.A.setValues(e),d(o.A.getValues()),Promise.resolve()),fieldDefinitions:A,sourceValue:c,onFieldChanged:(e,t,i)=>{if(m.onFieldChanged(e,t,i),n)return n(e,t,i)}})})}},20239:(e,t,n)=>{n.d(t,{A:()=>A});var i=n(74848),s=n(96540),o=n(19718),a=n(56484),r=n(94413),l=n(86038),c=n(31366),d=n(48249);const A=(0,a.A)((e=>{var{onFieldChanged:t,refetchData:n,keys:a,fieldDefinitions:l,settings:A}=e,m=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n}(e,["onFieldChanged","refetchData","keys","fieldDefinitions","settings"]);const u=(0,s.useContext)(c.XZ),p=(0,d.F)(),h=()=>{n(["settings"])};return(0,i.jsx)("div",{className:"remote setting-form",children:(0,i.jsx)(r.A,Object.assign({},m,{id:(0,c.KZ)(a),ref:e=>u.addFormRef(a,e),onSave:e=>0===Object.keys(e).length?Promise.resolve():p.post(o.Ay.ITEMS_SET_URL,e).then(h),fieldDefinitions:l,sourceValue:A,onFieldChanged:(e,n,i)=>{if(u.onFieldChanged(e,n,i),t)return t(e,n,i)}}))})}),{urls:{fieldDefinitions:({keys:e},t)=>t.post(o.Ay.ITEMS_DEFINITIONS_URL,{keys:e}),settings:(e,t)=>{return n=void 0,i=[e,t],a=function*({keys:e,onSettingValuesReceived:t,valueMode:n=l.XG.CURRENT},i){const s=yield i.post(o.Ay.ITEMS_GET_URL,{keys:e,value_mode:n});return t&&t(s),s},new((s=void 0)||(s=Promise))((function(e,t){function o(e){try{l(a.next(e))}catch(e){t(e)}}function r(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(o,r)}l((a=a.apply(n,i||[])).next())}));var n,i,s,a}}})},8627:(e,t,n)=>{n.d(t,{A:()=>R});var i=n(74848),s=n(96540),o=n(46942),a=n.n(o),r=n(8098),l=n(31224),c=n(45325),d=n(67749);const A=(e,t)=>"object"==typeof t?`/settings/${t.url}/${e.url}`:`/settings/${e.url}`,m=(e,t)=>t.translate(e,[d.l.NAVIGATION]),u=(e,t,n,{hasAccess:s})=>t.access&&!s(t.access)?null:(0,i.jsx)(c.A,{url:e,icon:"icon"in t?`green ${t.icon}`:null,children:m(t.title,n)},e),p=(e,t,n,i)=>{const s=A(e,t);return u(s,e,n,i)};var h=n(83994);const g=({menu:e,settingsT:t})=>(0,i.jsx)("div",{className:"three wide column menu-column",children:(0,i.jsxs)("div",{className:"ui vertical secondary menu",children:[e.childMenuItems,!!e.childAdvancedMenuItems&&(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"item header",children:t.translate("Advanced")}),(0,i.jsx)("div",{className:"menu",children:e.childAdvancedMenuItems})]})]})}),x=({menu:e})=>(0,i.jsx)("div",{className:"ui secondary pointing menu settings top-menu",children:e.rootMenuItems}),v=({contentClassname:e,selectedChildMenuItem:t,selectedRootMenuItem:n,getSaveButton:s,children:o,message:r,settingsT:c})=>(0,i.jsx)("div",{className:a()("thirteen wide column",e),children:(0,i.jsxs)("div",{className:"ui segment",children:[(0,i.jsx)(l.A,{title:m(t.title,c),icon:(0,i.jsx)(h.A,{color:"green",icon:n.icon}),rightComponent:s()}),(0,i.jsxs)("div",{className:"options",children:[r,o]})]})}),C=e=>{var{children:t}=e,n=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n}(e,["children"]);return(0,i.jsxs)("div",{className:"full",children:[(0,i.jsx)(x,Object.assign({},n)),(0,i.jsxs)("div",{id:"setting-scroll-context",className:"ui segment grid main",children:[(0,i.jsx)(g,Object.assign({},n)),(0,i.jsx)(v,Object.assign({},n,{children:t}))]})]})};var f=n(90425),_=n(31104),E=n(19247);const y=({selectedChildMenuItem:e,menu:t,selectedRootMenuItem:n,settingsT:s})=>(0,i.jsxs)("div",{className:"ui top-menu",children:[(0,i.jsx)(f.A,{selection:!0,caption:m(n.title,s),captionIcon:`green ${n.icon}`,children:t.rootMenuItems}),(0,i.jsx)(h.A,{icon:"caret right",size:"large"}),(0,i.jsxs)(_.A,{selection:!0,caption:m(e.title,s),children:[(0,i.jsx)(E.A,{children:t.childMenuItems}),(0,i.jsx)(E.A,{caption:s.translate("Advanced"),children:t.childAdvancedMenuItems})]})]}),b=e=>{var{getSaveButton:t,children:n,contentClassname:s,settingsT:o,message:a}=e,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n}(e,["getSaveButton","children","contentClassname","settingsT","message"]);return(0,i.jsxs)("div",{className:"mobile",children:[(0,i.jsx)(y,Object.assign({settingsT:o},r)),(0,i.jsxs)("div",{id:"setting-scroll-context",className:s,children:[t("fluid"),(0,i.jsxs)("div",{className:"options",children:[a,n]})]})]})};var I=n(14753),j=n(31366),S=n(32728),T=n(4425),D=n(96529),N=n(86038),k=n(28286);const B=({saveState:e,settingsT:t,className:n})=>{const{local:o,handleSave:r,hasChanges:l}=e,[c,d]=(0,s.useState)(!1),{hasAccess:A}=(0,k.w)(),m=o||A(N.US.SETTINGS_EDIT);let u;return u=m?t.translate(l?"Save changes":"No unsaved changes"):t.translate("No save permission"),(0,i.jsx)(D.A,{className:a()("save",n),caption:u,icon:m&&l?"green checkmark":null,loading:c,disabled:!l||!m,onClick:()=>{return e=void 0,t=void 0,i=function*(){d(!0);try{yield r()}finally{d(!1)}},new((n=void 0)||(n=Promise))((function(s,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function r(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,r)}l((i=i.apply(e,t||[])).next())}));var e,t,n,i}})},w=(e,t)=>e.local&&(0,i.jsx)(S.A,{description:t.t("browserSpecificNote","Settings listed on this page are browser-specific"),icon:T.A.INFO}),R=e=>{const t=(0,k.w)(),{rootMenuItems:n,selectedRootMenuItem:s,settingsT:o,children:l,selectedChildMenuItem:c}=e,d=(0,I.zy)(),{saveState:m,saveContext:h}=(0,j.WI)({selectedChildMenuItem:c,settingsT:o}),g=(0,r.vU)()||window.innerWidth<1e3?b:C,{menuItems:x,advancedMenuItems:v}=s,f=a()("section-content",s.url,c.url),_={rootMenuItems:n.map((e=>((e,t,n,i)=>{let s=A(e);return e.menuItems&&!n.pathname.startsWith(s)&&(s=A(e.menuItems[0],e)),u(s,e,t,i)})(e,o,d,t))),childMenuItems:x.map((e=>p(e,s,o,t))),childAdvancedMenuItems:null==v?void 0:v.map((e=>p(e,s,o,t)))};return(0,i.jsx)(j.XZ.Provider,{value:h,children:(0,i.jsx)(g,{settingsT:o,location:d,getSaveButton:e=>c.noSave?null:(0,i.jsx)(B,{settingsT:o,saveState:m,className:e}),message:w(c,o),contentClassname:f,menu:_,selectedChildMenuItem:c,selectedRootMenuItem:s,children:l})})}},31366:(e,t,n)=>{n.d(t,{KZ:()=>c,WI:()=>d,XZ:()=>l});var i=n(96540),s=n(20311),o=n.n(s),a=n(88939),r=n(14753);const l=i.createContext(void 0),c=e=>e.join("|"),d=({settingsT:e,selectedChildMenuItem:t})=>{const n=i.useMemo((()=>new Map),[]),[s,l]=i.useState([]);i.useEffect((()=>{l([])}),[t.url]);const d=s.length>0;(0,r.KP)((({currentLocation:n,nextLocation:i,historyAction:s})=>{if(t.noSave)return!1;if(n.pathname.includes(i.pathname)||i.pathname.includes(n.pathname))return!1;if(!d)return!1;const o=e.t("unsavedChangesPrompt","You have unsaved changes. Are you sure you want to leave?");return!window.confirm(o)}));const A={onFieldChanged:(e,t,n)=>{l(n?[...s,e]:s.filter((t=>t!==e)))},addFormRef:(e,t)=>{t?(o()(t.hasOwnProperty("save"),"Invalid setting form component supplied for SaveDecorator (save property missing)"),n.set(c(e),t)):n.clear()},getFormRef:e=>n.get(c(e))};return{saveContext:A,saveState:{handleSave:()=>{return t=void 0,i=void 0,r=function*(){o()(n.size>0,"No forms exist in SaveDecorator");const t=Array.from(n.values()).map((e=>e.save()));yield Promise.all(t),l([]),(()=>{const{translate:t}=e;a.A.success({title:t("Saving completed"),message:t("Settings were saved successfully")})})()},new((s=void 0)||(s=Promise))((function(e,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r.throw(e))}catch(e){n(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(o,a)}l((r=r.apply(t,i||[])).next())}));var t,i,s,r},hasChanges:d,local:t.local}}}},2237:(e,t,n)=>{n.r(t),n.d(t,{default:()=>U});var i=n(74848),s=n(67749),o=n(85072),a=n.n(o),r=n(97825),l=n.n(r),c=n(77659),d=n.n(c),A=n(55056),m=n.n(A),u=n(10540),p=n.n(u),h=n(41113),g=n.n(h),x=n(74143),v={};v.styleTagTransform=g(),v.setAttributes=m(),v.insert=d().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=p(),a()(x.A,v),x.A&&x.A.locals&&x.A.locals;const C={url:"profile",title:"Profile",icon:"user",component:n(8627).A,menuItems:[{title:"User",url:"user",component:n(37964).A},{title:"Away mode",url:"away",component:n(15175).A}],advancedMenuItems:[{title:"Ignored users",url:"ignored-users",noSave:!0,component:n(33751).A},{title:"Miscellaneous",url:"miscellaneous",component:n(43353).A}]},f={url:"connectivity",title:"Connectivity",icon:"signal",component:n(8627).A,menuItems:[{title:"Auto detection",url:"detection",noSave:!0,component:n(36441).A}],advancedMenuItems:[{title:"IPv4 connectivity (manual)",url:"v4",component:n(35190).A},{title:"IPv6 connectivity (manual)",url:"v6",component:n(52508).A},{title:"Ports (manual)",url:"ports",component:n(32709).A},{title:"Proxies",url:"proxies",component:n(16337).A},{title:"Encryption",url:"encryption",component:n(25908).A}]},_={url:"speed-limits",title:"Speed and limits",icon:"dashboard",component:n(8627).A,menuItems:[{title:"Connection speed",url:"speed",component:n(47072).A},{title:"Bandwidth limiting",url:"limiter",component:n(64253).A}],advancedMenuItems:[{title:"Download limits",url:"download-limits",component:n(45876).A},{title:"Upload limits",url:"upload-limits",component:n(4313).A},{title:"Per-user limits",url:"user-limits",component:n(28903).A}]},E={url:"downloads",title:"Downloads",icon:"download",component:n(8627).A,menuItems:[{title:"Locations",url:"locations",component:n(20764).A}],advancedMenuItems:[{title:"Skipping options",url:"skipping-options",component:n(19698).A},{title:"Search matching",url:"search-matching",component:n(53044).A},{title:"Download options",url:"download-options",component:n(8625).A},{title:"Priorities",url:"priorities",component:n(70237).A},{title:"Search types",url:"search-types",component:n(58524).A}]},y={url:"sharing",title:"Sharing",icon:"tasks",component:n(8627).A,menuItems:[{title:"Refresh options",url:"refresh-options",component:n(98915).A},{title:"Share profiles",url:"profiles",noSave:!0,component:n(19473).A}],advancedMenuItems:[{title:"Sharing options",url:"sharing-options",component:n(59676).A},{title:"Hashing",url:"hashing",component:n(79287).A},{title:"Excluded paths",url:"excludes",noSave:!0,component:n(6244).A}]},b={url:"view",title:"View",icon:"browser",component:n(8627).A,menuItems:[{title:"Notifications",url:"notifications",local:!0,component:n(49123).A},{title:"Histories",url:"histories",component:n(92151).A},{title:"Events",url:"events",component:n(26295).A},{title:"Appearance",url:"appearance",component:n(81879).A}],advancedMenuItems:[{title:"Miscellaneous",url:"miscellaneous",local:!0,component:n(36255).A}]};var I=n(86038);const j={url:"about",title:"About",icon:"info",component:n(8627).A,menuItems:[{title:"Application",noSave:!0,url:"application",component:n(42181).A},{title:"Transfer statistics",noSave:!0,url:"transfers",access:I.US.TRANSFERS,component:n(96601).A},{title:"Share statistics",noSave:!0,url:"share",component:n(77971).A},{title:"Hub statistics",noSave:!0,url:"hubs",access:I.US.HUBS_VIEW,component:n(10343).A}]},S={url:"extensions",title:"Extensions",icon:"puzzle",component:n(8627).A,menuItems:[{title:"Manage installed",url:"manage",noSave:!0,component:n(37155).A},{title:"Extension catalog",url:"packages",noSave:!0,component:n(83161).A}],advancedMenuItems:[{title:"Extension options",url:"extension-options",component:n(50804).A},{title:"Extension engines",url:"extension-engines",component:n(31880).A}]},T={url:"system",title:"System",icon:"settings",access:I.US.ADMIN,component:n(8627).A,menuItems:[{title:"Users",url:"users",noSave:!0,component:n(51566).A},{title:"Logging",url:"logging",component:n(69222).A},{title:"Web server",url:"server-settings",component:n(87135).A}],advancedMenuItems:[{title:"Advanced server settings",url:"advanced-server-settings",component:n(81301).A}]};var D=n(14753),N=n(8627),k=n(42695),B=n(32389),w=n(2543);const R=[C,f,_,E,y,b,j,S,T],O=(e,t,n)=>{const s=`${e.url}/*`,o=(0,k.Ze)(n,[(0,w.camelCase)(t.url),(0,w.camelCase)(e.url)]);return(0,i.jsx)(D.qh,{path:s,element:(0,i.jsx)(N.A,{settingsT:n,selectedRootMenuItem:t,rootMenuItems:R,selectedChildMenuItem:e,children:(0,i.jsx)(e.component,{settingsT:n,moduleT:o})})},s)},U=e=>{const{t}=(0,B.Bd)(),n=(0,k.lw)(t,s.KV.SETTINGS);return(0,i.jsx)("div",{className:"ui segment settings-layout",children:(0,i.jsxs)(D.BV,{children:[(0,i.jsx)(D.qh,{index:!0,element:(0,i.jsx)(D.C5,{to:R[0].url,replace:!0})}),R.map((e=>((e,t)=>{var n;return(0,i.jsxs)(D.qh,{path:e.url,children:[e.menuItems.map((n=>O(n,e,t))),null===(n=e.advancedMenuItems)||void 0===n?void 0:n.map((n=>O(n,e,t))),(0,i.jsx)(D.qh,{index:!0,element:(0,i.jsx)(D.C5,{to:e.menuItems[0].url,replace:!0})})]},e.url)})(e,n)))]})})}},42181:(e,t,n)=>{n.d(t,{A:()=>m});var i=n(74848),s=(n(96540),n(73070)),o=n(1076),a=n(83845),r=n(74416),l=n(98397),c=n(59250),d=n(42049),A=n(28286);const m=(0,o.A)((({stats:e,moduleT:t})=>{const{translate:n}=t,{systemInfo:o}=(0,A.w)(),{formatRelativeTime:a,formatDateTime:m}=(0,r.k)(),u=m(1737301517.085);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.xA,{columns:"two",stackable:!0,children:[(0,i.jsx)(s.fI,{title:n("Application version"),text:o.client_version}),(0,i.jsx)(s.fI,{title:n("Web UI version"),text:"2.13.1"}),(0,i.jsx)(s.fI,{title:n("Web UI build date"),text:u}),(0,i.jsx)(s.fI,{title:n("API version"),text:o.api_version}),(0,i.jsx)(s.fI,{title:n("API feature level"),text:o.api_feature_level}),(0,i.jsx)(s.fI,{title:n("Started"),text:a(o.client_started)}),(0,i.jsx)(s.fI,{title:n("Active sessions"),text:e.active_sessions}),(0,i.jsx)(s.fI,{title:n("Server threads"),text:e.server_threads}),(0,i.jsx)(s.Y9,{title:n("Resources")}),(0,i.jsx)(s.fI,{title:(0,i.jsx)(d.A,{url:c.A.HOME_PAGE_URL,children:n("Home page")}),noText:!0}),(0,i.jsx)(s.fI,{title:(0,i.jsx)(d.A,{url:c.A.HELP_URL,children:n("Documentation")}),noText:!0}),(0,i.jsx)(s.fI,{title:(0,i.jsx)(d.A,{url:c.A.ISSUE_TRACKER_URL,children:n("Feature request/bug tracker")}),noText:!0}),(0,i.jsx)(s.Y9,{title:n("Third-party credits")}),(0,i.jsx)(s.fI,{title:(0,i.jsx)(d.A,{url:c.A.DBIP_URL,children:"IP Geolocation by DB-IP"}),noText:!0})]}),(0,i.jsx)(l.A,{alwaysShow:!0})]})}),a.A.STATS_URL,null,5)},10343:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(74848),s=(n(96540),n(74416)),o=n(44511),a=n(1076),r=n(73070),l=n(98573);const c=(0,a.A)((({stats:e,moduleT:t})=>{const{formatSize:n,formatConnection:o}=(0,s.k)(),{translate:a}=t;return(0,i.jsxs)(r.xA,{columns:"two",stackable:!0,children:[(0,i.jsx)(r.fI,{title:a("Total users"),text:e.total_users}),(0,i.jsx)(r.fI,{title:a("Unique users"),text:`${e.unique_users} (${(0,l.Ee)(e.unique_users,e.total_users)})`}),(0,i.jsx)(r.fI,{title:a("Active users"),text:`${e.active_users} (${(0,l.Ee)(e.active_users,e.unique_users)})`}),(0,i.jsx)(r.fI,{title:a("Total share"),text:n(e.total_share)}),(0,i.jsx)(r.fI,{title:a("Average share per user"),text:n((0,l.jh)(e.total_share,e.unique_users))}),(0,i.jsx)(r.fI,{title:a("Average ADC download speed"),text:o(e.adc_down_per_user)}),(0,i.jsx)(r.fI,{title:a("Average ADC upload speed"),text:o(e.adc_up_per_user)}),(0,i.jsx)(r.Y9,{title:a("Clients")}),e.clients.map((t=>{return n=e.unique_users,s=t,(0,i.jsx)(r.fI,{title:s.name,text:`${s.count} (${(0,l.Ee)(s.count,n)})`},s.name);var n,s}))]})}),o.A.STATS_URL,((e,t)=>t.moduleT.translate("No hubs online")),10)},77971:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(74848),s=(n(96540),n(74416)),o=n(42191),a=n(1076),r=n(73070),l=n(98573);const c=(0,a.A)((({stats:e,moduleT:t})=>{const{formatSize:n,formatSeconds:o}=(0,s.k)(),{translate:a,t:c}=t;return(0,i.jsxs)(r.xA,{columns:"two",stackable:!0,children:[(0,i.jsx)(r.fI,{title:a("Total share size"),text:n(e.total_size)}),(0,i.jsx)(r.fI,{title:a("Total files"),text:c("totalFilesValue",{defaultValue:"{{totalCount}} ({{uniqueCount}} unique)",replace:{totalCount:e.total_file_count,uniqueCount:(0,l.Ee)(e.unique_file_count,e.total_file_count)}})}),(0,i.jsx)(r.fI,{title:a("Total directories"),text:e.total_directory_count}),(0,i.jsx)(r.fI,{title:a("Average file age"),text:o(e.average_file_age)}),(0,i.jsx)(r.fI,{title:a("Average files per directory"),text:(0,l.jh)(e.total_file_count,e.total_directory_count)}),(0,i.jsx)(r.Y9,{title:a("Incoming searches")}),(0,i.jsx)(r.fI,{title:a("Total searches"),text:c("searchesTotalValue",{defaultValue:"{{totalCount}} ({{perSecondCount}} per second)",replace:{totalCount:e.total_searches,perSecondCount:e.total_searches_per_second.toFixed(1)}})}),(0,i.jsx)(r.fI,{title:a("TTH searches"),text:(0,l.Ee)(e.tth_searches,e.total_searches)}),(0,i.jsx)(r.fI,{title:a("Text searches"),text:c("searchesPerSecondValue",{defaultValue:"{{totalCount}} ({{matchedCount}} matched per second)",replace:{totalCount:e.recursive_searches,matchedCount:e.unfiltered_recursive_searches_per_second.toFixed(2)}})}),(0,i.jsx)(r.fI,{title:a("Filtered text searches"),text:c("searchesFilteredValue",{defaultValue:"{{filteredPercentage}} ({{resultPercentage}} of the matched ones returned results)",replace:{filteredPercentage:(0,l.Ee)(e.filtered_searches,e.recursive_searches),resultPercentage:(0,l.Ee)(e.recursive_searches_responded,e.recursive_searches-e.filtered_searches)}})}),(0,i.jsx)(r.fI,{title:a("Average text search tokens (non-filtered)"),text:c("searchesAverageTokensValue",{defaultValue:"{{tokenCount}} ({{tokenLength}} bytes per token)",replace:{tokenCount:e.average_search_token_count.toFixed(1),tokenLength:e.average_search_token_length.toFixed(1)}})}),(0,i.jsx)(r.fI,{title:a("Average matching time per text search"),text:c("searchesAverageMatchTimeValue",{defaultValue:"{{matchTime}} ms",replace:{matchTime:e.average_match_ms}})})]})}),o.A.STATS_URL,((e,t)=>t.moduleT.translate("No files shared")),60)},96601:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(74848),s=(n(96540),n(74416)),o=n(73070),a=n(36671);const r=(0,n(1076).A)((({stats:e,moduleT:t})=>{const{translate:n}=t,{formatSize:a}=(0,s.k)(),r=e.session_uploaded+e.start_total_uploaded,l=e.session_downloaded+e.start_total_downloaded;return(0,i.jsxs)(o.xA,{columns:"two",stackable:!0,children:[(0,i.jsx)(o.fI,{title:n("Total downloaded"),text:a(l)}),(0,i.jsx)(o.fI,{title:n("Total uploaded"),text:a(r)}),(0,i.jsx)(o.Y9,{title:n("Session")}),(0,i.jsx)(o.fI,{title:n("Session downloaded"),text:a(e.session_downloaded)}),(0,i.jsx)(o.fI,{title:n("Session uploaded"),text:a(e.session_uploaded)})]})}),a.A.TRANSFERRED_BYTES_URL,null,5)},36441:(e,t,n)=>{n.d(t,{A:()=>U});var i=n(74848),s=n(96540),o=n(68514),a=n(56484);const r="connectivity",l={MODULE_URL:r,DETECT_URL:r+"/detect",STATUS_URL:r+"/status",CONNECTIVITY_MESSAGE:"connectivity_detection_message",CONNECTIVITY_STARTED:"connectivity_detection_started",CONNECTIVITY_FINISHED:"connectivity_detection_finished"};var c=n(73070),d=n(85072),A=n.n(d),m=n(97825),u=n.n(m),p=n(77659),h=n.n(p),g=n(55056),x=n.n(g),v=n(10540),C=n.n(v),f=n(41113),_=n.n(f),E=n(29802),y={};y.styleTagTransform=_(),y.setAttributes=x(),y.insert=h().bind(null,"head"),y.domAPI=u(),y.insertStyleElement=C(),A()(E.A,y),E.A&&E.A.locals&&E.A.locals;var b=n(4425),I=n(86038),j=n(67749);const S={id:"detect",displayName:"Detect now",access:I.US.SETTINGS_EDIT,icon:b.A.CONFIGURE,handler:({socket:e})=>e.post(l.DETECT_URL)},T={moduleId:j.KV.SETTINGS};var D=n(96529);const N=(e,t,n)=>{const{translate:i,t:s}=n;if(t)return i("Detecting...");const o=e.auto_detect;return s(o?"autoDetected":"manualConfiguration",{defaultValue:o?"{{status}} (auto detected)":"{{status}} (manual configuration)",replace:{status:e.text}})},k=(0,a.A)((({status:e,runningV4:t,runningV6:n,moduleT:a})=>{const[r,l]=s.useState(!1);return(0,i.jsxs)("div",{className:"ui segment detect-panel",children:[(0,i.jsx)("h3",{className:"header",children:a.translate("Current auto detection status")}),(0,i.jsxs)(c.xA,{columns:"two",children:[(0,i.jsx)(c.fI,{title:a.translate("IPv4 connectivity"),text:N(e.status_v4,t,a)}),(0,i.jsx)(c.fI,{title:a.translate("IPv6 connectivity"),text:N(e.status_v6,n,a)}),r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.fI,{title:a.translate("Bound interface (IPv4)"),text:e.status_v4.bind_address}),(0,i.jsx)(c.fI,{title:a.translate("Bound interface (IPv6)"),text:e.status_v6.bind_address}),(0,i.jsx)(c.fI,{title:a.translate("Transfer port"),text:e.tcp_port}),(0,i.jsx)(c.fI,{title:a.translate("Encrypted transfer port"),text:e.tls_port}),(0,i.jsx)(c.fI,{title:a.translate("Search/UDP port"),text:e.udp_port})]})]}),(0,i.jsx)(o.A,{className:"detect-button",action:S,moduleData:T,disabled:!e.status_v4.auto_detect&&!e.status_v6.auto_detect,loading:n||t}),!r&&(0,i.jsx)(D.A,{icon:"info",caption:a.translate("View all"),onClick:()=>l(!r)})]})}),{urls:{status:l.STATUS_URL},onSocketConnected:(e,{refetchData:t,mergeData:n})=>{const i=(e,t)=>{const i="running"+(e?"V6":"V4");n({[i]:t})};e(l.MODULE_URL,l.CONNECTIVITY_STARTED,(e=>{i(e.v6,!0)})),e(l.MODULE_URL,l.CONNECTIVITY_FINISHED,(e=>{i(e.v6,!1),t()}))}});var B=n(42049),w=n(59250),R=n(32728),O=n(32389);const U=({moduleT:e})=>{const{toI18nKey:t}=e;return(0,i.jsxs)("div",{children:[(0,i.jsx)(k,{moduleT:e}),(0,i.jsx)(R.A,{description:(0,i.jsx)(O.x6,{i18nKey:t("connectivityDetectionNote"),defaults:"In case of file transfer connectivity issues, please confirm that your TCP ports are really open by using <portChecker>an online port checker</portChecker>. Note that validity of the UDP port (search) can't be checked online. For more information about different connectivity modes, please visit <faq>DC++'s connectivity FAQ</faq>.",components:{portChecker:(0,i.jsx)(B.A,{url:w.A.PORTCHECK_URL}),faq:(0,i.jsx)(B.A,{url:w.A.CONNECTIVITY_HELP_URL})}}),icon:b.A.INFO})]})}},25908:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(74848),s=(n(96540),n(20239));const o=["always_ccpm","tls_mode","tls_allow_untrusted_clients","tls_allow_untrusted_hubs"],a=()=>(0,i.jsx)("div",{children:(0,i.jsx)(s.A,{keys:o})})},35190:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(74848),s=(n(96540),n(95479));const o=["connection_auto_v4","connection_bind_v4","connection_mode_v4","connection_ip_v4","connection_update_ip_v4","connection_ip_override_v4"],a=({moduleT:e})=>(0,i.jsx)("div",{children:(0,i.jsx)(s.A,{moduleT:e,keys:o,protocol:"v4"})})},52508:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(74848),s=(n(96540),n(95479));const o=["connection_auto_v6","connection_bind_v6","connection_mode_v6","connection_ip_v6","connection_update_ip_v6","connection_ip_override_v6"],a=({moduleT:e})=>(0,i.jsx)("div",{children:(0,i.jsx)(s.A,{keys:o,moduleT:e,protocol:"v6"})})},32709:(e,t,n)=>{n.d(t,{A:()=>m});var i=n(74848),s=(n(96540),n(20239)),o=n(47456),a=n(86038),r=n(67749),l=n(32728),c=n(4425);const d=["tcp_port","udp_port","tls_port","preferred_port_mapper"],A=e=>(t,n,i)=>{const s=n=>e.t((0,o.nD)(r.oV.HELP,t,void 0),n);"tcp_port"===t?n.help=s("TCP port is used for unencrypted transfers"):"tls_port"===t?n.help=s("TLS port (TCP) is used for encrypted transfers"):"udp_port"===t&&(n.help=s("UDP port is used for searching"))},m=({moduleT:e})=>(0,i.jsxs)("div",{children:[(0,i.jsx)(l.A,{description:e.t("portsAutoValuesNote","Port numbers listed on this page can be overridden by port mappers (if enabled)"),icon:c.A.INFO}),(0,i.jsx)(s.A,{keys:d,onFieldSetting:A(e),valueMode:a.XG.FORCE_MANUAL})]})},95479:(e,t,n)=>{n.d(t,{A:()=>A});var i=n(74848),s=n(96540),o=n(20239),a=n(32728),r=n(4425),l=n(19718),c=n(86038);class d extends s.Component{constructor(){super(...arguments),this.state={autoDetectEnabled:!1},this.convertValue=e=>`${e}_${this.props.protocol}`,this.onFieldSetting=(e,t,n)=>{const i=n[this.convertValue("connection_mode")]!==l.ZX.INCOMING_DISABLED,s=n[this.convertValue("connection_auto")];i&&!s||0!==e.indexOf("connection_ip")&&0!==e.indexOf("connection_bind")&&0!==e.indexOf("connection_update_ip")&&0!==e.indexOf("connection_ip_override")||(t.disabled=!0),s&&0===e.indexOf("connection_mode")&&i&&(t.disabled=!0),i||0!==e.indexOf("connection_auto")||(t.disabled=!0)},this.onSettingValuesReceived=e=>{this.setState({autoDetectEnabled:e[this.convertValue("connection_auto")]})}}render(){return(0,i.jsxs)("div",{children:[this.state.autoDetectEnabled&&(0,i.jsx)(a.A,{description:this.props.moduleT.t("protocolAutoValuesNote","Connectivity auto detection is currently enabled; setting values listed on this page are not being used"),icon:r.A.INFO}),(0,i.jsx)(o.A,Object.assign({},this.props,{onFieldSetting:this.onFieldSetting,onSettingValuesReceived:this.onSettingValuesReceived,valueMode:c.XG.FORCE_MANUAL}))]})}}const A=d},16337:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(74848),s=(n(96540),n(20239)),o=n(19718);const a=["outgoing_mode","socks_server","socks_port","socks_resolve","socks_user","socks_password","http_proxy"],r=(e,t,n)=>{n.outgoing_mode===o.rt.OUTGOING_SOCKS||0!==e.indexOf("socks_")||(t.disabled=!0)},l=()=>(0,i.jsx)("div",{children:(0,i.jsx)(s.A,{keys:a,onFieldSetting:r})})},8625:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(74848),s=(n(96540),n(20239));const o=["allow_slow_overlap","finished_remove_exit","use_partial_sharing"],a=["segmented_downloads","min_segment_size"],r=["socket_read_buffer","socket_write_buffer","buffer_size"],l=["compress_transfers","max_compression"],c=({moduleT:e})=>{const{translate:t}=e;return(0,i.jsxs)("div",{children:[(0,i.jsx)(s.A,{keys:o}),(0,i.jsx)(s.A,{keys:a,title:t("Segments")}),(0,i.jsx)(s.A,{keys:l,title:t("Compression")}),(0,i.jsx)(s.A,{keys:r,title:t("Buffers")})]})}},20764:(e,t,n)=>{n.d(t,{A:()=>O});var i=n(74848),s=n(96540),o=n(42049),a=n(59250),r=n(32728),l=n(20239),c=n(79179),d=n(4425),A=n(86038),m=n(67749);const u={id:"create",displayName:"Add directory",access:A.US.SETTINGS_EDIT,icon:d.A.CREATE,handler:({navigate:e})=>{e("directories")}},p={edit:{id:"edit",displayName:"Edit directory",access:A.US.SETTINGS_EDIT,icon:d.A.EDIT,handler:({itemData:e,navigate:t})=>{t(`directories/${e.id}`)}},remove:{id:"remove",displayName:"Remove directory",access:A.US.SETTINGS_EDIT,icon:d.A.REMOVE,confirmation:{content:"Are you sure that you want to remove the favorite directory {{item.name}}?",approveCaption:"Remove directory",rejectCaption:"Don't remove"},handler:({itemData:e,socket:t})=>t.delete(`${c.A.DIRECTORIES_URL}/${e.id}`)}},h={moduleId:m.KV.SETTINGS,subId:"favoriteDirectory"},g={moduleData:h,actions:p};var x=n(68514),v=n(56484),C=n(71352),f=n(99671),_=n(65385),E=n(51766),y=n(33968),b=n(94413),I=n(13712),j=n(59315),S=n(47456);const T=[{key:"path",title:"Path",type:A.OP.DIRECTORY_PATH},{key:"name",title:"Name",type:A.OP.STRING}],D=(0,_.A)((0,v.A)((({directoryEntry:e,moduleT:t,virtualNames:n,socket:o})=>{const a=(0,s.useRef)(null),r=(0,s.useMemo)((()=>(0,S.Nn)(T,t)),[]),l=!e,A=t.translate(l?"Add favorite directory":"Edit favorite directory");return(0,i.jsx)(f.A,{className:"favorite-directory",title:A,onApprove:()=>a.current.save(),closable:!1,icon:d.A.FOLDER,children:(0,i.jsx)(b.A,{ref:a,fieldDefinitions:r,onFieldChanged:(e,t,n)=>e.includes("path")?Promise.resolve({name:t.path?(0,y.ap)(t.path):void 0}):null,onFieldSetting:(e,t,i)=>{"path"===e?(t.disabled=!l,t.config=Object.assign(t.config||{},{historyId:j.A.LOCATION_DOWNLOAD})):"name"===e&&(t.factory=E.Ay.form.Textbox,t.template=I.I9,t.config={suggestionGetter:()=>n})},onSave:t=>l?o.post(c.A.DIRECTORIES_URL,t):o.patch(`${c.A.DIRECTORIES_URL}/${e.id}`,t),sourceValue:e})})}),{urls:{virtualNames:c.A.GROUPED_DIRECTORIES_URL,directoryEntry:({params:e},t)=>e.directoryId?t.get(`${c.A.DIRECTORIES_URL}/${e.directoryId}`):Promise.resolve(void 0)},dataConverters:{virtualNames:e=>e.map((e=>e.name),[])}}),"directories/:directoryId?"),N=({directory:e})=>(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"name dropdown",children:(0,i.jsx)(C.Wy,{caption:(0,i.jsx)("strong",{children:e.name}),actions:g,itemData:e,contextElement:"#setting-scroll-context"})}),(0,i.jsx)("td",{className:"path",children:e.path})]}),k=e=>(0,i.jsx)(N,{directory:e},e.path),B=(0,v.A)((({directories:e,moduleT:t})=>(0,i.jsxs)("div",{id:"directory-table",children:[(0,i.jsx)(x.A,{action:u,moduleData:h}),0===e.length?null:(0,i.jsxs)("table",{className:"ui striped table",children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:t.translate("Name")}),(0,i.jsx)("th",{children:t.translate("Path")})]})}),(0,i.jsx)("tbody",{children:e.map(k)})]}),(0,i.jsx)(D,{moduleT:t})]})),{urls:{directories:c.A.DIRECTORIES_URL},onSocketConnected:(e,{refetchData:t})=>{e(c.A.MODULE_URL,c.A.DIRECTORIES_UPDATED,(()=>t()))}});var w=n(31224);const R=["download_directory"],O=({moduleT:e})=>(0,i.jsxs)("div",{children:[(0,i.jsx)(l.A,{keys:R}),(0,i.jsx)(r.A,{description:(0,i.jsx)(o.A,{url:a.A.VARIABLE_HELP_URL,children:e.translate("Available path variables")}),icon:d.A.INFO}),(0,i.jsxs)("div",{className:"ui segment setting-form",children:[(0,i.jsx)(w.A,{title:e.translate("Favorite download directories"),icon:d.A.FOLDER,size:"normal"}),(0,i.jsx)(B,{moduleT:e})]})]})},70237:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(74848),s=(n(96540),n(20239));const o=["prio_highest_size","prio_high_size","prio_normal_size","prio_auto_default"],a=["prio_high_files_to_highest","prio_high_files","prio_high_files_regex"],r=({moduleT:e})=>{const{translate:t}=e;return(0,i.jsxs)("div",{children:[(0,i.jsx)(s.A,{title:t("File priorities"),keys:o}),(0,i.jsx)(s.A,{title:t("High priority files"),keys:a})]})}},53044:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(74848),s=(n(96540),n(20239));const o=["auto_add_sources","alt_search_auto","alt_search_max_sources","max_sources_match_queue","allow_match_full_list"],a=()=>(0,i.jsx)("div",{children:(0,i.jsx)(s.A,{keys:o})})},58524:(e,t,n)=>{n.d(t,{A:()=>_});var i=n(74848),s=n(96540),o=n(68514),a=n(56484),r=n(71352),l=n(92078),c=n(47650),d=n(99671),A=n(65385),m=n(4425),u=n(94413),p=n(86038),h=n(47456);const g=[{key:"name",title:"Name",type:p.OP.STRING},{key:"extensions",title:"File extensions",type:p.OP.LIST,item_type:p.OP.STRING}],x=(0,A.A)((0,a.A)((e=>{var{moduleT:t,searchTypeEntry:n,socket:o}=e,a=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n}(e,["moduleT","searchTypeEntry","socket"]);const r=!n,l=(0,s.useRef)(null),A=(0,s.useMemo)((()=>(0,h.Nn)(g,t)),[]),p=t.translate(r?"Add search type":"Edit search type");return(0,i.jsx)(d.A,Object.assign({className:"search-type",title:p,onApprove:()=>l.current.save(),closable:!1,icon:m.A.FOLDER},a,{children:(0,i.jsx)(u.A,{ref:l,fieldDefinitions:A,onFieldSetting:(e,t,i)=>{"name"===e&&(t.disabled=!!n&&n.default_type)},onSave:e=>r?o.post(c.A.SEARCH_TYPES_URL,e):o.patch(`${c.A.SEARCH_TYPES_URL}/${n.id}`,e),sourceValue:n})}))}),{urls:{searchTypeEntry:({params:e},t)=>e.searchTypeId?t.get(`${c.A.SEARCH_TYPES_URL}/${e.searchTypeId}`):Promise.resolve(void 0)}}),"types/:searchTypeId?");var v=n(32728),C=n(74416);const f=({type:e,moduleT:t})=>{const{formatBoolean:n}=(0,C.k)();return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"name dropdown",children:(0,i.jsx)(r.Wy,{caption:(0,i.jsx)("strong",{children:e.str}),actions:l._k,itemData:e,contextElement:"#setting-scroll-context"})}),(0,i.jsx)("td",{className:"extensions",children:e.extensions.join(", ")}),(0,i.jsx)("td",{className:"default",children:n(e.default_type)})]})},_=(0,a.A)((({searchTypes:e,moduleT:t})=>(0,i.jsxs)("div",{id:"directory-table",children:[(0,i.jsx)(o.A,{action:l.nQ,moduleData:l.Dq}),0===e.length?null:(0,i.jsxs)("table",{className:"ui striped table",children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:t.translate("Name")}),(0,i.jsx)("th",{children:t.translate("File extensions")}),(0,i.jsx)("th",{children:t.translate("Default")})]})}),(0,i.jsx)("tbody",{children:e.map((e=>((e,t)=>(0,i.jsx)(f,{type:e,moduleT:t},e.id))(e,t)))})]}),(0,i.jsx)(v.A,{icon:m.A.NOTE,description:t.t("searchTypesNote","Note; Custom search types will only be applied to ADC hubs! On NMDC hubs, using a predefined search type will only search for a set of predefined, unconfigurable extensions; using a custom type will default to searching for any extension.")}),(0,i.jsx)(x,{moduleT:t})]})),{urls:{searchTypes:c.A.SEARCH_TYPES_URL},onSocketConnected:(e,{refetchData:t})=>{e(c.A.MODULE_URL,c.A.SEARCH_TYPES_UPDATED,(()=>t()))}})},19698:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(74848),s=(n(96540),n(20239));const o=["dont_download_shared","dont_download_queued","download_dupe_min_size"],a=["download_skiplist","download_skiplist_regex"],r=({moduleT:e})=>(0,i.jsxs)("div",{children:[(0,i.jsx)(s.A,{keys:o}),(0,i.jsx)(s.A,{title:e.translate("Skiplist"),keys:a})]})},6552:(e,t,n)=>{n.d(t,{A:()=>A});var i=n(74848),s=(n(96540),n(2141)),o=n(59250),a=n(56484),r=n(42049),l=n(32728),c=n(32389),d=n(4425);const A=(0,a.A)((({enginesStatus:e,moduleT:t})=>e[s.A.DEFAULT_ENGINE]?null:(0,i.jsx)(l.A,{description:(0,i.jsx)(c.x6,{i18nKey:t.toI18nKey("defaultExtensionEngineMissing"),defaults:"The default extension engine <strong>{{engineName}}</strong> is not installed on your system. Please visit <url>engine's home page</url> for installation instructions.",values:{engineName:s.A.DEFAULT_ENGINE},components:{url:(0,i.jsx)(r.A,{url:o.A.DEFAULT_ENGINE_URL})}}),icon:d.A.WARNING})),{urls:{enginesStatus:s.A.ENGINES_STATUS_URL},loaderText:null})},31880:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(74848),s=(n(96540),n(20239));const o=["extension_engines"],a=()=>(0,i.jsx)("div",{children:(0,i.jsx)(s.A,{keys:o})})},83161:(e,t,n)=>{n.d(t,{A:()=>u});var i=n(74848),s=(n(96540),n(50929)),o=n(68514),a=n(6552),r=n(6162),l=n(2141),c=n(56484),d=(n(97771),n(88569));const A=(0,c.A)((({packageCatalog:e,moduleT:t,installedPackages:n})=>(0,i.jsxs)("div",{className:"extension-layout",children:[(0,i.jsx)("div",{className:"ui divider"}),e.length>0&&(0,i.jsx)("div",{className:"ui divided items",children:e.map((e=>((e,t,n)=>{const s=n.find((t=>t.name===e.name));return(0,i.jsx)(r.A,{npmPackage:e,installedPackage:s,moduleT:t},e.name)})(e.package,t,n)))})]})),{urls:{installedPackages:l.A.EXTENSIONS_URL,packageCatalog:()=>(0,d.H)(l.A.NPM_PACKAGES_URL,!0)},dataConverters:{packageCatalog:({objects:e})=>e},onSocketConnected:(e,{refetchData:t})=>{const n=()=>t(["installedPackages"]);e(l.A.MODULE_URL,l.A.ADDED,n),e(l.A.MODULE_URL,l.A.REMOVED,n),e(l.A.MODULE_URL,l.A.UPDATED,n)}});var m=n(90255);const u=({moduleT:e})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.A,{moduleT:e}),(0,i.jsx)("div",{className:"table-actions",children:(0,i.jsx)(o.A,{action:s.Cs,moduleData:s.Dm,className:"add"})}),(0,i.jsx)(A,{moduleT:e}),(0,i.jsx)(m.A,{})]})},90255:(e,t,n)=>{n.d(t,{A:()=>m});var i=n(74848),s=n(96540),o=n(99671),a=n(94413),r=n(65385),l=n(56484),c=n(2141),d=n(4425);const A=e=>`${c.A.EXTENSIONS_URL}/${e}/settings`,m=(0,r.A)((0,l.A)((e=>{var{extension:t,settings:n,fieldDefinitions:r,socket:l}=e,c=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n}(e,["extension","settings","fieldDefinitions","socket"]);const m=(0,s.useRef)(null);return(0,i.jsx)(o.A,Object.assign({},c,{className:"extensions configure",title:t.name,onApprove:()=>m.current.save(),closable:!1,icon:d.A.EDIT,dynamicHeight:!0,children:(0,i.jsx)(a.A,{ref:m,onSave:e=>l.patch(A(t.id),e),fieldDefinitions:r,sourceValue:n})}))}),{urls:{fieldDefinitions:({params:e},t)=>t.get(`${A(e.extensionId)}/definitions`),settings:({params:e},t)=>t.get(A(e.extensionId)),extension:({params:e},t)=>t.get(`${c.A.EXTENSIONS_URL}/${e.extensionId}`)}}),"extensions/:extensionId")},37155:(e,t,n)=>{n.d(t,{A:()=>g});var i=n(74848),s=(n(96540),n(56484)),o=n(2141),a=n(6552),r=n(90255),l=n(14753),c=n(32728),d=n(6162),A=n(88569);const m=({name:e,description:t,version:n,_npmUser:i})=>({id:e,name:e,description:t,version:n,publisher:{username:i.name},date:""}),u=(0,s.A)((({installedPackage:e,npmPackage:t,dataError:n,moduleT:s})=>(0,i.jsx)(d.A,{installedPackage:e,npmPackage:t?m(t):void 0,npmError:n,moduleT:s},e.name)),{urls:{npmPackage:({installedPackage:e})=>e.private||!e.managed?Promise.resolve(void 0):(0,A.H)(`${o.A.NPM_PACKAGE_URL}${e.name}/latest`,!0)},renderOnError:!0});var p=n(32389),h=n(4425);const g=(0,s.A)((({installedPackages:e,moduleT:t})=>{if(0===e.length){const e="No installed extensions were found. New extensions can be installed from the <url>Extension catalog</url> page.";return(0,i.jsx)(c.A,{description:(0,i.jsx)(p.x6,{i18nKey:t.toI18nKey("noInstalledExtensions"),defaults:e,components:{url:(0,i.jsx)(l.N_,{to:"/settings/extensions/packages"})}}),icon:h.A.INFO})}return(0,i.jsxs)("div",{className:"extension-layout",children:[(0,i.jsx)(a.A,{moduleT:t}),(0,i.jsx)("div",{className:"ui divider"}),(0,i.jsx)("div",{className:"ui divided items",children:e.map((e=>((e,t)=>(0,i.jsx)(u,{installedPackage:e,moduleT:t},e.name))(e,t)))}),(0,i.jsx)(r.A,{})]})}),{urls:{installedPackages:o.A.EXTENSIONS_URL},onSocketConnected:(e,{refetchData:t})=>{e(o.A.MODULE_URL,o.A.ADDED,(()=>t())),e(o.A.MODULE_URL,o.A.REMOVED,(()=>t())),e(o.A.MODULE_URL,o.A.UPDATED,(()=>t()))}})},50804:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(74848),s=(n(96540),n(20239));const o=["extensions_debug_mode","extensions_auto_update","extensions_init_timeout"],a=()=>(0,i.jsx)("div",{children:(0,i.jsx)(s.A,{keys:o})})},6162:(e,t,n)=>{n.d(t,{A:()=>W});var i=n(74848),s=n(96540),o=n(95093),a=n.n(o),r=n(2141),l=n(30271),c=n(50929),d=n(68514),A=n(42049),m=n(71352),u=n(39115),p=n(4425),h=n(83994),g=n(86038),x=n(67749),v=n(48844);const C=({itemData:e})=>e.managed,f=({itemData:e})=>e.running,_=({itemData:e})=>e.disabled,E={id:"start",displayName:"Start",icon:p.A.PLAY,filter:e=>C(e)&&!f(e),access:g.US.ADMIN,handler:({itemData:e,socket:t})=>t.post(`${r.A.EXTENSIONS_URL}/${e.name}/start`)},y={id:"stop",displayName:"Stop",icon:p.A.STOP,filter:e=>C(e)&&f(e),access:g.US.ADMIN,handler:({itemData:e,socket:t})=>t.post(`${r.A.EXTENSIONS_URL}/${e.name}/stop`)},b={id:"configure",displayName:"Configure",icon:p.A.EDIT,filter:({itemData:e})=>e.has_settings,access:g.US.SETTINGS_EDIT,handler:({itemData:e,navigate:t})=>{t(`extensions/${e.id}`)}},I={id:"disable",displayName:"Disable",icon:p.A.DISABLE,filter:e=>C(e)&&!_(e),access:g.US.SETTINGS_EDIT,handler:({itemData:e,socket:t})=>t.patch(`${r.A.EXTENSIONS_URL}/${e.name}`,{disabled:!0})},j={id:"enable",displayName:"Enable",icon:p.A.ENABLE,filter:e=>C(e)&&_(e),access:g.US.SETTINGS_EDIT,handler:({itemData:e,socket:t})=>t.patch(`${r.A.EXTENSIONS_URL}/${e.name}`,{disabled:!1})},S={id:"remove",displayName:"Uninstall",icon:p.A.REMOVE,filter:C,access:g.US.ADMIN,confirmation:{content:"Are you sure that you want to remove the extension {{item.name}}? This will also remove possible extension-specific settings.",approveCaption:"Remove extension",rejectCaption:"Don't remove"},handler:({itemData:e,socket:t})=>t.delete(r.A.EXTENSIONS_URL+"/"+e.name)},T={start:E,stop:y,configure:b,disable:I,enable:j,divider:v.o,remove:S},D={moduleId:x.KV.EXTENSIONS},N={moduleData:D,actions:T},k=({npmPackage:e,installedPackage:t,hasUpdate:n,installing:s})=>t&&!n?null:(0,i.jsx)(d.A,{action:n?c.Cp:c.YB,moduleData:D,className:"right floated primary",itemData:e,loading:s}),B=({npmPackage:e,installedPackage:t,hasUpdate:n,installing:s,moduleT:o})=>(0,i.jsxs)("div",{className:"extra buttons",children:[e&&(0,i.jsx)(k,{npmPackage:e,installedPackage:t,hasUpdate:n,installing:s}),t&&(0,i.jsx)(m.Wy,{actions:N,ids:["configure","enable","disable","divider","remove"],remoteMenuId:u.Ay.EXTENSION,remoteMenuNestingThreshold:10,itemData:t,className:"right floated",caption:o.translate("Manage..."),button:!0,contextElement:"#setting-scroll-context",menuElementClassName:"left floated"}),e&&(0,i.jsxs)(A.A,{className:"ui right floated button",url:r.A.NPM_HOMEPAGE_URL+e.name,children:[(0,i.jsx)(h.A,{icon:p.A.EXTERNAL}),o.translate("Read more")]}),t&&(0,i.jsx)(d.A,{action:t.running?y:E,moduleData:D,className:"right floated",itemData:t})]});var w=n(15911),R=(n(97771),n(98147)),O=n(77856),U=n(46942),L=n.n(U);const P=({title:e,packageInfo:t,className:n,moduleT:s})=>{if(!t)return null;const o=t.date?s.t("datePublished",{defaultValue:"{{version}} (published {{date}})",replace:{version:t.version,date:a()(t.date).from(a()())}}):t.version;return(0,i.jsxs)("div",{className:n,children:[`${e}: `,(0,i.jsx)("span",{children:o})]})},M=(e,t,n)=>{const i=t?t.publisher.username:null==n?void 0:n.author;return i?e.t("byAuthor",{defaultValue:"by {{author}}",replace:{author:i}}):null},V=(e,t,n)=>t&&!t.managed?e.translate("Unmanaged extension"):n?e.t("extensionDirectoryFetchError",{defaultValue:"Failed to fetch information from the extension directory: {{error}}",replace:{error:(0,O.av)(n)}}):e.translate("Non-listed extension");class F extends s.PureComponent{constructor(){super(...arguments),this.state={installing:!1},this.onInstallationStarted=e=>{e.install_id===this.props.npmPackage.name&&this.setState({installing:!0})},this.onInstallationCompleted=e=>{e.install_id===this.props.npmPackage.name&&this.setState({installing:!1})}}componentDidMount(){const{addSocketListener:e,npmPackage:t}=this.props;t&&(e(r.A.MODULE_URL,r.A.INSTALLATION_STARTED,this.onInstallationStarted),e(r.A.MODULE_URL,r.A.INSTALLATION_SUCCEEDED,this.onInstallationCompleted),e(r.A.MODULE_URL,r.A.INSTALLATION_FAILED,this.onInstallationCompleted))}render(){const{npmPackage:e,installedPackage:t,npmError:n,moduleT:s}=this.props,{installing:o}=this.state,{translate:a}=s,r=!!t&&!!e&&(0,w.Z)(t.version,e.version)<0;return(0,i.jsxs)("div",{className:"item extension",children:[(0,i.jsx)(l.A,{installedPackage:t,hasUpdate:r}),(0,i.jsxs)("div",{className:"content",children:[(0,i.jsx)("div",{className:"header",children:e?e.name:t.name}),(0,i.jsx)("div",{className:"meta author",children:M(s,e,t)}),(0,i.jsx)("div",{className:"description",children:(0,i.jsx)("span",{children:e?e.description:t.description})}),(0,i.jsxs)("div",{className:"extra version",children:[(0,i.jsx)(P,{className:"npm",title:a("Latest version"),packageInfo:e,moduleT:s}),(0,i.jsx)("div",{children:!e&&V(s,t,n)}),(0,i.jsx)(P,{className:L()({outdated:r,latest:e&&!r}),title:a("Installed version"),packageInfo:t,moduleT:s})]}),(0,i.jsx)(B,{installedPackage:t,npmPackage:e,installing:o,hasUpdate:r,moduleT:s})]})]})}}const W=(0,R.k)(F)},30271:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(74848),s=(n(96540),n(83994)),o=n(4425);const a=(e,t)=>e?t?"yellow warning circle":e.managed?e.running?"green play":e.disabled?"grey check circle":"green check circle":"blue external square":null,r=({installedPackage:e,hasUpdate:t,size:n="huge"})=>(0,i.jsx)("div",{className:"ui image",children:(0,i.jsx)(s.A,{icon:o.A.EXTENSION,color:(null==e?void 0:e.disabled)?"grey":void 0,size:n,cornerIcon:a(e,t)})})},15175:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(74848),s=(n(96540),n(20239));const o=["away_message","away_no_bots","away_idle_time"],a=()=>(0,i.jsx)("div",{children:(0,i.jsx)(s.A,{keys:o})})},33751:(e,t,n)=>{n.d(t,{A:()=>A});var i=n(74848),s=(n(96540),n(683)),o=n(56484),a=n(32728),r=n(71352),l=n(39115);const c=({ignoreInfo:e})=>(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"user dropdown",children:(0,i.jsx)(r.Bg,{ids:["unignore"],userIcon:"simple",user:e.user,contextElement:"#setting-scroll-context",remoteMenuId:l.Ay.USER})}),(0,i.jsx)("td",{className:"count",children:e.ignored_messages})]}),d=e=>(0,i.jsx)(c,{ignoreInfo:e},e.user.cid),A=(0,o.A)((({ignores:e,moduleT:t})=>{const{translate:n}=t;return 0===e.length?(0,i.jsx)(a.A,{title:n("No ignored users")}):(0,i.jsx)("div",{children:(0,i.jsxs)("table",{className:"ui striped table",children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:n("User")}),(0,i.jsx)("th",{children:n("Messages ignored")})]})}),(0,i.jsx)("tbody",{children:e.map(d)})]})})}),{urls:{ignores:s.A.IGNORES_URL},onSocketConnected:(e,{refetchData:t})=>{e(s.A.MODULE_URL,s.A.IGNORE_ADDED,(()=>t())),e(s.A.MODULE_URL,s.A.IGNORE_REMOVED,(()=>t()))}})},43353:(e,t,n)=>{n.d(t,{A:()=>j});var i=n(74848),s=(n(96540),n(20239)),o=n(86038),a=n(67749),r=n(85072),l=n.n(r),c=n(97825),d=n.n(c),A=n(77659),m=n.n(A),u=n(55056),p=n.n(u),h=n(10540),g=n.n(h),x=n(41113),v=n.n(x),C=n(62868),f={};f.styleTagTransform=v(),f.setAttributes=p(),f.insert=m().bind(null,"head"),f.domAPI=d(),f.insertStyleElement=g(),l()(C.A,f),C.A&&C.A.locals&&C.A.locals;var _=n(32389),E=n(47456),y=n(28286);const b=e=>(t,n,s)=>{"nmdc_encoding"===t&&(n.help=(0,i.jsx)(_.x6,{i18nKey:e.toI18nKey((0,E.nD)(a.oV.HELP,t,void 0)),children:(0,i.jsxs)("div",{children:["Encoding setting is only used in NMDC hubs. ADC hubs will always use UTF-8 encoding.",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsxs)("div",{children:["Commonly used values:",(0,i.jsxs)("ul",{children:[(0,i.jsx)("li",{children:"Central Europe: cp1250"}),(0,i.jsx)("li",{children:"Cyrillic: cp1251"}),(0,i.jsx)("li",{children:"Western Europe: cp1252"}),(0,i.jsx)("li",{children:"Greek: cp1253"}),(0,i.jsx)("li",{children:"Turkish: cp1254"}),(0,i.jsx)("li",{children:"Hebrew: cp1256"})]})]})]})}))},I=["auto_follow_redirects","disconnect_offline_users","disconnect_hubs_noreg","min_search_interval"],j=({moduleT:e})=>{const{systemInfo:t}=(0,y.w)();return t.platform!==o.px.WINDOWS&&I.push("nmdc_encoding"),(0,i.jsx)("div",{children:(0,i.jsx)(s.A,{keys:I,onFieldSetting:b(e)})})}},37964:(e,t,n)=>{n.d(t,{A:()=>u});var i=n(74848),s=(n(96540),n(19718)),o=n(20239),a=n(67749),r=n(47456),l=n(42049),c=n(59250),d=n(32389);const A=["nick","description","email","setting_profile","language_file"],m=e=>(t,n,o)=>{if("setting_profile"===t){let i;const l=o[t];switch(l){case s.PV.NORMAL:i="The client is used in normal private/public hubs for transferring files via internet. Use this profile if unsure.";break;case s.PV.RAR:i="The client is used for transferring files that are split in RAR archives (or in other small-sized formats)";break;case s.PV.LAN:i="The client is used for transferring files in local network (e.g. LAN parties) or in another closed network (e.g. university network)"}i&&(n.help=e.t((0,r.nD)(a.oV.HELP,t,l.toString()),i))}else if("language_file"===t){const s="If you want to help with improving the existing translations or translate the application into a new language, please see the <url>instructions for translators</url>.";n.help=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{children:(0,i.jsx)(d.x6,{i18nKey:e.toI18nKey((0,r.nD)(a.oV.HELP,t,"Restart")),defaults:"The application must be restarted for the new language to take effect."})}),(0,i.jsx)("p",{children:(0,i.jsx)(d.x6,{i18nKey:e.toI18nKey((0,r.nD)(a.oV.HELP,t,"Translate")),defaults:s,components:{url:(0,i.jsx)(l.A,{url:c.A.TRANSLATOR_HELP})}})})]})}},u=({moduleT:e})=>(0,i.jsx)("div",{children:(0,i.jsx)(o.A,{keys:A,onFieldSetting:m(e)})})},6244:(e,t,n)=>{n.d(t,{A:()=>f});var i=n(74848),s=(n(96540),n(29112)),o=n(91510),a=n(42191),r=n(68514),l=n(71352),c=n(56484),d=n(47603),A=n(4425),m=n(32728),u=n(59315),p=n(36076),h=n(67749),g=n(32389),x=n(48249);const v=({path:e})=>(0,i.jsx)("tr",{children:(0,i.jsx)("td",{className:"path dropdown",children:(0,i.jsx)(l.Wy,{caption:(0,i.jsx)("strong",{children:e}),actions:o.nH,itemData:e,contextElement:"#setting-scroll-context"})})}),C=e=>(0,i.jsx)(v,{path:e},e),f=(0,c.A)((({excludes:e,moduleT:t})=>{const n=(0,x.F)(),{translate:l,toI18nKey:c}=t;return(0,i.jsxs)("div",{children:[(0,i.jsx)(m.A,{title:(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:(0,i.jsx)(g.x6,{i18nKey:c("shareRefreshNote"),children:"Share must be refreshed for the changes to take effect"})}),(0,i.jsx)("br",{}),(0,i.jsx)(r.A,{action:s.RS,moduleData:s.eP})]}),icon:A.A.INFO}),(0,i.jsx)(r.A,{action:o.Tw,moduleData:o.MB,className:"add"}),e.length>0&&(0,i.jsxs)("table",{className:"ui striped table",children:[(0,i.jsx)("thead",{children:(0,i.jsx)("tr",{children:(0,i.jsx)("th",{children:l("Path")})})}),(0,i.jsx)("tbody",{children:e.map(C)})]}),(0,i.jsx)(d.i,{onConfirm:e=>(0,p.bd)((()=>n.post(a.A.EXCLUDES_ADD_URL,{path:e})),t.plainT),initialPath:"",historyId:u.A.LOCATION_GENERIC,subHeader:l("Add excluded path"),selectMode:h.bV.DIRECTORY})]})}),{urls:{excludes:a.A.EXCLUDES_URL},onSocketConnected:(e,{refetchData:t})=>{e(a.A.MODULE_URL,a.A.EXCLUDE_ADDED,(()=>t())),e(a.A.MODULE_URL,a.A.EXCLUDE_REMOVED,(()=>t()))}})},79287:(e,t,n)=>{n.d(t,{A:()=>E});var i=n(74848),s=n(96540),o=n(20239),a=n(56484),r=n(73616),l=n(96529),c=n(32728),d=n(71870),A=n(74416),m=(n(97578),n(86038)),u=n(32389),p=n(36076),h=n(73070),g=n(4425),x=n(48249),v=n(28286);const C=({startHandler:e,running:t,moduleT:n})=>{const{toI18nKey:o,translate:a}=n,[d,A]=s.useState(!1);return(0,i.jsxs)("div",{className:"optimize-layout",children:[(0,i.jsx)("h4",{className:"header",style:{marginTop:"30px"},children:a("Maintenance")}),(0,i.jsx)(c.A,{description:(0,i.jsx)(u.x6,{i18nKey:o("hashDBOptimizeNote"),children:"This operation will delete all hash information for files that aren't currently in share. If you are sharing files from network disks or from a removable storage, make sure that the files are currently shown in share (otherwise they have to be rehashed)"}),icon:g.A.NOTE}),(0,i.jsx)(r.A,{caption:a("Verify integrity of hash data"),checked:d,disabled:t,onChange:A,floating:!0,id:"verify-hash-data"}),(0,i.jsx)(l.A,{className:"optimize-button",caption:a("Optimize now"),icon:g.A.CONFIGURE,loading:t,onClick:()=>e(d)})]})},f=(0,a.A)((({status:e,moduleT:t})=>{const{hasAccess:n}=(0,v.w)(),{formatSize:s}=(0,A.k)(),o=(0,x.F)(),{translate:a}=t;return(0,i.jsxs)("div",{className:"ui segment hash-database",children:[(0,i.jsx)("h3",{className:"header",children:a("Hash database")}),(0,i.jsxs)(h.xA,{columns:"two",children:[(0,i.jsx)(h.fI,{title:a("File index size"),text:s(e.file_index_size),titleWidth:"five"}),(0,i.jsx)(h.fI,{title:a("Hash store size"),text:s(e.hash_store_size),titleWidth:"five"})]}),n(m.US.SETTINGS_EDIT)&&(0,i.jsx)(C,{running:e.maintenance_running,startHandler:e=>{(0,p.bd)((()=>o.post(d.A.OPTIMIZE_DATABASE_URL,{verify:e})),t.plainT)},moduleT:t})]})}),{urls:{status:d.A.DATABASE_STATUS_URL},onSocketConnected:(e,{refetchData:t})=>{e(d.A.MODULE_URL,d.A.DATABASE_STATUS,(()=>t()))}}),_=["max_hash_speed","max_total_hashers","max_volume_hashers"],E=({moduleT:e})=>(0,i.jsxs)("div",{children:[(0,i.jsx)(o.A,{keys:_}),(0,i.jsx)(f,{moduleT:e})]})},98915:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(74848),s=(n(96540),n(20239));const o=["refresh_time","refresh_time_incoming","refresh_startup","refresh_threading"],a=()=>(0,i.jsx)("div",{children:(0,i.jsx)(s.A,{keys:o})})},19473:(e,t,n)=>{n.d(t,{A:()=>E});var i=n(74848),s=(n(96540),n(94899)),o=n(71352),a=n(14753),r=n(32728),l=n(71299),c=n(74416),d=(n(97578),n(32389)),A=n(4425),m=n(27725),u=n(17911),p=n(63252),h=n(31104),g=n(19247),x=n(36076),v=n(19430),C=n(28286);const f=({profiles:e,moduleT:t})=>{const{hasAccess:n}=(0,C.w)(),s=(0,c.k)();return n(p.tx.access)?(0,i.jsx)(u.M,{children:({onClickAction:n})=>(0,i.jsxs)(h.A,{caption:t.translate("Add profile"),className:"clone-profile",button:!0,children:[(0,i.jsx)(m.A,{onClick:()=>{n({itemData:void 0,action:p.tx,entity:void 0,moduleData:p.Ds})},icon:A.A.CREATE,children:(0,x._q)(p.tx,p.Ds,t.plainT)}),(0,i.jsx)(g.A,{caption:t.translate("Clone from an existing profile"),children:e.map((e=>((e,t,n)=>(0,i.jsx)(m.A,{onClick:()=>n({action:p.An,itemData:e,moduleData:p.Ds,entity:void 0}),icon:A.A.COPY,children:(0,v.v)(e,t)},e.id))(e,s,n)))})]})}):null},_=({profile:e})=>{const{formatSize:t}=(0,c.k)();return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"name dropdown",children:(0,i.jsx)(o.Wy,{caption:(0,i.jsx)("strong",{children:e.str}),actions:s.YS,itemData:e,contextElement:"#setting-scroll-context"})}),(0,i.jsx)("td",{className:"size",children:t(e.size)}),(0,i.jsx)("td",{className:"files",children:e.files})]})},E=(0,l.A)((({moduleT:e,profiles:t})=>{const{translate:n,toI18nKey:s}=e;return(0,i.jsxs)("div",{children:[(0,i.jsx)(r.A,{description:(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{children:(0,i.jsx)(d.x6,{i18nKey:s("shareProfilesPartialNote"),defaults:"Queued files are shared via the partial file sharing feature in all hubs where the share has not been hidden, regardless of the configured share profiles.",components:{url:(0,i.jsx)(a.N_,{to:"/share"})}})}),(0,i.jsx)("p",{children:(0,i.jsx)(d.x6,{i18nKey:s("shareProfilesHelp"),defaults:"Share profiles are assigned for individual directories from the <url>Share</url> page.",components:{url:(0,i.jsx)(a.N_,{to:"/share"})}})})]}),icon:A.A.INFO}),(0,i.jsx)(f,{profiles:t,moduleT:e}),(0,i.jsxs)("table",{className:"ui striped table",children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:n("Name")}),(0,i.jsx)("th",{children:n("Total size")}),(0,i.jsx)("th",{children:n("Total files")})]})}),(0,i.jsx)("tbody",{children:t.map((e=>(0,i.jsx)(_,{profile:e},e.id)))})]})]})}),!1)},59676:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(74848),s=(n(96540),n(20239));const o=["share_hidden","share_no_empty_dirs","share_no_zero_byte","share_follow_symlinks","share_max_size"],a=["share_skiplist","share_skiplist_regex"],r=({moduleT:e})=>(0,i.jsxs)("div",{children:[(0,i.jsx)(s.A,{keys:o}),(0,i.jsx)(s.A,{title:e.translate("Skiplist"),keys:a})]})},2348:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(74848),s=n(20239),o=n(19718),a=n(86038),r=n(48249);const l=({type:e,keys:t})=>{const n=(0,r.F)(),l=()=>`${e}_auto_limits`;return(0,i.jsx)("div",{className:"ui segment",children:(0,i.jsx)(s.A,{keys:t,onFieldChanged:(e,i,s)=>{const r=l();return e===r&&i[r]?n.post(o.Ay.ITEMS_GET_URL,{keys:t.filter((e=>e!==r)),value_mode:a.XG.FORCE_AUTO}):null},onFieldSetting:(e,t,n)=>{n[l()]&&e!==l()&&(t.disabled=!0)}})})}},45876:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(74848),s=(n(96540),n(2348)),o=n(20239);const a=["download_auto_limits","download_slots","download_max_start_speed"],r=["download_highest_prio_slots"],l=({moduleT:e})=>{const{translate:t}=e;return(0,i.jsxs)("div",{children:[(0,i.jsx)(s.A,{keys:a,type:"download"}),(0,i.jsx)(o.A,{title:t("Manually set"),keys:r})]})}},64253:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(74848),s=(n(96540),n(20239));const o=["upload_limit_main","download_limit_main"],a=()=>(0,i.jsx)("div",{children:(0,i.jsx)(s.A,{keys:o})})},47072:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(74848),s=(n(96540),n(42049)),o=n(59250),a=n(20239),r=n(32389);const l=["download_speed","upload_speed"],c=({moduleT:e})=>{const{toI18nKey:t}=e;return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"ui message",children:(0,i.jsx)(r.x6,{i18nKey:t("connectionSpeedNote"),defaults:"Please be as accurate as possible and set the ACTUAL speed of your connection. You may use an online tester, such as <speedtest>{{name}}</speedtest>, to test your speed.",values:{name:"Speedtest.net"},components:{speedtest:(0,i.jsx)(s.A,{url:o.A.SPEEDTEST_URL})}})}),(0,i.jsx)(a.A,{keys:l})]})}},4313:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(74848),s=(n(96540),n(20239)),o=n(2348);const a=["upload_auto_limits","upload_slots","upload_auto_grant_speed","upload_max_granted"],r=["upload_minislot_size","upload_minislot_ext"],l=({moduleT:e})=>{const{translate:t}=e;return(0,i.jsxs)("div",{children:[(0,i.jsx)(o.A,{keys:a,type:"upload"}),(0,i.jsx)(s.A,{title:t("Manually set"),keys:r})]})}},28903:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(74848),s=(n(96540),n(2348));const o=["mcn_auto_limits","mcn_down","mcn_up"],a=()=>(0,i.jsx)("div",{children:(0,i.jsx)(s.A,{keys:o,type:"mcn"})})},81301:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(74848),s=(n(96540),n(68514)),o=n(20239),a=n(18536);const r=["web_server_threads","default_idle_timeout","ping_interval","ping_timeout"],l=["share_file_validation_hook_timeout","share_directory_validation_hook_timeout","new_share_file_validation_hook_timeout","new_share_directory_validation_hook_timeout","outgoing_chat_message_hook_timeout","incoming_chat_message_hook_timeout","queue_add_bundle_hook_timeout","queue_add_bundle_file_hook_timeout","queue_add_source_hook_timeout","queue_bundle_finished_hook_timeout","queue_file_finished_hook_timeout","list_menuitems_hook_timeout"],c=e=>{const{translate:t}=e.moduleT;return(0,i.jsxs)("div",{children:[(0,i.jsx)(s.A,{action:a.Bs,moduleData:a.A_}),(0,i.jsx)(o.A,{keys:r}),(0,i.jsx)("div",{className:"ui header",children:t("Hook timeouts")}),(0,i.jsx)("div",{className:"ui segment",children:(0,i.jsx)(o.A,{keys:l})})]})}},69222:(e,t,n)=>{n.d(t,{A:()=>C});var i=n(74848),s=n(96540),o=n(20239),a=n(42049),r=n(59250),l=n(32728),c=n(4425),d=n(78340);n(50935);class A extends s.Component{constructor(){super(...arguments),this.state={enabled:!1},this.convertKey=e=>{const t=e?`_${e}`:"";return`log_${this.props.section}${t}`},this.onSettingsReceived=e=>{this.setState({enabled:e[this.convertKey()]})},this.onEnableStateChanged=(e,t,n)=>{this.setState({enabled:t[e]})},this.onContentSetting=(e,t,n)=>{t.disabled=!this.state.enabled},this.getChildClass=e=>this.state.enabled?e+" active":e}render(){const e=[this.convertKey()],t=[this.convertKey("file"),this.convertKey("format")],{simple:n}=this.props;return(0,i.jsxs)("div",{className:this.getChildClass("log-section"),children:[(0,i.jsx)("div",{className:this.getChildClass("title"),children:(0,i.jsx)(o.A,{keys:e,onFieldChanged:this.onEnableStateChanged,onSettingValuesReceived:this.onSettingsReceived})}),!n&&(0,i.jsx)("div",{className:this.getChildClass("content"),children:(0,i.jsx)(o.A,{keys:t,onFieldSetting:this.onContentSetting})})]})}}const m=A;const u=e=>{const{title:t,sectionKeys:n,simpleKeys:o}=e,a=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n}(e,["title","sectionKeys","simpleKeys"]);return(0,i.jsx)("div",{children:(0,i.jsxs)("div",{className:"sections",children:[(0,i.jsx)("div",{className:"ui header",children:t}),(0,i.jsx)(d.Ay,{className:"styled",controlled:!0,children:n.map((e=>(0,s.createElement)(m,Object.assign({},a,{key:e,section:e,simple:!!o&&o.includes(e)}))))})]})})};var p=n(32389);const h=["log_directory"],g=["main","pm","syslog","status"],x=["downloads","uploads","list_transfers"],v=["list_transfers"],C=({moduleT:e})=>{const{translate:t,toI18nKey:n}=e;return(0,i.jsxs)("div",{children:[(0,i.jsx)(o.A,{keys:h}),(0,i.jsxs)("div",{className:"sections",children:[(0,i.jsx)(l.A,{icon:c.A.INFO,description:(0,i.jsx)(a.A,{url:r.A.VARIABLE_HELP_URL,children:(0,i.jsx)(p.x6,{i18nKey:n("variableHelp"),children:"Variable information for Filename and Format fields"})})}),(0,i.jsx)(u,{sectionKeys:g,title:t("Messages")}),(0,i.jsx)(u,{sectionKeys:x,title:t("Transfers"),simpleKeys:v})]})]})}},87135:(e,t,n)=>{n.d(t,{A:()=>A});var i=n(74848),s=(n(96540),n(20239)),o=n(68514),a=n(32728),r=n(72384),l=n(4425);const c=["web_plain_port","web_plain_bind_address"],d=["web_tls_port","web_tls_bind_address","web_tls_certificate_path","web_tls_certificate_key_path"],A=e=>{const{t}=e.moduleT;return(0,i.jsxs)("div",{children:[(0,i.jsx)(o.A,{action:r.Bs,moduleData:r.A_}),(0,i.jsx)("div",{className:"ui header",children:"HTTP"}),(0,i.jsx)("div",{className:"ui segment",children:(0,i.jsx)(s.A,Object.assign({},e,{keys:c}))}),(0,i.jsx)("div",{className:"ui header",children:"HTTPS"}),(0,i.jsxs)("div",{className:"ui segment",children:[(0,i.jsx)(s.A,Object.assign({},e,{keys:d})),(0,i.jsx)(a.A,{description:t("defaultCertNote","The default client certificate is used if the certificate paths are empty"),icon:l.A.INFO})]})]})}},51566:(e,t,n)=>{n.d(t,{A:()=>T});var i=n(74848),s=n(96540),o=n(76865),a=n(52786),r=n(68514),l=n(99671),c=n(65385);const d={ADMIN:"admin",SEARCH:"search",DOWNLOAD:"download",TRANSFERS:"transfers",EVENTS_VIEW:"events_view",EVENTS_EDIT:"events_edit",QUEUE_VIEW:"queue_view",QUEUE_EDIT:"queue_edit",FAVORITE_HUBS_VIEW:"favorite_hubs_view",FAVORITE_HUBS_EDIT:"favorite_hubs_edit",SETTINGS_VIEW:"settings_view",SETTINGS_EDIT:"settings_edit",FILESYSTEM_VIEW:"filesystem_view",FILESYSTEM_EDIT:"filesystem_edit",HUBS_VIEW:"hubs_view",HUBS_EDIT:"hubs_edit",HUBS_SEND:"hubs_send",PRIVATE_CHAT_VIEW:"private_chat_view",PRIVATE_CHAT_EDIT:"private_chat_edit",PRIVATE_CHAT_SEND:"private_chat_send",FILELISTS_VIEW:"filelists_view",FILELISTS_EDIT:"filelists_edit",VIEW_FILE_VIEW:"view_file_view",VIEW_FILE_EDIT:"view_file_edit"};var A=n(51766),m=n(73616),u=n(32728),p=n(86038),h=n(47456);var g,x=n(94413),v=(n(50935),n(56484)),C=n(42695),f=n(4425),_=n(28286);!function(e){e.EDIT="Edit",e.VIEW="View",e.SEND_MESSAGES="Send messages"}(g||(g={}));const E={ADMIN:"Administrator",SEARCH:"Search",DOWNLOAD:"Download",TRANSFERS:"Transfers",EVENTS_VIEW:{title:"Events",action:g.VIEW},EVENTS_EDIT:{title:"Events",action:g.EDIT},QUEUE_VIEW:{title:"Queue",action:g.VIEW},QUEUE_EDIT:{title:"Queue",action:g.EDIT},FAVORITE_HUBS_VIEW:{title:"Favorite hubs",action:g.VIEW},FAVORITE_HUBS_EDIT:{title:"Favorite hubs",action:g.EDIT},SETTINGS_VIEW:{title:"Settings",action:g.VIEW},SETTINGS_EDIT:{title:"Settings",action:g.EDIT},FILESYSTEM_VIEW:{title:"Local filesystem",action:g.VIEW},FILESYSTEM_EDIT:{title:"Local filesystem",action:g.EDIT},HUBS_VIEW:{title:"Hubs",action:g.VIEW},HUBS_EDIT:{title:"Hubs",action:g.EDIT},HUBS_SEND:{title:"Hubs",action:g.SEND_MESSAGES},PRIVATE_CHAT_VIEW:{title:"Private chat",action:g.VIEW},PRIVATE_CHAT_EDIT:{title:"Private chat",action:g.EDIT},PRIVATE_CHAT_SEND:{title:"Private chat",action:g.SEND_MESSAGES},FILELISTS_VIEW:{title:"Filelists",action:g.VIEW},FILELISTS_EDIT:{title:"Filelists",action:g.EDIT},VIEW_FILE_VIEW:{title:"Viewed files",action:g.VIEW},VIEW_FILE_EDIT:{title:"Viewed files",action:g.EDIT}},y=(0,c.A)((0,v.A)((e=>{var{user:t,moduleT:n,socket:a}=e,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]])}return n}(e,["user","moduleT","socket"]);const{user:c}=(0,_.w)(),g=!t,v=(0,s.useMemo)((()=>((e,t)=>{const n=(0,h.Nn)((e=>[{key:"username",title:"User name",type:p.OP.STRING},{key:"password",type:p.OP.PASSWORD,title:e?"Password":"New password",optional:!e},{key:"permissions",title:"Permissions",type:p.OP.LIST,item_type:p.OP.STRING}])(e),t),i=(0,C.Ze)(t,"permissionSelector"),s=n.find((e=>"permissions"===e.key));return Object.assign(s,{options:Object.keys(d).reduce(((e,t)=>((e,t,n)=>{const i=E[t];return"string"==typeof i?e.push({id:d[t],name:n.translate(i)}):e.push({id:d[t],name:`${n.translate(i.title)} (${n.translate(i.action)})`}),e})(e,t,i)),[])}),n})(g,n)),[]),y=(0,s.useRef)(null),b=n.translate(g?"Add web user":"Edit user");return(0,i.jsx)(l.A,Object.assign({className:"web-user",title:b,onApprove:()=>y.current.save(),closable:!1,icon:f.A.USER},r,{children:(0,i.jsx)(x.A,{ref:y,fieldDefinitions:v,onFieldSetting:(e,s,o)=>{"permissions"===e?(s.factory=A.Ay.form.Select,s.template=(e=>A.Ay.form.Form.templates.select.clone({renderSelect:t=>{const n=t.options.filter((({value:e})=>!t.value.includes(p.US.ADMIN)||e===p.US.ADMIN)).map((({value:e,text:n})=>(0,i.jsx)(m.A,{id:`permission-${e}`,checked:t.value.includes(e),onChange:n=>((e,n)=>{t.onChange((0,h.z_)(t.value,e,n))})(e,n),caption:n,name:t.attrs.name},e)));return(0,i.jsxs)("div",{className:"permission-select",children:[(0,i.jsx)(u.A,{description:e.t("adminPermissionNote","Administrator permission is required in order to access the System section in settings"),className:"small"}),n]})}}))(n),s.disabled=!g&&t.username===c.username):"username"===e&&(s.disabled=!g)},onSave:e=>g?a.post(o.A.USERS_URL,e):a.patch(`${o.A.USERS_URL}/${t.id}`,e),sourceValue:t})}))}),{urls:{user:({params:e},t)=>e.userId?t.get(`${o.A.USERS_URL}/${e.userId}`):Promise.resolve(void 0)}}),"users/:userId?");var b=n(71352),I=n(74416);const j=({user:e,moduleT:t})=>{const{formatRelativeTime:n}=(0,I.k)();return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"name dropdown",children:(0,i.jsx)(b.Wy,{caption:(0,i.jsx)("strong",{children:e.username}),actions:a.F5,itemData:e,contextElement:"#setting-scroll-context"})}),(0,i.jsx)("td",{className:"permissions",children:e.permissions.includes(p.US.ADMIN)?t.translate("Administrator"):e.permissions.length}),(0,i.jsx)("td",{className:"sessions",children:e.active_sessions}),(0,i.jsx)("td",{className:"last-login",children:n(e.last_login)})]})};class S extends s.Component{render(){const{users:e,moduleT:t}=this.props,{translate:n}=t;return(0,i.jsxs)("div",{children:[(0,i.jsx)(r.A,{action:a.u2,moduleData:a.O6}),(0,i.jsxs)("table",{className:"ui striped table",children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:n("Username")}),(0,i.jsx)("th",{children:n("Permissions")}),(0,i.jsx)("th",{children:n("Active sessions")}),(0,i.jsx)("th",{children:n("Last logged in")})]})}),(0,i.jsx)("tbody",{children:e.map((e=>(0,i.jsx)(j,{user:e,moduleT:t},e.username)))})]}),(0,i.jsx)(y,{moduleT:t})]})}}S.displayName="WebUsersPage";const T=(0,v.A)(S,{urls:{users:o.A.USERS_URL},onSocketConnected:(e,{refetchData:t})=>{e(o.A.MODULE_URL,o.A.ADDED,(()=>t())),e(o.A.MODULE_URL,o.A.UPDATED,(()=>t())),e(o.A.MODULE_URL,o.A.REMOVED,(()=>t()))}})},81879:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(74848),s=(n(96540),n(20239));const o=["use_main_chat_notify","show_joins","format_release_names"],a=()=>(0,i.jsx)("div",{children:(0,i.jsx)(s.A,{keys:o})})},26295:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(74848),s=(n(96540),n(20239));const o=["report_uploads","report_downloads","report_search_alternates","report_added_sources","report_blocked_share","report_hashed_files","report_scheduled_refreshes","report_filelist_dupes"],a=()=>(0,i.jsx)("div",{children:(0,i.jsx)(s.A,{keys:o})})},92151:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(74848),s=(n(96540),n(20239));const o=["history_search_max","history_download_max","history_chat_log_lines"],a=["history_hub_messages","history_pm_messages","history_log_messages"],r=["history_hub_sessions","history_pm_sessions","history_filelist_sessions"],l=({moduleT:e})=>{const{t}=e;return(0,i.jsxs)("div",{children:[(0,i.jsx)(s.A,{keys:o}),(0,i.jsx)(s.A,{title:t("maxMessageHistory","Maximum number of messages to cache"),keys:a}),(0,i.jsx)(s.A,{title:t("maxSessionHistory","Maximum number of previously opened sessions"),keys:r})]})}},36255:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(74848),s=(n(96540),n(19718)),o=n(56022);const a=[s.xC.UNREAD_LABEL_DELAY,s.xC.BACKGROUND_IMAGE_URL,s.xC.NO_INSTALL_PROMPT],r=({moduleT:e})=>(0,i.jsx)("div",{children:(0,i.jsx)(o.A,{moduleT:e,keys:a})})},49123:(e,t,n)=>{n.d(t,{A:()=>_});var i=n(74848),s=(n(96540),n(19718)),o=n(56022),a=n(85072),r=n.n(a),l=n(97825),c=n.n(l),d=n(77659),A=n.n(d),m=n(55056),u=n.n(m),p=n(10540),h=n.n(p),g=n(41113),x=n.n(g),v=n(49696),C={};C.styleTagTransform=x(),C.setAttributes=u(),C.insert=A().bind(null,"head"),C.domAPI=c(),C.insertStyleElement=h(),r()(v.A,C),v.A&&v.A.locals&&v.A.locals;const f=[s.xC.NOTIFY_MENTION,s.xC.NOTIFY_PM_USER,s.xC.NOTIFY_PM_BOT,s.xC.NOTIFY_HUB_MESSAGE,s.xC.NOTIFY_BUNDLE_STATUS,s.xC.NOTIFY_EVENTS_INFO,s.xC.NOTIFY_EVENTS_WARNING,s.xC.NOTIFY_EVENTS_ERROR],_=({moduleT:e})=>{const{translate:t}=e;return(0,i.jsx)("div",{children:(0,i.jsx)(o.A,{title:t("Popup notifications"),moduleT:e,keys:f})})}},88569:(e,t,n)=>{n.d(t,{H:()=>r,U:()=>a});var i=n(50753),s=n(41110),o=function(e,t,n,i){return new(n||(n=Promise))((function(s,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function r(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,r)}l((i=i.apply(e,t||[])).next())}))};const a=(e,t)=>o(void 0,void 0,void 0,(function*(){try{return(yield(0,s.F)(`${getBasePath()}temp`,{method:"POST",headers:{"X-Authorization":t,Authorization:t},body:e})).headers.get("Location")}catch(e){throw e}})),r=(e,t,n)=>o(void 0,void 0,void 0,(function*(){try{const o=yield(0,s.F)((e=>`${window.location.origin}${getBasePath()}proxy?url=${encodeURIComponent(e)}`)(e),Object.assign({headers:{"X-Authorization":i.A.authToken,"Cache-Control":"no-store, must-revalidate, max-age=0"}},n));return(yield t)?o.json():o.text()}catch(t){throw console.error(`CORS HTTP request failed (${e})`,t),t}}))},19430:(e,t,n)=>{n.d(t,{T:()=>o,v:()=>s});var i=n(86818);const s=(e,{formatSize:t})=>{let n=e.str;return e.id!==i.A.HIDDEN_PROFILE_ID&&(n+=` (${t(e.size)})`),n},o=(e,t)=>({id:e.id,name:s(e,t)})}}]);
|
|
2
|
+
//# sourceMappingURL=settings.ae1be9e0a1c99eed7597.chunk.js.map
|
|
Binary file
|