filecat 7.7.4 → 7.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dist/1045.0e4bdc838c37771a7f50.js +1 -0
- package/build/dist/1075.40103ec059c6b23b056e.js +1 -0
- package/build/dist/1128.b80776fbdbdda36034c3.js +1 -0
- package/build/dist/1388.1dcf844b452e3aae3dc0.js +1 -0
- package/build/dist/1417.7e511043474084a2a65b.js +1 -0
- package/build/dist/1671.fb137d27b5763953487e.js +1 -0
- package/build/dist/{6887.93191dae462af3692775.js → 1738.b8ab2bd79df131e60051.js} +1 -1
- package/build/dist/1802.e43e833638f6ba8e22d7.js +1 -0
- package/build/dist/1964.bd3d684b50aa5191b413.js +1 -0
- package/build/dist/200.bb7f6ce5543bd7ff6d97.js +1 -0
- package/build/dist/2105.e4ba1c1d506b3fe14e8e.js +1 -0
- package/build/dist/2122.bc10dcdbbfc38e0ef883.js +1 -0
- package/build/dist/{3457.18b45379d8bcf7f5f3b5.js → 2180.df641ebaead77c4ada71.js} +1 -1
- package/build/dist/2300.9e1baa1c0368abe53d96.js +2 -0
- package/build/dist/2479.dcc88b3370f0f1d66e02.js +1 -0
- package/build/dist/2572.8fdddfebb4da2f29dbd8.js +1 -0
- package/build/dist/2674.7fd28dae86ccdb247851.js +1 -0
- package/build/dist/{1001.44a1a25c7d6d3f294bf3.js → 2822.9417e764a14f8f5f57dc.js} +1 -1
- package/build/dist/2994.c492be0d907fa468a9be.js +1 -0
- package/build/dist/{3140.b078ec311f99170b7f4c.js → 3140.794a212da633caf38b3a.js} +2 -2
- package/build/dist/3230.7798ab546facfa058b34.js +1 -0
- package/build/dist/3283.9386fc7f67aef46604fb.js +1 -0
- package/build/dist/{3299.9bd4cf5d1679479639a8.js → 3299.f37767d30b6999df4014.js} +1 -1
- package/build/dist/3300.b8a3bc571293a6280ed8.js +1 -0
- package/build/dist/{3402.d412940350051a52d7ac.js → 3402.b6dc28d2f9bace7cde85.js} +1 -1
- package/build/dist/3509.cbcb309fbf49db53229f.js +1 -0
- package/build/dist/{3727.b8d9cbae9de47bf8d49b.js → 3510.b975b8bfdee5e8518215.js} +1 -1
- package/build/dist/{587.c75ed69a8373139346f9.js → 3566.ba323afadcf41fad2fa7.js} +1 -1
- package/build/dist/3608.aff9429024b740ac5cd0.js +1 -0
- package/build/dist/3990.5e16453f57b90b01d539.js +1 -0
- package/build/dist/4004.5d68418ad5c2321cb11f.js +1 -0
- package/build/dist/4061.c0eb5824eeb6a59fa827.js +1 -0
- package/build/dist/4220.b65b40382726a69ba0bc.js +1 -0
- package/build/dist/{3883.70d42c3a335d6833f07e.js → 4376.b022a792fb34fbe50398.js} +1 -1
- package/build/dist/4469.536491f90535e831ce3e.js +1 -0
- package/build/dist/453.8877eb10f13258c290bc.js +1 -0
- package/build/dist/4560.8ef2e4b60cc86d019dd6.js +1 -0
- package/build/dist/4735.838cd0f656bbf7d99ff6.js +1 -0
- package/build/dist/4772.9b95c402a4def0f576e3.js +1 -0
- package/build/dist/{4903.407cafe944a297471f5a.js → 4903.b5451ed0802b3f7c07b2.js} +1 -1
- package/build/dist/4985.44cb7d829ca477e368b8.js +1 -0
- package/build/dist/5516.645e4a900df9bdc1806c.js +1 -0
- package/build/dist/5526.6b4867751becda056ed8.js +1 -0
- package/build/dist/5617.8efc3b1d218f80df9b39.js +1 -0
- package/build/dist/5744.e9f1efb88a617b05b709.js +1 -0
- package/build/dist/583.cef46d6b21c6fa6454cf.js +1 -0
- package/build/dist/6010.5400c344149450c83284.js +1 -0
- package/build/dist/6089.6d5d19a327284ff3b11c.js +1 -0
- package/build/dist/6164.7dae9989dd129479f952.js +1 -0
- package/build/dist/6284.10deb80685728f50aa45.js +1 -0
- package/build/dist/629.b75b024aacc43e0d69cf.js +1 -0
- package/build/dist/6344.291e5dadc74e62739774.js +1 -0
- package/build/dist/6492.3ee4060598de873d8e8f.js +1 -0
- package/build/dist/6571.b381c44055704e3ba649.js +1 -0
- package/build/dist/6731.6763296ce5ae210bc0fe.js +1 -0
- package/build/dist/6759.f88b50c41207cb8345d1.js +1 -0
- package/build/dist/{4951.88718d978aea2dd40006.js → 6789.34921a30c8a81f0a6407.js} +1 -1
- package/build/dist/6800.ee99fd0a88b6acbaaf2c.js +1 -0
- package/build/dist/6803.fe4297b1e51c3bfc7f50.js +1 -0
- package/build/dist/{313.d51fc773856f078487ad.js → 6806.9ebf089eba60f3b8e946.js} +1 -1
- package/build/dist/7038.4e4fc8e405c56d3080e2.js +1 -0
- package/build/dist/7310.bf944d03f24fcf109680.js +1 -0
- package/build/dist/{359.1b95bd6368196ccaa731.js → 7430.25bf8437ad8f7c1fd36f.js} +1 -1
- package/build/dist/7483.5e26ada69b33418c31a8.js +1 -0
- package/build/dist/{4087.4796ff56340985c35542.js → 7486.fe0b5f867c08b40a3360.js} +1 -1
- package/build/dist/7567.09e1b34ad9bd3e463eb4.js +1 -0
- package/build/dist/7834.7a593dcb80ca09f58586.js +1 -0
- package/build/dist/784.48a3b71205680f427109.js +1 -0
- package/build/dist/7943.19d2de387eeb7f513d8e.js +1 -0
- package/build/dist/8014.28b5cf8c3787dc829aa4.js +1 -0
- package/build/dist/8079.f6f2be43e5d933ae1f6f.js +1 -0
- package/build/dist/{8302.c1c381630b4ec76bf8ab.js → 8302.5ae5bfe8baa0084204bb.js} +1 -1
- package/build/dist/8677.860320b7f36947e57d11.js +1 -0
- package/build/dist/8727.3628c746061aed7a4077.js +1 -0
- package/build/dist/8781.58f0c51870d3dd2689d7.js +1 -0
- package/build/dist/9299.6c06dad1abe098b61766.js +1 -0
- package/build/dist/9324.ef229da9b943484298ba.js +1 -0
- package/build/dist/9364.d2570d78afc50fe1b23e.js +1 -0
- package/build/dist/9463.2629a7daf4c2865b9b96.js +1 -0
- package/build/dist/index.html +1 -1
- package/build/dist/main.3a12152528aff6ae213a.js +2 -0
- package/build/main.js +1 -1
- package/package.json +4 -5
- package/build/dist/1075.3ef2e1902e9f7e9e37b1.js +0 -1
- package/build/dist/1312.199a506fb836a2412255.js +0 -1
- package/build/dist/136.e3bb3c50051edb17454d.js +0 -1
- package/build/dist/1478.c58a43bb24820a13eaed.js +0 -1
- package/build/dist/1491.901cce0168c42ad319fa.js +0 -1
- package/build/dist/1566.4f405afd26063b55129c.js +0 -1
- package/build/dist/161.98f6c2a50bf3824a6efb.js +0 -1
- package/build/dist/1654.a21a099e2749ef167ea9.js +0 -1
- package/build/dist/1875.46dd3a6cc071d45a32f1.js +0 -1
- package/build/dist/1883.14c90bbe93fe206906f0.js +0 -1
- package/build/dist/1924.c7bd2a2aa0e9bc78c9ba.js +0 -1
- package/build/dist/2000.f55ddba9e6313243f028.js +0 -1
- package/build/dist/2101.d4efa6a2c1e9169d9225.js +0 -1
- package/build/dist/2180.60fe32ab12c2fa1570a4.js +0 -1
- package/build/dist/2191.4c4f2fd5127168a81877.js +0 -1
- package/build/dist/2213.ceffb8fd7be66b35d079.js +0 -1
- package/build/dist/2463.6e530d1e9b5c58dba166.js +0 -1
- package/build/dist/2623.8b1e5e391dd4e05fc119.js +0 -1
- package/build/dist/2674.3713c09449bdd57b1066.js +0 -1
- package/build/dist/2894.8395ec5e280cc6b6c4dc.js +0 -1
- package/build/dist/3042.f490cfa4208208262398.js +0 -1
- package/build/dist/3096.d0b2c77a23418c545c01.js +0 -1
- package/build/dist/311.da79ace98b69a635c41c.js +0 -1
- package/build/dist/3166.088cf4a0356c3a6e30a0.js +0 -1
- package/build/dist/3357.4f1bf81ecc3c11a3f813.js +0 -1
- package/build/dist/3475.d10d21b637761d7d886d.js +0 -1
- package/build/dist/3708.04401b24d95214d641e5.js +0 -1
- package/build/dist/3752.01fc1f14b29f340e41fd.js +0 -1
- package/build/dist/3871.7a387a9dc21883d08423.js +0 -1
- package/build/dist/3994.19fb81947d65fc81b0a2.js +0 -1
- package/build/dist/4012.b516fdc981e55be2ebb2.js +0 -1
- package/build/dist/4122.9ea6b5dd8dc9d2265825.js +0 -1
- package/build/dist/4141.06960673a6a484e7b88d.js +0 -1
- package/build/dist/4190.ff72264b4f07f6542d33.js +0 -1
- package/build/dist/4239.1b49d7c26192fb637d57.js +0 -1
- package/build/dist/4288.8dc8f5d962720e084952.js +0 -1
- package/build/dist/434.04cdc2a05316f92d1d38.js +0 -1
- package/build/dist/4376.f3c60897f70dd4e33d2f.js +0 -1
- package/build/dist/4472.9e708dd3e1c9db7d7396.js +0 -1
- package/build/dist/4473.b42b37616f13be64199b.js +0 -1
- package/build/dist/449.3fd75e05da22fe1c5ecc.js +0 -1
- package/build/dist/452.4974390f4f4d991216e5.js +0 -1
- package/build/dist/4547.36b5848220c04c47bc80.js +0 -1
- package/build/dist/4605.ef0f4204b3bf3a18efa6.js +0 -1
- package/build/dist/4804.fbd0ffcf57d9dffc15b7.js +0 -1
- package/build/dist/482.0c7512372a1fbf61d704.js +0 -1
- package/build/dist/4963.22d7db9b376a42d3f00b.js +0 -1
- package/build/dist/5097.a0de16bf7b90a8b1157d.js +0 -1
- package/build/dist/5123.d9ed79af478b5cc4f1b2.js +0 -1
- package/build/dist/5332.8b6e85d8764e907a01d5.js +0 -1
- package/build/dist/536.660d866952b46ba53180.js +0 -1
- package/build/dist/548.d3d912d0c0c7e835e1dc.js +0 -1
- package/build/dist/5516.cc92dfbf06ddcd133dbc.js +0 -1
- package/build/dist/5590.585778da623ec71f7722.js +0 -1
- package/build/dist/5616.14df0fe505c4dadf4042.js +0 -1
- package/build/dist/5695.95dc69f3b02812eb9e93.js +0 -1
- package/build/dist/5697.6ac62f99ca19a979f1eb.js +0 -1
- package/build/dist/5741.237d817efc942de875e5.js +0 -1
- package/build/dist/5849.d26365d4b19533db6fd6.js +0 -1
- package/build/dist/5902.3969a79465383ff4bbb4.js +0 -1
- package/build/dist/5942.981e03467a3b2c653ab8.js +0 -1
- package/build/dist/6010.2da6f8c2fce5292557cb.js +0 -1
- package/build/dist/6029.63e4beb66df7afc65a90.js +0 -1
- package/build/dist/6054.f91307b52046172fc5f8.js +0 -1
- package/build/dist/6089.0863a6a09be2b97e84e1.js +0 -1
- package/build/dist/6095.d845e356a4db8a241cdb.js +0 -1
- package/build/dist/6114.ca67e88c701691b3bb1e.js +0 -1
- package/build/dist/612.74d77e32957a5c6eb197.js +0 -1
- package/build/dist/625.d9e531476b3306e0b837.js +0 -1
- package/build/dist/6318.66541f9cef18d14ea3ea.js +0 -1
- package/build/dist/6455.5c950f6eb61015409eb6.js +0 -1
- package/build/dist/6527.436d2d5d81376e6a54ae.js +0 -1
- package/build/dist/6530.2f1b283a902603262048.js +0 -1
- package/build/dist/6610.b92f337fcc1b347350fb.js +0 -1
- package/build/dist/6926.2786af754adcdabfbede.js +0 -1
- package/build/dist/697.62f8b1ec6d2cd40ed316.js +0 -1
- package/build/dist/70.be2f9130c93c4175d12f.js +0 -1
- package/build/dist/7081.9e1e196fecfcccb4bfb9.js +0 -1
- package/build/dist/7128.3573ab2a5f28b79ba89e.js +0 -1
- package/build/dist/7163.ad09accaa87e565b8dc0.js +0 -1
- package/build/dist/72.a1d87dabb7f0615b3a21.js +0 -1
- package/build/dist/7229.50a1700104d1e4732735.js +0 -1
- package/build/dist/7332.d024ae75a3da2f7674a1.js +0 -1
- package/build/dist/7509.370c49d7ff43e289190c.js +0 -1
- package/build/dist/7514.dbf525bade6ffbd70af6.js +0 -2
- package/build/dist/7557.7d62939c56391a647067.js +0 -1
- package/build/dist/7588.2d840229f62de92b22e5.js +0 -1
- package/build/dist/7632.5660653552f755580adc.js +0 -1
- package/build/dist/7639.b3c6382de2fde652a40b.js +0 -1
- package/build/dist/779.91614fabf5c9eb3aafa0.js +0 -1
- package/build/dist/7810.979796e8a3aad6d4d72f.js +0 -1
- package/build/dist/7897.8b8070d6abe5c2327168.js +0 -1
- package/build/dist/7941.dbef0b0f412899800b13.js +0 -1
- package/build/dist/7953.5cd280effe2e967ea490.js +0 -1
- package/build/dist/7954.efecc100b407af204add.js +0 -1
- package/build/dist/7959.e31a21f28ff463d9d5e9.js +0 -1
- package/build/dist/8034.301f1099c4a7ce6c2829.js +0 -1
- package/build/dist/8080.e1c9af30bdd818b08c6e.js +0 -1
- package/build/dist/8087.6452b67614a0855535a4.js +0 -1
- package/build/dist/8140.bbccc589b007f9d410d1.js +0 -1
- package/build/dist/8162.e47cccbe327b26a2ea6f.js +0 -1
- package/build/dist/8322.56c8f4b4ad93b1a866c8.js +0 -1
- package/build/dist/8376.01a9f23ba06a78922364.js +0 -1
- package/build/dist/8433.e54d57e2cc9408e5e411.js +0 -1
- package/build/dist/8460.25f0859cb2266f764113.js +0 -1
- package/build/dist/8524.7945bff0063dc5c5903d.js +0 -1
- package/build/dist/8782.a5498372f1eb6bab41b7.js +0 -1
- package/build/dist/8953.23fe6fe13b28168428d3.js +0 -1
- package/build/dist/8964.bdf168262ab40956654a.js +0 -1
- package/build/dist/9003.69a0d15e722e1ed455b0.js +0 -1
- package/build/dist/9299.c2699815e5339e4045f8.js +0 -1
- package/build/dist/9385.2b1afe7b55d4c16f97ad.js +0 -1
- package/build/dist/9428.3176bab8f5780f060d51.js +0 -1
- package/build/dist/9456.506d55e351dec4f45566.js +0 -1
- package/build/dist/9465.8ff5871fb708cf7c1021.js +0 -1
- package/build/dist/9500.95d19d78b580734ec35e.js +0 -1
- package/build/dist/9512.03215278f26dc63c056d.js +0 -1
- package/build/dist/9614.cfdbe03d8e2960b0a53a.js +0 -1
- package/build/dist/9651.6bf3e34362f10c1aa35d.js +0 -1
- package/build/dist/9788.4a1c2f3626e532d3b44c.js +0 -1
- package/build/dist/9943.b62436bd9d0730c715a9.js +0 -1
- package/build/dist/9967.216bc8d26440bcbaf785.js +0 -1
- package/build/dist/9970.aa60aa700a790ba226f0.js +0 -1
- package/build/dist/main.7a6fed9f5f814a194409.js +0 -2
- /package/build/dist/{7514.dbf525bade6ffbd70af6.js.LICENSE.txt → 2300.9e1baa1c0368abe53d96.js.LICENSE.txt} +0 -0
- /package/build/dist/{3140.b078ec311f99170b7f4c.js.LICENSE.txt → 3140.794a212da633caf38b3a.js.LICENSE.txt} +0 -0
- /package/build/dist/{main.7a6fed9f5f814a194409.js.LICENSE.txt → main.3a12152528aff6ae213a.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[6010,8302],{83277(e,t,n){n.d(t,{$j:()=>r,CP:()=>o,Lv:()=>s,cL:()=>a});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='\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';const a=JSON.stringify({stream:!0,thinking:{type:"disabled"}});function r(e){return"string"==typeof e?e:Array.isArray(e)?e.map(e=>"text"===e.type?e.text:"[图片]").join("\n"):""}},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:()=>N});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),j=n(78247),f=n(23430),y=n(52671),w=n(14944),b=n(92275),C=n(88815),A=n(64694),k=n(45907),S=n(12721),I=n(24659),$=n(83277);function N(){const{t:e}=(0,s.Bd)(),{initUserInfo:t}=(0,o.useContext)(v.F),n=[e("编号"),e("url"),e("是否开启"),e("key"),"model",e("更多属性"),e("备注")],N=[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),R=(0,o.useRef)(),q=(0,o.useRef)(!1),H=(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,j.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(b.HK.ai_load_info,e=>{T(e.context)});const t=await w.ws.sendData(b.HK.ai_load_info,{});t?.context&&T(t.context);const n=await _.XO.get("ai_docs_setting");n.code===x.m.Success&&(R.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(b.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]),q.current=!0},ve=e=>{const t=P.indexOf(e);t<0||(P.splice(t,1),X([...P]),q.current=!0)},je=e=>{X([...P,{...e,open:!1}]),q.current=!0},fe=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)("保存成功"),q.current=!1,w.ws.sendData(b.HK.mcp_reload,{}))},we=async()=>{const e=await _.XO.get("ai_mcp_tools");return e.code===x.m.Success?(V(e.data??[]),e.data??[]):[]},be=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},Ce=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 be(n);e&&await Ce(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:H.current};null!=e&&(t={param:e}),H.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(f.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:$.CP,json_params:$.cL}])}}),(0,h.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:async()=>{await fe()}})]}),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:$.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:$.Lv.have_label_by_v(t.token,t.show_options?.options_agent_key_list)?null:"password",value:$.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:$.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:()=>{j.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),j.xK.set_value_temp(""),fe(K)}})}}),(0,h.jsx)(a.rA,{icon:"edit_attributes",title:"model请求参数json编写",onClick:()=>{j.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),j.xK.set_value_temp(""),fe(K)},can_format:!0})}}),(0,h.jsx)(a.rA,{icon:"settings",title:"额外参数设置",onClick:()=>{j.xK.set_value_temp(K[n].dotenv),me({model:"ace/mode/ini",open:!0,fileName:"",save:async e=>{K[n].dotenv=e,O(K),j.xK.set_value_temp(""),fe(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]))),q.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,q.current=!0},no_border:!0}),(0,h.jsx)(p.l6,{value:t.open,onChange:e=>{t.open=e,X([...P]),q.current=!0},options:_e,no_border:!0}),Ae(P.indexOf(t)),(0,h.jsx)(p.Sm,{value:t.command,handleInputChange:e=>{t.command=e,q.current=!0},no_border:!0}),(0,h.jsx)(p.Sm,{value:t.args,handleInputChange:e=>{t.args=e,q.current=!0},no_border:!0}),(0,h.jsx)(p.Sm,{value:t.cwd,handleInputChange:e=>{t.cwd=e,q.current=!0},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"visibility",title:"查看工具",onClick:()=>{Ce(t,s)}}),(0,h.jsx)(a.rA,{icon:"settings",title:"env",onClick:()=>{j.xK.set_value_temp(t.env??""),me({model:"ace/mode/ini",open:!0,fileName:"",save:async e=>{t.env=e,X([...P]),j.xK.set_value_temp(""),q.current=!0,ye()}})}})]}),(0,h.jsx)(p.Sm,{value:t.note,handleInputChange:e=>{t.note=e,q.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:()=>je(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]))),q.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,q.current=!0},no_border:!0}),(0,h.jsx)(p.l6,{value:t.open,onChange:e=>{t.open=e,X([...P]),q.current=!0},options:_e,no_border:!0}),Ae(P.indexOf(t)),(0,h.jsx)(p.Sm,{value:t.endpoint,handleInputChange:e=>{t.endpoint=e,q.current=!0},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"visibility",title:"查看工具",onClick:()=>{Ce(t,s)}}),(0,h.jsx)(a.rA,{icon:"settings",title:"headers",onClick:()=>{j.xK.set_value_temp(t.headers??""),me({model:"ace/mode/ini",open:!0,fileName:"",save:async e=>{t.headers=e,X([...P]),j.xK.set_value_temp(""),q.current=!0,ye()}})}})]}),(0,h.jsx)(p.Sm,{value:t.note,handleInputChange:e=>{t.note=e,q.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:()=>je(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:()=>{j.xK.set_value_temp(t.prompt??""),me({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{t.prompt=e,re([...ae]),j.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:()=>{j.xK.set_value_temp(t.llm_prompt??""),me({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{t.llm_prompt=e,re([...ae]),j.xK.set_value_temp(""),Se()}})}})}),(0,h.jsx)("div",{children:(0,h.jsx)(a.rA,{icon:"rule",title:e("编辑规则"),onClick:()=>{j.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]),j.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??"":"";j.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}),j.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:()=>{j.xK.set_value_temp(R.current),me({model:"ace/mode/ini",open:!0,fileName:"",save:async e=>{R.current=e,j.xK.set_value_temp(""),ke(R.current)}})}}),(0,h.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>{M([...L,{note:"",auto_load:!1,dir:""}]),H.current=!0}}),(0,h.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:()=>{ke()}})]}),children:(0,h.jsx)(d.X,{headers:N,onRowDrag:(e,t)=>{M((0,A.TI)(L,e,t)),H.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,H.current=!0},no_border:!0}),(0,h.jsx)(p.l6,{value:t.auto_load,onChange:e=>{t.auto_load=e,M([...L]),H.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]),H.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,C.v7)(D?.size)}),(0,h.jsx)(c.Yh,{left:`${e("最近一次加载")},${e("总耗时")}`,right:(0,C.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:()=>y});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(89334),_=n(41105),x=n(52388),g=n(19878),v=(n(72411),n(74848));const j=new o.A({html:!0,highlight:function(e,t){if(t&&g.A.getLanguage(t))try{return`<pre class="hljs code-block-with-copy"><code class="hljs language-${t}">${g.A.highlight(e,{language:t}).value}</code></pre>`}catch(e){}try{return`<pre class="hljs code-block-with-copy"><code class="hljs">${g.A.highlightAuto(e).value}</code></pre>`}catch(e){}return`<pre class="hljs code-block-with-copy"><code>${j.utils.escapeHtml(e)}</code></pre>`}});function f(e){const t=e.className.match(/language-([\w-]+)/);return t?t[1]:""}function y(e){const t=(0,s.useRef)(null);return(0,m.VD)(),(0,s.useEffect)(()=>{t.current&&(!async function(e){const t=e.querySelectorAll("pre > code[class*='language-']");for(const e of Array.from(t)){const t=f(e);if(!(0,u.Hm)(t))continue;const n=e.closest(".code-block-with-copy")??e.parentElement;if(!n)continue;const s=e.textContent??"",o=document.createElement("div");o.className="md-graph md-graph--loading",o.textContent=x.A.t("rendering"),n.replaceWith(o);const a=await(0,u.U6)(t,s);o.isConnected&&(a.error?(o.className="md-graph md-graph--error",o.textContent=a.error):(o.className="md-graph",o.innerHTML=a.svg))}}(t.current),(0,h.rg)(t.current))},[e.context]),(0,v.jsx)("div",{ref:t,dangerouslySetInnerHTML:{__html:j.render(e.context)}})}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&&g.A.getLanguage(l))try{c=g.A.highlight(i,{language:l}).value}catch(t){c=e.utils.escapeHtml(i)}else try{c=g.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,h.Rh)(j,_.pC)},24659(e,t,n){n.d(t,{K:()=>o});var s=n(22022);const o=()=>{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>"}}]);
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[6010,8302],{83277(e,t,n){n.d(t,{$j:()=>r,CP:()=>o,Lv:()=>s,cL:()=>a});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='\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';const a=JSON.stringify({stream:!0,thinking:{type:"disabled"}});function r(e){return"string"==typeof e?e:Array.isArray(e)?e.map(e=>"text"===e.type?e.text:"[图片]").join("\n"):""}},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(52671),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){n.d(t,{K:()=>o});var s=n(22022);const o=()=>{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([[8677],{77454(e,t,a){function l(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>l}),(0,a(86827).K)(l,"populateCommonDb")},1672(e,t,a){a.d(t,{P:()=>n});var l=a(86535),s=a(31293),r=a(86827),n=(0,r.K)((e,t,a,r)=>{e.attr("class",a);const{width:n,height:c,x:d,y:p}=i(e,t);(0,l.a$)(e,c,n,r);const h=o(d,p,n,c,t);e.attr("viewBox",h),s.R.debug(`viewBox configured: ${h} with padding: ${t}`)},"setupViewPortForSVG"),i=(0,r.K)((e,t)=>{const a=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:a.width+2*t,height:a.height+2*t,x:a.x,y:a.y}},"calculateDimensionsWithPadding"),o=(0,r.K)((e,t,a,l,s)=>`${e-s} ${t-s} ${a} ${l}`,"createViewBox")},88677(e,t,a){a.d(t,{diagram:()=>v});var l=a(77454),s=a(5637),r=a(1672),n=a(44505),i=a(12505),o=a(86535),c=a(31293),d=a(86827),p=a(34376),h=a(51444),m=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getAccDescription=o.m7,this.setAccDescription=o.EI}static{(0,d.K)(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=o.UI,t=(0,o.zj)();return(0,i.$t)({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){const a=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=t.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");l&&l.forEach(e=>{(0,n.KX)(e)&&(a?.textStyles?a.textStyles.push(e):a.textStyles=[e]),a?.styles?a.styles.push(e):a.styles=[e]}),this.classes.set(e,a)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){(0,o.IU)(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function y(e){if(!e.length)return[];const t=[],a=[];return e.forEach(e=>{const l={name:e.name,children:"Leaf"===e.type?void 0:[]};for(l.classSelector=e?.classSelector,e?.cssCompiledStyles&&(l.cssCompiledStyles=e.cssCompiledStyles),"Leaf"===e.type&&void 0!==e.value&&(l.value=e.value);a.length>0&&a[a.length-1].level>=e.level;)a.pop();if(0===a.length)t.push(l);else{const e=a[a.length-1].node;e.children?e.children.push(l):e.children=[l]}"Leaf"!==e.type&&a.push({node:l,level:e.level})}),t}(0,d.K)(y,"buildHierarchy");var f=(0,d.K)((e,t)=>{(0,l.S)(e,t);const a=[];for(const a of e.TreemapRows??[])"ClassDefStatement"===a.$type&&t.addClass(a.className??"",a.styleText??"");for(const l of e.TreemapRows??[]){const e=l.item;if(!e)continue;const s=l.indent?parseInt(l.indent):0,r=u(e),n=e.classSelector?t.getStylesForClass(e.classSelector):[],i=n.length>0?n:void 0,o={level:s,name:r,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:i};a.push(o)}const s=y(a),r=(0,d.K)((e,a)=>{for(const l of e)t.addNode(l,a),l.children&&l.children.length>0&&r(l.children,a+1)},"addNodesRecursively");r(s,0)},"populate"),u=(0,d.K)(e=>e.name?String(e.name):"","getItemName"),S={parser:{yy:void 0},parse:(0,d.K)(async e=>{try{const t=p.qg,a=await t("treemap",e);c.R.debug("Treemap AST:",a);const l=S.parser?.yy;if(!(l instanceof m))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");f(a,l)}catch(e){throw c.R.error("Error parsing treemap:",e),e}},"parse")},g=10,x={draw:(0,d.K)((e,t,a,l)=>{const i=l.db,p=i.getConfig(),m=p.padding??10,y=i.getDiagramTitle(),f=i.getRoot(),{themeVariables:u}=(0,o.zj)();if(!f)return;const S=y?30:0,x=(0,s.D)(t),$=p.nodeWidth?p.nodeWidth*g:960,b=p.nodeHeight?p.nodeHeight*g:500,v=$,C=b+S;let w;x.attr("viewBox",`0 0 ${v} ${C}`),(0,o.a$)(x,C,v,p.useMaxWidth);try{const e=p.valueFormat||",";if("$0,0"===e)w=(0,d.K)(e=>"$"+(0,h.GPZ)(",")(e),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),a=t?t[0]:"";w=(0,d.K)(e=>"$"+(0,h.GPZ)(","+a)(e),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);w=(0,d.K)(e=>"$"+(0,h.GPZ)(t||"")(e),"valueFormat")}else w=(0,h.GPZ)(e)}catch(e){c.R.error("Error creating format function:",e),w=(0,h.GPZ)(",")}const L=(0,h.UMr)().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),k=(0,h.UMr)().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),T=(0,h.UMr)().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);y&&x.append("text").attr("x",v/2).attr("y",S/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(y);const P=x.append("g").attr("transform",`translate(0, ${S})`).attr("class","treemapContainer"),M=(0,h.Sk5)(f).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),z=(0,h.hkb)().size([$,b]).paddingTop(e=>e.children&&e.children.length>0?35:0).paddingInner(m).paddingLeft(e=>e.children&&e.children.length>0?g:0).paddingRight(e=>e.children&&e.children.length>0?g:0).paddingBottom(e=>e.children&&e.children.length>0?g:0).round(!0)(M),F=z.descendants().filter(e=>e.children&&e.children.length>0),K=P.selectAll(".treemapSection").data(F).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);K.append("rect").attr("width",e=>e.x1-e.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>0===e.depth?"display: none;":""),K.append("clipPath").attr("id",(e,a)=>`clip-section-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",25),K.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>L(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>k(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(0===e.depth)return"display: none;";const t=(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),K.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(e=>0===e.depth?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,a)=>`url(#clip-section-${t}-${a})`).attr("style",e=>{if(0===e.depth)return"display: none;";return"dominant-baseline: middle; font-size: 12px; fill:"+T(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")}).each(function(e){if(0===e.depth)return;const t=(0,h.Ltv)(this),a=e.data.name;t.text(a);const l=e.x1-e.x0;let s;if(!1!==p.showValues&&e.value){s=l-10-30-10-6}else{s=l-6-6}const r=Math.max(15,s),n=t.node();if(n.getComputedTextLength()>r){const e="...";let l=a;for(;l.length>0;){if(l=a.substring(0,l.length-1),0===l.length){t.text(e),n.getComputedTextLength()>r&&t.text("");break}if(t.text(l+e),n.getComputedTextLength()<=r)break}}}),!1!==p.showValues&&K.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?w(e.value):"").attr("font-style","italic").attr("style",e=>{if(0===e.depth)return"display: none;";return"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+T(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")});const D=z.leaves(),N=D.length>20,G=N?16:38,V=N?14:28,W=N?4:8,R=N?4:6,A=N?2:4,B=N?8:10,I=N?1:2,X=P.selectAll(".treemapLeafGroup").data(D).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);X.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?L(e.parent.data.name):L(e.data.name)).attr("style",e=>(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?L(e.parent.data.name):L(e.data.name)).attr("stroke-width",3),X.append("clipPath").attr("id",(e,a)=>`clip-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4));if(X.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${G}px;fill:`+T(e.data.name)+";"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.data.name).each(function(e){const t=(0,h.Ltv)(this),a=e.x1-e.x0,l=e.y1-e.y0,s=t.node(),r=a-2*A,n=l-2*A;if(r<B||n<B)return void t.style("display","none");let i=parseInt(t.style("font-size"),10);for(;s.getComputedTextLength()>r&&i>W;)i--,t.style("font-size",`${i}px`);let o=Math.max(R,Math.min(V,Math.round(.6*i))),c=i+I+o;for(;c>n&&i>W&&(i--,o=Math.max(R,Math.min(V,Math.round(.6*i))),!(o<R&&i===W));)t.style("font-size",`${i}px`),c=i+I+o;t.style("font-size",`${i}px`),N?(i<W||n<W)&&t.style("display","none"):(s.getComputedTextLength()>r||i<W||n<i)&&t.style("display","none")}),!1!==p.showValues){X.append("text").attr("class","treemapValue").attr("x",e=>(e.x1-e.x0)/2).attr("y",function(e){return(e.y1-e.y0)/2}).attr("style",e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${V}px;fill:`+T(e.data.name)+";"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.value?w(e.value):"").each(function(e){const t=(0,h.Ltv)(this),a=this.parentNode;if(!a)return void t.style("display","none");const l=(0,h.Ltv)(a).select(".treemapLabel");if(l.empty()||"none"===l.style("display"))return void t.style("display","none");const s=parseFloat(l.style("font-size")),r=Math.max(R,Math.min(V,Math.round(.6*s)));t.style("font-size",`${r}px`);const n=(e.y1-e.y0)/2+s/2+I;t.attr("y",n);const i=e.x1-e.x0,o=e.y1-e.y0-4,c=i-2*A;t.node().getComputedTextLength()>c||n+r>o||r<R?t.style("display","none"):t.style("display",null)})}const E=p.diagramPadding??8;(0,r.P)(x,E,"flowchart",p?.useMaxWidth||!1)},"draw"),getClasses:(0,d.K)(function(e,t){return t.db.getClasses()},"getClasses")},$={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},b=(0,d.K)(({treemap:e}={})=>{const t=(0,o.P$)(),a=(0,o.zj)(),l=(0,i.$t)(t,a.themeVariables),s=(0,i.$t)($,e),r=s.titleColor??l.titleColor,n=s.labelColor??l.textColor,c=s.valueColor??l.textColor;return`\n .treemapNode.section {\n stroke: ${s.sectionStrokeColor};\n stroke-width: ${s.sectionStrokeWidth};\n fill: ${s.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${s.leafStrokeColor};\n stroke-width: ${s.leafStrokeWidth};\n fill: ${s.leafFillColor};\n }\n .treemapLabel {\n fill: ${n};\n font-size: ${s.labelFontSize};\n }\n .treemapValue {\n fill: ${c};\n font-size: ${s.valueFontSize};\n }\n .treemapTitle {\n fill: ${r};\n font-size: ${s.titleFontSize};\n }\n `},"getStyles"),v={parser:S,get db(){return new m},renderer:x,styles:b}}}]);
|
|
@@ -0,0 +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")}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8781],{4926(n,l,e){e.d(l,{A:()=>q});var t=e(31601),o=e.n(t),i=e(76314),r=e.n(i)()(o());r.push([n.id,'/* ../simple-mind-map/node_modules/quill/dist/quill.snow.css */\n.ql-container {\n box-sizing: border-box;\n font-family:\n Helvetica,\n Arial,\n sans-serif;\n font-size: 13px;\n height: 100%;\n margin: 0;\n position: relative;\n}\n.ql-container.ql-disabled .ql-tooltip {\n visibility: hidden;\n}\n.ql-container:not(.ql-disabled) li[data-list=checked] > .ql-ui,\n.ql-container:not(.ql-disabled) li[data-list=unchecked] > .ql-ui {\n cursor: pointer;\n}\n.ql-clipboard {\n left: -100000px;\n height: 1px;\n overflow-y: hidden;\n position: absolute;\n top: 50%;\n}\n.ql-clipboard p {\n margin: 0;\n padding: 0;\n}\n.ql-editor {\n box-sizing: border-box;\n counter-reset: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n line-height: 1.42;\n height: 100%;\n outline: none;\n overflow-y: auto;\n padding: 12px 15px;\n tab-size: 4;\n -moz-tab-size: 4;\n text-align: left;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n.ql-editor > * {\n cursor: text;\n}\n.ql-editor p,\n.ql-editor ol,\n.ql-editor pre,\n.ql-editor blockquote,\n.ql-editor h1,\n.ql-editor h2,\n.ql-editor h3,\n.ql-editor h4,\n.ql-editor h5,\n.ql-editor h6 {\n margin: 0;\n padding: 0;\n}\n@supports (counter-set:none) {\n .ql-editor p,\n .ql-editor h1,\n .ql-editor h2,\n .ql-editor h3,\n .ql-editor h4,\n .ql-editor h5,\n .ql-editor h6 {\n counter-set: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor p,\n .ql-editor h1,\n .ql-editor h2,\n .ql-editor h3,\n .ql-editor h4,\n .ql-editor h5,\n .ql-editor h6 {\n counter-reset: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor table {\n border-collapse: collapse;\n}\n.ql-editor td {\n border: 1px solid #000;\n padding: 2px 5px;\n}\n.ql-editor ol {\n padding-left: 1.5em;\n}\n.ql-editor li {\n list-style-type: none;\n padding-left: 1.5em;\n position: relative;\n}\n.ql-editor li > .ql-ui:before {\n display: inline-block;\n margin-left: -1.5em;\n margin-right: .3em;\n text-align: right;\n white-space: nowrap;\n width: 1.2em;\n}\n.ql-editor li[data-list=checked] > .ql-ui,\n.ql-editor li[data-list=unchecked] > .ql-ui {\n color: #777;\n}\n.ql-editor li[data-list=bullet] > .ql-ui:before {\n content: "\\2022";\n}\n.ql-editor li[data-list=checked] > .ql-ui:before {\n content: "\\2611";\n}\n.ql-editor li[data-list=unchecked] > .ql-ui:before {\n content: "\\2610";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list] {\n counter-set: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list] {\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered] {\n counter-increment: list-0;\n}\n.ql-editor li[data-list=ordered] > .ql-ui:before {\n content: counter(list-0, decimal) ". ";\n}\n.ql-editor li[data-list=ordered].ql-indent-1 {\n counter-increment: list-1;\n}\n.ql-editor li[data-list=ordered].ql-indent-1 > .ql-ui:before {\n content: counter(list-1, lower-alpha) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-1 {\n counter-set: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-1 {\n counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-2 {\n counter-increment: list-2;\n}\n.ql-editor li[data-list=ordered].ql-indent-2 > .ql-ui:before {\n content: counter(list-2, lower-roman) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-2 {\n counter-set: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-2 {\n counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-3 {\n counter-increment: list-3;\n}\n.ql-editor li[data-list=ordered].ql-indent-3 > .ql-ui:before {\n content: counter(list-3, decimal) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-3 {\n counter-set: list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-3 {\n counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-4 {\n counter-increment: list-4;\n}\n.ql-editor li[data-list=ordered].ql-indent-4 > .ql-ui:before {\n content: counter(list-4, lower-alpha) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-4 {\n counter-set: list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-4 {\n counter-reset: list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-5 {\n counter-increment: list-5;\n}\n.ql-editor li[data-list=ordered].ql-indent-5 > .ql-ui:before {\n content: counter(list-5, lower-roman) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-5 {\n counter-set: list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-5 {\n counter-reset: list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-6 {\n counter-increment: list-6;\n}\n.ql-editor li[data-list=ordered].ql-indent-6 > .ql-ui:before {\n content: counter(list-6, decimal) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-6 {\n counter-set: list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-6 {\n counter-reset: list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-7 {\n counter-increment: list-7;\n}\n.ql-editor li[data-list=ordered].ql-indent-7 > .ql-ui:before {\n content: counter(list-7, lower-alpha) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-7 {\n counter-set: list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-7 {\n counter-reset: list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-8 {\n counter-increment: list-8;\n}\n.ql-editor li[data-list=ordered].ql-indent-8 > .ql-ui:before {\n content: counter(list-8, lower-roman) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-8 {\n counter-set: list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-8 {\n counter-reset: list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-9 {\n counter-increment: list-9;\n}\n.ql-editor li[data-list=ordered].ql-indent-9 > .ql-ui:before {\n content: counter(list-9, decimal) ". ";\n}\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 3em;\n}\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 4.5em;\n}\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 3em;\n}\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 4.5em;\n}\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 6em;\n}\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 7.5em;\n}\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 6em;\n}\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 7.5em;\n}\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 9em;\n}\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 10.5em;\n}\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 9em;\n}\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 10.5em;\n}\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 12em;\n}\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 13.5em;\n}\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 12em;\n}\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 13.5em;\n}\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 15em;\n}\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 16.5em;\n}\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 15em;\n}\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 16.5em;\n}\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 18em;\n}\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 19.5em;\n}\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 18em;\n}\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 19.5em;\n}\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 21em;\n}\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 22.5em;\n}\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 21em;\n}\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 22.5em;\n}\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 24em;\n}\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 25.5em;\n}\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 24em;\n}\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 25.5em;\n}\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 27em;\n}\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 28.5em;\n}\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 27em;\n}\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 28.5em;\n}\n.ql-editor li.ql-direction-rtl {\n padding-right: 1.5em;\n}\n.ql-editor li.ql-direction-rtl > .ql-ui:before {\n margin-left: .3em;\n margin-right: -1.5em;\n text-align: left;\n}\n.ql-editor table {\n table-layout: fixed;\n width: 100%;\n}\n.ql-editor table td {\n outline: none;\n}\n.ql-editor .ql-code-block-container {\n font-family: monospace;\n}\n.ql-editor .ql-video {\n display: block;\n max-width: 100%;\n}\n.ql-editor .ql-video.ql-align-center {\n margin: 0 auto;\n}\n.ql-editor .ql-video.ql-align-right {\n margin: 0 0 0 auto;\n}\n.ql-editor .ql-bg-black {\n background-color: #000;\n}\n.ql-editor .ql-bg-red {\n background-color: #e60000;\n}\n.ql-editor .ql-bg-orange {\n background-color: #f90;\n}\n.ql-editor .ql-bg-yellow {\n background-color: #ff0;\n}\n.ql-editor .ql-bg-green {\n background-color: #008a00;\n}\n.ql-editor .ql-bg-blue {\n background-color: #06c;\n}\n.ql-editor .ql-bg-purple {\n background-color: #93f;\n}\n.ql-editor .ql-color-white {\n color: #fff;\n}\n.ql-editor .ql-color-red {\n color: #e60000;\n}\n.ql-editor .ql-color-orange {\n color: #f90;\n}\n.ql-editor .ql-color-yellow {\n color: #ff0;\n}\n.ql-editor .ql-color-green {\n color: #008a00;\n}\n.ql-editor .ql-color-blue {\n color: #06c;\n}\n.ql-editor .ql-color-purple {\n color: #93f;\n}\n.ql-editor .ql-font-serif {\n font-family:\n Georgia,\n Times New Roman,\n serif;\n}\n.ql-editor .ql-font-monospace {\n font-family:\n Monaco,\n Courier New,\n monospace;\n}\n.ql-editor .ql-size-small {\n font-size: .75em;\n}\n.ql-editor .ql-size-large {\n font-size: 1.5em;\n}\n.ql-editor .ql-size-huge {\n font-size: 2.5em;\n}\n.ql-editor .ql-direction-rtl {\n direction: rtl;\n text-align: inherit;\n}\n.ql-editor .ql-align-center {\n text-align: center;\n}\n.ql-editor .ql-align-justify {\n text-align: justify;\n}\n.ql-editor .ql-align-right {\n text-align: right;\n}\n.ql-editor .ql-ui {\n position: absolute;\n}\n.ql-editor.ql-blank::before {\n color: rgba(0, 0, 0, 0.6);\n content: attr(data-placeholder);\n font-style: italic;\n left: 15px;\n pointer-events: none;\n position: absolute;\n right: 15px;\n}\n.ql-snow.ql-toolbar:after,\n.ql-snow .ql-toolbar:after {\n clear: both;\n content: "";\n display: table;\n}\n.ql-snow.ql-toolbar button,\n.ql-snow .ql-toolbar button {\n background: none;\n border: none;\n cursor: pointer;\n display: inline-block;\n float: left;\n height: 24px;\n padding: 3px 5px;\n width: 28px;\n}\n.ql-snow.ql-toolbar button svg,\n.ql-snow .ql-toolbar button svg {\n float: left;\n height: 100%;\n}\n.ql-snow.ql-toolbar button:active:hover,\n.ql-snow .ql-toolbar button:active:hover {\n outline: none;\n}\n.ql-snow.ql-toolbar input.ql-image[type=file],\n.ql-snow .ql-toolbar input.ql-image[type=file] {\n display: none;\n}\n.ql-snow.ql-toolbar button:hover,\n.ql-snow .ql-toolbar button:hover,\n.ql-snow.ql-toolbar button:focus,\n.ql-snow .ql-toolbar button:focus,\n.ql-snow.ql-toolbar button.ql-active,\n.ql-snow .ql-toolbar button.ql-active,\n.ql-snow.ql-toolbar .ql-picker-label:hover,\n.ql-snow .ql-toolbar .ql-picker-label:hover,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active,\n.ql-snow.ql-toolbar .ql-picker-item:hover,\n.ql-snow .ql-toolbar .ql-picker-item:hover,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected {\n color: #06c;\n}\n.ql-snow.ql-toolbar button:hover .ql-fill,\n.ql-snow .ql-toolbar button:hover .ql-fill,\n.ql-snow.ql-toolbar button:focus .ql-fill,\n.ql-snow .ql-toolbar button:focus .ql-fill,\n.ql-snow.ql-toolbar button.ql-active .ql-fill,\n.ql-snow .ql-toolbar button.ql-active .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,\n.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {\n fill: #06c;\n}\n.ql-snow.ql-toolbar button:hover .ql-stroke,\n.ql-snow .ql-toolbar button:hover .ql-stroke,\n.ql-snow.ql-toolbar button:focus .ql-stroke,\n.ql-snow .ql-toolbar button:focus .ql-stroke,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\n.ql-snow.ql-toolbar button:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar button:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar button:focus .ql-stroke-miter,\n.ql-snow .ql-toolbar button:focus .ql-stroke-miter,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {\n stroke: #06c;\n}\n@media (pointer:coarse) {\n .ql-snow.ql-toolbar button:hover:not(.ql-active),\n .ql-snow .ql-toolbar button:hover:not(.ql-active) {\n color: #444;\n }\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {\n fill: #444;\n }\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {\n stroke: #444;\n }\n}\n.ql-snow {\n box-sizing: border-box;\n}\n.ql-snow * {\n box-sizing: border-box;\n}\n.ql-snow .ql-hidden {\n display: none;\n}\n.ql-snow .ql-out-bottom,\n.ql-snow .ql-out-top {\n visibility: hidden;\n}\n.ql-snow .ql-tooltip {\n position: absolute;\n transform: translateY(10px);\n}\n.ql-snow .ql-tooltip a {\n cursor: pointer;\n text-decoration: none;\n}\n.ql-snow .ql-tooltip.ql-flip {\n transform: translateY(-10px);\n}\n.ql-snow .ql-formats {\n display: inline-block;\n vertical-align: middle;\n}\n.ql-snow .ql-formats:after {\n clear: both;\n content: "";\n display: table;\n}\n.ql-snow .ql-stroke {\n fill: none;\n stroke: #444;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 2;\n}\n.ql-snow .ql-stroke-miter {\n fill: none;\n stroke: #444;\n stroke-miterlimit: 10;\n stroke-width: 2;\n}\n.ql-snow .ql-fill,\n.ql-snow .ql-stroke.ql-fill {\n fill: #444;\n}\n.ql-snow .ql-empty {\n fill: none;\n}\n.ql-snow .ql-even {\n fill-rule: evenodd;\n}\n.ql-snow .ql-thin,\n.ql-snow .ql-stroke.ql-thin {\n stroke-width: 1;\n}\n.ql-snow .ql-transparent {\n opacity: .4;\n}\n.ql-snow .ql-direction svg:last-child {\n display: none;\n}\n.ql-snow .ql-direction.ql-active svg:last-child {\n display: inline;\n}\n.ql-snow .ql-direction.ql-active svg:first-child {\n display: none;\n}\n.ql-snow .ql-editor h1 {\n font-size: 2em;\n}\n.ql-snow .ql-editor h2 {\n font-size: 1.5em;\n}\n.ql-snow .ql-editor h3 {\n font-size: 1.17em;\n}\n.ql-snow .ql-editor h4 {\n font-size: 1em;\n}\n.ql-snow .ql-editor h5 {\n font-size: .83em;\n}\n.ql-snow .ql-editor h6 {\n font-size: .67em;\n}\n.ql-snow .ql-editor a {\n text-decoration: underline;\n}\n.ql-snow .ql-editor blockquote {\n border-left: 4px solid #ccc;\n margin-bottom: 5px;\n margin-top: 5px;\n padding-left: 16px;\n}\n.ql-snow .ql-editor code,\n.ql-snow .ql-editor .ql-code-block-container {\n background-color: #f0f0f0;\n border-radius: 3px;\n}\n.ql-snow .ql-editor .ql-code-block-container {\n margin-bottom: 5px;\n margin-top: 5px;\n padding: 5px 10px;\n}\n.ql-snow .ql-editor code {\n font-size: 85%;\n padding: 2px 4px;\n}\n.ql-snow .ql-editor .ql-code-block-container {\n background-color: #23241f;\n color: #f8f8f2;\n overflow: visible;\n}\n.ql-snow .ql-editor img {\n max-width: 100%;\n}\n.ql-snow .ql-picker {\n color: #444;\n display: inline-block;\n float: left;\n font-size: 14px;\n font-weight: 500;\n height: 24px;\n position: relative;\n vertical-align: middle;\n}\n.ql-snow .ql-picker-label {\n cursor: pointer;\n display: inline-block;\n height: 100%;\n padding-left: 8px;\n padding-right: 2px;\n position: relative;\n width: 100%;\n}\n.ql-snow .ql-picker-label::before {\n display: inline-block;\n line-height: 22px;\n}\n.ql-snow .ql-picker-options {\n background-color: #fff;\n display: none;\n min-width: 100%;\n padding: 4px 8px;\n position: absolute;\n white-space: nowrap;\n}\n.ql-snow .ql-picker-options .ql-picker-item {\n cursor: pointer;\n display: block;\n padding-bottom: 5px;\n padding-top: 5px;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label {\n color: #ccc;\n z-index: 2;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill {\n fill: #ccc;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke {\n stroke: #ccc;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-options {\n display: block;\n margin-top: -1px;\n top: 100%;\n z-index: 1;\n}\n.ql-snow .ql-color-picker,\n.ql-snow .ql-icon-picker {\n width: 28px;\n}\n.ql-snow .ql-color-picker .ql-picker-label,\n.ql-snow .ql-icon-picker .ql-picker-label {\n padding: 2px 4px;\n}\n.ql-snow .ql-color-picker .ql-picker-label svg,\n.ql-snow .ql-icon-picker .ql-picker-label svg {\n right: 4px;\n}\n.ql-snow .ql-icon-picker .ql-picker-options {\n padding: 4px 0;\n}\n.ql-snow .ql-icon-picker .ql-picker-item {\n height: 24px;\n width: 24px;\n padding: 2px 4px;\n}\n.ql-snow .ql-color-picker .ql-picker-options {\n padding: 3px 5px;\n width: 152px;\n}\n.ql-snow .ql-color-picker .ql-picker-item {\n border: 1px solid transparent;\n float: left;\n height: 16px;\n margin: 2px;\n padding: 0;\n width: 16px;\n}\n.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {\n position: absolute;\n margin-top: -9px;\n right: 0;\n top: 50%;\n width: 18px;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""])::before {\n content: attr(data-label);\n}\n.ql-snow .ql-picker.ql-header {\n width: 98px;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item::before {\n content: "Normal";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {\n content: "Heading 1";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {\n content: "Heading 2";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {\n content: "Heading 3";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {\n content: "Heading 4";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {\n content: "Heading 5";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {\n content: "Heading 6";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {\n font-size: 2em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {\n font-size: 1.5em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {\n font-size: 1.17em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {\n font-size: 1em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {\n font-size: .83em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {\n font-size: .67em;\n}\n.ql-snow .ql-picker.ql-font {\n width: 108px;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item::before {\n content: "Sans Serif";\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\n content: "Serif";\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\n content: "Monospace";\n}\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\n font-family:\n Georgia,\n Times New Roman,\n serif;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\n font-family:\n Monaco,\n Courier New,\n monospace;\n}\n.ql-snow .ql-picker.ql-size {\n width: 98px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item::before {\n content: "Normal";\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\n content: "Small";\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\n content: "Large";\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\n content: "Huge";\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\n font-size: 10px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\n font-size: 18px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\n font-size: 32px;\n}\n.ql-snow .ql-color-picker.ql-background .ql-picker-item {\n background-color: #fff;\n}\n.ql-snow .ql-color-picker.ql-color .ql-picker-item {\n background-color: #000;\n}\n.ql-code-block-container {\n position: relative;\n}\n.ql-code-block-container .ql-ui {\n right: 5px;\n top: 5px;\n}\n.ql-toolbar.ql-snow {\n border: 1px solid #ccc;\n box-sizing: border-box;\n font-family:\n "Helvetica Neue",\n "Helvetica",\n "Arial",\n sans-serif;\n padding: 8px;\n}\n.ql-toolbar.ql-snow .ql-formats {\n margin-right: 15px;\n}\n.ql-toolbar.ql-snow .ql-picker-label {\n border: 1px solid transparent;\n}\n.ql-toolbar.ql-snow .ql-picker-options {\n border: 1px solid transparent;\n box-shadow: rgba(0, 0, 0, 0.2) 0 2px 8px;\n}\n.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label {\n border-color: #ccc;\n}\n.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {\n border-color: #ccc;\n}\n.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,\n.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover {\n border-color: #000;\n}\n.ql-toolbar.ql-snow + .ql-container.ql-snow {\n border-top: 0;\n}\n.ql-snow .ql-tooltip {\n background-color: #fff;\n border: 1px solid #ccc;\n box-shadow: 0 0 5px #ddd;\n color: #444;\n padding: 5px 12px;\n white-space: nowrap;\n}\n.ql-snow .ql-tooltip::before {\n content: "Visit URL:";\n line-height: 26px;\n margin-right: 8px;\n}\n.ql-snow .ql-tooltip input[type=text] {\n display: none;\n border: 1px solid #ccc;\n font-size: 13px;\n height: 26px;\n margin: 0;\n padding: 3px 5px;\n width: 170px;\n}\n.ql-snow .ql-tooltip a.ql-preview {\n display: inline-block;\n max-width: 200px;\n overflow-x: hidden;\n text-overflow: ellipsis;\n vertical-align: top;\n}\n.ql-snow .ql-tooltip a.ql-action::after {\n border-right: 1px solid #ccc;\n content: "Edit";\n margin-left: 16px;\n padding-right: 8px;\n}\n.ql-snow .ql-tooltip a.ql-remove::before {\n content: "Remove";\n margin-left: 8px;\n}\n.ql-snow .ql-tooltip a {\n line-height: 26px;\n}\n.ql-snow .ql-tooltip.ql-editing a.ql-preview,\n.ql-snow .ql-tooltip.ql-editing a.ql-remove {\n display: none;\n}\n.ql-snow .ql-tooltip.ql-editing input[type=text] {\n display: inline-block;\n}\n.ql-snow .ql-tooltip.ql-editing a.ql-action::after {\n border-right: 0;\n content: "Save";\n padding-right: 0;\n}\n.ql-snow .ql-tooltip[data-mode=link]::before {\n content: "Enter link:";\n}\n.ql-snow .ql-tooltip[data-mode=formula]::before {\n content: "Enter formula:";\n}\n.ql-snow .ql-tooltip[data-mode=video]::before {\n content: "Enter video:";\n}\n.ql-snow a {\n color: #06c;\n}\n.ql-container.ql-snow {\n border: 1px solid #ccc;\n}\n/*! Bundled license information:\n\nquill/dist/quill.snow.css:\n (*!\n * Quill Editor v2.0.3\n * https://quilljs.com\n * Copyright (c) 2017-2024, Slab\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n *)\n*/\n',""]);const q=r},88781(n,l,e){e.r(l),e.d(l,{default:()=>u});var t=e(85072),o=e.n(t),i=e(97825),r=e.n(i),q=e(77659),a=e.n(q),s=e(55056),d=e.n(s),c=e(10540),p=e.n(c),b=e(41113),k=e.n(b),w=e(4926),f={};f.styleTagTransform=k(),f.setAttributes=d(),f.insert=a().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=p();o()(w.A,f);const u=w.A&&w.A.locals?w.A.locals:void 0}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9299],{47374(e,t,n){n.d(t,{e:()=>p});var i=n(96540),s=n(52671),o=n(64694),a=n(34289),l=n(61443),r=n(75725),c=n(22022),d=n(85997),_=n(74848);function p(e){let t=(0,s.zy)();const[n,p]=(0,i.useState)([]),[f,h]=(0,i.useState)("/"),[u,m]=(0,i.useState)(void 0),{t:w,i18n:v}=(0,c.Bd)();i.useEffect(()=>{let t="",n=(0,a.vX)().split("/");n=n.filter(e=>e);const i=n.indexOf(e.baseRoute),s=[];if(-1!=i){t=(0,o.IO)(n.slice(0,i),e.baseRoute);const a=n.slice(i+1);for(let e=0;e<a.length;e++){const n=a[e];s.push({value:n,href:0===e?`${t}${n}/`:(0,o.IO)(s[e-1].href,n)})}h(t),p(s)}},[t]);const g=t=>{t.stopPropagation(),e.clickFun(t)};return(0,_.jsx)("div",{className:"breadcrumbs",onClick:e=>{m(void 0!==u?void 0:"")},children:(0,_.jsx)(i.Fragment,{children:void 0===u?(0,_.jsxs)(i.Fragment,{children:[(0,_.jsx)("span",{className:"chevron",children:(0,_.jsx)(s.N_,{to:f,onClick:g,children:(0,_.jsx)(d.In,{icon:"home"})})}),n.map((e,t)=>(0,_.jsxs)("span",{className:"chevron",children:[(0,_.jsx)(d.In,{icon:"keyboard_arrow_right"}),(0,_.jsx)(s.N_,{to:e.href,onClick:g,children:decodeURIComponent(e.value)})]},t))]}):(0,_.jsx)(r.QM,{click:()=>{m(void 0)},children:(0,_.jsx)(l.Sm,{width:"100%",placeholder:w("输入跳转的目录"),handlerEnter:t=>{e.input_path_enter&&e.input_path_enter(t),m(void 0)}})})})})}},77481(e,t,n){n.d(t,{S:()=>l,X:()=>a});var i=n(96540),s=n(61443),o=n(74848);function a(e){const[t,n]=i.useState([]),a=(0,i.useRef)(-1),[l,r]=(0,i.useState)(-1),[c,d]=(0,i.useState)(-1);(0,i.useEffect)(()=>{e.children?n(Array.isArray(e.children)?e.children:[e.children]):n(e.rows)},[e.rows,e.children]);const _=()=>{a.current=-1,r(-1),d(-1)};return(0,o.jsxs)("table",{children:[(0,o.jsx)("thead",{children:(0,o.jsx)("tr",{children:e.headers?.map((t,n)=>{const i=!!e.filter&&(e.filter.column??0)===n;let a=t;if(i){const n=e.filter,i=n.options.find(e=>e.value===n.value);null!=n.value&&i&&(a=`${t} (${i.label})`)}return(0,o.jsx)("th",{className:i?"table-filter-col":"",children:i?(0,o.jsx)(s.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:a}):t},n)})})}),(0,o.jsx)("tbody",{children:t.map((t,n)=>{const i=!!e.onRowDrag;return(0,o.jsx)("tr",{className:i?(l===n?"row-dragging":"")+(c===n?" row-drop-target":""):"",draggable:i,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{i&&(a.current=n,r(n),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!i||a.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(n))},onDrop:t=>{i&&(t.preventDefault(),(()=>{const t=a.current,n=c;_(),t<0||n<0||t===n||e.onRowDrag?.(t,n)})())},onDragEnd:_,children:t.map((n,i)=>{const s=i===t.length-1?"small":"";return(0,o.jsx)("td",{className:s,style:{width:e.width??"auto"},children:n},i)})},n)})})]})}function l(e){return(0,o.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,o.jsx)("div",{children:e},t))})}},19299(e,t,n){n.r(t),n.d(t,{default:()=>q});var i=n(96540),s=n(47374),o=n(34843),a=n(82893),l=n(14284),r=n(52671),c=n(4412),d=n(83529),_=n(34289),p=n(53459),f=n(99214),h=n(61443),u=n(47022),m=n(62042),w=n(22022),v=n(7523),g=n(78247),x=n(88815),y=n(6960),j=n(47071),k=n(14944),G=n(92275),A=n(23430);var b=n(34251),C=n(60096),S=n(87361),M=n(97952),$=n(85997),z=n(77481),N=n(70447),D=n(74848);const I=500;function P(e){const{t}=(0,w.Bd)(),n=(0,r.Zp)(),[,s]=(0,o.fp)(a.AG.prompt_card),[l,c]=(0,i.useState)(""),[d,_]=(0,i.useState)(!1),[p,f]=(0,i.useState)([]),[u,m]=(0,i.useState)(0),[v,g]=(0,i.useState)(!1),x=(0,i.useMemo)(()=>new M.I(window.location.host,"file_deep_search"),[]),y=(0,i.useRef)(!1),j=decodeURIComponent(e.base_path);(0,i.useEffect)(()=>{let e=[],t=null;const n=()=>{if(t=null,y.current||!e.length)return;const n=e;e=[],m(e=>e+n.length),f(e=>e.length>=I?e:[...e,...n].slice(0,I))},i=()=>{y.current||_(!1)};return x.addMsg(G.HK.file_deep_search_data,i=>{y.current||(e.push(...i.context??[]),null===t&&(t=setTimeout(n,100)))}),x.addMsg(G.HK.file_deep_search_end,()=>{y.current||(n(),_(!1))}),x.on_message("close",i),()=>{y.current=!0,clearTimeout(t),x.sendData(G.HK.file_deep_search_cancel,{}).catch(()=>{}),x.off_message("close",i),x.close()}},[]);const k=()=>{const t=l.trim();if(!t||d)return;f([]),m(0),g(!0),_(!0);const n={param_path:e.base_path,keyword:t};x.sendData(G.HK.file_deep_search,n).catch(()=>{})},A=e=>{let t=e.is_dir?e.path:e.path.slice(0,e.path.lastIndexOf("/")+1);t.endsWith("/")||(t+="/"),s({open:!1}),n(S.o.file+t.split("/").map(encodeURIComponent).join("/"))};return(0,D.jsxs)("div",{className:"file-deep-search",children:[(0,D.jsxs)("div",{className:"file-deep-search__bar",children:[(0,D.jsx)(h.$Z,{icon:"search",value:l,placeholder:t("搜文件名"),handleInputChange:e=>c(e),handleEnterPress:k}),(0,D.jsx)("button",{className:"button button--flat",onClick:d?()=>{x.sendData(G.HK.file_deep_search_cancel,{}).catch(()=>{}),_(!1)}:k,children:t(d?"取消":"搜索")})]}),(0,D.jsxs)("div",{className:"file-deep-search__hint",children:[(0,D.jsxs)("span",{children:[t("范围"),":",j]}),u>0&&(0,D.jsx)("span",{className:"file-deep-search__count",children:u>I?`${t("已显示")} 500 / ${u}`:`${u}`})]}),(0,D.jsxs)("div",{className:"file-deep-search__body",children:[p.length>0&&(0,D.jsx)(z.X,{headers:[t("名称"),t("路径"),""],rows:p.map(e=>{const n=e.path.slice(0,e.path.lastIndexOf("/")+1);return[e.is_dir?(0,D.jsx)("span",{className:"file-deep-search__dir",children:e.name}):e.name,(0,D.jsx)(N.xP,{context:n}),(0,D.jsx)($.rA,{icon:"folder_open",title:t("打开所在目录"),onClick:()=>A(e)})]})}),d&&(0,D.jsxs)("div",{className:"file-deep-search__empty",children:[(0,D.jsx)("span",{className:"chat-session-running",title:t("搜索中")}),t("搜索中")]}),!d&&u>I&&(0,D.jsx)("div",{className:"file-deep-search__more",children:t("结果过多")}),!d&&0===p.length&&(0,D.jsx)("div",{className:"file-deep-search__empty",children:t(v?"无匹配":"输入后搜")})]})]})}var E=n(23496),F=n(12730),X=n(75725),R=n(40505);let K={};function H(){const{t:e}=(0,w.Bd)();let t=(0,r.zy)();const n=(0,r.Zp)(),{check_user_auth:s}=(0,g.MH)(),[c,p]=(0,o.fp)(a.AG.nowFileList),[h,x]=(0,o.fp)(a.AG.uploadFiles),[y,j]=(0,o.fp)(a.AG.showPrompt),[C,M]=(0,o.fp)(a.AG.selectedFileList),[z,I]=(0,o.fp)(a.AG.copyedFileList),[P,E]=(0,o.fp)(a.AG.cutedFileList),[R,H]=(0,o.fp)(a.AG.selectedFileList),[L,O]=(0,o.fp)(a.AG.clickFileList),[U,Y]=(0,o.fp)(a.AG.fileShellShow),[B]=(0,o.fp)(a.AG.current_mount),[Z,W]=(0,o.fp)(a.AG.file_root_list),[T,V]=(0,o.fp)(a.AG.file_root_index),[q,J]=(0,i.useState)(void 0),[Q,ee]=(0,i.useState)(""),[te,ne]=(0,o.fp)(a.AG.workflow_show),[ie,se]=(0,o.fp)(a.AG.workflow_realtime_show),[oe,ae]=(0,o.fp)(a.AG.work_flow_show),{initUserInfo:le}=(0,i.useContext)(v.F),[re,ce]=(0,o.fp)(a.AG.user_base_info),{click_file:de}=(0,f.kZ)(),[_e,pe]=(0,o.fp)(a.AG.prompt_card),fe=(0,i.useMemo)(()=>c.files.reduce((e,t)=>e+(t.type!==u.Iw.folder?1:0),0),[c]),he=(0,i.useMemo)(()=>c.files.reduce((e,t)=>e+(t.type===u.Iw.folder?1:0),0)+(c.folders?.length??0),[c]);function ue(e){(0,m.SK)(e)}(0,i.useEffect)(()=>{K={}},[t]),(0,i.useEffect)(()=>()=>{Y({show:!1,path:""})},[]);const me=(0,f.Vs)(),we=t=>{pe({open:!0,title:e("信息"),context_div:(0,D.jsxs)("div",{style:{maxWidth:"25rem"},children:[(0,D.jsx)(X.Yh,{left:e("挂载位置磁盘"),right:t?.total_size}),(0,D.jsx)(X.Yh,{left:`${e("磁盘剩余")}`,right:t?.left_size}),(0,D.jsx)(X.Yh,{left:`${e("文件系统")}`,right:t?.fs_type}),(0,D.jsx)(X.Yh,{left:`${e("文件夹数")}`,right:he}),(0,D.jsx)(X.Yh,{left:`${e("文件数")}`,right:fe}),(0,D.jsx)(X.Yh,{left:`${e("当前位置")}`,right:(0,D.jsx)(N.xP,{context:t?.now_absolute_path})})]}),cancel:()=>{k.ws.removeMsg(G.HK.file_info)}})};return(0,D.jsxs)(i.Fragment,{children:[C.length>0&&(0,D.jsx)($.rA,{icon:"delete",title:e("删除"),onClick:()=>{j({show:!0,type:d.PromptEnum.FilesDelete,overlay:!0,data:{}})}}),C.length>0&&(0,D.jsx)($.rA,{icon:"content_copy",title:e("复制"),onClick:function(){const e=(0,f.ib)(c,C);I(e.map(e=>(0,f.Ok)(e.name))),E([]),ue("已复制")}}),C.length>0&&(0,D.jsx)($.rA,{icon:"content_cut",title:e("剪切"),onClick:function(){const e=(0,f.ib)(c,C);E(e.map(e=>(0,f.Ok)(e.name))),I([]),ue("已剪切")}}),(z.length>0||P.length>0)&&(0,D.jsx)($.rA,{onClick:function(){j({show:!0,type:d.PromptEnum.Confirm,overlay:!0,data:{}})},icon:"content_paste",title:e("粘贴到此处"),tip:z.length+P.length}),C.length>0&&(0,D.jsx)($.rA,{icon:"download",title:e("下载"),onClick:function(){const e=(0,f.ib)(c,C);for(let t=0;t<e.length;t++){const n=e[t];e[t]=encodeURIComponent((0,f.Ok)(n.name))}const t=l.$M.getDownloadUrl(e);window.open(t)}}),C.length>0&&(0,D.jsx)($.rA,{icon:"compress",title:e("压缩"),onClick:function(){const e=(0,f.ib)(c,C);for(let t=0;t<e.length;t++){const n=e[t];e[t]=(0,f.Ok)(n.name)}e&&0!==e.length?j({show:!0,type:d.PromptEnum.Compress,overlay:!0,data:{files:e}}):(0,m.zN)("没有选中")}}),1===C.length&&(0,D.jsx)($.rA,{icon:"edit_attributes",title:e("重命名"),onClick:function(){j({show:!0,type:d.PromptEnum.FileRename,overlay:!0,data:{}})}}),oe&&(0,D.jsx)($.rA,{icon:"api",title:"workflow",onClick:()=>{ne(!te)}}),!B&&(0,D.jsx)($.rA,{icon:"terminal",title:"shell",onClick:function(){U.show?Y({show:!1,path:""}):Y({show:!0,path:(0,_.GG)("file",(0,_.vX)())})}}),s(A.oV.share_file)&&(0,D.jsx)($.rA,{icon:"share",title:e("文件分享"),onClick:()=>{n(`${S.o.share_list_setting_page}`)}}),(0,D.jsx)($.rA,{icon:"grid_view",title:e("切换样式"),onClick:me}),(0,D.jsx)($.rA,{icon:"create_new_folder",title:e("创建文件夹"),onClick:function(){j({show:!0,type:d.PromptEnum.DirNew,overlay:!0,data:{dir:(0,_.GG)("file",(0,_.vX)())}})}}),(0,D.jsx)($.rA,{icon:"note_add",title:e("创建文本文件"),onClick:function(){j({show:!0,type:d.PromptEnum.FileNew,overlay:!0,data:{dir:(0,_.GG)("file",(0,_.vX)())}})}}),(0,D.jsx)($.rA,{icon:"upload_file",title:e("上传"),onClick:()=>{j({show:!0,type:d.PromptEnum.UploadFile,overlay:!0,data:{call:e=>{let t=e.currentTarget?.files;if(!t)return;let n=!!t[0].webkitRelativePath;const i=[],s=new Set;for(let e=0;e<t.length;e++){const o=t[e],a=n?o.webkitRelativePath:`${o.webkitRelativePath}${o.name}`;o.fullPath=a,n&&s.add((0,F.S)(a)),i.push(o)}const o=[];if(n)for(const e of s)o.push({isDir:!0,fullPath:e,name:e});o.push(...i),x(o),j({show:!0,type:d.PromptEnum.FilesUpload,overlay:!1,data:{}})}}})}}),(0,D.jsx)($.rA,{icon:"info",title:e("信息"),onClick:async()=>{let e;if(!K.now_absolute_path){k.ws.addMsg(G.HK.file_info,t=>{const n=t.context;e&&(K={...K,...n},k.ws.removeMsg(G.HK.file_info),we(K))});const t=await k.ws.sendData(G.HK.file_info,{type:u.Iw.folder,path:(0,_.GG)("file",(0,_.vX)())});e=t.context,K=e,we(K)}we(K)}}),(0,D.jsx)($.rA,{icon:"more_vert",title:e("切换目录"),onClick:t=>{const i=new b.ik;i.x=t.clientX,i.y=t.clientY,i.type=u.Iw.directory,i.items=Z,i.item_pre_value=T,i.textClick=async t=>{if(-1===t)return n(`${S.o.setting_private_env_setting}`),j({data:void 0,overlay:!1,type:"",show:!1}),void(0,m.N9)(e("请配置 文件夹路径"));(async e=>{V(e),await l.$M.post("base_switch",{root_index:e}),await le(),n("/file/"),H([]),O([])})(t),j({data:void 0,overlay:!1,type:"",show:!1})},j({show:!0,type:d.PromptEnum.FileMenu,overlay:!1,data:i})}})]})}var L=n(2543),O=n(21499),U=n(64694),Y=n(17903);const B=i.lazy(()=>Promise.all([n.e(7856),n.e(6349),n.e(3659)]).then(n.bind(n,63659))),Z=i.lazy(()=>Promise.all([n.e(7856),n.e(1636)]).then(n.bind(n,81636))),W=i.lazy(()=>Promise.all([n.e(4946),n.e(2626),n.e(8014),n.e(4004)]).then(n.bind(n,95733)));let T,V="";function q(){const[e,t]=(0,o.fp)(a.AG.editorSetting),[,n]=(0,o.fp)(a.AG.md_editor),[,m]=(0,o.fp)(a.AG.log_viewer),[,M]=(0,o.fp)(a.AG.image_editor),[,z]=(0,o.fp)(a.AG.markdown),[,N]=(0,o.fp)(a.AG.excalidraw_editor),[,I]=(0,o.fp)(a.AG.mind_editor),[F,X]=(0,o.fp)(a.AG.file_preview),{t:K}=(0,w.Bd)();let q=(0,r.zy)();const J=(0,r.Zp)(),[Q,ee]=(0,o.fp)(a.AG.nowFileList),[te]=(0,o.fp)(a.AG.file_list_refresh),[ne]=(0,o.fp)(a.AG.mount_enabled),[ie,se]=(0,o.fp)(a.AG.current_mount),[oe,ae]=(0,o.fp)(a.AG.showPrompt),[le,re]=(0,o.fp)(a.AG.selectedFileList),[ce,de]=(0,o.fp)(a.AG.clickFileList),[_e,pe]=(0,o.fp)(a.AG.fileShellShow),[fe,he]=(0,i.useState)(""),[ue,me]=(0,o.fp)(a.AG.workflow_show),[we,ve]=(0,o.fp)(a.AG.workflow_realtime_show),[ge,xe]=(0,o.fp)(a.AG.work_flow_show),{initUserInfo:ye}=(0,i.useContext)(v.F),[je,ke]=(0,o.fp)(a.AG.user_base_info),{check_user_auth:Ge}=(0,g.MH)(),{click_file:Ae}=(0,f.kZ)(),[be]=(0,r.ok)(),Ce=(0,f._A)(),Se=i.useRef(null),[Me,$e]=(0,o.fp)(a.AG.to_running_files),[ze,Ne]=(0,o.fp)(a.AG.file_page),[De]=(0,o.fp)(a.AG.blank_search_mode),[,Ie]=(0,o.fp)(a.AG.prompt_card),[Pe,Ee]=(0,o.fp)(a.AG.blank_search_mode_for_temp),Fe=(0,f.oT)(),Xe="1"===be.get("chat_open"),Re=Ge(A.oV.ai_agent_page);(0,i.useEffect)(()=>{je?.user_data&&Xe&&!Re&&Fe("chat_open",null)},[Xe,Re,je]);const[Ke,He]=(0,o.fp)(a.AG.studio_chat_width),Le=i.useRef(null),[Oe,Ue]=(0,i.useState)(!1),[Ye,Be]=(0,i.useState)(void 0),Ze=(0,_.GG)("file",(0,_.vX)()),We="file_list_chat_session",Te=function(){const[e,t]=(0,o.fp)(a.AG.user_base_info),{t:n}=(0,w.Bd)(),{check_user_auth:s}=(0,g.MH)(),[c,p]=(0,o.fp)(a.AG.router_jump),h=(0,r.Zp)(),{initUserInfo:m}=(0,i.useContext)(v.F),[x,y]=(0,o.fp)(a.AG.nowFileList),[j,C]=(0,o.fp)(a.AG.showPrompt),[M,$]=(0,o.fp)(a.AG.fileShellShow),[z,N]=(0,o.fp)(a.AG.blank_search_mode);return t=>{t.preventDefault(),t.stopPropagation();const i=new b.ik;i.x=t.clientX,i.y=t.clientY,i.type=u.Iw.directory;const o=[{r:(0,D.jsx)("span",{style:(0,R.ok)(e.user_data.dir_show_type===A.t8.time_minx_max),children:n("时间逆序")}),v:A.t8.time_minx_max},{r:(0,D.jsx)("span",{style:(0,R.ok)(e.user_data.dir_show_type===A.t8.time_max_min),children:n("时间顺序")}),v:A.t8.time_max_min}],a=[{r:(0,D.jsx)("span",{style:(0,R.ok)(e.user_data.dir_show_type===A.t8.size_min_max),children:n("大小顺序")}),v:A.t8.size_min_max},{r:(0,D.jsx)("span",{style:(0,R.ok)(e.user_data.dir_show_type===A.t8.size_max_min),children:n("大小逆序")}),v:A.t8.size_max_min}],r=[{r:(0,D.jsx)("span",{style:(0,R.ok)(!e.user_data.file_list_pagination_mode||e.user_data.file_list_pagination_mode===A.yM.all),children:n("全部加载文件")}),v:A.yM.all},{r:(0,D.jsx)("span",{style:(0,R.ok)(e.user_data.file_list_pagination_mode===A.yM.pagination),children:n("scrll_l")}),v:A.yM.pagination}],c=[{r:(0,D.jsx)("span",{style:(0,R.ok)(!e.user_data.file_time_show_type||e.user_data.file_time_show_type===A.KD.current),children:n("最近时间")}),v:A.KD.current},{r:(0,D.jsx)("span",{style:(0,R.ok)(e.user_data.file_time_show_type===A.KD.time),children:n("准确时间")}),v:A.KD.time}],w=[{r:n("文件列表展示"),items:[{r:n("文件排序"),v:"",items:[{r:(0,D.jsx)("span",{style:(0,R.ok)(!e.user_data.dir_show_type),children:n("系统默认")}),v:A.t8.defualt},{r:(0,D.jsx)("span",{style:(0,R.ok)(e.user_data.dir_show_type===A.t8.name),children:n("名字")}),v:A.t8.name},{r:(0,D.jsx)("span",{style:(0,R.ok)(e.user_data.dir_show_type===A.t8.time_minx_max||e.user_data.dir_show_type===A.t8.time_max_min),children:n("修改时间")}),v:!1,items:o},{r:(0,D.jsx)("span",{style:(0,R.ok)(e.user_data.dir_show_type===A.t8.size_min_max||e.user_data.dir_show_type===A.t8.size_max_min),children:n("文件大小")}),v:!1,items:a}]},{r:n("文件加载方式"),v:"",items:r},{r:n("时间展示"),v:"",items:c},{r:n("缩放调整"),v:"zoom_adjust"},{r:(0,D.jsx)("span",{style:(0,R.ok)(z),children:n("srchbln")}),v:"blank_search_mode"}]}];x?.folders?.find(e=>".git"===e.name)&&w.push({r:n("查看Git提交"),v:"git_page"}),s(A.oV.code_resource)&&w.push({r:n("add_rot"),v:"code_resource"}),s(A.oV.http_proxy)&&w.push({r:n("dl_here"),v:"http_resource"}),e?.user_data?.quick_cmd&&(0,f.LL)([...e.user_data.quick_cmd],w),i.items=w,i.textClick=async e=>{if(console.log(e),!1===e)return;const t={};if("gcfg_dir_config"===e){const e=(0,_.GG)("file",(0,_.vX)());return C({data:void 0,overlay:!1,type:"",show:!1}),void h(`${S.o.gcfg_page}/${encodeURIComponent(e)}`)}if("git_page"===e){const e=(0,_.GG)("file",(0,_.vX)());return C({data:void 0,overlay:!1,type:"",show:!1}),void h(`${S.o.git_page}/${encodeURIComponent(e)}`)}if("code_resource"===e){const e=await k.ws.sendData(G.HK.file_info,{path:(0,_.GG)("file",(0,_.vX)())});return p({page_self_router_api_data:[`/api/${Date.now()}`,e.context.now_absolute_path]}),C({data:void 0,overlay:!1,type:"",show:!1}),void h("/setting/customer_router/")}if("http_resource"===e){const e=await k.ws.sendData(G.HK.file_info,{path:(0,_.GG)("file",(0,_.vX)())});return p({http_download_map_path:e.context.now_absolute_path}),C({data:void 0,overlay:!1,type:"",show:!1}),void h("/proxy/http/")}if("zoom_adjust"===e)return C({data:void 0,overlay:!1,type:"",show:!1}),void setTimeout(()=>{C({show:!0,type:d.PromptEnum.ZoomAdjust,overlay:!1,data:{}})},0);if("object"==typeof e&&"quick_cmd"===e.tag){let t=e.cmd;t&&(t.endsWith("\r")||(t+="\r",$({show:!0,path:(0,_.GG)("file",(0,_.vX)()),cmd:t})))}else{if("blank_search_mode"===e)return N(!z),void C({data:void 0,overlay:!1,type:"",show:!1});if(e===A.yM.all||e===A.yM.pagination)t.is_pagination_mode=!0;else if(e===A.KD.current||e===A.KD.time)t.is_file_show_type=!0;else{if(e!==A.t8.defualt&&e!==A.t8.name&&e!==A.t8.size_max_min&&e!==A.t8.size_min_max&&e!==A.t8.time_max_min&&e!==A.t8.time_minx_max)return;t.is_dir_list_type=!0}}await l.wm.post(E.s.user_save_private_attr,{type:e,...t}),await m(),C({data:void 0,overlay:!1,type:"",show:!1}),h((0,_.vX)())},C({show:!0,type:d.PromptEnum.FileMenu,overlay:!1,data:i})}}(),Ve=async()=>{const e=new j.Nd;e.dir_path=`${(0,_.GG)("file",(0,_.vX)())}`,k.ws.addMsg(G.HK.workflow_realtime,e=>{const t=e.context;if(e.context){for(const e of t.sucess_file_list)(0,f.Ys)(e);for(const e of t.failed_file_list)(0,f.V$)(e);$e(new Set(t.running_file_list))}}),await k.ws.sendData(G.HK.workflow_realtime,e)},qe=async e=>{let t=!1;for(const n of e.files??[])n.origin_size=n.size,n.size=(0,x.v7)(n.size),je.user_data.file_time_show_type===A.KD.time?n.show_mtime=n.mtime?(0,O.Yq)(n.mtime):"":n.show_mtime=n.mtime?(0,y.s)(n.mtime):"",t||!n.name.endsWith(".workflow.yml")&&!n.name.endsWith(".act")||(t=!0,Promise.resolve().then(()=>{Ve()})),n.name===j.SB&&(t=!0);for(const n of e.folders??[])je.user_data.file_time_show_type===A.KD.time?n.show_mtime=n.mtime?(0,O.Yq)(n.mtime):"":n.show_mtime=n.mtime?(0,y.s)(n.mtime):"",n.name===j.SB&&(t=!0);xe(t)},Je=i.useRef(null),Qe=async e=>{if(!0===ne){if(Je.current!==e){Je.current=e;try{const t=await l.$M.post("file/mount_info",{param_path:e});se(t?.data??null)}catch(e){se(null)}}}else se(null)},et=async()=>{const e=(0,_.GG)("file",(0,_.vX)());if(De||Pe)return;let t;if(Qe(e),je.user_data.file_list_pagination_mode===A.yM.pagination){if(V!==e){if(V=e,1!==ze.page_num)return void Ne({page_size:ze.page_size,page_num:1})}else if(ze.page_num<0)return;if(t=await l.$M.post("file_get_page",{param_path:e,page_num:ze.page_num,page_size:ze.page_size}),t.code!==p.m.Success)return;const n=t.data;return qe(n),n.files?.length?(ee(e=>{const t=(0,L.cloneDeep)(1===ze.page_num?n.files:[...e?.files??[],...n.files]),i={...e,files:t};return(0,f.yC)(i,je.user_data.dir_show_type),i}),void(T=t.data)):void Ne({page_size:ze.page_size,page_num:-1})}if(t=await l.$M.get(e),t.code!==p.m.Success)return;const n=t.data;(0,f.yC)(n,je.user_data.dir_show_type),qe(t.data),ee(t.data),T=t.data};(0,i.useEffect)(()=>async()=>{$e(new Set)},[]);const tt=()=>{xe(!1),(()=>{const e=be.get("preview_file_name"),t=be.get("preview_mode");if(!e||!t)return!1;const i=(0,_.GG)("file",(0,_.vX)());if(Se.current===i+e)return!0;Se.current=i+e;const s=()=>Ce(null);return"md"===t?(n({url:l.$M.getDownloadUrl(`${encodeURIComponent(i)}${e}`),path:`${i}${e}`,name:e,close:s}),!0):"log"===t?(m({show:!0,fileName:e,encoding:be.get("preview_log_enc")??"utf8",wrap:be.get("preview_log_wrap")??"wrap",close:s}),!0):"image_edit"===t?(M({path:(0,U.IO)((0,_.vX)(),e),name:e,close:s}),!0):(Ae({name:e,opt_shell:!0,..."text"===t?{model:"text"}:{},close:s}),!0)})()||(t({open:!1}),X({open:!1}),n({}),m({show:!1}),M({}),z({}),N({}),I({}),et())};(0,i.useEffect)(()=>{tt()},[q,ze]),(0,i.useEffect)(()=>{te>0&&et()},[te]);const nt=i.useRef(!1);(0,i.useEffect)(()=>{if(null!==ne)return nt.current?void(!0===ne?Qe((0,_.GG)("file",(0,_.vX)())):se(null)):(nt.current=!0,void(!0===ne&&null===ie&&Qe((0,_.GG)("file",(0,_.vX)()))))},[ne]);const it=e=>{e.target===e.currentTarget&&(re([]),de([]))},st=i.useCallback((0,L.throttle)(e=>{const t=Le.current;if(!t||!t.parentElement)return;const n=parseFloat(getComputedStyle(t).fontSize),i=t.parentElement.getBoundingClientRect(),s=i.right-e.clientX,o=Math.min(Math.max(s,320),.7*i.width);He(parseFloat((o/n).toFixed(2)))},32),[]),ot=()=>{Ue(!1),document.removeEventListener("pointermove",st)},at=(0,D.jsxs)("div",{className:"file-list-main",children:[(0,D.jsx)(s.e,{baseRoute:"file",clickFun:function(){if(re([]),de([]),je.user_data.file_list_pagination_mode===A.yM.pagination){const e=document.getElementById("listing");e&&(e.scrollTop=0),Ne({page_size:ze.page_size,page_num:1})}},input_path_enter:e=>{var t;re([]),de([]),ee({files:[],folders:[]}),!function(e){return"string"==typeof e&&0!==e.length&&(/^[a-zA-Z]:[\\\/]/.test(e)||/^\\\\[^\\/]+[\\/]/.test(e)||/^\//.test(e))}(e)?J(function(e,t){let n=function(e){let t="\\";for(const n of e)if("/"===n||"\\"===n){t=n;break}return t}(e);if("."===t)return e;if(".."===t){if(e.length>1){let t=e[e.length-1]===n?1:0;for(let i=e.length-1-t;i>=0;i--)if(e[i]===n)return e.substring(0,i+1)}return e}return e.endsWith(n)&&t.startsWith(n)?e.slice(0,-1)+t:e.endsWith(n)||t.startsWith(n)?e+t:e+n+t}((0,_.vX)(),e)):(e=e.replace(0===(t=je.user_data).folder_item_now||void 0===t.folder_item_now?t.cwd:t.folder_items[t.folder_item_now-1].path,""),J(e))}}),ie&&(0,D.jsxs)("div",{className:"mount-tip-bar",style:{borderLeftColor:ie.color},children:[(0,D.jsx)("span",{className:"material-icons",style:{color:ie.color},children:"cloud"}),(0,D.jsx)("span",{children:[ie.credential_note,ie.account_note||(Y.C1.find(e=>e.value===ie.driver)?.title??ie.driver),ie.name].filter(Boolean).join(" - ")}),ie.readonly&&(0,D.jsx)("span",{className:"mount-readonly-tag",children:K("只读")})]}),je.user_data.file_list_pagination_mode===A.yM.pagination?(0,D.jsx)(C.$J,{handleContextMenu:Te,clickBlank:it,list:Q.files}):(0,D.jsx)(C.t$,{handleContextMenu:Te,file_list:Q.files,folder_list:Q.folders,clickBlank:it})]});return(0,D.jsxs)(i.Fragment,{children:[(0,D.jsx)(c.aZ,{children:(0,D.jsx)(h.$Z,{handleEnterPress:async()=>{if(De||Pe){if(re([]),de([]),!fe||!fe.trim())return void ee({files:[],folders:[]});const e=(0,_.GG)("file",(0,_.vX)()),t=await l.$M.post("file_get_page",{param_path:e,page_num:1,page_size:1e4,search:fe.trim()});if(t.code!==p.m.Success)return;const n=t.data;return(0,f.yC)(n,je.user_data.dir_show_type),qe(n),ee(n),void(T=n)}if(!T)return;re([]),de([]);const e=[],t=[];for(const t of T.files??[])t.name.includes(fe)&&e.push(t);for(const e of T.folders??[])e.name.includes(fe)&&t.push(e);ee({files:e,folders:t})},placeholder:K("搜索当前目录"),icon:"search",value:"",mobile_hidden:!0,handleIconClick:()=>{const e=(0,_.GG)("file",(0,_.vX)());Ie({open:!0,title:K("深搜"),context_div:(0,D.jsx)(P,{base_path:e})})},handleInputChange:e=>{he(e)},max_width:"25em"})}),(0,D.jsxs)(c.aZ,{position:"right",children:[Ge(A.oV.ai_agent_page)&&(0,D.jsx)($.rA,{icon:"smart_toy",title:K("AI 聊天"),selected:Xe,onClick:()=>Fe("chat_open",!Xe?"1":null)}),(0,D.jsx)("div",{className:"mobile-context-btn",children:(0,D.jsx)($.rA,{icon:"more_horiz",title:K("右键"),onClick:()=>{const e=le[le.length-1];if(void 0!==e){const t=[...Q.folders??[],...Q.files??[]][e];if(t){const n=document.querySelectorAll(".item")[e],i=n?n.getBoundingClientRect():{left:window.innerWidth/2,bottom:100},s={preventDefault:()=>{},stopPropagation:()=>{},clientX:i.left+10,clientY:i.bottom??100},o=new b.ik;o.path=(0,U.IO)((0,_.vX)(),t.name),o.filename=t.name,o.x=s.clientX,o.y=s.clientY,o.type=t.type===u.Iw.folder?u.Iw.folder:(0,b.uL)(t.name),o.size=t.origin_size,ae({show:!0,type:d.PromptEnum.FileMenu,overlay:!1,data:o})}}else{const e={preventDefault:()=>{},stopPropagation:()=>{},clientX:window.innerWidth/2,clientY:window.innerHeight/2};Te(e)}}})}),(0,D.jsx)(H,{})]}),(0,D.jsxs)("div",{className:"file-list-split"+(Xe?" file-list-split--chat":""),children:[at,Xe&&(0,D.jsxs)(i.Fragment,{children:[(0,D.jsx)("div",{className:"studio__divider studio__divider--chat",ref:Le,onPointerDown:e=>{e.preventDefault(),Ue(!0),document.addEventListener("pointermove",st),document.addEventListener("pointerup",ot,{once:!0})}}),(0,D.jsx)("div",{className:"studio-chat-panel",style:{width:`${Ke}em`},children:(0,D.jsx)(i.Suspense,{fallback:null,children:(0,D.jsx)(W,{inline_header:!0,sync_url:!1,file_cwd_path:Ze,session_id:Ye??(e=>{try{const t=sessionStorage.getItem(We);if(!t)return;return JSON.parse(t)?.[e]||void 0}catch{return}})(Ze),on_session_change:e=>{Be(e),((e,t)=>{try{const n=sessionStorage.getItem(We),i=n?JSON.parse(n):{};i[e]=t,sessionStorage.setItem(We,JSON.stringify(i))}catch{}})(Ze,e)}})})})]})]}),Oe&&(0,D.jsx)("div",{className:"shell__overlay",onPointerUp:ot}),ue&&(0,D.jsx)(B,{}),we.open&&(0,D.jsx)(Z,{})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9324],{99324(e,c,a){a.d(c,{createEventModelingServices:()=>s.g});var s=a(30807);a(80369)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9364],{79364(e,a,c){c.d(a,{createGitGraphServices:()=>s.b});var s=c(80438);c(80369)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9463],{69463(e,c,a){a.d(c,{createTreeViewServices:()=>s.I});var s=a(76322);a(80369)}}]);
|
package/build/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><base href="/"><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>{{{web_site_title}}}</title><link rel="icon" href="{{{logo_favicon}}}"/><script defer="defer" src="main.
|
|
1
|
+
<!doctype html><html lang="en"><head><base href="/"><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>{{{web_site_title}}}</title><link rel="icon" href="{{{logo_favicon}}}"/><script defer="defer" src="main.3a12152528aff6ae213a.js"></script></head><body><div id="root"></div></body><script id="pre_code" type="text/template">return {{{Windows_FileCat}}};</script><script>window.EXCALIDRAW_ASSET_PATH = "/";window.FileCat;</script></html>
|