filecat 7.22.0 → 7.22.3
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/3355.ea8a68a00145fb3347ed.js +1 -0
- package/build/dist/4598.a4129c1f9642c416a049.js +1 -0
- package/build/dist/47.31cca3ecbb1f0236ac36.js +1 -0
- package/build/dist/6097.cc18f61140ca6d36f8fd.js +1 -0
- package/build/dist/7678.33fd91fd127f794d99ee.js +1 -0
- package/build/dist/9202.7c107ee16bf7835558aa.js +1 -0
- package/build/dist/9260.17be02cb73bfc35b0db0.js +1 -0
- package/build/dist/9765.e708812437042d086ec2.js +1 -0
- package/build/dist/{991.2ff5a3ada566cb075df6.js → 991.82389c18b49e68b2a67f.js} +1 -1
- package/build/dist/index.html +1 -1
- package/build/dist/main.1859ab75795aabae2f60.js +2 -0
- package/build/main.js +1 -1
- package/package.json +1 -1
- package/build/dist/3355.221b11ae8755cb58412f.js +0 -1
- package/build/dist/4598.48aad39fc631a51c30d3.js +0 -1
- package/build/dist/47.423c0f43594850475f8d.js +0 -1
- package/build/dist/6097.3b8a75477b58137301a6.js +0 -1
- package/build/dist/7678.b2889b36fac2b90a9061.js +0 -1
- package/build/dist/9202.acca2abe478020a45f13.js +0 -1
- package/build/dist/9260.2f474cb25f7647cb995a.js +0 -1
- package/build/dist/9765.15869054c7b8e56ccc76.js +0 -1
- package/build/dist/main.19ecdddaf894b36f1a47.js +0 -2
- /package/build/dist/{main.19ecdddaf894b36f1a47.js.LICENSE.txt → main.1859ab75795aabae2f60.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[991],{20734(e,t,n){n.d(t,{A:()=>l});var s=n(96540),r=n(48890),a=n(74848);function l({valueA:e,valueB:t,mode:n="split",theme:l,filename:o}){const c=(0,s.useRef)(null),i=(0,s.useRef)(null),d=(0,s.useMemo)(()=>o&&r.Tt.getModeForPath(o).mode||"ace/mode/text",[o]);return(0,s.useEffect)(()=>{const s=c.current;if(!s)return;const a=r.Kw.require("ace/ext/diff"),o={valueA:e??"",valueB:t??"",diffProvider:new a.DiffProvider},h="inline"===n,u=h?new a.InlineDiffView({...o,inline:"a"},s):new a.SplitDiffView(o);h||(u.container=s,s.appendChild(u.editorA.container),s.appendChild(u.editorB.container)),l&&u.setTheme(l),u.editorA?.session.setMode(d),u.editorB?.session.setMode(d),u.onInput(),u.foldUnchanged();const x=requestAnimationFrame(()=>{u.editorA?.resize(!0),u.editorB?.resize(!0)});return i.current=u,()=>{cancelAnimationFrame(x);try{u.destroy()}catch(e){}i.current=null,s.innerHTML=""}},[e,t,n,l,d]),(0,a.jsx)("div",{className:"ace-diff",ref:c})}},77481(e,t,n){n.d(t,{S:()=>o,X:()=>l});var s=n(96540),r=n(61443),a=n(74848);function l(e){const[t,n]=s.useState([]),l=(0,s.useRef)(-1),[o,c]=(0,s.useState)(-1),[i,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 h=()=>{l.current=-1,c(-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 l=t;if(s){const n=e.filter,s=n.options.find(e=>e.value===n.value);null!=n.value&&s&&(l=`${t} (${s.label})`)}return(0,a.jsx)("th",{className:s?"table-filter-col":"",children:s?(0,a.jsx)(r.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:l}):t},n)})})}),(0,a.jsx)("tbody",{children:t.map((t,n)=>{const s=!!e.onRowDrag;return(0,a.jsx)("tr",{className:s?(o===n?"row-dragging":"")+(i===n?" row-drop-target":""):"",draggable:s,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{s&&(l.current=n,c(n),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!s||l.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(n))},onDrop:t=>{s&&(t.preventDefault(),(()=>{const t=l.current,n=i;h(),t<0||n<0||t===n||e.onRowDrag?.(t,n)})())},onDragEnd:h,children:t.map((n,s)=>{const r=s===t.length-1?"small":"";return(0,a.jsx)("td",{className:r,style:{width:e.width??"auto"},children:n},s)})},n)})})]})}function o(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))})}},48890(e,t,n){n.d(t,{Kw:()=>s,Tt:()=>r});var s=n(80952),r=(n(82327),n(1766),n(24854),n(90008),n(90846),n(40975),n(44286),n(30766),n(14973),n(69687),n(1234),n(47507),n(87268),n(55208),n(34678),n(24522));const a=`https://gcore.jsdelivr.net/npm/ace-builds@${s.version}/src-min-noconflict/`;s.config.set("basePath",a),s.config.set("modePath",a),s.config.set("themePath",a),s.config.set("workerPath",a)},83029(e,t,n){n.d(t,{N:()=>g});var s=n(96540),r=n(34843),a=n(82893),l=n(74848);function o(e){const[t,n]=(0,r.fp)(a.AG.user_base_info);return(0,l.jsx)("div",{children:e.div?(0,l.jsx)("div",{className:"nav_list_a",style:{background:e.color},children:e.name}):e.clickItem||"dir"===e._type?(0,l.jsx)("div",{className:"nav_list_a",style:{background:e.color},onClick:()=>{"dir"!==e._type?e.clickItem&&e.clickItem(e):e.click_dir(e.item)},children:e.name}):(0,l.jsx)("a",{href:e.url,target:e.target,className:"nav_list_a",style:{background:e.color},children:e.name})})}var c=n(64694),i=n(61443),d=n(85997),h=n(52671),u=n(22022);const x=["#ffffff","#fefff8","#fcfdf1","#d3d2dc","#f8f9fd","#ebf4fe","#ebebeb","#e8f7eb","#eaf2f9"];let p,m,f=[];const j=[];function g(e){const[t,n]=(0,s.useState)([]),[g,v]=(0,s.useState)(-1),b=(0,h.zy)(),[w,S]=(0,s.useState)(!1),[C,y]=(0,s.useState)(!1),{t:N}=(0,u.Bd)(),[_,k]=(0,s.useState)([]),[I,A]=(0,r.fp)(a.AG.nav_index_add_item_by_now_list),P=e=>{-1!==g?j[g]._children=e:f=e};(0,s.useEffect)(()=>{(async()=>{if(!e.getItems)return;const t=await e.getItems();f=t,n(f)})()},[b]);(0,s.useEffect)(()=>{if(I){const e=[...t,{name:"",color:(0,c.Lr)(x),...I}];P(e),n(e),S(!0),A(void 0)}},[I]);const M=e=>{v(g+1),n(e._children),j.push(e)};return(0,l.jsxs)("div",{className:"nav_list_div scroll-div-y",children:[-1!==g&&(0,l.jsx)(d.rA,{title:"返回",icon:"arrow_back",onClick:()=>{n(0===g?f:j[g-1]._children),v(g-1),j.pop()}}),t.map((r,a)=>(0,l.jsxs)("div",{draggable:!0,onDragOver:e=>{e.preventDefault()},onDragStart:e=>((e,t)=>{p=t})(0,a),onDrop:e=>((e,s)=>{e.preventDefault();const r=t[p],a=t[s];if(a&&"dir"===a._type){const e=[...t];return e.splice(p,1),a._children||(a._children=[]),a._children.push(r),P(e),void n(e)}const l=[...t],o=l[p];l.splice(p,1),l.splice(s,0,o),P(l),n(l)})(e,a),style:{cursor:w?"move":"pointer"},children:[(0,l.jsx)(o,{name:r.name,item:r,...r,div:w,target:"_blank",click_dir:M,clickItem:e.clickItem}),w&&(void 0!==_.find(e=>e===a)||C)&&(0,l.jsxs)("div",{className:C?"":" site_edit ",children:["dir"===r._type?(0,l.jsxs)(s.Fragment,{children:[(0,l.jsx)(i.Sm,{value:r.name,handleInputChange:e=>{r.name=e},placeholder:N("输入类目名"),no_border:!0}),(0,l.jsx)(i.Sm,{value:r.color,type:"color",handleInputChange:e=>{r.color=e},placeholder:"color",no_border:!0})]}):e.items.map((e,t)=>(0,l.jsx)("div",{children:(0,l.jsx)(i.Sm,{value:r[e.key],type:"color"===e.key?"color":void 0,handleInputChange:t=>{r[e.key]=t},placeholder:e.preName,no_border:!0})},t)),!C&&(0,l.jsx)(d.C3,{text:N("折叠"),clickFun:()=>{k((0,c.P1)(_,a))}})]}),w&&(0,l.jsx)("div",{style:{display:"block"},children:(0,l.jsxs)("span",{className:"div-row ",children:[(0,l.jsx)(d.C3,{text:N("删除"),clickFun:()=>{(e=>{const s=[...t];s.splice(e,1),P(s),n(s)})(a)}}),(0,l.jsx)(d.C3,{text:N("编辑"),clickFun:()=>{void 0===_.find(e=>e===a)&&k([..._,a])}})]})})]},a)),w&&(0,l.jsxs)("div",{style:{display:"block"},children:[(0,l.jsx)(d.rA,{title:N("取消"),icon:"cancel",onClick:()=>{k([]),S(!1),m&&(n(m),P(m)),y(!1)}}),(0,l.jsx)(d.rA,{title:N("添加"),icon:"add",onClick:async()=>{const s=[...t,{name:"",color:(0,c.Lr)(x),...e.get_pre_add_item&&await e.get_pre_add_item()}];P(s),n(s)}}),(0,l.jsx)(d.rA,{title:N("添加类目"),icon:"add_box",onClick:()=>{const e=[...t,{name:"",_type:"dir",_children:[],color:"#c1edfb"}];P(e),n(e)}}),(0,l.jsx)(d.rA,{title:N("全部编辑"),icon:C?"unfold_less":"unfold_more",onClick:()=>{y(!C)}})]}),(void 0===e.have_auth_edit||!0===e.have_auth_edit)&&(0,l.jsx)(d.rA,{icon:w?"save":"edit",title:N(w?"保存":"编辑"),onClick:async()=>{w?e.save&&await e.save(f):m=t,S(!w)}})]})}},30991(e,t,n){n.r(t),n.d(t,{default:()=>Ne});var s=n(96540),r=n(75725),a=n(61443),l=n(70447),o=n(85997),c=n(34289),i=n(22022),d=n(62042),h=n(14284),u=n(53459),x=n(74848);function p(e){const{t}=(0,i.Bd)(),[n,p]=(0,s.useState)(t("毫秒")),[m,f]=(0,s.useState)(""),[j,g]=(0,s.useState)(""),[v,b]=(0,s.useState)(null),[w,S]=(0,s.useState)(null),[C,y]=(0,s.useState)(Date.now());return(0,s.useEffect)(()=>{(async()=>{const e=await h.Yu.get("sys_time/get");if(e.code===u.m.Success){const t=await e.data;b(t.timestamp),S(t.timezone),y(t.timestamp)}})();const e=setInterval(()=>{y(e=>e+1e3)},1e3);return()=>clearInterval(e)},[]),(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:33,children:(0,x.jsxs)(l.Zp,{title:t("时间转换器"),rightBottomCom:(0,x.jsx)(o.C3,{text:t("确定"),clickFun:function(){if(!m&&!j)return void(0,d.zN)(t("不能都为空"));let e=0;const s=""!==m&&0!==m;if(s){if(!(0,c.kf)(m))return void(0,d.zN)("must be number !");e=parseInt(m),"分秒"===n&&(e*=1e3)}const r=new Date(s?e:j),a=new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(r);if(g(a),!m){const e=r.getTime();f("毫秒"===n?e:e/1e3)}}}),children:[(0,x.jsx)(a.l6,{value:n,options:[{title:t("毫秒"),value:"毫秒"},{title:t("分秒"),value:"分秒"}],onChange:function(e){p(e)}}),(0,x.jsx)(a.Sm,{placeholder:n,value:m,handleInputChange:e=>{f(e)}}),(0,x.jsx)(a.Sm,{placeholder:t("格式化时间"),value:j,handleInputChange:e=>{g(e)}})]})}),(0,x.jsx)(r.VP,{children:null!==v&&null!==w&&(0,x.jsxs)(l.Zp,{title:t("服务器时间"),children:[(0,x.jsxs)("h1",{children:[t("时区"),": ",w]}),(0,x.jsxs)("h1",{children:[t("时间"),": ",new Date(C).toLocaleString(navigator.language,{timeZone:w})]})]})})]})}var m=n(4412),f=n(83029),j=n(78247),g=n(23430);function v(e){const{t}=(0,i.Bd)(),{check_user_auth:n}=(0,j.MH)(),[r,l]=(0,s.useState)(""),c=async e=>{const n=e||r;if(!n)return void(0,d.zN)(t("mac地址不能为空"));(await h._U.post("wol/exec",{mac:n})).code===u.m.Success&&(0,d.SK)(t("发送唤醒命令成功"))};return(0,x.jsxs)("div",{children:[(0,x.jsxs)(m.aZ,{position:"right",children:[(0,x.jsx)(o.rA,{icon:"play_arrow",title:t("发送"),onClick:()=>{c()}}),(0,x.jsx)(a.$Z,{placeholder:t("mac_dst"),icon:"laptop_mac",value:r,handleInputChange:e=>l(e)})]}),(0,x.jsx)(f.N,{have_auth_edit:n(g.oV.wol_proxy_tag_update),getItems:async()=>{const e=await h._U.get("wol/tag");return e.code===u.m.Success?e.data:[]},save:async e=>{(await h._U.post("wol/tag/save",e)).code!==u.m.Success&&(0,d.zN)(t("网络错误"))},clickItem:async e=>{l(e.mac),c(e.mac)},items:[{key:"name",preName:t("名字")},{key:"mac",preName:"mac"+t("地址")},{key:"color",preName:"color"}]})]})}var b=n(77481),w=n(34843),S=n(82893),C=n(40505);let y;function N(){const[e,t]=(0,s.useState)("rsa"),[n,c]=(0,s.useState)("pem"),{t:p,i18n:f}=(0,i.Bd)(),[j,g]=(0,w.fp)(S.AG.confirm),[v,N]=(0,s.useState)(""),[_,k]=(0,s.useState)(""),I=async t=>{if(!_||!v)return void(0,d.zN)(p("密钥不能为空"));let n="id_"+e;"pub"===t&&(n+=".pub"),g({open:!0,title:p("将覆盖密钥文件"),sub_title:`之前的密钥将作废。 将会作为 ${n} 文件保存到系统上的"${y}"目录下,此目录会作为openssh(git)所使用的默认目录。`,handle:async()=>{(await h.cD.post("save_openssh",{name:n,context:"pub"===t?v:_})).code===u.m.Success&&((0,d.SK)(p("完成")),g({open:!1,handle:null}))}})};return(0,x.jsxs)(s.Fragment,{children:[(0,x.jsx)(m.aZ,{position:"right",children:(0,x.jsx)(b.S,{isFlex:!0,columns:[(0,x.jsx)(a.l6,{tip:p("加密算法"),value:e,width:"auto",onChange:e=>{t(e)},options:[{title:p("RSA"),value:"rsa"},{title:p("DSA"),value:"dsa"},{title:p("ECDSA"),value:"ecdsa"}]}),(0,x.jsx)(a.l6,{tip:p("输出格式"),value:n,width:"auto",onChange:e=>{c(e)},options:[{title:p("普通PEM"),value:"pem"},{title:p("opensshPEM"),value:"openssh_pem"}]}),(0,x.jsx)(o.rA,{icon:"play_arrow",title:p("生成"),onClick:()=>{(async()=>{const t=await h.cD.post("generate",{type:e,form:n});t.code===u.m.Success&&(N(t.data.public_key),k(t.data.private_key),y=t.data.home_path)})()}})]})}),(0,x.jsx)(r.xh,{children:(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{children:(0,x.jsx)(l.Zp,{title:p("公钥"),rightTopCom:(0,x.jsx)(o.rA,{title:p("复制"),icon:"copy_all",onClick:()=>{v&&((0,C.lW)(v),(0,d.SK)(p("完成")))}}),rightBottomCom:"openssh_pem"===n&&(0,x.jsx)(o.C3,{text:p("ssh_dir"),clickFun:()=>{I("pub")}}),children:(0,x.jsx)(a.Z2,{style:{width:"100%",height:"270px"},onChange:e=>{N(e.target.value)},value:v})})}),(0,x.jsx)(r.VP,{children:(0,x.jsx)(l.Zp,{title:p("私钥"),rightTopCom:(0,x.jsx)(o.rA,{title:p("复制"),icon:"copy_all",onClick:()=>{_&&((0,C.lW)(_),(0,d.SK)(p("成功")))}}),rightBottomCom:"openssh_pem"===n&&(0,x.jsx)(o.C3,{text:p("ssh_dir"),clickFun:()=>{I("pri")}}),children:(0,x.jsx)(a.Z2,{style:{width:"100%",height:"270px"},value:_,onChange:e=>{k(e.target.value)}})})})]})})]})}var _=n(14944),k=n(92275);function I(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)(""),[c,h]=(0,s.useState)("1"),[u,p]=(0,s.useState)("65535"),[m,f]=(0,s.useState)("100"),[j,g]=(0,s.useState)("2000"),[v,w]=(0,s.useState)(!1),[S,C]=(0,s.useState)(null),[y,N]=(0,s.useState)([]),[I,A]=(0,s.useState)(null),P=(0,s.useRef)([]),M=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(!M.current)return M.current=!0,_.ws.addMsg(k.HK.port_scan_progress,e=>{C(e.context)}),_.ws.addMsg(k.HK.port_scan_result,e=>{const t=e.context,n=[...P.current,t];P.current=n,N(n)}),_.ws.addMsg(k.HK.port_scan_end,t=>{A(t.context),w(!1),t.context.cancelled?(0,d.zN)(e("扫描已取消")):(0,d.SK)(e("扫描完成"))}),()=>{_.ws.sendData(k.HK.port_scan_cancel,{}),_.ws.removeMsg(k.HK.port_scan_progress),_.ws.removeMsg(k.HK.port_scan_result),_.ws.removeMsg(k.HK.port_scan_end),M.current=!1}},[]);return(0,x.jsx)(r.xh,{children:(0,x.jsx)(r.fI,{children:(0,x.jsx)(r.VP,{children:(0,x.jsxs)(l.Zp,{title:e("TCP ")+e("端口扫描"),rightTopCom:(0,x.jsxs)("span",{children:[S&&(0,x.jsxs)("span",{children:[e("已发现"),": ",S.openCount]}),I&&(0,x.jsxs)("span",{children:[e("总计扫描"),": ",I.totalScanned," | ",e("开放"),": ",I.totalOpen]})]}),rightBottomCom:v?(0,x.jsx)(o.C3,{text:e("取消"),clickFun:()=>{_.ws.sendData(k.HK.port_scan_cancel,{}).catch(()=>{})}}):(0,x.jsx)(o.C3,{text:e("扫描"),clickFun:()=>(()=>{if(!t)return void(0,d.zN)(e("hostreq"));const n=parseInt(c),s=parseInt(u);isNaN(n)||isNaN(s)||n<1||s<1||n>65535||s>65535?(0,d.zN)(e("端口范围无效")):n>s?(0,d.zN)(e("portrng")):(w(!0),C(null),N([]),P.current=[],A(null),_.ws.sendData(k.HK.port_scan_req,{host:t,startPort:n,endPort:s,concurrency:parseInt(m)||100,timeout:parseInt(j)||2e3}).catch(()=>{}))})()}),children:[(0,x.jsx)(a.Sm,{placeholder:e("目标主机"),value:t,handleInputChange:e=>n(e)}),(0,x.jsx)(a.Sm,{placeholder:e("起始端口"),value:c,handleInputChange:e=>h(e)}),(0,x.jsx)(a.Sm,{placeholder:e("结束端口"),value:u,handleInputChange:e=>p(e)}),(0,x.jsx)(a.Sm,{placeholder:e("并发数"),value:m,handleInputChange:e=>f(e)}),(0,x.jsx)(a.Sm,{placeholder:e("超时(ms)"),value:j,handleInputChange:e=>g(e)}),v&&S&&(0,x.jsxs)("div",{children:[(0,x.jsxs)("p",{children:[e("已扫描"),": ",S.scanned," / ",S.total]}),(0,x.jsx)(l.gz,{progress:S.percent})]}),y.length>0&&(0,x.jsx)(b.X,{headers:[e("端口"),e("状态")],rows:y.map(t=>[t.port,(0,x.jsx)("span",{children:e("开放")})])}),v&&0===y.length&&(0,x.jsx)("p",{children:e("正在扫描...")}),!v&&I&&0===y.length&&(0,x.jsx)("p",{children:e("未发现开放端口")}),!v&&!I&&0===y.length&&(0,x.jsx)("p",{children:e("scan_in")})]})})})})}var A=n(48890);const P=(0,s.forwardRef)(function({value:e="",mode:t="plain_text",showLineNumbers:n=!0,wrap:r=!1,readOnly:a=!1,onChange:l,onCursorChange:o,onSave:c,className:i,style:d,options:h},u){const p=(0,s.useRef)(null),m=(0,s.useRef)(null),[f]=(0,w.fp)(S.AG.user_base_info),j=f.user_data.theme?.includes("dark")?"cloud_editor_dark":"cloud9_day",g=(0,s.useRef)({onChange:l,onCursorChange:o,onSave:c});return g.current={onChange:l,onCursorChange:o,onSave:c},(0,s.useImperativeHandle)(u,()=>({getValue:()=>m.current?.getValue()??"",setValue:(e,t=!1)=>{const n=m.current;if(n&&(n.setValue(e,-1),t)){const e=n.getSession();e.indentAll?.()}},getEditor:()=>m.current,getCursorOffset:()=>{const e=m.current;return e?e.session.doc.positionToIndex(e.getCursorPosition(),0):0},setCursorOffset:e=>{const t=m.current;if(!t)return;const n=t.session.doc.indexToPosition(Math.max(0,e),0);t.selection.moveCursorTo(n.row,n.column),t.selection.clearSelection(),t.scrollToLine(n.row,!0,!1,()=>{})},focus:()=>m.current?.focus()}),[]),(0,s.useEffect)(()=>{const s=p.current;if(!s)return;const l=A.Kw.edit(s,{value:e,mode:`ace/mode/${t}`,theme:`ace/theme/${j}`,showPrintMargin:!1,highlightActiveLine:!1,fontSize:14,readOnly:a,showLineNumbers:n,showGutter:n,wrap:r,useWorker:!1,...h});return l.on("change",()=>{g.current.onChange?.(l.getValue())}),l.selection.on("changeCursor",()=>{g.current.onCursorChange?.()}),l.commands.addCommand({name:"filecat_save",bindKey:{win:"Ctrl-S",mac:"Command-S"},exec:()=>{g.current.onSave?.()},readOnly:!0}),m.current=l,()=>{l.destroy(),m.current=null}},[]),(0,x.jsx)("div",{ref:p,className:i,style:d})});var M=n(20382),T=n(63398),D=n(55921),V=n(63963);const $={json:"json",yaml:"yaml",toml:"toml",xml:"xml",properties:"properties"},W="#text",F=new D.A({ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:W,parseAttributeValue:!0,parseTagValue:!0,trimValues:!0,isArray:()=>!1}),E=new V.A({ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:W,format:!0,indentBy:" ",suppressEmptyNode:!0});function Z(e){return e.replace(/\\(u[0-9a-fA-F]{4}|.)/g,(e,t)=>"u"===t[0]?String.fromCharCode(parseInt(t.slice(1),16)):"n"===t?"\n":"t"===t?"\t":"r"===t?"\r":t)}function U(e){return e.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}function B(e,t){if(""===e.trim())return null;if("json"===t)return JSON.parse(e);if("yaml"===t)return M.Hh(e);if("toml"===t)return(0,T.qg)(e);if("properties"===t)return function(e){const t={},n=[];let s="";for(const t of e.split(/\r?\n/)){if(""===s&&""===t.trim())continue;const e=s+t,r=e.match(/\\+$/);null!==r&&r[0].length%2==1?s=e.slice(0,-1):(n.push(e),s="")}""!==s&&n.push(s);for(const e of n){const n=e.trimStart();if(""===n||n.startsWith("#")||n.startsWith("!"))continue;let s=-1;for(let t=0;t<e.length;t++){const n=e[t];if("\\"!==n){if("="===n||":"===n){s=t;break}}else t++}const r=-1===s?e:e.slice(0,s),a=-1===s?"":e.slice(s+1),l=Z(r.trim());""!==l&&(t[l]=Z(a.trim()))}return t}(e);const n=F.parse(e);return n&&"object"==typeof n&&delete n["?xml"],n}function H(e,t){if("json"===t)return JSON.stringify(e,null,2);if("yaml"===t)return M.Bh(e,{indent:2,lineWidth:-1,noRefs:!0});if("toml"===t){if(null===e||"object"!=typeof e||Array.isArray(e))throw new Error("TOML 顶层必须是对象,无法转换标量或数组");return(0,T.As)(e)}if("properties"===t)return function(e){if(null===e||"object"!=typeof e)throw new Error("Properties 顶层必须是对象,无法转换标量");const t=[],n=(e,s)=>{if(null!=e)if(Array.isArray(e))e.forEach((e,t)=>n(e,""===s?String(t):`${s}.${t}`));else if("object"!=typeof e)""!==s&&t.push(`${U(s)}=${U(String(e))}`);else for(const[t,r]of Object.entries(e))n(r,""===s?t:`${s}.${t}`)};return n(e,""),t.join("\n")}(e);if(null===e||"object"!=typeof e)throw new Error("XML 顶层必须是对象,无法转换标量");if(Array.isArray(e))throw new Error("XML 顶层必须是对象,无法转换数组");return 1===Object.keys(e).length?E.build(e):E.build({root:e})}const R=[{label:"JSON",value:"json"},{label:"YAML",value:"yaml"},{label:"TOML",value:"toml"},{label:"XML",value:"xml"},{label:"Properties",value:"properties"}];let z=0;function L(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)("json"),[c,h]=(0,s.useState)("yaml"),[u,p]=(0,s.useState)(""),[m,f]=(0,s.useState)(++z),[j,g]=(0,s.useState)(++z),v=(0,s.useRef)(""),b=(0,s.useRef)(""),w=(0,s.useRef)(null),S=(0,s.useRef)(null),C=e=>{v.current=e,f(++z)},y=n=>{const s=w.current?.getValue()??"";if(""!==s.trim())try{const e=function(e,t,n){return H(B(e,t),n)}(s,t,n);b.current=e,g(++z),p("")}catch(e){p(e.message)}else(0,d.zN)(e("need_input"))};return(0,x.jsxs)(r.xh,{children:[(0,x.jsx)(r.fI,{children:(0,x.jsx)(r.VP,{widthPer:100,maxWidth:"60rem",children:(0,x.jsxs)(l.Zp,{title:e("JSON 格式转换"),children:[(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",flexWrap:"wrap"},children:[(0,x.jsx)(a.l6,{options:R,value:t,width:"9em",onChange:e=>{const t=w.current?.getValue();n(e),C(void 0!==t?t:v.current)}}),(0,x.jsx)("span",{children:e("转换成")}),(0,x.jsx)(a.l6,{options:R,value:c,width:"9em",onChange:h}),(0,x.jsx)(o.C3,{text:e("转换"),clickFun:()=>y(c)}),(0,x.jsx)(o.C3,{text:e("格式化"),clickFun:()=>y(t)}),(0,x.jsx)(o.C3,{text:e("结果转到输入"),clickFun:()=>{const t=S.current?.getValue();t?(n(c),C(t)):(0,d.zN)(e("输出为空"))}})]}),""!==u&&(0,x.jsx)("div",{className:"error_tip",children:u})]})})}),(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"50rem",children:(0,x.jsx)(l.Zp,{title:e("输入")+"("+t.toUpperCase()+")",children:(0,x.jsx)(P,{ref:w,className:"toolbox-ace",value:v.current,mode:$[t],wrap:!0,onChange:()=>p("")},m)})}),(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"50rem",children:(0,x.jsx)(l.Zp,{title:e("输出")+"("+c.toUpperCase()+")",children:(0,x.jsx)(P,{ref:S,className:"toolbox-ace",value:b.current,mode:$[c],wrap:!0},j)})})]})]})}const O="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";const K=[{label:"Base64",value:"base64"},{label:"Base32",value:"base32"},{label:"Hex",value:"hex"},{label:"Unicode",value:"unicode"},{label:"URL",value:"url"},{label:"ASCII",value:"ascii"},{label:"HTML 实体",value:"html"}];function q(e,t,n=!1,s=!1){return"base64"===t?function(e){const t=(new TextEncoder).encode(e);let n="";return t.forEach(e=>n+=String.fromCharCode(e)),btoa(n)}(e):"base32"===t?function(e){const t=(new TextEncoder).encode(e);let n=0,s=0,r="";for(const e of t)for(s=s<<8|e,n+=8;n>=5;)r+=O[s>>>n-5&31],n-=5;for(n>0&&(r+=O[s<<5-n&31]);r.length%8!=0;)r+="=";return r}(e):"hex"===t?function(e,t=!1,n=!1){const s=(new TextEncoder).encode(e),r=[];return s.forEach(e=>{const n=e.toString(16).padStart(2,"0");r.push(t?n.toUpperCase():n)}),r.join(n?" ":"")}(e,n,s):"unicode"===t?function(e){let t="";for(const n of e){const e=n.codePointAt(0);if(e<128)t+=n;else if(e>65535){const n=(e-65536)%1024+56320;t+="\\u"+(Math.floor((e-65536)/1024)+55296).toString(16).padStart(4,"0"),t+="\\u"+n.toString(16).padStart(4,"0")}else t+="\\u"+e.toString(16).padStart(4,"0")}return t}(e):"url"===t?function(e,t=!0){return t?encodeURIComponent(e):encodeURI(e)}(e):"ascii"===t?function(e,t=!0){const n=(new TextEncoder).encode(e);return Array.from(n).join(t?" ":"")}(e,s):function(e){return e.replace(/[\s\S]/g,e=>{const t=e.codePointAt(0);return t>127?`&#${t};`:e})}(e)}function G(e,t){return"base64"===t?function(e){const t=atob(e.trim()),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(new TextDecoder).decode(n)}(e):"base32"===t?function(e){const t=e.trim().replace(/=+$/,"").toUpperCase();let n=0,s=0;const r=[];for(const e of t){const t=O.indexOf(e);if(t<0)throw new Error(`非法的 Base32 字符:${e}`);s=s<<5|t,n+=5,n>=8&&(r.push(s>>>n-8&255),n-=8)}return(new TextDecoder).decode(new Uint8Array(r))}(e):"hex"===t?function(e){const t=e.replace(/[\s,]/g,"");if(t.length%2!=0)throw new Error("十六进制长度必须是偶数");if(!/^[0-9a-fA-F]*$/.test(t))throw new Error("包含非十六进制字符");const n=new Uint8Array(t.length/2);for(let e=0;e<n.length;e++)n[e]=parseInt(t.substr(2*e,2),16);return(new TextDecoder).decode(n)}(e):"unicode"===t?function(e){return e.replace(/\\u([0-9a-fA-F]{4})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))}(e):"url"===t?function(e){return decodeURIComponent(e)}(e):"ascii"===t?function(e){const t=e.split(/[\s,]+/).filter(e=>""!==e),n=new Uint8Array(t.length);return t.forEach((e,t)=>{const s=Number(e);if(!Number.isInteger(s)||s<0||s>255)throw new Error(`非法的 ASCII 码:${e}`);n[t]=s}),(new TextDecoder).decode(n)}(e):function(e){return e.replace(/&#(\d+);/g,(e,t)=>String.fromCodePoint(Number(t))).replace(/&#x([0-9a-fA-F]+);/g,(e,t)=>String.fromCodePoint(parseInt(t,16)))}(e)}function X(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)("base64"),[c,h]=(0,s.useState)(""),[u,p]=(0,s.useState)(""),[m,f]=(0,s.useState)(""),[j,g]=(0,s.useState)(!1),[v,b]=(0,s.useState)(!1),w=e=>{try{p(e()),f("")}catch(e){f(e.message)}},S="hex"===t,y="hex"===t||"ascii"===t,N=t=>(0,x.jsx)(o.rA,{icon:"content_copy",title:e("复制"),onClick:()=>{""!==t?(0,C.lW)(t):(0,d.zN)(e("内容为空"))}});return(0,x.jsx)(r.xh,{children:(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:25,maxWidth:"20rem",children:(0,x.jsxs)(l.Zp,{title:e("编解码"),children:[(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",flexWrap:"wrap"},children:[(0,x.jsx)(a.l6,{options:K,value:t,width:"10em",onChange:n}),(0,x.jsx)(o.C3,{text:e("编码"),clickFun:()=>w(()=>q(c,t,j,v))}),(0,x.jsx)(o.C3,{text:e("解码"),clickFun:()=>w(()=>G(c,t))}),(0,x.jsx)(o.C3,{text:e("结果转到输入"),clickFun:()=>{""!==u?(h(u),p("")):(0,d.zN)(e("输出为空"))}}),S&&(0,x.jsxs)("label",{className:"toolbox-check",children:[(0,x.jsx)("input",{type:"checkbox",checked:j,onChange:e=>g(e.target.checked)}),(0,x.jsx)("span",{children:e("大写")})]}),y&&(0,x.jsxs)("label",{className:"toolbox-check",children:[(0,x.jsx)("input",{type:"checkbox",checked:v,onChange:e=>b(e.target.checked)}),(0,x.jsx)("span",{children:e("空格分隔")})]})]}),""!==m&&(0,x.jsx)("div",{className:"error_tip",children:m})]})}),(0,x.jsx)(r.VP,{widthPer:37.5,maxWidth:"30rem",children:(0,x.jsx)(l.Zp,{title:e("输入"),rightTopCom:N(c),children:(0,x.jsx)(a.Z2,{value:c,style:{width:"100%",height:"270px"},spellCheck:!1,handleInputChange:e=>{h(e),f("")},placeholder:e("codec_in_ph")})})}),(0,x.jsx)(r.VP,{widthPer:37.5,maxWidth:"30rem",children:(0,x.jsx)(l.Zp,{title:e("输出"),rightTopCom:N(u),children:(0,x.jsx)(a.Z2,{value:u,style:{width:"100%",height:"270px"},spellCheck:!1,handleInputChange:e=>p(e),placeholder:e("codec_out_ph")})})})]})})}var J=n(86940);const Y=[{label:"MD5",value:"md5"},{label:"SHA-1",value:"sha1"},{label:"SHA-256",value:"sha256"},{label:"SHA-384",value:"sha384"},{label:"SHA-512",value:"sha512"}],Q={md5:"MD5",sha1:"SHA-1",sha256:"SHA-256",sha384:"SHA-384",sha512:"SHA-512"};async function ee(e,t){if("md5"===t)return(0,J.F)(e);const n=(new TextEncoder).encode(e),s=await crypto.subtle.digest(Q[t],n);return r=s,Array.from(new Uint8Array(r)).map(e=>e.toString(16).padStart(2,"0")).join("");var r}function te(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)(""),[c,h]=(0,s.useState)({});return(0,s.useEffect)(()=>{let e=!0;if(""!==t)return async function(e){const t=await Promise.all(Y.map(async t=>[t.value,await ee(e,t.value)]));return Object.fromEntries(t)}(t).then(t=>{e&&h(t)}),()=>{e=!1};h({})},[t]),(0,x.jsx)(r.xh,{children:(0,x.jsx)(r.fI,{children:(0,x.jsx)(r.VP,{widthPer:100,maxWidth:"60rem",children:(0,x.jsxs)(l.Zp,{title:e("摘要算法"),children:[(0,x.jsx)(a.Z2,{value:t,style:{width:"100%",height:"120px"},spellCheck:!1,handleInputChange:e=>n(e),placeholder:e("hash_in_ph")}),(0,x.jsx)("div",{style:{marginTop:"0.5em"},children:Y.map(t=>(0,x.jsxs)("div",{className:"hash-row",children:[(0,x.jsx)("span",{className:"hash-name",children:t.label}),(0,x.jsx)("span",{className:"hash-value",children:c[t.value]??""}),(0,x.jsx)(o.rA,{icon:"content_copy",title:e("复制"),onClick:()=>{const n=c[t.value];n?(0,C.lW)(n):(0,d.zN)(e("内容为空"))}})]},t.value))})]})})})})}const ne=[{label:"d",value:"d",desc:"分组索引"},{label:"g",value:"g",desc:"全局"},{label:"i",value:"i",desc:"忽略大小写"},{label:"m",value:"m",desc:"多行"},{label:"s",value:"s",desc:"含换行"},{label:"u",value:"u",desc:"Unicode",raw:!0},{label:"v",value:"v",desc:"Unicode 集合"},{label:"y",value:"y",desc:"粘性"}];function se(e,t){if(0===t.length)return e;const n=[];let s=0;return t.forEach((t,r)=>{t.index>s&&n.push(e.slice(s,t.index)),""!==t.text&&n.push((0,x.jsx)("mark",{className:"regex-mark",children:t.text},r)),s=t.index+t.text.length}),s<e.length&&n.push(e.slice(s)),n}function re(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)(""),[o,c]=(0,s.useState)(""),[d,h]=(0,s.useState)("g"),u=(0,s.useMemo)(()=>function(e,t,n){if(""===e)return{matches:[],error:""};let s;try{s=new RegExp(e,t)}catch(e){return{matches:[],error:e.message}}const r=[],a=t.includes("g")||t.includes("y");let l,o=0;for(;null!==(l=s.exec(n))&&(r.push({text:l[0],index:l.index,groups:l.slice(1)}),a)&&(""===l[0]&&s.lastIndex++,!(++o>1e4)););return{matches:r,error:""}}(t,d,o),[t,d,o]);return(0,x.jsxs)(r.xh,{children:[(0,x.jsx)(r.fI,{children:(0,x.jsx)(r.VP,{widthPer:100,maxWidth:"60rem",children:(0,x.jsxs)(l.Zp,{title:e("正则表达式"),children:[(0,x.jsxs)("div",{className:"regex-input-row",children:[(0,x.jsx)("span",{className:"regex-slash",children:"/"}),(0,x.jsx)(a.Sm,{width:"100%",value:t,placeholder:e("正则表达式"),handleInputChange:e=>n(e)}),(0,x.jsx)("span",{className:"regex-slash",children:"/"}),(0,x.jsx)("span",{className:"regex-flags",children:d})]}),(0,x.jsx)("div",{className:"regex-flag-row",children:ne.map(t=>(0,x.jsxs)("label",{title:t.raw?t.desc:e(t.desc),className:"toolbox-check",children:[(0,x.jsx)("input",{type:"checkbox",checked:d.includes(t.value),onChange:()=>{return e=t.value,void h(t=>t.includes(e)?t.replace(e,""):t+e);var e}}),(0,x.jsx)("span",{className:"regex-flag-letter",children:t.label}),(0,x.jsx)("span",{children:t.raw?t.desc:e(t.desc)})]},t.value))}),""!==u.error&&(0,x.jsx)("div",{className:"error_tip",children:u.error}),(0,x.jsxs)("div",{style:{marginTop:"0.5em"},children:[e("匹配到")," ",(0,x.jsx)("b",{children:u.matches.length})," ",e("处")]})]})})}),(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsx)(l.Zp,{title:e("测试文本"),children:(0,x.jsx)(a.Z2,{value:o,style:{width:"100%",height:"260px"},spellCheck:!1,handleInputChange:e=>c(e),placeholder:e("regex_in_ph")})})}),(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsx)(l.Zp,{title:e("高亮结果"),children:(0,x.jsx)("div",{className:"regex-preview",children:""===o?(0,x.jsx)("span",{className:"regex-empty",children:e("regex_empty")}):se(o,u.matches)})})})]}),u.matches.length>0&&(0,x.jsx)(r.fI,{children:(0,x.jsx)(r.VP,{widthPer:100,maxWidth:"60rem",children:(0,x.jsx)(l.Zp,{title:e("匹配详情"),children:(0,x.jsx)("div",{className:"regex-match-list",children:u.matches.map((t,n)=>(0,x.jsxs)("div",{className:"regex-match-item",children:[(0,x.jsxs)("span",{className:"regex-match-index",children:["#",n+1]}),(0,x.jsx)("span",{className:"regex-match-text",children:""===t.text?e("空"):t.text}),(0,x.jsxs)("span",{className:"regex-match-pos",children:[e("位置")," ",t.index]}),t.groups.length>0&&(0,x.jsx)("span",{className:"regex-match-groups",children:t.groups.map((t,n)=>(0,x.jsxs)("span",{className:"regex-group",children:["$",n+1,"=",t??e("未匹配")]},n))})]},n))})})})})]})}function ae(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)(String(Math.floor(Date.now()/1e3))),[r,c]=(0,s.useState)(""),h=function(e){const t=Number(e.trim());return!Number.isFinite(t)||t<=0?null:new Date(t<1e11?1e3*t:t)}(t),u=new Date,p=h?function(e){const t=e=>String(e).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`}(h):e("无效时间戳");return(0,x.jsxs)(l.Zp,{title:e("时间转换"),children:[(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",flexWrap:"wrap"},children:[(0,x.jsx)("span",{className:"toolbox-label",children:e("时间戳")}),(0,x.jsx)(a.Sm,{width:"14em",value:t,placeholder:e("秒或毫秒"),handleInputChange:n}),(0,x.jsx)(o.C3,{text:e("现在"),clickFun:()=>n(String(Math.floor(Date.now()/1e3)))})]}),(0,x.jsxs)("div",{className:"toolbox-kv",children:[(0,x.jsx)("span",{children:e("秒级")}),(0,x.jsx)("span",{className:"toolbox-mono",children:h?Math.floor(h.getTime()/1e3):"-"}),(0,x.jsx)("span",{children:e("毫秒级")}),(0,x.jsx)("span",{className:"toolbox-mono",children:h?h.getTime():"-"}),(0,x.jsx)("span",{children:e("本地时间")}),(0,x.jsx)("span",{className:"toolbox-mono",children:p}),(0,x.jsx)("span",{children:"ISO 8601"}),(0,x.jsx)("span",{className:"toolbox-mono",children:h?h.toISOString():"-"}),(0,x.jsx)("span",{children:e("UTC 时间")}),(0,x.jsx)("span",{className:"toolbox-mono",children:h?h.toUTCString():"-"}),(0,x.jsx)("span",{children:e("距现在")}),(0,x.jsx)("span",{className:"toolbox-mono",children:h?le(h.getTime()-u.getTime(),e):"-"})]}),(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",marginTop:"0.5em",flexWrap:"wrap"},children:[(0,x.jsx)("span",{className:"toolbox-label",children:e("日期")}),(0,x.jsx)(a.Sm,{width:"14em",value:r,placeholder:"2024-01-01 12:00:00",handleInputChange:c}),(0,x.jsx)(o.C3,{text:e("转时间戳"),clickFun:()=>{const t=new Date(r.trim().replace(" ","T"));isNaN(t.getTime())?(0,d.zN)(e("date_invalid")):n(String(Math.floor(t.getTime()/1e3)))}})]})]})}function le(e,t){const n=Math.abs(e),s=e>0,r=[[864e5,t("天")],[36e5,t("小时")],[6e4,t("分钟")],[1e3,t("秒")]];for(const[e,a]of r)if(n>=e){const r=Math.floor(n/e);return`${t(s?"还有":"已过去")} ${r} ${a}`}return t("刚刚")}function oe(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)("255"),[r,o]=(0,s.useState)("10"),c=[{label:"2 "+e("进制"),value:"2"},{label:"8 "+e("进制"),value:"8"},{label:"10 "+e("进制"),value:"10"},{label:"16 "+e("进制"),value:"16"},{label:"36 "+e("进制"),value:"36"}];let d=NaN;try{const e=t.trim().toLowerCase().replace(/^0x/,"");d="10"===r?Number(e):parseInt(e,Number(r))}catch(e){d=NaN}const h=[];return Number.isFinite(d)&&(h.push({label:"2 "+e("进制"),v:d.toString(2)}),h.push({label:"8 "+e("进制"),v:d.toString(8)}),h.push({label:"10 "+e("进制"),v:d.toString(10)}),h.push({label:"16 "+e("进制"),v:d.toString(16).toUpperCase()}),h.push({label:"36 "+e("进制"),v:d.toString(36).toUpperCase()}),h.push({label:e("字节"),v:ce(d,e)})),(0,x.jsxs)(l.Zp,{title:e("进制转换"),children:[(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",flexWrap:"wrap"},children:[(0,x.jsx)(a.Sm,{width:"14em",value:t,placeholder:e("输入数值"),handleInputChange:e=>n(e)}),(0,x.jsx)(a.l6,{options:c,value:r,width:"8em",onChange:o})]}),Number.isFinite(d)?(0,x.jsx)("div",{className:"toolbox-kv",children:h.map(e=>(0,x.jsxs)(s.Fragment,{children:[(0,x.jsx)("span",{children:e.label}),(0,x.jsx)("span",{className:"toolbox-mono",children:e.v})]},e.label))}):(0,x.jsx)("div",{className:"error_tip",children:e("num_invalid")})]})}function ce(e,t){if(e<0||!Number.isInteger(e))return"-";const n=Math.max(8,8*Math.ceil(e.toString(2).length/8));return`${n/8} ${t("字节")} (${n} ${t("位")})`}function ie(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)("#4a90d9"),r=function(e){const t=e.trim().replace(/^#/,"");return/^[0-9a-fA-F]{3}$/.test(t)?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16)}:/^[0-9a-fA-F]{6}$/.test(t)?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16)}:null}(t),c=r?function(e,t,n){const s=e/255,r=t/255,a=n/255,l=Math.max(s,r,a),o=Math.min(s,r,a),c=(l+o)/2;if(l===o)return{h:0,s:0,l:Math.round(100*c)};const i=l-o,d=c>.5?i/(2-l-o):i/(l+o);let h=0;return h=l===s?((r-a)/i+(r<a?6:0))/6:l===r?((a-s)/i+2)/6:((s-r)/i+4)/6,{h:Math.round(360*h),s:Math.round(100*d),l:Math.round(100*c)}}(r.r,r.g,r.b):null;return(0,x.jsxs)(l.Zp,{title:e("颜色转换"),children:[(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",flexWrap:"wrap"},children:[(0,x.jsx)("input",{type:"color",className:"toolbox-color-picker",value:r?de(r.r,r.g,r.b):"#000000",onChange:e=>n(e.target.value)}),(0,x.jsx)(a.Sm,{width:"12em",value:t,placeholder:"#4a90d9",handleInputChange:n}),(0,x.jsx)(o.rA,{icon:"content_copy",title:e("复制颜色"),onClick:()=>{r?(0,C.lW)(de(r.r,r.g,r.b)):(0,d.zN)(e("颜色格式无效"))}})]}),r&&c?(0,x.jsxs)("div",{className:"toolbox-kv",children:[(0,x.jsx)("span",{children:"HEX"}),(0,x.jsx)("span",{className:"toolbox-mono",children:de(r.r,r.g,r.b).toUpperCase()}),(0,x.jsx)("span",{children:"RGB"}),(0,x.jsxs)("span",{className:"toolbox-mono",children:["rgb(",r.r,", ",r.g,", ",r.b,")"]}),(0,x.jsx)("span",{children:"RGBA"}),(0,x.jsxs)("span",{className:"toolbox-mono",children:["rgba(",r.r,", ",r.g,", ",r.b,", 1)"]}),(0,x.jsx)("span",{children:"HSL"}),(0,x.jsxs)("span",{className:"toolbox-mono",children:["hsl(",c.h,", ",c.s,"%, ",c.l,"%)"]})]}):(0,x.jsx)("div",{className:"error_tip",children:e("color_invalid")})]})}function de(e,t,n){const s=e=>e.toString(16).padStart(2,"0");return`#${s(e)}${s(t)}${s(n)}`}const he="0123456789abcdef";function ue(){const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;let t="";return e.forEach(e=>t+=he[e>>4]+he[15&e]),`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}const xe="abcdefghijklmnopqrstuvwxyz",pe="ABCDEFGHIJKLMNOPQRSTUVWXYZ",me="0123456789",fe="!@#$%^&*()-_=+[]{};:,.<>?";function je(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)(()=>[ue(),ue(),ue()]),[r,c]=(0,s.useState)("16"),[h,u]=(0,s.useState)(!0),[p,m]=(0,s.useState)(!0),[f,j]=(0,s.useState)(!0),[g,v]=(0,s.useState)(!1),[b,w]=(0,s.useState)("");return(0,x.jsxs)(l.Zp,{title:e("UUID / 随机密码"),children:[(0,x.jsx)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",flexWrap:"wrap"},children:(0,x.jsx)(o.C3,{text:e("生成 UUID"),clickFun:()=>n([ue(),ue(),ue()])})}),(0,x.jsx)("div",{className:"toolbox-kv",children:t.map((t,n)=>(0,x.jsxs)(s.Fragment,{children:[(0,x.jsxs)("span",{children:["UUID ",n+1]}),(0,x.jsx)("span",{className:"toolbox-mono toolbox-copyable",onClick:()=>(0,C.lW)(t),title:e("点击复制"),children:t})]},n))}),(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",marginTop:"0.75em",flexWrap:"wrap"},children:[(0,x.jsx)("span",{className:"toolbox-label",children:e("长度")}),(0,x.jsx)(a.Sm,{width:"5em",value:r,handleInputChange:c}),(0,x.jsxs)("label",{className:"toolbox-check",children:[(0,x.jsx)("input",{type:"checkbox",checked:h,onChange:e=>u(e.target.checked)}),(0,x.jsx)("span",{children:"a-z"})]}),(0,x.jsxs)("label",{className:"toolbox-check",children:[(0,x.jsx)("input",{type:"checkbox",checked:p,onChange:e=>m(e.target.checked)}),(0,x.jsx)("span",{children:"A-Z"})]}),(0,x.jsxs)("label",{className:"toolbox-check",children:[(0,x.jsx)("input",{type:"checkbox",checked:f,onChange:e=>j(e.target.checked)}),(0,x.jsx)("span",{children:"0-9"})]}),(0,x.jsxs)("label",{className:"toolbox-check",children:[(0,x.jsx)("input",{type:"checkbox",checked:g,onChange:e=>v(e.target.checked)}),(0,x.jsx)("span",{children:e("符号")})]}),(0,x.jsx)(o.C3,{text:e("生成密码"),clickFun:()=>{let t="";if(h&&(t+=xe),p&&(t+=pe),f&&(t+=me),g&&(t+=fe),""===t)return void(0,d.zN)(e("pw_need_set"));const n=Math.max(1,Math.min(256,Number(r)||16)),s=new Uint32Array(n);crypto.getRandomValues(s);let a="";for(let e=0;e<n;e++)a+=t[s[e]%t.length];w(a)}})]}),""!==b&&(0,x.jsxs)("div",{className:"toolbox-kv",children:[(0,x.jsx)("span",{children:e("密码")}),(0,x.jsx)("span",{className:"toolbox-mono toolbox-copyable",onClick:()=>(0,C.lW)(b),title:e("点击复制"),children:b})]})]})}function ge(){return(0,x.jsxs)(r.xh,{children:[(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsx)(ae,{})}),(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsx)(oe,{})})]}),(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsx)(ie,{})}),(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsx)(je,{})})]})]})}var ve=n(87583);const be=[{label:"L (7%)",value:"L"},{label:"M (15%)",value:"M"},{label:"Q (25%)",value:"Q"},{label:"H (30%)",value:"H"}];function we(){const{t:e}=(0,i.Bd)(),t=(0,s.useRef)(null),[n,c]=(0,s.useState)(""),[h,u]=(0,s.useState)("320"),[p,m]=(0,s.useState)("M"),[f,j]=(0,s.useState)("");(0,s.useEffect)(()=>{const e=t.current;if(!e)return;if(""===n){const t=e.getContext("2d");return t?.clearRect(0,0,e.width,e.height),void j("")}const s=Math.max(80,Math.min(2048,Number(h)||320));ve.toCanvas(e,n,{width:s,margin:2,errorCorrectionLevel:p}).then(()=>j("")).catch(e=>{j(e.message)})},[n,h,p]);const g=()=>{const s=t.current;if(!s||""===n)return void(0,d.zN)(e("qr_none"));const r=s.toDataURL("image/png"),a=document.createElement("a");a.href=r,a.download="qrcode.png",a.click()};return(0,x.jsx)(r.xh,{children:(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsxs)(l.Zp,{title:e("二维码生成"),children:[(0,x.jsx)(a.Z2,{value:n,style:{width:"100%",height:"200px"},spellCheck:!1,handleInputChange:e=>c(e),placeholder:e("qr_in_ph")}),(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",marginTop:"0.5em",flexWrap:"wrap"},children:[(0,x.jsx)("span",{className:"toolbox-label",children:e("尺寸")}),(0,x.jsx)(a.Sm,{width:"6em",value:h,handleInputChange:e=>u(e)}),(0,x.jsx)("span",{className:"toolbox-label",children:e("纠错级别")}),(0,x.jsx)("select",{className:"toolbox-select",value:p,onChange:e=>m(e.target.value),children:be.map(e=>(0,x.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,x.jsx)(o.C3,{text:e("下载 PNG"),clickFun:g})]}),""!==f&&(0,x.jsx)("div",{className:"error_tip",children:f})]})}),(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsx)(l.Zp,{title:e("预览"),rightTopCom:(0,x.jsx)(o.rA,{icon:"download",title:e("下载"),onClick:g}),children:(0,x.jsxs)("div",{className:"toolbox-qr-preview",children:[(0,x.jsx)("canvas",{ref:t,style:{display:""===n?"none":"block"}}),""===n&&(0,x.jsx)("span",{className:"toolbox-empty",children:e("qr_empty")})]})})})]})})}var Se=n(20734);function Ce(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)(""),[o,c]=(0,s.useState)(""),d=""!==t||""!==o;return(0,x.jsxs)(r.xh,{children:[(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"50rem",children:(0,x.jsx)(l.Zp,{title:e("原文本"),children:(0,x.jsx)(a.Z2,{value:t,style:{width:"100%",height:"200px"},spellCheck:!1,handleInputChange:e=>n(e),placeholder:e("粘贴原文本")})})}),(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"50rem",children:(0,x.jsx)(l.Zp,{title:e("新文本"),children:(0,x.jsx)(a.Z2,{value:o,style:{width:"100%",height:"200px"},spellCheck:!1,handleInputChange:e=>c(e),placeholder:e("粘贴新文本")})})})]}),(0,x.jsx)(r.fI,{children:(0,x.jsx)(r.VP,{widthPer:100,maxWidth:"100rem",children:(0,x.jsx)(l.Zp,{title:e("差异"),children:(0,x.jsx)("div",{className:"text-diff-box",children:d?(0,x.jsx)(Se.A,{valueA:t,valueB:o,mode:"split"}):(0,x.jsx)("div",{className:"text-diff-empty",children:e("输入文本后这里显示差异")})})})})})]})}var ye=n(87361);function Ne(e){const{t}=(0,i.Bd)(),{check_user_auth:n}=(0,j.MH)(),s=[];return s.push({index:1,name:t("开发者工具"),rto:"developer/",component:(0,x.jsx)(ge,{})},{index:1,name:t("时间工具"),rto:"timeutil/",component:(0,x.jsx)(p,{})},{index:1,name:t("JSON 格式转换"),rto:"format/",component:(0,x.jsx)(L,{})},{index:1,name:t("编解码"),rto:"codec/",component:(0,x.jsx)(X,{})},{index:1,name:t("摘要算法"),rto:"hash/",component:(0,x.jsx)(te,{})},{index:1,name:t("正则测试"),rto:"regex/",component:(0,x.jsx)(re,{})},{index:1,name:t("文本对比"),rto:"diff/",component:(0,x.jsx)(Ce,{})},{index:1,name:t("二维码"),rto:"qrcode/",component:(0,x.jsx)(we,{})},{index:1,name:t("非对称密钥"),rto:"crypto/",component:(0,x.jsx)(N,{})}),n(g.oV.port_scan)&&s.push({index:1,name:t("端口扫描"),rto:"portscan/",component:(0,x.jsx)(I,{})}),n(g.oV.wol_proxy)&&s.push({index:1,name:t("网络唤醒"),rto:"netwol/",component:(0,x.jsx)(v,{})}),(0,x.jsx)(r.W1,{optionList:s,father_route:ye.o.toolbox})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[991],{20734(e,t,n){n.d(t,{A:()=>l});var s=n(96540),r=n(48890),a=n(74848);function l({valueA:e,valueB:t,mode:n="split",theme:l,filename:o}){const c=(0,s.useRef)(null),i=(0,s.useRef)(null),d=(0,s.useMemo)(()=>o&&r.Tt.getModeForPath(o).mode||"ace/mode/text",[o]);return(0,s.useEffect)(()=>{const s=c.current;if(!s)return;const a=r.Kw.require("ace/ext/diff"),o={valueA:e??"",valueB:t??"",diffProvider:new a.DiffProvider},h="inline"===n,u=h?new a.InlineDiffView({...o,inline:"a"},s):new a.SplitDiffView(o);h||(u.container=s,s.appendChild(u.editorA.container),s.appendChild(u.editorB.container)),l&&u.setTheme(l),u.editorA?.session.setMode(d),u.editorB?.session.setMode(d),u.onInput(),u.foldUnchanged();const x=requestAnimationFrame(()=>{u.editorA?.resize(!0),u.editorB?.resize(!0)});return i.current=u,()=>{cancelAnimationFrame(x);try{u.destroy()}catch(e){}i.current=null,s.innerHTML=""}},[e,t,n,l,d]),(0,a.jsx)("div",{className:"ace-diff",ref:c})}},77481(e,t,n){n.d(t,{S:()=>o,X:()=>l});var s=n(96540),r=n(61443),a=n(74848);function l(e){const[t,n]=s.useState([]),l=(0,s.useRef)(-1),[o,c]=(0,s.useState)(-1),[i,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 h=()=>{l.current=-1,c(-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 l=t;if(s){const n=e.filter,s=n.options.find(e=>e.value===n.value);null!=n.value&&s&&(l=`${t} (${s.label})`)}return(0,a.jsx)("th",{className:s?"table-filter-col":"",children:s?(0,a.jsx)(r.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:l}):t},n)})})}),(0,a.jsx)("tbody",{children:t.map((t,n)=>{const s=!!e.onRowDrag;return(0,a.jsx)("tr",{className:s?(o===n?"row-dragging":"")+(i===n?" row-drop-target":""):"",draggable:s,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{s&&(l.current=n,c(n),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!s||l.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(n))},onDrop:t=>{s&&(t.preventDefault(),(()=>{const t=l.current,n=i;h(),t<0||n<0||t===n||e.onRowDrag?.(t,n)})())},onDragEnd:h,children:t.map((n,s)=>{const r=s===t.length-1?"small":"";return(0,a.jsx)("td",{className:r,style:{width:e.width??"auto"},children:n},s)})},n)})})]})}function o(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))})}},48890(e,t,n){n.d(t,{Kw:()=>s,Tt:()=>r});var s=n(80952),r=(n(82327),n(1766),n(24854),n(90008),n(90846),n(40975),n(44286),n(30766),n(14973),n(69687),n(1234),n(47507),n(87268),n(55208),n(34678),n(24522));const a=`https://gcore.jsdelivr.net/npm/ace-builds@${s.version}/src-min-noconflict/`;s.config.set("basePath",a),s.config.set("modePath",a),s.config.set("themePath",a),s.config.set("workerPath",a)},83029(e,t,n){n.d(t,{N:()=>g});var s=n(96540),r=n(34843),a=n(82893),l=n(74848);function o(e){const[t,n]=(0,r.fp)(a.AG.user_base_info);return(0,l.jsx)("div",{children:e.div?(0,l.jsx)("div",{className:"nav_list_a",style:{background:e.color},children:e.name}):e.clickItem||"dir"===e._type?(0,l.jsx)("div",{className:"nav_list_a",style:{background:e.color},onClick:()=>{"dir"!==e._type?e.clickItem&&e.clickItem(e):e.click_dir(e.item)},children:e.name}):(0,l.jsx)("a",{href:e.url,target:e.target,className:"nav_list_a",style:{background:e.color},children:e.name})})}var c=n(64694),i=n(61443),d=n(85997),h=n(52671),u=n(22022);const x=["#ffffff","#fefff8","#fcfdf1","#d3d2dc","#f8f9fd","#ebf4fe","#ebebeb","#e8f7eb","#eaf2f9"];let p,m,f=[];const j=[];function g(e){const[t,n]=(0,s.useState)([]),[g,v]=(0,s.useState)(-1),b=(0,h.zy)(),[w,S]=(0,s.useState)(!1),[C,y]=(0,s.useState)(!1),{t:N}=(0,u.Bd)(),[_,k]=(0,s.useState)([]),[I,A]=(0,r.fp)(a.AG.nav_index_add_item_by_now_list),P=e=>{-1!==g?j[g]._children=e:f=e};(0,s.useEffect)(()=>{(async()=>{if(!e.getItems)return;const t=await e.getItems();f=t,n(f)})()},[b]);(0,s.useEffect)(()=>{if(I){const e=[...t,{name:"",color:(0,c.Lr)(x),...I}];P(e),n(e),S(!0),A(void 0)}},[I]);const M=e=>{v(g+1),n(e._children),j.push(e)};return(0,l.jsxs)("div",{className:"nav_list_div scroll-div-y",children:[-1!==g&&(0,l.jsx)(d.rA,{title:"返回",icon:"arrow_back",onClick:()=>{n(0===g?f:j[g-1]._children),v(g-1),j.pop()}}),t.map((r,a)=>(0,l.jsxs)("div",{draggable:!0,onDragOver:e=>{e.preventDefault()},onDragStart:e=>((e,t)=>{p=t})(0,a),onDrop:e=>((e,s)=>{e.preventDefault();const r=t[p],a=t[s];if(a&&"dir"===a._type){const e=[...t];return e.splice(p,1),a._children||(a._children=[]),a._children.push(r),P(e),void n(e)}const l=[...t],o=l[p];l.splice(p,1),l.splice(s,0,o),P(l),n(l)})(e,a),style:{cursor:w?"move":"pointer"},children:[(0,l.jsx)(o,{name:r.name,item:r,...r,div:w,target:"_blank",click_dir:M,clickItem:e.clickItem}),w&&(void 0!==_.find(e=>e===a)||C)&&(0,l.jsxs)("div",{className:C?"":" site_edit ",children:["dir"===r._type?(0,l.jsxs)(s.Fragment,{children:[(0,l.jsx)(i.Sm,{value:r.name,handleInputChange:e=>{r.name=e},placeholder:N("输入类目名"),no_border:!0}),(0,l.jsx)(i.Sm,{value:r.color,type:"color",handleInputChange:e=>{r.color=e},placeholder:"color",no_border:!0})]}):e.items.map((e,t)=>(0,l.jsx)("div",{children:(0,l.jsx)(i.Sm,{value:r[e.key],type:"color"===e.key?"color":void 0,handleInputChange:t=>{r[e.key]=t},placeholder:e.preName,no_border:!0})},t)),!C&&(0,l.jsx)(d.C3,{text:N("折叠"),clickFun:()=>{k((0,c.P1)(_,a))}})]}),w&&(0,l.jsx)("div",{style:{display:"block"},children:(0,l.jsxs)("span",{className:"div-row ",children:[(0,l.jsx)(d.C3,{text:N("删除"),clickFun:()=>{(e=>{const s=[...t];s.splice(e,1),P(s),n(s)})(a)}}),(0,l.jsx)(d.C3,{text:N("编辑"),clickFun:()=>{void 0===_.find(e=>e===a)&&k([..._,a])}})]})})]},a)),w&&(0,l.jsxs)("div",{style:{display:"block"},children:[(0,l.jsx)(d.rA,{title:N("取消"),icon:"cancel",onClick:()=>{k([]),S(!1),m&&(n(m),P(m)),y(!1)}}),(0,l.jsx)(d.rA,{title:N("添加"),icon:"add",onClick:async()=>{const s=[...t,{name:"",color:(0,c.Lr)(x),...e.get_pre_add_item&&await e.get_pre_add_item()}];P(s),n(s)}}),(0,l.jsx)(d.rA,{title:N("添加类目"),icon:"add_box",onClick:()=>{const e=[...t,{name:"",_type:"dir",_children:[],color:"#c1edfb"}];P(e),n(e)}}),(0,l.jsx)(d.rA,{title:N("全部编辑"),icon:C?"unfold_less":"unfold_more",onClick:()=>{y(!C)}})]}),(void 0===e.have_auth_edit||!0===e.have_auth_edit)&&(0,l.jsx)(d.rA,{icon:w?"save":"edit",title:N(w?"保存":"编辑"),onClick:async()=>{w?e.save&&await e.save(f):m=t,S(!w)}})]})}},30991(e,t,n){n.r(t),n.d(t,{default:()=>Ne});var s=n(96540),r=n(75725),a=n(61443),l=n(70447),o=n(85997),c=n(34289),i=n(22022),d=n(62042),h=n(14284),u=n(53459),x=n(74848);function p(e){const{t}=(0,i.Bd)(),[n,p]=(0,s.useState)(t("毫秒")),[m,f]=(0,s.useState)(""),[j,g]=(0,s.useState)(""),[v,b]=(0,s.useState)(null),[w,S]=(0,s.useState)(null),[C,y]=(0,s.useState)(Date.now());return(0,s.useEffect)(()=>{(async()=>{const e=await h.Yu.get("sys_time/get");if(e.code===u.m.Success){const t=await e.data;b(t.timestamp),S(t.timezone),y(t.timestamp)}})();const e=setInterval(()=>{y(e=>e+1e3)},1e3);return()=>clearInterval(e)},[]),(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:33,children:(0,x.jsxs)(l.Zp,{title:t("时间转换器"),rightBottomCom:(0,x.jsx)(o.C3,{text:t("确定"),clickFun:function(){if(!m&&!j)return void(0,d.zN)(t("不能都为空"));let e=0;const s=""!==m&&0!==m;if(s){if(!(0,c.kf)(m))return void(0,d.zN)("must be number !");e=parseInt(m),"分秒"===n&&(e*=1e3)}const r=new Date(s?e:j),a=new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(r);if(g(a),!m){const e=r.getTime();f("毫秒"===n?e:e/1e3)}}}),children:[(0,x.jsx)(a.l6,{value:n,options:[{title:t("毫秒"),value:"毫秒"},{title:t("分秒"),value:"分秒"}],onChange:function(e){p(e)}}),(0,x.jsx)(a.Sm,{placeholder:n,value:m,handleInputChange:e=>{f(e)}}),(0,x.jsx)(a.Sm,{placeholder:t("格式化时间"),value:j,handleInputChange:e=>{g(e)}})]})}),(0,x.jsx)(r.VP,{children:null!==v&&null!==w&&(0,x.jsxs)(l.Zp,{title:t("服务器时间"),children:[(0,x.jsxs)("h1",{children:[t("时区"),": ",w]}),(0,x.jsxs)("h1",{children:[t("时间"),": ",new Date(C).toLocaleString(navigator.language,{timeZone:w})]})]})})]})}var m=n(4412),f=n(83029),j=n(78247),g=n(23430);function v(e){const{t}=(0,i.Bd)(),{check_user_auth:n}=(0,j.MH)(),[r,l]=(0,s.useState)(""),c=async e=>{const n=e||r;if(!n)return void(0,d.zN)(t("mac地址不能为空"));(await h._U.post("wol/exec",{mac:n})).code===u.m.Success&&(0,d.SK)(t("发送唤醒命令成功"))};return(0,x.jsxs)("div",{children:[(0,x.jsxs)(m.aZ,{position:"right",children:[(0,x.jsx)(o.rA,{icon:"play_arrow",title:t("发送"),onClick:()=>{c()}}),(0,x.jsx)(a.$Z,{placeholder:t("mac_dst"),icon:"laptop_mac",value:r,handleInputChange:e=>l(e)})]}),(0,x.jsx)(f.N,{have_auth_edit:n(g.oV.wol_proxy_tag_update),getItems:async()=>{const e=await h._U.get("wol/tag");return e.code===u.m.Success?e.data:[]},save:async e=>{(await h._U.post("wol/tag/save",e)).code!==u.m.Success&&(0,d.zN)(t("网络错误"))},clickItem:async e=>{l(e.mac),c(e.mac)},items:[{key:"name",preName:t("名字")},{key:"mac",preName:"mac"+t("地址")},{key:"color",preName:"color"}]})]})}var b=n(77481),w=n(34843),S=n(82893),C=n(40505);let y;function N(){const[e,t]=(0,s.useState)("rsa"),[n,c]=(0,s.useState)("pem"),{t:p,i18n:f}=(0,i.Bd)(),[j,g]=(0,w.fp)(S.AG.confirm),[v,N]=(0,s.useState)(""),[_,k]=(0,s.useState)(""),I=async t=>{if(!_||!v)return void(0,d.zN)(p("密钥不能为空"));let n="id_"+e;"pub"===t&&(n+=".pub"),g({open:!0,title:p("将覆盖密钥文件"),sub_title:`之前的密钥将作废。 将会作为 ${n} 文件保存到系统上的"${y}"目录下,此目录会作为openssh(git)所使用的默认目录。`,handle:async()=>{(await h.cD.post("save_openssh",{name:n,context:"pub"===t?v:_})).code===u.m.Success&&((0,d.SK)(p("完成")),g({open:!1,handle:null}))}})};return(0,x.jsxs)(s.Fragment,{children:[(0,x.jsx)(m.aZ,{position:"right",children:(0,x.jsx)(b.S,{isFlex:!0,columns:[(0,x.jsx)(a.l6,{tip:p("加密算法"),value:e,width:"auto",onChange:e=>{t(e)},options:[{title:p("RSA"),value:"rsa"},{title:p("DSA"),value:"dsa"},{title:p("ECDSA"),value:"ecdsa"}]}),(0,x.jsx)(a.l6,{tip:p("输出格式"),value:n,width:"auto",onChange:e=>{c(e)},options:[{title:p("普通PEM"),value:"pem"},{title:p("opensshPEM"),value:"openssh_pem"}]}),(0,x.jsx)(o.rA,{icon:"play_arrow",title:p("生成"),onClick:()=>{(async()=>{const t=await h.cD.post("generate",{type:e,form:n});t.code===u.m.Success&&(N(t.data.public_key),k(t.data.private_key),y=t.data.home_path)})()}})]})}),(0,x.jsx)(r.xh,{children:(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{children:(0,x.jsx)(l.Zp,{title:p("公钥"),rightTopCom:(0,x.jsx)(o.rA,{title:p("复制"),icon:"copy_all",onClick:()=>{v&&((0,C.lW)(v),(0,d.SK)(p("完成")))}}),rightBottomCom:"openssh_pem"===n&&(0,x.jsx)(o.C3,{text:p("ssh_dir"),clickFun:()=>{I("pub")}}),children:(0,x.jsx)(a.Z2,{style:{width:"100%",height:"270px"},onChange:e=>{N(e.target.value)},value:v})})}),(0,x.jsx)(r.VP,{children:(0,x.jsx)(l.Zp,{title:p("私钥"),rightTopCom:(0,x.jsx)(o.rA,{title:p("复制"),icon:"copy_all",onClick:()=>{_&&((0,C.lW)(_),(0,d.SK)(p("成功")))}}),rightBottomCom:"openssh_pem"===n&&(0,x.jsx)(o.C3,{text:p("ssh_dir"),clickFun:()=>{I("pri")}}),children:(0,x.jsx)(a.Z2,{style:{width:"100%",height:"270px"},value:_,onChange:e=>{k(e.target.value)}})})})]})})]})}var _=n(14944),k=n(92275);function I(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)(""),[c,h]=(0,s.useState)("1"),[u,p]=(0,s.useState)("65535"),[m,f]=(0,s.useState)("100"),[j,g]=(0,s.useState)("2000"),[v,w]=(0,s.useState)(!1),[S,C]=(0,s.useState)(null),[y,N]=(0,s.useState)([]),[I,A]=(0,s.useState)(null),P=(0,s.useRef)([]),M=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(!M.current)return M.current=!0,_.ws.addMsg(k.HK.port_scan_progress,e=>{C(e.context)}),_.ws.addMsg(k.HK.port_scan_result,e=>{const t=e.context,n=[...P.current,t];P.current=n,N(n)}),_.ws.addMsg(k.HK.port_scan_end,t=>{A(t.context),w(!1),t.context.cancelled?(0,d.zN)(e("扫描已取消")):(0,d.SK)(e("扫描完成"))}),()=>{_.ws.sendData(k.HK.port_scan_cancel,{}),_.ws.removeMsg(k.HK.port_scan_progress),_.ws.removeMsg(k.HK.port_scan_result),_.ws.removeMsg(k.HK.port_scan_end),M.current=!1}},[]);return(0,x.jsx)(r.xh,{children:(0,x.jsx)(r.fI,{children:(0,x.jsx)(r.VP,{children:(0,x.jsxs)(l.Zp,{title:e("TCP ")+e("端口扫描"),rightTopCom:(0,x.jsxs)("span",{children:[S&&(0,x.jsxs)("span",{children:[e("已发现"),": ",S.openCount]}),I&&(0,x.jsxs)("span",{children:[e("总计扫描"),": ",I.totalScanned," | ",e("开放"),": ",I.totalOpen]})]}),rightBottomCom:v?(0,x.jsx)(o.C3,{text:e("取消"),clickFun:()=>{_.ws.sendData(k.HK.port_scan_cancel,{}).catch(()=>{})}}):(0,x.jsx)(o.C3,{text:e("扫描"),clickFun:()=>(()=>{if(!t)return void(0,d.zN)(e("hostreq"));const n=parseInt(c),s=parseInt(u);isNaN(n)||isNaN(s)||n<1||s<1||n>65535||s>65535?(0,d.zN)(e("端口范围无效")):n>s?(0,d.zN)(e("portrng")):(w(!0),C(null),N([]),P.current=[],A(null),_.ws.sendData(k.HK.port_scan_req,{host:t,startPort:n,endPort:s,concurrency:parseInt(m)||100,timeout:parseInt(j)||2e3}).catch(()=>{}))})()}),children:[(0,x.jsx)(a.Sm,{placeholder:e("目标主机"),value:t,handleInputChange:e=>n(e)}),(0,x.jsx)(a.Sm,{placeholder:e("起始端口"),value:c,handleInputChange:e=>h(e)}),(0,x.jsx)(a.Sm,{placeholder:e("结束端口"),value:u,handleInputChange:e=>p(e)}),(0,x.jsx)(a.Sm,{placeholder:e("并发数"),value:m,handleInputChange:e=>f(e)}),(0,x.jsx)(a.Sm,{placeholder:e("超时(ms)"),value:j,handleInputChange:e=>g(e)}),v&&S&&(0,x.jsxs)("div",{children:[(0,x.jsxs)("p",{children:[e("已扫描"),": ",S.scanned," / ",S.total]}),(0,x.jsx)(l.gz,{progress:S.percent})]}),y.length>0&&(0,x.jsx)(b.X,{headers:[e("端口"),e("状态")],rows:y.map(t=>[t.port,(0,x.jsx)("span",{children:e("开放")})])}),v&&0===y.length&&(0,x.jsx)("p",{children:e("正在扫描...")}),!v&&I&&0===y.length&&(0,x.jsx)("p",{children:e("未发现开放端口")}),!v&&!I&&0===y.length&&(0,x.jsx)("p",{children:e("scan_in")})]})})})})}var A=n(48890);const P=(0,s.forwardRef)(function({value:e="",mode:t="plain_text",showLineNumbers:n=!0,wrap:r=!1,readOnly:a=!1,onChange:l,onCursorChange:o,onSave:c,className:i,style:d,options:h},u){const p=(0,s.useRef)(null),m=(0,s.useRef)(null),[f]=(0,w.fp)(S.AG.user_base_info),j=f.user_data.theme?.includes("dark")?"cloud_editor_dark":"cloud9_day",g=(0,s.useRef)({onChange:l,onCursorChange:o,onSave:c});return g.current={onChange:l,onCursorChange:o,onSave:c},(0,s.useImperativeHandle)(u,()=>({getValue:()=>m.current?.getValue()??"",setValue:(e,t=!1)=>{const n=m.current;if(n&&(n.setValue(e,-1),t)){const e=n.getSession();e.indentAll?.()}},getEditor:()=>m.current,getCursorOffset:()=>{const e=m.current;return e?e.session.doc.positionToIndex(e.getCursorPosition(),0):0},setCursorOffset:e=>{const t=m.current;if(!t)return;const n=t.session.doc.indexToPosition(Math.max(0,e),0);t.selection.moveCursorTo(n.row,n.column),t.selection.clearSelection(),t.scrollToLine(n.row,!0,!1,()=>{})},focus:()=>m.current?.focus()}),[]),(0,s.useEffect)(()=>{const s=p.current;if(!s)return;const l=A.Kw.edit(s,{value:e,mode:`ace/mode/${t}`,theme:`ace/theme/${j}`,showPrintMargin:!1,highlightActiveLine:!1,fontSize:14,readOnly:a,showLineNumbers:n,showGutter:n,wrap:r,useWorker:!1,...h});return l.on("change",()=>{g.current.onChange?.(l.getValue())}),l.selection.on("changeCursor",()=>{g.current.onCursorChange?.()}),l.commands.addCommand({name:"filecat_save",bindKey:{win:"Ctrl-S",mac:"Command-S"},exec:()=>{g.current.onSave?.()},readOnly:!0}),m.current=l,()=>{l.destroy(),m.current=null}},[]),(0,x.jsx)("div",{ref:p,className:i,style:d})});var M=n(20382),T=n(63398),D=n(55921),V=n(63963);const $={json:"json",yaml:"yaml",toml:"toml",xml:"xml",properties:"properties"},W="#text",F=new D.A({ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:W,parseAttributeValue:!0,parseTagValue:!0,trimValues:!0,isArray:()=>!1}),E=new V.A({ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:W,format:!0,indentBy:" ",suppressEmptyNode:!0});function Z(e){return e.replace(/\\(u[0-9a-fA-F]{4}|.)/g,(e,t)=>"u"===t[0]?String.fromCharCode(parseInt(t.slice(1),16)):"n"===t?"\n":"t"===t?"\t":"r"===t?"\r":t)}function U(e){return e.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}function B(e,t){if(""===e.trim())return null;if("json"===t)return JSON.parse(e);if("yaml"===t)return M.Hh(e);if("toml"===t)return(0,T.qg)(e);if("properties"===t)return function(e){const t={},n=[];let s="";for(const t of e.split(/\r?\n/)){if(""===s&&""===t.trim())continue;const e=s+t,r=e.match(/\\+$/);null!==r&&r[0].length%2==1?s=e.slice(0,-1):(n.push(e),s="")}""!==s&&n.push(s);for(const e of n){const n=e.trimStart();if(""===n||n.startsWith("#")||n.startsWith("!"))continue;let s=-1;for(let t=0;t<e.length;t++){const n=e[t];if("\\"!==n){if("="===n||":"===n){s=t;break}}else t++}const r=-1===s?e:e.slice(0,s),a=-1===s?"":e.slice(s+1),l=Z(r.trim());""!==l&&(t[l]=Z(a.trim()))}return t}(e);const n=F.parse(e);return n&&"object"==typeof n&&delete n["?xml"],n}function H(e,t){if("json"===t)return JSON.stringify(e,null,2);if("yaml"===t)return M.Bh(e,{indent:2,lineWidth:-1,noRefs:!0});if("toml"===t){if(null===e||"object"!=typeof e||Array.isArray(e))throw new Error("TOML 顶层必须是对象,无法转换标量或数组");return(0,T.As)(e)}if("properties"===t)return function(e){if(null===e||"object"!=typeof e)throw new Error("Properties 顶层必须是对象,无法转换标量");const t=[],n=(e,s)=>{if(null!=e)if(Array.isArray(e))e.forEach((e,t)=>n(e,""===s?String(t):`${s}.${t}`));else if("object"!=typeof e)""!==s&&t.push(`${U(s)}=${U(String(e))}`);else for(const[t,r]of Object.entries(e))n(r,""===s?t:`${s}.${t}`)};return n(e,""),t.join("\n")}(e);if(null===e||"object"!=typeof e)throw new Error("XML 顶层必须是对象,无法转换标量");if(Array.isArray(e))throw new Error("XML 顶层必须是对象,无法转换数组");return 1===Object.keys(e).length?E.build(e):E.build({root:e})}const R=[{label:"JSON",value:"json"},{label:"YAML",value:"yaml"},{label:"TOML",value:"toml"},{label:"XML",value:"xml"},{label:"Properties",value:"properties"}];let z=0;function L(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)("json"),[c,h]=(0,s.useState)("yaml"),[u,p]=(0,s.useState)(""),[m,f]=(0,s.useState)(++z),[j,g]=(0,s.useState)(++z),v=(0,s.useRef)(""),b=(0,s.useRef)(""),w=(0,s.useRef)(null),S=(0,s.useRef)(null),C=e=>{v.current=e,f(++z)},y=n=>{const s=w.current?.getValue()??"";if(""!==s.trim())try{const e=function(e,t,n){return H(B(e,t),n)}(s,t,n);b.current=e,g(++z),p("")}catch(e){p(e.message)}else(0,d.zN)(e("need_input"))};return(0,x.jsxs)(r.xh,{children:[(0,x.jsx)(r.fI,{children:(0,x.jsx)(r.VP,{widthPer:100,maxWidth:"60rem",children:(0,x.jsxs)(l.Zp,{title:e("JSON 格式转换"),children:[(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",flexWrap:"wrap"},children:[(0,x.jsx)(a.l6,{options:R,value:t,width:"9em",onChange:e=>{const t=w.current?.getValue();n(e),C(void 0!==t?t:v.current)}}),(0,x.jsx)("span",{children:e("转换成")}),(0,x.jsx)(a.l6,{options:R,value:c,width:"9em",onChange:h}),(0,x.jsx)(o.C3,{text:e("转换"),clickFun:()=>y(c)}),(0,x.jsx)(o.C3,{text:e("格式化"),clickFun:()=>y(t)}),(0,x.jsx)(o.C3,{text:e("结果转到输入"),clickFun:()=>{const t=S.current?.getValue();t?(n(c),C(t)):(0,d.zN)(e("输出为空"))}})]}),""!==u&&(0,x.jsx)("div",{className:"error_tip",children:u})]})})}),(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"50rem",children:(0,x.jsx)(l.Zp,{title:e("输入")+"("+t.toUpperCase()+")",children:(0,x.jsx)(P,{ref:w,className:"toolbox-ace",value:v.current,mode:$[t],wrap:!0,onChange:()=>p("")},m)})}),(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"50rem",children:(0,x.jsx)(l.Zp,{title:e("输出")+"("+c.toUpperCase()+")",children:(0,x.jsx)(P,{ref:S,className:"toolbox-ace",value:b.current,mode:$[c],wrap:!0},j)})})]})]})}const O="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";const K=[{label:"Base64",value:"base64"},{label:"Base32",value:"base32"},{label:"Hex",value:"hex"},{label:"Unicode",value:"unicode"},{label:"URL",value:"url"},{label:"ASCII",value:"ascii"},{label:"HTML 实体",value:"html"}];function q(e,t,n=!1,s=!1){return"base64"===t?function(e){const t=(new TextEncoder).encode(e);let n="";return t.forEach(e=>n+=String.fromCharCode(e)),btoa(n)}(e):"base32"===t?function(e){const t=(new TextEncoder).encode(e);let n=0,s=0,r="";for(const e of t)for(s=s<<8|e,n+=8;n>=5;)r+=O[s>>>n-5&31],n-=5;for(n>0&&(r+=O[s<<5-n&31]);r.length%8!=0;)r+="=";return r}(e):"hex"===t?function(e,t=!1,n=!1){const s=(new TextEncoder).encode(e),r=[];return s.forEach(e=>{const n=e.toString(16).padStart(2,"0");r.push(t?n.toUpperCase():n)}),r.join(n?" ":"")}(e,n,s):"unicode"===t?function(e){let t="";for(const n of e){const e=n.codePointAt(0);if(e<128)t+=n;else if(e>65535){const n=(e-65536)%1024+56320;t+="\\u"+(Math.floor((e-65536)/1024)+55296).toString(16).padStart(4,"0"),t+="\\u"+n.toString(16).padStart(4,"0")}else t+="\\u"+e.toString(16).padStart(4,"0")}return t}(e):"url"===t?function(e,t=!0){return t?encodeURIComponent(e):encodeURI(e)}(e):"ascii"===t?function(e,t=!0){const n=(new TextEncoder).encode(e);return Array.from(n).join(t?" ":"")}(e,s):function(e){return e.replace(/[\s\S]/g,e=>{const t=e.codePointAt(0);return t>127?`&#${t};`:e})}(e)}function G(e,t){return"base64"===t?function(e){const t=atob(e.trim()),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(new TextDecoder).decode(n)}(e):"base32"===t?function(e){const t=e.trim().replace(/=+$/,"").toUpperCase();let n=0,s=0;const r=[];for(const e of t){const t=O.indexOf(e);if(t<0)throw new Error(`非法的 Base32 字符:${e}`);s=s<<5|t,n+=5,n>=8&&(r.push(s>>>n-8&255),n-=8)}return(new TextDecoder).decode(new Uint8Array(r))}(e):"hex"===t?function(e){const t=e.replace(/[\s,]/g,"");if(t.length%2!=0)throw new Error("十六进制长度必须是偶数");if(!/^[0-9a-fA-F]*$/.test(t))throw new Error("包含非十六进制字符");const n=new Uint8Array(t.length/2);for(let e=0;e<n.length;e++)n[e]=parseInt(t.substr(2*e,2),16);return(new TextDecoder).decode(n)}(e):"unicode"===t?function(e){return e.replace(/\\u([0-9a-fA-F]{4})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))}(e):"url"===t?function(e){return decodeURIComponent(e)}(e):"ascii"===t?function(e){const t=e.split(/[\s,]+/).filter(e=>""!==e),n=new Uint8Array(t.length);return t.forEach((e,t)=>{const s=Number(e);if(!Number.isInteger(s)||s<0||s>255)throw new Error(`非法的 ASCII 码:${e}`);n[t]=s}),(new TextDecoder).decode(n)}(e):function(e){return e.replace(/&#(\d+);/g,(e,t)=>String.fromCodePoint(Number(t))).replace(/&#x([0-9a-fA-F]+);/g,(e,t)=>String.fromCodePoint(parseInt(t,16)))}(e)}function X(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)("base64"),[c,h]=(0,s.useState)(""),[u,p]=(0,s.useState)(""),[m,f]=(0,s.useState)(""),[j,g]=(0,s.useState)(!1),[v,b]=(0,s.useState)(!1),w=e=>{try{p(e()),f("")}catch(e){f(e.message)}},S="hex"===t,y="hex"===t||"ascii"===t,N=t=>(0,x.jsx)(o.rA,{icon:"content_copy",title:e("复制"),onClick:()=>{""!==t?(0,C.lW)(t):(0,d.zN)(e("内容为空"))}});return(0,x.jsx)(r.xh,{children:(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:25,maxWidth:"20rem",children:(0,x.jsxs)(l.Zp,{title:e("编解码"),children:[(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",flexWrap:"wrap"},children:[(0,x.jsx)(a.l6,{options:K,value:t,width:"10em",onChange:n}),(0,x.jsx)(o.C3,{text:e("编码"),clickFun:()=>w(()=>q(c,t,j,v))}),(0,x.jsx)(o.C3,{text:e("解码"),clickFun:()=>w(()=>G(c,t))}),(0,x.jsx)(o.C3,{text:e("结果转到输入"),clickFun:()=>{""!==u?(h(u),p("")):(0,d.zN)(e("输出为空"))}}),S&&(0,x.jsxs)("label",{className:"toolbox-check",children:[(0,x.jsx)("input",{type:"checkbox",checked:j,onChange:e=>g(e.target.checked)}),(0,x.jsx)("span",{children:e("大写")})]}),y&&(0,x.jsxs)("label",{className:"toolbox-check",children:[(0,x.jsx)("input",{type:"checkbox",checked:v,onChange:e=>b(e.target.checked)}),(0,x.jsx)("span",{children:e("空格分隔")})]})]}),""!==m&&(0,x.jsx)("div",{className:"error_tip",children:m})]})}),(0,x.jsx)(r.VP,{widthPer:37.5,maxWidth:"30rem",children:(0,x.jsx)(l.Zp,{title:e("输入"),rightTopCom:N(c),children:(0,x.jsx)(a.Z2,{value:c,style:{width:"100%",height:"270px"},spellCheck:!1,handleInputChange:e=>{h(e),f("")},placeholder:e("codec_in_ph")})})}),(0,x.jsx)(r.VP,{widthPer:37.5,maxWidth:"30rem",children:(0,x.jsx)(l.Zp,{title:e("输出"),rightTopCom:N(u),children:(0,x.jsx)(a.Z2,{value:u,style:{width:"100%",height:"270px"},spellCheck:!1,handleInputChange:e=>p(e),placeholder:e("codec_out_ph")})})})]})})}var J=n(86940);const Y=[{label:"MD5",value:"md5"},{label:"SHA-1",value:"sha1"},{label:"SHA-256",value:"sha256"},{label:"SHA-384",value:"sha384"},{label:"SHA-512",value:"sha512"}],Q={md5:"MD5",sha1:"SHA-1",sha256:"SHA-256",sha384:"SHA-384",sha512:"SHA-512"};async function ee(e,t){if("md5"===t)return(0,J.F)(e);const n=(new TextEncoder).encode(e),s=await crypto.subtle.digest(Q[t],n);return r=s,Array.from(new Uint8Array(r)).map(e=>e.toString(16).padStart(2,"0")).join("");var r}function te(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)(""),[c,h]=(0,s.useState)({});return(0,s.useEffect)(()=>{let e=!0;if(""!==t)return async function(e){const t=await Promise.all(Y.map(async t=>[t.value,await ee(e,t.value)]));return Object.fromEntries(t)}(t).then(t=>{e&&h(t)}),()=>{e=!1};h({})},[t]),(0,x.jsx)(r.xh,{children:(0,x.jsx)(r.fI,{children:(0,x.jsx)(r.VP,{widthPer:100,maxWidth:"60rem",children:(0,x.jsxs)(l.Zp,{title:e("摘要算法"),children:[(0,x.jsx)(a.Z2,{value:t,style:{width:"100%",height:"120px"},spellCheck:!1,handleInputChange:e=>n(e),placeholder:e("hash_in_ph")}),(0,x.jsx)("div",{style:{marginTop:"0.5em"},children:Y.map(t=>(0,x.jsxs)("div",{className:"hash-row",children:[(0,x.jsx)("span",{className:"hash-name",children:t.label}),(0,x.jsx)("span",{className:"hash-value",children:c[t.value]??""}),(0,x.jsx)(o.rA,{icon:"content_copy",title:e("复制"),onClick:()=>{const n=c[t.value];n?(0,C.lW)(n):(0,d.zN)(e("内容为空"))}})]},t.value))})]})})})})}const ne=[{label:"d",value:"d",desc:"分组索引"},{label:"g",value:"g",desc:"全局"},{label:"i",value:"i",desc:"忽略大小写"},{label:"m",value:"m",desc:"多行"},{label:"s",value:"s",desc:"含换行"},{label:"u",value:"u",desc:"Unicode",raw:!0},{label:"v",value:"v",desc:"Unicode 集合"},{label:"y",value:"y",desc:"粘性"}];function se(e,t){if(0===t.length)return e;const n=[];let s=0;return t.forEach((t,r)=>{t.index>s&&n.push(e.slice(s,t.index)),""!==t.text&&n.push((0,x.jsx)("mark",{className:"regex-mark",children:t.text},r)),s=t.index+t.text.length}),s<e.length&&n.push(e.slice(s)),n}function re(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)(""),[o,c]=(0,s.useState)(""),[d,h]=(0,s.useState)("g"),u=(0,s.useMemo)(()=>function(e,t,n){if(""===e)return{matches:[],error:""};let s;try{s=new RegExp(e,t)}catch(e){return{matches:[],error:e.message}}const r=[],a=t.includes("g")||t.includes("y");let l,o=0;for(;null!==(l=s.exec(n))&&(r.push({text:l[0],index:l.index,groups:l.slice(1)}),a)&&(""===l[0]&&s.lastIndex++,!(++o>1e4)););return{matches:r,error:""}}(t,d,o),[t,d,o]);return(0,x.jsxs)(r.xh,{children:[(0,x.jsx)(r.fI,{children:(0,x.jsx)(r.VP,{widthPer:100,maxWidth:"60rem",children:(0,x.jsxs)(l.Zp,{title:e("正则表达式"),children:[(0,x.jsxs)("div",{className:"regex-input-row",children:[(0,x.jsx)("span",{className:"regex-slash",children:"/"}),(0,x.jsx)(a.Sm,{width:"100%",value:t,placeholder:e("正则表达式"),handleInputChange:e=>n(e)}),(0,x.jsx)("span",{className:"regex-slash",children:"/"}),(0,x.jsx)("span",{className:"regex-flags",children:d})]}),(0,x.jsx)("div",{className:"regex-flag-row",children:ne.map(t=>(0,x.jsxs)("label",{title:t.raw?t.desc:e(t.desc),className:"toolbox-check",children:[(0,x.jsx)("input",{type:"checkbox",checked:d.includes(t.value),onChange:()=>{return e=t.value,void h(t=>t.includes(e)?t.replace(e,""):t+e);var e}}),(0,x.jsx)("span",{className:"regex-flag-letter",children:t.label}),(0,x.jsx)("span",{children:t.raw?t.desc:e(t.desc)})]},t.value))}),""!==u.error&&(0,x.jsx)("div",{className:"error_tip",children:u.error}),(0,x.jsxs)("div",{style:{marginTop:"0.5em"},children:[e("匹配到")," ",(0,x.jsx)("b",{children:u.matches.length})," ",e("处")]})]})})}),(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsx)(l.Zp,{title:e("测试文本"),children:(0,x.jsx)(a.Z2,{value:o,style:{width:"100%",height:"260px"},spellCheck:!1,handleInputChange:e=>c(e),placeholder:e("regex_in_ph")})})}),(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsx)(l.Zp,{title:e("高亮结果"),children:(0,x.jsx)("div",{className:"regex-preview",children:""===o?(0,x.jsx)("span",{className:"regex-empty",children:e("regex_empty")}):se(o,u.matches)})})})]}),u.matches.length>0&&(0,x.jsx)(r.fI,{children:(0,x.jsx)(r.VP,{widthPer:100,maxWidth:"60rem",children:(0,x.jsx)(l.Zp,{title:e("匹配详情"),children:(0,x.jsx)("div",{className:"regex-match-list",children:u.matches.map((t,n)=>(0,x.jsxs)("div",{className:"regex-match-item",children:[(0,x.jsxs)("span",{className:"regex-match-index",children:["#",n+1]}),(0,x.jsx)("span",{className:"regex-match-text",children:""===t.text?e("空"):t.text}),(0,x.jsxs)("span",{className:"regex-match-pos",children:[e("位置")," ",t.index]}),t.groups.length>0&&(0,x.jsx)("span",{className:"regex-match-groups",children:t.groups.map((t,n)=>(0,x.jsxs)("span",{className:"regex-group",children:["$",n+1,"=",t??e("未匹配")]},n))})]},n))})})})})]})}function ae(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)(String(Math.floor(Date.now()/1e3))),[r,c]=(0,s.useState)(""),h=function(e){const t=Number(e.trim());return!Number.isFinite(t)||t<=0?null:new Date(t<1e11?1e3*t:t)}(t),u=new Date,p=h?function(e){const t=e=>String(e).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`}(h):e("无效时间戳");return(0,x.jsxs)(l.Zp,{title:e("时间转换"),children:[(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",flexWrap:"wrap"},children:[(0,x.jsx)("span",{className:"toolbox-label",children:e("时间戳")}),(0,x.jsx)(a.Sm,{width:"14em",value:t,placeholder:e("秒或毫秒"),handleInputChange:n}),(0,x.jsx)(o.C3,{text:e("现在"),clickFun:()=>n(String(Math.floor(Date.now()/1e3)))})]}),(0,x.jsxs)("div",{className:"toolbox-kv",children:[(0,x.jsx)("span",{children:e("秒级")}),(0,x.jsx)("span",{className:"toolbox-mono",children:h?Math.floor(h.getTime()/1e3):"-"}),(0,x.jsx)("span",{children:e("毫秒级")}),(0,x.jsx)("span",{className:"toolbox-mono",children:h?h.getTime():"-"}),(0,x.jsx)("span",{children:e("本地时间")}),(0,x.jsx)("span",{className:"toolbox-mono",children:p}),(0,x.jsx)("span",{children:"ISO 8601"}),(0,x.jsx)("span",{className:"toolbox-mono",children:h?h.toISOString():"-"}),(0,x.jsx)("span",{children:e("UTC 时间")}),(0,x.jsx)("span",{className:"toolbox-mono",children:h?h.toUTCString():"-"}),(0,x.jsx)("span",{children:e("距现在")}),(0,x.jsx)("span",{className:"toolbox-mono",children:h?le(h.getTime()-u.getTime(),e):"-"})]}),(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",marginTop:"0.5em",flexWrap:"wrap"},children:[(0,x.jsx)("span",{className:"toolbox-label",children:e("日期")}),(0,x.jsx)(a.Sm,{width:"14em",value:r,placeholder:"2024-01-01 12:00:00",handleInputChange:c}),(0,x.jsx)(o.C3,{text:e("转时间戳"),clickFun:()=>{const t=new Date(r.trim().replace(" ","T"));isNaN(t.getTime())?(0,d.zN)(e("date_invalid")):n(String(Math.floor(t.getTime()/1e3)))}})]})]})}function le(e,t){const n=Math.abs(e),s=e>0,r=[[864e5,t("天")],[36e5,t("小时")],[6e4,t("分钟")],[1e3,t("秒")]];for(const[e,a]of r)if(n>=e){const r=Math.floor(n/e);return`${t(s?"还有":"已过去")} ${r} ${a}`}return t("刚刚")}function oe(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)("255"),[r,o]=(0,s.useState)("10"),c=[{label:"2 "+e("进制"),value:"2"},{label:"8 "+e("进制"),value:"8"},{label:"10 "+e("进制"),value:"10"},{label:"16 "+e("进制"),value:"16"},{label:"36 "+e("进制"),value:"36"}];let d=NaN;try{const e=t.trim().toLowerCase().replace(/^0x/,"");d="10"===r?Number(e):parseInt(e,Number(r))}catch(e){d=NaN}const h=[];return Number.isFinite(d)&&(h.push({label:"2 "+e("进制"),v:d.toString(2)}),h.push({label:"8 "+e("进制"),v:d.toString(8)}),h.push({label:"10 "+e("进制"),v:d.toString(10)}),h.push({label:"16 "+e("进制"),v:d.toString(16).toUpperCase()}),h.push({label:"36 "+e("进制"),v:d.toString(36).toUpperCase()}),h.push({label:e("字节"),v:ce(d,e)})),(0,x.jsxs)(l.Zp,{title:e("进制转换"),children:[(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",flexWrap:"wrap"},children:[(0,x.jsx)(a.Sm,{width:"14em",value:t,placeholder:e("输入数值"),handleInputChange:e=>n(e)}),(0,x.jsx)(a.l6,{options:c,value:r,width:"8em",onChange:o})]}),Number.isFinite(d)?(0,x.jsx)("div",{className:"toolbox-kv",children:h.map(e=>(0,x.jsxs)(s.Fragment,{children:[(0,x.jsx)("span",{children:e.label}),(0,x.jsx)("span",{className:"toolbox-mono",children:e.v})]},e.label))}):(0,x.jsx)("div",{className:"error_tip",children:e("num_invalid")})]})}function ce(e,t){if(e<0||!Number.isInteger(e))return"-";const n=Math.max(8,8*Math.ceil(e.toString(2).length/8));return`${n/8} ${t("字节")} (${n} ${t("位")})`}function ie(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)("#4a90d9"),r=function(e){const t=e.trim().replace(/^#/,"");return/^[0-9a-fA-F]{3}$/.test(t)?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16)}:/^[0-9a-fA-F]{6}$/.test(t)?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16)}:null}(t),c=r?function(e,t,n){const s=e/255,r=t/255,a=n/255,l=Math.max(s,r,a),o=Math.min(s,r,a),c=(l+o)/2;if(l===o)return{h:0,s:0,l:Math.round(100*c)};const i=l-o,d=c>.5?i/(2-l-o):i/(l+o);let h=0;return h=l===s?((r-a)/i+(r<a?6:0))/6:l===r?((a-s)/i+2)/6:((s-r)/i+4)/6,{h:Math.round(360*h),s:Math.round(100*d),l:Math.round(100*c)}}(r.r,r.g,r.b):null;return(0,x.jsxs)(l.Zp,{title:e("颜色转换"),children:[(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",flexWrap:"wrap"},children:[(0,x.jsx)("input",{type:"color",className:"toolbox-color-picker",value:r?de(r.r,r.g,r.b):"#000000",onChange:e=>n(e.target.value)}),(0,x.jsx)(a.Sm,{width:"12em",value:t,placeholder:"#4a90d9",handleInputChange:n}),(0,x.jsx)(o.rA,{icon:"content_copy",title:e("复制颜色"),onClick:()=>{r?(0,C.lW)(de(r.r,r.g,r.b)):(0,d.zN)(e("颜色格式无效"))}})]}),r&&c?(0,x.jsxs)("div",{className:"toolbox-kv",children:[(0,x.jsx)("span",{children:"HEX"}),(0,x.jsx)("span",{className:"toolbox-mono",children:de(r.r,r.g,r.b).toUpperCase()}),(0,x.jsx)("span",{children:"RGB"}),(0,x.jsxs)("span",{className:"toolbox-mono",children:["rgb(",r.r,", ",r.g,", ",r.b,")"]}),(0,x.jsx)("span",{children:"RGBA"}),(0,x.jsxs)("span",{className:"toolbox-mono",children:["rgba(",r.r,", ",r.g,", ",r.b,", 1)"]}),(0,x.jsx)("span",{children:"HSL"}),(0,x.jsxs)("span",{className:"toolbox-mono",children:["hsl(",c.h,", ",c.s,"%, ",c.l,"%)"]})]}):(0,x.jsx)("div",{className:"error_tip",children:e("color_invalid")})]})}function de(e,t,n){const s=e=>e.toString(16).padStart(2,"0");return`#${s(e)}${s(t)}${s(n)}`}const he="0123456789abcdef";function ue(){const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;let t="";return e.forEach(e=>t+=he[e>>4]+he[15&e]),`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}const xe="abcdefghijklmnopqrstuvwxyz",pe="ABCDEFGHIJKLMNOPQRSTUVWXYZ",me="0123456789",fe="!@#$%^&*()-_=+[]{};:,.<>?";function je(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)(()=>[ue(),ue(),ue()]),[r,c]=(0,s.useState)("16"),[h,u]=(0,s.useState)(!0),[p,m]=(0,s.useState)(!0),[f,j]=(0,s.useState)(!0),[g,v]=(0,s.useState)(!1),[b,w]=(0,s.useState)("");return(0,x.jsxs)(l.Zp,{title:e("UUID / 随机密码"),children:[(0,x.jsx)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",flexWrap:"wrap"},children:(0,x.jsx)(o.C3,{text:e("生成 UUID"),clickFun:()=>n([ue(),ue(),ue()])})}),(0,x.jsx)("div",{className:"toolbox-kv",children:t.map((t,n)=>(0,x.jsxs)(s.Fragment,{children:[(0,x.jsxs)("span",{children:["UUID ",n+1]}),(0,x.jsx)("span",{className:"toolbox-mono toolbox-copyable",onClick:()=>(0,C.lW)(t),title:e("点击复制"),children:t})]},n))}),(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",marginTop:"0.75em",flexWrap:"wrap"},children:[(0,x.jsx)("span",{className:"toolbox-label",children:e("长度")}),(0,x.jsx)(a.Sm,{width:"5em",value:r,handleInputChange:c}),(0,x.jsxs)("label",{className:"toolbox-check",children:[(0,x.jsx)("input",{type:"checkbox",checked:h,onChange:e=>u(e.target.checked)}),(0,x.jsx)("span",{children:"a-z"})]}),(0,x.jsxs)("label",{className:"toolbox-check",children:[(0,x.jsx)("input",{type:"checkbox",checked:p,onChange:e=>m(e.target.checked)}),(0,x.jsx)("span",{children:"A-Z"})]}),(0,x.jsxs)("label",{className:"toolbox-check",children:[(0,x.jsx)("input",{type:"checkbox",checked:f,onChange:e=>j(e.target.checked)}),(0,x.jsx)("span",{children:"0-9"})]}),(0,x.jsxs)("label",{className:"toolbox-check",children:[(0,x.jsx)("input",{type:"checkbox",checked:g,onChange:e=>v(e.target.checked)}),(0,x.jsx)("span",{children:e("符号")})]}),(0,x.jsx)(o.C3,{text:e("生成密码"),clickFun:()=>{let t="";if(h&&(t+=xe),p&&(t+=pe),f&&(t+=me),g&&(t+=fe),""===t)return void(0,d.zN)(e("pw_need_set"));const n=Math.max(1,Math.min(256,Number(r)||16)),s=new Uint32Array(n);crypto.getRandomValues(s);let a="";for(let e=0;e<n;e++)a+=t[s[e]%t.length];w(a)}})]}),""!==b&&(0,x.jsxs)("div",{className:"toolbox-kv",children:[(0,x.jsx)("span",{children:e("密码")}),(0,x.jsx)("span",{className:"toolbox-mono toolbox-copyable",onClick:()=>(0,C.lW)(b),title:e("点击复制"),children:b})]})]})}function ge(){return(0,x.jsxs)(r.xh,{children:[(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsx)(ae,{})}),(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsx)(oe,{})}),(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsx)(je,{})})]}),(0,x.jsx)(r.fI,{children:(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsx)(ie,{})})})]})}var ve=n(87583);const be=[{label:"L (7%)",value:"L"},{label:"M (15%)",value:"M"},{label:"Q (25%)",value:"Q"},{label:"H (30%)",value:"H"}];function we(){const{t:e}=(0,i.Bd)(),t=(0,s.useRef)(null),[n,c]=(0,s.useState)(""),[h,u]=(0,s.useState)("320"),[p,m]=(0,s.useState)("M"),[f,j]=(0,s.useState)("");(0,s.useEffect)(()=>{const e=t.current;if(!e)return;if(""===n){const t=e.getContext("2d");return t?.clearRect(0,0,e.width,e.height),void j("")}const s=Math.max(80,Math.min(2048,Number(h)||320));ve.toCanvas(e,n,{width:s,margin:2,errorCorrectionLevel:p}).then(()=>j("")).catch(e=>{j(e.message)})},[n,h,p]);const g=()=>{const s=t.current;if(!s||""===n)return void(0,d.zN)(e("qr_none"));const r=s.toDataURL("image/png"),a=document.createElement("a");a.href=r,a.download="qrcode.png",a.click()};return(0,x.jsx)(r.xh,{children:(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsxs)(l.Zp,{title:e("二维码生成"),children:[(0,x.jsx)(a.Z2,{value:n,style:{width:"100%",height:"200px"},spellCheck:!1,handleInputChange:e=>c(e),placeholder:e("qr_in_ph")}),(0,x.jsxs)("div",{className:"div-row",style:{alignItems:"center",gap:"0.5em",marginTop:"0.5em",flexWrap:"wrap"},children:[(0,x.jsx)("span",{className:"toolbox-label",children:e("尺寸")}),(0,x.jsx)(a.Sm,{width:"6em",value:h,handleInputChange:e=>u(e)}),(0,x.jsx)("span",{className:"toolbox-label",children:e("纠错级别")}),(0,x.jsx)("select",{className:"toolbox-select",value:p,onChange:e=>m(e.target.value),children:be.map(e=>(0,x.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,x.jsx)(o.C3,{text:e("下载 PNG"),clickFun:g})]}),""!==f&&(0,x.jsx)("div",{className:"error_tip",children:f})]})}),(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"30rem",children:(0,x.jsx)(l.Zp,{title:e("预览"),rightTopCom:(0,x.jsx)(o.rA,{icon:"download",title:e("下载"),onClick:g}),children:(0,x.jsxs)("div",{className:"toolbox-qr-preview",children:[(0,x.jsx)("canvas",{ref:t,style:{display:""===n?"none":"block"}}),""===n&&(0,x.jsx)("span",{className:"toolbox-empty",children:e("qr_empty")})]})})})]})})}var Se=n(20734);function Ce(){const{t:e}=(0,i.Bd)(),[t,n]=(0,s.useState)(""),[o,c]=(0,s.useState)(""),d=""!==t||""!==o;return(0,x.jsxs)(r.xh,{children:[(0,x.jsxs)(r.fI,{children:[(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"50rem",children:(0,x.jsx)(l.Zp,{title:e("原文本"),children:(0,x.jsx)(a.Z2,{value:t,style:{width:"100%",height:"200px"},spellCheck:!1,handleInputChange:e=>n(e),placeholder:e("粘贴原文本")})})}),(0,x.jsx)(r.VP,{widthPer:50,maxWidth:"50rem",children:(0,x.jsx)(l.Zp,{title:e("新文本"),children:(0,x.jsx)(a.Z2,{value:o,style:{width:"100%",height:"200px"},spellCheck:!1,handleInputChange:e=>c(e),placeholder:e("粘贴新文本")})})})]}),(0,x.jsx)(r.fI,{children:(0,x.jsx)(r.VP,{widthPer:100,maxWidth:"100rem",children:(0,x.jsx)(l.Zp,{title:e("差异"),children:(0,x.jsx)("div",{className:"text-diff-box",children:d?(0,x.jsx)(Se.A,{valueA:t,valueB:o,mode:"split"}):(0,x.jsx)("div",{className:"text-diff-empty",children:e("输入文本后这里显示差异")})})})})})]})}var ye=n(87361);function Ne(e){const{t}=(0,i.Bd)(),{check_user_auth:n}=(0,j.MH)(),s=[];return s.push({index:1,name:t("开发者工具"),rto:"developer/",component:(0,x.jsx)(ge,{})},{index:1,name:t("时间工具"),rto:"timeutil/",component:(0,x.jsx)(p,{})},{index:1,name:t("JSON 格式转换"),rto:"format/",component:(0,x.jsx)(L,{})},{index:1,name:t("编解码"),rto:"codec/",component:(0,x.jsx)(X,{})},{index:1,name:t("摘要算法"),rto:"hash/",component:(0,x.jsx)(te,{})},{index:1,name:t("正则测试"),rto:"regex/",component:(0,x.jsx)(re,{})},{index:1,name:t("文本对比"),rto:"diff/",component:(0,x.jsx)(Ce,{})},{index:1,name:t("二维码"),rto:"qrcode/",component:(0,x.jsx)(we,{})},{index:1,name:t("非对称密钥"),rto:"crypto/",component:(0,x.jsx)(N,{})}),n(g.oV.port_scan)&&s.push({index:1,name:t("端口扫描"),rto:"portscan/",component:(0,x.jsx)(I,{})}),n(g.oV.wol_proxy)&&s.push({index:1,name:t("网络唤醒"),rto:"netwol/",component:(0,x.jsx)(v,{})}),(0,x.jsx)(r.W1,{optionList:s,father_route:ye.o.toolbox})}}}]);
|
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.1859ab75795aabae2f60.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>
|