filecat 7.8.0 → 7.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -201
- package/README.md +182 -182
- package/build/dist/{4967.3fd3bd40a2b5a3b52428.js → 1060.198d91e2dfc174317c3a.js} +1 -1
- package/build/dist/1075.05eed88707339ca32044.js +1 -0
- package/build/dist/{1142.121454b1de53689b7367.js → 1142.bc43fae2e5e38d9359df.js} +1 -1
- package/build/dist/1384.edbad9c24d883a59724d.js +1 -0
- package/build/dist/1417.d390b18dd58ff5c28160.js +1 -0
- package/build/dist/1448.4db495e1389c0c8445b3.js +1 -0
- package/build/dist/{3324.22efcb1c431177b1cf5f.js → 1455.26a021eb94e5bdd5bec2.js} +1 -1
- package/build/dist/{1636.b6a17252dfd0d22f09a7.js → 1636.b80b1883358e132d3424.js} +1 -1
- package/build/dist/{1832.8ea5c3e8288df0b7fd5c.js → 1832.a01933ba5df99576ecc2.js} +1 -1
- package/build/dist/2300.c99b1dd4e752cdfd5e32.js +2 -0
- package/build/dist/{2300.9e1baa1c0368abe53d96.js.LICENSE.txt → 2300.c99b1dd4e752cdfd5e32.js.LICENSE.txt} +1 -1
- package/build/dist/239.f570f06d4b9c020f1013.js +1 -0
- package/build/dist/2479.294792ef5d360ad64abc.js +1 -0
- package/build/dist/2542.26cb302b60de23166227.js +1 -0
- package/build/dist/{259.81bb9e049e5ef587a96f.js → 259.3c0eb22e9b43ffb63c9c.js} +1 -1
- package/build/dist/2626.3bcfe1f26d9cb796a925.js +1 -0
- package/build/dist/2674.15ca3c6ac911cf6e6e2f.js +1 -0
- package/build/dist/3233.43bdd7c12ca829d56116.js +1 -0
- package/build/dist/3299.6ab0d94f02171cd762cc.js +1 -0
- package/build/dist/{6992.f6a07311a638794c24f7.js → 3471.ef3b5dcfe37963034187.js} +1 -1
- package/build/dist/{3528.56eeefab6fca5884e2a6.js → 3528.0f8f34028d92fa87c518.js} +1 -1
- package/build/dist/{3659.8a31495bb8f38c0ffa7c.js → 3659.dd03dc2ac52a3ff19105.js} +1 -1
- package/build/dist/4004.f0193c43fb891fdfb0e4.js +1 -0
- package/build/dist/{4560.8ef2e4b60cc86d019dd6.js → 4560.fd9f8cf2d6022b1d3a94.js} +1 -1
- package/build/dist/{4903.407cafe944a297471f5a.js → 4903.070aaa53a243baf05133.js} +1 -1
- package/build/dist/{4946.c95d4f426146e0180172.js → 4946.d578f6ba367a742d80bf.js} +2 -2
- package/build/dist/4986.f244efce9cf6be21f846.js +1 -0
- package/build/dist/5272.1f0dfac07ba202e7d323.js +1 -0
- package/build/dist/{5308.052f45c15785487b3766.js → 5308.d1e5ccb49396fc1b026d.js} +1 -1
- package/build/dist/{5516.645e4a900df9bdc1806c.js → 5516.88521f3a3c7101c46df3.js} +1 -1
- package/build/dist/5614.43bdd7c12ca829d56116.js +1 -0
- package/build/dist/{5139.adf9574d9b54a216e041.js → 5709.81f43e3c021fafdfe36f.js} +1 -1
- package/build/dist/{5744.e9f1efb88a617b05b709.js → 5744.0f8a0432b73b2eb0a7ff.js} +1 -1
- package/build/dist/{5877.ca081c4798194230243c.js → 5877.98d0475aaf4058b9a715.js} +1 -1
- package/build/dist/6010.5400c344149450c83284.js +1 -0
- package/build/dist/{6247.917e3fbef5dc5fbaf937.js → 6247.525b0b68872036ac2fa6.js} +1 -1
- package/build/dist/{7520.fbb0bc2a05cf94e15418.js → 6322.552511b5cb12cd0c821c.js} +1 -1
- package/build/dist/6492.17ecd8515fa512ce9306.js +1 -0
- package/build/dist/{676.a75318a8b598d8daadf0.js → 676.356039ef6f28f96b8c8b.js} +1 -1
- package/build/dist/{6805.bf0c964ab84f0fcc78be.js → 6805.373ac0e7d6555e4a6459.js} +1 -1
- package/build/dist/{6919.8cf13c01184b7148b28e.js → 6919.c7cc8617b658198d4924.js} +1 -1
- package/build/dist/{7038.4e4fc8e405c56d3080e2.js → 7038.166f915547d27e4dc5e4.js} +1 -1
- package/build/dist/{7759.0b68912ff9ef10869f59.js → 7759.7cd3fe8e5d37df25804c.js} +1 -1
- package/build/dist/7873.e3098bc6f510e5bea55f.js +1 -0
- package/build/dist/7923.d44556578af4d3d7cea3.js +2 -0
- package/build/dist/7943.acf25a5e98dd13290985.js +1 -0
- package/build/dist/8090.8977224618a14ae42159.js +2 -0
- package/build/dist/8302.ce97557b7cf7c8387942.js +1 -0
- package/build/dist/8319.6a6b9651c87a1bb4cbb9.js +1 -0
- package/build/dist/{8603.4142ce42c1635f493eca.js → 8603.f1cbcfd64cde885f9809.js} +1 -1
- package/build/dist/8649.d6055ad75975b803bbc1.js +1 -0
- package/build/dist/{8727.3628c746061aed7a4077.js → 8727.8658835acb7e0b6e5acc.js} +1 -1
- package/build/dist/{8765.a5633d054abb67142fc3.js → 8765.8758c290a6b132f2ce7f.js} +1 -1
- package/build/dist/8772.2c35012c25ac9eb5f74d.js +2 -0
- package/build/dist/{8772.e8f9731c1c061f1cdf56.js.LICENSE.txt → 8772.2c35012c25ac9eb5f74d.js.LICENSE.txt} +1 -1
- package/build/dist/8781.6bd14487d172e004e3d3.js +1 -0
- package/build/dist/9299.7358ccf05b1415ed7959.js +1 -0
- package/build/dist/9334.a25983aafdcbde63ae5e.js +1 -0
- package/build/dist/{9546.e7206c968e92371ae2b1.js → 9546.2cecad04cf676a6616cd.js} +1 -1
- package/build/dist/dark.css +839 -839
- package/build/dist/filerobot-image-editor.min.js +42445 -42445
- package/build/dist/google-dark.css +2032 -2032
- package/build/dist/google.css +1719 -1719
- package/build/dist/index.html +1 -1
- package/build/dist/main.ab3398f34c41e61310ae.js +2 -0
- package/build/dist/{main.98bb29605335d9b2219f.js.LICENSE.txt → main.ab3398f34c41e61310ae.js.LICENSE.txt} +1 -1
- package/build/dist/rle.js +17867 -17867
- package/build/main.js +1 -1
- package/build/plugin/core.type.d.ts +62 -0
- package/build/threads.work.filecat.js +1 -1
- package/env +26 -26
- package/package.json +211 -211
- package/shell/build.js +161 -161
- package/shell/config/.babelrc +14 -14
- package/shell/config/base.webpack.config.js +78 -78
- package/shell/config/common-bin.config.js +44 -44
- package/shell/config/env.js +10 -10
- package/shell/config/prebuild-file-path.js +17 -17
- package/shell/config/webpack.exe.config.js +36 -36
- package/shell/config/webpack.npm.config.js +44 -44
- package/shell/config/webpack.web.config.js +152 -152
- package/shell/dev.js +51 -51
- package/shell/docker-build.sh +2 -2
- package/shell/filecat +1 -1
- package/shell/filecat-watch +1 -1
- package/shell/install.js +48 -48
- package/shell/net-agent/git-clone.bat +23 -23
- package/shell/net-agent/git-pull.bat +17 -17
- package/shell/net-agent/git-push.bat +17 -17
- package/shell/pkg.ts +50 -50
- package/shell/postinstall-optional.js +29 -29
- package/shell/start/filecat-install.sh +22 -22
- package/shell/start/filecat-run.sh +2 -2
- package/shell/start/windows-install.js +178 -178
- package/shell/start/windows-uninstall.js +131 -131
- package/shell/util/file.js +46 -46
- package/build/dist/1075.493acb74297c1e753de2.js +0 -1
- package/build/dist/1384.0d0fc5faa899c9eddcbe.js +0 -1
- package/build/dist/1448.0710f04bed1c52e6a5db.js +0 -1
- package/build/dist/2300.9e1baa1c0368abe53d96.js +0 -2
- package/build/dist/2479.15722ac55b05c521f4f7.js +0 -1
- package/build/dist/2542.23fb13b1623c9f7c3fc1.js +0 -1
- package/build/dist/2626.05d1faa293e0a3318b9b.js +0 -1
- package/build/dist/2674.0c822a9c458f923a4eff.js +0 -1
- package/build/dist/2851.2195b5906b2c224c7bf7.js +0 -1
- package/build/dist/3140.794a212da633caf38b3a.js +0 -2
- package/build/dist/3233.fb6bffd5e097e4ac9423.js +0 -1
- package/build/dist/3299.d01f5a742d80f4e6e25b.js +0 -1
- package/build/dist/4004.de90f1192487a24a0a9a.js +0 -1
- package/build/dist/4437.4d5a0965043471411a00.js +0 -1
- package/build/dist/4986.78047106f3a0d2d71199.js +0 -1
- package/build/dist/5272.0b70ee8ec5f083fb9f5b.js +0 -1
- package/build/dist/5614.fb6bffd5e097e4ac9423.js +0 -1
- package/build/dist/6010.2da6f8c2fce5292557cb.js +0 -1
- package/build/dist/6492.3ee4060598de873d8e8f.js +0 -1
- package/build/dist/7756.2f851693ba030c42dde8.js +0 -1
- package/build/dist/7873.11d04b741d2b499d9cb9.js +0 -1
- package/build/dist/7923.861345fd55941e8089a1.js +0 -2
- package/build/dist/7943.54c702542d55f576a576.js +0 -1
- package/build/dist/7954.6ce241a8ed27cb26efc6.js +0 -1
- package/build/dist/8302.c1c381630b4ec76bf8ab.js +0 -1
- package/build/dist/8319.c15a3674ec7abc493595.js +0 -1
- package/build/dist/8772.e8f9731c1c061f1cdf56.js +0 -2
- package/build/dist/9299.ed4de6cd4f4bfa0a966a.js +0 -1
- package/build/dist/main.98bb29605335d9b2219f.js +0 -2
- /package/build/dist/{4946.c95d4f426146e0180172.js.LICENSE.txt → 4946.d578f6ba367a742d80bf.js.LICENSE.txt} +0 -0
- /package/build/dist/{7923.861345fd55941e8089a1.js.LICENSE.txt → 7923.d44556578af4d3d7cea3.js.LICENSE.txt} +0 -0
- /package/build/dist/{3140.794a212da633caf38b3a.js.LICENSE.txt → 8090.8977224618a14ae42159.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[6010,8302],{83277(e,t,n){n.d(t,{$j:()=>a,Lv:()=>s});class s{token;open=!1;note;index;url;model;request_type;json_params;sys_prompt;dotenv="";tool_mode=!1;show_options;static get_label_by_v(e,t){if(!e||!t?.length)return e;for(const n of t)if(n.value===e)return n.label;return e}static have_label_by_v(e,t){if(!e||!t?.length)return!1;for(const n of t)if(n.value===e)return!0;return!1}}const o=JSON.stringify({stream:!0,thinking:{type:"disabled"}});function a(e){return"string"==typeof e?e:Array.isArray(e)?e.map(e=>"text"===e.type?e.text:"[图片]").join("\n"):""}n.d(t,["CP",0,'\n\n\n\n# 聊天循环最大次数\ntool_call_max=500\n# 是否允许AI直接执行命令而不需要用户确认,默认为false,需要用户手动确认,如果使用 workflow 这里等价于为 true\nallow_exec_cmd_directly=false\n\n# 可选的代理 url,如果指定了所有访问大模型的请求将会走代理\n#proxy_url=\n\n# 可选的多个url 以数组分割\n# options_agent_url_list=[{"value":"http://..","label":"openai"}]\n\n# 可选的多个 key\n# options_agent_key_list=[{"value":"sh-aaa","label":"option1"}]\n\n# 可选的多个 model\n# options_agent_model_list=[{"value":"gpt-5.5","label":"gpt"}]\n\n# 存放本地的 prompt 文件 用于每次聊天的时候自动读取并加载\n# options_local_file_path_prompt_list=["/prompt/a.txt"]\n\n# 开启切换模型 ,开启以后,你可以自己写 prompt 提供多个模型让 ai 自己根据每次聊天切换下一步调用其他模型的次数\n# open_pick_model=false\n\n# 压缩后仍然完整保留的最近消息数\nmax_recent_messages=12\n# 当单个会话累计消息条数超过该值时,触发历史消息裁剪\ncompress_message_count=16\n# 历史消息中 tool 输出的最大字符数,只保留调用形式让 AI 知道调用了就行\nmax_tool_content_chars=200\n\n# ===== 模型类型(request_type)=====\n# 必填项,不同类型的 model 接口格式不同,默认 completions。\n# 可选值:\n# completions 标准对话/聊天补全 (chat/completions)\n# images 图片生成 (images/generations)\n# audio_speech 文本转语音 (audio/speech)\n# audio_transcription 语音转文字 (audio/transcriptions)\n# audio_translation 语音翻译 (audio/translations)\n# embeddings 向量嵌入 (embeddings)\n#request_type=completions\n\n# ===== 成为 tool(tool_mode)=====\n# 开启后该模型会作为一个工具被加载,可实现不同模型担任不同角色/能力,供 AI agent 在对话中动态调用。\n# 注意:不能与「是否开启」(open) 同时为 true。\n#tool_mode=false\n\n# ===== 是否支持图片(support_image)=====\n# 开启后:1) 注册 read_image 工具,让 AI 能读取本地图片;\n# 2) 工具读到的图片会以 OpenAI 多模态格式 image_url 随消息发给模型,模型就能真正"看图"。\n# 关闭后:AI 看不到图片,read_image 只会返回一句文字说明。\n# 主流模型(gpt-4o、豆包、qwen-vl、deepseek-vl 等)都支持,默认开启。\nsupport_image=true\n',"cL",0,o])},77481(e,t,n){n.d(t,{S:()=>i,X:()=>r});var s=n(96540),o=n(61443),a=n(74848);function r(e){const[t,n]=s.useState([]),r=(0,s.useRef)(-1),[i,l]=(0,s.useState)(-1),[c,d]=(0,s.useState)(-1);(0,s.useEffect)(()=>{e.children?n(Array.isArray(e.children)?e.children:[e.children]):n(e.rows)},[e.rows,e.children]);const p=()=>{r.current=-1,l(-1),d(-1)};return(0,a.jsxs)("table",{children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{children:e.headers?.map((t,n)=>{const s=!!e.filter&&(e.filter.column??0)===n;let r=t;if(s){const n=e.filter,s=n.options.find(e=>e.value===n.value);null!=n.value&&s&&(r=`${t} (${s.label})`)}return(0,a.jsx)("th",{className:s?"table-filter-col":"",children:s?(0,a.jsx)(o.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:r}):t},n)})})}),(0,a.jsx)("tbody",{children:t.map((t,n)=>{const s=!!e.onRowDrag;return(0,a.jsx)("tr",{className:s?(i===n?"row-dragging":"")+(c===n?" row-drop-target":""):"",draggable:s,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{s&&(r.current=n,l(n),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!s||r.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(n))},onDrop:t=>{s&&(t.preventDefault(),(()=>{const t=r.current,n=c;p(),t<0||n<0||t===n||e.onRowDrag?.(t,n)})())},onDragEnd:p,children:t.map((n,s)=>{const o=s===t.length-1?"small":"";return(0,a.jsx)("td",{className:o,style:{width:e.width??"auto"},children:n},s)})},n)})})]})}function i(e){return(0,a.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,a.jsx)("div",{children:e},t))})}},29591(e,t,n){n.r(t),n.d(t,{default:()=>$});var s=n(22022),o=n(96540),a=n(85997),r=n(4412),i=n(34843),l=n(82893),c=n(75725),d=n(77481),p=n(61443),m=n(70447),u=n(34299),h=n(74848);var _=n(14284),x=n(53459),g=n(62042),v=n(7523),f=n(78247),j=n(23430),y=n(61973),w=n(14944),C=n(92275),b=n(88815),A=n(64694),k=n(45907),S=n(12721),I=n(24659),N=n(83277);function $(){const{t:e}=(0,s.Bd)(),{initUserInfo:t}=(0,o.useContext)(v.F),n=[e("编号"),e("url"),e("是否开启"),e("key"),"model",e("更多属性"),e("备注")],$=[e("编号"),e("本地目录"),e("自动加载"),e("备注")],[K,O]=(0,o.useState)([]),[L,M]=(0,o.useState)([]),[P,X]=(0,o.useState)([]),[D,T]=(0,o.useState)(null),H=(0,o.useRef)(),R=(0,o.useRef)(!1),q=(0,o.useRef)(!1),[F,V]=(0,o.useState)([]),[E,Y]=(0,o.useState)(!1),[B,G]=(0,o.useState)({}),[J,W]=(0,i.fp)(l.AG.prompt_card),[z,U]=(0,i.fp)(l.AG.user_base_info),[Z,Q]=(0,o.useState)(!1),ee=P.filter(e=>"http"!==(e.transport??"stdio")),te=P.filter(e=>"http"===e.transport),ne=[e("编号"),e("名称"),e("是否开启"),e("状态"),"command","args","cwd",e("tools|env"),e("备注")],se=[e("编号"),e("名称"),e("是否开启"),e("状态"),e("endpoint"),e("tools|headers"),e("备注")],oe=[e("编号"),e("提示词"),e("LLM编辑开关"),e("llm_pmt"),e("编辑规则"),e("备注")],[ae,re]=(0,o.useState)([]),[ie,le]=(0,o.useState)(!1),ce=function(){const[e,t]=(0,i.fp)(l.AG.prompt_card);return e=>{t({open:!0,title:"信息",context_div:(0,h.jsx)("div",{children:(0,h.jsx)(u.default,{context:e})})})}}(),{check_user_auth:de}=(0,f.MH)(),[pe,me]=(0,i.fp)(l.AG.editorSetting),ue=(0,y.Zp)(),he=(0,k.y)(),_e=(0,I.K)(),xe=async()=>{const e=await _.jV.get("docs_on_get");e.code===x.m.Success&&Q(e.data)};(0,o.useEffect)(()=>{(async()=>{const e=await _.XO.get("ai_agent_setting");e.code===x.m.Success&&O(e.data.models),await w.ws.addMsg(C.HK.ai_load_info,e=>{T(e.context)});const t=await w.ws.sendData(C.HK.ai_load_info,{});t?.context&&T(t.context);const n=await _.XO.get("ai_docs_setting");n.code===x.m.Success&&(H.current=n.data.param,n.data.list?.length&&M(n.data.list));const s=await _.XO.get("ai_mcp_setting");s.code===x.m.Success&&X(s.data.list??[]),await we(),xe();const o=await _.XO.get("ai_system_prompts");o.code===x.m.Success&&re(o.data??[]);const a=await _.XO.get("ai_long_term_memory_setting");a.code===x.m.Success&&le(a.data?.open??!1)})()},[]),(0,o.useEffect)(()=>{w.ws.addMsg(C.HK.mcp_status,e=>{const t=e.context??{},n={};for(const e of t.status??[])n[e.index]={state:e.state,error:e.error,tool_count:e.tool_count};G(n),t.done&&we()})},[]);const ge=(e="stdio")=>{const t="http"===e?{name:"",open:!1,note:"",transport:"http",endpoint:"",headers:"",stream:!1,timeout_ms:1e4}:{name:"",open:!1,command:"",args:"",cwd:"",env:"",note:"",transport:"stdio",timeout_ms:1e4};X([...P,t]),R.current=!0},ve=e=>{const t=P.indexOf(e);t<0||(P.splice(t,1),X([...P]),R.current=!0)},fe=e=>{X([...P,{...e,open:!1}]),R.current=!0},je=async e=>{for(let e=0;e<K.length;e++)K[e].index=e;(await _.XO.post("ai_agent_setting/save",{models:e??K})).code===x.m.Success&&(0,g.SK)("保存成功")},ye=async e=>{for(let e=0;e<P.length;e++)P[e].index=e;(await _.XO.post("ai_mcp_setting/save",{list:e??P})).code===x.m.Success&&((0,g.SK)("保存成功"),R.current=!1,w.ws.sendData(C.HK.mcp_reload,{}))},we=async()=>{const e=await _.XO.get("ai_mcp_tools");return e.code===x.m.Success?(V(e.data??[]),e.data??[]):[]},Ce=async e=>{Y(!0);try{const t=await _.XO.post("ai_mcp_tools/reload",{index:e});if(t.code===x.m.Success)return await we(),(0,g.SK)("MCP工具加载成功"),t.data??null}finally{Y(!1)}return null},be=async(t,n,s,o)=>{const a=o??F.find(e=>e.index===n)??{index:n,key:`${n}`,name:t.name??"",note:t.note,transport:t.transport??"stdio",open:!!t.open,loaded:!1,tool_count:0,tools:[]},r=(a.tools??[]).map(t=>({id:t.runtime_name,title:t.tool_name,subtitle:t.description||e("无描述"),detail:t.display_name,meta:t.runtime_name}));W({open:!0,title:`${t.name||t.note||n} MCP工具`,context_div:(0,h.jsx)(S.O,{title:`${t.name||t.note||n} MCP工具`,subtitle:`${a.transport??"stdio"} | ${a.open?e("是"):e("否")} | ${a.loaded?"loaded":"idle"} | ${a.tool_count} tools`,pages:r,initialPageId:s,onRefresh:async()=>{const e=await Ce(n);e&&await be(t,n,s,e)},renderPage:t=>{if(!t)return(0,h.jsx)("div",{className:"prompt-switch-page__empty",children:e("暂无工具")});const n=a.tools?.find(e=>e.runtime_name===t.id);return n?(0,h.jsxs)("div",{className:"prompt-switch-page__detail",children:[(0,h.jsx)("div",{className:"prompt-switch-page__detail-title",children:n.display_name}),(0,h.jsx)("div",{className:"prompt-switch-page__detail-desc",children:n.description||e("无描述")}),(0,h.jsxs)("div",{className:"prompt-switch-page__detail-row",children:[(0,h.jsx)("strong",{children:"runtime:"})," ",n.runtime_name]}),(0,h.jsxs)("div",{children:[(0,h.jsx)("strong",{children:"schema:"}),(0,h.jsx)("pre",{className:"prompt-switch-page__schema",children:JSON.stringify(n.input_schema??{},null,2)})]})]}):(0,h.jsx)("div",{className:"prompt-switch-page__empty",children:e("暂无工具")})}}),cancel:()=>W({open:!1})})},Ae=t=>{const n=B[t];let s=n?.state,o=n?.error,a=n?.tool_count;if(!s){const e=F.find(e=>e.index===t);s=e?.state,o=e?.error,a=e?.tool_count}switch(s){case"loading":return(0,h.jsx)(m.fq,{loading:!0,text:e("加载中")});case"success":return(0,h.jsx)(m.fq,{success:!0,text:`${a??0} ${e("个工具")}`});case"failed":return(0,h.jsx)("span",{title:o??e("加载失败"),children:(0,h.jsx)(m.fq,{success:!1,text:e("加载失败")})});default:return(0,h.jsx)(m.fq,{text:e("未加载")})}},ke=async e=>{for(let e=0;e<K.length;e++)K[e].index=e;let t={list:L,docs_update_tag:q.current};null!=e&&(t={param:e}),q.current=!1;(await _.XO.post("ai_docs_setting_save",t)).code===x.m.Success&&(0,g.SK)("保存成功")},Se=async()=>{for(let e=0;e<ae.length;e++)ae[e].index=e;(await _.XO.post("ai_system_prompts/save",{list:ae})).code===x.m.Success&&(0,g.SK)("保存成功")};return(0,h.jsxs)("div",{children:[(0,h.jsx)(r.aZ,{position:"right",children:de(j.oV.ai_agent_setting)&&(0,h.jsx)(a.rA,{icon:"arrow_back",title:e("上一页"),onClick:()=>{ue(-1)}})}),(0,h.jsx)(c.jW,{isFull:!0,more:!0,children:(0,h.jsx)(c.NN,{children:(0,h.jsxs)(c.xh,{children:[(0,h.jsx)(c.fI,{children:(0,h.jsx)(c.VP,{widthPer:100,children:(0,h.jsx)(m.uF,{self_title:(0,h.jsxs)("span",{className:" div-row ",children:[(0,h.jsx)("h2",{children:e("Model")+" "+e("设置")})," ",(0,h.jsx)(a.rA,{icon:"info",onClick:()=>{ce('\n1. Only OpenAI-style AI APIs are supported. Fill in the FULL endpoint path (not just the domain), e.g. https://ark.cn-beijing.volces.com/api/v3/chat/completions\n2. The longer the conversation history, the more expensive the LLM token cost. Currently, there is no long-term memory simplification capability. You can set the system prompt to make the AI answer more concisely to save tokens\n3. When writing the model request parameter JSON, you can only write JSON in it, to configure the attributes supported by OpenAI-style AI, such as temperature, thinking (Doubao\'s deep thinking toggle), etc.\n4. You can enable "stream": true in the model request parameters to improve response speed.\n5. Deep thinking currently affects output speed. It is recommended to set { "thinking" : { "type":"disabled" } } to disable it (Doubao example).\n6. To use the AI feature to query server information, the AI needs to be able to know some commands. You need to first set command permissions for the user in user settings. It is recommended to set * to allow all commands, and then set the dangerous commands that are not allowed to be executed in the settings\n7. The model type and Become Tool are now both configured in "More Attributes → Extra Parameter Settings" using request_type / tool_mode (comments are already provided in the editor).\n8. After becoming a tool, the model will be loaded as a tool, enabling different models to serve as different roles; please do not set both it and "Enabled" to true at the same time.\n')},title:"信息"})]}),titleCom:(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>{O([...K,{note:"",open:!1,path:"",dotenv:N.CP,json_params:N.cL}])}}),(0,h.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:async()=>{await je()}})]}),children:(0,h.jsx)(d.X,{headers:n,onRowDrag:(e,t)=>{O((0,A.TI)(K,e,t))},rows:K.map((t,n)=>{const s=[(0,h.jsx)("div",{children:n}),(0,h.jsx)(p.Sm,{value:N.Lv.get_label_by_v(t.url,t.show_options?.options_agent_url_list),options:t.show_options?.options_agent_url_list,handleInputChange:e=>{t.url=e},no_border:!0}),(0,h.jsx)(p.l6,{value:t.open,onChange:e=>{((e,t,n)=>{const s=[];for(let e=0;e<K.length;e++)K[e].open=e===n&&t,s.push(K[e]);O(s)})(0,e,n)},options:_e,no_border:!0}),(0,h.jsx)(p.Sm,{type:N.Lv.have_label_by_v(t.token,t.show_options?.options_agent_key_list)?null:"password",value:N.Lv.get_label_by_v(t.token,t.show_options?.options_agent_key_list),options:t.show_options?.options_agent_key_list,handleInputChange:e=>{t.token=e},no_border:!0}),(0,h.jsx)(p.Sm,{value:N.Lv.get_label_by_v(t.model,t.show_options?.options_agent_model_list),options:t.show_options?.options_agent_model_list,handleInputChange:e=>{t.model=e},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"short_text",title:"prompt",onClick:()=>{f.xK.set_value_temp(K[n].sys_prompt??""),me({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{K[n].sys_prompt=e,O(K),f.xK.set_value_temp(""),je(K)}})}}),(0,h.jsx)(a.rA,{icon:"edit_attributes",title:"model请求参数json编写",onClick:()=>{f.xK.set_value_temp(K[n].json_params),me({model:"ace/mode/json",open:!0,fileName:"",save:async e=>{K[n].json_params=e,O(K),f.xK.set_value_temp(""),je(K)},can_format:!0})}}),(0,h.jsx)(a.rA,{icon:"settings",title:"额外参数设置",onClick:()=>{f.xK.set_value_temp(K[n].dotenv),me({model:"ace/mode/ini",open:!0,fileName:"",save:async e=>{K[n].dotenv=e,O(K),f.xK.set_value_temp(""),je(K)}})}})]}),(0,h.jsx)(p.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{K.splice(e,1),O([...K])})(n)}),(0,h.jsx)(a.rA,{icon:"copy_all",title:e("复制"),onClick:()=>(e=>{O([...K,{...K[e],open:!1}])})(n)})]})];return s}),width:"10rem"})})})}),(0,h.jsx)(c.fI,{children:(0,h.jsx)(c.VP,{widthPer:70,children:(0,h.jsx)(m.uF,{self_title:(0,h.jsxs)("span",{className:" div-row ",children:[(0,h.jsxs)("h2",{children:[e("MCP")+" "+e("设置")," - stdio"]})," ",(0,h.jsx)(a.rA,{icon:"info",onClick:()=>{ce("\n1. 这里配置的是 MCP Client 启动参数,当前实现的是 stdio 模式,也就是通过 command + args 启动本地 MCP Server\n2. 例如可以填 npx / uvx / python 等命令,再配合对应的 MCP server 包参数\n3. 保存后会自动重新加载 MCP 工具,agent 聊天时会把这些工具一起带给模型\n4. 建议把 cwd 配到具体项目目录,避免 server 在错误目录里运行\n")},title:"信息"})]}),titleCom:(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>ge("stdio")}),(0,h.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:()=>{ye()}})]}),children:(0,h.jsx)(d.X,{headers:ne,onRowDrag:(e,t)=>{X((0,A.TI)(P,P.indexOf(ee[e]),P.indexOf(ee[t]))),R.current=!0},rows:ee.map((t,n)=>{const s=P.indexOf(t);return[(0,h.jsx)("div",{children:n}),(0,h.jsx)(p.Sm,{value:t.name,handleInputChange:e=>{t.name=e,R.current=!0},no_border:!0}),(0,h.jsx)(p.l6,{value:t.open,onChange:e=>{t.open=e,X([...P]),R.current=!0},options:_e,no_border:!0}),Ae(P.indexOf(t)),(0,h.jsx)(p.Sm,{value:t.command,handleInputChange:e=>{t.command=e,R.current=!0},no_border:!0}),(0,h.jsx)(p.Sm,{value:t.args,handleInputChange:e=>{t.args=e,R.current=!0},no_border:!0}),(0,h.jsx)(p.Sm,{value:t.cwd,handleInputChange:e=>{t.cwd=e,R.current=!0},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"visibility",title:"查看工具",onClick:()=>{be(t,s)}}),(0,h.jsx)(a.rA,{icon:"settings",title:"env",onClick:()=>{f.xK.set_value_temp(t.env??""),me({model:"ace/mode/ini",open:!0,fileName:"",save:async e=>{t.env=e,X([...P]),f.xK.set_value_temp(""),R.current=!0,ye()}})}})]}),(0,h.jsx)(p.Sm,{value:t.note,handleInputChange:e=>{t.note=e,R.current=!0},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"delete",title:e("删除"),onClick:()=>ve(t)}),(0,h.jsx)(a.rA,{icon:"copy_all",title:e("复制"),onClick:()=>fe(t)})]})]}),width:"10rem"})})})}),(0,h.jsx)(c.fI,{children:(0,h.jsxs)(c.VP,{widthPer:70,children:[(0,h.jsx)(m.uF,{self_title:(0,h.jsxs)("span",{className:" div-row ",children:[(0,h.jsxs)("h2",{children:[e("MCP")+" "+e("设置")," - HTTP"]})," "]}),titleCom:(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>ge("http")}),(0,h.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:()=>{ye()}})]}),children:(0,h.jsx)(d.X,{headers:se,onRowDrag:(e,t)=>{X((0,A.TI)(P,P.indexOf(te[e]),P.indexOf(te[t]))),R.current=!0},rows:te.map((t,n)=>{const s=P.indexOf(t);return[(0,h.jsx)("div",{children:n}),(0,h.jsx)(p.Sm,{value:t.name,handleInputChange:e=>{t.name=e,R.current=!0},no_border:!0}),(0,h.jsx)(p.l6,{value:t.open,onChange:e=>{t.open=e,X([...P]),R.current=!0},options:_e,no_border:!0}),Ae(P.indexOf(t)),(0,h.jsx)(p.Sm,{value:t.endpoint,handleInputChange:e=>{t.endpoint=e,R.current=!0},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"visibility",title:"查看工具",onClick:()=>{be(t,s)}}),(0,h.jsx)(a.rA,{icon:"settings",title:"headers",onClick:()=>{f.xK.set_value_temp(t.headers??""),me({model:"ace/mode/ini",open:!0,fileName:"",save:async e=>{t.headers=e,X([...P]),f.xK.set_value_temp(""),R.current=!0,ye()}})}})]}),(0,h.jsx)(p.Sm,{value:t.note,handleInputChange:e=>{t.note=e,R.current=!0},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"delete",title:e("删除"),onClick:()=>ve(t)}),(0,h.jsx)(a.rA,{icon:"copy_all",title:e("复制"),onClick:()=>fe(t)})]})]}),width:"10rem"})}),(0,h.jsx)(m.uF,{self_title:(0,h.jsxs)("span",{className:" div-row ",children:[(0,h.jsx)("h2",{children:e("系统会话提示词")})," ",(0,h.jsx)(a.rA,{icon:"info",onClick:()=>{ce('\n1. 系统会话提示词,在 AI 聊天页创建会话时可以选择,选中的提示词会自动填入聊天框作为第一条系统消息\n2. 适用于预先设定常用的会话场景模板,如"代码审查"、"翻译助手"、"运维诊断"等\n3. "LLM编辑开关":开启后,当用户选择了该系统提示词发起对话时,AI 将会获得一个"更新会话提示词"工具,允许 AI 在对话中对当前会话进行总结,并写入到本提示词的"LLM编辑提示词"字段(全局保存,供之后的新会话沿用),使 AI 能自我维护长期上下文。\n4. "LLM编辑提示词":可选。AI 编辑后写回的内容(可预填初始方向)。仅在"LLM编辑开关"开启时生效。\n5. "编辑规则":可选。给 LLM 的编辑要求,例如"总结时不要超过 300 token"、"用简洁的项目要点记录"等。仅在"LLM编辑开关"开启时生效。\n')},title:"信息"})]}),titleCom:(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>{re([...ae,{prompt:"",note:"",llm_prompt_enable:!1}])}}),(0,h.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:()=>{Se()}})]}),children:(0,h.jsx)(d.X,{headers:oe,onRowDrag:(e,t)=>{re((0,A.TI)(ae,e,t))},rows:ae.map((t,n)=>{const s=[(0,h.jsx)("div",{children:n}),(0,h.jsx)("div",{children:(0,h.jsx)(a.rA,{icon:"short_text",title:e("提示词"),onClick:()=>{f.xK.set_value_temp(t.prompt??""),me({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{t.prompt=e,re([...ae]),f.xK.set_value_temp(""),Se()}})}})}),(0,h.jsx)(a.Ay,{checked:!!t.llm_prompt_enable,onChange:e=>{t.llm_prompt_enable=e,re([...ae])},title:e("LLM编辑开关")}),(0,h.jsx)("div",{children:(0,h.jsx)(a.rA,{icon:"edit_note",title:e("llm_pmt"),onClick:()=>{f.xK.set_value_temp(t.llm_prompt??""),me({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{t.llm_prompt=e,re([...ae]),f.xK.set_value_temp(""),Se()}})}})}),(0,h.jsx)("div",{children:(0,h.jsx)(a.rA,{icon:"rule",title:e("编辑规则"),onClick:()=>{f.xK.set_value_temp(t.llm_prompt_tip??""),me({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{t.llm_prompt_tip=e,re([...ae]),f.xK.set_value_temp(""),Se()}})}})}),(0,h.jsx)(p.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,h.jsx)("div",{children:(0,h.jsx)(a.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{ae.splice(e,1),re([...ae])})(n)})})];return s}),width:"10rem"})}),(0,h.jsx)(m.uF,{self_title:(0,h.jsxs)("span",{className:" div-row ",children:[(0,h.jsx)("h2",{children:e("长期记忆")})," ",(0,h.jsx)(a.rA,{icon:"info",onClick:()=>{ce(e("开启后跨会话保存记忆。四个固定文件:周/月/年/永久。每周结束自动压缩周→月,每月结束自动压缩月→年,每年结束自动压缩年→永久。编辑按钮可手动查看和修改。"))},title:"信息"})]}),titleCom:(0,h.jsx)("div",{children:(0,h.jsx)(a.Ay,{checked:ie,onChange:async t=>{le(t),await _.XO.post("ai_long_term_memory_setting/save",{open:t}),(0,g.SK)(e("长期记忆设置已保存"))},title:e("开关")})}),children:(0,h.jsx)("div",{style:{display:"flex",gap:"0.5rem",padding:"0.5rem 0",flexWrap:"wrap"},children:[{type:"week",label:e("周记忆"),tip:e("上限3000字")},{type:"month",label:e("月记忆"),tip:e("上限6000字")},{type:"year",label:e("年记忆"),tip:e("上限9000字")},{type:"forever",label:e("永久记忆"),tip:e("上限12000字")}].map(({type:t,label:n,tip:s})=>(0,h.jsx)(a.rA,{icon:"edit",title:`${e("编辑")} ${n} (${s})`,onClick:async()=>{const s=await _.XO.get(`ai_long_term_memory_bucket/${t}`),o=s.code===x.m.Success?s.data??"":"";f.xK.set_value_temp(o),me({model:"ace/mode/text",open:!0,fileName:`long_term_memory_${t}.txt`,save:async s=>{await _.XO.post(`ai_long_term_memory_bucket/${t}/save`,{data:s}),f.xK.set_value_temp(""),(0,g.SK)(`${n} ${e("已保存")}`)}})}},t))})})]})}),(0,h.jsxs)(c.fI,{children:[(0,h.jsx)(c.VP,{widthPer:50,children:(0,h.jsx)(m.uF,{self_title:(0,h.jsxs)("span",{className:" div-row ",children:[(0,h.jsx)("h2",{children:e("本地知识库")})," ",(0,h.jsx)(a.rA,{icon:"info",onClick:()=>{ce("\n1. 本地知识库用于为AI增强理解能力,或者分析本地文件,原理读取本地的文件,对文件在内存中建立全文索引,为AI提供额外数据(需要有模型开启才能使用)\n2. 该功能只能用于小型知识库,作为本地小型或者公司内部资料使用还是没有问题的\n3. 每次保存都会重新加载知识库中的文件,不会全部重新加载,而是检测哪些文件有变更\n")},title:"信息"})]}),titleCom:(0,h.jsxs)("div",{children:[(0,h.jsx)(a.Ay,{checked:Z,onChange:async e=>{await _.jV.post("docs_on_set",{status:e}),xe(),t()},title:e("知识库开关")}),(0,h.jsx)(a.rA,{icon:"settings",title:"额外参数设置",onClick:()=>{f.xK.set_value_temp(H.current),me({model:"ace/mode/ini",open:!0,fileName:"",save:async e=>{H.current=e,f.xK.set_value_temp(""),ke(H.current)}})}}),(0,h.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>{M([...L,{note:"",auto_load:!1,dir:""}]),q.current=!0}}),(0,h.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:()=>{ke()}})]}),children:(0,h.jsx)(d.X,{headers:$,onRowDrag:(e,t)=>{M((0,A.TI)(L,e,t)),q.current=!0},rows:L.map((t,n)=>{const s=[(0,h.jsx)("div",{children:n}),(0,h.jsx)(p.Sm,{value:t.dir,handleInputChange:e=>{t.dir=e,q.current=!0},no_border:!0}),(0,h.jsx)(p.l6,{value:t.auto_load,onChange:e=>{t.auto_load=e,M([...L]),q.current=!0},options:_e,no_border:!0}),(0,h.jsx)(p.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"delete",title:e("删除记录"),onClick:()=>(e=>{L.splice(e,1),M([...L]),q.current=!0})(n)}),(0,h.jsx)(a.rA,{icon:"restore",title:e("手动加载"),onClick:()=>{he({sub_title:"手动加载",confirm_fun:()=>{_.jV.post("ai_load_one_file",{param_path:t.dir}),(0,g.SK)("ok")}})}}),(0,h.jsx)(a.rA,{icon:"delete_forever",title:e("从索引删除"),onClick:()=>{he({sub_title:"从索引删除",confirm_fun:()=>{_.jV.post("ai_del",{param_path:t.dir}),(0,g.SK)("ok")}})}})]})];return s}),width:"10rem"})})}),D&&(0,h.jsx)(c.VP,{widthPer:50,children:(0,h.jsxs)(m.Zp,{title:e("知识库加载信息"),children:[(0,h.jsx)(c.Yh,{left:e("最近一次加载")+","+e("加载进度"),right:D?.progress}),(0,h.jsx)(c.Yh,{left:`${e("最近一次加载")},${e("总文件数量")}`,right:D?.num}),(0,h.jsx)(c.Yh,{left:`${e("最近一次加载")},${e("总文件字符数量")}`,right:D?.char_num}),(0,h.jsx)(c.Yh,{left:`${e("最近一次加载")},${e("总文件大小")}`,right:(0,b.v7)(D?.size)}),(0,h.jsx)(c.Yh,{left:`${e("最近一次加载")},${e("总耗时")}`,right:(0,b.a3)(D?.consume_time_ms_len)}),(0,h.jsx)(c.Yh,{left:`${e("总文件数量")}`,right:D?.total_num})]})})]})]})})})]})}},34299(e,t,n){n.r(t),n.d(t,{default:()=>C});var s=n(96540),o=n(23802),a=n(53995),r=n(18569),i=n(77979),l=n(8263),c=n(69428),d=n.n(c),p=(n(3775),n(21499)),m=n(99214),u=n(89117),h=n(86063),_=n(89334),x=n(41105),g=n(52388),v=n(19878),f=(n(72411),n(74848));const j=new o.A({html:!0,highlight:function(e,t){if(t&&v.A.getLanguage(t))try{return`<pre class="hljs code-block-with-copy"><code class="hljs language-${t}">${v.A.highlight(e,{language:t}).value}</code></pre>`}catch(e){}try{return`<pre class="hljs code-block-with-copy"><code class="hljs">${v.A.highlightAuto(e).value}</code></pre>`}catch(e){}return`<pre class="hljs code-block-with-copy"><code>${j.utils.escapeHtml(e)}</code></pre>`}});async function y(e,t){e.className="md-graph md-graph--mind md-graph--loading",e.textContent=g.A.t("rendering");const n=await(0,h.Hn)(t);e.isConnected&&(e.className="md-graph md-graph--mind",e.textContent="",await n.mount(e))}function w(e){const t=e.className.match(/language-([\w-]+)/);return t?t[1]:""}function C(e){const t=(0,s.useRef)(null);return(0,m.VD)(),(0,s.useEffect)(()=>{t.current&&(t.current.innerHTML=j.render(e.context??""),async function(e){const t=e.querySelectorAll("pre > code[class*='language-']");for(const e of Array.from(t)){const t=w(e),n=(0,u.Hm)(t),s=(0,h.hj)(t);if(!n&&!s)continue;const o=e.closest(".code-block-with-copy")??e.parentElement;if(!o)continue;const a=e.textContent??"",r=document.createElement("div");if(o.replaceWith(r),s){try{await y(r,a)}catch(e){console.error("[mind] render failed",e),r.className="md-graph md-graph--mind",r.textContent=String(e)}continue}r.className="md-graph md-graph--loading",r.textContent=g.A.t("rendering");const i=await(0,u.U6)(t,a);r.isConnected&&(i.error?(r.className="md-graph md-graph--error",r.textContent=i.error):(r.className="md-graph",r.innerHTML=i.svg))}}(t.current),(0,_.rg)(t.current))},[e.context]),(0,f.jsx)("div",{ref:t})}j.use(a.A).use(r.A).use(i.A).use(l.A).use(d()).use(e=>{e.renderer.rules.fence;e.renderer.rules.fence=(t,n,s,o,a)=>{const r=t[n],i=r.content.trim(),l=r.info.trim();let c="";if(l&&v.A.getLanguage(l))try{c=v.A.highlight(i,{language:l}).value}catch(t){c=e.utils.escapeHtml(i)}else try{c=v.A.highlightAuto(i).value}catch(t){c=e.utils.escapeHtml(i)}return`\n <div class="code-block-with-copy">\n <div class="code-header">\n <span class="code-language">${l||"code"}</span>\n <button class="copy-btn" data-code="${e.utils.escapeHtml(i)}">复制</button>\n </div>\n <pre><code class="hljs ${l?`language-${l}`:""}">${c}</code></pre>\n </div>`}}).use(e=>{const t=e.renderer.rules.link_open||function(e,t,n,s,o){return o.renderToken(e,t,n)};e.renderer.rules.link_open=(e,n,s,o,a)=>{const r=e[n],i=r.attrIndex("href");if(i>=0){const e=r.attrs[i][1];r.attrs[i][1]=(0,p.bi)(window.location.href,e)}return t(e,n,s,o,a)}}),(0,_.Rh)(j,x.pC)},24659(e,t,n){var s=n(22022);n.d(t,["K",0,()=>{const{t:e}=(0,s.Bd)();return[{title:e("是"),value:!0,color:"#28a745"},{title:e("否"),value:!1,color:"#666666"}]}])},60840(e){e.exports="data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 version=%271.1%27 aria-hidden=%27true%27><path fill-rule=%27evenodd%27 d=%27M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z%27></path></svg>"}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8319],{77481(e,t,n){n.d(t,{S:()=>a,X:()=>i});var s=n(96540),r=n(61443),l=n(74848);function i(e){const[t,n]=s.useState([]),i=(0,s.useRef)(-1),[a,c]=(0,s.useState)(-1),[o,d]=(0,s.useState)(-1);(0,s.useEffect)(()=>{e.children?n(Array.isArray(e.children)?e.children:[e.children]):n(e.rows)},[e.rows,e.children]);const u=()=>{i.current=-1,c(-1),d(-1)};return(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsx)("tr",{children:e.headers?.map((t,n)=>{const s=!!e.filter&&(e.filter.column??0)===n;let i=t;if(s){const n=e.filter,s=n.options.find(e=>e.value===n.value);null!=n.value&&s&&(i=`${t} (${s.label})`)}return(0,l.jsx)("th",{className:s?"table-filter-col":"",children:s?(0,l.jsx)(r.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:i}):t},n)})})}),(0,l.jsx)("tbody",{children:t.map((t,n)=>{const s=!!e.onRowDrag;return(0,l.jsx)("tr",{className:s?(a===n?"row-dragging":"")+(o===n?" row-drop-target":""):"",draggable:s,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{s&&(i.current=n,c(n),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!s||i.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(n))},onDrop:t=>{s&&(t.preventDefault(),(()=>{const t=i.current,n=o;u(),t<0||n<0||t===n||e.onRowDrag?.(t,n)})())},onDragEnd:u,children:t.map((n,s)=>{const r=s===t.length-1?"small":"";return(0,l.jsx)("td",{className:r,style:{width:e.width??"auto"},children:n},s)})},n)})})]})}function a(e){return(0,l.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,l.jsx)("div",{children:e},t))})}},28319(e,t,n){n.r(t),n.d(t,{default:()=>C,defaultSqlPreset:()=>w});var s=n(96540),r=n(22022),l=n(4412),i=n(85997),a=n(75725),c=n(77481),o=n(70447),d=n(61443),u=n(34843),h=n(82893),x=n(14284),f=n(23496),p=n(53459),j=n(62042),v=n(7523),m=n(78247),_=n(61973),g=n(74848);function w(e){return{index:0,note:e("查询全部表"),sql:"SELECT name, type FROM sqlite_master WHERE type='table';"}}const S='# 可选:设置 SQL 中的"替换词"(在查询页选中该预设后,会显示输入框)\n# 例子:SQL 为 SELECT * FROM t WHERE id = 123456 ,请填写下面的 find=123456\n# 这样查询页输入新值即可把 SQL 中的 123456 替换掉后再查询\nfind=';function C(){const{t:e}=(0,r.Bd)(),{initUserInfo:t}=(0,s.useContext)(v.F),[,n]=(0,u.fp)(h.AG.editorSetting),[C]=(0,u.fp)(h.AG.user_base_info),b=(0,_.Zp)(),q=s.useRef(-1),[E,k]=(0,s.useState)([]);(0,s.useEffect)(()=>{const t=C?.user_data?.sql_preset_list;k(t?.length?[...t]:[w(e)])},[e,C?.user_data?.sql_preset_list]);const y=async()=>{const n=E.map((e,t)=>({...e,index:t})),s=await x.wm.post(f.s.user_save_private_attr,{is_sql_preset:!0,sql_preset_list:n});s?.code===p.m.Success&&(await t(),(0,j.SK)(e("保存成功")))},A=(e,t)=>{q.current=e;const s=E[e][t]??"";m.xK.set_value_temp(s),n({model:"sql"===t?"ace/mode/sql":"ace/mode/ini",open:!0,fileName:"",save:async e=>{E[q.current][t]=e,k([...E]),m.xK.set_value_temp(""),y()}})},D=[e("编号"),e("备注"),e("SQL代码"),e("env编辑"),e("操作")];return(0,g.jsxs)("div",{children:[(0,g.jsx)(l.aZ,{position:"right",children:(0,g.jsx)(i.rA,{icon:"arrow_back",title:e("返回"),onClick:()=>b(-1)})}),(0,g.jsx)(a.jW,{isFull:!0,more:!0,children:(0,g.jsx)(a.NN,{children:(0,g.jsx)(a.xh,{children:(0,g.jsx)(a.fI,{children:(0,g.jsx)(a.VP,{widthPer:60,children:(0,g.jsx)(o.uF,{self_title:(0,g.jsx)("span",{className:"div-row",children:(0,g.jsx)("h2",{children:e("SQL 预设")})}),titleCom:(0,g.jsxs)("div",{className:"db-query-setting__toolbar",children:[(0,g.jsx)(i.rA,{icon:"add",title:e("添加"),onClick:()=>k([...E,{note:"",sql:"",env:S}])}),(0,g.jsx)(i.rA,{icon:"save",title:e("保存"),onClick:()=>y()})]}),children:(0,g.jsx)(c.X,{headers:D,rows:E.map((t,n)=>[(0,g.jsx)("div",{children:n+1}),(0,g.jsx)(d.Sm,{value:t.note,no_border:!0,placeholder:e("备注"),handleInputChange:e=>{t.note=e,k([...E])}}),(0,g.jsx)("div",{children:(0,g.jsx)(i.rA,{icon:"short_text",title:e("编辑SQL"),onClick:()=>A(n,"sql")})}),(0,g.jsx)("div",{children:(0,g.jsx)(i.rA,{icon:"settings",title:e("env编辑"),onClick:()=>A(n,"env")})}),(0,g.jsx)("div",{children:(0,g.jsx)(i.rA,{icon:"delete",title:e("删除"),onClick:()=>{E.splice(n,1),k([...E])}})})]),width:"8rem"})})})})})})})]})}n.d(t,["sqlEnvDefault",0,S])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8603],{58603(e,t,i){i.r(t),i.d(t,{default:()=>N});var n=i(96540),s=i(75725),r=i(70447),a=i(34843),o=i(82893),l=i(60096),c=i(85997),d=i(34251),m=i(34289),h=i(87361),_=i(14284),u=i(53459),x=i(61443),f=i(22022),p=i(62042),j=(i(47022),i(4412)),k=i(99214),g=i(6960),w=i(88815),v=i(40505),z=i(23430),F=i(64694),b=i(
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8603],{58603(e,t,i){i.r(t),i.d(t,{default:()=>N});var n=i(96540),s=i(75725),r=i(70447),a=i(34843),o=i(82893),l=i(60096),c=i(85997),d=i(34251),m=i(34289),h=i(87361),_=i(14284),u=i(53459),x=i(61443),f=i(22022),p=i(62042),j=(i(47022),i(4412)),k=i(99214),g=i(6960),w=i(88815),v=i(40505),z=i(23430),F=i(64694),b=i(61973),C=i(74848);function N(){const[e,t]=(0,n.useState)(null),i=(0,n.useRef)(""),N=(0,n.useRef)(""),[y,$]=(0,a.fp)(o.AG.prompt_card),[S,M]=(0,a.fp)(o.AG.share_sort_type),{t:A}=(0,f.Bd)(),[G,I]=(0,a.fp)(o.AG.selectedFileList),[U,V]=(0,a.fp)(o.AG.clickFileList),{click_file:W}=(0,k.kZ)(),[D]=(0,b.ok)(),L=(0,k.oT)(),R=(0,k.xp)(),Z=(0,k.Vs)(!0),B=(0,n.useMemo)(()=>{const t=[...e?.items??[]],i=e=>Number(e.mtime??0);return S===z.t8.time_minx_max?t.sort((e,t)=>i(e)-i(t)):S===z.t8.time_max_min&&t.sort((e,t)=>i(t)-i(e)),t},[e?.items,S]),H=async()=>{const e=await _.$M.post("share",{id:i.current,token:N.current});if(e.code===u.m.Success){const n={is_dir:e.data.is_dir};n.items=e.data.files??[];for(const e of n.items)e.origin_size=e.size,e.show_mtime=e.mtime?(0,g.s)(e.mtime):"",e.size=(0,w.v7)(e.size);if(!n.is_dir){const t=e.data.files[0];n.name=t.name,n.size=t.size,n.show_mtime=t.show_mtime}localStorage.setItem(`file_share_token_${i.current}`,N.current);const s=D.get("share_preview_file_name");if(s)try{const t=e.data.files.find(e=>e.name===s);W({file_path:t.path,file_url:_.$M.getDownloadUrlV2(t.path,"share_download",{share_id:i.current,share_token:N.current}),name:t.name,size:t.origin_size,opt_shell:!0,mtime:t.mtime,not_type_tip:A("未知类型,请下载查看"),readonly:!0,close:()=>{L("share_preview_file_name",null)}})}catch(e){(0,p.zN)(e?.message||e)}else t(n)}else e.code===u.m.need_token_share&&(localStorage.removeItem(`file_share_token_${i.current}`),(0,p.zN)("需要正确的访问token"),$({open:!0,title:"share file",confirm:()=>{$({open:!1}),H()},context_div:(0,C.jsx)("div",{className:"card-content",children:(0,C.jsx)(x.Sm,{placeholderOut:A("请输入访问token"),value:"",handleInputChange:e=>{N.current=e}})})}))};if((0,n.useEffect)(()=>{const e=(0,m.oW)(`${(0,m.GG)(h.o.share,(0,m.vX)())}`);i.current=e,N.current=localStorage.getItem(`file_share_token_${e}`),H()},[D]),!e)return(0,C.jsx)(s.jW,{isFull:!0,children:(0,C.jsx)("div",{className:"common-box common-box-center",children:"Loading..."})});return(0,C.jsxs)(n.Fragment,{children:[(0,C.jsx)(j.aZ,{children:(0,C.jsx)(C.Fragment,{children:(0,C.jsxs)("h2",{children:["Share ",e.is_dir?"Folder":"File"]})})}),(0,C.jsxs)(j.aZ,{position:"right",children:[G.length>0&&(0,C.jsx)(c.rA,{icon:"download",title:A("下载"),onClick:function(){const e=[];for(let t=0;t<G.length;t++){const i=B[G[t]];e.push(encodeURIComponent(i.path))}const t=_.$M.getDownloadUrlV2(e,"share_download",{share_id:i.current,share_token:N.current});window.open(t)}}),e.is_dir&&(0,C.jsx)(c.rA,{icon:"grid_view",title:A("切换样式"),onClick:Z}),e.is_dir&&(0,C.jsx)(c.rA,{icon:"schedule",title:S===z.t8.time_minx_max?A("时间逆序"):A("时间顺序"),onClick:()=>{const e=(0,F.jH)([z.t8.time_max_min,z.t8.time_minx_max,z.t8.defualt],S);M(e),I([]),V([])}})]}),(0,C.jsx)(s.xh,{children:(0,C.jsx)(s.jW,{isFull:!0,children:(0,C.jsx)("div",{className:"common-box ",children:e.is_dir?(0,C.jsx)(l.QW,{share:{share_id:i.current,share_token:N.current},handleContextMenu:()=>{},file_list:B,clickBlank:e=>{e.target===e.currentTarget&&(I([]),V([]))}}):(0,C.jsx)(r.uF,{children:(0,C.jsxs)("div",{style:{height:"25rem"},className:"common-box common-box-center",children:[(0,C.jsx)("div",{className:"file-icons",children:(0,C.jsx)("div",{"data-type":(0,d.uL)(e.name),"data-dir":e.is_dir,"aria-label":e.name,children:(0,C.jsx)(c.In,{icon:"",style:{fontSize:"10rem",display:"inline-block",lineHeight:1},aria_label:e.name})})}),(0,C.jsx)("div",{className:"",children:e.name}),(0,C.jsx)("div",{className:"",children:e.size}),(0,C.jsx)("div",{className:"",children:e.show_mtime}),(0,C.jsx)(c.C3,{text:"download",clickFun:()=>{const e=B[0],t=_.$M.getDownloadUrlV2(e.path,"share_download",{share_id:i.current,share_token:N.current});window.open(t)}}),(0,C.jsx)(c.C3,{text:"copy url",clickFun:()=>{const e=B[0],t=_.$M.getDownloadUrlV2(e.path,"share_download",{share_id:i.current,share_token:N.current}),n=_.$M.get_full_url(t);(0,v.lW)(n),(0,p.SK)(n)}}),(0,C.jsx)(c.C3,{text:"preview",clickFun:()=>{const e=B[0];R(e.name)}})]})})})})})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8649],{8694(e,t,s){s.d(t,{$K:()=>a,RB:()=>o,l5:()=>i,vo:()=>l,vr:()=>r});let n=function(e){return e[e.tcp=0]="tcp",e[e.udp=1]="udp",e}({});class a{open=!1;port;key="";async_ips=[]}class l{client_num_id;client_name;open=!1;ip;mask;serverIp;serverPort;key="";model=n.udp}let o=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 i{enabled;ip;port;bypass;useForLocal;type}},47996(e,t,s){s.d(t,{d:()=>a});s(96540);var n=s(74848);function a(e){return(0,n.jsxs)("div",{className:"instance-item",children:[(0,n.jsxs)("div",{className:"instance-item__toolbar",children:[(0,n.jsx)("span",{className:"instance-item__label",children:e.title}),e.toolbar]}),e.children]})}},77481(e,t,s){s.d(t,{S:()=>r,X:()=>o});var n=s(96540),a=s(61443),l=s(74848);function o(e){const[t,s]=n.useState([]),o=(0,n.useRef)(-1),[r,i]=(0,n.useState)(-1),[c,d]=(0,n.useState)(-1);(0,n.useEffect)(()=>{e.children?s(Array.isArray(e.children)?e.children:[e.children]):s(e.rows)},[e.rows,e.children]);const p=()=>{o.current=-1,i(-1),d(-1)};return(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsx)("tr",{children:e.headers?.map((t,s)=>{const n=!!e.filter&&(e.filter.column??0)===s;let o=t;if(n){const s=e.filter,n=s.options.find(e=>e.value===s.value);null!=s.value&&n&&(o=`${t} (${n.label})`)}return(0,l.jsx)("th",{className:n?"table-filter-col":"",children:n?(0,l.jsx)(a.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:o}):t},s)})})}),(0,l.jsx)("tbody",{children:t.map((t,s)=>{const n=!!e.onRowDrag;return(0,l.jsx)("tr",{className:n?(r===s?"row-dragging":"")+(c===s?" row-drop-target":""):"",draggable:n,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{n&&(o.current=s,i(s),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!n||o.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(s))},onDrop:t=>{n&&(t.preventDefault(),(()=>{const t=o.current,s=c;p(),t<0||s<0||t===s||e.onRowDrag?.(t,s)})())},onDragEnd:p,children:t.map((s,n)=>{const a=n===t.length-1?"small":"";return(0,l.jsx)("td",{className:a,style:{width:e.width??"auto"},children:s},n)})},s)})})]})}function r(e){return(0,l.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,l.jsx)("div",{children:e},t))})}},88649(e,t,s){s.r(t),s.d(t,{default:()=>H});var n=s(96540),a=s(75725),l=s(14284),o=s(62042),r=s(53459),i=s(70447),c=s(61443),d=s(85997),p=s(77481),u=s(8694),h=s(14944),x=s(92275),v=s(22022),m=s(4412),j=s(74848);function f(e){const{t}=(0,v.Bd)(),[s,f]=(0,n.useState)(void 0),[y,S]=(0,n.useState)(!1),[g,w]=(0,n.useState)(""),[_,b]=(0,n.useState)([t(`${t("名称")}`),t(`${t("虚拟")}ip`),`${t("物理")}`,t("在线状态"),t("选择")]),[I,k]=(0,n.useState)([]),[C,P]=(0,n.useState)({}),[N,D]=(0,n.useState)(!1);(0,n.useEffect)(()=>{(async()=>{const e=new x.hf(x.HK.vir_net_serverIno_get);h.ws.addMsg(x.HK.vir_net_serverIno_get,e=>{(e=>{for(const s of e){const e=s[s.length-1];s[s.length-1]=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(i.fq,{ok:e}),t(e?"在线":"离线")]}),s[0]=(0,j.jsx)(i.xP,{context:s[0],tip_context:s[0]}),s[2]=(0,j.jsx)(i.xP,{context:s[2],tip_context:s[2]})}})(e.context),k(e.context)}),await h.ws.send(e)})();return(async()=>{const e=await l._U.get("vir/server/get");if(e.code!==r.m.Success)return;const t=e.data;f(t.port),w(t.key),S(t.open)})(),()=>{}},[]);return(0,j.jsxs)("div",{children:[(0,j.jsxs)(m.aZ,{position:"right",children:[!!Object.keys(C).length&&C[0],!!Object.keys(C).length&&(0,j.jsx)(d.rA,{icon:"delete",title:"删除",onClick:async()=>{await l._U.post("vir/server/delete/client",{ips:Object.keys(C)}),P({})}})]}),(0,j.jsx)(a.fI,{children:(0,j.jsxs)(a.VP,{children:[(0,j.jsxs)(i.Zp,{title:"",rightBottomCom:(0,j.jsx)(d.C3,{text:t("保存"),clickFun:async()=>{const e=new u.$K;e.open=y,e.key=g,N&&(e.async_ips=Object.keys(C)),s&&(e.port=parseInt(s));(await l._U.post("vir/server/save",e)).code===r.m.Success?((0,o.SK)("保存成功"),D(!1)):(0,o.zN)("网络错误")}}),children:[(0,j.jsx)(c.Sm,{placeholder:"port",value:s,handleInputChange:e=>{f(e)}}),(0,j.jsx)(c.Sm,{type:"password",placeholder:"key ",value:g,handleInputChange:e=>{w(e)}}),(0,j.jsxs)("form",{children:[t("状态"),":",(0,j.jsx)(p.S,{isFlex:!0,columns:[(0,j.jsx)(c.U6,{value:1,context:t("开启"),selected:y,onchange:()=>{S(!y)}}),(0,j.jsx)(c.U6,{value:1,context:t("关闭"),selected:!y,onchange:()=>{S(!y)}})]})]}),!!Object.keys(C).length&&(0,j.jsx)(c.GL,{context:t("sync_sv"),selected:N,onchange:()=>{D(!N)}})]}),(0,j.jsx)(i.Zp,{title:"",children:(0,j.jsx)(p.X,{headers:_,rows:I.map(e=>[...e,(0,j.jsx)(c.GL,{context:t(""),selected:C[e[1]],onchange:()=>{const t={...C};t[e[1]]?delete t[e[1]]:t[e[1]]=e,P(t)}})]),width:"10rem"})})]})})]})}function y(e){const{t}=(0,v.Bd)(),[s,m]=(0,n.useState)(""),[f,y]=(0,n.useState)(void 0),[S,g]=(0,n.useState)(""),[w,_]=(0,n.useState)(""),[b,I]=(0,n.useState)(void 0),[k,C]=(0,n.useState)(!1),[P,N]=(0,n.useState)(""),[D,A]=(0,n.useState)(!1);(0,n.useEffect)(()=>{(async()=>{const e=await l._U.get("vir/client/get");if(e.code!==r.m.Success)return;const t=e.data;if(I(t.serverPort),g(t.serverIp),m(t.ip),y(t.mask),N(t.key),C(t.open),_(t.client_name),t.open){const e=new x.hf(x.HK.vir_net_client_get),t=(await h.ws.send(e)).context.state;A(t),h.ws.addMsg(x.HK.vir_net_client_get,e=>{A(e.context.state)})}})()},[]);return(0,j.jsx)("div",{children:(0,j.jsx)(a.fI,{children:(0,j.jsxs)(a.VP,{children:[(0,j.jsxs)(i.Zp,{title:"",rightBottomCom:(0,j.jsx)(d.C3,{text:t("保存"),clickFun:async()=>{const e=new u.vo;e.ip=s,e.mask=parseInt(f),e.key=P,e.serverIp=S,e.serverPort=parseInt(b),e.open=k,e.client_name=w;(await l._U.post("vir/client/save",e)).code===r.m.Success?(0,o.SK)("保存成功"):(0,o.zN)("网络错误")}}),titleCom:(0,j.jsxs)("div",{children:[t("连接状态"),(0,j.jsx)(i.fq,{ok:D})]}),children:[(0,j.jsx)(c.Sm,{placeholder:"ip ",value:s,handleInputChange:e=>{m(e)}}),(0,j.jsx)(c.Sm,{placeholder:"mask",value:f,handleInputChange:e=>{y(e)}}),(0,j.jsx)(c.Sm,{placeholder:`${t("服务器")} ip`,value:S,handleInputChange:e=>{g(e)}}),(0,j.jsx)(c.Sm,{placeholder:`${t("服务器")} part`,value:b,handleInputChange:e=>{I(e)}}),(0,j.jsx)(c.Sm,{placeholder:"名称 ",value:w,handleInputChange:e=>{_(e)}}),(0,j.jsx)(c.Sm,{type:"password",placeholder:"key ",value:P,handleInputChange:e=>{N(e)}}),(0,j.jsxs)("form",{children:[t("状态"),(0,j.jsx)(p.S,{isFlex:!0,columns:[(0,j.jsx)(c.U6,{value:1,context:t("开启"),selected:k,onchange:()=>{C(!k)}}),(0,j.jsx)(c.U6,{value:1,context:t("关闭"),selected:!k,onchange:()=>{C(!k)}})]})]})]}),(0,j.jsxs)(i.Zp,{title:"",children:[(0,j.jsx)("div",{children:"ip: 虚拟ip, “10.0.0.0 - 10.255.255.255”和“172.16.0.0 - 172.31.255.255”和“192.168.0.0 - 192.168.255.255”这三个网段属于内网ip"}),(0,j.jsx)("div",{children:"mask: 一些常见的子网掩码网段/8:255.0.0.0;/16:255.255.0.0 ;/24:255.255.255.0"}),(0,j.jsx)("div",{children:"key:用于验证身份信息并加密的和服务器设置的一样"})]})]})})})}var S=s(47996),g=s(34843),w=s(82893),_=s(23430),b=s(78247),I=s(21499),k=s(24659),C=s(64694);function P(e){const{t}=(0,v.Bd)(),[s,h]=(0,n.useState)(""),[x,m]=(0,n.useState)(""),[f,y]=(0,n.useState)(""),[P,N]=(0,n.useState)(!1),[D,A]=(0,n.useState)(!1),[K,$]=(0,n.useState)({list:[]}),[T,U]=(0,g.fp)(w.AG.editorSetting),[O,F]=(0,g.fp)(w.AG.user_base_info),z=[t("端口"),t("目标地址"),t("目标端口"),t("开启"),t("备注"),t("删除")],[B,M]=(0,n.useState)([]),H=[t("port"),t("ip"),t("type"),t("开启")],[V,W]=(0,n.useState)([]),G=[t("编辑"),t("开启"),t("备注"),t("删除")],q=(0,k.K)(),X=async()=>{const e=[l._U.post("vir/client/tcp_proxy/get"),l._U.post("http/proxy/server/get")];let t;O.sys===_.XM.mac?t=(async()=>{const e=await l._U.post("http/proxy/get/mac");if(e.code!==r.m.Success)return;const t=[],s=[];for(const n of e.data)"Wi-Fi"===n.name?t.push(n):s.push(n);W([...t,...s])})():O.sys===_.XM.win&&(t=(async()=>{const e=await l._U.post("http/proxy/get/win");if(e.code===r.m.Success){const t=e.data;h(t.ip),m(t.port),N(t.enabled),y(t.bypass),A(t.useForLocal)}})()),t&&e.push(t);const[s,n]=await Promise.all(e);s.code===r.m.Success&&M(s.data),n.code===r.m.Success&&$(n.data)};(0,n.useEffect)(()=>{X()},[]);return(0,j.jsx)("div",{children:(0,j.jsxs)(a.fI,{children:[O.sys===_.XM.win&&(0,j.jsx)(a.VP,{widthPer:33,children:(0,j.jsxs)(i.Zp,{title:"Http Proxy",rightBottomCom:(0,j.jsx)(d.C3,{text:t("保存"),clickFun:async()=>{const e=new u.l5;e.port=parseInt(x),e.enabled=P,e.useForLocal=D,e.ip=s,e.bypass=f;(await l._U.post("http/proxy/set/win",e)).code===r.m.Success&&(X(),(0,o.SK)("保存成功"))}}),children:[(0,j.jsx)(c.Sm,{placeholder:"ip (default localhost) ",value:s,handleInputChange:e=>{h(e)}}),(0,j.jsx)(c.Sm,{placeholder:"port ",value:x,handleInputChange:e=>{m(e)}}),(0,j.jsx)(c.Sm,{placeholder:t("忽略ip"),value:f,handleInputChange:e=>{y(e)}}),(0,j.jsxs)("form",{children:[t("pxy_nln"),(0,j.jsx)(p.S,{isFlex:!0,columns:[(0,j.jsx)(c.U6,{value:1,context:t("开启"),selected:D,onchange:()=>{A(!D)}}),(0,j.jsx)(c.U6,{value:1,context:t("关闭"),selected:!D,onchange:()=>{A(!D)}})]})]}),(0,j.jsxs)("form",{children:[t("状态"),(0,j.jsx)(p.S,{isFlex:!0,columns:[(0,j.jsx)(c.U6,{value:1,context:t("开启"),selected:P,onchange:()=>{N(!P)}}),(0,j.jsx)(c.U6,{value:1,context:t("关闭"),selected:!P,onchange:()=>{N(!P)}})]})]})]})}),O.sys===_.XM.mac&&(0,j.jsx)(a.VP,{children:V.map((e,s)=>(0,j.jsxs)(i.uF,{self_title:(0,j.jsxs)("span",{className:" div-row ",children:[(0,j.jsx)("h2",{children:e.name})," "]}),titleCom:(0,j.jsx)("div",{children:(0,j.jsx)(d.rA,{icon:"save",title:t("保存"),onClick:()=>{(async e=>{const t=V[e];(await l._U.post("http/proxy/set/mac",[t])).code===r.m.Success&&(X(),(0,o.SK)("保存成功"))})(s)}})}),children:[(0,j.jsx)(p.X,{headers:H,rows:e.proxies.map((e,t)=>{const n=[(0,j.jsx)(c.Sm,{value:e.port,handleInputChange:t=>{e.port=parseInt(t)},no_border:!0}),(0,j.jsx)(c.Sm,{value:e.ip,handleInputChange:t=>{e.ip=t},no_border:!0}),(0,j.jsx)("div",{children:1===e.type?"http":"https"}),(0,j.jsx)(c.l6,{value:e.enabled,onChange:e=>{((e,t,s)=>{const n=[...V];n[e].proxies[t].enabled=s,W(n)})(s,t,e)},options:q,no_border:!0})];return n}),width:"10rem"}),"ignore ips",(0,j.jsx)(c.Sm,{value:e.bypass,handleInputChange:e=>{V[s].bypass=e},no_border:!0})]},s))}),(0,j.jsxs)(a.VP,{children:[(0,j.jsx)(i.uF,{self_title:(0,j.jsxs)("span",{className:" div-row ",children:[(0,j.jsx)("h2",{children:t("Tcp Proxy")})," "]}),titleCom:(0,j.jsxs)("div",{children:[(0,j.jsx)(d.rA,{icon:"add",title:t("添加"),onClick:()=>{M([...B,{note:"",open:!1,port:0,target_port:0,target_ip:""}])}}),(0,j.jsx)(d.rA,{icon:"save",title:t("保存"),onClick:async()=>{const e=[];for(let t=0;t<B.length;t++)B[t].index=t,e.push(B[t]);(await l._U.post("vir/client/tcp_proxy/save",e)).code===r.m.Success&&((0,o.SK)("保存成功"),X())}})]}),children:(0,j.jsx)(p.X,{headers:z,rows:B.map((e,s)=>{const n=[(0,j.jsx)(c.Sm,{value:e.port,handleInputChange:t=>{e.port=parseInt(t)},no_border:!0}),(0,j.jsx)(c.Sm,{value:e.target_ip,handleInputChange:t=>{e.target_ip=t},no_border:!0}),(0,j.jsx)(c.Sm,{value:e.target_port,handleInputChange:t=>{e.target_port=parseInt(t)},no_border:!0}),(0,j.jsx)(c.l6,{value:e.open,onChange:e=>{B[s].open=e,M([...B])},options:q,no_border:!0}),(0,j.jsx)(c.Sm,{value:e.note,handleInputChange:t=>{e.note=t},no_border:!0}),(0,j.jsx)("div",{children:(0,j.jsx)(d.rA,{icon:"delete",title:t("删除"),onClick:()=>(e=>{B.splice(e,1),M([...B])})(s)})})];return n}),width:"10rem",onRowDrag:(e,t)=>{M((0,C.TI)(B,e,t))}})}),(0,j.jsx)(i.uF,{self_title:(0,j.jsxs)("span",{className:" div-row ",children:[(0,j.jsx)("h2",{children:t("Http Proxy Server")})," "]}),titleCom:(0,j.jsxs)("div",{children:[(0,j.jsx)(d.rA,{icon:"add",title:t("添加端口实例"),onClick:()=>{K.list.push({open:!1,port:0,note:"",list:[]}),$({...K})}}),(0,j.jsx)(d.rA,{icon:"save",title:t("保存"),onClick:async()=>{(await l._U.post("http/proxy/server/save",K)).code===r.m.Success&&(0,o.SK)("保存成功")}})]}),children:K.list.map((e,s)=>(0,j.jsx)(S.d,{title:`${t("端口实例")} #${s+1}`,toolbar:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("span",{children:t("状态")}),(0,j.jsx)(c.l6,{value:e.open,width:"15%",onChange:t=>{e.open=t,$({...K})},options:q,no_border:!0}),(0,j.jsx)("span",{children:t("端口")}),(0,j.jsx)(c.Sm,{value:e.port||"",handleInputChange:t=>{e.port=t?parseInt(t):0,$({...K})},no_border:!0,width:"80px"}),(0,j.jsx)(d.rA,{icon:"add",title:t("添加规则"),onClick:()=>{e.list.push({note:"",open:!1}),$({...K})}}),(0,j.jsx)(d.rA,{icon:"delete",title:t("删除端口实例"),onClick:()=>{K.list.splice(s,1),$({...K})}}),(0,j.jsx)(c.Sm,{placeholder:t("备注"),width:"100%",value:e.note,handleInputChange:t=>{e.note=t,$({...K})},no_border:!0})]}),children:(0,j.jsx)(p.X,{headers:G,rows:e.list.map((n,a)=>{const o=[(0,j.jsx)("div",{children:(0,j.jsx)(d.rA,{icon:"edit",title:t("编辑"),onClick:()=>{(async(e,t)=>{const s=K.list[e];if(!s)return;const n=s.list[t];if(!n)return;n.random_key||(n.random_key=(0,I.hU)(),$({...K}));const a=await l._U.post("http/proxy/server/code/get",{key:n.random_key,name:n.random_key});U({model:"ace/mode/javascript",open:!0,fileName:"",can_format:!0,save:async e=>{0===(await l._U.post("http/proxy/server/code/save",{context:e,key:n.random_key})).code&&(b.xK.set_value_temp(""),U({open:!1,model:"",fileName:"",save:null}))}}),b.xK.set_value_temp(a.data)})(s,a)}})}),(0,j.jsx)(c.l6,{value:n.open,onChange:t=>{e.list[a].open=t,$({...K})},options:q,no_border:!0}),(0,j.jsx)(c.Sm,{value:n.note,handleInputChange:e=>{n.note=e},no_border:!0}),(0,j.jsx)("div",{children:(0,j.jsx)(d.rA,{icon:"delete",title:t("删除"),onClick:()=>{e.list.splice(a,1),$({...K})}})})];return o}),width:"10rem"})},s))})]})]})})}var N=s(87361);let D=function(e){return e.physics="物理",e.http_get="http_get",e}({}),A=function(e){return e.unverified="unverified",e.ok="ok",e.fail="fail",e}({}),K=function(e){return e.dnspod="dnspod",e.tengxun="tengxun",e.ali="ali",e.cloudflare="cloudflare",e.godaddy="godaddy",e.namesilo="namesilo",e.namecheap="namecheap",e.vercel="vercel",e.duckdns="duckdns",e.noip="noip",e.easydns="easydns",e.freedns="freedns",e.dynv6="dynv6",e.oray="oray",e.dyn="dyn",e.custom="custom",e}({});const $=[{provider:K.dnspod,label:"DNSPod(腾讯)",fields:[{label:"ID",placeholder:"ID"},{label:"Token",placeholder:"在密钥管理中生成",password:!0}],info:"DNSPod 老版 API。在 dnspod.cn 控制台「用户中心 - 密钥管理」创建 API Token,分别填入 ID 与 Token。"},{provider:K.tengxun,label:"腾讯云 DNSPod",fields:[{label:"SecretId",placeholder:"云 API 密钥 ID"},{label:"SecretKey",placeholder:"云 API 密钥 Key",password:!0}],info:"腾讯云新版云 API。在腾讯云控制台「访问管理 - API 密钥管理」创建密钥,分别填入 SecretId 与 SecretKey。"},{provider:K.ali,label:"阿里云解析",fields:[{label:"AccessKeyId",placeholder:"AccessKey ID"},{label:"AccessKeySecret",placeholder:"AccessKey Secret",password:!0}],info:"在阿里云控制台「AccessKey 管理」创建密钥,分别填入 AccessKeyId 与 AccessKeySecret。"},{provider:K.cloudflare,label:"Cloudflare",fields:[{label:"API Token",placeholder:"Cloudflare API 令牌",password:!0}],info:"在 Cloudflare「我的个人资料 - API 令牌」创建令牌,权限需包含「编辑区域 DNS」。"},{provider:K.godaddy,label:"GoDaddy",fields:[{label:"API Key",placeholder:"GoDaddy API Key"},{label:"API Secret",placeholder:"GoDaddy API Secret",password:!0}],info:"在 GoDaddy 开发者后台创建 API Key(生产环境),分别填入 Key 与 Secret。"},{provider:K.namesilo,label:"NameSilo",fields:[{label:"API Key",placeholder:"NameSilo API Key",password:!0}],info:"在 NameSilo「账号 - API Manager」生成 API Key。"},{provider:K.namecheap,label:"Namecheap",fields:[{label:"Dynamic DNS 密码",placeholder:"Namecheap DDNS 密码",password:!0}],info:"在 Namecheap 域名管理页「Advanced DNS」开启 Dynamic DNS,复制其中的密码。不支持 IPv6。"},{provider:K.vercel,label:"Vercel",fields:[{label:"API Token",placeholder:"Vercel API Token",password:!0}],info:"在 Vercel「账号设置 - Tokens」创建 Token,需具备 DNS 权限。"},{provider:K.duckdns,label:"DuckDNS",fields:[{label:"Token",placeholder:"DuckDNS Token",password:!0}],info:"DuckDNS 首页登录后即可看到 Token。域名需为 xxx.duckdns.org 形式。"},{provider:K.dynv6,label:"dynv6",fields:[{label:"Token",placeholder:"dynv6 Token",password:!0}],info:"在 dynv6 域名详情页复制 HTTP 更新 token 填入。"},{provider:K.freedns,label:"FreeDNS(afraid.org)",fields:[{label:"更新 Token",placeholder:"FreeDNS 更新 Token",password:!0}],info:"在 FreeDNS 域名管理页的 Dynamic DNS 链接中复制 update token 填入。"},{provider:K.noip,label:"No-IP",fields:[{label:"用户名",placeholder:"No-IP 用户名"},{label:"密码",placeholder:"No-IP 密码",password:!0}],info:"No-IP 官网账号的用户名与密码。"},{provider:K.easydns,label:"easyDNS",fields:[{label:"用户名",placeholder:"easyDNS 用户名"},{label:"密码",placeholder:"easyDNS 密码",password:!0}],info:"easyDNS 账号的用户名与密码。"},{provider:K.oray,label:"花生壳 Oray",fields:[{label:"账号",placeholder:"花生壳账号"},{label:"密码",placeholder:"花生壳密码",password:!0}],info:"花生壳官网账号与密码。更新地址:ddns.oray.com/ph/update。"},{provider:K.dyn,label:"通用 DynDNS2",fields:[{label:"用户名",placeholder:"DynDNS 用户名"},{label:"密码",placeholder:"DynDNS 密码",password:!0}],info:"适用于兼容 DynDNS2 协议的服务(更新地址 members.dyndns.org)。"},{provider:K.custom,label:"自定义 HTTP",fields:[{label:"URL 模板",placeholder:"https://example.com/update?domain={host}&ip={ip}"}],info:"任意支持 HTTP 更新的 DDNS 服务,模板中可用 {host} {ip} {family} 占位。"}];function T(e){return $.find(t=>t.provider===e)}function U(e,t){const s=(e??"").split(","),n=[];for(let e=0;e<t;e++)n.push((s[e]??"").trim());return n}function O(e){if(!e)return"-";const t=new Date(e),s=e=>String(e).padStart(2,"0");return`${t.getFullYear()}-${s(t.getMonth()+1)}-${s(t.getDate())} ${s(t.getHours())}:${s(t.getMinutes())}:${s(t.getSeconds())}`}function F(e){if(!e)return"-";const t=Date.now()-e;if(t<6e4)return"刚刚";if(t<36e5)return`${Math.floor(t/6e4)} 分钟前`;if(t<864e5)return`${Math.floor(t/36e5)} 小时前`;const s=new Date(e),n=e=>String(e).padStart(2,"0");return`${n(s.getMonth()+1)}-${n(s.getDate())} ${n(s.getHours())}:${n(s.getMinutes())}`}function z(e){const{t}=(0,v.Bd)();return e.status===A.ok?(0,j.jsx)(i.fq,{success:!0,text:t("成功")}):e.status===A.fail?(0,j.jsx)(i.fq,{success:!1,text:t("失败")}):(0,j.jsx)(i.fq,{text:t("未验证")})}function B(){const{t:e}=(0,v.Bd)(),[,t]=(0,g.fp)(w.AG.confirm),[s,u]=(0,g.fp)(w.AG.prompt_card),[h,x]=(0,n.useState)([]),[m,f]=(0,n.useState)(null),[y,_]=(0,n.useState)([]),[b,I]=(0,n.useState)([]),[k,C]=(0,n.useState)(60),[P,N]=(0,n.useState)(!1),B=async()=>{const e=await l.ez.get("ip_options");e.code===r.m.Success&&_(e.data??[])},H=async()=>{const e=await l.ez.get("http/list");e.code===r.m.Success&&I(e.data??[])};(0,n.useEffect)(()=>{(async()=>{const e=await l.ez.get("list");e.code===r.m.Success&&x(e.data??[])})(),B(),H(),(async()=>{const e=await l.ez.get("interval");e.code===r.m.Success&&C(e.data?.interval??60)})()},[]);const V=$.map(e=>({label:e.label,value:e.provider})),W=y.map(e=>({label:`${e.ifaceOrWww} (${e.isIPv4?"IPv4":"IPv6"}) ${e.ip??""}`,value:G(e)}));function G(e){return`${e.ifaceOrWww}#${e.scopeid??""}#${e.isIPv4?"4":"6"}`}const q=(e,t)=>{m&&f({...m,[e]:t})},X=m?T(m.provider):void 0,L=m?U(m.account,X?.fields.length??1):[];return(0,j.jsxs)(a.fI,{children:[(0,j.jsx)(a.VP,{widthPer:50,maxWidth:"60rem",children:(0,j.jsx)(a.xh,{children:(0,j.jsxs)(i.uF,{self_title:(0,j.jsxs)("span",{className:" div-row ",children:[(0,j.jsx)("h2",{children:e("动态域名解析")}),(0,j.jsx)(d.rA,{icon:"info",onClick:()=>{u({open:!0,title:e("信息"),context_div:(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{children:e("ddns_help_1")}),(0,j.jsx)("p",{children:e("ddns_help_2")})]})})},title:e("信息")})]}),titleCom:(0,j.jsxs)("div",{children:[(0,j.jsx)(d.rA,{icon:"sync",title:e("立即同步"),selected:P,onClick:async()=>{N(!0);try{const t=await l.ez.post("sync_now",{});t.code===r.m.Success?((0,o.SK)(e("同步完成")),x(t.data??[])):(0,o.zN)(t.message??e("操作失败"))}finally{N(!1)}}}),(0,j.jsx)(d.rA,{icon:"dns",title:e("IP 来源管理"),onClick:()=>{u({open:!0,title:e("IP 来源管理"),context_div:(0,j.jsx)(M,{sources:b,on_refresh:async()=>{await H(),await B()}})})}}),(0,j.jsx)(d.rA,{icon:"add",title:e("添加"),onClick:()=>{f({id:"",provider:K.dnspod,account:"",isOpen:!1,note:"",ips:[],account_status:A.unverified,account_message:"",is_new:!0})}})]}),children:[(0,j.jsxs)(c.BC,{label:e("同步间隔"),label_width:"5rem",row:!0,children:[(0,j.jsx)(c.Sm,{value:String(k),type:"number",width:"6rem",handleInputChange:e=>C(Number(e))}),(0,j.jsx)("span",{children:e("秒")}),(0,j.jsx)(d.rA,{icon:"save",title:e("保存"),onClick:()=>(async t=>{if(!t||t<10)return void(0,o.zN)(e("间隔不能小于 10 秒"));const s=await l.ez.post("interval",{interval:t});s.code===r.m.Success?((0,o.SK)(e("保存成功")),C(s.data?.interval??t)):(0,o.zN)(s.message??e("操作失败"))})(k)})]}),(0,j.jsx)(p.X,{headers:[e("编号"),e("平台"),e("开启"),e("账号状态"),e("上次同步"),e("备注"),e("操作")],rows:h.map((s,n)=>{return[(0,j.jsx)("p",{children:n}),(0,j.jsx)(i.xP,{context:(a=s.provider,T(a)?.label??a)}),(0,j.jsx)(i.fq,{success:!!s.isOpen,text:s.isOpen?e("开启"):e("关闭")}),(0,j.jsx)(i.xP,{tip_context:s.account_message,children:(0,j.jsx)(z,{status:s.account_status})}),(0,j.jsx)(i.xP,{tip_context:`${O(s.time)} ${s.message??""}`,children:F(s.time)}),(0,j.jsx)(i.xP,{context:s.note}),(0,j.jsxs)("div",{className:"div-row",children:[(0,j.jsx)(d.rA,{icon:"check",title:e("验证"),onClick:()=>(async t=>{const s=await l.ez.post("verify",{id:t});if(s.code===r.m.Success){x(s.data??[]);const n=(s.data??[]).find(e=>e.id===t);n?.account_status===A.ok?(0,o.SK)(n.account_message||e("验证成功")):(0,o.zN)(n?.account_message||e("验证失败"))}})(s.id)}),(0,j.jsx)(d.rA,{icon:"edit",title:e("编辑"),onClick:()=>(e=>f(JSON.parse(JSON.stringify(e))))(s)}),(0,j.jsx)(d.rA,{icon:"delete",title:e("删除"),onClick:()=>{return n=s.id,void t({open:!0,title:e("确定删除吗"),handle:async()=>{const s=await l.ez.post("del",{id:n});s.code===r.m.Success&&((0,o.SK)(e("成功")),x(s.data??[]),m?.id===n&&f(null)),t({open:!1,handle:null})}});var n}})]})];var a})})]})})}),(0,j.jsx)(a.VP,{widthPer:50,children:m&&(0,j.jsx)(a.xh,{children:(0,j.jsxs)(i.Zp,{self_title:(0,j.jsx)("span",{className:" div-row ",children:(0,j.jsx)("h2",{children:e(""+(m.is_new?"添加":"编辑"))})}),titleCom:(0,j.jsx)(d.rA,{icon:"info",title:e("信息"),onClick:()=>{if(!m)return;const t=T(m.provider);u({open:!0,title:t?.label??e("信息"),context_div:(0,j.jsx)("div",{children:t?.info&&(0,j.jsx)("p",{children:t.info})})})}}),rightBottomCom:(0,j.jsxs)("div",{children:[(0,j.jsx)(d.rA,{icon:"cancel",title:e("取消"),onClick:()=>f(null)}),(0,j.jsx)(d.rA,{icon:"save",title:e("保存"),onClick:async()=>{if(!m)return;const t=T(m.provider);if(U(m.account,t?.fields.length??1).some(e=>!e))return void(0,o.zN)(e("请填写完整的账号凭证"));const{is_new:s,...n}=m,a=await l.ez.post("save",n);a.code===r.m.Success?((0,o.SK)(e("保存成功")),f(null),x(a.data??[]),B()):(0,o.zN)(a.message??e("操作失败"))}})]}),children:[(0,j.jsx)(c.BC,{label:e("开启"),label_width:"5rem",children:(0,j.jsx)(c.GL,{selected:!!m.isOpen,onchange:()=>q("isOpen",!m.isOpen)})}),(0,j.jsx)(c.BC,{label:e("备注"),label_width:"5rem",children:(0,j.jsx)(c.Sm,{value:m.note,handleInputChange:e=>q("note",e)})}),(0,j.jsx)(c.BC,{label:e("平台"),label_width:"5rem",required:!0,children:(0,j.jsx)(c.l6,{options:V,value:m.provider,onChange:e=>{f({...m,provider:e,account:"",account_status:A.unverified,account_message:""})}})}),X?.fields.map((e,t)=>(0,j.jsx)(c.BC,{label:e.label,label_width:"5rem",required:!0,children:(0,j.jsx)(c.Sm,{value:L[t]??"",type:e.password?"password":"text",placeholder:e.placeholder,handleInputChange:e=>((e,t,s)=>{if(!m)return;const n=U(m.account,s);n[e]=t,q("account",n.map(e=>(e??"").trim()).join(","))})(t,e,X.fields.length)})},t)),m.account_status===A.fail&&(0,j.jsx)("p",{className:"text-red",children:m.account_message}),(0,j.jsxs)("div",{className:"div-row",children:[(0,j.jsx)("label",{children:e("域名绑定")}),(0,j.jsx)(d.rA,{icon:"add",title:e("添加"),onClick:()=>{if(!m)return;const e=[...m.ips??[],{isIPv4:!0,ifaceOrWww:"",ddnsHost:"",source_type:D.physics}];f({...m,ips:e})}})]}),(m.ips??[]).map((t,s)=>{const n=`${t.ifaceOrWww}#${t.scopeid??""}#${t.isIPv4?"4":"6"}`,a=W.find(e=>e.value===n);return(0,j.jsxs)(S.d,{title:`${e("绑定")}${s+1}`,toolbar:(0,j.jsx)(d.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{if(!m?.ips)return;const t=[...m.ips];t.splice(e,1),f({...m,ips:t})})(s)}),children:[(0,j.jsx)(c.BC,{label:e("IP 来源"),label_width:"5rem",required:!0,children:(0,j.jsx)(c.Sm,{value:a?.label??"",options:W,handleInputChange:e=>((e,t)=>{const s=y.find(e=>G(e)===t)??y.find(e=>`${e.ifaceOrWww} (${e.isIPv4?"IPv4":"IPv6"}) ${e.ip??""}`===t);if(!s||!m?.ips)return;const n=[...m.ips];n[e]={...n[e],ifaceOrWww:s.ifaceOrWww,scopeid:s.scopeid,isIPv4:s.isIPv4,source_type:s.source_type},f({...m,ips:n})})(s,e)})}),(0,j.jsx)(c.BC,{label:e("域名"),label_width:"5rem",required:!0,children:(0,j.jsx)(c.Sm,{value:t.ddnsHost,placeholder:e("多个域名用空格分隔"),handleInputChange:e=>((e,t,s)=>{if(!m?.ips)return;const n=[...m.ips];n[e]={...n[e],[t]:s},f({...m,ips:n})})(s,"ddnsHost",e)})}),t.time&&(0,j.jsxs)(c.BC,{label:e("上次同步"),label_width:"5rem",row:!0,children:[(0,j.jsx)(z,{status:t.status}),(0,j.jsx)("span",{children:O(t.time)})]})]},s)})]})})})]})}function M(e){const{t}=(0,v.Bd)(),[s,a]=(0,n.useState)(""),[i,p]=(0,n.useState)(!0);return(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{children:t("http_source_tip")}),(0,j.jsxs)("div",{className:"div-row",children:[(0,j.jsx)(c.l6,{options:[{label:"IPv4",value:"ipv4"},{label:"IPv6",value:"ipv6"}],value:i?"ipv4":"ipv6",width:"6rem",onChange:e=>p("ipv4"===e)}),(0,j.jsx)(c.Sm,{value:s,placeholder:"https://4.ipw.cn",handleInputChange:e=>a(e)}),(0,j.jsx)(d.rA,{icon:"add",title:t("添加"),onClick:async()=>{if(!s.trim())return void(0,o.zN)(t("请输入地址"));const n=await l.ez.post("http/add",{ifaceOrWww:s.trim(),isIPv4:i,ip:"",source_type:D.http_get});n.code===r.m.Success?((0,o.SK)(t("成功")),a(""),await e.on_refresh()):(0,o.zN)(n.message??t("操作失败"))}})]}),(0,j.jsxs)("div",{children:[0===e.sources.length&&(0,j.jsx)("p",{children:t("暂无数据")}),e.sources.map((s,n)=>(0,j.jsxs)("div",{className:"div-row",children:[(0,j.jsxs)("span",{children:[s.ifaceOrWww,"(",s.isIPv4?"IPv4":"IPv6",")"]}),(0,j.jsx)(d.rA,{icon:"delete",title:t("删除"),onClick:()=>(async s=>{(await l.ez.post("http/del",s)).code===r.m.Success&&((0,o.SK)(t("成功")),await e.on_refresh())})(s)})]},n))]})]})}function H(){const{t:e}=(0,v.Bd)(),{check_user_auth:t}=(0,b.MH)(),s=[];return t(_.oV.vir_net)&&s.push({index:1,name:e("系统代理"),rto:"proxy_sys/",component:(0,j.jsx)(P,{})},{index:3,name:"Tun proxy "+e("客户端"),rto:"client/",component:(0,j.jsx)(y,{})},{index:4,name:"Tun proxy "+e("服务端"),rto:"server/",component:(0,j.jsx)(f,{})}),t(_.oV.ddns)&&s.push({index:2,name:"DDNS",rto:"ddns/",component:(0,j.jsx)(B,{})}),(0,j.jsx)(a.W1,{optionList:s,father_route:N.o.net})}},24659(e,t,s){var n=s(22022);s.d(t,["K",0,()=>{const{t:e}=(0,n.Bd)();return[{title:e("是"),value:!0,color:"#28a745"},{title:e("否"),value:!1,color:"#666666"}]}])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8727],{75937(e,t,s){s.d(t,{A:()=>r});var n=s(86309),i=s(51931);const r=(e,t)=>n.A.lang.round(i.A.parse(e)[t])},38727(e,t,s){s.d(t,{diagram:()=>Se});var n=s(64918),i=s(27838),r=s(96865),o=(s(48159),s(44505),s(69793),s(43287),s(12505)),a=s(86535),c=s(31293),l=s(86827),h=s(37110),g=s(99125),u=s(89826);var d=s(19663);function y(e){if((0,h.s)(e))return e;const t=(0,g.b)(e);if(!function(e){switch((0,g.b)(e)){case u.R_:case u.Uw:case u.cT:case u.iq:case u.$V:case u.vC:case u.ri:case u.ML:case u.XZ:case u.i1:case u._u:case u.pj:case u.kj:case u.GX:case u.Av:case u.NA:case u.OG:case u.VP:case u.Qb:case u.q:case u.x6:case u.ZR:return!0;default:return!1}}(e))return{};if(s=e,Array.isArray(s)){const t=Array.from(e);return e.length>0&&"string"==typeof e[0]&&Object.hasOwn(e,"index")&&(t.index=e.index,t.input=e.input),t}var s;if((0,d.i)(e)){const t=e;return new(0,t.constructor)(t.buffer,t.byteOffset,t.length)}if("[object ArrayBuffer]"===t)return new ArrayBuffer(e.byteLength);if("[object DataView]"===t){const t=e,s=t.buffer,n=t.byteOffset,i=t.byteLength,r=new ArrayBuffer(i),o=new Uint8Array(s,n,i);return new Uint8Array(r).set(o),new DataView(r)}if("[object Boolean]"===t||"[object Number]"===t||"[object String]"===t){const s=new(0,e.constructor)(e.valueOf());return"[object String]"===t?function(e,t){const s=t.valueOf().length;for(const n in t)Object.hasOwn(t,n)&&(Number.isNaN(Number(n))||Number(n)>=s)&&(e[n]=t[n])}(s,e):p(s,e),s}if("[object Date]"===t)return new Date(Number(e));if("[object RegExp]"===t){const t=e,s=new RegExp(t.source,t.flags);return s.lastIndex=t.lastIndex,s}if("[object Symbol]"===t)return Object(Symbol.prototype.valueOf.call(e));if("[object Map]"===t){const t=e,s=new Map;return t.forEach((e,t)=>{s.set(t,e)}),s}if("[object Set]"===t){const t=e,s=new Set;return t.forEach(e=>{s.add(e)}),s}if("[object Arguments]"===t){const t=e,s={};return p(s,t),s.length=t.length,s[Symbol.iterator]=t[Symbol.iterator],s}const n={};return function(e,t){const s=Object.getPrototypeOf(t);null!==s&&"function"==typeof t.constructor&&Object.setPrototypeOf(e,s)}(n,e),p(n,e),function(e,t){const s=Object.getOwnPropertySymbols(t);for(let n=0;n<s.length;n++){const i=s[n];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}(n,e),n}function p(e,t){for(const s in t)Object.hasOwn(t,s)&&(e[s]=t[s])}var b=s(75937),f=s(25582),x=s(51444),S=s(697),m=function(){var e=(0,l.K)(function(e,t,s,n){for(s=s||{},n=e.length;n--;s[e[n]]=t);return s},"o"),t=[1,15],s=[1,7],n=[1,13],i=[1,14],r=[1,19],o=[1,16],a=[1,17],c=[1,18],h=[8,30],g=[8,10,21,28,29,30,31,39,43,46],u=[1,23],d=[1,24],y=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],b=[1,49],f={trace:(0,l.K)(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,l.K)(function(e,t,s,n,i,r,o){var a=r.length-1;switch(i){case 4:n.getLogger().debug("Rule: separator (NL) ");break;case 5:n.getLogger().debug("Rule: separator (Space) ");break;case 6:n.getLogger().debug("Rule: separator (EOF) ");break;case 7:n.getLogger().debug("Rule: hierarchy: ",r[a-1]),n.setHierarchy(r[a-1]);break;case 8:n.getLogger().debug("Stop NL ");break;case 9:n.getLogger().debug("Stop EOF ");break;case 10:n.getLogger().debug("Stop NL2 ");break;case 11:n.getLogger().debug("Stop EOF2 ");break;case 12:n.getLogger().debug("Rule: statement: ",r[a]),"number"==typeof r[a].length?this.$=r[a]:this.$=[r[a]];break;case 13:n.getLogger().debug("Rule: statement #2: ",r[a-1]),this.$=[r[a-1]].concat(r[a]);break;case 14:n.getLogger().debug("Rule: link: ",r[a],e),this.$={edgeTypeStr:r[a],label:""};break;case 15:n.getLogger().debug("Rule: LABEL link: ",r[a-3],r[a-1],r[a]),this.$={edgeTypeStr:r[a],label:r[a-1]};break;case 18:const t=parseInt(r[a]),s=n.generateId();this.$={id:s,type:"space",label:"",width:t,children:[]};break;case 23:n.getLogger().debug("Rule: (nodeStatement link node) ",r[a-2],r[a-1],r[a]," typestr: ",r[a-1].edgeTypeStr);const i=n.edgeStrToEdgeData(r[a-1].edgeTypeStr),o=n.edgeStrToEdgeStartData(r[a-1].edgeTypeStr),c=n.edgeStrToThickness(r[a-1].edgeTypeStr),l=n.edgeStrToPattern(r[a-1].edgeTypeStr);this.$=[{id:r[a-2].id,label:r[a-2].label,type:r[a-2].type,directions:r[a-2].directions},{id:r[a-2].id+"-"+r[a].id,start:r[a-2].id,end:r[a].id,label:r[a-1].label,type:"edge",thickness:c,pattern:l,directions:r[a].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:r[a].id,label:r[a].label,type:n.typeStr2Type(r[a].typeStr),directions:r[a].directions}];break;case 24:n.getLogger().debug("Rule: nodeStatement (abc88 node size) ",r[a-1],r[a]),this.$={id:r[a-1].id,label:r[a-1].label,type:n.typeStr2Type(r[a-1].typeStr),directions:r[a-1].directions,widthInColumns:parseInt(r[a],10)};break;case 25:n.getLogger().debug("Rule: nodeStatement (node) ",r[a]),this.$={id:r[a].id,label:r[a].label,type:n.typeStr2Type(r[a].typeStr),directions:r[a].directions,widthInColumns:1};break;case 26:n.getLogger().debug("APA123",this?this:"na"),n.getLogger().debug("COLUMNS: ",r[a]),this.$={type:"column-setting",columns:"auto"===r[a]?-1:parseInt(r[a])};break;case 27:n.getLogger().debug("Rule: id-block statement : ",r[a-2],r[a-1]);n.generateId();this.$={...r[a-2],type:"composite",children:r[a-1]};break;case 28:n.getLogger().debug("Rule: blockStatement : ",r[a-2],r[a-1],r[a]);const h=n.generateId();this.$={id:h,type:"composite",label:"",children:r[a-1]};break;case 29:n.getLogger().debug("Rule: node (NODE_ID separator): ",r[a]),this.$={id:r[a]};break;case 30:n.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",r[a-1],r[a]),this.$={id:r[a-1],label:r[a].label,typeStr:r[a].typeStr,directions:r[a].directions};break;case 31:n.getLogger().debug("Rule: dirList: ",r[a]),this.$=[r[a]];break;case 32:n.getLogger().debug("Rule: dirList: ",r[a-1],r[a]),this.$=[r[a-1]].concat(r[a]);break;case 33:n.getLogger().debug("Rule: nodeShapeNLabel: ",r[a-2],r[a-1],r[a]),this.$={typeStr:r[a-2]+r[a],label:r[a-1]};break;case 34:n.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",r[a-3],r[a-2]," #3:",r[a-1],r[a]),this.$={typeStr:r[a-3]+r[a],label:r[a-2],directions:r[a-1]};break;case 35:case 36:this.$={type:"classDef",id:r[a-1].trim(),css:r[a].trim()};break;case 37:this.$={type:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 38:this.$={type:"applyStyles",id:r[a-1].trim(),stylesStr:r[a].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:r,39:o,43:a,46:c},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:s,28:n,29:i,31:r,39:o,43:a,46:c}),e(g,[2,16],{14:22,15:u,16:d}),e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(y,[2,25],{27:[1,25]}),e(g,[2,26]),{19:26,26:12,31:r},{10:t,11:27,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:r,39:o,43:a,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,31:r},{31:[2,14]},{17:[1,36]},e(y,[2,24]),{10:t,11:37,13:4,14:22,15:u,16:d,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:r,39:o,43:a,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(p,[2,30]),{18:[1,43]},{18:[1,44]},e(y,[2,23]),{18:[1,45]},{30:[1,46]},e(g,[2,28]),e(g,[2,35]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),{36:[1,47]},{33:48,34:b},{15:[1,50]},e(g,[2,27]),e(p,[2,33]),{38:[1,51]},{33:52,34:b,38:[2,31]},{31:[2,15]},e(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,l.K)(function(e,t){if(!t.recoverable){var s=new Error(e);throw s.hash=t,s}this.trace(e)},"parseError"),parse:(0,l.K)(function(e){var t=this,s=[0],n=[],i=[null],r=[],o=this.table,a="",c=0,h=0,g=0,u=r.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);d.setInput(e,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var b=d.yylloc;r.push(b);var f=d.options&&d.options.ranges;function x(){var e;return"number"!=typeof(e=n.pop()||d.lex()||1)&&(e instanceof Array&&(e=(n=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K)(function(e){s.length=s.length-2*e,i.length=i.length-e,r.length=r.length-e},"popStack"),(0,l.K)(x,"lex");for(var S,m,L,_,k,w,E,D,I,T={};;){if(L=s[s.length-1],this.defaultActions[L]?_=this.defaultActions[L]:(null==S&&(S=x()),_=o[L]&&o[L][S]),void 0===_||!_.length||!_[0]){var $="";for(w in I=[],o[L])this.terminals_[w]&&w>2&&I.push("'"+this.terminals_[w]+"'");$=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[S]||S)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==S?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError($,{text:d.match,token:this.terminals_[S]||S,line:d.yylineno,loc:b,expected:I})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+S);switch(_[0]){case 1:s.push(S),i.push(d.yytext),r.push(d.yylloc),s.push(_[1]),S=null,m?(S=m,m=null):(h=d.yyleng,a=d.yytext,c=d.yylineno,b=d.yylloc,g>0&&g--);break;case 2:if(E=this.productions_[_[1]][1],T.$=i[i.length-E],T._$={first_line:r[r.length-(E||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(E||1)].first_column,last_column:r[r.length-1].last_column},f&&(T._$.range=[r[r.length-(E||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(T,[a,h,c,y.yy,_[1],i,r].concat(u))))return k;E&&(s=s.slice(0,-1*E*2),i=i.slice(0,-1*E),r=r.slice(0,-1*E)),s.push(this.productions_[_[1]][0]),i.push(T.$),r.push(T._$),D=o[s[s.length-2]][s[s.length-1]],s.push(D);break;case 3:return!0}}return!0},"parse")},x=function(){return{EOF:1,parseError:(0,l.K)(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:(0,l.K)(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K)(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:(0,l.K)(function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===n.length?this.yylloc.first_column:0)+n[n.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K)(function(){return this._more=!0,this},"more"),reject:(0,l.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,l.K)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K)(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,l.K)(function(e,t){var s,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1},"test_match"),next:(0,l.K)(function(){if(this.done)return this.EOF;var e,t,s,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;r<i.length;r++)if((s=this._input.match(this.rules[i[r]]))&&(!t||s[0].length>t[0].length)){if(t=s,n=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,i[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K)(function(){var e=this.next();return e||this.lex()},"lex"),begin:(0,l.K)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,l.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,l.K)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,l.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,l.K)(function(e,t,s,n){switch(s){case 0:return e.getLogger().debug("Found block-beta"),10;case 1:return e.getLogger().debug("Found id-block"),29;case 2:return e.getLogger().debug("Found block"),10;case 3:e.getLogger().debug(".",t.yytext);break;case 4:e.getLogger().debug("_",t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:e.getLogger().debug("LEX: POPPING STR:",t.yytext),this.popState();break;case 13:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 14:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 15:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),e.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),e.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),e.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),e.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),e.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),e.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),e.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),e.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),37;case 74:return e.getLogger().debug("Lex: NODE_ID",t.yytext),31;case 75:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 78:return"NODE_DESCR";case 80:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 83:e.getLogger().debug("LEX POPPING"),this.popState();break;case 84:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 91:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 93:case 94:case 95:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 96:case 97:case 98:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 100:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 102:case 103:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 104:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}}();function S(){this.yy={}}return f.lexer=x,(0,l.K)(S,"Parser"),S.prototype=f,f.Parser=S,new S}();m.parser=m;var L=m,_=new Map,k=[],w=new Map,E="color",D="fill",I=new Map,T="",$=(0,l.K)(e=>a.Y2.sanitizeText(e,(0,a.D7)()),"sanitizeText"),N=(0,l.K)(function(e,t=""){let s=I.get(e);s||(s={id:e,styles:[],textStyles:[]},I.set(e,s)),null!=t&&t.split(",").forEach(e=>{const t=e.replace(/([^;]*);/,"$1").trim();if(RegExp(E).exec(e)){const e=t.replace(D,"bgFill").replace(E,D);s.textStyles.push(e)}s.styles.push(t)})},"addStyleClass"),O=(0,l.K)(function(e,t=""){const s=_.get(e);null!=t&&(s.styles=t.split(","))},"addStyle2Node"),R=(0,l.K)(function(e,t){e.split(",").forEach(function(e){let s=_.get(e);if(void 0===s){const t=e.trim();s={id:t,type:"na",children:[]},_.set(t,s)}s.classes||(s.classes=[]),s.classes.push(t)})},"setCssClass"),C=(0,l.K)((e,t)=>{const s=e.flat(),n=[],i=s.find(e=>"column-setting"===e?.type),r=i?.columns??-1;for(const e of s)if("number"==typeof r&&r>0&&"column-setting"!==e.type&&"number"==typeof e.widthInColumns&&e.widthInColumns>r&&c.R.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${r}`),e.label&&(e.label=$(e.label)),"classDef"!==e.type)if("applyClass"!==e.type)if("applyStyles"!==e.type)if("column-setting"===e.type)t.columns=e.columns??-1;else if("edge"===e.type){const t=(w.get(e.id)??0)+1;w.set(e.id,t),e.id=t+"-"+e.id,k.push(e)}else{e.label||("composite"===e.type?e.label="":e.label=e.id);const t=_.get(e.id);if(void 0===t?_.set(e.id,e):("na"!==e.type&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&C(e.children,e),"space"===e.type){const t=e.width??1;for(let s=0;s<t;s++){const t=y(e);t.id=t.id+"-"+s,_.set(t.id,t),n.push(t)}}else void 0===t&&n.push(e)}else e?.stylesStr&&O(e.id,e?.stylesStr);else R(e.id,e?.styleClass??"");else N(e.id,e.css);t.children=n},"populateBlockDatabase"),z=[],A={id:"root",type:"composite",children:[],columns:-1},K=(0,l.K)(()=>{c.R.debug("Clear called"),(0,a.IU)(),A={id:"root",type:"composite",children:[],columns:-1},_=new Map([["root",A]]),z=[],I=new Map,k=[],w=new Map,T=""},"clear");function v(e){switch(c.R.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return c.R.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function B(e){return c.R.debug("typeStr2Type",e),"=="===e?"thick":"normal"}function P(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function F(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function j(e){return e.includes("==")?"thick":"normal"}function M(e){return e.includes(".-")?"dotted":"solid"}(0,l.K)(v,"typeStr2Type"),(0,l.K)(B,"edgeTypeStr2Type"),(0,l.K)(P,"edgeStrToEdgeData"),(0,l.K)(F,"edgeStrToEdgeStartData"),(0,l.K)(j,"edgeStrToThickness"),(0,l.K)(M,"edgeStrToPattern");var Y=0,X=(0,l.K)(()=>(Y++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Y),"generateId"),W=(0,l.K)(e=>{A.children=e,C(e,A),z=A.children},"setHierarchy"),U=(0,l.K)(e=>{const t=_.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),G=(0,l.K)(()=>[..._.values()],"getBlocksFlat"),H=(0,l.K)(()=>z||[],"getBlocks"),q=(0,l.K)(()=>k,"getEdges"),V=(0,l.K)(e=>_.get(e),"getBlock"),Z=(0,l.K)(e=>{_.set(e.id,e)},"setBlock"),J=(0,l.K)(e=>{T=e},"setDiagramId"),Q=(0,l.K)(()=>T,"getDiagramId"),ee=(0,l.K)(()=>c.R,"getLogger"),te=(0,l.K)(function(){return I},"getClasses"),se={getConfig:(0,l.K)(()=>(0,a.zj)().block,"getConfig"),typeStr2Type:v,edgeTypeStr2Type:B,edgeStrToEdgeData:P,edgeStrToEdgeStartData:F,edgeStrToThickness:j,edgeStrToPattern:M,getLogger:ee,getBlocksFlat:G,getBlocks:H,getEdges:q,setHierarchy:W,getBlock:V,setBlock:Z,getColumns:U,getClasses:te,clear:K,generateId:X,setDiagramId:J,getDiagramId:Q},ne=(0,l.K)((e,t)=>{const s=b.A,n=s(e,"r"),i=s(e,"g"),r=s(e,"b");return f.A(n,i,r,t)},"fade"),ie=(0,l.K)(e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span {\n color: ${e.titleColor};\n }\n\n\n\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePaths .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n /*\n * This is for backward compatibility with existing code that didn't\n * add a \`<p>\` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${e.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${ne(e.mainBkg,.5)};\n fill: ${ne(e.clusterBkg,.5)};\n stroke: ${ne(e.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n ${(0,n.o)()}\n`,"getStyles");function re(e,t){if(0===e||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(1===e)return{px:0,py:t};return{px:t%e,py:Math.floor(t/e)}}(0,l.K)(re,"calculateBlockPosition");var oe=(0,l.K)(e=>{let t=0,s=0;for(const n of e.children){const{width:e,height:i,x:r,y:o}=n.size??{width:0,height:0,x:0,y:0};if(c.R.debug("getMaxChildSize abc95 child:",n.id,"width:",e,"height:",i,"x:",r,"y:",o,n.type),"space"===n.type)continue;const a=e/(n.widthInColumns??1);a>t&&(t=a),i>s&&(s=i)}return{width:t,height:s}},"getMaxChildSize");function ae(e,t,s=0,n=0,i=8){c.R.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",s),e?.size?.width||(e.size={width:s,height:n,x:0,y:0});let r=0,o=0;if(e.children?.length>0){for(const s of e.children)ae(s,t,0,0,i);const a=oe(e);r=a.width,o=a.height,c.R.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",r,o);for(const t of e.children)t.size&&(c.R.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${r} ${o} ${JSON.stringify(t.size)}`),t.size.width=r*(t.widthInColumns??1)+i*((t.widthInColumns??1)-1),t.size.height=o,t.size.x=0,t.size.y=0,c.R.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${r} maxHeight:${o}`));for(const s of e.children)ae(s,t,r,o,i);const l=e.columns??-1;let h=0;for(const t of e.children)h+=t.widthInColumns??1;let g=e.children.length;l>0&&l<h&&(g=l);const u=Math.ceil(h/g);let d=g*(r+i)+i,y=u*(o+i)+i;if(d<s){c.R.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${s} siblingHeight ${n} width ${d}`),d=s,y=n;const t=(s-g*i-i)/g,a=(n-u*i-i)/u;c.R.debug("Size indata abc88",e.id,"childWidth",t,"maxWidth",r),c.R.debug("Size indata abc88",e.id,"childHeight",a,"maxHeight",o),c.R.debug("Size indata abc88 xSize",g,"padding",i);for(const s of e.children)s.size&&(s.size.width=t,s.size.height=a,s.size.x=0,s.size.y=0)}if(c.R.debug(`abc95 (finale calc) ${e.id} xSize ${g} ySize ${u} columns ${l}${e.children.length} width=${Math.max(d,e.size?.width||0)}`),d<(e?.size?.width||0)){d=e?.size?.width||0;const t=l>0?Math.min(e.children.length,l):e.children.length;if(t>0){const s=(d-t*i-i)/t;c.R.debug("abc95 (growing to fit) width",e.id,d,e.size?.width,s);for(const t of e.children)t.size&&(t.size.width=s)}}e.size={width:d,height:y,x:0,y:0}}c.R.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function ce(e,t,s=8){c.R.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);const n=e.columns??-1;if(c.R.debug("layoutBlocks columns abc95",e.id,"=>",n,e),e.children&&e.children.length>0){const i=e?.children[0]?.size?.width??0,r=e.children.length*i+(e.children.length-1)*s;c.R.debug("widthOfChildren 88",r,"posX");const o=new Map;{let t=0;for(const s of e.children){if(!s.size)continue;const{py:e}=re(n,t),i=o.get(e)??0;s.size.height>i&&o.set(e,s.size.height);let r=s?.widthInColumns??1;n>0&&(r=Math.min(r,n-t%n)),t+=r}}const a=new Map;{let e=0;const t=[...o.keys()].sort((e,t)=>e-t);for(const n of t)a.set(n,e),e+=(o.get(n)??0)+s}let l=0;c.R.debug("abc91 block?.size?.x",e.id,e?.size?.x);let h=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-s,g=0;for(const i of e.children){const r=e;if(!i.size)continue;const{width:u,height:d}=i.size,{px:y,py:p}=re(n,l);if(p!=g&&(g=p,h=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-s,c.R.debug("New row in layout for block",e.id," and child ",i.id,g)),c.R.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${l} (px, py) ${y},${p} (${r?.size?.x},${r?.size?.y}) parent: ${r.id} width: ${u}${s}`),r.size){const e=u/2;i.size.x=h+s+e,c.R.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${h} new startingPosX${i.size.x} ${e} padding=${s} width=${u} halfWidth=${e} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${u*(i?.widthInColumns??1)/2}`),h=i.size.x+e;const t=a.get(p)??0,n=o.get(p)??d;i.size.y=r.size.y-r.size.height/2+t+n/2+s,c.R.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${h}${s}${e}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${u*(i?.widthInColumns??1)/2}`)}i.children&&ce(i,t,s);let b=i?.widthInColumns??1;n>0&&(b=Math.min(b,n-l%n)),l+=b,c.R.debug("abc88 columnsPos",i,l)}}c.R.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function le(e,{minX:t,minY:s,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&"root"!==e.id){const{x:r,y:o,width:a,height:c}=e.size;r-a/2<t&&(t=r-a/2),o-c/2<s&&(s=o-c/2),r+a/2>n&&(n=r+a/2),o+c/2>i&&(i=o+c/2)}if(e.children)for(const r of e.children)({minX:t,minY:s,maxX:n,maxY:i}=le(r,{minX:t,minY:s,maxX:n,maxY:i}));return{minX:t,minY:s,maxX:n,maxY:i}}function he(e){const t=e.getBlock("root");if(!t)return;const s=(0,a.D7)()?.block?.padding??8;ae(t,e,0,0,s),ce(t,e,s),c.R.debug("getBlocks",JSON.stringify(t,null,2));const{minX:n,minY:i,maxX:r,maxY:o}=le(t);return{x:n,y:i,width:r-n,height:o-i}}function ge(e,t,s=!1){const n=e;let i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i+=" flowchart-label";const r=(n?.classes??[]).flatMap(e=>t.getClasses().get(e)?.styles??[]);let c,l=0,h="rect";switch(n.type){case"round":l=5,h="rect";break;case"composite":l=0,h="composite",c=0;break;case"square":case"group":default:h="rect";break;case"diamond":h="question";break;case"hexagon":h="hexagon";break;case"block_arrow":h="block_arrow";break;case"odd":case"rect_left_inv_arrow":h="rect_left_inv_arrow";break;case"lean_right":h="lean_right";break;case"lean_left":h="lean_left";break;case"trapezoid":h="trapezoid";break;case"inv_trapezoid":h="inv_trapezoid";break;case"circle":h="circle";break;case"ellipse":h="ellipse";break;case"stadium":h="stadium";break;case"subroutine":h="subroutine";break;case"cylinder":h="cylinder";break;case"doublecircle":h="doublecircle"}const g=(0,o.sM)(n?.styles??[]),u=n.label,d=n.size??{width:0,height:0,x:0,y:0},y=t.getDiagramId();return{labelStyle:g.labelStyle,shape:h,label:u,labelText:u,rx:l,ry:l,class:i,cssClasses:i,cssStyles:n?.styles??[],cssCompiledStyles:r,style:g.style,id:n.id,domId:y?`${y}-${n.id}`:n.id,isGroup:!1,directions:n.directions,width:d.width||void 0,height:d.height||void 0,wrappingWidth:d.width||Number.POSITIVE_INFINITY,x:d.x,y:d.y,positioned:s,intersect:void 0,padding:c??(0,a.zj)()?.block?.padding??0,widthInColumns:n.widthInColumns??1}}async function ue(e,t,s){const n=ge(t,s,!1);if("group"===t.type)return;const i=(0,a.zj)(),o=await(0,r.on)(e,n,{config:i}),c=o.node()?.getBBox()??{width:0,height:0},l=s.getBlock(n.id);l.size={width:c.width,height:c.height,x:0,y:0,node:o},s.setBlock(l),o.remove()}async function de(e,t,s){const n=ge(t,s,!0);if("space"!==s.getBlock(n.id).type){const s=(0,a.zj)();await(0,r.on)(e,n,{config:s}),t.intersect=n?.intersect,(0,r.U_)(n)}}async function ye(e,t,s,n){for(const i of t)await n(e,i,s),i.children&&await ye(e,i.children,s,n)}async function pe(e,t,s){await ye(e,t,s,ue)}async function be(e,t,s){await ye(e,t,s,de)}async function fe(e,t,s,n,r){const o=new S.T({multigraph:!0,compound:!0});o.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const e of s)e.size&&o.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(const s of t)if(s.start&&s.end){const t=n.getBlock(s.start),a=n.getBlock(s.end);if(t?.size&&a?.size){const n=t.size,c=a.size,l=[{x:n.x,y:n.y},{x:n.x+(c.x-n.x)/2,y:n.y+(c.y-n.y)/2},{x:c.x,y:c.y}],h=r?`${r}-${s.id}`:s.id,g=`${"thick"===s.thickness?"edge-thickness-thick":"edge-thickness-normal"} ${"dotted"===s.pattern?"edge-pattern-dotted":"edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;(0,i.Jo)(e,{...s,id:h,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:g},{},"block",o.node(s.start),o.node(s.end),r),s.label&&(await(0,i.jP)(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:g}),(0,i.T_)({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}}}(0,l.K)(ae,"setBlockSizes"),(0,l.K)(ce,"layoutBlocks"),(0,l.K)(le,"findBounds"),(0,l.K)(he,"layout"),(0,l.K)(ge,"getNodeFromBlock"),(0,l.K)(ue,"calculateBlockSize"),(0,l.K)(de,"insertBlockPositioned"),(0,l.K)(ye,"performOperations"),(0,l.K)(pe,"calculateBlockSizes"),(0,l.K)(be,"insertBlocks"),(0,l.K)(fe,"insertEdges");var xe=(0,l.K)(function(e,t){return t.db.getClasses()},"getClasses"),Se={parser:L,db:se,renderer:{draw:(0,l.K)(async function(e,t,s,n){const{securityLevel:r,block:o}=(0,a.zj)(),l=n.db;let h;l.setDiagramId(t),"sandbox"===r&&(h=(0,x.Ltv)("#i"+t));const g="sandbox"===r?(0,x.Ltv)(h.nodes()[0].contentDocument.body):(0,x.Ltv)("body"),u="sandbox"===r?g.select(`[id="${t}"]`):(0,x.Ltv)(`[id="${t}"]`);(0,i.g0)(u,["point","circle","cross"],n.type,t);const d=l.getBlocks(),y=l.getBlocksFlat(),p=l.getEdges(),b=u.insert("g").attr("class","block");await pe(b,d,l);const f=he(l);await be(b,d,l),await fe(b,p,y,l,t);const S=b.node()?.getBBox(),m=S&&Number.isFinite(S.width)&&Number.isFinite(S.height)?S:f;if(m){const e=Math.max(1,Math.round(m.width/m.height*.125)),t=m.height+e+10,s=m.width+10,{useMaxWidth:n}=o;(0,a.a$)(u,t,s,!!n),c.R.debug("Here Bounds",f,m),u.attr("viewBox",`${m.x-5} ${m.y-5} ${m.width+10} ${m.height+10}`)}},"draw"),getClasses:xe},styles:ie}},64918(e,t,s){s.d(t,{o:()=>n});var n=(0,s(86827).K)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")}}]);
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8727],{75937(e,t,s){var n=s(86309),i=s(51931);const r=(e,t)=>n.A.lang.round(i.A.parse(e)[t]);s.d(t,["A",0,r])},38727(e,t,s){s.d(t,{diagram:()=>Se});var n=s(64918),i=s(27838),r=s(96865),o=(s(48159),s(44505),s(69793),s(43287),s(12505)),a=s(86535),c=s(31293),l=s(86827),h=s(37110),g=s(99125),u=s(89826);var d=s(19663);function y(e){if((0,h.s)(e))return e;const t=(0,g.b)(e);if(!function(e){switch((0,g.b)(e)){case u.R_:case u.Uw:case u.cT:case u.iq:case u.$V:case u.vC:case u.ri:case u.ML:case u.XZ:case u.i1:case u._u:case u.pj:case u.kj:case u.GX:case u.Av:case u.NA:case u.OG:case u.VP:case u.Qb:case u.q:case u.x6:case u.ZR:return!0;default:return!1}}(e))return{};if(s=e,Array.isArray(s)){const t=Array.from(e);return e.length>0&&"string"==typeof e[0]&&Object.hasOwn(e,"index")&&(t.index=e.index,t.input=e.input),t}var s;if((0,d.i)(e)){const t=e;return new(0,t.constructor)(t.buffer,t.byteOffset,t.length)}if("[object ArrayBuffer]"===t)return new ArrayBuffer(e.byteLength);if("[object DataView]"===t){const t=e,s=t.buffer,n=t.byteOffset,i=t.byteLength,r=new ArrayBuffer(i),o=new Uint8Array(s,n,i);return new Uint8Array(r).set(o),new DataView(r)}if("[object Boolean]"===t||"[object Number]"===t||"[object String]"===t){const s=new(0,e.constructor)(e.valueOf());return"[object String]"===t?function(e,t){const s=t.valueOf().length;for(const n in t)Object.hasOwn(t,n)&&(Number.isNaN(Number(n))||Number(n)>=s)&&(e[n]=t[n])}(s,e):p(s,e),s}if("[object Date]"===t)return new Date(Number(e));if("[object RegExp]"===t){const t=e,s=new RegExp(t.source,t.flags);return s.lastIndex=t.lastIndex,s}if("[object Symbol]"===t)return Object(Symbol.prototype.valueOf.call(e));if("[object Map]"===t){const t=e,s=new Map;return t.forEach((e,t)=>{s.set(t,e)}),s}if("[object Set]"===t){const t=e,s=new Set;return t.forEach(e=>{s.add(e)}),s}if("[object Arguments]"===t){const t=e,s={};return p(s,t),s.length=t.length,s[Symbol.iterator]=t[Symbol.iterator],s}const n={};return function(e,t){const s=Object.getPrototypeOf(t);null!==s&&"function"==typeof t.constructor&&Object.setPrototypeOf(e,s)}(n,e),p(n,e),function(e,t){const s=Object.getOwnPropertySymbols(t);for(let n=0;n<s.length;n++){const i=s[n];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}(n,e),n}function p(e,t){for(const s in t)Object.hasOwn(t,s)&&(e[s]=t[s])}var b=s(75937),f=s(25582),x=s(51444),S=s(697),m=function(){var e=(0,l.K)(function(e,t,s,n){for(s=s||{},n=e.length;n--;s[e[n]]=t);return s},"o"),t=[1,15],s=[1,7],n=[1,13],i=[1,14],r=[1,19],o=[1,16],a=[1,17],c=[1,18],h=[8,30],g=[8,10,21,28,29,30,31,39,43,46],u=[1,23],d=[1,24],y=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],b=[1,49],f={trace:(0,l.K)(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,l.K)(function(e,t,s,n,i,r,o){var a=r.length-1;switch(i){case 4:n.getLogger().debug("Rule: separator (NL) ");break;case 5:n.getLogger().debug("Rule: separator (Space) ");break;case 6:n.getLogger().debug("Rule: separator (EOF) ");break;case 7:n.getLogger().debug("Rule: hierarchy: ",r[a-1]),n.setHierarchy(r[a-1]);break;case 8:n.getLogger().debug("Stop NL ");break;case 9:n.getLogger().debug("Stop EOF ");break;case 10:n.getLogger().debug("Stop NL2 ");break;case 11:n.getLogger().debug("Stop EOF2 ");break;case 12:n.getLogger().debug("Rule: statement: ",r[a]),"number"==typeof r[a].length?this.$=r[a]:this.$=[r[a]];break;case 13:n.getLogger().debug("Rule: statement #2: ",r[a-1]),this.$=[r[a-1]].concat(r[a]);break;case 14:n.getLogger().debug("Rule: link: ",r[a],e),this.$={edgeTypeStr:r[a],label:""};break;case 15:n.getLogger().debug("Rule: LABEL link: ",r[a-3],r[a-1],r[a]),this.$={edgeTypeStr:r[a],label:r[a-1]};break;case 18:const t=parseInt(r[a]),s=n.generateId();this.$={id:s,type:"space",label:"",width:t,children:[]};break;case 23:n.getLogger().debug("Rule: (nodeStatement link node) ",r[a-2],r[a-1],r[a]," typestr: ",r[a-1].edgeTypeStr);const i=n.edgeStrToEdgeData(r[a-1].edgeTypeStr),o=n.edgeStrToEdgeStartData(r[a-1].edgeTypeStr),c=n.edgeStrToThickness(r[a-1].edgeTypeStr),l=n.edgeStrToPattern(r[a-1].edgeTypeStr);this.$=[{id:r[a-2].id,label:r[a-2].label,type:r[a-2].type,directions:r[a-2].directions},{id:r[a-2].id+"-"+r[a].id,start:r[a-2].id,end:r[a].id,label:r[a-1].label,type:"edge",thickness:c,pattern:l,directions:r[a].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:r[a].id,label:r[a].label,type:n.typeStr2Type(r[a].typeStr),directions:r[a].directions}];break;case 24:n.getLogger().debug("Rule: nodeStatement (abc88 node size) ",r[a-1],r[a]),this.$={id:r[a-1].id,label:r[a-1].label,type:n.typeStr2Type(r[a-1].typeStr),directions:r[a-1].directions,widthInColumns:parseInt(r[a],10)};break;case 25:n.getLogger().debug("Rule: nodeStatement (node) ",r[a]),this.$={id:r[a].id,label:r[a].label,type:n.typeStr2Type(r[a].typeStr),directions:r[a].directions,widthInColumns:1};break;case 26:n.getLogger().debug("APA123",this?this:"na"),n.getLogger().debug("COLUMNS: ",r[a]),this.$={type:"column-setting",columns:"auto"===r[a]?-1:parseInt(r[a])};break;case 27:n.getLogger().debug("Rule: id-block statement : ",r[a-2],r[a-1]);n.generateId();this.$={...r[a-2],type:"composite",children:r[a-1]};break;case 28:n.getLogger().debug("Rule: blockStatement : ",r[a-2],r[a-1],r[a]);const h=n.generateId();this.$={id:h,type:"composite",label:"",children:r[a-1]};break;case 29:n.getLogger().debug("Rule: node (NODE_ID separator): ",r[a]),this.$={id:r[a]};break;case 30:n.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",r[a-1],r[a]),this.$={id:r[a-1],label:r[a].label,typeStr:r[a].typeStr,directions:r[a].directions};break;case 31:n.getLogger().debug("Rule: dirList: ",r[a]),this.$=[r[a]];break;case 32:n.getLogger().debug("Rule: dirList: ",r[a-1],r[a]),this.$=[r[a-1]].concat(r[a]);break;case 33:n.getLogger().debug("Rule: nodeShapeNLabel: ",r[a-2],r[a-1],r[a]),this.$={typeStr:r[a-2]+r[a],label:r[a-1]};break;case 34:n.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",r[a-3],r[a-2]," #3:",r[a-1],r[a]),this.$={typeStr:r[a-3]+r[a],label:r[a-2],directions:r[a-1]};break;case 35:case 36:this.$={type:"classDef",id:r[a-1].trim(),css:r[a].trim()};break;case 37:this.$={type:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 38:this.$={type:"applyStyles",id:r[a-1].trim(),stylesStr:r[a].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:r,39:o,43:a,46:c},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:s,28:n,29:i,31:r,39:o,43:a,46:c}),e(g,[2,16],{14:22,15:u,16:d}),e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(y,[2,25],{27:[1,25]}),e(g,[2,26]),{19:26,26:12,31:r},{10:t,11:27,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:r,39:o,43:a,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,31:r},{31:[2,14]},{17:[1,36]},e(y,[2,24]),{10:t,11:37,13:4,14:22,15:u,16:d,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:r,39:o,43:a,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(p,[2,30]),{18:[1,43]},{18:[1,44]},e(y,[2,23]),{18:[1,45]},{30:[1,46]},e(g,[2,28]),e(g,[2,35]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),{36:[1,47]},{33:48,34:b},{15:[1,50]},e(g,[2,27]),e(p,[2,33]),{38:[1,51]},{33:52,34:b,38:[2,31]},{31:[2,15]},e(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,l.K)(function(e,t){if(!t.recoverable){var s=new Error(e);throw s.hash=t,s}this.trace(e)},"parseError"),parse:(0,l.K)(function(e){var t=this,s=[0],n=[],i=[null],r=[],o=this.table,a="",c=0,h=0,g=0,u=r.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);d.setInput(e,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var b=d.yylloc;r.push(b);var f=d.options&&d.options.ranges;function x(){var e;return"number"!=typeof(e=n.pop()||d.lex()||1)&&(e instanceof Array&&(e=(n=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K)(function(e){s.length=s.length-2*e,i.length=i.length-e,r.length=r.length-e},"popStack"),(0,l.K)(x,"lex");for(var S,m,L,_,k,w,E,D,I,T={};;){if(L=s[s.length-1],this.defaultActions[L]?_=this.defaultActions[L]:(null==S&&(S=x()),_=o[L]&&o[L][S]),void 0===_||!_.length||!_[0]){var $="";for(w in I=[],o[L])this.terminals_[w]&&w>2&&I.push("'"+this.terminals_[w]+"'");$=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[S]||S)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==S?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError($,{text:d.match,token:this.terminals_[S]||S,line:d.yylineno,loc:b,expected:I})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+S);switch(_[0]){case 1:s.push(S),i.push(d.yytext),r.push(d.yylloc),s.push(_[1]),S=null,m?(S=m,m=null):(h=d.yyleng,a=d.yytext,c=d.yylineno,b=d.yylloc,g>0&&g--);break;case 2:if(E=this.productions_[_[1]][1],T.$=i[i.length-E],T._$={first_line:r[r.length-(E||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(E||1)].first_column,last_column:r[r.length-1].last_column},f&&(T._$.range=[r[r.length-(E||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(T,[a,h,c,y.yy,_[1],i,r].concat(u))))return k;E&&(s=s.slice(0,-1*E*2),i=i.slice(0,-1*E),r=r.slice(0,-1*E)),s.push(this.productions_[_[1]][0]),i.push(T.$),r.push(T._$),D=o[s[s.length-2]][s[s.length-1]],s.push(D);break;case 3:return!0}}return!0},"parse")},x=function(){return{EOF:1,parseError:(0,l.K)(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:(0,l.K)(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.K)(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:(0,l.K)(function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===n.length?this.yylloc.first_column:0)+n[n.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K)(function(){return this._more=!0,this},"more"),reject:(0,l.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.K)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,l.K)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K)(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,l.K)(function(e,t){var s,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1},"test_match"),next:(0,l.K)(function(){if(this.done)return this.EOF;var e,t,s,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;r<i.length;r++)if((s=this._input.match(this.rules[i[r]]))&&(!t||s[0].length>t[0].length)){if(t=s,n=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,i[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.K)(function(){var e=this.next();return e||this.lex()},"lex"),begin:(0,l.K)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,l.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.K)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,l.K)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,l.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,l.K)(function(e,t,s,n){switch(s){case 0:return e.getLogger().debug("Found block-beta"),10;case 1:return e.getLogger().debug("Found id-block"),29;case 2:return e.getLogger().debug("Found block"),10;case 3:e.getLogger().debug(".",t.yytext);break;case 4:e.getLogger().debug("_",t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:e.getLogger().debug("LEX: POPPING STR:",t.yytext),this.popState();break;case 13:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 14:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 15:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),e.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),e.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),e.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),e.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),e.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),e.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),e.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),e.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),37;case 74:return e.getLogger().debug("Lex: NODE_ID",t.yytext),31;case 75:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 78:return"NODE_DESCR";case 80:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 83:e.getLogger().debug("LEX POPPING"),this.popState();break;case 84:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 91:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 93:case 94:case 95:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 96:case 97:case 98:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 100:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 102:case 103:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 104:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}}();function S(){this.yy={}}return f.lexer=x,(0,l.K)(S,"Parser"),S.prototype=f,f.Parser=S,new S}();m.parser=m;var L=m,_=new Map,k=[],w=new Map,E="color",D="fill",I=new Map,T="",$=(0,l.K)(e=>a.Y2.sanitizeText(e,(0,a.D7)()),"sanitizeText"),N=(0,l.K)(function(e,t=""){let s=I.get(e);s||(s={id:e,styles:[],textStyles:[]},I.set(e,s)),null!=t&&t.split(",").forEach(e=>{const t=e.replace(/([^;]*);/,"$1").trim();if(RegExp(E).exec(e)){const e=t.replace(D,"bgFill").replace(E,D);s.textStyles.push(e)}s.styles.push(t)})},"addStyleClass"),O=(0,l.K)(function(e,t=""){const s=_.get(e);null!=t&&(s.styles=t.split(","))},"addStyle2Node"),R=(0,l.K)(function(e,t){e.split(",").forEach(function(e){let s=_.get(e);if(void 0===s){const t=e.trim();s={id:t,type:"na",children:[]},_.set(t,s)}s.classes||(s.classes=[]),s.classes.push(t)})},"setCssClass"),C=(0,l.K)((e,t)=>{const s=e.flat(),n=[],i=s.find(e=>"column-setting"===e?.type),r=i?.columns??-1;for(const e of s)if("number"==typeof r&&r>0&&"column-setting"!==e.type&&"number"==typeof e.widthInColumns&&e.widthInColumns>r&&c.R.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${r}`),e.label&&(e.label=$(e.label)),"classDef"!==e.type)if("applyClass"!==e.type)if("applyStyles"!==e.type)if("column-setting"===e.type)t.columns=e.columns??-1;else if("edge"===e.type){const t=(w.get(e.id)??0)+1;w.set(e.id,t),e.id=t+"-"+e.id,k.push(e)}else{e.label||("composite"===e.type?e.label="":e.label=e.id);const t=_.get(e.id);if(void 0===t?_.set(e.id,e):("na"!==e.type&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&C(e.children,e),"space"===e.type){const t=e.width??1;for(let s=0;s<t;s++){const t=y(e);t.id=t.id+"-"+s,_.set(t.id,t),n.push(t)}}else void 0===t&&n.push(e)}else e?.stylesStr&&O(e.id,e?.stylesStr);else R(e.id,e?.styleClass??"");else N(e.id,e.css);t.children=n},"populateBlockDatabase"),z=[],A={id:"root",type:"composite",children:[],columns:-1},K=(0,l.K)(()=>{c.R.debug("Clear called"),(0,a.IU)(),A={id:"root",type:"composite",children:[],columns:-1},_=new Map([["root",A]]),z=[],I=new Map,k=[],w=new Map,T=""},"clear");function v(e){switch(c.R.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return c.R.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function B(e){return c.R.debug("typeStr2Type",e),"=="===e?"thick":"normal"}function P(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function F(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function j(e){return e.includes("==")?"thick":"normal"}function M(e){return e.includes(".-")?"dotted":"solid"}(0,l.K)(v,"typeStr2Type"),(0,l.K)(B,"edgeTypeStr2Type"),(0,l.K)(P,"edgeStrToEdgeData"),(0,l.K)(F,"edgeStrToEdgeStartData"),(0,l.K)(j,"edgeStrToThickness"),(0,l.K)(M,"edgeStrToPattern");var Y=0,X=(0,l.K)(()=>(Y++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Y),"generateId"),W=(0,l.K)(e=>{A.children=e,C(e,A),z=A.children},"setHierarchy"),U=(0,l.K)(e=>{const t=_.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),G=(0,l.K)(()=>[..._.values()],"getBlocksFlat"),H=(0,l.K)(()=>z||[],"getBlocks"),q=(0,l.K)(()=>k,"getEdges"),V=(0,l.K)(e=>_.get(e),"getBlock"),Z=(0,l.K)(e=>{_.set(e.id,e)},"setBlock"),J=(0,l.K)(e=>{T=e},"setDiagramId"),Q=(0,l.K)(()=>T,"getDiagramId"),ee=(0,l.K)(()=>c.R,"getLogger"),te=(0,l.K)(function(){return I},"getClasses"),se={getConfig:(0,l.K)(()=>(0,a.zj)().block,"getConfig"),typeStr2Type:v,edgeTypeStr2Type:B,edgeStrToEdgeData:P,edgeStrToEdgeStartData:F,edgeStrToThickness:j,edgeStrToPattern:M,getLogger:ee,getBlocksFlat:G,getBlocks:H,getEdges:q,setHierarchy:W,getBlock:V,setBlock:Z,getColumns:U,getClasses:te,clear:K,generateId:X,setDiagramId:J,getDiagramId:Q},ne=(0,l.K)((e,t)=>{const s=b.A,n=s(e,"r"),i=s(e,"g"),r=s(e,"b");return f.A(n,i,r,t)},"fade"),ie=(0,l.K)(e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span {\n color: ${e.titleColor};\n }\n\n\n\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePaths .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n /*\n * This is for backward compatibility with existing code that didn't\n * add a \`<p>\` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${e.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${ne(e.mainBkg,.5)};\n fill: ${ne(e.clusterBkg,.5)};\n stroke: ${ne(e.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n ${(0,n.o)()}\n`,"getStyles");function re(e,t){if(0===e||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(1===e)return{px:0,py:t};return{px:t%e,py:Math.floor(t/e)}}(0,l.K)(re,"calculateBlockPosition");var oe=(0,l.K)(e=>{let t=0,s=0;for(const n of e.children){const{width:e,height:i,x:r,y:o}=n.size??{width:0,height:0,x:0,y:0};if(c.R.debug("getMaxChildSize abc95 child:",n.id,"width:",e,"height:",i,"x:",r,"y:",o,n.type),"space"===n.type)continue;const a=e/(n.widthInColumns??1);a>t&&(t=a),i>s&&(s=i)}return{width:t,height:s}},"getMaxChildSize");function ae(e,t,s=0,n=0,i=8){c.R.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",s),e?.size?.width||(e.size={width:s,height:n,x:0,y:0});let r=0,o=0;if(e.children?.length>0){for(const s of e.children)ae(s,t,0,0,i);const a=oe(e);r=a.width,o=a.height,c.R.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",r,o);for(const t of e.children)t.size&&(c.R.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${r} ${o} ${JSON.stringify(t.size)}`),t.size.width=r*(t.widthInColumns??1)+i*((t.widthInColumns??1)-1),t.size.height=o,t.size.x=0,t.size.y=0,c.R.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${r} maxHeight:${o}`));for(const s of e.children)ae(s,t,r,o,i);const l=e.columns??-1;let h=0;for(const t of e.children)h+=t.widthInColumns??1;let g=e.children.length;l>0&&l<h&&(g=l);const u=Math.ceil(h/g);let d=g*(r+i)+i,y=u*(o+i)+i;if(d<s){c.R.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${s} siblingHeight ${n} width ${d}`),d=s,y=n;const t=(s-g*i-i)/g,a=(n-u*i-i)/u;c.R.debug("Size indata abc88",e.id,"childWidth",t,"maxWidth",r),c.R.debug("Size indata abc88",e.id,"childHeight",a,"maxHeight",o),c.R.debug("Size indata abc88 xSize",g,"padding",i);for(const s of e.children)s.size&&(s.size.width=t,s.size.height=a,s.size.x=0,s.size.y=0)}if(c.R.debug(`abc95 (finale calc) ${e.id} xSize ${g} ySize ${u} columns ${l}${e.children.length} width=${Math.max(d,e.size?.width||0)}`),d<(e?.size?.width||0)){d=e?.size?.width||0;const t=l>0?Math.min(e.children.length,l):e.children.length;if(t>0){const s=(d-t*i-i)/t;c.R.debug("abc95 (growing to fit) width",e.id,d,e.size?.width,s);for(const t of e.children)t.size&&(t.size.width=s)}}e.size={width:d,height:y,x:0,y:0}}c.R.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function ce(e,t,s=8){c.R.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);const n=e.columns??-1;if(c.R.debug("layoutBlocks columns abc95",e.id,"=>",n,e),e.children&&e.children.length>0){const i=e?.children[0]?.size?.width??0,r=e.children.length*i+(e.children.length-1)*s;c.R.debug("widthOfChildren 88",r,"posX");const o=new Map;{let t=0;for(const s of e.children){if(!s.size)continue;const{py:e}=re(n,t),i=o.get(e)??0;s.size.height>i&&o.set(e,s.size.height);let r=s?.widthInColumns??1;n>0&&(r=Math.min(r,n-t%n)),t+=r}}const a=new Map;{let e=0;const t=[...o.keys()].sort((e,t)=>e-t);for(const n of t)a.set(n,e),e+=(o.get(n)??0)+s}let l=0;c.R.debug("abc91 block?.size?.x",e.id,e?.size?.x);let h=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-s,g=0;for(const i of e.children){const r=e;if(!i.size)continue;const{width:u,height:d}=i.size,{px:y,py:p}=re(n,l);if(p!=g&&(g=p,h=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-s,c.R.debug("New row in layout for block",e.id," and child ",i.id,g)),c.R.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${l} (px, py) ${y},${p} (${r?.size?.x},${r?.size?.y}) parent: ${r.id} width: ${u}${s}`),r.size){const e=u/2;i.size.x=h+s+e,c.R.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${h} new startingPosX${i.size.x} ${e} padding=${s} width=${u} halfWidth=${e} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${u*(i?.widthInColumns??1)/2}`),h=i.size.x+e;const t=a.get(p)??0,n=o.get(p)??d;i.size.y=r.size.y-r.size.height/2+t+n/2+s,c.R.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${h}${s}${e}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${u*(i?.widthInColumns??1)/2}`)}i.children&&ce(i,t,s);let b=i?.widthInColumns??1;n>0&&(b=Math.min(b,n-l%n)),l+=b,c.R.debug("abc88 columnsPos",i,l)}}c.R.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function le(e,{minX:t,minY:s,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&"root"!==e.id){const{x:r,y:o,width:a,height:c}=e.size;r-a/2<t&&(t=r-a/2),o-c/2<s&&(s=o-c/2),r+a/2>n&&(n=r+a/2),o+c/2>i&&(i=o+c/2)}if(e.children)for(const r of e.children)({minX:t,minY:s,maxX:n,maxY:i}=le(r,{minX:t,minY:s,maxX:n,maxY:i}));return{minX:t,minY:s,maxX:n,maxY:i}}function he(e){const t=e.getBlock("root");if(!t)return;const s=(0,a.D7)()?.block?.padding??8;ae(t,e,0,0,s),ce(t,e,s),c.R.debug("getBlocks",JSON.stringify(t,null,2));const{minX:n,minY:i,maxX:r,maxY:o}=le(t);return{x:n,y:i,width:r-n,height:o-i}}function ge(e,t,s=!1){const n=e;let i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i+=" flowchart-label";const r=(n?.classes??[]).flatMap(e=>t.getClasses().get(e)?.styles??[]);let c,l=0,h="rect";switch(n.type){case"round":l=5,h="rect";break;case"composite":l=0,h="composite",c=0;break;case"square":case"group":default:h="rect";break;case"diamond":h="question";break;case"hexagon":h="hexagon";break;case"block_arrow":h="block_arrow";break;case"odd":case"rect_left_inv_arrow":h="rect_left_inv_arrow";break;case"lean_right":h="lean_right";break;case"lean_left":h="lean_left";break;case"trapezoid":h="trapezoid";break;case"inv_trapezoid":h="inv_trapezoid";break;case"circle":h="circle";break;case"ellipse":h="ellipse";break;case"stadium":h="stadium";break;case"subroutine":h="subroutine";break;case"cylinder":h="cylinder";break;case"doublecircle":h="doublecircle"}const g=(0,o.sM)(n?.styles??[]),u=n.label,d=n.size??{width:0,height:0,x:0,y:0},y=t.getDiagramId();return{labelStyle:g.labelStyle,shape:h,label:u,labelText:u,rx:l,ry:l,class:i,cssClasses:i,cssStyles:n?.styles??[],cssCompiledStyles:r,style:g.style,id:n.id,domId:y?`${y}-${n.id}`:n.id,isGroup:!1,directions:n.directions,width:d.width||void 0,height:d.height||void 0,wrappingWidth:d.width||Number.POSITIVE_INFINITY,x:d.x,y:d.y,positioned:s,intersect:void 0,padding:c??(0,a.zj)()?.block?.padding??0,widthInColumns:n.widthInColumns??1}}async function ue(e,t,s){const n=ge(t,s,!1);if("group"===t.type)return;const i=(0,a.zj)(),o=await(0,r.on)(e,n,{config:i}),c=o.node()?.getBBox()??{width:0,height:0},l=s.getBlock(n.id);l.size={width:c.width,height:c.height,x:0,y:0,node:o},s.setBlock(l),o.remove()}async function de(e,t,s){const n=ge(t,s,!0);if("space"!==s.getBlock(n.id).type){const s=(0,a.zj)();await(0,r.on)(e,n,{config:s}),t.intersect=n?.intersect,(0,r.U_)(n)}}async function ye(e,t,s,n){for(const i of t)await n(e,i,s),i.children&&await ye(e,i.children,s,n)}async function pe(e,t,s){await ye(e,t,s,ue)}async function be(e,t,s){await ye(e,t,s,de)}async function fe(e,t,s,n,r){const o=new S.T({multigraph:!0,compound:!0});o.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const e of s)e.size&&o.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(const s of t)if(s.start&&s.end){const t=n.getBlock(s.start),a=n.getBlock(s.end);if(t?.size&&a?.size){const n=t.size,c=a.size,l=[{x:n.x,y:n.y},{x:n.x+(c.x-n.x)/2,y:n.y+(c.y-n.y)/2},{x:c.x,y:c.y}],h=r?`${r}-${s.id}`:s.id,g=`${"thick"===s.thickness?"edge-thickness-thick":"edge-thickness-normal"} ${"dotted"===s.pattern?"edge-pattern-dotted":"edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;(0,i.Jo)(e,{...s,id:h,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:g},{},"block",o.node(s.start),o.node(s.end),r),s.label&&(await(0,i.jP)(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:g}),(0,i.T_)({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}}}(0,l.K)(ae,"setBlockSizes"),(0,l.K)(ce,"layoutBlocks"),(0,l.K)(le,"findBounds"),(0,l.K)(he,"layout"),(0,l.K)(ge,"getNodeFromBlock"),(0,l.K)(ue,"calculateBlockSize"),(0,l.K)(de,"insertBlockPositioned"),(0,l.K)(ye,"performOperations"),(0,l.K)(pe,"calculateBlockSizes"),(0,l.K)(be,"insertBlocks"),(0,l.K)(fe,"insertEdges");var xe=(0,l.K)(function(e,t){return t.db.getClasses()},"getClasses"),Se={parser:L,db:se,renderer:{draw:(0,l.K)(async function(e,t,s,n){const{securityLevel:r,block:o}=(0,a.zj)(),l=n.db;let h;l.setDiagramId(t),"sandbox"===r&&(h=(0,x.Ltv)("#i"+t));const g="sandbox"===r?(0,x.Ltv)(h.nodes()[0].contentDocument.body):(0,x.Ltv)("body"),u="sandbox"===r?g.select(`[id="${t}"]`):(0,x.Ltv)(`[id="${t}"]`);(0,i.g0)(u,["point","circle","cross"],n.type,t);const d=l.getBlocks(),y=l.getBlocksFlat(),p=l.getEdges(),b=u.insert("g").attr("class","block");await pe(b,d,l);const f=he(l);await be(b,d,l),await fe(b,p,y,l,t);const S=b.node()?.getBBox(),m=S&&Number.isFinite(S.width)&&Number.isFinite(S.height)?S:f;if(m){const e=Math.max(1,Math.round(m.width/m.height*.125)),t=m.height+e+10,s=m.width+10,{useMaxWidth:n}=o;(0,a.a$)(u,t,s,!!n),c.R.debug("Here Bounds",f,m),u.attr("viewBox",`${m.x-5} ${m.y-5} ${m.width+10} ${m.height+10}`)}},"draw"),getClasses:xe},styles:ie}},64918(e,t,s){s.d(t,{o:()=>n});var n=(0,s(86827).K)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8765],{60096(e,i,t){t.d(i,{QW:()=>z,Ic:()=>b,t$:()=>F,$J:()=>$});var n=t(96540),s=t(47022),l=t(34843),o=t(82893),a=t(52671),r=t(64694),d=t(14284),c=t(34289),m=t(23430),f=t(62042),h=t(99214),p=t(85997),u=t(22022),_=t(74848);function x(e){const[i,t]=(0,l.fp)(o.AG.selectedFileList),[n,a]=(0,l.fp)(o.AG.nowFileList),[c,x]=(0,l.fp)(o.AG.confirm),[g,y]=(0,l.fp)(o.AG.user_base_info),{t:w}=(0,u.Bd)();return(0,_.jsxs)("div",{...e.extraAttr,onClick:()=>{!async function(i){e.click&&e.click(i,e.name)}(e.index)},className:e.mount?"item mount-item":"item",role:"button","data-type":e.isLink?"invalid_link":e.type,"data-dir":!e.type||e.type===s.Iw.folder,"data-mount":e.mount?"true":void 0,"aria-selected":null!==(0,r.kW)(i,e.index),"aria-label":e.name,style:{"--filewidth":e.itemWidth??"33%"},onDragStart:n=>{return s=e.index,void(i.find(e=>e===s)||t([...i,s]));var s},onDrop:t=>((t,l)=>{const o=t.dataTransfer;let a,r=!1;for(let e=0;e<o.items.length;e++)if("file"===o.items[e].kind){r=!0;break}if(r)return;if(g?.user_data?.file_list_pagination_mode===m.yM.pagination){if(a=n.files[l],n.files[l]?.type!==s.Iw.folder)return}else if(a=n.folders[l],n.folders.length<=l)return;(0,h.ib)(n,i).some(e=>e?.name===a?.name)?(0,f.zN)(w("mv_self")):x({open:!0,title:`确定将文件移动并覆盖到${a?.name}吗?`,handle:async()=>{await e.draggable_handle(a?.name)}})})(t,e.index),draggable:void 0!==e.draggable_handle,children:[void 0===e.icon&&(0,_.jsx)("div",{children:e.type!==s.Iw.image||null==e.path||g?.user_data?.not_pre_show_image?(0,_.jsx)(p.In,{icon:""}):(0,_.jsx)("img",{loading:"lazy",src:d.$M.getDownloadUrl(e.path,{mtime:e.mtime,cache:1}),alt:e.name})}),void 0!==e.icon&&(0,_.jsx)("div",{className:"rotating-div",children:(0,_.jsx)("span",{className:"material-icons",children:e.icon})}),(0,_.jsxs)("div",{children:[(0,_.jsxs)("p",{className:"name",children:[(0,_.jsx)("span",{children:e.name}),e.mount_readonly&&(0,_.jsx)("span",{className:"mount-readonly-tag",children:w("只读")})]}),e.size?(0,_.jsx)("p",{children:e.size}):(0,_.jsx)("p",{children:"—"}),(0,_.jsx)("p",{children:e.show_mtime})]}),e.children]})}var g=t(83529),y=t(34251);function w(e){const[i,t]=(0,l.fp)(o.AG.selectedFileList),[n,m]=(0,l.fp)(o.AG.nowFileList),[f,p]=(0,l.fp)(o.AG.confirm),[w,k]=(0,l.fp)(o.AG.file_page),[v,j]=(0,l.fp)(o.AG.enterKey),{click_file:A}=(0,h.kZ)(),G=(0,h._A)(),{t:z}=(0,u.Bd)(),b=(0,a.Zp)();(0,a.zy)();const F=(0,h.A9)(),{clickDouble:$}=(0,h.xI)(),[C,I]=(0,l.fp)(o.AG.showPrompt);return(0,_.jsx)(x,{extraAttr:{onContextMenu:t=>{((t,n,l,o)=>{t.preventDefault(),t.stopPropagation();const a=new y.ik;a.path=(0,r.IO)((0,c.vX)(),n),a.filename=n,a.x=t.clientX,a.y=t.clientY,a.type=l?s.Iw.folder:(0,y.uL)(n),a.size=o,a.useSelectedList=i.includes(e.index),I({show:!0,type:g.PromptEnum.FileMenu,overlay:!1,data:a})})(t,e.name,e.type===s.Iw.folder,e.origin_size)}},draggable_handle:async e=>{const s=(0,h.ib)(n,i).map(e=>(0,h.Ok)(e.name));await d.$M.post("cut",{files:s,to:`${(0,c.GG)("file",(0,c.vX)())}/${e}`});t([]),p({open:!1,handle:null}),b((0,c.vX)())},name:e.name,index:e.index,mtime:e.mtime,size:e.size,type:e.type,isLink:e.isLink,path:e.path,icon:e.icon,show_mtime:e.show_mtime,mount:e.mount,mount_driver:e.mount_driver,mount_color:e.mount_color,mount_readonly:e.mount_readonly,click:(n,l)=>{if($(n,async()=>{if(e.type===s.Iw.folder)F(l);else{await A({name:l,size:e.origin_size,opt_shell:!0,mtime:e.mtime,close:()=>G(null)})&&G({name:l,mode:(0,h.Pc)(e.type)})}}))return;if(null!==(0,r.kW)(i,n))t((0,r.P1)(i,n));else if("ctrl"===v)t([...i,n]);else if("shift"===v){const{max:e,min:s}=(0,r.a7)(i),l=[];if(n>=e)for(let i=e;i<=n;i++)l.push(i);else for(let e=s;e>=n;e--)l.push(e);t(l)}else t([n])},itemWidth:e.itemWidth})}var k=t(78247),v=(t(38240),t(64405)),j=t(88815);function A(e){const[i,t]=(0,l.fp)(o.AG.selectedFileList),[n,m]=(0,l.fp)(o.AG.editorSetting),[p,g]=(0,l.fp)(o.AG.shellNowDir),[y,w]=(0,l.fp)(o.AG.sshInfo),[A,G]=(0,l.fp)(o.AG.nowFileList),[z,b]=(0,l.fp)(o.AG.enterKey),[F,$]=(0,l.fp)(o.AG.confirm),C=(0,a.Zp)(),{t:I}=(0,u.Bd)(),{clickDouble:W}=(0,h.xI)();return(0,_.jsx)(x,{draggable_handle:async n=>{const s=new v.x;Object.assign(s,y),s.target=(0,r.HS)(...p,n);const l=(0,h.ib)(A,i).map(e=>(0,r.HS)(...p,e.name));for(const e of l)if(s.source=e,!await d.Fg.post("move",s))return!1;t([]),$({open:!1,handle:null}),await e.fileHandler()},name:e.name,index:e.index,mtime:e.mtime,size:e.size,type:e.type,itemWidth:e.itemWidth,show_mtime:e.show_mtime,click:(n,l)=>{if(W(n,()=>{if(e.type===s.Iw.folder){const e=new v.x;return e.key=y.key,e.dir=`/${(0,c.GG)("remoteShell",(0,c.vX)())}${l}`,C((0,r.IO)((0,c.vX)(),l)),t([]),void G({files:[],folders:[]})}const i=async()=>{const i=new v.x;i.key=y.key,i.file=`/${(0,c.GG)("remoteShell",(0,c.vX)())}${l}`;const t=await d.Fg.post("get/file/text",i);let n;l.endsWith(s.Iw.workflow_act)?n="ace/mode/yaml":(l.endsWith(s.Iw.draw)||l.endsWith(s.Iw.excalidraw))&&(n="ace/mode/json"),m({model:n,open:!0,fileName:e.name,save:async e=>{i.context=e;0===(await d.Fg.post("update/file/text",i)).code&&(k.xK.set_value_temp(""),(0,f.SK)("success"))}}),k.xK.set_value_temp(t.data)};"number"==typeof e.origin_size&&e.origin_size>j.o5?$({open:!0,title:I("提示"),sub_title:"文件超过20MB了确定要打开吗?",handle:async()=>{$({open:!1,handle:null}),await i()}}):i()}))return;if(null!==(0,r.kW)(i,n))t((0,r.P1)(i,n));else if("ctrl"===z)t([...i,n]);else if("shift"===z){const{max:e,min:s}=(0,r.a7)(i),l=[];if(n>=e)for(let i=e;i<=n;i++)l.push(i);else for(let e=s;e>=n;e--)l.push(e);t(l)}else t([n])}})}function G(e){const[i,t]=(0,l.fp)(o.AG.selectedFileList),[n,a]=(0,l.fp)(o.AG.enterKey),{click_file:c}=(0,h.kZ)(),[m,f]=(0,l.fp)(o.AG.nowFileList),{t:p}=(0,u.Bd)(),[w,k]=(0,l.fp)(o.AG.showPrompt),v=((0,h.oT)(),(0,h.xp)()),{clickDouble:j}=(0,h.xI)();return(0,_.jsx)(x,{extraAttr:{onContextMenu:i=>{((i,t,n,l)=>{i.preventDefault(),i.stopPropagation();const o=new y.ik,a=e.item_list;for(const e of a)if(e.name===t){o.path=e.path;break}o.is_share=!0,o.filename=t,o.x=i.clientX,o.y=i.clientY,o.type=n?s.Iw.folder:(0,y.uL)(t),o.size=l,o.share_token=e.share.share_token,o.share_id=e.share.share_id,k({show:!0,type:g.PromptEnum.FileMenu,overlay:!1,data:o})})(i,e.name,e.type===s.Iw.folder,e.origin_size)}},name:e.name,index:e.index,mtime:e.mtime,size:e.size,type:e.type,itemWidth:e.itemWidth,show_mtime:e.show_mtime,click:(l,o)=>{if(j(l,()=>{e.type!==s.Iw.folder&&(v(o)||c({file_path:e.item_list[l].path,file_url:d.$M.getDownloadUrlV2(e.item_list[l].path,"share_download",{share_id:e.share.share_id,share_token:e.share.share_token}),name:o,size:e.origin_size,opt_shell:!0,mtime:e.mtime,not_type_tip:p("未知类型,请下载查看")}))}))return;if(null!==(0,r.kW)(i,l))t((0,r.P1)(i,l));else if("ctrl"===n)t([...i,l]);else if("shift"===n){const{max:e,min:n}=(0,r.a7)(i),s=[];if(l>=e)for(let i=e;i<=l;i++)s.push(i);else for(let e=n;e>=l;e--)s.push(e);t(s)}else t([l])}})}function z({handleContextMenu:e,file_list:i,clickBlank:t,share:s}){const[a,r]=(0,l.fp)(o.AG.user_base_info),d=(0,n.useRef)(null),{t:c}=(0,u.Bd)(),m=(0,h.OJ)(),{file_is_running:f}=(0,k.hg)();return(0,h.UK)(i,[],d),(0,_.jsx)("div",{onContextMenu:e,id:"listing",style:{paddingBottom:"10rem"},className:`mosaic file-icons ${a?.user_data?.file_list_show_type??""}`,ref:d,children:(0,_.jsx)("div",{onClick:t,children:i.map((e,t)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(G,{share:s,item_list:i,icon:f(e.name)?"refresh":void 0,itemWidth:m,index:t+0,...e})},t+0))})})}function b({handleContextMenu:e,file_list:i,folder_list:t,clickBlank:s,fileHandler:a}){const[r,d]=(0,l.fp)(o.AG.user_base_info),c=(0,n.useRef)(null),{t:m}=(0,u.Bd)(),f=(0,h.OJ)(),{file_is_running:p}=(0,k.hg)(),[x,y]=(0,l.fp)(o.AG.fileShellShow),w=(0,n.useMemo)(()=>t?.length??0,[t]);return(0,h.ei)(c,g.PromptEnum.SshUpload),(0,h.UK)(i,t,c),(0,n.useEffect)(()=>()=>{x.show&&y({show:!1,path:""})},[]),(0,_.jsxs)("div",{onContextMenu:e,id:"listing",style:{paddingBottom:"10rem"},className:`mosaic file-icons ${r?.user_data?.file_list_show_type??""}`,ref:c,children:[t&&t.length>0&&(0,_.jsx)("h2",{children:m("文件夹")}),t&&(0,_.jsx)("div",{onClick:s,children:t.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(A,{fileHandler:a,itemWidth:f,index:i,...e})},i))}),i&&i.length>0&&(0,_.jsx)("h2",{onClick:s,children:m("文件")}),i&&(0,_.jsx)("div",{onClick:s,children:i.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(A,{fileHandler:a,icon:p(e.name)?"refresh":void 0,itemWidth:f,index:i+w,...e})},i+w))})]})}function F({handleContextMenu:e,file_list:i,folder_list:t,clickBlank:s}){const[a,r]=(0,l.fp)(o.AG.user_base_info),d=(0,n.useRef)(null),{t:c}=(0,u.Bd)(),[m]=(0,l.fp)(o.AG.zoom_style_by_percent),f=(0,h.OJ)(),{file_is_running:p}=(0,k.hg)(),[x,y]=(0,l.fp)(o.AG.fileShellShow),v=(0,n.useMemo)(()=>t?.length??0,[t]),j=(0,h.pi)(m);return(0,h.ei)(d,g.PromptEnum.FilesUpload),(0,h.UK)(i,t,d),(0,n.useEffect)(()=>()=>{x.show&&y({show:!1,path:""})},[]),(0,_.jsxs)("div",{onContextMenu:e,id:"listing",style:{paddingBottom:"10rem",fontSize:j.fontSize},className:`mosaic file-icons ${a?.user_data?.file_list_show_type??""}`,ref:d,children:[t&&t.length>0&&(0,_.jsx)("h2",{children:c("文件夹")}),t&&(0,_.jsx)("div",{onClick:s,children:t.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(w,{itemWidth:f,index:i,...e})},i))}),i&&i.length>0&&(0,_.jsx)("h2",{onClick:s,children:c("文件")}),i&&(0,_.jsx)("div",{onClick:s,children:i.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(w,{icon:p(e.name)?"refresh":void 0,itemWidth:f,index:i+v,...e})},i+v))})]})}function $({handleContextMenu:e,list:i,clickBlank:t}){const[s,a]=(0,l.fp)(o.AG.user_base_info),r=(0,n.useRef)(null),{t:d}=(0,u.Bd)(),[c]=(0,l.fp)(o.AG.zoom_style_by_percent),m=(0,h.OJ)(),{file_is_running:f}=(0,k.hg)(),[p,x]=(0,l.fp)(o.AG.fileShellShow),[y,v]=(0,l.fp)(o.AG.enterKey),[j,A]=(0,l.fp)(o.AG.selectedFileList),[G,z]=(0,l.fp)(o.AG.file_page),b=(0,h.pi)(c);return(0,h.UK)(i,[],r),(0,h.ei)(r,g.PromptEnum.FilesUpload),(0,h.SQ)(r,()=>{z(e=>e.page_num<0?e:{page_size:e.page_size,page_num:e.page_num+1})},()=>{}),(0,n.useEffect)(()=>()=>{p.show&&x({show:!1,path:""})},[]),(0,_.jsx)("div",{onContextMenu:e,id:"listing",style:{paddingBottom:"10rem",fontSize:b.fontSize},className:`mosaic file-icons ${s?.user_data?.file_list_show_type??""}`,ref:r,children:i&&(0,_.jsx)("div",{onClick:t,children:i.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(w,{icon:f(e.name)?"refresh":void 0,itemWidth:m,index:i,...e})},i))})})}},6960(e,i,t){t.d(i,{s:()=>o});var n=t(72635);const s=1440,l=525600;function o(e){e=e>1e12?e:1e3*e;const i=Date.now(),t=Math.abs(i-e)/6e4;return t<1?n.Ay.t("小于一分钟"):t<60?`${t.toFixed(0)} ${n.Ay.t("分钟前")}`:t<s?`${(t/60).toFixed(0)} ${n.Ay.t("小时前")}`:t<43200?`${(t/s).toFixed(0)} ${n.Ay.t("天前")}`:t<l?`${(t/43200).toFixed(0)} ${n.Ay.t("月前")}`:`${(t/l).toFixed(0)} ${n.Ay.t("年前")}`}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8765],{60096(e,i,t){t.d(i,{QW:()=>z,Ic:()=>b,t$:()=>F,$J:()=>$});var n=t(96540),s=t(47022),l=t(34843),o=t(82893),a=t(61973),r=t(64694),d=t(14284),c=t(34289),m=t(23430),f=t(62042),h=t(99214),p=t(85997),u=t(22022),_=t(74848);function x(e){const[i,t]=(0,l.fp)(o.AG.selectedFileList),[n,a]=(0,l.fp)(o.AG.nowFileList),[c,x]=(0,l.fp)(o.AG.confirm),[g,y]=(0,l.fp)(o.AG.user_base_info),{t:w}=(0,u.Bd)();return(0,_.jsxs)("div",{...e.extraAttr,onClick:()=>{!async function(i){e.click&&e.click(i,e.name)}(e.index)},className:e.mount?"item mount-item":"item",role:"button","data-type":e.isLink?"invalid_link":e.type,"data-dir":!e.type||e.type===s.Iw.folder,"data-mount":e.mount?"true":void 0,"aria-selected":null!==(0,r.kW)(i,e.index),"aria-label":e.name,style:{"--filewidth":e.itemWidth??"33%"},onDragStart:n=>{return s=e.index,void(i.find(e=>e===s)||t([...i,s]));var s},onDrop:t=>((t,l)=>{const o=t.dataTransfer;let a,r=!1;for(let e=0;e<o.items.length;e++)if("file"===o.items[e].kind){r=!0;break}if(r)return;if(g?.user_data?.file_list_pagination_mode===m.yM.pagination){if(a=n.files[l],n.files[l]?.type!==s.Iw.folder)return}else if(a=n.folders[l],n.folders.length<=l)return;(0,h.ib)(n,i).some(e=>e?.name===a?.name)?(0,f.zN)(w("mv_self")):x({open:!0,title:`确定将文件移动并覆盖到${a?.name}吗?`,handle:async()=>{await e.draggable_handle(a?.name)}})})(t,e.index),draggable:void 0!==e.draggable_handle,children:[void 0===e.icon&&(0,_.jsx)("div",{children:e.type!==s.Iw.image||null==e.path||g?.user_data?.not_pre_show_image?(0,_.jsx)(p.In,{icon:""}):(0,_.jsx)("img",{loading:"lazy",src:d.$M.getDownloadUrl(e.path,{mtime:e.mtime,cache:1}),alt:e.name})}),void 0!==e.icon&&(0,_.jsx)("div",{className:"rotating-div",children:(0,_.jsx)("span",{className:"material-icons",children:e.icon})}),(0,_.jsxs)("div",{children:[(0,_.jsxs)("p",{className:"name",children:[(0,_.jsx)("span",{children:e.name}),e.mount_readonly&&(0,_.jsx)("span",{className:"mount-readonly-tag",children:w("只读")})]}),e.size?(0,_.jsx)("p",{children:e.size}):(0,_.jsx)("p",{children:"—"}),(0,_.jsx)("p",{children:e.show_mtime})]}),e.children]})}var g=t(89824),y=t(34251);function w(e){const[i,t]=(0,l.fp)(o.AG.selectedFileList),[n,m]=(0,l.fp)(o.AG.nowFileList),[f,p]=(0,l.fp)(o.AG.confirm),[w,k]=(0,l.fp)(o.AG.file_page),[v,j]=(0,l.fp)(o.AG.enterKey),{click_file:A}=(0,h.kZ)(),G=(0,h._A)(),{t:z}=(0,u.Bd)(),b=(0,a.Zp)();(0,a.zy)();const F=(0,h.A9)(),{clickDouble:$}=(0,h.xI)(),[C,I]=(0,l.fp)(o.AG.showPrompt);return(0,_.jsx)(x,{extraAttr:{onContextMenu:t=>{((t,n,l,o)=>{t.preventDefault(),t.stopPropagation();const a=new y.ik;a.path=(0,r.IO)((0,c.vX)(),n),a.filename=n,a.x=t.clientX,a.y=t.clientY,a.type=l?s.Iw.folder:(0,y.uL)(n),a.size=o,a.useSelectedList=i.includes(e.index),I({show:!0,type:g.PromptEnum.FileMenu,overlay:!1,data:a})})(t,e.name,e.type===s.Iw.folder,e.origin_size)}},draggable_handle:async e=>{const s=(0,h.ib)(n,i).map(e=>(0,h.Ok)(e.name));await d.$M.post("cut",{files:s,to:`${(0,c.GG)("file",(0,c.vX)())}/${e}`});t([]),p({open:!1,handle:null}),b((0,c.vX)())},name:e.name,index:e.index,mtime:e.mtime,size:e.size,type:e.type,isLink:e.isLink,path:e.path,icon:e.icon,show_mtime:e.show_mtime,mount:e.mount,mount_driver:e.mount_driver,mount_color:e.mount_color,mount_readonly:e.mount_readonly,click:(n,l)=>{if($(n,async()=>{if(e.type===s.Iw.folder)F(l);else{await A({name:l,size:e.origin_size,opt_shell:!0,mtime:e.mtime,close:()=>G(null)})&&G({name:l,mode:(0,h.Pc)(e.type)})}}))return;if(null!==(0,r.kW)(i,n))t((0,r.P1)(i,n));else if("ctrl"===v)t([...i,n]);else if("shift"===v){const{max:e,min:s}=(0,r.a7)(i),l=[];if(n>=e)for(let i=e;i<=n;i++)l.push(i);else for(let e=s;e>=n;e--)l.push(e);t(l)}else t([n])},itemWidth:e.itemWidth})}var k=t(78247),v=(t(38240),t(64405)),j=t(88815);function A(e){const[i,t]=(0,l.fp)(o.AG.selectedFileList),[n,m]=(0,l.fp)(o.AG.editorSetting),[p,g]=(0,l.fp)(o.AG.shellNowDir),[y,w]=(0,l.fp)(o.AG.sshInfo),[A,G]=(0,l.fp)(o.AG.nowFileList),[z,b]=(0,l.fp)(o.AG.enterKey),[F,$]=(0,l.fp)(o.AG.confirm),C=(0,a.Zp)(),{t:I}=(0,u.Bd)(),{clickDouble:W}=(0,h.xI)();return(0,_.jsx)(x,{draggable_handle:async n=>{const s=new v.x;Object.assign(s,y),s.target=(0,r.HS)(...p,n);const l=(0,h.ib)(A,i).map(e=>(0,r.HS)(...p,e.name));for(const e of l)if(s.source=e,!await d.Fg.post("move",s))return!1;t([]),$({open:!1,handle:null}),await e.fileHandler()},name:e.name,index:e.index,mtime:e.mtime,size:e.size,type:e.type,itemWidth:e.itemWidth,show_mtime:e.show_mtime,click:(n,l)=>{if(W(n,()=>{if(e.type===s.Iw.folder){const e=new v.x;return e.key=y.key,e.dir=`/${(0,c.GG)("remoteShell",(0,c.vX)())}${l}`,C((0,r.IO)((0,c.vX)(),l)),t([]),void G({files:[],folders:[]})}const i=async()=>{const i=new v.x;i.key=y.key,i.file=`/${(0,c.GG)("remoteShell",(0,c.vX)())}${l}`;const t=await d.Fg.post("get/file/text",i);let n;l.endsWith(s.Iw.workflow_act)?n="ace/mode/yaml":(l.endsWith(s.Iw.draw)||l.endsWith(s.Iw.excalidraw))&&(n="ace/mode/json"),m({model:n,open:!0,fileName:e.name,save:async e=>{i.context=e;0===(await d.Fg.post("update/file/text",i)).code&&(k.xK.set_value_temp(""),(0,f.SK)("success"))}}),k.xK.set_value_temp(t.data)};"number"==typeof e.origin_size&&e.origin_size>j.o5?$({open:!0,title:I("提示"),sub_title:"文件超过20MB了确定要打开吗?",handle:async()=>{$({open:!1,handle:null}),await i()}}):i()}))return;if(null!==(0,r.kW)(i,n))t((0,r.P1)(i,n));else if("ctrl"===z)t([...i,n]);else if("shift"===z){const{max:e,min:s}=(0,r.a7)(i),l=[];if(n>=e)for(let i=e;i<=n;i++)l.push(i);else for(let e=s;e>=n;e--)l.push(e);t(l)}else t([n])}})}function G(e){const[i,t]=(0,l.fp)(o.AG.selectedFileList),[n,a]=(0,l.fp)(o.AG.enterKey),{click_file:c}=(0,h.kZ)(),[m,f]=(0,l.fp)(o.AG.nowFileList),{t:p}=(0,u.Bd)(),[w,k]=(0,l.fp)(o.AG.showPrompt),v=((0,h.oT)(),(0,h.xp)()),{clickDouble:j}=(0,h.xI)();return(0,_.jsx)(x,{extraAttr:{onContextMenu:i=>{((i,t,n,l)=>{i.preventDefault(),i.stopPropagation();const o=new y.ik,a=e.item_list;for(const e of a)if(e.name===t){o.path=e.path;break}o.is_share=!0,o.filename=t,o.x=i.clientX,o.y=i.clientY,o.type=n?s.Iw.folder:(0,y.uL)(t),o.size=l,o.share_token=e.share.share_token,o.share_id=e.share.share_id,k({show:!0,type:g.PromptEnum.FileMenu,overlay:!1,data:o})})(i,e.name,e.type===s.Iw.folder,e.origin_size)}},name:e.name,index:e.index,mtime:e.mtime,size:e.size,type:e.type,itemWidth:e.itemWidth,show_mtime:e.show_mtime,click:(l,o)=>{if(j(l,()=>{e.type!==s.Iw.folder&&(v(o)||c({file_path:e.item_list[l].path,file_url:d.$M.getDownloadUrlV2(e.item_list[l].path,"share_download",{share_id:e.share.share_id,share_token:e.share.share_token}),name:o,size:e.origin_size,opt_shell:!0,mtime:e.mtime,not_type_tip:p("未知类型,请下载查看")}))}))return;if(null!==(0,r.kW)(i,l))t((0,r.P1)(i,l));else if("ctrl"===n)t([...i,l]);else if("shift"===n){const{max:e,min:n}=(0,r.a7)(i),s=[];if(l>=e)for(let i=e;i<=l;i++)s.push(i);else for(let e=n;e>=l;e--)s.push(e);t(s)}else t([l])}})}function z({handleContextMenu:e,file_list:i,clickBlank:t,share:s}){const[a,r]=(0,l.fp)(o.AG.user_base_info),d=(0,n.useRef)(null),{t:c}=(0,u.Bd)(),m=(0,h.OJ)(),{file_is_running:f}=(0,k.hg)();return(0,h.UK)(i,[],d),(0,_.jsx)("div",{onContextMenu:e,id:"listing",style:{paddingBottom:"10rem"},className:`mosaic file-icons ${a?.user_data?.file_list_show_type??""}`,ref:d,children:(0,_.jsx)("div",{onClick:t,children:i.map((e,t)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(G,{share:s,item_list:i,icon:f(e.name)?"refresh":void 0,itemWidth:m,index:t+0,...e})},t+0))})})}function b({handleContextMenu:e,file_list:i,folder_list:t,clickBlank:s,fileHandler:a}){const[r,d]=(0,l.fp)(o.AG.user_base_info),c=(0,n.useRef)(null),{t:m}=(0,u.Bd)(),f=(0,h.OJ)(),{file_is_running:p}=(0,k.hg)(),[x,y]=(0,l.fp)(o.AG.fileShellShow),w=(0,n.useMemo)(()=>t?.length??0,[t]);return(0,h.ei)(c,g.PromptEnum.SshUpload),(0,h.UK)(i,t,c),(0,n.useEffect)(()=>()=>{x.show&&y({show:!1,path:""})},[]),(0,_.jsxs)("div",{onContextMenu:e,id:"listing",style:{paddingBottom:"10rem"},className:`mosaic file-icons ${r?.user_data?.file_list_show_type??""}`,ref:c,children:[t&&t.length>0&&(0,_.jsx)("h2",{children:m("文件夹")}),t&&(0,_.jsx)("div",{onClick:s,children:t.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(A,{fileHandler:a,itemWidth:f,index:i,...e})},i))}),i&&i.length>0&&(0,_.jsx)("h2",{onClick:s,children:m("文件")}),i&&(0,_.jsx)("div",{onClick:s,children:i.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(A,{fileHandler:a,icon:p(e.name)?"refresh":void 0,itemWidth:f,index:i+w,...e})},i+w))})]})}function F({handleContextMenu:e,file_list:i,folder_list:t,clickBlank:s}){const[a,r]=(0,l.fp)(o.AG.user_base_info),d=(0,n.useRef)(null),{t:c}=(0,u.Bd)(),[m]=(0,l.fp)(o.AG.zoom_style_by_percent),f=(0,h.OJ)(),{file_is_running:p}=(0,k.hg)(),[x,y]=(0,l.fp)(o.AG.fileShellShow),v=(0,n.useMemo)(()=>t?.length??0,[t]),j=(0,h.pi)(m);return(0,h.ei)(d,g.PromptEnum.FilesUpload),(0,h.UK)(i,t,d),(0,n.useEffect)(()=>()=>{x.show&&y({show:!1,path:""})},[]),(0,_.jsxs)("div",{onContextMenu:e,id:"listing",style:{paddingBottom:"10rem",fontSize:j.fontSize},className:`mosaic file-icons ${a?.user_data?.file_list_show_type??""}`,ref:d,children:[t&&t.length>0&&(0,_.jsx)("h2",{children:c("文件夹")}),t&&(0,_.jsx)("div",{onClick:s,children:t.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(w,{itemWidth:f,index:i,...e})},i))}),i&&i.length>0&&(0,_.jsx)("h2",{onClick:s,children:c("文件")}),i&&(0,_.jsx)("div",{onClick:s,children:i.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(w,{icon:p(e.name)?"refresh":void 0,itemWidth:f,index:i+v,...e})},i+v))})]})}function $({handleContextMenu:e,list:i,clickBlank:t}){const[s,a]=(0,l.fp)(o.AG.user_base_info),r=(0,n.useRef)(null),{t:d}=(0,u.Bd)(),[c]=(0,l.fp)(o.AG.zoom_style_by_percent),m=(0,h.OJ)(),{file_is_running:f}=(0,k.hg)(),[p,x]=(0,l.fp)(o.AG.fileShellShow),[y,v]=(0,l.fp)(o.AG.enterKey),[j,A]=(0,l.fp)(o.AG.selectedFileList),[G,z]=(0,l.fp)(o.AG.file_page),b=(0,h.pi)(c);return(0,h.UK)(i,[],r),(0,h.ei)(r,g.PromptEnum.FilesUpload),(0,h.SQ)(r,()=>{z(e=>e.page_num<0?e:{page_size:e.page_size,page_num:e.page_num+1})},()=>{}),(0,n.useEffect)(()=>()=>{p.show&&x({show:!1,path:""})},[]),(0,_.jsx)("div",{onContextMenu:e,id:"listing",style:{paddingBottom:"10rem",fontSize:b.fontSize},className:`mosaic file-icons ${s?.user_data?.file_list_show_type??""}`,ref:r,children:i&&(0,_.jsx)("div",{onClick:t,children:i.map((e,i)=>(0,_.jsx)(n.Fragment,{children:(0,_.jsx)(w,{icon:f(e.name)?"refresh":void 0,itemWidth:m,index:i,...e})},i))})})}},6960(e,i,t){t.d(i,{s:()=>o});var n=t(72635);const s=1440,l=525600;function o(e){e=e>1e12?e:1e3*e;const i=Date.now(),t=Math.abs(i-e)/6e4;return t<1?n.Ay.t("小于一分钟"):t<60?`${t.toFixed(0)} ${n.Ay.t("分钟前")}`:t<s?`${(t/60).toFixed(0)} ${n.Ay.t("小时前")}`:t<43200?`${(t/s).toFixed(0)} ${n.Ay.t("天前")}`:t<l?`${(t/43200).toFixed(0)} ${n.Ay.t("月前")}`:`${(t/l).toFixed(0)} ${n.Ay.t("年前")}`}}}]);
|