filecat 7.21.2 → 7.22.0
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/build/dist/122.4dcdda2738126091bb48.js +1 -0
- package/build/dist/1317.4d1617ed6eddfd2960b5.js +1 -0
- package/build/dist/2334.9568f51c698d1e261092.js +1 -0
- package/build/dist/{4924.32129da284e5464bf078.js → 2543.c1df37b86fd6b03c3976.js} +2 -2
- package/build/dist/259.5dbfcbe6ecd5e8ce07ca.js +1 -0
- package/build/dist/2674.983f76fc32b01e807e4d.js +1 -0
- package/build/dist/3355.221b11ae8755cb58412f.js +1 -0
- package/build/dist/{3402.30e70a3fe5d2c355bae5.js → 3402.913056b796b3aa4dfd5f.js} +1 -1
- package/build/dist/4091.4ec37d360601d3f388ee.js +1 -0
- package/build/dist/4564.d7a5595346660e89760b.js +2 -0
- package/build/dist/4564.d7a5595346660e89760b.js.LICENSE.txt +39 -0
- package/build/dist/4598.48aad39fc631a51c30d3.js +1 -0
- package/build/dist/47.423c0f43594850475f8d.js +1 -0
- package/build/dist/5272.16c3f9821799656a93a9.js +1 -0
- package/build/dist/6097.3b8a75477b58137301a6.js +1 -0
- package/build/dist/676.ad9fb1447bfc5b04b30a.js +1 -0
- package/build/dist/7181.031a335fc6a96a548882.js +1 -0
- package/build/dist/7678.b2889b36fac2b90a9061.js +1 -0
- package/build/dist/{8435.5cf0507f0dfbd7576fff.js → 8435.1f63fa3aa621962786b1.js} +1 -1
- package/build/dist/{8765.13b3b3db8cf2edb74526.js → 8765.800f703d3d31566267ab.js} +1 -1
- package/build/dist/9202.acca2abe478020a45f13.js +1 -0
- package/build/dist/9260.2f474cb25f7647cb995a.js +1 -0
- package/build/dist/{9546.cd3b1747ad87bbd7ccc4.js → 9546.2dc17877ae589e21d6d2.js} +1 -1
- package/build/dist/9765.15869054c7b8e56ccc76.js +1 -0
- package/build/dist/991.2ff5a3ada566cb075df6.js +1 -0
- package/build/dist/index.html +1 -1
- package/build/dist/main.19ecdddaf894b36f1a47.js +2 -0
- package/build/main.js +1 -1
- package/package.json +5 -1
- package/build/dist/2334.8944eba9ea6bea2c873b.js +0 -1
- package/build/dist/2543.a6ee7f78b6f447ccae9f.js +0 -1
- package/build/dist/259.ed90168189edc15b3ea6.js +0 -1
- package/build/dist/2674.26ef7b92f7a50dde4275.js +0 -1
- package/build/dist/3355.70ffd73778049aa73d5c.js +0 -1
- package/build/dist/3528.f4bf3684610c3ce28c08.js +0 -1
- package/build/dist/4091.bbca4ee92e5d078ee770.js +0 -1
- package/build/dist/4598.6528d76c619352e7e1f3.js +0 -1
- package/build/dist/47.0ad0f7d1c95e6691b317.js +0 -1
- package/build/dist/5272.124204f2cb80d69e8561.js +0 -1
- package/build/dist/5877.afb89fcd6cbae1ab8e39.js +0 -1
- package/build/dist/6097.98ee6ec678fafcc2c2ba.js +0 -1
- package/build/dist/676.4671c5b267b93fd2112d.js +0 -1
- package/build/dist/7181.2403d6d75f9d4ea6917d.js +0 -1
- package/build/dist/7678.5769d70f52981f9434d1.js +0 -1
- package/build/dist/8358.1d1c09cc6b9185e388a2.js +0 -1
- package/build/dist/9260.72cae497ae765cc00d54.js +0 -1
- package/build/dist/9765.2f0daa101ea2bc02379a.js +0 -1
- package/build/dist/main.f512bdab9a0595432be0.js +0 -2
- /package/build/dist/{4924.32129da284e5464bf078.js.LICENSE.txt → 2543.c1df37b86fd6b03c3976.js.LICENSE.txt} +0 -0
- /package/build/dist/{main.f512bdab9a0595432be0.js.LICENSE.txt → main.19ecdddaf894b36f1a47.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[259],{8694(e,t,a){a.d(t,{$K:()=>o,RB:()=>i,l5:()=>l,vo:()=>s,vr:()=>r});let n=function(e){return e[e.tcp=0]="tcp",e[e.udp=1]="udp",e}({});class o{open=!1;port;key="";async_ips=[]}class s{client_num_id;client_name;open=!1;ip;mask;serverIp;serverPort;key="";model=n.udp}let i=function(e){return e[e.row=1]="row",e[e.json=2]="json",e[e.form=3]="form",e}({});class r{body_type;header_type;url;method;headers;data;form_data_list;local_download_path}class l{enabled;ip;port;bypass;useForLocal;type}},75007(e,t,a){a.d(t,{h:()=>s});a(96540);var n=a(85997),o=a(74848);function s(e){return(0,o.jsxs)("h2",{className:"message",children:[(0,o.jsx)(n.In,{icon:"sentiment_dissatisfied"}),(0,o.jsx)("span",{children:e.context})]})}},47374(e,t,a){a.d(t,{e:()=>u});var n=a(96540),o=a(52671),s=a(64694),i=a(34289),r=a(61443),l=a(75725),d=a(22022),c=a(85997),p=a(74848);function u(e){let t=(0,o.zy)();const[a,u]=(0,n.useState)([]),[h,m]=(0,n.useState)("/"),[f,y]=(0,n.useState)(void 0),{t:_,i18n:x}=(0,d.Bd)();n.useEffect(()=>{let t="",a=(0,i.vX)().split("/");a=a.filter(e=>e);const n=a.indexOf(e.baseRoute),o=[];if(-1!=n){t=(0,s.IO)(a.slice(0,n),e.baseRoute);const i=a.slice(n+1);for(let e=0;e<i.length;e++){const a=i[e];o.push({value:a,href:0===e?`${t}${a}/`:(0,s.IO)(o[e-1].href,a)})}m(t),u(o)}},[t]);const v=t=>{t.stopPropagation(),e.clickFun(t)};return(0,p.jsx)("div",{className:"breadcrumbs",onClick:e=>{y(void 0!==f?void 0:"")},children:(0,p.jsx)(n.Fragment,{children:void 0===f?(0,p.jsxs)(n.Fragment,{children:[(0,p.jsx)("span",{className:"chevron",children:(0,p.jsx)(o.N_,{to:h,onClick:v,children:(0,p.jsx)(c.In,{icon:"home"})})}),a.map((e,t)=>(0,p.jsxs)("span",{className:"chevron",children:[(0,p.jsx)(c.In,{icon:"keyboard_arrow_right"}),(0,p.jsx)(o.N_,{to:e.href,onClick:v,children:decodeURIComponent(e.value)})]},t))]}):(0,p.jsx)(l.QM,{click:()=>{y(void 0)},children:(0,p.jsx)(r.Sm,{width:"100%",placeholder:_("输入跳转的目录"),handlerEnter:t=>{e.input_path_enter&&e.input_path_enter(t),y(void 0)}})})})})}},77481(e,t,a){a.d(t,{S:()=>r,X:()=>i});var n=a(96540),o=a(61443),s=a(74848);function i(e){const[t,a]=n.useState([]),i=(0,n.useRef)(-1),[r,l]=(0,n.useState)(-1),[d,c]=(0,n.useState)(-1);(0,n.useEffect)(()=>{e.children?a(Array.isArray(e.children)?e.children:[e.children]):a(e.rows)},[e.rows,e.children]);const p=()=>{i.current=-1,l(-1),c(-1)};return(0,s.jsxs)("table",{children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:e.headers?.map((t,a)=>{const n=!!e.filter&&(e.filter.column??0)===a;let i=t;if(n){const a=e.filter,n=a.options.find(e=>e.value===a.value);null!=a.value&&n&&(i=`${t} (${n.label})`)}return(0,s.jsx)("th",{className:n?"table-filter-col":"",children:n?(0,s.jsx)(o.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:i}):t},a)})})}),(0,s.jsx)("tbody",{children:t.map((t,a)=>{const n=!!e.onRowDrag;return(0,s.jsx)("tr",{className:n?(r===a?"row-dragging":"")+(d===a?" row-drop-target":""):"",draggable:n,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{n&&(i.current=a,l(a),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!n||i.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",c(a))},onDrop:t=>{n&&(t.preventDefault(),(()=>{const t=i.current,a=d;p(),t<0||a<0||t===a||e.onRowDrag?.(t,a)})())},onDragEnd:p,children:t.map((a,n)=>{const o=n===t.length-1?"small":"";return(0,s.jsx)("td",{className:o,style:{width:e.width??"auto"},children:a},n)})},a)})})]})}function r(e){return(0,s.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,s.jsx)("div",{children:e},t))})}},83029(e,t,a){a.d(t,{N:()=>x});var n=a(96540),o=a(34843),s=a(82893),i=a(74848);function r(e){const[t,a]=(0,o.fp)(s.AG.user_base_info);return(0,i.jsx)("div",{children:e.div?(0,i.jsx)("div",{className:"nav_list_a",style:{background:e.color},children:e.name}):e.clickItem||"dir"===e._type?(0,i.jsx)("div",{className:"nav_list_a",style:{background:e.color},onClick:()=>{"dir"!==e._type?e.clickItem&&e.clickItem(e):e.click_dir(e.item)},children:e.name}):(0,i.jsx)("a",{href:e.url,target:e.target,className:"nav_list_a",style:{background:e.color},children:e.name})})}var l=a(64694),d=a(61443),c=a(85997),p=a(52671),u=a(22022);const h=["#ffffff","#fefff8","#fcfdf1","#d3d2dc","#f8f9fd","#ebf4fe","#ebebeb","#e8f7eb","#eaf2f9"];let m,f,y=[];const _=[];function x(e){const[t,a]=(0,n.useState)([]),[x,v]=(0,n.useState)(-1),w=(0,p.zy)(),[g,j]=(0,n.useState)(!1),[k,b]=(0,n.useState)(!1),{t:N}=(0,u.Bd)(),[K,S]=(0,n.useState)([]),[C,A]=(0,o.fp)(s.AG.nav_index_add_item_by_now_list),F=e=>{-1!==x?_[x]._children=e:y=e};(0,n.useEffect)(()=>{(async()=>{if(!e.getItems)return;const t=await e.getItems();y=t,a(y)})()},[w]);(0,n.useEffect)(()=>{if(C){const e=[...t,{name:"",color:(0,l.Lr)(h),...C}];F(e),a(e),j(!0),A(void 0)}},[C]);const D=e=>{v(x+1),a(e._children),_.push(e)};return(0,i.jsxs)("div",{className:"nav_list_div scroll-div-y",children:[-1!==x&&(0,i.jsx)(c.rA,{title:"返回",icon:"arrow_back",onClick:()=>{a(0===x?y:_[x-1]._children),v(x-1),_.pop()}}),t.map((o,s)=>(0,i.jsxs)("div",{draggable:!0,onDragOver:e=>{e.preventDefault()},onDragStart:e=>((e,t)=>{m=t})(0,s),onDrop:e=>((e,n)=>{e.preventDefault();const o=t[m],s=t[n];if(s&&"dir"===s._type){const e=[...t];return e.splice(m,1),s._children||(s._children=[]),s._children.push(o),F(e),void a(e)}const i=[...t],r=i[m];i.splice(m,1),i.splice(n,0,r),F(i),a(i)})(e,s),style:{cursor:g?"move":"pointer"},children:[(0,i.jsx)(r,{name:o.name,item:o,...o,div:g,target:"_blank",click_dir:D,clickItem:e.clickItem}),g&&(void 0!==K.find(e=>e===s)||k)&&(0,i.jsxs)("div",{className:k?"":" site_edit ",children:["dir"===o._type?(0,i.jsxs)(n.Fragment,{children:[(0,i.jsx)(d.Sm,{value:o.name,handleInputChange:e=>{o.name=e},placeholder:N("输入类目名"),no_border:!0}),(0,i.jsx)(d.Sm,{value:o.color,type:"color",handleInputChange:e=>{o.color=e},placeholder:"color",no_border:!0})]}):e.items.map((e,t)=>(0,i.jsx)("div",{children:(0,i.jsx)(d.Sm,{value:o[e.key],type:"color"===e.key?"color":void 0,handleInputChange:t=>{o[e.key]=t},placeholder:e.preName,no_border:!0})},t)),!k&&(0,i.jsx)(c.C3,{text:N("折叠"),clickFun:()=>{S((0,l.P1)(K,s))}})]}),g&&(0,i.jsx)("div",{style:{display:"block"},children:(0,i.jsxs)("span",{className:"div-row ",children:[(0,i.jsx)(c.C3,{text:N("删除"),clickFun:()=>{(e=>{const n=[...t];n.splice(e,1),F(n),a(n)})(s)}}),(0,i.jsx)(c.C3,{text:N("编辑"),clickFun:()=>{void 0===K.find(e=>e===s)&&S([...K,s])}})]})})]},s)),g&&(0,i.jsxs)("div",{style:{display:"block"},children:[(0,i.jsx)(c.rA,{title:N("取消"),icon:"cancel",onClick:()=>{S([]),j(!1),f&&(a(f),F(f)),b(!1)}}),(0,i.jsx)(c.rA,{title:N("添加"),icon:"add",onClick:async()=>{const n=[...t,{name:"",color:(0,l.Lr)(h),...e.get_pre_add_item&&await e.get_pre_add_item()}];F(n),a(n)}}),(0,i.jsx)(c.rA,{title:N("添加类目"),icon:"add_box",onClick:()=>{const e=[...t,{name:"",_type:"dir",_children:[],color:"#c1edfb"}];F(e),a(e)}}),(0,i.jsx)(c.rA,{title:N("全部编辑"),icon:k?"unfold_less":"unfold_more",onClick:()=>{b(!k)}})]}),(void 0===e.have_auth_edit||!0===e.have_auth_edit)&&(0,i.jsx)(c.rA,{icon:g?"save":"edit",title:N(g?"保存":"编辑"),onClick:async()=>{g?e.save&&await e.save(y):f=t,j(!g)}})]})}},259(e,t,a){a.r(t),a.d(t,{default:()=>_e});var n=a(96540),o=a(70447),s=a(75725),i=a(61443),r=a(22022),l=a(34843),d=a(82893),c=a(85997),p=a(77481),u=a(14284),h=a(62042),m=a(40505),f=a(45907),y=a(23496),_=a(53459),x=a(78247),v=a(23430),w=a(74848);function g(){const{t:e}=(0,r.Bd)(),t=(0,f.y)(),{check_user_auth:a}=(0,x.MH)(),g=a(v.oV.browser_proxy_edit),[,j]=(0,l.fp)(d.AG.prompt_card),[k,b]=(0,n.useState)([]),[N,K]=(0,n.useState)(!1),[S,C]=(0,n.useState)(!1),[A,F]=(0,n.useState)(""),[D,L]=(0,n.useState)(""),[M,I]=(0,n.useState)(""),B=[e("状态"),e("备注"),e("目标"),e("端口"),e("访问地址"),e("操作")],P=async()=>{try{const e=await u.s2.get(y.s.browser_proxy_port_list);e.code===_.m.Success&&b(Array.isArray(e.data)?e.data:[])}catch(e){}};(0,n.useEffect)(()=>{P()},[]);const R=e=>{F(e?.id??""),L(e?`${e.proto}://${e.host}${e.root_path&&"/"!==e.root_path?e.root_path:""}`:""),I(e?.note??"")},E=()=>{K(!1),C(!1),R(void 0)},$=e=>`http://${window.location.hostname||"127.0.0.1"}:${e.port}/`,G=e=>{const t=localStorage.getItem("token")||"";return`${$(e)}${t?`?_t=${encodeURIComponent(t)}`:""}`};return(0,w.jsxs)(s.fI,{children:[(0,w.jsx)(s.VP,{widthPer:g?55:100,maxWidth:g?"90rem":void 0,children:(0,w.jsx)(s.xh,{children:(0,w.jsx)(o.uF,{self_title:(0,w.jsxs)("span",{className:" div-row ",children:[(0,w.jsx)("h2",{children:e("网页代理目标")}),(0,w.jsx)(c.rA,{icon:"info",title:e("信息"),onClick:()=>{j({open:!0,title:e("信息"),context_div:(0,w.jsx)("div",{children:(0,w.jsxs)("ul",{children:[(0,w.jsx)("li",{children:e("wbvpn_port_tip")}),(0,w.jsx)("li",{children:e("wbvpn_port_tip2")}),(0,w.jsx)("li",{children:e("wbvpn_port_tip3")})]})})})}})]}),rightTopCom:(0,w.jsx)("div",{children:g&&!S&&(0,w.jsx)(c.rA,{icon:"add",title:e("添加"),onClick:()=>{K(!0),C(!0),R(void 0)}})}),children:(0,w.jsx)(p.X,{headers:B,rows:k.map(a=>{const n=[(0,w.jsx)(c.Ay,{checked:!1!==a.enabled,disabled:!g,title:e("启用"),onChange:t=>(async(t,a)=>{try{await u.s2.post(y.s.browser_proxy_port_set_enabled,{id:t.id,enabled:a}),(0,h.SK)(e(a?"已启用":"已禁用")),await P()}catch(e){}})(a,t)}),(0,w.jsx)(o.xP,{children:a.note||"-"}),(0,w.jsx)(o.xP,{children:`${a.proto}://${a.host}`}),(0,w.jsx)(o.xP,{children:String(a.port)}),(0,w.jsx)(o.xP,{children:$(a)}),(0,w.jsxs)("div",{children:[(0,w.jsx)(c.rA,{icon:"open_in_new",title:e("新窗口打开"),onClick:()=>(e=>{window.open(G(e),"_blank","noopener,noreferrer")})(a)}),(0,w.jsx)(c.rA,{icon:"tab",title:e("当前窗口打开"),onClick:()=>(e=>{window.location.href=G(e)})(a)}),(0,w.jsx)(c.rA,{icon:"content_copy",title:e("复制"),onClick:()=>(async t=>{const a=$(t);(0,m.lW)(a)?(0,h.SK)(e("已复制")):(0,h.zN)(e("复制失败"))})(a)}),g&&(0,w.jsx)(c.rA,{icon:"edit",title:e("编辑"),onClick:()=>(e=>{K(!1),C(!0),R(e)})(a)}),g&&(0,w.jsx)(c.rA,{icon:"delete",title:e("删除"),onClick:()=>(a=>{t({title:e("确认删除"),sub_title:a.host,confirm_fun:async()=>{try{await u.s2.post(y.s.browser_proxy_port_remove,{id:a.id}),(0,h.SK)(e("已删除")),await P()}catch(e){}}})})(a)})]})];return n}),width:"10rem"})})})}),g&&S&&(0,w.jsx)(s.VP,{widthPer:45,maxWidth:"40rem",children:(0,w.jsx)(s.xh,{children:(0,w.jsxs)(o.Zp,{self_title:(0,w.jsx)("span",{className:" div-row ",children:(0,w.jsx)("h2",{children:e(""+(N?"添加":"编辑"))})}),rightBottomCom:(0,w.jsxs)("div",{children:[(0,w.jsx)(c.rA,{icon:"cancel",title:e("取消"),onClick:E}),(0,w.jsx)(c.rA,{icon:N?"add_circle":"save",title:e(N?"添加":"保存"),onClick:async()=>{if(D.trim())try{N?(await u.s2.post(y.s.browser_proxy_port_add,{address:D.trim(),note:M}),(0,h.SK)(e("添加成功"))):(await u.s2.post(y.s.browser_proxy_port_update,{id:A,address:D.trim(),note:M}),(0,h.SK)(e("修改成功"))),E(),await P()}catch(e){}else(0,h.zN)(e("目标地址不能为空"))}})]}),children:[(0,w.jsx)("label",{children:e("目标地址")}),(0,w.jsx)(i.Sm,{value:D,placeholder:e("目标地址例如"),handleInputChange:e=>L(e)}),(0,w.jsx)("label",{children:e("备注")}),(0,w.jsx)(i.Sm,{value:M,handleInputChange:e=>I(e)})]})})})]})}function j(e){return(0,w.jsx)(g,{})}var k=a(34289),b=a(4412),N=(a(75007),a(83029)),K=a(97856),S=a(92275),C=a(14944),A=a(64405);const F=n.lazy(()=>Promise.all([a.e(4924),a.e(5614)]).then(a.bind(a,85614)));function D(e){const[t,a]=(0,n.useState)(null),[o,s]=(0,l.fp)(d.AG.remoteShellShow),[i,r]=(0,n.useState)(!1),[c,p]=(0,l.fp)(d.AG.sshInfo),[u,h]=(0,l.fp)(d.AG.shellNowDir),[m,f]=(0,l.fp)(d.AG.user_base_info),y=m.user_data.theme?.includes("dark")?"#FFFFFF":"#000000",_=()=>{(async()=>{t&&(t.dispose(),a(null))})()};(0,n.useEffect)(()=>()=>{_()},[]),(0,n.useEffect)(()=>{o.show?t||((async()=>{const e=new K.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:y,cursor:y,selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4});let t;const n=t=>{e.write(t)};t=a=>{e.clear(),e.write(a),t=n},C.ws.addMsg(S.HK.remote_shell_getting,e=>{t(e.context)}),e.onData(async e=>{const t=new A.x;t.key=c.key,t.cmd=e;const a=new S.hf(S.HK.remote_shell_send);a.context=t,await C.ws.send(a)}),a(e)})(),r(!0)):_()},[o]);return(0,w.jsx)(F,{show:o.show,terminal:t,init:(e,a)=>{t.writeln("[38;2;29;153;243mopen shell...[0m ");const n=new S.hf(S.HK.remote_shell_open),s=new A.x;s.key=c.key,s.init_path=o.path,s.rows=e,s.cols=a,n.context=s,C.ws.send(n)}})}var L=a(47374),M=a(52671),I=a(99214),B=a(47022),P=a(88815),R=a(6960),E=a(79240),$=a(89824),G=a(12730);function O(e){const{t}=(0,r.Bd)();(0,M.zy)();(0,M.Zp)();const{check_user_auth:a}=(0,x.MH)(),[o,s]=(0,l.fp)(d.AG.nowFileList),[i,p]=(0,l.fp)(d.AG.uploadFiles),[u,m]=(0,l.fp)(d.AG.showPrompt),[f,y]=(0,l.fp)(d.AG.selectedFileList),[_,v]=(0,l.fp)(d.AG.enterKey),[g,j]=(0,l.fp)(d.AG.copyedFileList),[b,N]=(0,l.fp)(d.AG.cutedFileList),[K,S]=(0,l.fp)(d.AG.selectedFileList),[C,A]=(0,l.fp)(d.AG.clickFileList),[F,D]=(0,l.fp)(d.AG.remoteShellShow),[L,P]=(0,l.fp)(d.AG.sshInfo),R=(0,I.Vs)();function E(e){(0,h.SK)(e)}return(0,w.jsxs)(n.Fragment,{children:[f.length>0&&(0,w.jsx)(c.rA,{icon:"delete",title:t("删除"),onClick:()=>{m({show:!0,type:$.PromptEnum.SshDelete,overlay:!0,data:{}})}}),f.length>0&&(0,w.jsx)(c.rA,{icon:"content_copy",title:t("复制"),onClick:function(){const e=(0,I.ib)(o,f);j(e.map(e=>`/${(0,k.GG)("remoteShell",(0,k.vX)())}${e.name}`)),N([]),E("已复制")}}),f.length>0&&(0,w.jsx)(c.rA,{icon:"content_cut",title:t("剪切"),onClick:function(){const e=(0,I.ib)(o,f);N(e.map(e=>`/${(0,k.GG)("remoteShell",(0,k.vX)())}${e.name}`)),j([]),E("已剪切")}}),(g.length>0||b.length>0)&&(0,w.jsx)(c.rA,{onClick:function(){m({show:!0,type:$.PromptEnum.SshPaste,overlay:!0,data:{}})},icon:"content_paste",title:t("粘贴到此处"),tip:g.length+b.length}),1===f.length&&o.files.length>=1&&(0,I.ib)(o,f)[0].type!==B.Iw.folder&&(0,w.jsx)(c.rA,{icon:"download",title:t("下载"),onClick:function(){const e=(0,I.ib)(o,f),t=`/api/ssh/download?file=${`/${(0,k.GG)("remoteShell",(0,k.vX)())}${decodeURIComponent(e[0].name)}`}&key=${L.key}&token=${localStorage.getItem("token")}`;window.open(t)}}),1===f.length&&(0,w.jsx)(c.rA,{icon:"edit_attributes",title:t("重命名"),onClick:function(){m({show:!0,type:$.PromptEnum.SshReName,overlay:!0,data:{}})}}),(0,w.jsx)(c.rA,{icon:"terminal",title:"shell",onClick:function(){F.show?D({show:!1,path:""}):D({show:!0,path:`/${(0,k.GG)("remoteShell",(0,k.vX)())}`})}}),(0,w.jsx)(c.rA,{icon:"grid_view",title:t("切换样式"),onClick:R}),(0,w.jsx)(c.rA,{icon:"create_new_folder",title:t("创建文件夹"),onClick:function(){m({show:!0,type:$.PromptEnum.SshNewDir,overlay:!0,data:{}})}}),(0,w.jsx)(c.rA,{icon:"note_add",title:t("创建文本文件"),onClick:function(){m({show:!0,type:$.PromptEnum.SshNewFile,overlay:!0,data:{}})}}),(0,w.jsx)(c.rA,{icon:"upload_file",title:"上传",onClick:()=>{m({show:!0,type:$.PromptEnum.UploadFile,overlay:!0,data:{call:e=>{let t=e.currentTarget?.files;if(!t)return;let a=!!t[0].webkitRelativePath;const n=[],o=new Set;for(let e=0;e<t.length;e++){const s=t[e],i=a?s.webkitRelativePath:`${s.webkitRelativePath}${s.name}`;s.fullPath=i,a&&o.add((0,G.S)(i)),n.push(s)}const s=[];if(a)for(const e of Array.from(o))s.push({isDir:!0,fullPath:e,name:e});s.push(...n),p(s),m({show:!0,type:$.PromptEnum.SshUpload,overlay:!1,data:{}})}}})}}),(0,w.jsx)(c.rA,{icon:"close",title:t("关闭"),onClick:()=>{e.close()}})]})}var H=a(60096),T=a(21499);let z;function U(e){const{t}=(0,r.Bd)(),a=(0,M.zy)(),[o,s]=(0,l.fp)(d.AG.nowFileList),[c,p]=(0,l.fp)(d.AG.selectedFileList),[m,f]=(0,l.fp)(d.AG.clickFileList),[y,x]=(0,l.fp)(d.AG.sshInfo),[g,j]=(0,n.useState)(""),N=(0,M.Zp)(),[K,S]=(0,l.fp)(d.AG.user_base_info),C=async e=>{const a=new A.x;a.key=y.key,a.dir=e||`/${(0,k.GG)("remoteShell",(0,k.vX)())}`;const n=await u.Fg.post("get/dir",a);if(n.code!==_.m.Success)return void(0,h.zN)(t("连接失败"));const{folders:o,files:i}=n.data||{};for(const e of i??[])e.origin_size=e.size,e.size=(0,P.v7)(e.size),K.user_data.file_time_show_type===v.KD.time?e.show_mtime=e.mtime?(0,T.Yq)(e.mtime):"":e.show_mtime=e.mtime?(0,R.s)(e.mtime):"";for(const e of o??[])K.user_data.file_time_show_type===v.KD.time?e.show_mtime=e.mtime?(0,T.Yq)(e.mtime):"":e.show_mtime=e.mtime?(0,R.s)(e.mtime):"";const r={folders:o||[],files:i||[]};(0,I.yC)(r,K.user_data.dir_show_type),s(r),z=r};function F(){p([]),f([])}(0,n.useEffect)(()=>{F(),(async()=>{await C()})()},[a]);return(0,w.jsxs)(n.Fragment,{children:[(0,w.jsx)(b.aZ,{children:(0,w.jsx)(i.$Z,{handleEnterPress:()=>{if(!z)return;p([]),f([]);const e=[],t=[];for(const t of z.files??[])t.name.includes(g)&&e.push(t);for(const e of z.folders??[])e.name.includes(g)&&t.push(e);s({files:e,folders:t})},placeholder:t("搜索当前目录"),icon:"search",value:"",handleInputChange:e=>{j(e)},max_width:"25em"})}),(0,w.jsx)(b.aZ,{position:"right",children:(0,w.jsx)(O,{close:e.close})}),(0,w.jsx)(L.e,{baseRoute:"remoteShell",clickFun:F,input_path_enter:e=>{(0,E.Z1)(e)?C(e):N((0,E.Jn)((0,k.vX)(),e)),p([]),f([]),s({files:[],folders:[]})}}),(0,w.jsx)(H.Ic,{handleContextMenu:()=>{},clickBlank:e=>{e.target===e.currentTarget&&p([])},file_list:o.files,folder_list:o.folders,fileHandler:C}),(0,w.jsx)(D,{})]})}function V(e){const{t}=(0,r.Bd)(),a=(0,M.Zp)(),[o,s]=(0,n.useState)(""),[p,m]=(0,n.useState)(""),[f,y]=(0,n.useState)(""),[g,j]=(0,n.useState)(""),[k,K]=(0,n.useState)(void 0),[S,C]=(0,n.useState)(""),[F,D]=(0,l.fp)(d.AG.shellNowDir),[L,I]=(0,l.fp)(d.AG.sshInfo),{check_user_auth:B}=(0,x.MH)(),P=async e=>{const t=new A.x;if(t.password=e?e.password:p,t.domain=e?e.domain:g,t.port=e?e.port:k,t.username=e?e.username:o,t.private_path=e?e.private_path:f,t.dir=e?e.dir:S,!t.dir)return void(0,h.zN)("dir not found");if(!t.username)return void(0,h.zN)("username not found");if(!t.domain)return void(0,h.zN)("domain not found");if(!t.port)return void(0,h.zN)("port not found");if(!t.private_path&&!t.password)return void(0,h.zN)("private_path password not found");const n=await u.Fg.post("start",t);n&&n.code===_.m.Success&&(a((0,E.Jn)("/proxy/remoteShell",t.dir)),D([t.dir]),I(n.data))};return(0,w.jsxs)(n.Fragment,{children:[!L.key&&(0,w.jsxs)(b.aZ,{position:"right",children:[(0,w.jsx)(i.$Z,{placeholder:t("目录"),icon:"home",value:S,handleInputChange:e=>C(e),max_width:"15rem"}),(0,w.jsx)(i.$Z,{placeholder:t("账号"),icon:"verified_user",value:o,handleInputChange:e=>s(e),max_width:"15rem"}),(0,w.jsx)(i.$Z,{type:"password",placeholder:t("密码"),icon:"password",value:p,handleInputChange:e=>m(e),max_width:"15rem"}),(0,w.jsx)(i.$Z,{placeholder:t("私钥路径"),icon:"private_connectivity",value:f,handleInputChange:e=>y(e),max_width:"15rem"}),(0,w.jsx)(i.$Z,{placeholder:t("连接地址"),icon:"location_on",value:g,handleInputChange:e=>{j(e)},max_width:"15rem"}),(0,w.jsx)(i.$Z,{placeholder:t("端口"),icon:"outlet",value:k,handleInputChange:e=>{if(!e)return;/^\d+$/.test(e)||(0,h.zN)(t("不是数字")),K(parseInt(e))},max_width:"7rem"}),(0,w.jsx)(c.rA,{icon:"play_arrow",title:t("连接"),onClick:()=>{P()}})]}),L.key?(0,w.jsx)(U,{close:async()=>{const e=new A.x;e.key=L.key;await u.Fg.post("close",e);I({})},data:{port:k,password:p,username:o,domain:g,dir:S}}):(0,w.jsx)(N.N,{have_auth_edit:B(v.oV.ssh_proxy_tag_update),getItems:async()=>{const e=await u.Fg.get("tag");return e.code===_.m.Success?e.data:[]},save:async e=>{await u.Fg.post("tag/save",e)},clickItem:async e=>{j(e.domain),C(e.dir),K(e.port),s(e.username),m(e.password),y(e.private_path),await P(e)},items:[{key:"name",preName:t("名字")},{key:"domain",preName:t("地址")},{key:"port",preName:t("端口")},{key:"username",preName:t("账号")},{key:"password",preName:t("密码")},{key:"private_path",preName:t("私钥路径")},{key:"dir",preName:t("访问目录")},{key:"color",preName:"color"}]})]})}function Z(e){switch(e){case 0:return 1;case 2:return 2;default:return 0}}class J{constructor(e){this.canvas=e,this.render=new ee.Canvas.create(this.canvas),this.activeSession=!1,this.install()}close(){this.activeSession=!1}install(){var e=this;return this.canvas.addEventListener("mousemove",function(t){var a=ee.elementOffset(e.canvas);return C.ws.sendData(S.HK.mouse,{x:t.clientX-a.left,y:t.clientY-a.top,button:0,isPressed:!1}),t.preventDefault||e.activeSession(),!1}),this.canvas.addEventListener("mousedown",function(t){var a=ee.elementOffset(e.canvas);return C.ws.sendData(S.HK.mouse,{x:t.clientX-a.left,y:t.clientY-a.top,button:Z(t.button),isPressed:!0}),t.preventDefault(),!1}),this.canvas.addEventListener("mouseup",function(t){if(e.activeSession){var a=ee.elementOffset(e.canvas);return C.ws.sendData(S.HK.mouse,{x:t.clientX-a.left,y:t.clientY-a.top,button:Z(t.button),isPressed:!1}),t.preventDefault(),!1}}),this.canvas.addEventListener("contextmenu",function(t){if(e.activeSession){var a=ee.elementOffset(e.canvas);return C.ws.sendData(S.HK.mouse,{x:t.clientX-a.left,y:t.clientY-a.top,button:Z(t.button),isPressed:!1}),t.preventDefault(),!1}}),this.canvas.addEventListener("DOMMouseScroll",function(t){if(e.activeSession){var a=t.detail,n=Math.round(15*Math.abs(a)/8),o=ee.elementOffset(e.canvas);return C.ws.sendData(S.HK.wheel,{x:t.clientX-o.left,y:t.clientY-o.top,step:n,isNegative:a>0,isHorizontal:!1}),t.preventDefault(),!1}}),this.canvas.addEventListener("mousewheel",function(t){if(e.activeSession){var a=Math.abs(t.deltaX)>Math.abs(t.deltaY),n=a?t.deltaX:t.deltaY,o=Math.round(15*Math.abs(n)/8),s=ee.elementOffset(e.canvas);return C.ws.sendData(S.HK.wheel,{x:t.clientX-s.left,y:t.clientY-s.top,step:o,isNegative:n>0,isHorizontal:a}),t.preventDefault(),!1}}),window.addEventListener("keydown",function(t){if(e.activeSession)return C.ws.sendData(S.HK.scancode,{code:ee.scancode(t),isPressed:!0}),t.preventDefault(),!1}),window.addEventListener("keyup",function(t){if(e.activeSession)return C.ws.sendData(S.HK.scancode,{code:ee.scancode(t),isPressed:!1}),t.preventDefault(),!1}),this}connect(e,t,a,n,o,s){var i=this;C.ws.addMsg(S.HK.rdp_connect,e=>{console.log("[mstsc.js] connected"),i.activeSession=!0}),C.ws.addMsg(S.HK.rdp_bitmap,e=>{const t=e.context;t.data=e.bin_context,i.render.update(t)}),C.ws.addMsg(S.HK.rdp_close,e=>{s(null),console.log("[mstsc.js] close"),i.activeSession=!1}),C.ws.addMsg(S.HK.rdp_error,e=>{i.activeSession=!1});const r=new S.hf;r.cmdType=S.HK.infos,r.context={ip:e.indexOf(":")>-1?e.split(":")[0]:e,port:a,screen:{width:this.canvas.width,height:this.canvas.height},domain:t,username:n,password:o,locale:ee.locale()},C.ws.send(r)}}class X{constructor(e){this.canvas=e,this.ctx=e.getContext("2d")}update(e){var t=null;t=e.isCompress?function(e){var t=null;switch(e.bitsPerPixel){case 15:t="bitmap_decompress_15";break;case 16:t="bitmap_decompress_16";break;case 24:t="bitmap_decompress_24";break;case 32:t="bitmap_decompress_32";break;default:throw"invalid bitmap data format"}var a=new Uint8Array(e.data),n=Module._malloc(a.length),o=new Uint8Array(Module.HEAPU8.buffer,n,a.length);o.set(a);var s=e.destRight-e.destLeft+1,i=e.destBottom-e.destTop+1,r=s*i*4,l=Module._malloc(r),d=new Uint8Array(Module.HEAPU8.buffer,l,r),c=(Module.ccall(t,"number",["number","number","number","number","number","number","number","number"],[d.byteOffset,s,i,e.width,e.height,o.byteOffset,a.length]),new Uint8ClampedArray(d.buffer,d.byteOffset,r));return Module._free(n),Module._free(l),{width:s,height:i,data:c}}(e):function(e){return{width:e.width,height:e.height,data:new Uint8ClampedArray(e.data)}}(e);var a=this.ctx.createImageData(t.width,t.height);a.data.set(t.data),this.ctx.putImageData(a,e.destLeft,e.destTop)}}var Y={"":0,Escape:1,Digit1:2,Digit2:3,Digit3:4,Digit4:5,Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Digit0:11,Minus:12,Equal:13,Backspace:14,Tab:15,KeyQ:16,KeyW:17,KeyE:18,KeyR:19,KeyT:20,KeyY:21,KeyU:22,KeyI:23,KeyO:24,KeyP:25,BracketLeft:26,BracketRight:27,Enter:28,ControlLeft:29,KeyA:30,KeyS:31,KeyD:32,KeyF:33,KeyG:34,KeyH:35,KeyJ:36,KeyK:37,KeyL:38,Semicolon:39,Quote:40,Backquote:41,ShiftLeft:42,Backslash:43,KeyZ:44,KeyX:45,KeyC:46,KeyV:47,KeyB:48,KeyN:49,KeyM:50,Comma:51,Period:52,Slash:53,ShiftRight:54,NumpadMultiply:55,AltLeft:56,Space:57,CapsLock:58,F1:59,F2:60,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,F10:68,Pause:69,ScrollLock:70,Numpad7:71,Numpad8:72,Numpad9:73,NumpadSubtract:74,Numpad4:75,Numpad5:76,Numpad6:77,NumpadAdd:78,Numpad1:79,Numpad2:80,Numpad3:81,Numpad0:82,NumpadDecimal:83,PrintScreen:84,IntlBackslash:86,F11:87,F12:88,NumpadEqual:89,F13:100,F14:101,F15:102,F16:103,F17:104,F18:105,F19:106,F20:107,F21:108,F22:109,F23:110,KanaMode:112,Lang2:113,Lang1:114,IntlRo:115,F24:118,Convert:121,NonConvert:123,IntlYen:125,NumpadComma:126,MediaTrackPrevious:57360,MediaTrackNext:57369,NumpadEnter:57372,ControlRight:57373,VolumeMute:57376,LaunchApp2:57377,MediaPlayPause:57378,MediaStop:57380,VolumeDown:57390,VolumeUp:57392,BrowserHome:57394,NumpadDivide:57397,PrintScreen:57399,AltRight:57400,NumLock:57413,Pause:57414,Home:57415,ArrowUp:57416,PageUp:57417,ArrowLeft:57419,ArrowRight:57421,End:57423,ArrowDown:57424,PageDown:57425,Insert:57426,Delete:57427,OSLeft:57435,OSRight:57436,ContextMenu:57437,Power:57438,BrowserSearch:57445,BrowserFavorites:57446,BrowserRefresh:57447,BrowserStop:57448,BrowserForward:57449,BrowserBack:57450,LaunchApp1:57451,LaunchMail:57452,MediaSelect:57453},W={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",192:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",173:"Minus",61:"Equal",8:"Backspace",9:"Tab",81:"KeyQ",87:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",219:"BracketLeft",221:"BracketRight",13:"Enter",20:"CapsLock",65:"KeyA",83:"KeyS",68:"KeyD",70:"KeyF",71:"KeyG",72:"KeyH",74:"KeyJ",75:"KeyK",76:"KeyL",59:"Semicolon",222:"Quote",220:"Backslash",16:"ShiftLeft",220:"IntlBackslash",90:"KeyZ",88:"KeyX",67:"KeyC",86:"KeyV",66:"KeyB",78:"KeyN",77:"KeyM",188:"Comma",190:"Period",191:"Slash",16:"ShiftRight",17:"ControlLeft",18:"AltLeft",91:"OSLeft",32:"Space",18:"AltRight",91:"OSRight",93:"ContextMenu",17:"ControlRight",37:"ArrowLeft",38:"ArrowUp",40:"ArrowDown",39:"ArrowRight",144:"NumLock",144:"NumLock",111:"NumpadDivide",106:"NumpadMultiply",109:"NumpadSubtract",103:"Numpad7",104:"Numpad8",105:"Numpad9",107:"NumpadAdd",100:"Numpad4",101:"Numpad5",102:"Numpad6",97:"Numpad1",98:"Numpad2",99:"Numpad3",13:"NumpadEnter",96:"Numpad0",110:"NumpadDecimal",17:"ControlLeft"},q={firefox:{fr:{27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",0:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",169:"Minus",61:"Equal",8:"Backspace",9:"Tab",65:"KeyQ",90:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",160:"BracketLeft",164:"BracketRight",13:"Enter",20:"CapsLock",20:"CapsLock",81:"KeyA",83:"KeyS",68:"KeyD",70:"KeyF",71:"KeyG",72:"KeyH",74:"KeyJ",75:"KeyK",76:"KeyL",77:"Semicolon",165:"Quote",170:"Backslash",16:"ShiftLeft",60:"IntlBackslash",87:"KeyZ",88:"KeyX",67:"KeyC",86:"KeyV",66:"KeyB",78:"KeyN",188:"KeyM",59:"Comma",58:"Period",161:"Slash",16:"ShiftRight",17:"ControlLeft",91:"OSLeft",18:"AltLeft",32:"Space",17:"ControlLeft",18:"AltRight",91:"OSRight",93:"ContextMenu",17:"ControlRight",37:"ArrowLeft",38:"ArrowUp",40:"ArrowDown",39:"ArrowRight",144:"NumLock",144:"NumLock",111:"NumpadDivide",106:"NumpadMultiply",109:"NumpadSubtract",103:"Numpad7",104:"Numpad8",105:"Numpad9",107:"NumpadAdd",100:"Numpad4",101:"Numpad5",102:"Numpad6",97:"Numpad1",98:"Numpad2",99:"Numpad3",96:"Numpad0",110:"NumpadDecimal",13:"NumpadEnter",17:"ControlLeft",67:"KeyC",17:"ControlLeft"},en:W},chrome:{fr:{27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",0:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",219:"Minus",187:"Equal",8:"Backspace",9:"Tab",65:"KeyQ",90:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",221:"BracketLeft",186:"BracketRight",13:"Enter",20:"CapsLock",20:"CapsLock",81:"KeyA",83:"KeyS",68:"KeyD",70:"KeyF",71:"KeyG",72:"KeyH",74:"KeyJ",75:"KeyK",76:"KeyL",77:"Semicolon",192:"Quote",220:"Backslash",16:"ShiftLeft",60:"IntlBackslash",87:"KeyZ",88:"KeyX",67:"KeyC",86:"KeyV",66:"KeyB",78:"KeyN",188:"KeyM",190:"Comma",191:"Period",223:"Slash",16:"ShiftRight",17:"ControlLeft",91:"OSLeft",18:"AltLeft",32:"Space",17:"ControlLeft",18:"AltRight",91:"OSRight",93:"ContextMenu",17:"ControlRight",37:"ArrowLeft",38:"ArrowUp",40:"ArrowDown",39:"ArrowRight",144:"NumLock",144:"NumLock",111:"NumpadDivide",106:"NumpadMultiply",109:"NumpadSubtract",103:"Numpad7",104:"Numpad8",105:"Numpad9",107:"NumpadAdd",100:"Numpad4",101:"Numpad5",102:"Numpad6",97:"Numpad1",98:"Numpad2",99:"Numpad3",96:"Numpad0",110:"NumpadDecimal",13:"NumpadEnter",17:"ControlLeft",67:"KeyC",17:"ControlLeft"},en:W}};function Q(){}Q.prototype={$:function(e){return document.getElementById(e)},elementOffset:function(e){for(var t=0,a=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-e.scrollLeft,a+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{top:a,left:t}},browser:function(){return"undefined"!=typeof InstallTrigger?"firefox":window.chrome?"chrome":document.docuemntMode?"ie":null},locale:function(){return window.navigator.userLanguage||window.navigator.language},client:{create:function(e){return new J(e)}},Canvas:{create:function(e){return new X(e)}},scancode(e){var t=Q.prototype.locale();return t=["fr","en"].indexOf(t)>0&&t||"en",Y[e.code||q[Q.prototype.browser()||"firefox"][t][e.keyCode]]}};let ee=new Q;var te=a(38240);let ae;function ne(){const{t:e}=(0,r.Bd)(),[t,a]=(0,l.fp)(d.AG.header_min),{check_user_auth:o}=(0,x.MH)(),[p,m]=(0,n.useState)(void 0),[f,y]=(0,n.useState)(3389),[g,j]=(0,n.useState)(void 0),[k,K]=(0,n.useState)(void 0),[A,F]=(0,n.useState)(!1),[D,L]=(0,n.useState)(!1);var M=null;(0,n.useEffect)(()=>(ae||(async()=>{try{await(0,te.J)("rle.js"),ae=!0}catch(t){return void(0,h.zN)(e("加载资源失败"))}})(),()=>{M&&(M.close(),M=null)}),[]);const I=t=>{L(!0),function(n,o,s,i){if(n=n||t.address,s=s||t.username,i=i||t.password,!n||!s)return(0,h.zN)(e("ip或者账号不允许为空")),void L(!1);!function(e){M||(M=ee.client.create(ee.$(e)))}("rdpwebview");var r=ee.$("rdpwebview");r.style.display="inline",r.width=window.innerWidth,r.height=window.innerHeight,F(!0),a(!0),M.connect(n,"",o,s,i,function(e){ee.$("rdpwebview").style.display="none",a(!1),L(!1),F(!1)})}(p,f,g,k)};return(0,w.jsxs)("div",{children:[(0,w.jsxs)(b.aZ,{position:"right",children:[(0,w.jsx)(i.$Z,{placeholder:e("地址"),icon:"network_ping",value:p,max_width:"15rem",handleInputChange:e=>m(e)}),(0,w.jsx)(i.$Z,{placeholder:e("端口"),icon:"outlet",value:f,max_width:"10rem",handleInputChange:e=>{e&&y(parseInt(e))}}),(0,w.jsx)(i.$Z,{placeholder:e("账号"),icon:"manage_accounts",value:g,max_width:"15rem",handleInputChange:e=>j(e)}),(0,w.jsx)(i.$Z,{placeholder:e("密码"),icon:"password",value:k,max_width:"15rem",handleInputChange:e=>K(e)}),!D&&(0,w.jsx)(c.rA,{icon:"play_arrow",title:e("连接"),onClick:I}),D&&(0,w.jsx)(c.rA,{icon:"close",title:e("关闭"),onClick:async()=>{F(!1),await C.ws.sendData(S.HK.rdp_disconnect,"");var e=ee.$("rdpwebview");e.getContext("2d").clearRect(0,0,e.width,e.height),ee.$("rdpwebview").style.display="none",L(!1),a(!1)}})]}),(0,w.jsxs)(s.jW,{isFull:A,children:[!D&&(0,w.jsx)(N.N,{have_auth_edit:o(v.oV.rdp_proxy_tag_update),getItems:async()=>{const e=await u.J0.get("tag");return e.code===_.m.Success?e.data:[]},save:async t=>{(await u.J0.post("tag/save",t)).code!==_.m.Success&&(0,h.zN)(e("网络错误"))},clickItem:async e=>{K(e.password),j(e.username),m(e.address),y(e.port),I(e)},items:[{key:"name",preName:e("名字")},{key:"address",preName:e("地址")},{key:"port",preName:e("端口")},{key:"username",preName:e("账号")},{key:"password",preName:e("密码")},{key:"color",preName:"color"}]}),(0,w.jsx)("canvas",{id:"rdpwebview",style:{display:"none"}})]})]})}var oe=a(8694),se=a(67331);const ie=(0,n.createContext)({activeKey:"",setActiveKey:()=>{}});function re(e){const{children:t,activeKey:a,defaultActiveKey:o,onChange:s,width:i}=e,[r,l]=(0,n.useState)(()=>a??o??"");(0,n.useEffect)(()=>{void 0!==a&&l(a)},[a]);const d=e=>{void 0===a&&l(e),s&&s(e)},c=[];return n.Children.forEach(t,e=>{n.isValidElement(e)&&e.type===le&&c.push({key:e.props.itemKey,tab:e.props.tab,disabled:e.props.disabled})}),(0,n.useEffect)(()=>{!r&&c.length>0&&l(c[0].key)},[c,r]),(0,w.jsx)(ie.Provider,{value:{activeKey:r,setActiveKey:d},children:(0,w.jsxs)("div",{className:"modern-tabs-container",style:{width:i||"100%"},children:[(0,w.jsx)("div",{className:"modern-tabs-nav",children:c.map(e=>{const t=["modern-tabs-tab",r===e.key?"active":"",e.disabled?"disabled":""].filter(Boolean).join(" ");return(0,w.jsx)("div",{className:t,onClick:()=>!e.disabled&&d(e.key),children:e.tab},e.key)})}),(0,w.jsx)("div",{className:"modern-tabs-content",children:t})]})})}function le(e){const{itemKey:t,children:a}=e,{activeKey:o}=(0,n.useContext)(ie),s=o===t;return(0,w.jsx)("div",{className:"modern-tab-panel "+(s?"active":""),children:a})}const de=n.lazy(()=>Promise.all([a.e(2543),a.e(4091)]).then(a.bind(a,84091)));let ce,pe,ue,he;function me(){const{t:e}=(0,r.Bd)(),[t,a]=(0,l.fp)(d.AG.confirm),[f,y]=(0,l.fp)(d.AG.showPrompt),{check_user_auth:g}=(0,x.MH)(),[j,k]=(0,n.useState)(""),[b,K]=(0,l.fp)(d.AG.router_jump),[A,F]=(0,n.useState)("get"),[D,L]=(0,n.useState)(""),[M,I]=(0,n.useState)(void 0),[B,R]=(0,n.useState)([]),[E,G]=(0,n.useState)([]),[O,H]=(0,n.useState)("headers"),[z,U]=(0,n.useState)(String(oe.RB.row)),[V,Z]=(0,n.useState)("body"),[J,X]=(0,n.useState)(),[Y,W]=(0,l.fp)(d.AG.nav_index_add_item_by_now_list),[q,Q]=(0,l.fp)(d.AG.prompt_card);x.xK.set_value_temp("{}",0),x.xK.set_value_temp("",1),(0,n.useEffect)(()=>(ce={},pe="",ue="",he="",x.xK.get_editor(0).session.setMode("ace/mode/json"),b.http_download_map_path&&(I(b.http_download_map_path),K({})),C.ws.sendData(S.HK.http_download_water,void 0).then(()=>{C.ws.addMsg(S.HK.http_download_water,e=>{const t=e.context;G(t)})}),()=>{C.ws&&"function"==typeof C.ws.removeMsg&&C.ws.removeMsg(S.HK.http_download_water)}),[]);const ee=e=>{const t=new oe.vr;t.url=D,t.method=A,t.header_type="headers"===O?1:2,"headers"===O&&(ce=JSON.parse(x.xK.get_editor_value(0))),t.headers=ce;const a=Number(z);if(t.body_type=a,a===oe.RB.row)pe=x.xK.get_editor_value(1),t.data=pe;else if(a===oe.RB.json)ce["Content-Type"]="application/json",pe=x.xK.get_editor_value(1),t.data=pe;else if(a===oe.RB.form){ce["Content-Type"]="multipart/form-data",t.form_data_list=B;for(const t of B)t.key&&t.is_file&&e&&e.append(t.fullPath,t.file_object)}return t};return(0,w.jsx)("div",{children:(0,w.jsxs)(s.xh,{children:[(0,w.jsxs)(s.fI,{children:[(0,w.jsxs)(s.VP,{children:[0!==E.length&&(0,w.jsx)(o.Zp,{title:"正在下载",children:(0,w.jsx)("div",{children:E.map((t,a)=>(0,w.jsxs)("div",{children:[(0,w.jsxs)("div",{className:"div-row",children:[(0,w.jsx)(c.rA,{icon:"cancel",title:e("取消"),onClick:()=>{C.ws.sendData(S.HK.http_download_cancel,t.local_download_path)}}),(0,w.jsx)(o.xP,{context:t.filename,tip_context:t.local_download_path}),(0,w.jsx)("span",{style:{paddingLeft:".3rem",color:"green"},children:`${t.progresses??0}% ${t.loaded?(0,P.v7)(t.loaded):""}MB / ${t.seep??""}MB/s `})]}),(0,w.jsx)("div",{style:{width:t.progresses?`${t.progresses}%`:"0",backgroundColor:"#40c4ff",height:"5px",transition:"0.2s ease width",borderRadius:"10px"}})]},a))})}),(0,w.jsxs)(o.Zp,{title:"",rightBottomCom:Number(z)===oe.RB.form&&"body"===O&&(0,w.jsx)(c.rA,{icon:"add",title:e("添加"),onClick:()=>{R([{},...B])}}),children:[(0,w.jsxs)("div",{className:"http_url",children:[(0,w.jsx)(i.l6,{width:"10rem",value:A,onChange:e=>{F(e)},options:[{value:"get",color:"#28a745"},{value:"post",color:"#007bff"},{value:"put",color:"#fd7e14"},{value:"delete",color:"#dc3545"},{value:"head",color:"#6f42c1"},{value:"options",color:"#17a2b8"},{value:"connect",color:"#666666"},{value:"trace",color:"#666666"},{value:"custom",color:"#e83e8c"}]}),(0,w.jsx)(i.Sm,{width:"50rem",placeholder:e("http url"),value:D,handleInputChange:e=>{L(e)}}),(0,w.jsx)(c.rA,{icon:"send",title:e("发送"),onClick:async()=>{if(!u._U.have_http_method(A))return void(0,h.zN)(e("不存在的http method"));if(!D)return void(0,h.zN)("url is empty");X(void 0),k("");const t=new FormData;t.append("data",JSON.stringify(ee(t)));let a="http/send";M&&(a+=`?local_download_path=${M}`),se.A.post(u._U.getUrl(a),t,{headers:{"Content-Type":"multipart/form-data",Authorization:localStorage.getItem("token")}}).catch(e=>{(0,h.zN)(e.message)}).then(e=>{if(!e)return;let t={};try{if(e.headers.filecat_remote_raw_headers&&(t=JSON.parse(e.headers.filecat_remote_raw_headers),he=JSON.stringify(t,null,2)),e.headers.filecat_remote_code)try{const t=JSON.parse(e.headers.filecat_remote_code);X(200===t||201===t?(0,w.jsx)("span",{style:{color:"green"},children:"200"}):t)}catch(e){console.log(e)}}catch(t){he=String(e.headers.filecat_remote_raw_headers)}const a=(t["content-type"]||t["Content-Type"]||"").toLowerCase();ue="object"==typeof e.data?JSON.stringify(e.data,null,2):e.data;const n=x.xK.get_editor(2),o="body"===V?ue:he;if(n){if(a.includes("application/json")||a.includes("+json")){n.session.setMode("ace/mode/json");try{const e=JSON.parse(ue);ue=JSON.stringify(e,null,2)}catch(e){}}else a.includes("html")?n.session.setMode("ace/mode/html"):a.includes("xml")?n.session.setMode("ace/mode/xml"):a.includes("javascript")?n.session.setMode("ace/mode/javascript"):n.session.setMode("ace/mode/text");n.setValue("body"===V?ue:he,-1)}k(o)})}}),g(v.oV.http_proxy_tag_update)&&(0,w.jsx)(c.rA,{title:e("添加"),icon:"save_as",onClick:()=>{if(!g(v.oV.http_proxy_tag_update))return void(0,h.zN)("no permission");for(const t of B)if(t.is_file)return void(0,h.zN)(e("frm_lm"));let t;Q({open:!0,title:e("信息"),context_div:(0,w.jsxs)("div",{children:[(0,w.jsx)("div",{className:"card-content",children:(0,w.jsx)(i.Sm,{placeholderOut:e("输入标签名"),handleInputChange:e=>t=e})}),(0,w.jsx)("div",{className:"card-action",children:(0,w.jsx)("button",{className:"button button--flat",onClick:async()=>{const e=await ee();e.local_download_path=M,e.form_data_list=JSON.stringify(B),e.headers=JSON.stringify(e.headers),"object"==typeof e.data&&(e.data=JSON.stringify(e.data)),e.name=t,W(e),Q({open:!1})},children:e("确定")})})]})})}})]}),(0,w.jsxs)(re,{activeKey:O,onChange:e=>H(e),children:[(0,w.jsx)(le,{itemKey:"headers",tab:e("请求头")+"(json)",children:(0,w.jsxs)("div",{style:{marginTop:"10px"},children:[(0,w.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"4px"},children:(0,w.jsx)(c.rA,{title:e("格式化"),icon:"data_object",onClick:function(){x.xK.get_editor(0)?.formatCode?.()}})}),(0,w.jsx)("div",{className:"http_ace",children:(0,w.jsx)(de,{name:"",editor_id:0})})]})}),(0,w.jsx)(le,{itemKey:"body",tab:e("请求体"),children:(0,w.jsxs)("div",{style:{marginTop:"10px"},children:[(0,w.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,w.jsxs)(re,{activeKey:z,onChange:e=>{U(e);const t=Number(e);t===oe.RB.row?x.xK.get_editor(1).session.setMode("ace/mode/text"):t===oe.RB.json&&x.xK.get_editor(1).session.setMode("ace/mode/json")},children:[(0,w.jsx)(le,{itemKey:String(oe.RB.row),tab:e("row")}),(0,w.jsx)(le,{itemKey:String(oe.RB.json),tab:e("json")}),(0,w.jsx)(le,{itemKey:String(oe.RB.form),tab:e("form")})]}),Number(z)!==oe.RB.form&&(0,w.jsx)(c.rA,{title:e("格式化"),icon:"data_object",onClick:function(){x.xK.get_editor(1)?.formatCode?.()}})]}),Number(z)===oe.RB.form&&(0,w.jsx)("div",{style:{marginTop:"10px"},children:(0,w.jsx)(p.X,{headers:["key",e("值")],rows:B.map((t,a)=>[(0,w.jsx)(i.Sm,{value:t.key,handleInputChange:e=>{t.key=e,R([...B])},no_border:!0}),(0,w.jsx)(i.Sm,{value:t.value,handleInputChange:e=>{t.value=e,t.is_file=!1,R([...B])},no_border:!0}),(0,w.jsxs)("div",{children:[(0,w.jsx)(c.rA,{icon:"file_upload",title:e("上传文件"),onClick:()=>(e=>{y({show:!0,type:$.PromptEnum.UploadFile,overlay:!0,data:{extra_data:{only_file:!0},call:t=>{let a=t.currentTarget?.files;if(!a)return;const n=a[0];n.fullPath=(0,T.hU)()+Date.now().toString(),B[e].value=`${n}(${n.name})`,B[e].is_file=!0,B[e].fileName=n.name,B[e].fullPath=n.fullPath,R([...B]),B[e].file_object=n,y({overlay:!1,type:"",show:!1,data:{}})}}})})(a)}),(0,w.jsx)(c.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{B.splice(e,1),R([...B])})(a)})]})]),width:"10rem"})}),(0,w.jsx)("div",{className:"http_ace",style:{marginTop:"10px",display:Number(z)!==oe.RB.form?"block":"none"},children:(0,w.jsx)(de,{name:"",editor_id:1})})]})})]}),(0,w.jsx)("div",{style:{paddingTop:"1rem"},children:void 0===M?(0,w.jsx)("span",{style:{cursor:"pointer",color:"#3b82f6"},onClick:()=>{I("")},children:e("下载到本地目录")}):(0,w.jsx)(i.Sm,{placeholder:e("本地地址"),value:M,handleInputChange:e=>{I(e)},handlerEnter:()=>{M||I(void 0)}})})]})]}),(0,w.jsx)(s.VP,{children:(0,w.jsxs)(o.Zp,{title:J,rightTopCom:(0,w.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,w.jsx)(c.rA,{title:e("格式化"),icon:"data_object",onClick:()=>{x.xK.get_editor(2)?.formatCode?.()}}),(0,w.jsx)(c.rA,{title:e("复制"),icon:"copy_all",onClick:()=>{const t=x.xK.get_editor_value(2);t&&((0,m.lW)(t),(0,h.SK)(e("完成")))}})]}),children:[(0,w.jsxs)(re,{activeKey:V,onChange:e=>{Z(e);const t="body"===e?ue:he;k(t);const a=x.xK.get_editor(2);if(a){try{JSON.parse(t),a.session.setMode("ace/mode/json")}catch{a.session.setMode("ace/mode/text")}a.setValue(t,-1)}},children:[(0,w.jsx)(le,{itemKey:"body",tab:e("响应体")}),(0,w.jsx)(le,{itemKey:"headers",tab:e("响应头")})]}),(0,w.jsx)("div",{className:"http_ace",style:{marginTop:"10px",height:"21rem"},children:(0,w.jsx)(de,{name:"",editor_id:2})})]})})]}),(0,w.jsx)(s.fI,{children:(0,w.jsx)(s.VP,{children:(0,w.jsx)(N.N,{getItems:async()=>{const e=await u._U.get("http/tag");return e.code===_.m.Success?e.data:[]},save:async t=>{(await u._U.post("http/tag/save",t)).code!==_.m.Success&&(0,h.zN)(e("网络错误"))},have_auth_edit:g(v.oV.http_proxy_tag_update),clickItem:async e=>{L(e.url),F(e.method),I(e.local_download_path),e.header_type&&H(1===e.header_type?"headers":"body"),e.headers&&(ce=JSON.parse(e.headers),1===e.header_type&&(x.xK.get_editor(0).setValue(e.headers,-1),x.xK.get_editor(0).session.setMode("ace/mode/json"))),e.form_data_list&&R(JSON.parse(e.form_data_list)),e.data&&(pe=e.data),e.body_type&&(U(String(e.body_type)),e.body_type===oe.RB.row?x.xK.get_editor(1).session.setMode("ace/mode/text"):e.body_type===oe.RB.json&&x.xK.get_editor(1).session.setMode("ace/mode/json"),x.xK.get_editor(1).setValue(e.data,-1))},items:[{key:"name",preName:e("名字")},{key:"url",preName:"url"},{key:"method",preName:"method"},{key:"headers",preName:"headers"},{key:"data",preName:"data"},{key:"form_data_list",preName:"form_data_list"},{key:"local_download_path",preName:"local_download_path"},{key:"color",preName:"color"}]})})})]})})}var fe=a(87361);const ye=n.lazy(()=>Promise.all([a.e(8772),a.e(8257),a.e(7759)]).then(a.bind(a,45601)));function _e({}){const{check_user_auth:e}=(0,x.MH)(),{t}=(0,r.Bd)(),a=[];return e(v.oV.http_proxy)&&a.push({index:1,name:t("http代理"),rto:"http/",component:(0,w.jsx)(me,{})}),e(v.oV.ssh_proxy)&&a.push({index:1,name:`ssh${t("代理")}`,rto:"remoteShell/",component:(0,w.jsx)(V,{})}),e(v.oV.browser_proxy)&&a.push({index:1,name:`${t("浏览器")}${t("代理")}`,rto:"browserproxy/",component:(0,w.jsx)(j,{})}),e(v.oV.rdp_proxy)&&a.push({index:1,name:`rdp${t("代理")}`,rto:"rdp/",component:(0,w.jsx)(ne,{})}),e(v.oV.rtsp_proxy)&&a.push({index:1,name:t("rtsp播放器"),rto:"rtsp/",component:(0,w.jsx)(ye,{})}),(0,w.jsx)(s.W1,{optionList:a,father_route:fe.o.proxy})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[2674],{72458(e,t,n){function a(e,t){let n=function(e){let t="\\";for(const n of e)if("/"===n||"\\"===n){t=n;break}return t}(e);if("."===t)return e;if(".."===t){if(e.length>1){let t=e[e.length-1]===n?1:0;for(let a=e.length-1-t;a>=0;a--)if(e[a]===n)return e.substring(0,a+1)}return e}return e.endsWith(n)&&t.startsWith(n)?e.slice(0,-1)+t:e.endsWith(n)||t.startsWith(n)?e+t:e+n+t}n.d(t,{Jn:()=>a,Z1:()=>s});function s(e){if("string"!=typeof e||0===e.length)return!1;return/^[a-zA-Z]:[\\\/]/.test(e)||/^\\\\[^\\/]+[\\/]/.test(e)||/^\//.test(e)}},92674(e,t,n){n.r(t),n.d(t,{default:()=>U});var a=n(96540),s=n(82893),i=n(34843),o=n(85997),l=n(57952),r=n(47022),c=n(34251),d=n(74848);function u(e){{const[t,n]=(0,a.useState)(()=>Boolean(e.expand_paths?.includes(e.pre_path))),[s,i]=(0,a.useState)([]),l=e=>{i(e)},p=async()=>{"folder"===e.type?(t||!e.click||s||await e.click(e,l,e.pre_path),n(!t)):e.click&&await e.click(e,l,e.pre_path)},h=async(t=!1)=>{"folder"!==e.type||t?e.fatherNowToggleExpansion&&e.fatherNowToggleExpansion():await e.click(e,l,e.pre_path)};return(0,a.useEffect)(()=>{i(e.children)},[e.children]),(0,a.useEffect)(()=>{t&&"folder"===e.type&&e.click&&e.click(e,l,e.pre_path)},[]),(0,d.jsxs)("div",{className:"studio-item",children:[(0,d.jsxs)("div",{onClick:p,onContextMenu:t=>{t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),e.handleContextMenu&&e.handleContextMenu(t,e.name,e.pre_path,e.type===r.Iw.folder,h)},className:"studio-item-title"+(e.active_path===e.pre_path?" studio-item-title--active":""),children:[(0,d.jsx)("i",{className:"material-icons studio-item-title-tag","data-icon":t?"arrow_drop_down":"arrow_right",children:"file"==e.type?"":t?"arrow_drop_down":"arrow_right"}),(0,d.jsx)("span",{className:"file-icons",children:(0,d.jsx)("span",{"data-type":(0,c.uL)(e.name),"data-dir":"folder"===e.type,"aria-label":e.name,children:(0,d.jsx)(o.In,{icon:"",aria_label:e.name})})}),(0,d.jsx)("span",{className:"studio-item-name",children:e.name})]}),t&&s&&(0,d.jsx)("div",{style:{marginLeft:20},children:s.map((t,n)=>(0,d.jsx)(a.Fragment,{children:(0,d.jsx)(u,{type:t.type,size:t.size,click:e.click,name:t.name,children:t.children,pre_path:`${e.pre_path}${t.name}${t.type===r.Iw.folder?"/":""}`,handleContextMenu:e.handleContextMenu,active_path:e.active_path,fatherNowToggleExpansion:h},n)},n))})]})}}n(61443);function p(e){return(0,d.jsx)("div",{children:e.list.map((t,n)=>(0,d.jsx)(u,{pre_path:`${e.pre_path}${t.name}${t.type===r.Iw.folder?"/":""}`,name:t.name,type:t.type,handleContextMenu:e.handleContextMenu,fatherNowToggleExpansion:e.fatherNowToggleExpansion,active_path:e.active_path,expand_paths:e.expand_paths,children:t.children,click:e.click,size:t.size},n))})}var h=n(14284),m=n(34289),f=n(53459),v=n(78247),_=n(62042),x=n(2543),y=n(89824),w=n(22022),g=n(88815),j=n(52671),k=n(23430),C=n(87361),S=n(99214),b=n(72458);const N=a.lazy(()=>Promise.all([n.e(2543),n.e(4091)]).then(n.bind(n,84091))),$=a.lazy(()=>Promise.all([n.e(1384),n.e(1075),n.e(1142)]).then(n.bind(n,71142))),E=a.lazy(()=>n.e(4877).then(n.bind(n,64877))),A=a.lazy(()=>n.e(9857).then(n.bind(n,69857))),M=a.lazy(()=>Promise.all([n.e(3140),n.e(5744)]).then(n.bind(n,16575))),I=a.lazy(()=>Promise.all([n.e(8725),n.e(2728),n.e(2130),n.e(5602),n.e(8781),n.e(6404)]).then(n.bind(n,35304))),R=a.lazy(()=>Promise.resolve().then(n.bind(n,20892))),P=a.lazy(()=>Promise.all([n.e(1922),n.e(4935)]).then(n.bind(n,24935)));function z(e){return(0,c.uL)(e)===r.Iw.excel}function U(e){const[t,n]=(0,a.useState)([]),[u,U]=(0,a.useState)(""),[F,D]=(0,a.useState)(""),[L,G]=(0,a.useState)(!1),[W,T]=(0,a.useState)({path:"",name:""}),[B,K]=(0,a.useState)(0),[H,J]=(0,a.useState)([]),[X,Z]=(0,a.useState)(""),[V,Y]=(0,i.fp)(s.AG.confirm),[q,O]=(0,a.useState)(!1),[Q,ee]=(0,i.fp)(s.AG.fileShellShow),[te,ne]=(0,i.fp)(s.AG.file_shell_hidden),ae=(0,S.Cf)(),se=(0,a.useRef)(null),ie=(0,a.useRef)(null),[oe,le]=(0,a.useState)(!1),[re,ce]=(0,a.useState)(16),[de,ue]=(0,i.fp)(s.AG.showPrompt),{t:pe}=(0,w.Bd)(),he=(0,j.Zp)(),me=(fe=W.name,(0,c.uL)(fe)===r.Iw.md);var fe;const ve=function(e){return(0,c.uL)(e)===r.Iw.excalidraw}(W.name),_e=function(e){return(0,c.uL)(e)===r.Iw.mind}(W.name),xe=function(e){return(0,c.uL)(e)===r.Iw.timeline}(W.name),ye=z(W.name),we=(0,a.useRef)(null),ge=(0,a.useRef)(null),je=(0,a.useRef)(null),ke=(0,a.useRef)(null),Ce=(0,a.useRef)(null),Se=(0,a.useRef)(null),[be,Ne]=(0,a.useState)([]),[$e,Ee]=(0,a.useState)(-1),[Ae,Me]=(0,a.useState)("folder"),[Ie,Re]=(0,a.useState)(!0),[Pe,ze]=(0,a.useState)(!1),Ue=(0,S.oT)(),[Fe]=(0,j.ok)(),De="1"===Fe.get("chat_open"),[Le,Ge]=(0,i.fp)(s.AG.studio_chat_width),We=(0,a.useRef)(null),[Te,Be]=(0,a.useState)(!1),[Ke,He]=(0,a.useState)(void 0),[Je,Xe]=(0,i.fp)(s.AG.ai_chat_session_by_cwd),Ze=(0,j.zy)(),Ve=(()=>{const e=`${C.o.studio_page}/`,t=Ze.pathname.startsWith(e)?Ze.pathname.slice(e.length):"",n=(0,m.GG)("file",decodeURIComponent(t));return n.endsWith("/")?n:`${n}/`})(),{check_user_auth:Ye}=(0,v.MH)(),[qe]=(0,i.fp)(s.AG.user_base_info),Oe=Ye(k.oV.ai_agent_page);(0,a.useEffect)(()=>{qe?.user_data&&De&&!Oe&&Ue("chat_open",null)},[De,Oe,qe]);const Qe=(0,b.Jn)(k.nM.get_now_dir(qe),Ve);(0,S.rJ)(Qe);const et=async()=>{const e=Ve;U(e),T({path:e,name:(0,m.mH)(e)});const t=await h.$M.post("studio/get/item",{path:e});if(t.code===f.m.Success){const e=[],a=[];for(const n of t.data.list)"folder"===n.type?e.push(n):"file"===n.type&&a.push(n);n([...e,...a])}},tt=(e,t)=>e===t||e.startsWith(t+"/");(0,a.useEffect)(()=>{D(""),O(!1),J([]),et()},[Ze]);const nt=async(e,t)=>{if(!z(e)){const e=await h.$M.get(`${encodeURIComponent(t)}`);D(e.data),v.xK.set_value_temp(e.data)}T({path:t,name:e}),Z(t),Me("folder"),ze(!1)},at=(e,t)=>{e.size>g.o5?Y({open:!0,handle:()=>{nt(e.name,t),Y({open:!1,handle:null}),O(!1)},title:"超过20MB了还要打开吗?"}):nt(e.name,t)};function st(){ge.current?.save()}const it=e=>{if(e.ctrlKey&&"s"===e.key){if(e.preventDefault(),me||ve||_e||xe||ye)return;q&&st()}};(0,a.useEffect)(()=>(document.addEventListener("keydown",it),()=>{document.removeEventListener("keydown",it)}),[q,me,ve,_e,xe,ye]);const ot=(0,a.useCallback)(x.throttle(e=>{const t=parseFloat(getComputedStyle(ie.current).fontSize),n=window.innerWidth/t-4,a=e.clientX/t,s=2.25+se.current.offsetWidth/t;a<=n&&a>=s&&ce(parseFloat(a.toFixed(2)))},32),[]),lt=()=>{le(!1),ie.current.removeEventListener("pointermove",ot)},rt=(0,a.useCallback)(x.throttle(e=>{const t=We.current;if(!t)return;const n=parseFloat(getComputedStyle(t).fontSize),a=t.parentElement.getBoundingClientRect().right-e.clientX,s=.7*t.parentElement.getBoundingClientRect().width,i=Math.min(Math.max(a,320),s);Ge(parseFloat((i/n).toFixed(2)))},32),[]),ct=()=>{Be(!1),document.removeEventListener("pointermove",rt)},dt=[{r:pe("创建文件"),v:"创建文件"},{r:pe("创建目录"),v:"创建目录"},{r:pe("重命名"),v:"重命名"},{r:pe("删除"),v:"删除"}],ut=[{r:pe("重命名"),v:"重命名"},{r:pe("删除"),v:"删除"}],pt=(e,t,n,a,s)=>{e.preventDefault();const i=new c.ik;i.path=n,i.filename=t,i.x=e.clientX,i.y=e.clientY,i.items=a?dt:ut,s===et&&(i.items=i.items.slice(0,2)),i.type=a?r.Iw.studio_folder:r.Iw.studio_file;const o=e=>{s(e)};i.textClick=e=>{switch(e){case"创建文件":ue({show:!0,type:y.PromptEnum.FileNew,overlay:!0,data:{dir:n,call:o}});break;case"创建目录":ue({show:!0,type:y.PromptEnum.DirNew,overlay:!0,data:{dir:n,call:o}});break;case"删除":if(q&&(W.path===n||W.path.includes(n))){const e=()=>{o(a),O(!1),T({}),D(""),v.xK.set_value_temp("")};ue({show:!0,type:y.PromptEnum.FilesDelete,overlay:!0,data:{path:n,call:e,filename:t}});break}ue({show:!0,type:y.PromptEnum.FilesDelete,overlay:!0,data:{path:n,filename:t,call:a?()=>{o(!0)}:o}});break;case"重命名":ue({show:!0,type:y.PromptEnum.FileRename,overlay:!0,data:{path:n,dir:(0,m.Yp)(n),call:(e,t)=>{((e,t)=>{if(X&&tt(X,e)){const n=t+X.slice(e.length);Z(n),T({path:n,name:(0,m.mH)(n)})}const n=(0,m.oW)(Ve);if(tt(n,e)){const a=t+n.slice(e.length);return void he(`${C.o.studio_page}/${encodeURIComponent(`/file/${a}`)}`,{replace:!0})}K(e=>e+1),et()})(e,t)},filename:t}})}},ue({show:!0,type:y.PromptEnum.FileMenu,overlay:!1,data:i})};const ht=me&&"outline"===Ae;return(0,d.jsxs)("div",{className:"studio studio--file",children:[(0,d.jsxs)(l.A,{ignore_tags:!0,left_children:[(0,d.jsx)(o.rA,{title:"取消",icon:"close",onClick:()=>{ee({show:!1,path:""}),ne(void 0),he(-1)}},1),(0,d.jsx)("div",{children:W.name},2)],children:[(0,d.jsx)("title",{children:W.name}),(0,d.jsx)(o.rA,{title:"侧边栏",icon:"list",onClick:()=>Re(e=>!e),selected:Ie}),me&&[Pe?(0,d.jsx)(o.rA,{title:pe("保存"),icon:"save",onClick:()=>we.current?.save()},"save"):null,(0,d.jsx)(o.rA,{icon:"source"===we.current?.mode()?"edit":"code",title:"source"===we.current?.mode()?pe("实时编辑模式"):pe("源码模式"),onClick:()=>we.current?.toggle_mode()},"mode"),(0,d.jsx)(o.rA,{title:pe("导出PDF"),icon:"print",onClick:()=>we.current?.export_pdf()},"pdf")],!me&&(0,c.zr)(W.name)&&(0,d.jsx)(o.rA,{title:"格式化",icon:"data_object",onClick:function(){v.xK.get_editor()?.formatCode()}}),ae.can_terminal&&(0,d.jsx)(o.rA,{icon:"terminal",title:"shell",onClick:function(){!0!==te&&!1!==te?Q.show?ee({show:!1,path:""}):(ee({show:!0,path:Ve}),ne(!1)):ne(!te)}}),Ye(k.oV.ai_agent_page)&&ae.ai_chat_available&&(0,d.jsx)(o.rA,{title:pe("AI 聊天"),icon:"smart_toy",selected:De,onClick:()=>Ue("chat_open",!De?"1":null)}),me?Pe?(0,d.jsx)(o.rA,{title:pe("保存"),icon:"save",onClick:()=>we.current?.save()}):null:ve?(0,d.jsx)(o.rA,{title:pe("保存"),icon:"save",onClick:()=>je.current?.save()}):_e?(0,d.jsx)(o.rA,{title:pe("保存"),icon:"save",onClick:()=>ke.current?.save()}):xe?(0,d.jsx)(o.rA,{title:pe("保存"),icon:"save",onClick:()=>Ce.current?.save()}):ye?(0,d.jsx)(o.rA,{title:pe("保存"),icon:"save",onClick:()=>Se.current?.save()}):q?(0,d.jsx)(o.rA,{title:"保存",icon:"save",onClick:st}):null]}),(0,d.jsxs)("div",{className:"studio-body",ref:ie,children:[(0,d.jsxs)("div",{className:"studio-nav",style:{display:Ie?void 0:"none",width:re-1+"em"},onContextMenu:e=>{pt(e,W.name,Ve,!0,et)},children:[(0,d.jsx)("div",{className:"studio-nav-outline",style:{display:ht?void 0:"none"},children:(0,d.jsx)(E,{items:be,active_pos:$e,on_click:e=>we.current?.goto_heading(e)})}),(0,d.jsx)("div",{className:"studio-nav-folder",style:{display:ht?"none":void 0},children:(0,d.jsx)(a.Fragment,{children:(0,d.jsx)(p,{pre_path:u,list:t,click:async(e,t,n)=>{if("folder"===e.type){J(e=>e.includes(n)?e:[...e,n]);const e=await h.$M.post("studio/get/item",{path:`${n}`});if(e.code===f.m.Success){const n=[],a=[];for(const t of e.data.list)"folder"===t.type?n.push(t):"file"===t.type&&a.push(t);t([...n,...a])}}else{if(q)return void Y({open:!0,handle:()=>{Y({open:!1,handle:null}),O(!1),at(e,n)},title:"确定不保存就切换吗?"});at(e,n)}},active_path:X,expand_paths:H,handleContextMenu:pt,fatherNowToggleExpansion:et})},B)}),me&&(0,d.jsx)("div",{className:"studio-nav-switch",children:(0,d.jsx)(o.rA,{icon:ht?"folder":"list",title:pe(ht?"文件目录":"大纲"),onClick:()=>Me(ht?"folder":"outline")})})]}),Ie&&(0,d.jsx)("div",{className:"studio__divider",ref:se,onPointerDown:()=>{le(!0),ie.current.addEventListener("pointermove",ot)},onPointerUp:lt}),oe&&(0,d.jsx)("div",{className:"shell__overlay",onPointerUp:lt}),me?(0,d.jsx)("div",{className:"studio-editor studio-editor--md",children:(0,d.jsx)(a.Suspense,{fallback:null,children:(0,d.jsx)($,{pane:{path:X,url:h.$M.getDownloadUrl(encodeURIComponent(X)),name:W.name,on_dirty:ze,on_outline:(e,t)=>{Ne(e),Ee(t)},register:e=>{we.current=e}}})})},X):ve?(0,d.jsx)("div",{className:"studio-editor studio-editor--draw",children:(0,d.jsx)(a.Suspense,{fallback:null,children:(0,d.jsx)(M,{reset_key:X,url:h.$M.getDownloadUrl(encodeURIComponent(X)),save_path:X,on_dirty:O,on_saved:()=>O(!1),register:e=>{je.current=e}})})},X):_e?(0,d.jsx)("div",{className:"studio-editor studio-editor--mind",children:(0,d.jsx)(a.Suspense,{fallback:null,children:(0,d.jsx)(I,{reset_key:X,url:h.$M.getDownloadUrl(encodeURIComponent(X)),on_dirty:O,on_saved:()=>O(!1),register:e=>{ke.current=e},on_save:async e=>(await h.$M.post(`save/${encodeURIComponent(X)}`,{context:e})).code===f.m.Success})})},X):xe?(0,d.jsx)("div",{className:"studio-editor studio-editor--timeline",children:(0,d.jsx)(a.Suspense,{fallback:null,children:(0,d.jsx)(R,{reset_key:X,url:h.$M.getDownloadUrl(encodeURIComponent(X)),on_dirty:O,register:e=>{Ce.current=e},on_save:async e=>(await h.$M.post(`save/${encodeURIComponent(X)}`,{context:e})).code===f.m.Success})})},X):ye?(0,d.jsx)("div",{className:"studio-editor studio-editor--excel",children:(0,d.jsx)(a.Suspense,{fallback:null,children:(0,d.jsx)(P,{url:h.$M.getDownloadUrl(encodeURIComponent(X)),save_path:X,on_dirty:O,bind_save:e=>{Se.current={save:e}}})})},X):(0,d.jsx)("div",{className:"studio-editor",children:W.name&&(0,d.jsx)(a.Suspense,{fallback:null,children:(0,d.jsx)(N,{name:W.name,on_dirty:O,register:e=>{ge.current=e},save:async e=>{const t={context:v.xK.get_editor_value()},n=await h.$M.post(`save/${encodeURIComponent(X)}`,t);return n.code===f.m.Success||e||(0,_.zN)(pe("保存失败")),n.code===f.m.Success}})})},X),De&&(0,d.jsxs)(a.Fragment,{children:[(0,d.jsx)("div",{className:"studio__divider studio__divider--chat",ref:We,onPointerDown:e=>{e.preventDefault(),Be(!0),document.addEventListener("pointermove",rt),document.addEventListener("pointerup",ct,{once:!0})}}),(0,d.jsx)("div",{className:"studio-chat-panel",style:{width:`${Le}em`},children:(0,d.jsx)(a.Suspense,{fallback:null,children:(0,d.jsx)(A,{inline_header:!0,sync_url:!1,file_cwd_path:Qe,session_id:Ke??(mt=Qe,s.AG.get_ai_chat_session(Je,mt)),on_session_change:e=>{He(e),((e,t)=>{Xe({...Je,[e]:t})})(Qe,e)}})})})]})]})]});var mt}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[3355],{53355(t){t.exports=JSON.parse('{"title":"FileCat","修改密码":"パスワードを変更","自定义auth":"カスタム認証","tk_exp":"トークン有効期限","目标":"ターゲット","目标列表":"ターゲット一覧","被同步的源目录":"同期するソースディレクトリ","成功":"成功","已开启":"有効","已关闭":"無効","sy_tp1":"設定ファイルやコードファイルなど、小さいファイルのみ対応しています","sy_tp2":"デフォルトではファイル変更後でないと同期されません。全量同期を有効にすると、そのクライアントは接続のたびに全ファイルを再帰同期します。","sy_tp3":"1つのタスクに複数のターゲットを設定でき、それぞれにディレクトリと全量同期を指定できます。","立即同步":"今すぐ同期","已触发同步":"同期を開始しました","操作失败":"操作に失敗しました","tsk_off":"まずタスクを有効にして保存してください","mnt_type":"マウント種別","cred_sel":"資格情報","lcl_abs":"マウントするローカル絶対パス","rem_dir":"リモート先ディレクトリ","disp_only":"一覧に表示する名前","tag_pub":"タグ編集は全員に公開されます","https_s":"HTTPS 設定","ssl_crt":"SSL 証明書パス","ssl_key":"SSL 秘密鍵パス","crt_pth":"証明書ファイルパス (cert.pem/fullchain.pem)","ky_pth":"秘密鍵ファイルパス (privkey.pem)","语言":"言語","文件夹路径":"フォルダパス","编号":"番号","路径":"パス","sub_dir":"サブディレクトリ","是否默认":"デフォルトか?","备注":"備考","编辑SQL":"SQL編集","SQL 预设":"SQLプリセット","耗时":"経過時間","确认":"確認","请输入备注":"備考を入力してください","查询全部表":"全テーブルをクエリ","SQL预设设置":"SQLプリセット設定","SQL预设":"SQLプリセット","更新保存":"更新して保存","创建新预选项":"新しいプリセットを作成","添加预设":"プリセットを追加","SQL代码":"SQLコード","保存成功":"保存しました","大纲":"アウトライン","新建主题":"新規テーマ","编辑主题":"テーマを編集","删除主题":"テーマを削除","主题名称":"テーマ名","请输入主题名称":"テーマ名を入力","主题实时预览":"リアルタイムプレビュー","删除成功":"削除しました","删除失败":"削除に失敗","cf_thm":"このテーマを削除しますか?","导出PDF":"PDFを書き出す","no_head":"見出しがまだありません","未命名标题":"無題の見出し","更新成功":"更新しました","创建成功":"作成しました","sql_in":"SQL文を入力してください","新密码":"新しいパスワード","新账号":"新しいアカウント","关闭":"閉じる","开启":"開く","展开":"展開","指定时间":"指定時間","永不过期":"期限なし","清空token":"トークンをクリア","保存":"保存","确定":"確定","确定修改":"変更を確定","删除":"削除","添加":"追加","系统":"システム","follow_sys":"システム設定に従う","no_theme":"テーマなし","自定义页面路由":"カスタムページルート ","api_rt":"カスタムAPIルート","跳转路由":"ジャンプルート","路由":"ルート","文件":"ファイル","自定义路由":"カスタムルート","编辑":"編集","查看":"表示","默认配置":"デフォルト設定","设置":"設定","退出登录":"ログアウト","虚拟网络":"仮想ネットワーク","系统信息":"システム情報","工具箱":"ツールボックス","索引":"インデックス","文件夹":"フォルダ","客户端":"クライアント","服务器":"サーバー","服务端":"サーバー側","基本信息":"基本情報","系统性能":"システム性能","总容量":"総容量","剩余":"残り","使用率":"使用率","内存":"メモリ","系统进程":"システムプロセス","doc_ct":"Dockerコンテナ","物理硬盘":"物理ハードディスク","文件硬盘":"ファイルハードディスク","容器":"コンテナ","名字":"名前","镜像":"イメージ","命令":"コマンド","状态":"状態","选择":"選択","过滤":"フィルター","账号":"アカウント","密码":"パスワード","目录":"ディレクトリ","私钥路径":"秘密鍵パス","连接地址":"接続アドレス","端口":"ポート","port":"ポート","host":"ホスト","key":"キー","代理":"プロキシ","浏览器":"ブラウザ","网络唤醒":"Wake-on-LAN","时间工具":"時間ツール","切换样式":"スタイルを切り替える","更多":"もっと","创建文件夹":"フォルダを作成","创建文件":"ファイルを作成","连接":"接続","地址":"アドレス","目标设备":"ターゲットデバイス","发送":"送信","腾讯":"テンセント","云":"クラウド","厂商":"メーカー","名称":"名前","厂商名称":"メーカー名","类型":"タイプ","容量":"容量","挂载位置":"マウント位置","剩余容量":"残り容量","登录":"ログイン","是":"はい","否":"いいえ","秒":"秒","流量转发":"トラフィック転送","点对点":"ピアツーピア","模式":"モード","虚拟":"仮想","在线状态":"オンライン状態","物理":"物理","账号设置":"アカウント設定","说明":"説明","文件系统类型":"ファイルシステムタイプ","机械":"機械式","固态":"SSD","复制":"コピー","剪切":"切り取り","压缩":"圧縮","下载":"ダウンロード","重命名":"名前を変更","创建文本文件":"テキストファイルを作成","解压":"解凍","转换到":"変換する","自定义":"カスタム","粘贴到此处":"ここに貼り付ける","创建":"作成","制造商":"メーカー","总内存":"総メモリ","最大":"最大","品牌":"ブランド","逻辑核心":"論理コア","搜索当前目录":"現在のディレクトリを検索","压缩文件":"ファイルを圧縮","取消":"キャンセル","环境控制":"環境制御","control_env_tip":"env 形式の key-value テキストで設定し、コメントアウトすると無効になります。allowed_hosts は一致するホストのみ許可し、forbid_hosts は一致するホストを拒否します。値は正規表現の配列です(完全一致、ポートを除くホスト名のみ)。拒否されたリクエストは応答を返さず即座に切断されます。","只支持以下配置项":"サポートするキーのみ","值必须是 JSON 数组":"値は JSON 配列である必要があります","正则表达式不合法":"正規表現が不正です","运行":"実行","格式":"形式","压缩到":"圧縮先","进度":"進捗","解压到":"解凍先","当前目录":"現在のディレクトリ","解压文件":"ファイルを解凍","视频格式转换":"ビデオ形式変換","gen_dir":"生成ファイルのターゲットファイルはこのディレクトリ内にあります","ff_fmt":"ffmpegがサポートするターゲット形式","del_f":"選択したファイルを削除しますか?","输入目录名":"ディレクトリ名を入力","cut_ovr":"切り取り(上書き)を確認","cp_ovr":"コピー(上書き)を確認","修改名字":"名前を変更","输入新名字":"新しい名前を入力","个文件正在上传":"個のファイルがアップロード中","确定删除":"削除を確定","是否删除":"削除しますか?","输入文本名":"テキスト名を入力","添加索引":"インデックスを追加","物理核心":"物理コア","创建目录":"ディレクトリを作成","访问目录":"ディレクトリにアクセス","mac_dst":"ターゲットデバイスのMACアドレス","要代理的url":"プロキシするURL","系统代理端口":"システムプロキシポート","返回":"戻る","不允许为空":"空にできません","ff_none":"ffmpegが見つかりません","disk":"ディスク","part":"パーティション","lvm":"論理ボリューム管理","网址":"ウェブサイトURL","环境":"環境","外部软件":"外部ソフトウェア","保护路径":"保護パス","软件":"ソフトウェア","是否安装":"インストールされていますか?","角色管理":"ロール管理","用户管理":"ユーザー管理","角色id":"ロールID","角色名":"ロール名","用户id":"ユーザーID","用户名":"ユーザー名","目录范围":"ディレクトリ範囲","可执行的命令":"実行可能なコマンド","禁止目录范围":"禁止ディレクトリ範囲","可执行命令":"実行可能なコマンド","系统进程关闭":"システムプロセスを終了","dc_ctdl":"Dockerコンテナを停止、削除","dc_idl":"Dockerイメージを削除","tk_time":"トークン時間を変更","自定义资源路由":"カスタムリソースルート","磁盘挂载":"ディスクをマウント","ssh_sv":"SSHキーをディスクに保存","外部软件路径":"外部ソフトウェアのパス","log_del":"ファイルを削除、切り取り、名前変更","内容更新":"内容更新","标签编辑权限":"タグ編集権限","ssh代理":"SSHプロキシ","http代理":"HTTPプロキシ","浏览器代理":"ブラウザプロキシ","rdp代理":"RDPプロキシ","rtsp播放器":"RTSPプレーヤー","角色":"ロール","文件回收站":"ゴミ箱","个人保护路径":"個人保護パス","系统保护路径":"システム保護パス","小于一分钟":"1分未満","分钟前":"分前","小时前":"時間前","天前":"日前","月前":"月前","年前":"年前","挂载位置磁盘":"マウント位置のディスク","信息":"情報","磁盘剩余":"ディスク残量","文件系统":"ファイルシステム","文件夹数":"フォルダ数","文件数":"ファイル数","当前位置":"現在の位置","输入文件名":"ファイル名を入力","o_stdo":"Studioで開く","o_img":"画像エディタで開く","预览图片":"画像をプレビュー","运行并实时查看":"実行してリアルタイムで表示","实时查看":"リアルタイムで表示","输入参数运行":"パラメータを入力して実行","以文本打开":"テキストとして開く","以日志打开":"ログとして開く","上传":"アップロード","文件选项":"ファイルオプション","添加类目":"カテゴリを追加","全部编辑":"すべて編集","输入类目名":"カテゴリ名を入力","折叠":"折りたたむ","全部折叠":"すべて折りたたむ","(无内容)":"(コンテンツなし)","请求头":"リクエストヘッダー","请求体":"リクエストボディ","值":"値","上传文件":"ファイルをアップロード","下载到本地目录":"ローカルディレクトリにダウンロード","本地地址":"ローカルアドレス","完成":"完了","结束":"終了","响应头":"レスポンスヘッダー","正在下载":"ダウンロード中","输入标签名":"タグ名を入力","frm_lm":"フォームにファイルが含まれているため、ブラウザの制限により追加できません。","非对称密钥":"非対称鍵","将覆盖密钥文件":"鍵ファイルを上書きします","加密算法":"暗号化アルゴリズム","输出格式":"出力形式","普通PEM":"通常のPEM","生成":"生成","ssh_dir":".sshディレクトリに保存","私钥":"秘密鍵","时间转换器":"時間変換ツール","格式化时间":"時間をフォーマット","毫秒":"ミリ秒","分秒":"分と秒","实时信息":"リアルタイム情報","运行用户":"実行ユーザー","当前系统":"現在のシステム","进程":"プロセス","ld_wait":"読み込み中、お待ちください...","选中":"選択中","创建用户":"ユーザーを作成","升序":"昇順","降序":"降序","dc_nne":"Dockerが検出されません。ホストにDockerがインストールされていないか、コンテナが空の可能性があります。","过滤镜像":"イメージをフィルタリング","列表更新":"リストを更新","执行命令":"コマンドを実行","打印日志":"ログを出力","删除容器":"コンテナを削除","删除镜像":"イメージを削除","doc_img":"Dockerイメージ","doc_icf":"選択したイメージを削除しますか?","系统运行于":"システムは次で動作しています","全局变量":"グローバル変数","up_conc":"ファイルアップロードの最大同時実行数制限","单用户并发数量":"単一ユーザーの同時実行数","系统并发数量":"システムの同時実行数","big_res":"大きなファイルのブレークポイントを有効にするか?","big_sz":"大きなファイルの判断サイズ(MB)","大文件并发数量":"大きなファイルの同時実行数","big_ck":"大きなファイルのブロックサイズ(MB)","页面资源路由":"ページリソースルート","wf_rt":"ワークフロートリガールート","过期时间(s)":"有効期限(s)","文件路径":"ファイルパス","path_up":"システム保護パスの更新","path_md":"PATHパスの変更","执行用户":"実行ユーザー","执行":"実行","wf_api":"ワークフロートリガーAPIの変更","up_lim":"ディレクトリのファイルアップロード数制限の変更","功能权限":"機能権限","角色备注":"ロール備考","pxy_off":"HTTPプロキシダウンロードを無効化","工具功能":"ツール機能","全局变量设置":"グローバル変数設定","文件回收站修改":"ゴミ箱を変更","文件权限":"ファイル権限","log_wr":"ファイルを作成、アップロード、内容更新、解凍","只读目录范围":"読み取り専用ディレクトリ範囲","更新":"更新","use_env":"デフォルトで環境変数を使用","sync_sv":"選択したサーバーに情報を同期","add_rot":"HTTPリソースのルートディレクトリを追加","dl_here":"このディレクトリでHTTPリソースをダウンロード","文件排序":"ファイルを並べ替える","系统默认":"システムデフォルト","修改时间":"更新時間","时间逆序":"時間の逆順","时间顺序":"時間の順序","大小逆序":"サイズの逆順","大小顺序":"サイズの順序","文件大小":"ファイルサイズ","网站标题":"ウェブサイトタイトル","通用设置":"一般設定","主题":"テーマ","时区":"タイムゾーン","时间":"時間","服务器时间":"サーバー時間","在线时间":"オンライン時間","离线时间":"オフライン時間","在线":"オンライン","离线":"オフライン","功能文档":"機能ドキュメント","官网地址":"https://filecat.xiaobaidadada.fun/","远程代理":"リモートプロキシ","系统管理":"システム管理","网址导航":"ウェブサイトナビゲーション","目录快捷命令":"ディレクトリショートカットコマンド","文件快捷命令":"ファイルショートカットコマンド","系统网络":"システムネットワーク","复制名字":"名前をコピー","分享":"共有","复制绝对路径":"絶対パスをコピー","复制相对路径":"相対パスをコピー","切换目录":"ディレクトリを切り替え","统计信息":"統計情報","更新AI知识库":"AIナレッジベースを更新","exp_hr":"残り有効時間(時間)","可以为空":"空でも可","自动加载":"自動読み込み","本地知识库":"ローカルナレッジベース","知识库加载信息":"ナレッジベース読み込み情報","最近一次加载":"直近の読み込み","加载进度":"読み込み進捗","总文件数量":"総ファイル数","总文件字符数量":"総ファイル文字数","总文件大小":"総ファイルサイズ","总耗时":"総所要時間","上一页":"前のページ","目标地址":"ターゲットアドレス","目标端口":"ターゲットポート","连接状态":"接続状態","个人设置":"個人設定","系统设置":"システム設定","文件后缀":"ファイル拡張子","禁止执行的命令":"禁止コマンド","Ai 配置":"AI設定","文件分享":"ファイル共有","输入跳转的目录":"移動先ディレクトリを入力","文件分享列表":"ファイル共有リスト","过期小时":"有効期限(時間)","下载次数":"ダウンロード回数","剩余时间":"残り時間","文件加载方式":"ファイル読み込み方法","全部加载文件":"すべてのファイルを読み込む","scrll_l":"ページスクロールでファイルを読み込む","剩余时间(h)":"残り時間 (h)","网络代理":"ネットワークプロキシ","个人":"個人","安装方式":"インストール方法","是否开启":"有効","系统启动执行":"システム起動時に実行","表达式":"式","用户":"ユーザー","详细信息":"詳細情報","服务器配置":"サーバー設定","客户端列表":"クライアント一覧","更多服务器":"その他のサーバー","端口映射":"ポートマッピング","序号":"番号","服务器端口":"サーバーポート","转发客户端名称":"転送クライアント名","服务端口":"サービスポート","转发ip":"転送IP","转发端口":"転送ポート","客户端代理配置":"クライアントプロキシ設定","客户端桥接配置":"クライアントブリッジ設定","远程地址":"リモートアドレス","在线时长":"オンライン時間","fwd_nm":"転送クライアント名","sv_ntf":"保存してクライアントに最初のキーとポートを通知","br_port":"ブリッジサーバーポート一覧","输入消息":"メッセージを入力","用户权限":"ユーザー権限","系统管理权限":"システム管理権限","网络功能权限":"ネットワーク機能権限","Ai 设置权限":"AI設定権限","系统设置权限":"システム設定権限","系统环境设置":"システム環境設定","sys_env":"システム環境設定ページ","自定义路由页面":"カスタムルートページ","代理功能":"プロキシ機能","其他功能":"その他の機能","ddns":"DDNS","ai_page":"AIチャットページ","pty cmd":"PTYコマンド","wf_run":"ワークフロー実行","wf_user":"ワークフロー実行ユーザー","cmd_rst":"filecat-restart 再起動コマンド","cmd_upg":"filecat-upgrade 更新コマンド","cmd_dwn":"filecat-down メインプロセス終了コマンド","cmd_ai":"AIコマンド(AIチャット)","个性化设置":"個人情報設定","个人环境":"個人環境","系统环境":"システム環境","持久化":"永続化","lgn_usr":"ログイン時にユーザー情報を表示","個人環境設定":"個人環境設定","其他参数":"その他のパラメータ","父编号":"親ID","代理配置":"プロキシ設定","桥接配置":"ブリッジ設定","brg_tip":"クライアントにポートを設定します。このポートにアクセスすると、別のクライアントのネットワーク環境内にある最初のアドレスへトラフィックが転送されます。","内网穿透":"イントラネット穿透","fc_pxy":"Filecatプロキシアクセス","fc_pxyw":"サーバーfrontendを使用したFilecatプロキシアクセス","fc_pxyr":"カスタムFilecatプロキシアドレス","fc_pxyc":"filecatプロキシURLをコピー","fc_pxyo":"filecatプロキシURLを開く","对端账号":"対向アカウント","对端密码":"対向パスワード","保存账号":"アカウントを保存","验证登录":"ログインを確認","已设置":"設定済み","未设置":"未設定","便于辨认的名字":"分かりやすい名前","对端 FileCat 登录名":"対向 FileCat ログイン","留空表示不修改":"空欄なら変更しない","请填写对端账号":"対向アカウントを入力してください","已保存":"保存しました","原客户端":"元のクライアント","原目录":"元のディレクトリ","目标客户端":"ターゲットクライアント","目标目录":"ターゲットディレクトリ","忽略目录":"無視するディレクトリ","双向同步":"双方向同期","客户端文件同步":"クライアントファイル同期","客户端设置":"クライアント設定","pxy_nln":"ローカル (イントラネット) アドレスにプロキシサーバーを使用しない","忽略ip":"IPを無視","ai_ask":"すべてをサーバーに問い合わせる","本地目录":"ローカルディレクトリ","响应体":"レスポンスボディ","客户端功能":"クライアント機能","全量同步":"全量同期","公钥":"公開鍵","跟随系统":"システム設定に従う","字符消耗统计":"文字消費統計","加载中...":"読み込み中...","对话轮次":"会話ラウンド","AI输入字符":"AI入力文字数","AI输出字符":"AI出力文字数","暂无统计数据":"統計データがありません","会话":"セッション","新会话":"新規セッション","提示词":"プロンプト","llm_pmt":"LLM編集プロンプト","LLM编辑开关":"LLM編集スイッチ","编辑规则":"編集ルール","选择系统提示词":"システムプロンプトを選択","清空全部会话":"すべてのセッションをクリア","cf_all":"すべてのチャットセッションを削除しますか?","cf_msgs":"選択したメッセージを削除しますか?","cf_ses":"選択したセッションを削除しますか?","cf_one":"このメッセージを削除しますか?","批量选择":"一括選択","查看所有用户会话":"全ユーザーの会話","查看全部会话时不可发送消息":"全会話を表示中はメッセージを送信できません","仅看我的会话":"自分の会話のみ","取消批量选择":"一括選択解除","删除选中消息":"選択メッセージを削除","删除选中会话":"選択セッションを削除","切换模型":"モデル切替","添加文件":"ファイルを追加","无描述":"説明なし","暂无工具":"ツールがありません","查看工具":"ツールを表示","加载工具":"ツールを読み込む","系统会话提示词":"システムセッションプロンプト","删除记录":"レコードを削除","手动加载":"手動読み込み","从索引删除":"インデックスから削除","知识库开关":"ナレッジベーススイッチ","文本对话":"テキスト対話","图片生成":"画像生成","向量嵌入":"ベクトル埋め込み","图片参数设置":"画像パラメータ設定","更多属性":"その他の属性","model类型":"モデルタイプ","成为tool":"ツールになる","操作":"操作","查看Git提交":"Gitコミットを表示","Git":"Git","变更":"Changes","提交记录":"Commits","全选":"Select All","没有变更":"No changes","暂无提交记录":"No commits yet","分支":"Branch","git_msg":"Enter commit message...","提交":"コミット","暂存全部":"Stage All","暂存选中":"Stage Selected","取消暂存":"Unstage","已暂存":"Staged","已暂存全部":"All staged","已取消暂存":"Unstaged","请输入提交信息":"Please enter commit message","提交成功":"Commit successful","推送成功":"Push successful","拉取成功":"Pull successful","切换分支成功":"Branch switched","远程操作":"Remote Operations","拉取":"Pull","推送":"Push","强制推送":"Force Push","暂存工作区":"Stash","暂存工作区成功":"Stash successful","恢复工作区":"Stash Pop","恢复工作区成功":"Stash pop successful","刷新":"Refresh","请先选择文件":"Please select files first","提示:":"Tips:","git_stg":"Check files on the left, then use \\"Stage Selected\\" to add them to staging area","git_cmt":"Enter commit message and click \\"Commit\\"","git_cf":"If conflicts occur, please resolve them in shell before committing","git_frc":"\\"Force Push\\" will overwrite the remote branch, use with caution","配置表":"Config Table","自动升级":"自動アップグレード","exe_tpl":"EXE ダウンロードURLテンプレート","offcal":"空のままにすると公式 GitHub Releases を使用","检测频率(秒)":"チェック間隔(秒)","def_180":"デフォルト180秒(3分)","chk_10s":"チェック間隔は10秒未満にできません","ver_url":"バージョンチェックURL","ver_req":"バージョンチェックURLは空にできません","用户配置":"ユーザー設定","邮箱":"メール","代理设置":"プロキシ設定","全局代理":"グローバルプロキシ","仓库代理":"リポジトリプロキシ","修改":"編集","用户配置已保存":"ユーザー設定を保存しました","代理配置已保存":"プロキシ設定を保存しました","pxy_clr":"空欄でプロキシをクリア","pxy_nte":"ユーザー設定とグローバルプロキシはすべてのリポジトリに適用されます","pxy_url":"HTTPプロキシアドレス","pxy_tip":"filecatシステムが発行するHTTPリクエスト(バージョン確認、自動アップグレード、DDNS、コマンドダウンロード、カスタムルーティングなど)に適用されます。注意:macOSでシステムプロキシがすでに有効な場合は、二重プロキシを避けるためにここは空にしてください。","端口扫描":"ポートスキャン","目标主机":"ターゲットホスト","起始端口":"開始ポート","结束端口":"終了ポート","并发数":"同時実行数","超时(ms)":"タイムアウト(ms)","扫描":"スキャン","扫描结果":"スキャン結果","扫描完成":"スキャン完了","扫描失败":"スキャン失敗","正在扫描...":"スキャン中...","未发现开放端口":"オープンポートが見つかりません","scan_in":"パラメータを入力してスキャンをクリック","hostreq":"ホストアドレスは必須です","端口范围无效":"無効なポート範囲","portrng":"開始ポートは終了ポートより大きくできません","开放":"オープン","总计扫描":"スキャン総数","已发现":"発見","当前":"現在","扫描已取消":"スキャンがキャンセルされました","自动换行":"自動改行","不换行":"改行しない","替换":"置換","env编辑":"env編集","命令确认":"コマンド確認","命令检测开启":"コマンド検出を有効化","命令检测关闭":"コマンド検出を無効化","命令检测已开启":"コマンド検出を有効にしました","命令检测已关闭":"コマンド検出を無効にしました","此会话不再询问":"このセッションでは再度確認しない","doc_pxy":"Docker プロキシ設定","HTTP 代理":"HTTP プロキシ","pxy_htt":"HTTPS プロキシ","pxy_nne":"No Proxy","保存失败":"保存に失敗しました","MD编辑器":"MD エディタ","行":"行","列":"列","默认":"既定","删除行":"行を削除","删除列":"列を削除","上方插入行":"上に行を挿入","切换表头行":"ヘッダー行を切り替え","合并单元格":"セルを結合","拆分单元格":"セルを分割","下方插入行":"下に行を挿入","左侧插入列":"左に列を挿入","右侧插入列":"右に列を挿入","插入表格":"表を挿入","加载中":"読み込み中","打开失败":"開けませんでした","重启失败":"再起動に失敗しました","doc_cfg":"Docker 設定","名单视图":"リスト表示","文本视图":"テキスト表示","目标(To)":"宛先(To)","动作":"アクション","fw_from":"送信元(From)","删除规则":"ルールを削除","规则编号":"ルール番号","点击复制":"クリックでコピー","镜像加速":"レジストリミラー","不安全仓库":"安全でないレジストリ","开启调试":"デバッグを有効にする","数据存储目录":"データルート","存储驱动":"ストレージドライバー","日志驱动":"ログドライバー","fw_iptb":"iptables を有効にする","lve_rst":"ライブリストア","添加规则":"ルールを追加","请填写端口号":"ポートを入力してください","方向":"方向","协议":"プロトコル","来源地址":"送信元アドレス","获取失败":"取得失敗","进程环境变量":"プロセス環境変数","端口实例":"ポートインスタンス","srchbln":"空白検索モードでディレクトリを開く","搜索会话":"セッションを検索","sw_mdl":"AI モデルの切り替えを許可","选择模型":"モデルを選択","mv_self":"フォルダを自身の中に移動することはできません","网站 Logo":"サイトロゴ","lclorur":"ローカルファイルパスまたは http(s) 画像URL","全部":"すべて","源码模式":"ソースモード","实时编辑模式":"ライブ編集モード","编辑器设置":"エディター設定","正文最大宽度":"本文の最大幅","正文左右边距":"本文の左右余白","正文字号":"本文の文字サイズ","行高":"行の高さ","恢复默认":"既定値に戻す","保存中":"保存中","预览":"プレビュー","nprmtp":"この設定を変更する権限がありません。以下は現在の構成です。","md_set":"MDエディター設定","目录挂载":"ディレクトリマウント","总开关":"マスタースイッチ","挂载":"マウント","挂载到网盘":"クラウドにマウント","编辑挂载配置":"マウント設定を編集","取消挂载":"マウント解除","确认取消挂载":"マウント解除の確認","已取消挂载":"マウントを解除しました","该目录尚未挂载":"このディレクトリはマウントされていません","挂载目录":"マウントディレクトリ","只读":"読み取り専用","挂载类型":"マウント種別","显示名称":"表示名","标识色":"識別色","只读模式":"読み取り専用モード","测试连接":"接続テスト","测试中":"テスト中","连接成功":"接続に成功しました","连接失败":"接続に失敗しました","请选择挂载类型":"マウント種別を選択してください","请填写":"入力してください:","未授权":"未認証","服务地址":"サーバーアドレス","起始目录":"開始ディレクトリ","留空表示根目录":"空欄の場合はルートディレクトリ","主机":"ホスト","默认 22":"既定 22","私钥内容":"秘密鍵の内容","与私钥二选一":"秘密鍵といずれか一方を入力","与密码二选一":"パスワードといずれか一方を入力","存储桶":"バケット","区域":"リージョン","强制路径风格":"パス形式を強制","授权账号":"認証アカウント","百度网盘授权":"Baidu ネットディスク認証","去授权":"認証する","完成授权":"認証を完了","授权码":"認証コード","回调地址":"リダイレクト URI","rqappky":"AppKey を入力してください","rq_scrt":"SecretKey を入力してください","请填写授权码":"認証コードを入力してください","svappfr":"先にアプリ設定を保存してください","授权成功":"認証に成功しました","账号可用":"アカウントは利用可能です","账号不可用":"アカウントを利用できません","校验":"検証","已授权账号":"認証済みアカウント","已删除":"削除しました","处理中":"処理中","AppKey":"AppKey","网盘挂载":"クラウドマウント","凭据管理":"認証情報","凭据":"認証情報","新增凭据":"認証情報を追加","凭据已丢失":"認証情報が見つかりません","挂载列表":"マウント一覧","新增挂载":"マウントを追加","munt_rq":"マウントディレクトリは必須です","请选择凭据":"認証情報を選択してください","请选择类型":"タイプを選択してください","启用":"有効","已停用":"無効","确认删除":"削除の確認:","nmuntpr":"現在のアカウントにはディレクトリマウントの権限がありません","百度网盘":"Baidu ネットディスク","应用配置":"アプリ設定","授权":"認証","授权失败":"認証に失敗しました","strtdrt":"開始ディレクトリ","ftr2rmt":"リモートへ転送","ftr2rmt_tip":"このディレクトリのターミナル、ワークフロー、git のリクエストはリモートの FileCat で実行されます","授权检测":"認証チェック","scrtkep":"SecretKey を空にすると変更しません","编辑应用":"アプリを編集","新增授权账号":"認証アカウントを追加","一键授权":"ワンクリック認証","outh_ob":"手動(oob)","pst_cd":"認証コードを貼り付け","确认授权":"認証を確定","授权检测/刷新":"検証/更新","检测完成":"検証が完了しました","导入":"インポート","账号名":"アカウント名","百度账号":"Baidu アカウント","网盘昵称":"ネットディスクのニックネーム","授权状态":"認証状態","过期时间":"有効期限","授权时间":"認証日時","已授权":"認証済み","已过期":"期限切れ","停用":"無効化","已配置":"設定済み","未配置":"未設定","网盘使用":"ネットディスク使用","自动刷新":"自動更新","编辑账号":"アカウントを編集","使用":"使用","当前为挂载目录":"マウントディレクトリ","启用挂载":"マウントを有効化","已启用":"有効","挂载已启用":"マウントを有効化しました","挂载已停用":"マウントを無効化しました","muntont":"マウント有効、クリックで無効化","muntoff":"マウント無効、クリックで有効化","凭证管理":"認証情報","授权方式":"認証方式","去授权(一键)":"認証する(ワンクリック)","去授权(手动)":"認証する(手動)","保存应用配置":"アプリ設定を保存","atathtp":"ワンクリック:認証後は自動的にこのページに戻り、アカウントが自動的に追加されます","atathnt":"ワンクリックには、Baiduコンソールで本サービスの /mount/baidu/callback をリダイレクトURIとして登録する必要があります","pstatht":"手動:リダイレクトURIは不要です。認証後にBaiduのページでコードをコピーし、下に貼り付けて「認証を完了」をクリックしてください","crd_tp":"認証情報はクラウドストレージ/リモートホストへ接続するためのアカウント情報です。複数のマウントで共有でき、一度の変更がすべてに反映されます。","bidacct":"Baidu Netdisk のアカウントはここでは管理しません。下の「Baidu Netdisk」パネルで認証してください。認証後に該当アカウントが自動生成されます。","pwdkept":"編集時、パスワード系の項目を空にすると元の値が維持されます。","tstbfrs":"保存前に「接続テスト」をクリックしてアカウントが使用可能か確認できます。","prtwbdv":"汎用的なファイルプロトコルで、堅果雲・Synology NAS・Nextcloud・Alist などが対応しています。サービスURLとアカウントだけで相手のディレクトリにアクセスできます。","prtsftp":"SSH 経由でリモートサーバーのディレクトリにアクセスし、SFTP サブシステムでファイルを転送します。別の Linux マシンのディレクトリをマウントするのに適しています。","prt_s3":"S3 プロトコルで接続するオブジェクトストレージサービス(MinIO、Alibaba Cloud OSS、Tencent COS、Qiniu、Cloudflare R2 など)。エンドポイント、バケット、キーペアが必要です。","深搜":"深層検索","搜索":"検索","搜索中":"検索中","范围":"範囲","结果过多":"結果が多すぎます。キーワードを絞ってください","已显示":"表示中","搜文件名":"ファイル名を再帰検索","搜到该处":"フォルダへ移動","打开所在目录":"フォルダを開く","输入后搜":"ファイル名を入力して Enter","无匹配":"一致するファイルがありません","结果截断":"結果が多すぎます。先頭 500 件","缩放调整":"ズーム調整","缩放调整成功":"ズーム調整に成功しました","缩放百分比":"ズームパーセント","未加载":"未読み込み","加载成功":"読み込み完了","加载失败":"読み込み失敗","个工具":"個のツール","No share found":"共有が見つかりません","Enter host first":"先にホストを入力してください","下一步":"次へ","上一步":"前へ","共享目录":"共有フォルダ","prt_smb":"Windows 共有フォルダー(SMB/CIFS)。ホストとアカウントを入力すると共有名を選択できます。","prt_bd":"Baidu Netdisk。Baidu 開放プラットフォームでアプリを作成し、AppKey / SecretKey を入力してアカウントを認証します。","没有找到共享":"共有が見つかりません","粘贴授权码 code":"認証コードを貼り付け","重新授权":"再認証","请选择账号":"アカウントを選択してください","请填写备注":"備考を入力してください","账号已丢失":"アカウントが見つかりません","已暂存的更改":"ステージ済みの変更","全部暂存":"すべてステージ","全部取消暂存":"すべてステージ解除","暂存":"ステージ","无差异":"差分なし","二进制文件":"バイナリファイル","单栏":"統合表示","并排":"並べて表示","点击左侧文件查看差异":"左側のファイルをクリックして差分を表示","未跟踪文件无差异":"未追跡ファイルには差分がありません","请先暂存要提交的文件":"先にコミットするファイルをステージしてください","没有已更改的文件":"変更されたファイルはありません","未暂存":"未ステージ","逐行归属":"行の履歴","无法读取该文件的归属信息":"このファイルの履歴を読み取れません","全部文件":"すべてのファイル","新建分支":"新しいブランチ","删除分支":"ブランチを削除","确认删除分支":"ブランチを削除しますか?","合并到此分支":"このブランチにマージ","新分支名":"新しいブランチ名","当前分支":"現在のブランチ","切换到":"切り替え","分支创建成功":"ブランチを作成しました","分支删除成功":"ブランチを削除しました","合并成功":"マージしました","标签":"タグ","新建标签":"新しいタグ","标签名":"タグ名","暂无标签":"タグがありません","标签创建成功":"タグを作成しました","标签删除成功":"タグを削除しました","标签推送成功":"タグをプッシュしました","删除标签":"タグを削除","确认删除标签":"タグを削除しますか?","请输入标签名":"タグ名を入力してください","推送到远程":"リモートにプッシュ","基于提交":"コミットに基づく","基于当前提交":"現在のコミットに基づく","暂存工作区记录":"スタッシュ一覧","暂无记录":"記録がありません","恢复并删除":"適用して削除","已恢复并删除记录":"復元して削除しました","已应用":"適用しました","远程分支":"リモートブランチ","拉取远程信息":"取得","拉取并清理已删除分支":"取得して整理","未配置远程仓库":"リモートが設定されていません","签出到本地":"ローカルにチェックアウト","拉取完成":"取得が完了しました","冲突":"競合","采用我方版本":"自分の変更を採用","采用对方版本":"相手の変更を採用","标记已解决":"解決済みにする","标记全部已解决":"マージを完了","放弃合并":"マージを中止","确认放弃当前合并并恢复到操作前状态":"中止して以前の状態に戻しますか?","已解决冲突":"競合を解決しました","已放弃合并":"マージを中止しました","合并已完成":"マージが完了しました","撤销提交":"コミットを取り消す","将生成一个反向提交来撤销":"取り消し用の逆コミットを作成します","已撤销":"取り消しました","摘取提交":"チェリーピック","将该提交应用到当前分支":"このコミットを現在のブランチに適用","摘取成功":"チェリーピックしました","搜索提交":"コミットを検索","提交信息关键词":"コミットメッセージ","作者":"作成者","请输入搜索条件":"検索条件を入力してください","操作历史":"操作履歴","回退到此处":"ここにリセット","强制回退(丢弃改动)":"強制リセット(変更を破棄)","此操作将永久丢弃未提交的改动":"未コミットの変更が完全に破棄されます","已回退":"リセットしました","已强制回退":"強制リセットしました","子模块":"サブモジュール","无子模块":"サブモジュールがありません","初始化并更新子模块":"サブモジュールを初期化して更新","子模块更新完成":"サブモジュールを更新しました","未初始化":"未初期化","与记录不一致":"記録と一致しません","正常":"正常","当前提交":"現在のコミット","领先上游":"上流より進んでいます","落后上游":"上流より遅れています","钩子":"フック","停用钩子":"フックを無効化","确认删除并停用":"削除して無効化しますか","保存并启用":"保存して有効化","已保存并启用":"保存して有効化しました","与工作区对比":"作業ツリーと比較","仓库":"リポジトリ","初始化仓库":"リポジトリを初期化","克隆仓库":"リポジトリをクローン","仓库初始化成功":"リポジトリを初期化しました","克隆成功":"クローンしました","目录名":"ディレクトリ名","请输入目录名":"ディレクトリ名を入力してください","仓库地址":"リポジトリURL","请输入仓库地址":"リポジトリURLを入力してください","当前目录下没有仓库":"ここにリポジトリがありません","进入":"開く","修改最后一次提交":"最後のコミットを修正","已修改最后一次提交":"最後のコミットを修正しました","分支比较":"ブランチを比較","两个分支没有差异":"ブランチ間に差分はありません","确认删除远程分支":"リモートブランチを削除","该分支会从远程仓库删除":"このブランチはリモートリポジトリから削除されます","删除远程分支":"リモートブランチを削除","将":"マージ","合并到":"に","未推送":"未プッシュ","已到底部":"これ以上なし","没有可提交的更改":"コミットする変更がありません","存在未暂存的改动,是否一并暂存并提交?":"ステージされていない変更があります。まとめてステージしてコミットしますか?","二进制文件无法比较":"バイナリファイルは比較できません","请选择文件查看改动":"ファイルを選択して変更を表示","clk_edt":"クリックして編集","rendering":"レンダリング中…","思维导图":"マインドマップ","新窗口打开":"新しいタブで開く","已选":"選択済み","复制所选":"選択をコピー","删除所选":"選択を削除","全部复制":"すべてコピー","多选":"選択","wbvpn_allow":"WebVPN ターゲット許可リスト","wbvpn_allow_ph":"1 行 1 エントリ: 192.168.1.0/24 (CIDR) / 192.168.1.1 (IP) / router.local (ドメイン、完全一致、サブドメイン不可)","wbvpn_tip":"WebVPN ターゲット許可リスト。1 行に 1 エントリ、3 つの形式があります:\\n · CIDR 範囲: 192.168.1.0/24\\n · 完全な IP: 192.168.1.1 (10.0.0.5、fd00::/8、::1 も可)\\n · 完全なドメイン: router.local、nas.example.com (完全一致、サブドメインは含まれません)\\nパブリックアドレスはデフォルトで許可。プライベート、ループバック、リンクローカル、クラウドメタデータ (169.254.169.254) 等の制限アドレスはデフォルトで禁止です。不正な行は無視されます。","wbvpn_port_range":"プロキシポート範囲","wbvpn_port_tip":"各ターゲットは独立したポートを使用します。アクセス URL を開くとそのサイトを閲覧できます。パスはそのままなので SPA ルーティングが正常に動作し、サイトは Origin ごとに分離されます。","wbvpn_port_tip2":"アクセスにはログインが必要です。ここから開くと一度トークンが付与され、以降は Cookie でセッションを維持します。ターゲットは引き続き許可リスト/アドレスポリシーの対象です。","wbvpn_port_tip3":"ページ内のリンクが【有効なターゲット】を指す場合、そのターゲットのポートに自動で書き換えられ、クリック後もプロキシ内に留まります。ターゲットに設定されていないドメインは変更されません。","网页代理目标":"プロキシ対象","访问地址":"アクセス URL","打开":"開く","已复制":"コピーしました","复制失败":"コピーに失敗しました","添加成功":"追加しました","目标地址不能为空":"対象アドレスを入力してください","目标地址例如":"対象アドレス(例: 192.168.1.1:8080)","网页代理":"ウェブプロキシ","当前窗口打开":"現在のタブで開く","修改成功":"更新しました","浏览器代理编辑":"ブラウザプロキシ編集","已禁用":"無効","prt_local":"ローカルディレクトリ。このマシンに既存の絶対パスをソースとして指定すると、マウント後に filecat 内でディレクトリリンクとしてアクセスできます。","移动到最上":"最上部へ移動","移动到最下":"最下部へ移動","会话设置":"セッション設定","服务器工作目录":"サーバーの作業ディレクトリ","服务器工作目录提示":"例:D:\\\\projects\\\\myapp","AI 聊天":"AI チャット","动态域名解析":"ダイナミックDNS","平台":"プロバイダー","账号凭证":"認証情報","域名绑定":"ドメイン紐付け","IP 来源":"IP取得元","域名":"ドメイン","多个域名用空格分隔":"複数のドメインはスペースで区切る","绑定":"紐付け","填写格式":"書式","请填写账号凭证":"認証情報を入力してください","确定删除吗":"削除しますか?","ddns_help_1":"DDNS を設定すると、DNS レコードを現在のグローバル IP に自動更新できます。","ddns_help_2":"IP 取得元はローカルNICとカスタム HTTP エンドポイントに対応しています。","请输入地址":"URLを入力してください","IP 来源管理":"IP取得元の管理","暂无数据":"データなし","http_source_tip":"IP ソースを追加します。グローバル IP を返す HTTP エンドポイント(例: https://4.ipw.cn)または固定 IP を指定できます。","同步间隔":"同期間隔","账号状态":"アカウント","上次同步":"最終同期","验证":"検証","未验证":"未検証","失败":"失敗","同步完成":"同期完了","间隔不能小于 10 秒":"間隔は10秒以上必要です","文字":"テキスト","请填写完整的账号凭证":"すべての認証情報を入力してください","加载时间线失败":"タイムラインの読み込みに失敗しました","展开编辑":"編集を表示","收起编辑":"編集を非表示","添加阶段":"フェーズを追加","上移":"上へ移動","下移":"下へ移動","起始时间":"開始時間","结束时间":"終了時間","阶段倒置":"フェーズを反転","在阶段前插入":"前に挿入","在阶段后插入":"後に挿入","拖动排序":"ドラッグで並べ替え","导出 SVG":"SVG を書き出す","折叠全部阶段":"すべてのフェーズを折りたたむ","展开全部阶段":"すべてのフェーズを展開","导出图片":"画像としてエクスポート","导出图片失败":"画像のエクスポートに失敗しました","撤销":"元に戻す","重做":"やり直す","缩小":"縮小","放大":"拡大","重置缩放":"ズームをリセット","进入编辑模式":"編集モードに入る","退出编辑模式":"編集モードを終了","事件":"イベント","标题":"タイトル","描述":"説明","日期":"日付","左侧":"左","右侧":"右","颜色":"色","自定义颜色":"カスタムカラー","跟随阶段":"フェーズに従う","拖动事件气泡可改变位置与所属阶段":"バブルをドラッグして位置とフェーズを変更","删除事件":"イベントを削除","在左侧添加事件":"左側にイベントを追加","在右侧添加事件":"右側にイベントを追加","删除阶段":"フェーズを削除","阶段":"フェーズ","阶段头":"フェーズヘッダー","显示":"表示","隐藏":"非表示","拖动阶段头可调整顺序":"ヘッダーをドラッグして並べ替え","用上移下移调整事件顺序,用左右切换事件所在侧":"上下移動でイベントの順序を、左右でイベントの表示側を切り替えます","拖动调整阶段高度":"ドラッグでフェーズの高さを調整","未命名":"無題","有未保存的修改,确定要关闭吗?":"保存されていない変更があります。閉じますか?","纵向":"縦方向","横向":"横方向","节点样式":"ノードスタイル","圆点":"ドット","圆形":"円形","方形":"四角","图片":"画像","卡片样式":"カードスタイル","卡片":"カード","朴素":"シンプル","气泡":"吹き出し","连线风格":"線スタイル","实线":"実線","虚线":"破線","点线":"点線","显示连线":"接続線を表示","上侧":"上側","下侧":"下側","添加事件":"イベントを追加","图片地址":"画像URL","拖动调整卡片宽度":"ドラッグでカード幅を調整","拖动调整连线长度":"ドラッグで接続線の長さを調整","隐藏阶段头":"フェーズヘッダーを非表示","显示阶段头":"フェーズヘッダーを表示","时间线":"タイムライン","添加子节点":"子ノードを追加","添加同级节点":"兄弟ノードを追加","删除节点":"ノードを削除","插入图片":"画像を挿入","插入图标":"アイコンを挿入","插入超链接":"ハイパーリンクを挿入","节点备注":"ノードのメモ","结构":"構造","逻辑结构图":"論理構造図","组织结构图":"組織図","目录组织图":"カタログ図","时间轴(左)":"タイムライン(左)","时间轴(下)":"タイムライン(下)","时间轴(上)":"タイムライン(上)","时间轴(竖)":"タイムライン(縦)","鱼骨图":"フィッシュボーン","鱼骨图(右)":"フィッシュボーン(右)","曲线":"曲線","直线":"直線","直连":"直接","默认主题":"デフォルト","经典":"クラシック","暗色":"ダーク","极简":"ミニマル","缤纷":"カラフル","请先选中一个节点":"先にノードを選択してください","请输入链接地址":"リンクURLを入力","加载思维导图失败":"マインドマップの読み込みに失敗","编辑器尚未就绪":"エディタの準備ができていません","中心主题":"中心トピック","适应窗口":"ウィンドウに合わせる","插入父节点":"親ノードを挿入","粘贴":"貼り付け","节点标签":"ノードタグ","请输入节点备注":"ノードのメモを入力","请输入节点标签,多个用逗号分隔":"タグを入力(カンマ区切り)","添加概要":"要約を追加","删除概要":"要約を削除","请先选中要合并的节点(按住 Ctrl 拖框可多选)":"統合するノードを選択してください(Ctrl+ドラッグで複数選択)","删除图标":"アイコンを削除","删除备注":"メモを削除","删除超链接":"リンクを削除","供应商设置":"プロバイダー設定","默认model":"デフォルトモデル","全局prompt":"グローバルプロンプト","全局":"グローバル","model请求参数json编写":"リクエストパラメータJSON","额外参数设置":"追加パラメータ","编辑器自动保存":"エディター自動保存","自动保存间隔(秒)":"自動保存間隔(秒)","请输入不小于 1 的整数(秒)":"1以上の整数を入力してください(秒)","文本编辑器(ace)":"テキストエディター(Ace)","md编辑器":"MDエディター","思维导图编辑器":"マインドマップエディター","draw编辑器":"Drawエディター","时间线编辑器":"タイムラインエディター","图片编辑器":"画像エディター","excel编辑器":"Excelエディター","编辑器":"エディター","cron表达式":"Cron式","系统提示词":"システムプロンプト","不使用":"使用しない","消息数":"メッセージ数","来源":"ソース","更多操作":"その他の操作","环境变量":"環境変数","暂无环境变量":"環境変数はありません","环境变量的 KEY 不能为空":"環境変数の KEY は必須です","重启成功":"再起動に成功しました","重启服务":"サービスを再起動","配置已保存,是否立即重启该服务让新配置生效?":"設定を保存しました。今すぐサービスを再起動して反映しますか?","暂停中":"一時停止中","discard":"変更を破棄","discarded":"変更を破棄しました","discard_untracked_tip":"このファイルはバージョン管理されていません。破棄すると完全に削除されます。続行しますか?","discard_modified_tip":"ローカル変更は破棄され、リポジトリの内容に戻ります。続行しますか?","discard_selected_tip":"選択した {{n}} 個のファイルのローカル変更を破棄します。続行しますか?","加载资源失败":"リソースの読み込みに失敗しました","网络错误":"ネットワークエラー","没有安装smartmontools":"smartmontools がインストールされていません","挂载文件已生效":"マウントファイルを反映しました","刷新成功":"更新しました","未选择转发送 client":"転送クライアントが選択されていません","删除完成":"削除しました","保护路径不能删除":"保護されたパスは削除できません","MCP工具加载成功":"MCP ツールを読み込みました","没有选中":"何も選択されていません","不能为空":"空にできません","和原文件格式后缀一样":"元のファイルと同じ拡張子です","发生错误":"エラーが発生しました","不支持的文件后缀":"サポートされていない拡張子です","更新到AI知识库成功":"AI ナレッジベースに追加しました","文件名不能为空":"ファイル名を空にできません","挂载目录不能为空":"マウント先ディレクトリを空にできません","重复挂载":"重複マウントです","该设备块没有具体路径":"このデバイスには具体的なパスがありません","该设备块没有文件系统":"このデバイスにはファイルシステムがありません","路由不能为空":"ルートを空にできません","创建完成":"作成しました","保存完成":"保存しました","获取进程输出失败":"プロセス出力の取得に失敗しました","进程已终止":"プロセスを終了しました","终止进程失败":"プロセスの終了に失敗しました","账号密码不能为空":"アカウントとパスワードを空にできません","两次密码不一样":"パスワードが一致しません","目录不能为空":"ディレクトリを空にできません","秒数不能为空":"秒数を空にできません","清理完成,重新登录":"クリーンアップ完了、再ログインしてください","密钥不能为空":"キーを空にできません","保存到服务器":"サーバーに保存","加载资源失败,请检查文件":"読み込みに失敗しました。ファイルを確認してください","操作成功":"完了しました","未获取到路径":"パスを取得できませんでした","复制成功":"コピーしました","暂无聊天记录":"チャット履歴がありません","暂无内容":"内容がありません","到达顶部":"先頭に到達しました","范围在0-100":"範囲は 0〜100 です","不存在的http method":"未対応の HTTP メソッドです","不存在":"存在しません","不是数字":"数値ではありません","已经存在的页面资源路由配置目录设置":"このページリソースのルートディレクトリは既に設定されています","mac地址不能为空":"MAC アドレスを空にできません","发送唤醒命令成功":"起動コマンドを送信しました","不能都为空":"すべて空にすることはできません"}')}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[3528],{48890(e,t,s){s.d(t,{Kw:()=>a,Tt:()=>i});var a=s(80952),i=(s(82327),s(1766),s(24854),s(90008),s(90846),s(40975),s(44286),s(30766),s(14973),s(69687),s(1234),s(47507),s(87268),s(34678),s(24522));const n=`https://gcore.jsdelivr.net/npm/ace-builds@${a.version}/src-min-noconflict/`;a.config.set("basePath",n),a.config.set("modePath",n),a.config.set("themePath",n),a.config.set("workerPath",n)},53528(e,t,s){s.r(t),s.d(t,{default:()=>q});var a=s(96540),i=s(14284),n=s(62042),c=s(22022),l=s(85997),o=s(61443),r=s(57952),d=s(52671),h=s(34289),m=s(87361),_=s(2543),g=s(34251),p=s(47022),u=s(74848);const f={M:{label:"M",cls:"mod"},A:{label:"A",cls:"add"},D:{label:"D",cls:"del"},R:{label:"R",cls:"ren"},C:{label:"C",cls:"ren"},U:{label:"U",cls:"conf"},"?":{label:"?",cls:"untracked"}};function x(e){const t=e.lastIndexOf("/");return-1===t?e:e.substring(t+1)}function j(e){const t={type:"folder",name:"",full_path:"",children:[]};for(const s of e){const e=s.path.split("/").filter(Boolean);let a=t;for(let t=0;t<e.length;t++){const i=e[t],n=t===e.length-1;let c=a.children.find(e=>e.name===i);c||(c={type:n?"file":"folder",name:i,full_path:a.full_path?`${a.full_path}/${i}`:i,children:[]},a.children.push(c)),n&&(c.data=s.data),a=c}}const s=e=>{e.sort((e,t)=>e.type!==t.type?"folder"===e.type?-1:1:e.name.localeCompare(t.name));for(const t of e)t.children.length&&s(t.children)};return s(t.children),t.children}function N(e){const{t}=(0,c.Bd)(),{file:s,staged:a,status:i,selected:n,active:o,leaf:r}=e,d=f[i]??{label:i,cls:"mod"},h=r?s.path.substring(0,s.path.lastIndexOf("/")):"";return(0,u.jsxs)("div",{className:"git-file"+(o?" git-file--active":""),children:[(0,u.jsx)("input",{type:"checkbox",checked:n.has(s.path),onChange:()=>e.on_toggle(s.path),onClick:e=>e.stopPropagation()}),(0,u.jsx)("span",{className:"file-icons",children:(0,u.jsx)("span",{"data-type":(0,g.uL)(s.path),"data-dir":!1,"aria-label":s.path,children:(0,u.jsx)(l.In,{icon:"",aria_label:s.path})})}),(0,u.jsx)("span",{className:"git-file__name",title:s.oldPath?`${s.oldPath} → ${s.path}`:s.path,onClick:()=>e.on_view_diff(s,a),children:r?x(s.path):s.path}),(0,u.jsx)("span",{className:`git-file__badge git-file__badge--${d.cls}`,children:d.label}),h&&(0,u.jsx)("span",{className:"git-file__dir",title:h,children:h}),(0,u.jsxs)("span",{className:"git-file__ops",children:[(0,u.jsx)(l.rA,{icon:"format_list_numbered",title:t("逐行归属"),onClick:()=>e.on_view_blame(s)}),(0,u.jsx)(l.rA,{icon:a?"remove":"add",title:t(a?"取消暂存":"暂存"),onClick:()=>e.on_stage_one(s,a)}),(0,u.jsx)(l.rA,{icon:"undo",title:t("discard"),onClick:()=>e.on_discard_one(s,a)})]})]})}function v(e){const{node:t,staged:s,file_map:i,prefix:n}=e,[c,o]=(0,a.useState)(!0),r=n?`${n}/${t.name}`:t.name;if("file"===t.type){const t=i.get(r);if(!t)return null;const a=s?t.conflicted?"U":t.index:t.untracked?"?":t.conflicted?"U":t.worktree;return(0,u.jsx)(N,{file:t,staged:s,status:a,selected:e.selected,active:e.active_path===t.path,leaf:!0,on_toggle:e.on_toggle,on_view_diff:e.on_view_diff,on_stage_one:e.on_stage_one,on_view_blame:e.on_view_blame,on_discard_one:e.on_discard_one})}return(0,u.jsxs)("div",{className:"git-tree__folder",children:[(0,u.jsxs)("div",{className:"git-tree__dir",onClick:()=>o(!c),children:[(0,u.jsx)("i",{className:"material-icons git-tree__arrow","data-icon":c?"arrow_drop_down":"arrow_right",children:c?"arrow_drop_down":"arrow_right"}),(0,u.jsx)("span",{className:"file-icons",children:(0,u.jsx)("span",{"data-type":p.Iw.folder,"data-dir":!0,"aria-label":t.name,children:(0,u.jsx)(l.In,{icon:"",aria_label:t.name})})}),(0,u.jsx)("span",{className:"git-tree__dir-name",children:t.name})]}),c&&(0,u.jsx)("div",{className:"git-tree__children",children:t.children?.map((t,a)=>(0,u.jsx)(v,{node:t,staged:s,file_map:i,prefix:r,selected:e.selected,active_path:e.active_path,on_toggle:e.on_toggle,on_view_diff:e.on_view_diff,on_stage_one:e.on_stage_one,on_view_blame:e.on_view_blame,on_discard_one:e.on_discard_one},a))})]})}function y(e){const{t}=(0,c.Bd)(),{title:s,files:i,staged:n,selected:l}=e,o=(0,a.useMemo)(()=>i.map(e=>e.path),[i]),r=o.filter(e=>l.has(e)).length,d=i.length>0&&r===i.length,h=r>0&&!d,m=(0,a.useMemo)(()=>{const e=new Map;for(const t of i)e.set(t.path,t);return e},[i]),_=(0,a.useMemo)(()=>e.tree_mode?function(e){const t=j(e.map(e=>({path:e.path,data:e}))),s=e=>({type:e.type,name:e.name,size:0,children:e.children.length?e.children.map(s):void 0});return t.map(s)}(i):[],[i,e.tree_mode]);return 0===i.length?null:(0,u.jsxs)("div",{className:"git-section",children:[(0,u.jsxs)("div",{className:"git-section__header",children:[(0,u.jsx)("input",{type:"checkbox",checked:d,ref:e=>{e&&(e.indeterminate=h)},onChange:()=>e.on_toggle_all(o,!d)}),(0,u.jsxs)("span",{className:"git-section__title",children:[s," (",i.length,")"]}),(0,u.jsx)("span",{className:"git-section__action",onClick:()=>e.on_stage_section(i,n),children:t(n?"全部取消暂存":"全部暂存")})]}),e.tree_mode?(0,u.jsx)("div",{className:"git-tree",children:_.map((t,s)=>(0,u.jsx)(v,{node:t,staged:n,file_map:m,prefix:"",selected:e.selected,active_path:e.active_path,on_toggle:e.on_toggle,on_view_diff:e.on_view_diff,on_stage_one:e.on_stage_one,on_view_blame:e.on_view_blame,on_discard_one:e.on_discard_one},s))}):i.map(t=>(0,u.jsx)(N,{file:t,staged:n,status:e.status_of(t),selected:e.selected,active:e.active_path===t.path,leaf:!0,on_toggle:e.on_toggle,on_view_diff:e.on_view_diff,on_stage_one:e.on_stage_one,on_view_blame:e.on_view_blame,on_discard_one:e.on_discard_one},t.path+(n?"_s":"_w")))]})}function b(e){const{t}=(0,c.Bd)(),{files:s}=e,[i,n]=(0,a.useState)(!1),o=s.filter(e=>e.staged),r=s.filter(e=>e.untracked||" "!==e.worktree),d={selected:e.selected,on_toggle:e.on_toggle,on_toggle_all:e.on_toggle_all,active_path:e.active_path,tree_mode:i,on_view_diff:e.on_view_diff,on_stage_section:e.on_stage_section,on_stage_one:e.on_stage_one,on_view_blame:e.on_view_blame,on_discard_one:e.on_discard_one};return(0,u.jsxs)("div",{className:"git-change-list",children:[(0,u.jsxs)("div",{className:"git-change-toolbar",children:[(0,u.jsx)(l.rA,{icon:"account_tree",title:t("树形展示"),selected:i,onClick:()=>n(!i)}),e.selected.size>0&&(0,u.jsx)(l.rA,{icon:"undo",title:`${t("discard")} (${e.selected.size})`,onClick:e.on_discard_selected})]}),(0,u.jsx)(y,{title:t("已暂存的更改"),files:o,staged:!0,status_of:e=>e.conflicted?"U":e.index,...d}),(0,u.jsx)(y,{title:t("更改"),files:r,staged:!1,status_of:e=>e.untracked?"?":e.conflicted?"U":e.worktree,...d}),0===s.length&&(0,u.jsx)("div",{className:"git-change-empty",children:t("没有已更改的文件")})]})}var w=s(48890);function k({valueA:e,valueB:t,mode:s="split",theme:i,filename:n}){const c=(0,a.useRef)(null),l=(0,a.useRef)(null),o=(0,a.useMemo)(()=>n&&w.Tt.getModeForPath(n).mode||"ace/mode/text",[n]);return(0,a.useEffect)(()=>{const a=c.current;if(!a)return;const n=w.Kw.require("ace/ext/diff"),r={valueA:e??"",valueB:t??"",diffProvider:new n.DiffProvider},d="inline"===s,h=d?new n.InlineDiffView({...r,inline:"a"},a):new n.SplitDiffView(r);d||(h.container=a,a.appendChild(h.editorA.container),a.appendChild(h.editorB.container)),i&&h.setTheme(i),h.editorA?.session.setMode(o),h.editorB?.session.setMode(o),h.onInput(),h.foldUnchanged();const m=requestAnimationFrame(()=>{h.editorA?.resize(!0),h.editorB?.resize(!0)});return l.current=h,()=>{cancelAnimationFrame(m);try{h.destroy()}catch(e){}l.current=null,a.innerHTML=""}},[e,t,s,i,o]),(0,u.jsx)("div",{className:"ace-diff",ref:c})}const S={text:"",binary:!1,exists:!1};function C({dir_path:e,file:t,left_ref:s,right_ref:n,mode:l="unified"}){const{t:o}=(0,c.Bd)(),[r,d]=(0,a.useState)(S),[h,m]=(0,a.useState)(S),[_,g]=(0,a.useState)(!1),[p,f]=(0,a.useState)(""),x=(0,a.useRef)(0);return(0,a.useEffect)(()=>{const a=++x.current;g(!0),f("");const c=s=>i.TU.post("file_content",{path:e,file:t,ref:s});Promise.all([c(s),c(n)]).then(([e,t])=>{a===x.current&&(d(0===e.code?e.data:S),m(0===t.code?t.data:S))}).catch(e=>{a===x.current&&(f("string"==typeof e?e:e?.message||""),d(S),m(S))}).finally(()=>{a===x.current&&g(!1)})},[e,t,s,n]),_?(0,u.jsx)("div",{className:"git-diff-empty",children:(0,u.jsx)("span",{children:o("加载中")})}):p?(0,u.jsx)("div",{className:"git-diff-empty",children:(0,u.jsx)("span",{children:p})}):r.binary||h.binary?(0,u.jsx)("div",{className:"git-diff-empty",children:(0,u.jsx)("span",{children:o("二进制文件无法比较")})}):r.text===h.text?(0,u.jsx)("div",{className:"git-diff-empty",children:(0,u.jsx)("span",{children:o("无差异")})}):(0,u.jsx)(k,{valueA:r.text??"",valueB:h.text??"",mode:"split"===l?"split":"inline",filename:t})}function z({dir_path:e,entries:t,is_search:s,has_more:o,loading_more:r,active_hash:d,on_select:h,on_scroll_bottom:m,on_search_result:_}){const{t:g}=(0,c.Bd)(),[p,f]=(0,a.useState)(!1),[x,j]=(0,a.useState)(""),[N,v]=(0,a.useState)(""),[y,b]=(0,a.useState)(!1),{rows:w,width:k}=function(e){const t=[],s=[];let a=1;for(const i of e){let e=t.indexOf(i.hash);e<0&&(e=t.indexOf(null),e<0&&(e=t.length,t.push(null)));const n=i.parents||[],c=[];for(const s of n)s&&t.forEach((a,i)=>{i!==e&&a===s&&(c.push(i),t[i]=null)});const l=[];t.forEach((t,s)=>{null===t||s===e||c.includes(s)||l.push(s)}),t[e]=n[0]??null;const o=[e];for(const e of n.slice(1)){let s=t.indexOf(e);s<0&&(s=t.indexOf(null),s<0&&(s=t.length,t.push(null)),t[s]=e),o.push(s)}for(;t.length&&null===t[t.length-1];)t.pop();s.push({column:e,pass_through:l,out_edges:o,merge_in:c}),a=Math.max(a,t.length,e+1,...o.map(e=>e+1))}return{rows:s,width:a}}(s?[]:t),S=async()=>{if(x.trim()||N.trim()){b(!0);try{const t=await i.TU.post("search_commit",{path:e,keyword:x.trim(),author:N.trim(),maxCount:100});0===t.code?_(t.data||[]):(0,n.zN)(t.message)}catch(e){(0,n.zN)(e?.message)}finally{b(!1)}}else(0,n.zN)(g("请输入搜索条件"))},C=(e,t,s)=>{const a=39,i=12,n=s?i:-2,c=e=>16*e+8,l=c(e.column),o=[];for(const t of e.pass_through)o.push((0,u.jsx)("line",{x1:c(t),y1:n,x2:c(t),y2:41,className:"git-log__graph-edge"},`p${t}`));for(const[t,a]of e.merge_in.entries()){const e=c(a);s||o.push((0,u.jsx)("path",{fill:"none",d:`M ${e} -2 C ${e} 19.5 ${l} 19.5 ${l} 12`,className:"git-log__graph-edge"},`m${t}`))}for(const[t,s]of e.out_edges.entries())if(s===e.column)o.push((0,u.jsx)("line",{x1:l,y1:n,x2:l,y2:41,className:"git-log__graph-edge"},`o${t}`));else{const e=c(s);o.push((0,u.jsx)("path",{fill:"none",d:`M ${l} 12 C ${l} 25.5 ${e} 25.5 ${e} 39`,className:"git-log__graph-edge"},`o${t}`))}return(0,u.jsx)("div",{className:"git-log__graph",children:(0,u.jsxs)("svg",{width:16*k,height:a,overflow:"visible",children:[o,(0,u.jsx)("circle",{cx:l,cy:i,r:3.5,className:"git-log__graph-dot"+(t?" git-log__graph-dot--unpushed":"")})]})})};return(0,u.jsxs)("div",{className:"git-log-wrap",children:[(0,u.jsxs)("div",{className:"git-log-search",children:[(0,u.jsx)(l.rA,{icon:"search",title:g("搜索提交"),onClick:()=>{p?(j(""),v(""),_(null),f(!1)):f(!0)}}),p&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("input",{className:"input input--block",autoFocus:!0,value:x,placeholder:g("提交信息关键词"),onChange:e=>j(e.target.value),onKeyDown:e=>"Enter"===e.key&&S()}),(0,u.jsx)("input",{className:"input input--block",value:N,placeholder:g("作者"),onChange:e=>v(e.target.value),onKeyDown:e=>"Enter"===e.key&&S()}),(0,u.jsx)(l.rA,{icon:"check",title:g("搜索"),onClick:S})]})]}),(0,u.jsxs)("div",{className:"git-log",onScroll:m,children:[y&&(0,u.jsx)("div",{className:"git-change-empty",children:g("加载中")}),!y&&0===t.length&&(0,u.jsx)("div",{className:"git-change-empty",children:g("暂无提交记录")}),!y&&t.map((e,t)=>(0,u.jsxs)("div",{className:`git-log__entry${d===e.hash?" git-log__entry--active":""}${e.unpushed?" git-log__entry--unpushed":""}`,onClick:()=>h(e.hash),children:[!s&&C(w[t],!!e.unpushed,0===t),(0,u.jsxs)("div",{className:"git-log__main",children:[(0,u.jsxs)("div",{className:"git-log__row",children:[e.unpushed&&(0,u.jsx)("span",{className:"git-log__unpushed",title:g("未推送")}),(0,u.jsx)("span",{className:"git-log__hash",children:e.hash}),(e.refs||[]).map(e=>(0,u.jsx)("span",{className:"git-log__ref"+(e.includes("HEAD")?" git-log__ref--head":""),children:e.replace("HEAD -> ","")},e)),(0,u.jsx)("span",{className:"git-log__msg",title:e.message,children:e.message})]}),(0,u.jsxs)("div",{className:"git-log__meta",children:[e.author," · ",e.date]})]})]},e.hash)),!y&&!s&&r&&(0,u.jsx)("div",{className:"git-log__more",children:g("加载中")}),!y&&!s&&!r&&!o&&t.length>0&&(0,u.jsx)("div",{className:"git-log__more",children:g("已到底部")})]})]})}var A=s(45907);function $({nodes:e,selected:t,on_select:s}){const[i,n]=(0,a.useState)(new Set),c=e=>e.map(e=>{if("folder"===e.type){const t=!i.has(e.full_path);return(0,u.jsxs)("div",{children:[(0,u.jsxs)("div",{className:"git-commit-tree__dir",onClick:()=>{return t=e.full_path,void n(e=>{const s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s});var t},children:[(0,u.jsx)("i",{className:"material-icons git-tree__arrow",children:t?"arrow_drop_down":"arrow_right"}),(0,u.jsx)("span",{className:"file-icons",children:(0,u.jsx)("span",{"data-type":p.Iw.folder,"data-dir":!0,"aria-label":e.name,children:(0,u.jsx)(l.In,{icon:"",aria_label:e.name})})}),(0,u.jsx)("span",{className:"git-commit-tree__dir-name",children:e.name})]}),t&&(0,u.jsx)("div",{className:"git-commit-tree__children",children:c(e.children)})]},e.full_path)}const a=e.data;return(0,u.jsxs)("div",{className:"git-commit-file git-commit-file--leaf"+(t===e.full_path?" git-commit-file--active":""),onClick:()=>s(e.full_path),title:e.full_path,children:[(0,u.jsx)("span",{className:"file-icons",children:(0,u.jsx)("span",{"data-type":(0,g.uL)(e.name),"aria-label":e.name,children:(0,u.jsx)(l.In,{icon:"",aria_label:e.name})})}),(0,u.jsx)("span",{className:"git-commit-file__name",children:e.name}),a&&null!==a.additions&&(0,u.jsxs)("span",{className:"git-commit-file__stat",children:[(0,u.jsxs)("span",{className:"git-stat--add",children:["+",a.additions]}),(0,u.jsxs)("span",{className:"git-stat--del",children:["-",a.deletions]})]})]},e.full_path)});return(0,u.jsx)(u.Fragment,{children:c(e)})}function U({dir_path:e,hash:t,on_close:s,on_changed:o}){const{t:r}=(0,c.Bd)(),d=(0,A.y)(),[h,m]=(0,a.useState)(null),[_,g]=(0,a.useState)(null),[p,f]=(0,a.useState)("unified"),[x,N]=(0,a.useState)(!1),[v,y]=(0,a.useState)(!1);(0,a.useEffect)(()=>{t&&(g(null),y(!1),w())},[t,e]);const b=(0,a.useMemo)(()=>j((h?.files??[]).map(e=>({path:e.path,data:e}))),[h]),w=async()=>{try{const s=await i.TU.post("commit_detail",{path:e,hash:t});0===s.code?m(s.data):(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}};if(!h)return(0,u.jsx)("div",{className:"git-card git-card--diff",children:(0,u.jsx)("div",{className:"git-change-empty",children:r("加载中")})});return(0,u.jsxs)("div",{className:"git-card git-card--diff",children:[(0,u.jsxs)("div",{className:"git-commit-meta",children:[(0,u.jsxs)("div",{className:"git-commit-meta__row",children:[(0,u.jsx)("span",{className:"git-commit-meta__hash",children:h.short_hash}),(0,u.jsx)("span",{className:"git-commit-meta__subject",title:h.subject,children:h.subject}),_&&(0,u.jsx)(l.rA,{icon:"compare_arrows",title:r("与工作区对比"),onClick:()=>{_?y(!0):(0,n.zN)(r("请先选择文件"))}}),(0,u.jsx)(l.rA,{icon:"undo",title:r("撤销提交"),onClick:()=>{d({title:r("撤销提交"),sub_title:`${r("将生成一个反向提交来撤销")} ${h.short_hash} ?`,confirm_fun:async()=>{try{const s=await i.TU.post("revert",{path:e,hash:t});0===s.code?((0,n.SK)(r("已撤销")),o?.()):(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}}})}}),(0,u.jsx)(l.rA,{icon:"content_cut",title:r("摘取提交"),onClick:()=>{d({title:r("摘取提交"),sub_title:`${r("将该提交应用到当前分支")} ${h.short_hash} ?`,confirm_fun:async()=>{try{const s=await i.TU.post("cherry_pick",{path:e,hash:t});0===s.code?((0,n.SK)(r("摘取成功")),o?.()):(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}}})}}),(0,u.jsx)(l.rA,{icon:"close",title:r("关闭"),onClick:s})]}),(0,u.jsxs)("div",{className:"git-commit-meta__sub",children:[h.author," <",h.email,"> · ",h.date]})]}),(0,u.jsxs)("div",{className:"git-commit-body",children:[(0,u.jsxs)("div",{className:"git-commit-files",children:[(0,u.jsxs)("div",{className:"git-commit-file__count",children:[r("全部文件")," (",h.files.length,")"]}),(0,u.jsx)($,{nodes:b,selected:_,on_select:e=>{g(e),y(!1)}})]}),(0,u.jsxs)("div",{className:"git-commit-diff",children:[(0,u.jsxs)("div",{className:"git-diff-header",children:[(0,u.jsx)("span",{className:"git-diff-header__badge",children:v?r("与工作区对比"):`${r("提交")} ${h.short_hash}`}),(0,u.jsx)("span",{className:"git-diff-header__path",title:_??"",children:_??`${r("全部文件")} (${h.files.length})`}),(0,u.jsxs)("div",{className:"git-diff-header__modes",children:[(0,u.jsx)(l.rA,{icon:"view_agenda",title:r("单栏"),selected:"unified"===p,onClick:()=>f("unified")}),(0,u.jsx)(l.rA,{icon:"view_column",title:r("并排"),selected:"split"===p,onClick:()=>f("split")})]})]}),_?v?(0,u.jsx)(C,{dir_path:e,file:_,left_ref:t,right_ref:"worktree",mode:p}):(0,u.jsx)(C,{dir_path:e,file:_,left_ref:`${t}^`,right_ref:t,mode:p}):(0,u.jsx)("div",{className:"git-diff-empty",children:(0,u.jsx)("span",{children:r("请选择文件查看改动")})})]})]})]})}function T(e){let t=0;for(let s=0;s<e.length;s++)t+=e.charCodeAt(s);return`hsl(${t%360}, 55%, 45%)`}function K({dir_path:e,file:t,on_close:s}){const{t:o}=(0,c.Bd)(),[r,d]=(0,a.useState)([]),[h,m]=(0,a.useState)(!1);(0,a.useEffect)(()=>{t&&_()},[t,e]);const _=async()=>{m(!0);try{const s=await i.TU.post("blame",{path:e,file:t});0===s.code?d(s.data||[]):((0,n.zN)(s.message),d([]))}catch(e){(0,n.zN)(e?.message),d([])}finally{m(!1)}};return(0,u.jsxs)("div",{className:"git-card git-card--diff",children:[(0,u.jsxs)("div",{className:"git-diff-header",children:[(0,u.jsx)("span",{className:"git-diff-header__badge",children:o("逐行归属")}),(0,u.jsx)("span",{className:"git-diff-header__path",title:t,children:t}),(0,u.jsx)("div",{className:"git-diff-header__modes",children:(0,u.jsx)(l.rA,{icon:"close",title:o("关闭"),onClick:s})})]}),h&&(0,u.jsx)("div",{className:"git-change-empty",children:o("加载中")}),!h&&0===r.length&&(0,u.jsx)("div",{className:"git-change-empty",children:o("无法读取该文件的归属信息")}),!h&&r.length>0&&(0,u.jsx)("div",{className:"git-blame",children:r.map((e,t)=>(0,u.jsxs)("div",{className:"git-blame__row",children:[(0,u.jsx)("span",{className:"git-blame__hash",title:e.hash,children:e.hash}),(0,u.jsx)("span",{className:"git-blame__author",style:{color:T(e.author)},title:`${e.author} · ${e.date}`,children:e.author}),(0,u.jsx)("span",{className:"git-blame__date",children:e.date}),(0,u.jsx)("span",{className:"git-blame__num",children:e.line_num}),(0,u.jsx)("span",{className:"git-blame__code",children:e.text||" "})]},t))})]})}function E({current:e,branches:t,on_checkout:s,on_create:i,on_delete:n,on_merge:o,ahead:r,behind:d}){const{t:h}=(0,c.Bd)(),m=(0,A.y)(),[_,g]=(0,a.useState)(!1),[p,f]=(0,a.useState)(""),x=()=>{const e=p.trim();e&&(i(e),f(""),g(!1))};return(0,u.jsxs)("div",{className:"git-branch-row",children:[(0,u.jsxs)("span",{className:"git-branch__name",children:[h("分支"),": ",e]}),(r>0||d>0)&&(0,u.jsxs)("span",{className:"git-branch__counts",children:[r>0&&(0,u.jsxs)("span",{className:"git-ahead",title:h("领先上游"),children:["↑",r]}),d>0&&(0,u.jsxs)("span",{className:"git-behind",title:h("落后上游"),children:["↓",d]})]}),(0,u.jsx)("div",{className:"git-branch__list",children:t.map(t=>{const a=t===e;return(0,u.jsxs)("div",{className:"git-branch-chip"+(a?" git-branch-chip--current":""),onClick:()=>!a&&s(t),title:a?h("当前分支"):`${h("切换到")} ${t}`,children:[t,!a&&(0,u.jsxs)("span",{className:"git-branch-chip__ops",children:[(0,u.jsx)("span",{className:"git-branch-chip__op",title:h("合并到此分支"),onClick:e=>{e.stopPropagation(),o(t)},children:"⇥"}),(0,u.jsx)("span",{className:"git-branch-chip__op",title:h("删除分支"),onClick:e=>{var s;e.stopPropagation(),s=t,m({title:h("删除分支"),sub_title:`${h("确认删除分支")} ${s} ?`,confirm_fun:()=>n(s,!1)})},children:"×"})]})]},t)})}),_?(0,u.jsxs)("span",{className:"git-branch-new",children:[(0,u.jsx)("input",{className:"input input--block",autoFocus:!0,value:p,placeholder:h("新分支名"),onChange:e=>f(e.target.value),onKeyDown:e=>{"Enter"===e.key&&x(),"Escape"===e.key&&(g(!1),f(""))}}),(0,u.jsx)(l.rA,{icon:"check",title:h("确定"),onClick:x}),(0,u.jsx)(l.rA,{icon:"close",title:h("取消"),onClick:()=>{g(!1),f("")}})]}):(0,u.jsx)(l.rA,{icon:"add",title:h("新建分支"),onClick:()=>g(!0)})]})}function B(e){const{t}=(0,c.Bd)(),{dir_path:s,user_config:r,proxy_config:d}=e,[h,m]=(0,a.useState)(!1),[_,g]=(0,a.useState)(r.name),[p,f]=(0,a.useState)(r.email),[x,j]=(0,a.useState)(!1),[N,v]=(0,a.useState)(d?.global.http||""),[y,b]=(0,a.useState)(d?.global.https||""),[w,k]=(0,a.useState)(d?.local.http||""),[S,C]=(0,a.useState)(d?.local.https||"");return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:"git-config-row",children:[(0,u.jsx)("span",{className:"git-config__label",children:t("用户配置")}),h?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.Sm,{maxWidth:"15rem",value:_,placeholder:"user.name",handleInputChange:e=>g(e)}),(0,u.jsx)(o.Sm,{maxWidth:"15rem",value:p,placeholder:"user.email",handleInputChange:e=>f(e)}),(0,u.jsx)(l.rA,{icon:"check",title:t("保存"),onClick:async()=>{try{const a=await i.TU.post("set_user_config",{path:s,name:_,email:p});0===a.code?((0,n.SK)(t("用户配置已保存")),m(!1),e.on_user_config_saved({name:_,email:p})):(0,n.zN)(a.message)}catch(e){(0,n.zN)(e?.message)}}}),(0,u.jsx)(l.rA,{icon:"close",title:t("取消"),onClick:()=>m(!1)})]}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("span",{className:"git-config__value",children:[r.name," / ",r.email]}),(0,u.jsx)(l.rA,{icon:"edit",title:t("编辑"),onClick:()=>{g(r.name),f(r.email),m(!0)}})]})]}),(0,u.jsxs)("div",{className:"git-config-row",children:[(0,u.jsx)("span",{className:"git-config__label",children:t("代理配置")}),x?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.Sm,{maxWidth:"15rem",value:N,placeholder:"global http",handleInputChange:e=>v(e)}),(0,u.jsx)(o.Sm,{maxWidth:"15rem",value:y,placeholder:"global https",handleInputChange:e=>b(e)}),(0,u.jsx)(o.Sm,{maxWidth:"15rem",value:w,placeholder:"local http",handleInputChange:e=>k(e)}),(0,u.jsx)(o.Sm,{maxWidth:"15rem",value:S,placeholder:"local https",handleInputChange:e=>C(e)}),(0,u.jsx)(l.rA,{icon:"check",title:t("保存"),onClick:async()=>{const a=[{scope:"global",type:"http",value:N},{scope:"global",type:"https",value:y},{scope:"local",type:"http",value:w},{scope:"local",type:"https",value:S}];try{for(const e of a)await i.TU.post("set_proxy",{path:s,...e});(0,n.SK)(t("代理配置已保存")),j(!1),e.on_proxy_saved({global:{http:N,https:y},local:{http:w,https:S}})}catch(e){(0,n.zN)(e?.message)}}}),(0,u.jsx)(l.rA,{icon:"close",title:t("取消"),onClick:()=>j(!1)})]}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("span",{className:"git-config__value",children:(()=>{if(!d)return"-";const e=d.global;if(e.http||e.https)return`global ${e.http||e.https}`;const t=d.local;return t.http||t.https?`local ${t.http||t.https}`:"-"})()}),(0,u.jsx)(l.rA,{icon:"edit",title:t("编辑"),onClick:()=>{v(d?.global.http||""),b(d?.global.https||""),k(d?.local.http||""),C(d?.local.https||""),j(!0)}})]})]})]})}function F({dir_path:e,target_hash:t,on_changed:s}){const{t:o}=(0,c.Bd)(),r=(0,A.y)(),[d,h]=(0,a.useState)([]),[m,_]=(0,a.useState)(!1),[g,p]=(0,a.useState)(""),[f,x]=(0,a.useState)(""),[j,N]=(0,a.useState)(!1);(0,a.useEffect)(()=>{v()},[e]);const v=async()=>{try{const t=await i.TU.post("tags",{path:e});0===t.code&&h(t.data||[])}catch(e){}};return(0,u.jsxs)("div",{className:"git-sub-panel",children:[(0,u.jsxs)("div",{className:"git-sub-panel__header",children:[(0,u.jsxs)("span",{className:"git-sub-panel__title",children:[o("标签")," (",d.length,")"]}),(0,u.jsx)(l.rA,{icon:"add",title:o("新建标签"),onClick:()=>_(!m)})]}),m&&(0,u.jsxs)("div",{className:"git-sub-panel__form",children:[(0,u.jsx)("input",{className:"input input--block",autoFocus:!0,value:g,placeholder:o("标签名"),onChange:e=>p(e.target.value)}),(0,u.jsx)("input",{className:"input input--block",value:f,placeholder:o("备注"),onChange:e=>x(e.target.value)}),(0,u.jsxs)("div",{className:"git-sub-panel__form-actions",children:[(0,u.jsx)("span",{className:"git-sub-panel__hint",children:t?`${o("基于提交")} ${t}`:o("基于当前提交")}),(0,u.jsx)(l.rA,{icon:"check",title:o("保存"),onClick:async()=>{const a=g.trim();if(a){N(!0);try{const c=await i.TU.post("tag_create",{path:e,name:a,message:f.trim(),hash:t});0===c.code?((0,n.SK)(o("标签创建成功")),p(""),x(""),_(!1),await v(),s()):(0,n.zN)(c.message)}catch(e){(0,n.zN)(e?.message)}finally{N(!1)}}else(0,n.zN)(o("请输入标签名"))}}),(0,u.jsx)(l.rA,{icon:"close",title:o("取消"),onClick:()=>{_(!1),p(""),x("")}})]})]}),(0,u.jsxs)("div",{className:"git-sub-panel__list",children:[0===d.length&&(0,u.jsx)("div",{className:"git-change-empty",children:o("暂无标签")}),d.map(t=>(0,u.jsxs)("div",{className:"git-sub-item",children:[(0,u.jsx)("span",{className:"git-sub-item__name",title:t.name,children:t.name}),(0,u.jsx)("span",{className:"git-sub-item__desc",title:t.message,children:t.message}),(0,u.jsx)("span",{className:"git-sub-item__meta",children:t.date}),(0,u.jsxs)("span",{className:"git-sub-item__ops",children:[(0,u.jsx)(l.rA,{icon:"upload",title:o("推送到远程"),onClick:()=>(async t=>{try{const s=await i.TU.post("tag_push",{path:e,name:t});0===s.code?(0,n.SK)(o("标签推送成功")):(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}})(t.name)}),(0,u.jsx)(l.rA,{icon:"delete",title:o("删除标签"),onClick:()=>{return s=t.name,void r({title:o("删除标签"),sub_title:`${o("确认删除标签")} ${s} ?`,confirm_fun:async()=>{try{const t=await i.TU.post("tag_delete",{path:e,name:s});0===t.code?((0,n.SK)(o("标签删除成功")),await v()):(0,n.zN)(t.message)}catch(e){(0,n.zN)(e?.message)}}});var s}})]})]},t.name))]})]})}function I({dir_path:e,on_changed:t}){const{t:s}=(0,c.Bd)(),o=(0,A.y)(),[r,d]=(0,a.useState)([]),[h,m]=(0,a.useState)(!1);(0,a.useEffect)(()=>{h&&_()},[e,h]);const _=async()=>{try{const t=await i.TU.post("stash_list",{path:e});0===t.code&&d(t.data||[])}catch(e){}},g=async(a,c)=>{try{const l=await i.TU.post("stash_apply",{path:e,ref:a,pop:c});0===l.code?((0,n.SK)(s(c?"已恢复并删除记录":"已应用")),await _(),t()):(0,n.zN)(l.message)}catch(e){(0,n.zN)(e?.message)}};return(0,u.jsxs)("div",{className:"git-stash",children:[(0,u.jsx)("div",{className:"git-sub-panel__header",children:(0,u.jsxs)("span",{className:"git-sub-panel__title",onClick:()=>m(!h),style:{cursor:"pointer"},children:[s("暂存工作区记录")," ",h?"▾":"▸"]})}),h&&(0,u.jsxs)("div",{className:"git-sub-panel__list",children:[0===r.length&&(0,u.jsx)("div",{className:"git-change-empty",children:s("暂无记录")}),r.map(t=>(0,u.jsxs)("div",{className:"git-sub-item",children:[(0,u.jsx)("span",{className:"git-sub-item__name",title:t.message,children:t.message}),(0,u.jsx)("span",{className:"git-sub-item__meta",children:t.date}),(0,u.jsxs)("span",{className:"git-sub-item__ops",children:[(0,u.jsx)(l.rA,{icon:"play_arrow",title:s("应用"),onClick:()=>g(t.ref,!1)}),(0,u.jsx)(l.rA,{icon:"unarchive",title:s("恢复并删除"),onClick:()=>g(t.ref,!0)}),(0,u.jsx)(l.rA,{icon:"delete",title:s("删除"),onClick:()=>{return a=t.ref,void o({title:s("删除记录"),sub_title:`${s("确认删除")} ${a} ?`,confirm_fun:async()=>{try{const t=await i.TU.post("stash_drop",{path:e,ref:a});0===t.code?((0,n.SK)(s("已删除")),await _()):(0,n.zN)(t.message)}catch(e){(0,n.zN)(e?.message)}}});var a}})]})]},t.ref))]})]})}function M({dir_path:e,current_branch:t,on_checkout:s,on_compare:r}){const{t:d}=(0,c.Bd)(),h=(0,A.y)(),[m,_]=(0,a.useState)([]),[g,p]=(0,a.useState)([]),[f,x]=(0,a.useState)(!1),[j,N]=(0,a.useState)(!1),[v,y]=(0,a.useState)(null),[b,w]=(0,a.useState)("");(0,a.useEffect)(()=>{f&&k()},[e,f]);const k=async()=>{try{const t=await i.TU.post("remote_branches",{path:e});0===t.code&&(_(t.data?.branches||[]),p(t.data?.remotes||[]))}catch(e){}},S=async t=>{N(!0);try{const s=await i.TU.post("fetch",{path:e,prune:t});0===s.code?((0,n.SK)(d("拉取完成")),await k()):(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}finally{N(!1)}},C=async()=>{const t=v;if(t&&b.trim()){N(!0);try{const a=await i.TU.post("remote_branch_rename",{path:e,branch:t,new_name:b.trim()});0===a.code?((0,n.SK)(d("重命名成功")),y(null),await k(),s()):(0,n.zN)(a.message)}catch(e){(0,n.zN)(e?.message)}finally{N(!1)}}};return(0,u.jsxs)("div",{className:"git-remote",children:[(0,u.jsxs)("div",{className:"git-sub-panel__header",children:[(0,u.jsxs)("span",{className:"git-sub-panel__title",onClick:()=>x(!f),children:[d("远程分支")," (",m.length,") ",f?"▾":"▸"]}),(0,u.jsx)(l.rA,{icon:"cloud_download",title:d("拉取远程信息"),onClick:()=>S(!1)}),(0,u.jsx)(l.rA,{icon:"cleaning_services",title:d("拉取并清理已删除分支"),onClick:()=>S(!0)})]}),f&&(0,u.jsxs)("div",{className:"git-sub-panel__list",children:[0===g.length&&(0,u.jsx)("div",{className:"git-change-empty",children:d("未配置远程仓库")}),m.map(c=>(0,u.jsxs)(a.Fragment,{children:[(0,u.jsxs)("div",{className:"git-sub-item",children:[(0,u.jsx)("span",{className:"git-sub-item__name",title:c.name,children:c.name}),(0,u.jsx)("span",{className:"git-sub-item__meta",children:c.date}),(0,u.jsxs)("span",{className:"git-sub-item__ops",children:[(0,u.jsx)(l.rA,{icon:"call_split",title:d("签出到本地"),onClick:()=>(async t=>{N(!0);try{const a=await i.TU.post("checkout_remote",{path:e,branch:t});0===a.code?((0,n.SK)(d("切换分支成功")),s()):(0,n.zN)(a.message)}catch(e){(0,n.zN)(e?.message)}finally{N(!1)}})(c.name)}),(0,u.jsx)(l.rA,{icon:"compare_arrows",title:d("与当前分支比较"),onClick:()=>r(c.name)}),(0,u.jsx)(l.rA,{icon:"merge",title:d("合并到当前分支"),onClick:()=>(async a=>{h({title:d("合并到当前分支"),sub_title:`${d("将")} ${a} ${d("合并到")} ${t} ?`,confirm_fun:async()=>{try{const t=await i.TU.post("merge",{path:e,branch:a});0===t.code?((0,n.SK)(d("合并成功")),s()):(0,n.zN)(t.message)}catch(e){(0,n.zN)(e?.message)}}})})(c.name)}),(0,u.jsx)(l.rA,{icon:"drive_file_rename_outline",title:d("重命名"),onClick:()=>(e=>{const t=e.indexOf("/"),s=t>=0?e.substring(t+1):e;w(s),y(e)})(c.name)}),(0,u.jsx)(l.rA,{icon:"delete",title:d("删除"),onClick:()=>{return t=c.name,void h({title:d("删除远程分支"),sub_title:`${d("确认删除远程分支")} ${t} ? ${d("该分支会从远程仓库删除")}`,confirm_fun:async()=>{try{const s=await i.TU.post("remote_branch_delete",{path:e,branch:t});0===s.code?((0,n.SK)(d("删除成功")),await k()):(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}}});var t}})]})]}),v===c.name&&(0,u.jsxs)("div",{className:"git-remote__rename",children:[(0,u.jsx)(o.Sm,{value:b,width:"12rem",handleInputChange:e=>w(e)}),(0,u.jsx)(l.rA,{icon:"check",title:d("确定"),onClick:C}),(0,u.jsx)(l.rA,{icon:"close",title:d("取消"),onClick:()=>y(null)})]})]},c.name))]})]})}function P({dir_path:e,branch:t,current_branch:s,on_close:o}){const{t:r}=(0,c.Bd)(),[d,h]=(0,a.useState)([]),[m,_]=(0,a.useState)(null),[g,p]=(0,a.useState)("unified"),[f,x]=(0,a.useState)(!0);(0,a.useEffect)(()=>{_(null),N()},[e,t,s]);const N=async()=>{x(!0);try{const a=await i.TU.post("diff_files",{path:e,from:s,to:t});0===a.code?h(a.data||[]):(0,n.zN)(a.message)}catch(e){(0,n.zN)(e?.message)}finally{x(!1)}},v=(0,a.useMemo)(()=>j(d.map(e=>({path:e.path,data:e}))),[d]);return(0,u.jsxs)("div",{className:"git-card git-card--diff",children:[(0,u.jsxs)("div",{className:"git-diff-header",children:[(0,u.jsx)("span",{className:"git-diff-header__badge",children:r("分支比较")}),(0,u.jsxs)("span",{className:"git-diff-header__path",title:`${s} ↔ ${t}`,children:[s," ↔ ",t]}),m&&(0,u.jsxs)("div",{className:"git-diff-header__modes",children:[(0,u.jsx)(l.rA,{icon:"view_agenda",title:r("单栏"),selected:"unified"===g,onClick:()=>p("unified")}),(0,u.jsx)(l.rA,{icon:"view_column",title:r("并排"),selected:"split"===g,onClick:()=>p("split")})]}),(0,u.jsx)(l.rA,{icon:"close",title:r("关闭"),onClick:o})]}),(0,u.jsxs)("div",{className:"git-commit-body",children:[(0,u.jsxs)("div",{className:"git-commit-files",children:[(0,u.jsxs)("div",{className:"git-commit-file__count",children:[r("全部文件")," (",d.length,")"]}),(0,u.jsx)($,{nodes:v,selected:m,on_select:_})]}),(0,u.jsx)("div",{className:"git-commit-diff",children:f?(0,u.jsx)("div",{className:"git-diff-empty",children:(0,u.jsx)("span",{children:r("加载中")})}):m?(0,u.jsx)(C,{dir_path:e,file:m,left_ref:s,right_ref:t,mode:g}):(0,u.jsx)("div",{className:"git-diff-empty",children:(0,u.jsx)("span",{children:r("请选择文件查看改动")})})})]})]})}function D({dir_path:e,on_resolved:t}){const{t:s}=(0,c.Bd)(),o=(0,A.y)(),[r,d]=(0,a.useState)([]),[h,m]=(0,a.useState)("");(0,a.useEffect)(()=>{_()},[e]);const _=async()=>{try{const t=await i.TU.post("conflicts",{path:e});0===t.code&&(d(t.data?.files||[]),m(t.data?.state||""))}catch(e){}},g=async(a,c)=>{try{const l=await i.TU.post("resolve",{path:e,file:a,side:c});0===l.code?((0,n.SK)(s("已解决冲突")),await _(),t()):(0,n.zN)(l.message)}catch(e){(0,n.zN)(e?.message)}};return 0===r.length?null:(0,u.jsxs)("div",{className:"git-card git-conflict",children:[(0,u.jsxs)("div",{className:"git-sub-panel__header",children:[(0,u.jsxs)("span",{className:"git-sub-panel__title",children:[s("冲突")," (",r.length,")",h&&(0,u.jsx)("span",{className:"git-conflict__state",children:h})]}),(0,u.jsx)(l.rA,{icon:"done_all",title:s("标记全部已解决"),onClick:async()=>{try{const a=await i.TU.post("conflict_action",{path:e,action:"merge_continue"});0===a.code?((0,n.SK)(s("合并已完成")),t()):(0,n.zN)(a.message)}catch(e){(0,n.zN)(e?.message)}}}),(0,u.jsx)(l.rA,{icon:"undo",title:s("放弃合并"),onClick:()=>{const a="rebase"===h?"rebase_abort":"cherry-pick"===h?"cherry_pick_abort":"revert"===h?"revert_abort":"merge_abort";o({title:s("放弃合并"),sub_title:s("确认放弃当前合并并恢复到操作前状态"),confirm_fun:async()=>{try{const c=await i.TU.post("conflict_action",{path:e,action:a});0===c.code?((0,n.SK)(s("已放弃合并")),t()):(0,n.zN)(c.message)}catch(e){(0,n.zN)(e?.message)}}})}})]}),r.map(e=>(0,u.jsxs)("div",{className:"git-sub-item",children:[(0,u.jsx)("span",{className:"git-sub-item__name",title:e,children:e}),(0,u.jsxs)("span",{className:"git-sub-item__ops",children:[(0,u.jsx)(l.rA,{icon:"person",title:s("采用我方版本"),onClick:()=>g(e,"ours")}),(0,u.jsx)(l.rA,{icon:"group",title:s("采用对方版本"),onClick:()=>g(e,"theirs")}),(0,u.jsx)(l.rA,{icon:"check",title:s("标记已解决"),onClick:()=>g(e,"resolved")})]})]},e))]})}function R({dir_path:e,on_changed:t}){const{t:s}=(0,c.Bd)(),o=(0,A.y)(),[r,d]=(0,a.useState)([]),[h,m]=(0,a.useState)(!1);(0,a.useEffect)(()=>{h&&_()},[e,h]);const _=async()=>{try{const t=await i.TU.post("reflog",{path:e,maxCount:100});0===t.code&&d(t.data||[])}catch(e){}};return(0,u.jsxs)("div",{className:"git-reflog",children:[(0,u.jsx)("div",{className:"git-sub-panel__header",children:(0,u.jsxs)("span",{className:"git-sub-panel__title",onClick:()=>m(!h),style:{cursor:"pointer"},children:[s("操作历史")," (",r.length,") ",h?"▾":"▸"]})}),h&&(0,u.jsxs)("div",{className:"git-sub-panel__list",children:[0===r.length&&(0,u.jsx)("div",{className:"git-change-empty",children:s("暂无记录")}),r.map(a=>(0,u.jsxs)("div",{className:"git-sub-item",children:[(0,u.jsx)("span",{className:"git-sub-item__name",title:a.message,children:a.selector}),(0,u.jsx)("span",{className:"git-sub-item__desc",title:a.message,children:a.message}),(0,u.jsx)("span",{className:"git-sub-item__meta",children:a.date}),(0,u.jsxs)("span",{className:"git-sub-item__ops",children:[(0,u.jsx)(l.rA,{icon:"undo",title:s("回退到此处"),onClick:()=>{return c=a,void o({title:s("回退到此处"),sub_title:`${c.selector} · ${c.message}`,confirm_fun:async()=>{try{const a=await i.TU.post("reset_commit",{path:e,hash:c.selector,mode:"mixed"});0===a.code?((0,n.SK)(s("已回退")),await _(),t()):(0,n.zN)(a.message)}catch(e){(0,n.zN)(e?.message)}}});var c}}),(0,u.jsx)(l.rA,{icon:"delete_forever",title:s("强制回退(丢弃改动)"),onClick:()=>{return c=a,void o({title:s("强制回退(丢弃改动)"),sub_title:`${s("此操作将永久丢弃未提交的改动")}:${c.selector} · ${c.message}`,confirm_fun:async()=>{try{const a=await i.TU.post("reset_commit",{path:e,hash:c.selector,mode:"hard"});0===a.code?((0,n.SK)(s("已强制回退")),await _(),t()):(0,n.zN)(a.message)}catch(e){(0,n.zN)(e?.message)}}});var c}})]})]},a.selector))]})]})}function W({items:e,on_read:t,on_save:s,on_delete:i}){const{t:n}=(0,c.Bd)(),[r,d]=(0,a.useState)(null),[h,m]=(0,a.useState)(""),[_,g]=(0,a.useState)(!1);(0,a.useEffect)(()=>{r&&!e.some(e=>e.name===r)&&d(null)},[e,r]);const p=async()=>{if(r){g(!0);try{await s(r,h)}finally{g(!1)}}};return(0,u.jsx)("div",{className:"hook-editor",children:(0,u.jsxs)("div",{className:"hook-editor__list",children:[e.map(e=>(0,u.jsxs)(a.Fragment,{children:[(0,u.jsxs)("div",{className:"hook-item"+(r===e.name?" hook-item--editing":""),children:[(0,u.jsx)("span",{className:"hook-item__dot"+(e.enabled?" hook-item__dot--on":"")}),(0,u.jsx)("span",{className:"hook-item__name",children:e.name}),(0,u.jsxs)("span",{className:"hook-item__ops",children:[(0,u.jsx)(l.rA,{icon:r===e.name?"expand_less":"edit",title:n("编辑"),onClick:()=>(async e=>{if(r!==e){g(!0);try{m(await t(e)),d(e)}finally{g(!1)}}else d(null)})(e.name)}),e.enabled&&(0,u.jsx)(l.rA,{icon:"block",title:n("停用钩子"),onClick:()=>(async e=>{g(!0);try{await i(e)}finally{g(!1)}})(e.name)})]})]}),r===e.name&&(0,u.jsxs)("div",{className:"hook-item__editor",children:[(0,u.jsxs)("div",{className:"hook-item__editor-bar",children:[(0,u.jsx)("span",{className:"hook-item__editor-name",children:e.name}),(0,u.jsx)(l.rA,{icon:"check",title:n("保存并启用"),onClick:p}),(0,u.jsx)(l.rA,{icon:"close",title:n("取消"),onClick:()=>d(null)})]}),(0,u.jsx)(o.Z2,{className:"hook-item__text",value:h,spellCheck:!1,disabled:_,onChange:e=>m(e.target.value)})]})]},e.name)),0===e.length&&(0,u.jsx)("div",{className:"git-change-empty",children:n("暂无记录")})]})})}function H({dir_path:e}){const{t}=(0,c.Bd)(),s=(0,A.y)(),[l,o]=(0,a.useState)([]),[r,d]=(0,a.useState)(!1);(0,a.useEffect)(()=>{r&&h()},[e,r]);const h=async()=>{try{const t=await i.TU.post("hooks",{path:e});0===t.code&&o(t.data||[])}catch(e){}};return(0,u.jsxs)("div",{className:"git-hook",children:[(0,u.jsx)("div",{className:"git-sub-panel__header",children:(0,u.jsxs)("span",{className:"git-sub-panel__title",onClick:()=>d(!r),children:[t("钩子")," ",r?"▾":"▸"]})}),r&&(0,u.jsx)(W,{items:l,on_read:async t=>{try{const s=await i.TU.post("hook_read",{path:e,name:t});if(0===s.code)return s.data?.content||"";(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}return""},on_save:async(s,a)=>{try{const c=await i.TU.post("hook_save",{path:e,name:s,content:a});0===c.code?((0,n.SK)(t("已保存并启用")),await h()):(0,n.zN)(c.message)}catch(e){(0,n.zN)(e?.message)}},on_delete:async a=>{s({title:t("停用钩子"),sub_title:`${t("确认删除并停用")} ${a} ?`,confirm_fun:async()=>{try{const s=await i.TU.post("hook_delete",{path:e,name:a});0===s.code?((0,n.SK)(t("已停用")),await h()):(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}}})}})]})}function O({dir_path:e,on_info_loaded:t,on_changed:s}){const{t:o}=(0,c.Bd)(),[r,d]=(0,a.useState)(null),[h,m]=(0,a.useState)([]),[_,g]=(0,a.useState)(!1),[p,f]=(0,a.useState)(!1);(0,a.useEffect)(()=>{x(),j()},[e]);const x=async()=>{try{const s=await i.TU.post("repo_info",{path:e});0===s.code&&(d(s.data),t(s.data))}catch(e){}},j=async()=>{try{const t=await i.TU.post("submodules",{path:e});0===t.code&&m(t.data||[])}catch(e){}},N=e=>o("uninitialized"===e?"未初始化":"modified"===e?"与记录不一致":"正常");return(0,u.jsxs)("div",{className:"git-repo-panel",children:[(0,u.jsxs)("div",{className:"git-config-row",children:[(0,u.jsx)("span",{className:"git-config__label",children:o("远程地址")}),(0,u.jsx)("span",{className:"git-config__value",title:r?.remote_url,children:r?.remote_url||o("未配置")})]}),(0,u.jsxs)("div",{className:"git-config-row",children:[(0,u.jsx)("span",{className:"git-config__label",children:o("当前提交")}),(0,u.jsxs)("span",{className:"git-config__value",children:[r?.head_hash||"",r&&(r.ahead>0||r.behind>0)&&(0,u.jsxs)("span",{className:"git-repo-panel__counts",children:[r.ahead>0&&(0,u.jsxs)("span",{className:"git-ahead",children:["↑",r.ahead]}),r.behind>0&&(0,u.jsxs)("span",{className:"git-behind",children:["↓",r.behind]})]})]})]}),(0,u.jsxs)("div",{className:"git-sub-panel__header",children:[(0,u.jsxs)("span",{className:"git-sub-panel__title",onClick:()=>g(!_),style:{cursor:"pointer"},children:[o("子模块")," (",h.length,") ",_?"▾":"▸"]}),h.length>0&&(0,u.jsx)(l.rA,{icon:"sync",title:o("初始化并更新子模块"),onClick:async()=>{f(!0);try{const t=await i.TU.post("submodule_update",{path:e});0===t.code?((0,n.SK)(o("子模块更新完成")),await j(),s()):(0,n.zN)(t.message)}catch(e){(0,n.zN)(e?.message)}finally{f(!1)}}})]}),_&&(0,u.jsxs)("div",{className:"git-sub-panel__list",children:[0===h.length&&(0,u.jsx)("div",{className:"git-change-empty",children:o("无子模块")}),h.map(e=>(0,u.jsxs)("div",{className:"git-sub-item",children:[(0,u.jsx)("span",{className:"git-sub-item__name",title:e.path,children:e.path}),(0,u.jsx)("span",{className:"git-sub-item__desc",title:e.desc,children:e.desc}),(0,u.jsx)("span",{className:`git-sub-item__meta git-sub-status--${e.status}`,children:N(e.status)})]},e.path))]})]})}function L({dir_path:e,on_changed:t}){const{t:s}=(0,c.Bd)(),o=(0,d.Zp)(),[r,h]=(0,a.useState)([]),[_,g]=(0,a.useState)([]),[p,f]=(0,a.useState)("none"),[x,j]=(0,a.useState)(""),[N,v]=(0,a.useState)(""),[y,b]=(0,a.useState)(!1);(0,a.useEffect)(()=>{w(),k()},[e]);const w=async()=>{try{const t=await i.TU.post("repos",{path:e});0===t.code&&h(t.data||[])}catch(e){}},k=async()=>{try{const t=await i.TU.post("dirs",{path:e});0===t.code&&g(t.data?.dirs||[])}catch(e){}},S=async()=>{const a=x.trim();if(a){b(!0);try{const c=await i.TU.post("init",{path:`${e}/${a}`.replace(/\/+/g,"/")});0===c.code?((0,n.SK)(s("仓库初始化成功")),f("none"),j(""),await w(),await k(),t()):(0,n.zN)(c.message)}catch(e){(0,n.zN)(e?.message)}finally{b(!1)}}else(0,n.zN)(s("请输入目录名"))},C=async()=>{const a=x.trim();if(a)if(N.trim()){b(!0);try{const c=await i.TU.post("clone",{target:`${e}/${a}`.replace(/\/+/g,"/"),url:N.trim()});0===c.code?((0,n.SK)(s("克隆成功")),f("none"),j(""),v(""),await w(),await k(),t()):(0,n.zN)(c.message)}catch(e){(0,n.zN)(e?.message)}finally{b(!1)}}else(0,n.zN)(s("请输入仓库地址"));else(0,n.zN)(s("请输入目录名"))};return(0,u.jsxs)("div",{className:"git-repo-manager",children:[(0,u.jsxs)("div",{className:"git-repo-manager__header",children:[(0,u.jsxs)("span",{className:"git-sub-panel__title",children:[s("仓库")," (",r.length,")"]}),(0,u.jsx)(l.rA,{icon:"add",title:s("初始化仓库"),selected:"init"===p,onClick:()=>{f("init"===p?"none":"init"),j("")}}),(0,u.jsx)(l.rA,{icon:"cloud_download",title:s("克隆仓库"),selected:"clone"===p,onClick:()=>{f("clone"===p?"none":"clone"),j("")}})]}),"none"!==p&&(0,u.jsxs)("div",{className:"git-sub-panel__form",children:[(0,u.jsx)("input",{className:"input input--block",autoFocus:!0,value:x,placeholder:s("目录名"),onChange:e=>j(e.target.value),onKeyDown:e=>"Enter"===e.key&&("init"===p?S():C())}),"clone"===p&&(0,u.jsx)("input",{className:"input input--block",value:N,placeholder:s("仓库地址"),onChange:e=>v(e.target.value),onKeyDown:e=>"Enter"===e.key&&C()}),(0,u.jsxs)("div",{className:"git-sub-panel__form-actions",children:[(0,u.jsx)("span",{className:"git-sub-panel__hint",children:`${e}/${x||"..."}`.replace(/\/+/g,"/")}),(0,u.jsx)(l.rA,{icon:"check",title:s("保存"),onClick:"init"===p?S:C}),(0,u.jsx)(l.rA,{icon:"close",title:s("取消"),onClick:()=>{f("none"),j(""),v("")}})]}),_.length>0&&(0,u.jsx)("div",{className:"git-repo-manager__dirs",children:_.map(e=>(0,u.jsx)("span",{className:"git-repo-manager__dir",onClick:()=>j(e),children:e},e))})]}),(0,u.jsxs)("div",{className:"git-sub-panel__list",children:[0===r.length&&(0,u.jsx)("div",{className:"git-change-empty",children:s("当前目录下没有仓库")}),r.map(t=>(0,u.jsxs)("div",{className:"git-sub-item",children:[(0,u.jsx)("span",{className:"git-sub-item__name",title:t.name,children:t.name}),(0,u.jsx)("span",{className:"git-sub-item__meta",children:t.branch}),(0,u.jsx)("span",{className:"git-sub-item__ops",children:(0,u.jsx)(l.rA,{icon:"login",title:s("进入"),onClick:()=>{return s=t,void o(`${m.o.git_page}/${e}/${s.name}/`.replace(/\/+/g,"/"));var s}})})]},t.path))]})]})}const Z=100;function q(){const{t:e}=(0,c.Bd)(),t=(0,A.y)(),s=(0,A.y)(),g=(0,d.Zp)();let p=(0,h.GG)(m.o.git_page,(0,h.vX)());for(let e=0;e<3;e++){let e;try{e=decodeURIComponent(p)}catch{break}if(e===p)break;p=e}p=p.replace(/\/+$/,"");const[f,x]=(0,a.useState)([]),[j,N]=(0,a.useState)([]),[v,y]=(0,a.useState)(!1),[w,k]=(0,a.useState)(!1),S=(0,a.useRef)(!1),[$,T]=(0,a.useState)({current:"",branches:[]}),[W,q]=(0,a.useState)(""),[G,V]=(0,a.useState)(new Set),[X,J]=(0,a.useState)("status"),[Q,Y]=(0,a.useState)(!1),[ee,te]=(0,a.useState)(20),[se,ae]=(0,a.useState)(!1),ie=(0,a.useRef)(null),ne=(0,a.useRef)(null),[ce,le]=(0,a.useState)(null),[oe,re]=(0,a.useState)("unified"),[de,he]=(0,a.useState)({name:"",email:""}),[me,_e]=(0,a.useState)(null),[ge,pe]=(0,a.useState)(0),[ue,fe]=(0,a.useState)(null),[xe,je]=(0,a.useState)(null),[Ne,ve]=(0,a.useState)(!1);(0,a.useEffect)(()=>{p&&be().then(e=>{e&&(we(),ke(),Se(),Ce(),ye())})},[p]);const ye=async()=>{try{const e=await i.TU.post("conflicts",{path:p});0===e.code&&pe((e.data?.files||[]).length)}catch(e){}},be=async()=>{try{Y(!0);const e=await i.TU.post("status",{path:p});return 0===e.code&&(x(e.data||[]),ve(!1),!0)}catch(e){const t="string"==typeof e?e:e?.message;return t&&t.includes("not a git repository")&&ve(!0),!1}finally{Y(!1)}},we=async()=>{try{const e=await i.TU.post("log",{path:p,maxCount:Z,skip:0});if(0===e.code){const t=e.data||[];N(t),y(t.length>=Z)}}catch(e){}},ke=async()=>{try{const e=await i.TU.post("branches",{path:p});0===e.code&&T(e.data||{current:"",branches:[]})}catch(e){}},Se=async()=>{try{const e=await i.TU.post("get_user_config",{path:p});0===e.code&&he(e.data)}catch(e){}},Ce=async()=>{try{const e=await i.TU.post("get_proxy",{path:p});0===e.code&&_e(e.data)}catch(e){}},ze=async(t,s)=>{t.untracked?(0,n.zN)(e("未跟踪文件无差异")):le({kind:"working",path:t.path,staged:s})},Ae=async t=>{try{Y(!0);const s=await i.TU.post("discard",{path:p,files:t});0===s.code?((0,n.SK)(e("discarded")),"working"===ce?.kind&&t.some(e=>e.path===ce.path)&&le(null),await be()):(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}finally{Y(!1)}},$e=async()=>{const e=f.filter(e=>!e.staged);try{Y(!0);const t=await i.TU.post("add",{path:p,files:e.map(e=>e.path)});if(0!==t.code)return void(0,n.zN)(t.message)}catch(e){return void(0,n.zN)(e?.message)}finally{Y(!1)}await Ue(!1)},Ue=async t=>{try{Y(!0);const s=await i.TU.post("commit",{path:p,message:W.trim(),allChanged:t});0===s.code?((0,n.SK)(e("提交成功")),q(""),le(null),await be(),we()):(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}finally{Y(!1)}},Te=async(t=!1)=>{try{Y(!0);const s=await i.TU.post("push",{path:p,force:t});0===s.code?(0,n.SK)(e("推送成功")):(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}finally{Y(!1)}},Ke=async()=>{le(null),await be(),we(),ke()},Ee=(0,a.useCallback)(_.throttle(e=>{const t=parseFloat(getComputedStyle(ne.current).fontSize),s=window.innerWidth/t-4,a=e.clientX/t,i=2.25+ie.current.offsetWidth/t;a<=s&&a>=i&&te(parseFloat(a.toFixed(2)))},32),[]),Be=()=>{ae(!1),ne.current.removeEventListener("pointermove",Ee)},Fe=p.split("/").filter(Boolean).pop()||p;return(0,u.jsxs)("div",{className:"studio",children:[(0,u.jsx)(r.A,{ignore_tags:!0,left_children:[(0,u.jsx)(l.rA,{title:e("取消"),icon:"close",onClick:()=>g(-1)},"close"),(0,u.jsx)("span",{children:Fe},"title")],children:(0,u.jsx)(l.rA,{icon:"refresh",title:e("刷新"),onClick:()=>{be(),we(),ke(),Se(),Ce()}})}),Ne?(0,u.jsx)("div",{className:"studio-body",children:(0,u.jsx)("div",{className:"studio-editor",children:(0,u.jsx)("div",{className:"git-main",children:(0,u.jsx)("div",{className:"git-card",children:(0,u.jsx)(L,{dir_path:p,on_changed:()=>{ve(!1),be(),we(),ke()}})})})})}):(0,u.jsxs)("div",{className:"studio-body",ref:ne,children:[(0,u.jsxs)("div",{className:"studio-nav studio-nav--git",style:{width:ee-1+"em"},children:[(0,u.jsx)("div",{className:"menu git-menu not-select-div",children:(0,u.jsx)("div",{className:"wrapper",children:(0,u.jsxs)("ul",{children:[(0,u.jsxs)("li",{className:"status"===X?"active":"",onClick:()=>J("status"),children:[e("变更")," (",f.length,")"]}),(0,u.jsxs)("li",{className:"log"===X?"active":"",onClick:()=>J("log"),children:[e("提交记录")," (",j.length,")"]})]})})}),"status"===X&&(0,u.jsx)("div",{className:"git-scroll",children:(0,u.jsx)(b,{files:f,selected:G,on_toggle:e=>{const t=new Set(G);t.has(e)?t.delete(e):t.add(e),V(t)},on_toggle_all:(e,t)=>{const s=new Set(G);for(const a of e)t?s.add(a):s.delete(a);V(s)},active_path:"working"===ce?.kind?ce.path:null,on_view_diff:ze,on_stage_section:async(t,s)=>{if(0===t.length)return;const a=t.map(e=>e.path);try{const t=s?await i.TU.post("reset",{path:p,files:a}):await i.TU.post("add",{path:p,files:a});0===t.code?((0,n.SK)(e(s?"已取消暂存":"已暂存")),await be()):(0,n.zN)(t.message)}catch(e){(0,n.zN)(e?.message)}},on_stage_one:async(e,t)=>{try{const s=t?await i.TU.post("reset",{path:p,files:[e.path]}):await i.TU.post("add",{path:p,files:[e.path]});0===s.code?(await be(),"working"===ce?.kind&&ce.path===e.path&&ze(e,!t)):(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}},on_view_blame:e=>{le({kind:"blame",file:e.path})},on_discard_one:(t,a)=>{s({title:e("discard"),sub_title:t.untracked?e("discard_untracked_tip"):e("discard_modified_tip"),confirm_fun:()=>Ae([{path:t.path,staged:a,untracked:t.untracked}])})},on_discard_selected:()=>{const t=f.filter(e=>G.has(e.path));0!==t.length&&s({title:e("discard"),sub_title:e("discard_selected_tip",{n:t.length}),confirm_fun:()=>Ae(t.map(e=>({path:e.path,staged:e.staged,untracked:e.untracked})))})}})}),"log"===X&&(0,u.jsx)("div",{className:"git-scroll",children:(0,u.jsx)(z,{dir_path:p,entries:ue??j,is_search:null!==ue,has_more:v,loading_more:w,active_hash:"commit"===ce?.kind?ce.hash:null,on_select:e=>{le({kind:"commit",hash:e})},on_scroll_bottom:e=>{if(null!==ue)return;const t=e.currentTarget;t.scrollHeight-t.scrollTop-t.clientHeight<200&&(async()=>{if(!S.current&&v){S.current=!0,k(!0);try{const e=await i.TU.post("log",{path:p,maxCount:Z,skip:j.length});if(0===e.code){const t=e.data||[];N(e=>[...e,...t]),y(t.length>=Z)}}catch(e){}finally{S.current=!1,k(!1)}}})()},on_search_result:e=>{fe(e),null===e&&we()}})})]}),(0,u.jsx)("div",{className:"studio__divider",ref:ie,onPointerDown:()=>{ae(!0),ne.current.addEventListener("pointermove",Ee)},onPointerUp:Be}),se&&(0,u.jsx)("div",{className:"shell__overlay",onPointerUp:Be}),(0,u.jsx)("div",{className:"studio-editor",children:(0,u.jsxs)("div",{className:"git-main",children:[(0,u.jsx)(D,{dir_path:p,on_resolved:Ke}),(0,u.jsxs)("div",{className:"git-card",children:[(0,u.jsx)(E,{current:$.current,branches:$.branches,on_checkout:async t=>{try{Y(!0);const s=await i.TU.post("checkout",{path:p,branch:t});0===s.code?((0,n.SK)(e("切换分支成功")),await Ke()):(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}finally{Y(!1)}},on_create:async t=>{try{Y(!0);const s=await i.TU.post("branch_create",{path:p,name:t});0===s.code?((0,n.SK)(e("分支创建成功")),await Ke()):(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}finally{Y(!1)}},on_delete:async(t,s)=>{try{Y(!0);const a=await i.TU.post("branch_delete",{path:p,name:t,force:s});0===a.code?((0,n.SK)(e("分支删除成功")),await Ke()):(0,n.zN)(a.message)}catch(e){(0,n.zN)(e?.message)}finally{Y(!1)}},on_merge:async t=>{try{Y(!0);const s=await i.TU.post("merge",{path:p,branch:t});0===s.code?((0,n.SK)(e("合并成功")),await Ke()):(0,n.zN)(s.message)}catch(e){(0,n.zN)(e?.message)}finally{Y(!1)}},ahead:xe?.ahead,behind:xe?.behind}),(0,u.jsx)(M,{dir_path:p,current_branch:$.current,on_checkout:Ke,on_compare:e=>le({kind:"remote",branch:e})}),(0,u.jsx)(o.Z2,{placeholder:e("git_msg"),value:W,onChange:e=>q(e.target.value),rows:3}),(0,u.jsxs)("div",{className:"git-btn-row",children:[(0,u.jsx)(l.rA,{icon:"check",title:e("提交"),onClick:async()=>{if(!W.trim())return void(0,n.zN)(e("请输入提交信息"));if(0===f.filter(e=>e.staged).length){return 0===f.filter(e=>!e.staged).length?void(0,n.zN)(e("没有可提交的更改")):void t({title:e("提交"),sub_title:e("存在未暂存的改动,是否一并暂存并提交?"),confirm_fun:$e})}await Ue(!1)}}),(0,u.jsx)(l.rA,{icon:"edit_note",title:e("修改最后一次提交"),onClick:async()=>{try{Y(!0);const t=await i.TU.post("commit_amend",{path:p,message:W});0===t.code?((0,n.SK)(e("已修改最后一次提交")),q(""),le(null),await be(),we()):(0,n.zN)(t.message)}catch(e){(0,n.zN)(e?.message)}finally{Y(!1)}}}),(0,u.jsx)(l.rA,{icon:"download",title:e("拉取"),onClick:async()=>{try{Y(!0);const t=await i.TU.post("pull",{path:p});0===t.code?((0,n.SK)(e("拉取成功")),await be(),we()):(0,n.zN)(t.message)}catch(e){(0,n.zN)(e?.message)}finally{Y(!1)}}}),(0,u.jsx)(l.rA,{icon:"upload",title:e("推送"),onClick:()=>Te(!1)}),(0,u.jsx)(l.rA,{icon:"keyboard_double_arrow_up",title:e("强制推送"),onClick:()=>Te(!0)}),(0,u.jsx)("span",{className:"git-btn-gap"}),(0,u.jsx)(l.rA,{icon:"inventory_2",title:e("暂存工作区"),onClick:async()=>{try{const t=await i.TU.post("stash",{path:p});0===t.code?((0,n.SK)(e("暂存工作区成功")),le(null),await be()):(0,n.zN)(t.message)}catch(e){(0,n.zN)(e?.message)}}}),(0,u.jsx)(l.rA,{icon:"unarchive",title:e("恢复工作区"),onClick:async()=>{try{const t=await i.TU.post("stash_pop",{path:p});0===t.code?((0,n.SK)(e("恢复工作区成功")),await be()):(0,n.zN)(t.message)}catch(e){(0,n.zN)(e?.message)}}})]}),(0,u.jsx)(I,{dir_path:p,on_changed:Ke}),(0,u.jsx)(F,{dir_path:p,target_hash:"commit"===ce?.kind?ce.hash:void 0,on_changed:Ke}),(0,u.jsx)(R,{dir_path:p,on_changed:Ke})]}),ce?"commit"===ce.kind?(0,u.jsx)(U,{dir_path:p,hash:ce.hash,on_close:()=>le(null),on_changed:Ke}):"blame"===ce.kind?(0,u.jsx)(K,{dir_path:p,file:ce.file,on_close:()=>le(null)}):"remote"===ce.kind?(0,u.jsx)(P,{dir_path:p,branch:ce.branch,current_branch:$.current,on_close:()=>le(null)}):(0,u.jsxs)("div",{className:"git-card git-card--diff",children:[(0,u.jsxs)("div",{className:"git-diff-header",children:[(0,u.jsx)("span",{className:"git-diff-header__badge",children:ce.staged?e("已暂存"):e("未暂存")}),(0,u.jsx)("span",{className:"git-diff-header__path",title:ce.path,children:ce.path}),(0,u.jsxs)("div",{className:"git-diff-header__modes",children:[(0,u.jsx)(l.rA,{icon:"view_agenda",title:e("单栏"),selected:"unified"===oe,onClick:()=>re("unified")}),(0,u.jsx)(l.rA,{icon:"view_column",title:e("并排"),selected:"split"===oe,onClick:()=>re("split")}),(0,u.jsx)(l.rA,{icon:"close",title:e("关闭"),onClick:()=>le(null)})]})]}),ce.staged?(0,u.jsx)(C,{dir_path:p,file:ce.path,left_ref:"HEAD",right_ref:"staged",mode:oe}):(0,u.jsx)(C,{dir_path:p,file:ce.path,left_ref:"HEAD",right_ref:"worktree",mode:oe})]}):(0,u.jsx)("div",{className:"git-card git-card--placeholder",children:e("点击左侧文件查看差异")}),(0,u.jsxs)("div",{className:"git-card",children:[(0,u.jsx)(B,{dir_path:p,user_config:de,proxy_config:me,on_user_config_saved:he,on_proxy_saved:_e}),(0,u.jsx)(O,{dir_path:p,on_info_loaded:je,on_changed:Ke}),(0,u.jsx)(H,{dir_path:p})]})]})})]})]})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[4091],{48890(e,t,r){r.d(t,{Kw:()=>n,Tt:()=>c});var n=r(80952),c=(r(82327),r(1766),r(24854),r(90008),r(90846),r(40975),r(44286),r(30766),r(14973),r(69687),r(1234),r(47507),r(87268),r(34678),r(24522));const s=`https://gcore.jsdelivr.net/npm/ace-builds@${n.version}/src-min-noconflict/`;n.config.set("basePath",s),n.config.set("modePath",s),n.config.set("themePath",s),n.config.set("workerPath",s)},84091(e,t,r){r.r(t),r.d(t,{default:()=>f});var n=r(96540),c=(r(80952),r(48890)),s=r(34843),i=r(82893),a=r(78247),u=r(93245),o=r(23430),d=r(74848);function f(e){const t=(0,n.useRef)(null),[r,f]=(0,s.fp)(i.AG.user_base_info),[l,h]=(0,n.useState)(!1),_=(0,n.useRef)(l);_.current=l;const m=(0,n.useRef)(e.save);m.current=e.save;const v=(0,n.useRef)(e.on_dirty);v.current=e.on_dirty,(0,n.useEffect)(()=>{v.current?.(l)},[l]);const g=async e=>{if(!m.current||!_.current)return;!1!==await m.current(e)&&h(!1)},b=(0,n.useRef)(g);b.current=g;const p=(0,n.useRef)(e.register);p.current=e.register,(0,n.useEffect)(()=>{p.current?.({save:e=>b.current(e)})},[]),(0,u.a)(o.nE.ace,()=>!!m.current&&_.current,g);const w=r.user_data.theme?.includes("dark")?"cloud_editor_dark":"cloud9_day";return(0,n.useEffect)(()=>{const r=c.Kw.edit(t.current,{value:a.xK.get_value_temp(e.editor_id),showPrintMargin:!1,theme:`ace/theme/${w}`,mode:e.model??c.Tt.getModeForPath(e.name??"").mode,wrap:!1,highlightActiveLine:!1,fontSize:14,...e.options});return r.setOptions({}),r.container.addEventListener("wheel",function(e){e.preventDefault()}),r.focus(),r.on("change",function(t){h(!0),e.on_change&&e.on_change()}),t.current=r,r.formatCode=()=>{const e=c.Kw.require("ace/ext/beautify"),r=t.current;r&&e.beautify(r.session)},a.xK.set_editor_temp(r,e.editor_id),()=>{a.xK.delete_editor_temp(e.editor_id),r.destroy()}},[]),(0,d.jsx)("div",{ref:t,style:{height:"100%",width:"100%"}})}},93245(e,t,r){r.d(t,{a:()=>u,d:()=>a});var n=r(96540),c=r(34843),s=r(82893),i=r(23430);const a=[{id:i.nE.ace,label:"文本编辑器(ace)"},{id:i.nE.md,label:"md编辑器"},{id:i.nE.mind,label:"思维导图编辑器"},{id:i.nE.draw,label:"draw编辑器"},{id:i.nE.timeline,label:"时间线编辑器"},{id:i.nE.image,label:"图片编辑器"},{id:i.nE.excel,label:"excel编辑器"}];function u(e,t,r,i=!1){const[a]=(0,c.fp)(s.AG.user_base_info),u=a?.user_data?.editor_auto_save,o=(0,n.useRef)(u);o.current=u;const d=(0,n.useRef)(t);d.current=t;const f=(0,n.useRef)(r);f.current=r,(0,n.useEffect)(()=>{if(i)return;const t=o.current;if(!t?.enable||t.interval<=0||!t.editors?.includes(e))return;const r=setInterval(()=>{d.current()&&f.current(!0)},1e3*t.interval);return()=>clearInterval(r)},[u,e,i])}}}]);
|