filecat 7.12.1 → 7.13.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/2300.3c83fc27783efb65df57.js +2 -0
- package/build/dist/2674.2713dbaf7b4dbb6baa4c.js +1 -0
- package/build/dist/2728.d0205a036e2caff34c1c.js +1 -0
- package/build/dist/3299.b85fad5623f990484bd9.js +1 -0
- package/build/dist/3528.55d2faabf2edbde62652.js +1 -0
- package/build/dist/4004.ca7e777145c700c5b186.js +1 -0
- package/build/dist/{4220.b65b40382726a69ba0bc.js → 4220.6e56dcffa8e57c91e363.js} +1 -1
- package/build/dist/4493.f527f1994d14470017f4.js +1 -0
- package/build/dist/5602.b92e2770ff00ee6da48a.js +2 -0
- package/build/dist/5602.b92e2770ff00ee6da48a.js.LICENSE.txt +28 -0
- package/build/dist/{5877.e2316c84a95490f77439.js → 5877.0d338155dc591229a758.js} +1 -1
- package/build/dist/6404.bcf224539211a7979990.js +1 -0
- package/build/dist/{7310.bf944d03f24fcf109680.js → 7310.258969acc0782007bdf5.js} +1 -1
- package/build/dist/735.38718e61fe313f131a3e.js +1 -0
- package/build/dist/{8090.8977224618a14ae42159.js → 8090.8b172ffd0f62ceebf881.js} +2 -2
- package/build/dist/8277.c76a3bbffade9d2d859b.js +1 -0
- package/build/dist/8302.c72a3767319d87419737.js +1 -0
- package/build/dist/8725.970abee75f92962aeab9.js +1 -0
- package/build/dist/9334.d3102e0ed30ae564f506.js +1 -0
- package/build/dist/{9546.2cecad04cf676a6616cd.js → 9546.ba8ea7791f14ee133338.js} +1 -1
- package/build/dist/index.html +1 -1
- package/build/dist/main.e03c0b1342da0ac83715.js +2 -0
- package/build/main.js +1 -1
- package/build/ripgrep/rg.exe +0 -0
- package/package.json +1 -1
- package/shell/config/webpack.web.config.js +5 -0
- package/build/dist/1417.d390b18dd58ff5c28160.js +0 -1
- package/build/dist/2300.c99b1dd4e752cdfd5e32.js +0 -2
- package/build/dist/2479.294792ef5d360ad64abc.js +0 -1
- package/build/dist/2674.46c009a7ec426b7d8828.js +0 -1
- package/build/dist/3299.5c01eebc0f62cdc7bb39.js +0 -1
- package/build/dist/3528.0f8f34028d92fa87c518.js +0 -1
- package/build/dist/4004.916c0413a6db61a54e11.js +0 -1
- package/build/dist/4193.58d3a34cac783ff289c6.js +0 -1
- package/build/dist/7943.acf25a5e98dd13290985.js +0 -1
- package/build/dist/8302.894efa465f6037f9f5a8.js +0 -1
- package/build/dist/9334.f04716a7e41f783abc47.js +0 -1
- package/build/dist/main.65dcea654963fc771a86.js +0 -2
- /package/build/dist/{2300.c99b1dd4e752cdfd5e32.js.LICENSE.txt → 2300.3c83fc27783efb65df57.js.LICENSE.txt} +0 -0
- /package/build/dist/{8090.8977224618a14ae42159.js.LICENSE.txt → 8090.8b172ffd0f62ceebf881.js.LICENSE.txt} +0 -0
- /package/build/dist/{main.65dcea654963fc771a86.js.LICENSE.txt → main.e03c0b1342da0ac83715.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[4193],{84193(e,n,r){r.d(n,{Zp:()=>Pt});var t=r(8058),o=r(3456),i=0;const u=function(e){var n=++i;return(0,o.A)(e)+n};var a=r(39142),c=r(87671);const f=function(e){return(null==e?0:e.length)?(0,c.A)(e,1):[]};var d=r(45572),s=r(94425),v=r(94288),l=r(38446);const h=function(e,n){var r=-1,t=(0,l.A)(e)?Array(e.length):[];return(0,v.A)(e,function(e,o,i){t[++r]=n(e,o,i)}),t};var g=r(92049);const p=function(e,n){return((0,g.A)(e)?d.A:h)(e,(0,s.A)(n,3))};var A=Math.ceil,b=Math.max;const w=function(e,n,r,t){for(var o=-1,i=b(A((n-e)/(r||1)),0),u=Array(i);i--;)u[t?i:++o]=e,e+=r;return u};var y=r(66984),m=r(25353),j=r(23149);const x=function(e,n,r){if(!(0,j.A)(r))return!1;var t=typeof n;return!!("number"==t?(0,l.A)(r)&&(0,m.A)(n,r.length):"string"==t&&n in r)&&(0,y.A)(r[n],e)};var O=/\s/;const k=function(e){for(var n=e.length;n--&&O.test(e.charAt(n)););return n};var E=/^\s+/;const N=function(e){return e?e.slice(0,k(e)+1).replace(E,""):e};var _=r(61882),I=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,T=/^0o[0-7]+$/i,M=parseInt;const R=function(e){if("number"==typeof e)return e;if((0,_.A)(e))return NaN;if((0,j.A)(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=(0,j.A)(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=N(e);var r=P.test(e);return r||T.test(e)?M(e.slice(2),r?2:8):I.test(e)?NaN:+e};var L=1/0;const C=function(e){return e?(e=R(e))===L||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};const S=function(e){return function(n,r,t){return t&&"number"!=typeof t&&x(n,r,t)&&(r=t=void 0),n=C(n),void 0===r?(r=n,n=0):r=C(r),t=void 0===t?n<r?1:-1:C(t),w(n,r,t,e)}}();var F=r(697);class B{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,n=e._prev;if(n!==e)return V(n),n}enqueue(e){var n=this._sentinel;e._prev&&e._next&&V(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){for(var e=[],n=this._sentinel,r=n._prev;r!==n;)e.push(JSON.stringify(r,G)),r=r._prev;return"["+e.join(", ")+"]"}}function V(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function G(e,n){if("_next"!==e&&"_prev"!==e)return n}var U=a.A(1);function q(e,n){if(e.nodeCount()<=1)return[];var r=function(e,n){var r=new F.T,o=0,i=0;t.A(e.nodes(),function(e){r.setNode(e,{v:e,in:0,out:0})}),t.A(e.edges(),function(e){var t=r.edge(e.v,e.w)||0,u=n(e),a=t+u;r.setEdge(e.v,e.w,a),i=Math.max(i,r.node(e.v).out+=u),o=Math.max(o,r.node(e.w).in+=u)});var u=S(i+o+3).map(function(){return new B}),a=o+1;return t.A(r.nodes(),function(e){Y(u,a,r.node(e))}),{graph:r,buckets:u,zeroIdx:a}}(e,n||U),o=function(e,n,r){var t,o=[],i=n[n.length-1],u=n[0];for(;e.nodeCount();){for(;t=u.dequeue();)D(e,n,r,t);for(;t=i.dequeue();)D(e,n,r,t);if(e.nodeCount())for(var a=n.length-2;a>0;--a)if(t=n[a].dequeue()){o=o.concat(D(e,n,r,t,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return f(p(o,function(n){return e.outEdges(n.v,n.w)}))}function D(e,n,r,o,i){var u=i?[]:void 0;return t.A(e.inEdges(o.v),function(t){var o=e.edge(t),a=e.node(t.v);i&&u.push({v:t.v,w:t.w}),a.out-=o,Y(n,r,a)}),t.A(e.outEdges(o.v),function(t){var o=e.edge(t),i=t.w,u=e.node(i);u.in-=o,Y(n,r,u)}),e.removeNode(o.v),u}function Y(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function z(e){var n="greedy"===e.graph().acyclicer?q(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],r={},o={};function i(u){Object.prototype.hasOwnProperty.call(o,u)||(o[u]=!0,r[u]=!0,t.A(e.outEdges(u),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):i(e.w)}),delete r[u])}return t.A(e.nodes(),i),n}(e);t.A(n,function(n){var r=e.edge(n);e.removeEdge(n),r.forwardName=n.name,r.reversed=!0,e.setEdge(n.w,n.v,r,u("rev"))})}var $=r(22080),J=r(84171);const W=function(e,n,r){"__proto__"==n&&J.A?(0,J.A)(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r};const Z=function(e,n,r){(void 0!==r&&!(0,y.A)(e[n],r)||void 0===r&&!(n in e))&&W(e,n,r)};var H=r(97132),K=r(41917),Q="object"==typeof exports&&exports&&!exports.nodeType&&exports,X=Q&&"object"==typeof module&&module&&!module.nodeType&&module,ee=X&&X.exports===Q?K.A.Buffer:void 0,ne=ee?ee.allocUnsafe:void 0;const re=function(e,n){if(n)return e.slice();var r=e.length,t=ne?ne(r):new e.constructor(r);return e.copy(t),t};var te=r(43988);const oe=function(e){var n=new e.constructor(e.byteLength);return new te.A(n).set(new te.A(e)),n};const ie=function(e,n){var r=n?oe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)};const ue=function(e,n){var r=-1,t=e.length;for(n||(n=Array(t));++r<t;)n[r]=e[r];return n};var ae=Object.create;const ce=function(){function e(){}return function(n){if(!(0,j.A)(n))return{};if(ae)return ae(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}}();const fe=(0,r(40367).A)(Object.getPrototypeOf,Object);var de=r(97271);const se=function(e){return"function"!=typeof e.constructor||(0,de.A)(e)?{}:ce(fe(e))};var ve=r(25175),le=r(53533),he=r(41200),ge=r(89610),pe=r(2383),Ae=r(53098),be=Function.prototype,we=Object.prototype,ye=be.toString,me=we.hasOwnProperty,je=ye.call(Object);const xe=function(e){if(!(0,Ae.A)(e)||"[object Object]"!=(0,pe.A)(e))return!1;var n=fe(e);if(null===n)return!0;var r=me.call(n,"constructor")&&n.constructor;return"function"==typeof r&&r instanceof r&&ye.call(r)==je};var Oe=r(54749);const ke=function(e,n){if(("constructor"!==n||"function"!=typeof e[n])&&"__proto__"!=n)return e[n]};var Ee=Object.prototype.hasOwnProperty;const Ne=function(e,n,r){var t=e[n];Ee.call(e,n)&&(0,y.A)(t,r)&&(void 0!==r||n in e)||W(e,n,r)};const _e=function(e,n,r,t){var o=!r;r||(r={});for(var i=-1,u=n.length;++i<u;){var a=n[i],c=t?t(r[a],e[a],a,r,e):void 0;void 0===c&&(c=e[a]),o?W(r,a,c):Ne(r,a,c)}return r};var Ie=r(2505);const Pe=function(e){var n=[];if(null!=e)for(var r in Object(e))n.push(r);return n};var Te=Object.prototype.hasOwnProperty;const Me=function(e){if(!(0,j.A)(e))return Pe(e);var n=(0,de.A)(e),r=[];for(var t in e)("constructor"!=t||!n&&Te.call(e,t))&&r.push(t);return r};const Re=function(e){return(0,l.A)(e)?(0,Ie.A)(e,!0):Me(e)};const Le=function(e){return _e(e,Re(e))};const Ce=function(e,n,r,t,o,i,u){var a=ke(e,r),c=ke(n,r),f=u.get(c);if(f)Z(e,r,f);else{var d=i?i(a,c,r+"",e,n,u):void 0,s=void 0===d;if(s){var v=(0,g.A)(c),l=!v&&(0,he.A)(c),h=!v&&!l&&(0,Oe.A)(c);d=c,v||l||h?(0,g.A)(a)?d=a:(0,le.A)(a)?d=ue(a):l?(s=!1,d=re(c,!0)):h?(s=!1,d=ie(c,!0)):d=[]:xe(c)||(0,ve.A)(c)?(d=a,(0,ve.A)(a)?d=Le(a):(0,j.A)(a)&&!(0,ge.A)(a)||(d=se(c))):s=!1}s&&(u.set(c,d),o(d,c,t,i,u),u.delete(c)),Z(e,r,d)}};const Se=function e(n,r,t,o,i){n!==r&&(0,H.A)(r,function(u,a){if(i||(i=new $.A),(0,j.A)(u))Ce(n,r,a,t,e,o,i);else{var c=o?o(ke(n,a),u,a+"",n,r,i):void 0;void 0===c&&(c=u),Z(n,a,c)}},Re)};var Fe=r(24326);const Be=function(e){return(0,Fe.A)(function(n,r){var t=-1,o=r.length,i=o>1?r[o-1]:void 0,u=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,u&&x(r[0],r[1],u)&&(i=o<3?void 0:i,o=1),n=Object(n);++t<o;){var a=r[t];a&&e(n,a,t,i)}return n})}(function(e,n,r){Se(e,n,r)});var Ve=r(66318),Ge=r(24878),Ue=r(30901);const qe=function(e,n,r,t){if(!(0,j.A)(e))return e;for(var o=-1,i=(n=(0,Ge.A)(n,e)).length,u=i-1,a=e;null!=a&&++o<i;){var c=(0,Ue.A)(n[o]),f=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=u){var d=a[c];void 0===(f=t?t(d,c,a):void 0)&&(f=(0,j.A)(d)?d:(0,m.A)(n[o+1])?[]:{})}Ne(a,c,f),a=a[c]}return e};const De=function(e,n,r){for(var t=-1,o=n.length,i={};++t<o;){var u=n[t],a=(0,Ve.A)(e,u);r(a,u)&&qe(i,(0,Ge.A)(u,e),a)}return i};var Ye=r(46964);const ze=function(e,n){return De(e,n,function(n,r){return(0,Ye.A)(e,r)})};var $e=r(65255),Je=r(57424);const We=function(e){return(0,Je.A)((0,$e.A)(e,void 0,f),e+"")}(function(e,n){return null==e?{}:ze(e,n)});var Ze=Object.prototype,He=Ze.hasOwnProperty;const Ke=(0,Fe.A)(function(e,n){e=Object(e);var r=-1,t=n.length,o=t>2?n[2]:void 0;for(o&&x(n[0],n[1],o)&&(t=1);++r<t;)for(var i=n[r],u=Re(i),a=-1,c=u.length;++a<c;){var f=u[a],d=e[f];(void 0===d||(0,y.A)(d,Ze[f])&&!He.call(e,f))&&(e[f]=i[f])}return e});const Qe=function(e,n,r){for(var t=-1,o=e.length;++t<o;){var i=e[t],u=n(i);if(null!=u&&(void 0===a?u==u&&!(0,_.A)(u):r(u,a)))var a=u,c=i}return c};const Xe=function(e,n){return e>n};var en=r(29008);const nn=function(e){return e&&e.length?Qe(e,en.A,Xe):void 0};const rn=function(e){var n=null==e?0:e.length;return n?e[n-1]:void 0};var tn=r(79841);const on=function(e,n){var r={};return n=(0,s.A)(n,3),(0,tn.A)(e,function(e,t,o){W(r,t,n(e,t,o))}),r};var un=r(69592);const an=function(e,n){return e<n};const cn=function(e){return e&&e.length?Qe(e,en.A,an):void 0};var fn=Object.prototype.hasOwnProperty;const dn=function(e,n){return null!=e&&fn.call(e,n)};var sn=r(85054);const vn=function(e,n){return null!=e&&(0,sn.A)(e,n,dn)};const ln=function(){return K.A.Date.now()};function hn(e,n,r,t){var o;do{o=u(t)}while(e.hasNode(o));return r.dummy=n,e.setNode(o,r),o}function gn(e){var n=new F.T({multigraph:e.isMultigraph()}).setGraph(e.graph());return t.A(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),t.A(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function pn(e,n){var r,t,o=e.x,i=e.y,u=n.x-o,a=n.y-i,c=e.width/2,f=e.height/2;if(!u&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*c>Math.abs(u)*f?(a<0&&(f=-f),r=f*u/a,t=f):(u<0&&(c=-c),r=c,t=c*a/u),{x:o+r,y:i+t}}function An(e){var n=p(S(wn(e)+1),function(){return[]});return t.A(e.nodes(),function(r){var t=e.node(r),o=t.rank;un.A(o)||(n[o][t.order]=r)}),n}function bn(e,n,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),hn(e,"border",o,n)}function wn(e){return nn(p(e.nodes(),function(n){var r=e.node(n).rank;if(!un.A(r))return r}))}function yn(e,n){var r=ln();try{return n()}finally{console.log(e+" time: "+(ln()-r)+"ms")}}function mn(e,n){return n()}function jn(e,n,r,t,o,i){var u={width:0,height:0,rank:i,borderType:n},a=o[n][i-1],c=hn(e,"border",u,r);o[n][i]=c,e.setParent(c,t),a&&e.setEdge(a,c,{weight:1})}function xn(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){t.A(e.nodes(),function(n){En(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);t.A(r.points,En),Object.prototype.hasOwnProperty.call(r,"y")&&En(r)})}(e),"lr"!==n&&"rl"!==n||(!function(e){t.A(e.nodes(),function(n){Nn(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);t.A(r.points,Nn),Object.prototype.hasOwnProperty.call(r,"x")&&Nn(r)})}(e),On(e))}function On(e){t.A(e.nodes(),function(n){kn(e.node(n))}),t.A(e.edges(),function(n){kn(e.edge(n))})}function kn(e){var n=e.width;e.width=e.height,e.height=n}function En(e){e.y=-e.y}function Nn(e){var n=e.x;e.x=e.y,e.y=n}function _n(e){e.graph().dummyChains=[],t.A(e.edges(),function(n){!function(e,n){var r=n.v,t=e.node(r).rank,o=n.w,i=e.node(o).rank,u=n.name,a=e.edge(n),c=a.labelRank;if(i===t+1)return;e.removeEdge(n);var f,d,s=void 0;for(d=0,++t;t<i;++d,++t)a.points=[],f=hn(e,"edge",s={width:0,height:0,edgeLabel:a,edgeObj:n,rank:t},"_d"),t===c&&(s.width=a.width,s.height=a.height,s.dummy="edge-label",s.labelpos=a.labelpos),e.setEdge(r,f,{weight:a.weight},u),0===d&&e.graph().dummyChains.push(f),r=f;e.setEdge(r,o,{weight:a.weight},u)}(e,n)})}const In=function(e,n){return e&&e.length?Qe(e,(0,s.A)(n,2),an):void 0};function Pn(e){var n={};t.A(e.sources(),function r(t){var o=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return o.rank;n[t]=!0;var i=cn(p(e.outEdges(t),function(n){return r(n.w)-e.edge(n).minlen}));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i})}function Tn(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function Mn(e){var n,r,t=new F.T({directed:!1}),o=e.nodes()[0],i=e.nodeCount();for(t.setNode(o,{});Rn(t,e)<i;)n=Ln(t,e),r=t.hasNode(n.v)?Tn(e,n):-Tn(e,n),Cn(t,e,r);return t}function Rn(e,n){return t.A(e.nodes(),function r(o){t.A(n.nodeEdges(o),function(t){var i=t.v,u=o===i?t.w:i;e.hasNode(u)||Tn(n,t)||(e.setNode(u,{}),e.setEdge(o,u,{}),r(u))})}),e.nodeCount()}function Ln(e,n){return In(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return Tn(n,r)})}function Cn(e,n,r){t.A(e.nodes(),function(e){n.node(e).rank+=r})}var Sn=r(27422);const Fn=function(e){return function(n,r,t){var o=Object(n);if(!(0,l.A)(n)){var i=(0,s.A)(r,3);n=(0,Sn.A)(n),r=function(e){return i(o[e],e,o)}}var u=e(n,r,t);return u>-1?o[i?n[u]:u]:void 0}};var Bn=r(25707);const Vn=function(e){var n=C(e),r=n%1;return n==n?r?n-r:n:0};var Gn=Math.max;const Un=Fn(function(e,n,r){var t=null==e?0:e.length;if(!t)return-1;var o=null==r?0:Vn(r);return o<0&&(o=Gn(t+o,0)),(0,Bn.A)(e,(0,s.A)(n,3),o)});var qn=r(66070);a.A(1);a.A(1);r(14453);var Dn=r(9137);(0,r(70805).A)("length");RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Yn="\\ud800-\\udfff",zn="["+Yn+"]",$n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Jn="\\ud83c[\\udffb-\\udfff]",Wn="[^"+Yn+"]",Zn="(?:\\ud83c[\\udde6-\\uddff]){2}",Hn="[\\ud800-\\udbff][\\udc00-\\udfff]",Kn="(?:"+$n+"|"+Jn+")"+"?",Qn="[\\ufe0e\\ufe0f]?",Xn=Qn+Kn+("(?:\\u200d(?:"+[Wn,Zn,Hn].join("|")+")"+Qn+Kn+")*"),er="(?:"+[Wn+$n+"?",$n,Zn,Hn,zn].join("|")+")";RegExp(Jn+"(?="+Jn+")|"+er+Xn,"g");function nr(){}function rr(e,n,r){g.A(n)||(n=[n]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],u={};return t.A(n,function(n){if(!e.hasNode(n))throw new Error("Graph does not have node: "+n);tr(e,n,"post"===r,u,o,i)}),i}function tr(e,n,r,o,i,u){Object.prototype.hasOwnProperty.call(o,n)||(o[n]=!0,r||u.push(n),t.A(i(n),function(n){tr(e,n,r,o,i,u)}),r&&u.push(n))}nr.prototype=new Error;r(72857);function or(e){e=function(e){var n=(new F.T).setGraph(e.graph());return t.A(e.nodes(),function(r){n.setNode(r,e.node(r))}),t.A(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),n}(e),Pn(e);var n,r=Mn(e);for(ar(r),ir(r,e);n=fr(r);)sr(r,e,n,dr(r,e,n))}function ir(e,n){var r=function(e,n){return rr(e,n,"post")}(e,e.nodes());r=r.slice(0,r.length-1),t.A(r,function(r){!function(e,n,r){var t=e.node(r),o=t.parent;e.edge(r,o).cutvalue=ur(e,n,r)}(e,n,r)})}function ur(e,n,r){var o=e.node(r).parent,i=!0,u=n.edge(r,o),a=0;return u||(i=!1,u=n.edge(o,r)),a=u.weight,t.A(n.nodeEdges(r),function(t){var u,c,f=t.v===r,d=f?t.w:t.v;if(d!==o){var s=f===i,v=n.edge(t).weight;if(a+=s?v:-v,u=r,c=d,e.hasEdge(u,c)){var l=e.edge(r,d).cutvalue;a+=s?-l:l}}}),a}function ar(e,n){arguments.length<2&&(n=e.nodes()[0]),cr(e,{},1,n)}function cr(e,n,r,o,i){var u=r,a=e.node(o);return n[o]=!0,t.A(e.neighbors(o),function(t){Object.prototype.hasOwnProperty.call(n,t)||(r=cr(e,n,r,t,o))}),a.low=u,a.lim=r++,i?a.parent=i:delete a.parent,r}function fr(e){return Un(e.edges(),function(n){return e.edge(n).cutvalue<0})}function dr(e,n,r){var t=r.v,o=r.w;n.hasEdge(t,o)||(t=r.w,o=r.v);var i=e.node(t),u=e.node(o),a=i,c=!1;i.lim>u.lim&&(a=u,c=!0);var f=qn.A(n.edges(),function(n){return c===vr(e,e.node(n.v),a)&&c!==vr(e,e.node(n.w),a)});return In(f,function(e){return Tn(n,e)})}function sr(e,n,r,o){var i=r.v,u=r.w;e.removeEdge(i,u),e.setEdge(o.v,o.w,{}),ar(e),ir(e,n),function(e,n){var r=Un(e.nodes(),function(e){return!n.node(e).parent}),o=function(e,n){return rr(e,n,"pre")}(e,r);o=o.slice(1),t.A(o,function(r){var t=e.node(r).parent,o=n.edge(r,t),i=!1;o||(o=n.edge(t,r),i=!0),n.node(r).rank=n.node(t).rank+(i?o.minlen:-o.minlen)})}(e,n)}function vr(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function lr(e){switch(e.graph().ranker){case"network-simplex":default:gr(e);break;case"tight-tree":!function(e){Pn(e),Mn(e)}(e);break;case"longest-path":hr(e)}}or.initLowLimValues=ar,or.initCutValues=ir,or.calcCutValue=ur,or.leaveEdge=fr,or.enterEdge=dr,or.exchangeEdges=sr;var hr=Pn;function gr(e){or(e)}var pr=r(92866),Ar=r(83130);function br(e){var n=hn(e,"root",{},"_root"),r=function(e){var n={};function r(o,i){var u=e.children(o);u&&u.length&&t.A(u,function(e){r(e,i+1)}),n[o]=i}return t.A(e.children(),function(e){r(e,1)}),n}(e),o=nn(pr.A(r))-1,i=2*o+1;e.graph().nestingRoot=n,t.A(e.edges(),function(n){e.edge(n).minlen*=i});var u=function(e){return Ar.A(e.edges(),function(n,r){return n+e.edge(r).weight},0)}(e)+1;t.A(e.children(),function(t){wr(e,n,i,u,o,r,t)}),e.graph().nodeRankFactor=i}function wr(e,n,r,o,i,u,a){var c=e.children(a);if(c.length){var f=bn(e,"_bt"),d=bn(e,"_bb"),s=e.node(a);e.setParent(f,a),s.borderTop=f,e.setParent(d,a),s.borderBottom=d,t.A(c,function(t){wr(e,n,r,o,i,u,t);var c=e.node(t),s=c.borderTop?c.borderTop:t,v=c.borderBottom?c.borderBottom:t,l=c.borderTop?o:2*o,h=s!==v?1:i-u[a]+1;e.setEdge(f,s,{weight:l,minlen:h,nestingEdge:!0}),e.setEdge(v,d,{weight:l,minlen:h,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,f,{weight:0,minlen:i+u[a]})}else a!==n&&e.setEdge(n,a,{weight:0,minlen:r})}var yr=r(72641);const mr=function(e,n){return e&&_e(n,(0,Sn.A)(n),e)};const jr=function(e,n){return e&&_e(n,Re(n),e)};var xr=r(14792);const Or=function(e,n){return _e(e,(0,xr.A)(e),n)};var kr=r(76912),Er=r(13153);const Nr=Object.getOwnPropertySymbols?function(e){for(var n=[];e;)(0,kr.A)(n,(0,xr.A)(e)),e=fe(e);return n}:Er.A;const _r=function(e,n){return _e(e,Nr(e),n)};var Ir=r(19042),Pr=r(33831);const Tr=function(e){return(0,Pr.A)(e,Re,Nr)};var Mr=Object.prototype.hasOwnProperty;const Rr=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&Mr.call(e,"index")&&(r.index=e.index,r.input=e.input),r};const Lr=function(e,n){var r=n?oe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)};var Cr=/\w*$/;const Sr=function(e){var n=new e.constructor(e.source,Cr.exec(e));return n.lastIndex=e.lastIndex,n};var Fr=r(241),Br=Fr.A?Fr.A.prototype:void 0,Vr=Br?Br.valueOf:void 0;const Gr=function(e){return Vr?Object(Vr.call(e)):{}};const Ur=function(e,n,r){var t=e.constructor;switch(n){case"[object ArrayBuffer]":return oe(e);case"[object Boolean]":case"[object Date]":return new t(+e);case"[object DataView]":return Lr(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return ie(e,r);case"[object Map]":case"[object Set]":return new t;case"[object Number]":case"[object String]":return new t(e);case"[object RegExp]":return Sr(e);case"[object Symbol]":return Gr(e)}};const qr=function(e){return(0,Ae.A)(e)&&"[object Map]"==(0,Dn.A)(e)};var Dr=r(52789),Yr=r(64841),zr=Yr.A&&Yr.A.isMap;const $r=zr?(0,Dr.A)(zr):qr;const Jr=function(e){return(0,Ae.A)(e)&&"[object Set]"==(0,Dn.A)(e)};var Wr=Yr.A&&Yr.A.isSet;const Zr=Wr?(0,Dr.A)(Wr):Jr;var Hr="[object Arguments]",Kr="[object Function]",Qr="[object Object]",Xr={};Xr[Hr]=Xr["[object Array]"]=Xr["[object ArrayBuffer]"]=Xr["[object DataView]"]=Xr["[object Boolean]"]=Xr["[object Date]"]=Xr["[object Float32Array]"]=Xr["[object Float64Array]"]=Xr["[object Int8Array]"]=Xr["[object Int16Array]"]=Xr["[object Int32Array]"]=Xr["[object Map]"]=Xr["[object Number]"]=Xr[Qr]=Xr["[object RegExp]"]=Xr["[object Set]"]=Xr["[object String]"]=Xr["[object Symbol]"]=Xr["[object Uint8Array]"]=Xr["[object Uint8ClampedArray]"]=Xr["[object Uint16Array]"]=Xr["[object Uint32Array]"]=!0,Xr["[object Error]"]=Xr[Kr]=Xr["[object WeakMap]"]=!1;const et=function e(n,r,t,o,i,u){var a,c=1&r,f=2&r,d=4&r;if(t&&(a=i?t(n,o,i,u):t(n)),void 0!==a)return a;if(!(0,j.A)(n))return n;var s=(0,g.A)(n);if(s){if(a=Rr(n),!c)return ue(n,a)}else{var v=(0,Dn.A)(n),l=v==Kr||"[object GeneratorFunction]"==v;if((0,he.A)(n))return re(n,c);if(v==Qr||v==Hr||l&&!i){if(a=f||l?{}:se(n),!c)return f?_r(n,jr(a,n)):Or(n,mr(a,n))}else{if(!Xr[v])return i?n:{};a=Ur(n,v,c)}}u||(u=new $.A);var h=u.get(n);if(h)return h;u.set(n,a),Zr(n)?n.forEach(function(o){a.add(e(o,r,t,o,n,u))}):$r(n)&&n.forEach(function(o,i){a.set(i,e(o,r,t,i,n,u))});var p=d?f?Tr:Ir.A:f?Re:Sn.A,A=s?void 0:p(n);return(0,yr.A)(A||n,function(o,i){A&&(o=n[i=o]),Ne(a,i,e(o,r,t,i,n,u))}),a};const nt=function(e){return et(e,5)};function rt(e,n,r){var o=function(e){var n;for(;e.hasNode(n=u("_root")););return n}(e),i=new F.T({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(n){return e.node(n)});return t.A(e.nodes(),function(u){var a=e.node(u),c=e.parent(u);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(u),i.setParent(u,c||o),t.A(e[r](u),function(n){var r=n.v===u?n.w:n.v,t=i.edge(r,u),o=un.A(t)?0:t.weight;i.setEdge(r,u,{weight:e.edge(n).weight+o})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(u,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}const tt=function(e,n,r){for(var t=-1,o=e.length,i=n.length,u={};++t<o;){var a=t<i?n[t]:void 0;r(u,e[t],a)}return u};const ot=function(e,n){return tt(e||[],n||[],Ne)};const it=function(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e};const ut=function(e,n){if(e!==n){var r=void 0!==e,t=null===e,o=e==e,i=(0,_.A)(e),u=void 0!==n,a=null===n,c=n==n,f=(0,_.A)(n);if(!a&&!f&&!i&&e>n||i&&u&&c&&!a&&!f||t&&u&&c||!r&&c||!o)return 1;if(!t&&!i&&!f&&e<n||f&&r&&o&&!t&&!i||a&&r&&o||!u&&o||!c)return-1}return 0};const at=function(e,n,r){for(var t=-1,o=e.criteria,i=n.criteria,u=o.length,a=r.length;++t<u;){var c=ut(o[t],i[t]);if(c)return t>=a?c:c*("desc"==r[t]?-1:1)}return e.index-n.index};const ct=function(e,n,r){n=n.length?(0,d.A)(n,function(e){return(0,g.A)(e)?function(n){return(0,Ve.A)(n,1===e.length?e[0]:e)}:e}):[en.A];var t=-1;n=(0,d.A)(n,(0,Dr.A)(s.A));var o=h(e,function(e,r,o){return{criteria:(0,d.A)(n,function(n){return n(e)}),index:++t,value:e}});return it(o,function(e,n){return at(e,n,r)})};const ft=(0,Fe.A)(function(e,n){if(null==e)return[];var r=n.length;return r>1&&x(e,n[0],n[1])?n=[]:r>2&&x(n[0],n[1],n[2])&&(n=[n[0]]),ct(e,(0,c.A)(n,1),[])});function dt(e,n){for(var r=0,t=1;t<n.length;++t)r+=st(e,n[t-1],n[t]);return r}function st(e,n,r){for(var o=ot(r,p(r,function(e,n){return n})),i=f(p(n,function(n){return ft(p(e.outEdges(n),function(n){return{pos:o[n.w],weight:e.edge(n).weight}}),"pos")})),u=1;u<r.length;)u<<=1;var a=2*u-1;u-=1;var c=p(new Array(a),function(){return 0}),d=0;return t.A(i.forEach(function(e){var n=e.pos+u;c[n]+=e.weight;for(var r=0;n>0;)n%2&&(r+=c[n+1]),c[n=n-1>>1]+=e.weight;d+=e.weight*r})),d}function vt(e,n){var r={};return t.A(e,function(e,n){var t=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};un.A(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),t.A(n.edges(),function(e){var n=r[e.v],t=r[e.w];un.A(n)||un.A(t)||(t.indegree++,n.out.push(r[e.w]))}),function(e){var n=[];function r(e){return function(n){n.merged||(un.A(n.barycenter)||un.A(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight);n.weight&&(r+=n.barycenter*n.weight,t+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function o(n){return function(r){r.in.push(n),0===--r.indegree&&e.push(r)}}for(;e.length;){var i=e.pop();n.push(i),t.A(i.in.reverse(),r(i)),t.A(i.out,o(i))}return p(qn.A(n,function(e){return!e.merged}),function(e){return We(e,["vs","i","barycenter","weight"])})}(qn.A(r,function(e){return!e.indegree}))}function lt(e,n){var r,o=function(e,n){var r={lhs:[],rhs:[]};return t.A(e,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")}),i=o.lhs,u=ft(o.rhs,function(e){return-e.i}),a=[],c=0,d=0,s=0;i.sort((r=!!n,function(e,n){return e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:r?n.i-e.i:e.i-n.i})),s=ht(a,u,s),t.A(i,function(e){s+=e.vs.length,a.push(e.vs),c+=e.barycenter*e.weight,d+=e.weight,s=ht(a,u,s)});var v={vs:f(a)};return d&&(v.barycenter=c/d,v.weight=d),v}function ht(e,n,r){for(var t;n.length&&(t=rn(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function gt(e,n,r,o){var i=e.children(n),u=e.node(n),a=u?u.borderLeft:void 0,c=u?u.borderRight:void 0,d={};a&&(i=qn.A(i,function(e){return e!==a&&e!==c}));var s=function(e,n){return p(n,function(n){var r=e.inEdges(n);if(r.length){var t=Ar.A(r,function(n,r){var t=e.edge(r),o=e.node(r.v);return{sum:n.sum+t.weight*o.order,weight:n.weight+t.weight}},{sum:0,weight:0});return{v:n,barycenter:t.sum/t.weight,weight:t.weight}}return{v:n}})}(e,i);t.A(s,function(n){if(e.children(n.v).length){var t=gt(e,n.v,r,o);d[n.v]=t,Object.prototype.hasOwnProperty.call(t,"barycenter")&&(i=n,u=t,un.A(i.barycenter)?(i.barycenter=u.barycenter,i.weight=u.weight):(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight))}var i,u});var v=vt(s,r);!function(e,n){t.A(e,function(e){e.vs=f(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}(v,d);var l=lt(v,o);if(a&&(l.vs=f([a,l.vs,c]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),g=e.node(e.predecessors(c)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+g.order)/(l.weight+2),l.weight+=2}return l}function pt(e){var n=wn(e),r=At(e,S(1,n+1),"inEdges"),o=At(e,S(n-1,-1,-1),"outEdges"),i=function(e){var n={},r=qn.A(e.nodes(),function(n){return!e.children(n).length}),o=nn(p(r,function(n){return e.node(n).rank})),i=p(S(o+1),function(){return[]}),u=ft(r,function(n){return e.node(n).rank});return t.A(u,function r(o){if(!vn(n,o)){n[o]=!0;var u=e.node(o);i[u.rank].push(o),t.A(e.successors(o),r)}}),i}(e);wt(e,i);for(var u,a=Number.POSITIVE_INFINITY,c=0,f=0;f<4;++c,++f){bt(c%2?r:o,c%4>=2);var d=dt(e,i=An(e));d<a&&(f=0,u=nt(i),a=d)}wt(e,u)}function At(e,n,r){return p(n,function(n){return rt(e,n,r)})}function bt(e,n){var r=new F.T;t.A(e,function(e){var o=e.graph().root,i=gt(e,o,r,n);t.A(i.vs,function(n,r){e.node(n).order=r}),function(e,n,r){var o,i={};t.A(r,function(r){for(var t,u,a=e.parent(r);a;){if((t=e.parent(a))?(u=i[t],i[t]=a):(u=o,o=a),u&&u!==a)return void n.setEdge(u,a);a=t}})}(e,r,i.vs)})}function wt(e,n){t.A(n,function(n){t.A(n,function(n,r){e.node(n).order=r})})}function yt(e){var n=function(e){var n={},r=0;function o(i){var u=r;t.A(e.children(i),o),n[i]={low:u,lim:r++}}return t.A(e.children(),o),n}(e);t.A(e.graph().dummyChains,function(r){for(var t=e.node(r),o=t.edgeObj,i=function(e,n,r,t){var o,i,u=[],a=[],c=Math.min(n[r].low,n[t].low),f=Math.max(n[r].lim,n[t].lim);o=r;do{o=e.parent(o),u.push(o)}while(o&&(n[o].low>c||f>n[o].lim));i=o,o=t;for(;(o=e.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(e,n,o.v,o.w),u=i.path,a=i.lca,c=0,f=u[c],d=!0;r!==o.w;){if(t=e.node(r),d){for(;(f=u[c])!==a&&e.node(f).maxRank<t.rank;)c++;f===a&&(d=!1)}if(!d){for(;c<u.length-1&&e.node(f=u[c+1]).minRank<=t.rank;)c++;f=u[c]}e.setParent(r,f),r=e.successors(r)[0]}})}var mt=r(99922);const jt=function(e,n){return e&&(0,tn.A)(e,(0,mt.A)(n))};const xt=function(e,n){return null==e?e:(0,H.A)(e,(0,mt.A)(n),Re)};function Ot(e,n){var r={};return Ar.A(n,function(n,o){var i=0,u=0,a=n.length,c=rn(o);return t.A(o,function(n,f){var d=function(e,n){if(e.node(n).dummy)return Un(e.predecessors(n),function(n){return e.node(n).dummy})}(e,n),s=d?e.node(d).order:a;(d||n===c)&&(t.A(o.slice(u,f+1),function(n){t.A(e.predecessors(n),function(t){var o=e.node(t),u=o.order;!(u<i||s<u)||o.dummy&&e.node(n).dummy||kt(r,t,n)})}),u=f+1,i=s)}),o}),r}function kt(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=e[n];Object.defineProperty(o,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Et(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Nt(e,n,r,o,i){var u={},a=function(e,n,r,o){var i=new F.T,u=e.graph(),a=function(e,n,r){return function(t,o,i){var u,a=t.node(o),c=t.node(i),f=0;if(f+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2}if(u&&(f+=r?u:-u),u=0,f+=(a.dummy?n:e)/2,f+=(c.dummy?n:e)/2,f+=c.width/2,Object.prototype.hasOwnProperty.call(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":u=c.width/2;break;case"r":u=-c.width/2}return u&&(f+=r?u:-u),u=0,f}}(u.nodesep,u.edgesep,o);return t.A(n,function(n){var o;t.A(n,function(n){var t=r[n];if(i.setNode(t),o){var u=r[o],c=i.edge(u,t);i.setEdge(u,t,Math.max(a(e,n,o),c||0))}o=n})}),i}(e,n,r,i),c=i?"borderLeft":"borderRight";function f(e,n){for(var r=a.nodes(),t=r.pop(),o={};t;)o[t]?e(t):(o[t]=!0,r.push(t),r=r.concat(n(t))),t=r.pop()}return f(function(e){u[e]=a.inEdges(e).reduce(function(e,n){return Math.max(e,u[n.v]+a.edge(n))},0)},a.predecessors.bind(a)),f(function(n){var r=a.outEdges(n).reduce(function(e,n){return Math.min(e,u[n.w]-a.edge(n))},Number.POSITIVE_INFINITY),t=e.node(n);r!==Number.POSITIVE_INFINITY&&t.borderType!==c&&(u[n]=Math.max(u[n],r))},a.successors.bind(a)),t.A(o,function(e){u[e]=u[r[e]]}),u}function _t(e){var n,r=An(e),o=Be(Ot(e,r),function(e,n){var r={};function o(n,o,i,u,a){var c;t.A(S(o,i),function(o){c=n[o],e.node(c).dummy&&t.A(e.predecessors(c),function(n){var t=e.node(n);t.dummy&&(t.order<u||t.order>a)&&kt(r,n,c)})})}return Ar.A(n,function(n,r){var i,u=-1,a=0;return t.A(r,function(t,c){if("border"===e.node(t).dummy){var f=e.predecessors(t);f.length&&(i=e.node(f[0]).order,o(r,a,c,u,i),a=c,u=i)}o(r,a,r.length,i,n.length)}),r}),r}(e,r)),i={};t.A(["u","d"],function(u){n="u"===u?r:pr.A(r).reverse(),t.A(["l","r"],function(r){"r"===r&&(n=p(n,function(e){return pr.A(e).reverse()}));var a=("u"===u?e.predecessors:e.successors).bind(e),c=function(e,n,r,o){var i={},u={},a={};return t.A(n,function(e){t.A(e,function(e,n){i[e]=e,u[e]=e,a[e]=n})}),t.A(n,function(e){var n=-1;t.A(e,function(e){var t=o(e);if(t.length){t=ft(t,function(e){return a[e]});for(var c=(t.length-1)/2,f=Math.floor(c),d=Math.ceil(c);f<=d;++f){var s=t[f];u[e]===e&&n<a[s]&&!Et(r,e,s)&&(u[s]=e,u[e]=i[e]=i[s],n=a[s])}}})}),{root:i,align:u}}(0,n,o,a),f=Nt(e,n,c.root,c.align,"r"===r);"r"===r&&(f=on(f,function(e){return-e})),i[u+r]=f})});var u=function(e,n){return In(pr.A(n),function(n){var r=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY;return xt(n,function(n,o){var i=function(e,n){return e.node(n).width}(e,o)/2;r=Math.max(n+i,r),t=Math.min(n-i,t)}),r-t})}(e,i);return function(e,n){var r=pr.A(n),o=cn(r),i=nn(r);t.A(["u","d"],function(r){t.A(["l","r"],function(t){var u,a=r+t,c=e[a];if(c!==n){var f=pr.A(c);(u="l"===t?o-cn(f):i-nn(f))&&(e[a]=on(c,function(e){return e+u}))}})})}(i,u),function(e,n){return on(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var o=ft(p(e,t));return(o[1]+o[2])/2})}(i,e.graph().align)}function It(e){(function(e){var n=An(e),r=e.graph().ranksep,o=0;t.A(n,function(n){var i=nn(p(n,function(n){return e.node(n).height}));t.A(n,function(n){e.node(n).y=o+i/2}),o+=i+r})})(e=gn(e)),jt(_t(e),function(n,r){e.node(r).x=n})}function Pt(e,n){var r=n&&n.debugTiming?yn:mn;r("layout",()=>{var n=r(" buildLayoutGraph",()=>function(e){var n=new F.T({multigraph:!0,compound:!0}),r=Gt(e.graph());return n.setGraph(Be({},Mt,Vt(r,Tt),We(r,Rt))),t.A(e.nodes(),function(r){var t=Gt(e.node(r));n.setNode(r,Ke(Vt(t,Lt),Ct)),n.setParent(r,e.parent(r))}),t.A(e.edges(),function(r){var t=Gt(e.edge(r));n.setEdge(r,Be({},Ft,Vt(t,St),We(t,Bt)))}),n}(e));r(" runLayout",()=>function(e,n){n(" makeSpaceForEdgeLabels",()=>function(e){var n=e.graph();n.ranksep/=2,t.A(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}(e)),n(" removeSelfEdges",()=>function(e){t.A(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}(e)),n(" acyclic",()=>z(e)),n(" nestingGraph.run",()=>br(e)),n(" rank",()=>lr(gn(e))),n(" injectEdgeLabelProxies",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),o={rank:(e.node(n.w).rank-t.rank)/2+t.rank,e:n};hn(e,"edge-proxy",o,"_ep")}})}(e)),n(" removeEmptyRanks",()=>function(e){var n=cn(p(e.nodes(),function(n){return e.node(n).rank})),r=[];t.A(e.nodes(),function(t){var o=e.node(t).rank-n;r[o]||(r[o]=[]),r[o].push(t)});var o=0,i=e.graph().nodeRankFactor;t.A(r,function(n,r){un.A(n)&&r%i!==0?--o:o&&t.A(n,function(n){e.node(n).rank+=o})})}(e)),n(" nestingGraph.cleanup",()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,t.A(e.edges(),function(n){e.edge(n).nestingEdge&&e.removeEdge(n)})}(e)),n(" normalizeRanks",()=>function(e){var n=cn(p(e.nodes(),function(n){return e.node(n).rank}));t.A(e.nodes(),function(r){var t=e.node(r);vn(t,"rank")&&(t.rank-=n)})}(e)),n(" assignRankMinMax",()=>function(e){var n=0;t.A(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=nn(n,t.maxRank))}),e.graph().maxRank=n}(e)),n(" removeEdgeLabelProxies",()=>function(e){t.A(e.nodes(),function(n){var r=e.node(n);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}(e)),n(" normalize.run",()=>_n(e)),n(" parentDummyChains",()=>yt(e)),n(" addBorderSegments",()=>function(e){t.A(e.children(),function n(r){var o=e.children(r),i=e.node(r);if(o.length&&t.A(o,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var u=i.minRank,a=i.maxRank+1;u<a;++u)jn(e,"borderLeft","_bl",r,i,u),jn(e,"borderRight","_br",r,i,u)}})}(e)),n(" order",()=>pt(e)),n(" insertSelfEdges",()=>function(e){var n=An(e);t.A(n,function(n){var r=0;t.A(n,function(n,o){var i=e.node(n);i.order=o+r,t.A(i.selfEdges,function(n){hn(e,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:o+ ++r,e:n.e,label:n.label},"_se")}),delete i.selfEdges})})}(e)),n(" adjustCoordinateSystem",()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||On(e)}(e)),n(" position",()=>It(e)),n(" positionSelfEdges",()=>function(e){t.A(e.nodes(),function(n){var r=e.node(n);if("selfedge"===r.dummy){var t=e.node(r.e.v),o=t.x+t.width/2,i=t.y,u=r.x-o,a=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:o+2*u/3,y:i-a},{x:o+5*u/6,y:i-a},{x:o+u,y:i},{x:o+5*u/6,y:i+a},{x:o+2*u/3,y:i+a}],r.label.x=r.x,r.label.y=r.y}})}(e)),n(" removeBorderNodes",()=>function(e){t.A(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),o=e.node(r.borderBottom),i=e.node(rn(r.borderLeft)),u=e.node(rn(r.borderRight));r.width=Math.abs(u.x-i.x),r.height=Math.abs(o.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),t.A(e.nodes(),function(n){"border"===e.node(n).dummy&&e.removeNode(n)})}(e)),n(" normalize.undo",()=>function(e){t.A(e.graph().dummyChains,function(n){var r,t=e.node(n),o=t.edgeLabel;for(e.setEdge(t.edgeObj,o);t.dummy;)r=e.successors(n)[0],e.removeNode(n),o.points.push({x:t.x,y:t.y}),"edge-label"===t.dummy&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),n=r,t=e.node(n)})}(e)),n(" fixupEdgeLabelCoords",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}(e)),n(" undoCoordinateSystem",()=>xn(e)),n(" translateGraph",()=>function(e){var n=Number.POSITIVE_INFINITY,r=0,o=Number.POSITIVE_INFINITY,i=0,u=e.graph(),a=u.marginx||0,c=u.marginy||0;function f(e){var t=e.x,u=e.y,a=e.width,c=e.height;n=Math.min(n,t-a/2),r=Math.max(r,t+a/2),o=Math.min(o,u-c/2),i=Math.max(i,u+c/2)}t.A(e.nodes(),function(n){f(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);Object.prototype.hasOwnProperty.call(r,"x")&&f(r)}),n-=a,o-=c,t.A(e.nodes(),function(r){var t=e.node(r);t.x-=n,t.y-=o}),t.A(e.edges(),function(r){var i=e.edge(r);t.A(i.points,function(e){e.x-=n,e.y-=o}),Object.prototype.hasOwnProperty.call(i,"x")&&(i.x-=n),Object.prototype.hasOwnProperty.call(i,"y")&&(i.y-=o)}),u.width=r-n+a,u.height=i-o+c}(e)),n(" assignNodeIntersects",()=>function(e){t.A(e.edges(),function(n){var r,t,o=e.edge(n),i=e.node(n.v),u=e.node(n.w);o.points?(r=o.points[0],t=o.points[o.points.length-1]):(o.points=[],r=u,t=i),o.points.unshift(pn(i,r)),o.points.push(pn(u,t))})}(e)),n(" reversePoints",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}(e)),n(" acyclic.undo",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}(e))}(n,r)),r(" updateInputGraph",()=>function(e,n){t.A(e.nodes(),function(r){var t=e.node(r),o=n.node(r);t&&(t.x=o.x,t.y=o.y,n.children(r).length&&(t.width=o.width,t.height=o.height))}),t.A(e.edges(),function(r){var t=e.edge(r),o=n.edge(r);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,n))})}var Tt=["nodesep","edgesep","ranksep","marginx","marginy"],Mt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Rt=["acyclicer","ranker","rankdir","align"],Lt=["width","height"],Ct={width:0,height:0},St=["minlen","weight","width","height","labeloffset"],Ft={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Bt=["labelpos"];function Vt(e,n){return on(We(e,n),Number)}function Gt(e){var n={};return t.A(e,function(e,r){n[r.toLowerCase()]=e}),n}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[2479,7943],{87943(e,t,n){n.r(t),n.d(t,{default:()=>p});var r=n(96540),a=n(34843),s=n(82893),o=n(14284),c=n(62042),i=n(53459),l=n(34289),d=n(22022),u=n(12479),m=n(74848);function p(){const[e,t]=(0,a.fp)(s.AG.mind_editor),[n,p]=(0,r.useState)(!1),{t:f}=(0,d.Bd)(),h=(0,r.useRef)(null),y=void 0!==e.code_source,v=()=>{n&&!window.confirm(f("有未保存的修改,确定要关闭吗?"))||(t({}),e?.close?.())};return(0,r.useEffect)(()=>{if(void 0===e.url&&void 0===e.code_source)return;const t=e=>{"Escape"===e.key&&(e.stopPropagation(),v())};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e.url,e.code_source,n]),void 0!==e.url||y?(0,m.jsx)("div",{id:"mind-container",className:y?"mind-container--over":void 0,children:(0,m.jsx)("div",{className:"mind-context",children:(0,m.jsx)(u.default,{fullscreen:!0,reset_key:e.url??e.name,url:y?void 0:e.url,data:y?e.code_source:void 0,on_dirty:p,register:e=>{h.current=e},header:(0,m.jsxs)("div",{className:"mind-topbar",children:[(0,m.jsx)("span",{className:"material-icons mind-topbar__icon",children:"account_tree"}),(0,m.jsx)("span",{className:"mind-topbar__name",children:e.name}),(0,m.jsx)("span",{style:{flex:1}}),(0,m.jsx)("button",{type:"button",className:"mind-btn",title:f("保存")+" (Ctrl+S)",onClick:async()=>{await(h.current?.save())},children:(0,m.jsx)("span",{className:"material-icons",children:"save"})}),(0,m.jsx)("button",{type:"button",className:"mind-btn",title:f("关闭"),onClick:v,children:(0,m.jsx)("span",{className:"material-icons",children:"close"})})]}),on_save:async n=>{if(y)return e.on_save_code?.(n),(0,c.SK)(f("保存成功")),t({}),!0;return(await o.$M.post(`save/${encodeURIComponent((0,l.GG)("file",(0,l.vX)()))}${e.name}`,{context:n})).code===i.m.Success&&((0,c.SK)(f("保存成功")),!0)}})})}):null}},12479(e,t,n){n.r(t),n.d(t,{default:()=>d});var r=n(96540),a=n(57889),s=(n(14284),n(62042)),o=n(22022),c=n(21417),i=(n(88781),n(86063)),l=n(74848);function d(e){const{t}=(0,o.Bd)(),[n,d]=(0,r.useState)(!0),[m,p]=(0,r.useState)(""),[f,h]=(0,r.useState)(100),y=(0,r.useRef)(null),v=(0,r.useRef)(null),x=(0,r.useRef)(!1),w=(0,r.useRef)({props:e});w.current={props:e};const b=async()=>{if(!v.current)return(0,s.zN)(t("编辑器尚未就绪")),!1;const e=await w.current.props.on_save((()=>{const e=v.current;return e?JSON.stringify(e.getData(!0)):""})());return e&&(x.current=!1,w.current.props.on_dirty?.(!1),w.current.props.on_saved?.()),e};(0,r.useEffect)(()=>{e.register?.({save:b,is_dirty:()=>x.current})},[e.register]),(0,r.useEffect)(()=>{if(!y.current)return;if(!e.url&&void 0===e.data)return;let n=!1;const r=[];v.current?.destroy?.(),v.current=null,x.current=!1,d(!0),p("");const o=async e=>{if(n||!y.current)return;const a=new c.default({el:y.current,data:e??{data:{text:t("中心主题")}},fit:!0,...i.k$});v.current=a,d(!1);const s=()=>{let e=!1;const t=window.setTimeout(()=>{n||(e=!0)},400);r.push(t),a.on("data_change",()=>{e&&(x.current||(x.current=!0,w.current.props.on_dirty?.(!0)),h(u(a)))}),a.on("view_data_change",()=>{h(u(a))}),a.on("error",(e,t)=>{console.error("[mind]",e,t)}),h(u(a))};window.requestAnimationFrame(()=>{n||s()})};return(async()=>{try{let t=null;if(void 0!==e.data)t=e.data;else{const r=await a.l.get(e.url);if(n)return;t=r}let r=null;if("string"==typeof t&&t.trim())try{r=JSON.parse(t)}catch{r=null}else t&&"object"==typeof t&&(r=t);r=(0,i.tW)(r),await o(r)}catch(e){n||(d(!1),p(t("加载思维导图失败")),(0,s.zN)(t("加载思维导图失败")))}})(),()=>{n=!0,r.forEach(e=>window.clearTimeout(e)),v.current?.destroy?.(),v.current=null}},[e.url,e.data]),(0,r.useEffect)(()=>{const e=e=>{(e.ctrlKey||e.metaKey)&&("s"===e.key||"S"===e.key||83===e.keyCode)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),b())};return window.addEventListener("keydown",e,!0),document.addEventListener("keydown",e,!0),()=>{window.removeEventListener("keydown",e,!0),document.removeEventListener("keydown",e,!0)}},[]);const N=e=>{const t=v.current;if(!t)return;const n=Math.min(4,Math.max(.25,e));t.view.setScale(n),h(Math.round(100*n))};return(0,l.jsxs)("div",{className:"mind-wrap"+(e.fullscreen?" mind-wrap--full":""),children:[e.header,(0,l.jsxs)("div",{className:"mind-toolbar",children:[(0,l.jsx)("button",{type:"button",className:"mind-btn",title:t("添加子节点")+" (Tab)",onClick:()=>v.current?.execCommand?.("INSERT_CHILD_NODE"),children:(0,l.jsx)("span",{className:"material-icons",children:"account_tree"})}),(0,l.jsx)("button",{type:"button",className:"mind-btn",title:t("添加同级节点")+" (Enter)",onClick:()=>v.current?.execCommand?.("INSERT_NODE"),children:(0,l.jsx)("span",{className:"material-icons",children:"subdirectory_arrow_right"})}),(0,l.jsx)("button",{type:"button",className:"mind-btn",title:t("删除节点")+" (Delete)",onClick:()=>v.current?.execCommand?.("REMOVE_NODE"),children:(0,l.jsx)("span",{className:"material-icons",children:"delete"})}),(0,l.jsx)("span",{className:"mind-toolbar__gap"}),(0,l.jsxs)("span",{className:"mind-toolbar__zoom",children:[f,"%"]}),(0,l.jsx)("button",{type:"button",className:"mind-btn",title:t("缩小"),onClick:()=>N(u(v.current)/100-.2),children:(0,l.jsx)("span",{className:"material-icons",children:"remove"})}),(0,l.jsx)("button",{type:"button",className:"mind-btn",title:t("放大"),onClick:()=>N(u(v.current)/100+.2),children:(0,l.jsx)("span",{className:"material-icons",children:"add"})}),(0,l.jsx)("button",{type:"button",className:"mind-btn",title:t("适应窗口"),onClick:()=>v.current?.view?.fit?.(),children:(0,l.jsx)("span",{className:"material-icons",children:"fit_screen"})})]}),(0,l.jsxs)("div",{className:"mind-canvas",children:[(0,l.jsx)("div",{className:"mind-mount",ref:y}),n&&(0,l.jsx)("div",{className:"mind-mask",children:"Loading..."}),m&&(0,l.jsx)("div",{className:"mind-mask",children:m})]})]})}function u(e){const t=e?.view?.getTransformData?.()?.state?.scale;return"number"==typeof t&&t>0?Math.round(100*t):100}},86063(e,t,n){function r(e){return"smm-mind"===e}n.d(t,{Hn:()=>d,hj:()=>r,tW:()=>o});const a={mousewheelMoveStep:35,scaleRatio:.08};let s=null;function o(e){return e&&"object"==typeof e?e.data?.nodeData?c(e.data.nodeData):e.root&&"object"==typeof e.root?e.root.data?e.root:i(e.root):e.data&&"object"==typeof e.data?e:i(e):null}function c(e){return{data:{text:"string"==typeof e?.topic?e.topic:"string"==typeof e?.data?.text?e.data.text:""},children:Array.isArray(e?.children)?e.children.map(c):[]}}function i(e){return{data:{text:"string"==typeof e?.text?e.text:"",...e?.note?{note:e.note}:{}},children:Array.isArray(e?.children)?e.children.map(i):[]}}function l(e){e.stopPropagation()}async function d(e){const t=function(e){const t=e.trim();if(!t)return null;let n=null;try{n=JSON.parse(t)}catch{return null}return o(n)}(e),r=await(s||(s=Promise.all([n.e(1417).then(n.bind(n,21417)),n.e(8781).then(n.bind(n,88781))]).then(([e])=>e.default)),s);return{data:t,async mount(e,n){let s=!1;const o=await function(e,t){return new Promise(n=>{const r=()=>{t()?n(!1):e.isConnected&&e.clientWidth&&e.clientHeight?n(!0):window.setTimeout(r,16)};r()})}(e,()=>s);if(!o)return{destroy:()=>{},get_data:()=>null};const c=document.createElement("div");c.className="md-graph__mind-host",!1!==n?.release_wheel&&e.addEventListener("wheel",l,{capture:!0,passive:!0}),e.append(c);const i=new r({el:c,data:t??{data:{text:""}},readonly:!n?.editable,fit:!0,...a});return{destroy:()=>{s=!0,e.removeEventListener("wheel",l,{capture:!0}),i?.destroy?.()},get_data:()=>i?.getData?.(!1)}}}}n.d(t,["k$",0,a])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[6010,8302],{83277(e,t,n){n.d(t,{$j:()=>a,Lv:()=>s});class s{token;open=!1;note;index;url;model;request_type;json_params;sys_prompt;dotenv="";tool_mode=!1;show_options;static get_label_by_v(e,t){if(!e||!t?.length)return e;for(const n of t)if(n.value===e)return n.label;return e}static have_label_by_v(e,t){if(!e||!t?.length)return!1;for(const n of t)if(n.value===e)return!0;return!1}}const o=JSON.stringify({stream:!0,thinking:{type:"disabled"}});function a(e){return"string"==typeof e?e:Array.isArray(e)?e.map(e=>"text"===e.type?e.text:"[图片]").join("\n"):""}n.d(t,["CP",0,'\n\n\n\n# 聊天循环最大次数\ntool_call_max=500\n# 是否允许AI直接执行命令而不需要用户确认,默认为false,需要用户手动确认,如果使用 workflow 这里等价于为 true\nallow_exec_cmd_directly=false\n\n# 可选的代理 url,如果指定了所有访问大模型的请求将会走代理\n#proxy_url=\n\n# 可选的多个url 以数组分割\n# options_agent_url_list=[{"value":"http://..","label":"openai"}]\n\n# 可选的多个 key\n# options_agent_key_list=[{"value":"sh-aaa","label":"option1"}]\n\n# 可选的多个 model\n# options_agent_model_list=[{"value":"gpt-5.5","label":"gpt"}]\n\n# 存放本地的 prompt 文件 用于每次聊天的时候自动读取并加载\n# options_local_file_path_prompt_list=["/prompt/a.txt"]\n\n# 开启切换模型 ,开启以后,你可以自己写 prompt 提供多个模型让 ai 自己根据每次聊天切换下一步调用其他模型的次数\n# open_pick_model=false\n\n# 压缩后仍然完整保留的最近消息数\nmax_recent_messages=12\n# 当单个会话累计消息条数超过该值时,触发历史消息裁剪\ncompress_message_count=16\n# 历史消息中 tool 输出的最大字符数,只保留调用形式让 AI 知道调用了就行\nmax_tool_content_chars=200\n\n# ===== 模型类型(request_type)=====\n# 必填项,不同类型的 model 接口格式不同,默认 completions。\n# 可选值:\n# completions 标准对话/聊天补全 (chat/completions)\n# images 图片生成 (images/generations)\n# audio_speech 文本转语音 (audio/speech)\n# audio_transcription 语音转文字 (audio/transcriptions)\n# audio_translation 语音翻译 (audio/translations)\n# embeddings 向量嵌入 (embeddings)\n#request_type=completions\n\n# ===== 成为 tool(tool_mode)=====\n# 开启后该模型会作为一个工具被加载,可实现不同模型担任不同角色/能力,供 AI agent 在对话中动态调用。\n# 注意:不能与「是否开启」(open) 同时为 true。\n#tool_mode=false\n\n# ===== 是否支持图片(support_image)=====\n# 开启后:1) 注册 read_image 工具,让 AI 能读取本地图片;\n# 2) 工具读到的图片会以 OpenAI 多模态格式 image_url 随消息发给模型,模型就能真正"看图"。\n# 关闭后:AI 看不到图片,read_image 只会返回一句文字说明。\n# 主流模型(gpt-4o、豆包、qwen-vl、deepseek-vl 等)都支持,默认开启。\nsupport_image=true\n',"cL",0,o])},77481(e,t,n){n.d(t,{S:()=>i,X:()=>r});var s=n(96540),o=n(61443),a=n(74848);function r(e){const[t,n]=s.useState([]),r=(0,s.useRef)(-1),[i,l]=(0,s.useState)(-1),[c,d]=(0,s.useState)(-1);(0,s.useEffect)(()=>{e.children?n(Array.isArray(e.children)?e.children:[e.children]):n(e.rows)},[e.rows,e.children]);const p=()=>{r.current=-1,l(-1),d(-1)};return(0,a.jsxs)("table",{children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{children:e.headers?.map((t,n)=>{const s=!!e.filter&&(e.filter.column??0)===n;let r=t;if(s){const n=e.filter,s=n.options.find(e=>e.value===n.value);null!=n.value&&s&&(r=`${t} (${s.label})`)}return(0,a.jsx)("th",{className:s?"table-filter-col":"",children:s?(0,a.jsx)(o.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:r}):t},n)})})}),(0,a.jsx)("tbody",{children:t.map((t,n)=>{const s=!!e.onRowDrag;return(0,a.jsx)("tr",{className:s?(i===n?"row-dragging":"")+(c===n?" row-drop-target":""):"",draggable:s,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{s&&(r.current=n,l(n),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!s||r.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(n))},onDrop:t=>{s&&(t.preventDefault(),(()=>{const t=r.current,n=c;p(),t<0||n<0||t===n||e.onRowDrag?.(t,n)})())},onDragEnd:p,children:t.map((n,s)=>{const o=s===t.length-1?"small":"";return(0,a.jsx)("td",{className:o,style:{width:e.width??"auto"},children:n},s)})},n)})})]})}function i(e){return(0,a.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,a.jsx)("div",{children:e},t))})}},29591(e,t,n){n.r(t),n.d(t,{default:()=>$});var s=n(22022),o=n(96540),a=n(85997),r=n(4412),i=n(34843),l=n(82893),c=n(75725),d=n(77481),p=n(61443),m=n(70447),u=n(34299),h=n(74848);var _=n(14284),x=n(53459),g=n(62042),v=n(7523),f=n(78247),j=n(23430),y=n(61973),w=n(14944),C=n(92275),b=n(88815),A=n(64694),k=n(45907),S=n(12721),I=n(24659),N=n(83277);function $(){const{t:e}=(0,s.Bd)(),{initUserInfo:t}=(0,o.useContext)(v.F),n=[e("编号"),e("url"),e("是否开启"),e("key"),"model",e("更多属性"),e("备注")],$=[e("编号"),e("本地目录"),e("自动加载"),e("备注")],[K,O]=(0,o.useState)([]),[L,M]=(0,o.useState)([]),[P,X]=(0,o.useState)([]),[D,T]=(0,o.useState)(null),H=(0,o.useRef)(),R=(0,o.useRef)(!1),q=(0,o.useRef)(!1),[F,V]=(0,o.useState)([]),[E,Y]=(0,o.useState)(!1),[B,G]=(0,o.useState)({}),[J,W]=(0,i.fp)(l.AG.prompt_card),[z,U]=(0,i.fp)(l.AG.user_base_info),[Z,Q]=(0,o.useState)(!1),ee=P.filter(e=>"http"!==(e.transport??"stdio")),te=P.filter(e=>"http"===e.transport),ne=[e("编号"),e("名称"),e("是否开启"),e("状态"),"command","args","cwd",e("tools|env"),e("备注")],se=[e("编号"),e("名称"),e("是否开启"),e("状态"),e("endpoint"),e("tools|headers"),e("备注")],oe=[e("编号"),e("提示词"),e("LLM编辑开关"),e("llm_pmt"),e("编辑规则"),e("备注")],[ae,re]=(0,o.useState)([]),[ie,le]=(0,o.useState)(!1),ce=function(){const[e,t]=(0,i.fp)(l.AG.prompt_card);return e=>{t({open:!0,title:"信息",context_div:(0,h.jsx)("div",{children:(0,h.jsx)(u.default,{context:e})})})}}(),{check_user_auth:de}=(0,f.MH)(),[pe,me]=(0,i.fp)(l.AG.editorSetting),ue=(0,y.Zp)(),he=(0,k.y)(),_e=(0,I.K)(),xe=async()=>{const e=await _.jV.get("docs_on_get");e.code===x.m.Success&&Q(e.data)};(0,o.useEffect)(()=>{(async()=>{const e=await _.XO.get("ai_agent_setting");e.code===x.m.Success&&O(e.data.models),await w.ws.addMsg(C.HK.ai_load_info,e=>{T(e.context)});const t=await w.ws.sendData(C.HK.ai_load_info,{});t?.context&&T(t.context);const n=await _.XO.get("ai_docs_setting");n.code===x.m.Success&&(H.current=n.data.param,n.data.list?.length&&M(n.data.list));const s=await _.XO.get("ai_mcp_setting");s.code===x.m.Success&&X(s.data.list??[]),await we(),xe();const o=await _.XO.get("ai_system_prompts");o.code===x.m.Success&&re(o.data??[]);const a=await _.XO.get("ai_long_term_memory_setting");a.code===x.m.Success&&le(a.data?.open??!1)})()},[]),(0,o.useEffect)(()=>{w.ws.addMsg(C.HK.mcp_status,e=>{const t=e.context??{},n={};for(const e of t.status??[])n[e.index]={state:e.state,error:e.error,tool_count:e.tool_count};G(n),t.done&&we()})},[]);const ge=(e="stdio")=>{const t="http"===e?{name:"",open:!1,note:"",transport:"http",endpoint:"",headers:"",stream:!1,timeout_ms:1e4}:{name:"",open:!1,command:"",args:"",cwd:"",env:"",note:"",transport:"stdio",timeout_ms:1e4};X([...P,t]),R.current=!0},ve=e=>{const t=P.indexOf(e);t<0||(P.splice(t,1),X([...P]),R.current=!0)},fe=e=>{X([...P,{...e,open:!1}]),R.current=!0},je=async e=>{for(let e=0;e<K.length;e++)K[e].index=e;(await _.XO.post("ai_agent_setting/save",{models:e??K})).code===x.m.Success&&(0,g.SK)("保存成功")},ye=async e=>{for(let e=0;e<P.length;e++)P[e].index=e;(await _.XO.post("ai_mcp_setting/save",{list:e??P})).code===x.m.Success&&((0,g.SK)("保存成功"),R.current=!1,w.ws.sendData(C.HK.mcp_reload,{}))},we=async()=>{const e=await _.XO.get("ai_mcp_tools");return e.code===x.m.Success?(V(e.data??[]),e.data??[]):[]},Ce=async e=>{Y(!0);try{const t=await _.XO.post("ai_mcp_tools/reload",{index:e});if(t.code===x.m.Success)return await we(),(0,g.SK)("MCP工具加载成功"),t.data??null}finally{Y(!1)}return null},be=async(t,n,s,o)=>{const a=o??F.find(e=>e.index===n)??{index:n,key:`${n}`,name:t.name??"",note:t.note,transport:t.transport??"stdio",open:!!t.open,loaded:!1,tool_count:0,tools:[]},r=(a.tools??[]).map(t=>({id:t.runtime_name,title:t.tool_name,subtitle:t.description||e("无描述"),detail:t.display_name,meta:t.runtime_name}));W({open:!0,title:`${t.name||t.note||n} MCP工具`,context_div:(0,h.jsx)(S.O,{title:`${t.name||t.note||n} MCP工具`,subtitle:`${a.transport??"stdio"} | ${a.open?e("是"):e("否")} | ${a.loaded?"loaded":"idle"} | ${a.tool_count} tools`,pages:r,initialPageId:s,onRefresh:async()=>{const e=await Ce(n);e&&await be(t,n,s,e)},renderPage:t=>{if(!t)return(0,h.jsx)("div",{className:"prompt-switch-page__empty",children:e("暂无工具")});const n=a.tools?.find(e=>e.runtime_name===t.id);return n?(0,h.jsxs)("div",{className:"prompt-switch-page__detail",children:[(0,h.jsx)("div",{className:"prompt-switch-page__detail-title",children:n.display_name}),(0,h.jsx)("div",{className:"prompt-switch-page__detail-desc",children:n.description||e("无描述")}),(0,h.jsxs)("div",{className:"prompt-switch-page__detail-row",children:[(0,h.jsx)("strong",{children:"runtime:"})," ",n.runtime_name]}),(0,h.jsxs)("div",{children:[(0,h.jsx)("strong",{children:"schema:"}),(0,h.jsx)("pre",{className:"prompt-switch-page__schema",children:JSON.stringify(n.input_schema??{},null,2)})]})]}):(0,h.jsx)("div",{className:"prompt-switch-page__empty",children:e("暂无工具")})}}),cancel:()=>W({open:!1})})},Ae=t=>{const n=B[t];let s=n?.state,o=n?.error,a=n?.tool_count;if(!s){const e=F.find(e=>e.index===t);s=e?.state,o=e?.error,a=e?.tool_count}switch(s){case"loading":return(0,h.jsx)(m.fq,{loading:!0,text:e("加载中")});case"success":return(0,h.jsx)(m.fq,{success:!0,text:`${a??0} ${e("个工具")}`});case"failed":return(0,h.jsx)("span",{title:o??e("加载失败"),children:(0,h.jsx)(m.fq,{success:!1,text:e("加载失败")})});default:return(0,h.jsx)(m.fq,{text:e("未加载")})}},ke=async e=>{for(let e=0;e<K.length;e++)K[e].index=e;let t={list:L,docs_update_tag:q.current};null!=e&&(t={param:e}),q.current=!1;(await _.XO.post("ai_docs_setting_save",t)).code===x.m.Success&&(0,g.SK)("保存成功")},Se=async()=>{for(let e=0;e<ae.length;e++)ae[e].index=e;(await _.XO.post("ai_system_prompts/save",{list:ae})).code===x.m.Success&&(0,g.SK)("保存成功")};return(0,h.jsxs)("div",{children:[(0,h.jsx)(r.aZ,{position:"right",children:de(j.oV.ai_agent_setting)&&(0,h.jsx)(a.rA,{icon:"arrow_back",title:e("上一页"),onClick:()=>{ue(-1)}})}),(0,h.jsx)(c.jW,{isFull:!0,more:!0,children:(0,h.jsx)(c.NN,{children:(0,h.jsxs)(c.xh,{children:[(0,h.jsx)(c.fI,{children:(0,h.jsx)(c.VP,{widthPer:100,children:(0,h.jsx)(m.uF,{self_title:(0,h.jsxs)("span",{className:" div-row ",children:[(0,h.jsx)("h2",{children:e("Model")+" "+e("设置")})," ",(0,h.jsx)(a.rA,{icon:"info",onClick:()=>{ce('\n1. Only OpenAI-style AI APIs are supported. Fill in the FULL endpoint path (not just the domain), e.g. https://ark.cn-beijing.volces.com/api/v3/chat/completions\n2. The longer the conversation history, the more expensive the LLM token cost. Currently, there is no long-term memory simplification capability. You can set the system prompt to make the AI answer more concisely to save tokens\n3. When writing the model request parameter JSON, you can only write JSON in it, to configure the attributes supported by OpenAI-style AI, such as temperature, thinking (Doubao\'s deep thinking toggle), etc.\n4. You can enable "stream": true in the model request parameters to improve response speed.\n5. Deep thinking currently affects output speed. It is recommended to set { "thinking" : { "type":"disabled" } } to disable it (Doubao example).\n6. To use the AI feature to query server information, the AI needs to be able to know some commands. You need to first set command permissions for the user in user settings. It is recommended to set * to allow all commands, and then set the dangerous commands that are not allowed to be executed in the settings\n7. The model type and Become Tool are now both configured in "More Attributes → Extra Parameter Settings" using request_type / tool_mode (comments are already provided in the editor).\n8. After becoming a tool, the model will be loaded as a tool, enabling different models to serve as different roles; please do not set both it and "Enabled" to true at the same time.\n')},title:"信息"})]}),titleCom:(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>{O([...K,{note:"",open:!1,path:"",dotenv:N.CP,json_params:N.cL}])}}),(0,h.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:async()=>{await je()}})]}),children:(0,h.jsx)(d.X,{headers:n,onRowDrag:(e,t)=>{O((0,A.TI)(K,e,t))},rows:K.map((t,n)=>{const s=[(0,h.jsx)("div",{children:n}),(0,h.jsx)(p.Sm,{value:N.Lv.get_label_by_v(t.url,t.show_options?.options_agent_url_list),options:t.show_options?.options_agent_url_list,handleInputChange:e=>{t.url=e},no_border:!0}),(0,h.jsx)(p.l6,{value:t.open,onChange:e=>{((e,t,n)=>{const s=[];for(let e=0;e<K.length;e++)K[e].open=e===n&&t,s.push(K[e]);O(s)})(0,e,n)},options:_e,no_border:!0}),(0,h.jsx)(p.Sm,{type:N.Lv.have_label_by_v(t.token,t.show_options?.options_agent_key_list)?null:"password",value:N.Lv.get_label_by_v(t.token,t.show_options?.options_agent_key_list),options:t.show_options?.options_agent_key_list,handleInputChange:e=>{t.token=e},no_border:!0}),(0,h.jsx)(p.Sm,{value:N.Lv.get_label_by_v(t.model,t.show_options?.options_agent_model_list),options:t.show_options?.options_agent_model_list,handleInputChange:e=>{t.model=e},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"short_text",title:"prompt",onClick:()=>{f.xK.set_value_temp(K[n].sys_prompt??""),me({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{K[n].sys_prompt=e,O(K),f.xK.set_value_temp(""),je(K)}})}}),(0,h.jsx)(a.rA,{icon:"edit_attributes",title:"model请求参数json编写",onClick:()=>{f.xK.set_value_temp(K[n].json_params),me({model:"ace/mode/json",open:!0,fileName:"",save:async e=>{K[n].json_params=e,O(K),f.xK.set_value_temp(""),je(K)},can_format:!0})}}),(0,h.jsx)(a.rA,{icon:"settings",title:"额外参数设置",onClick:()=>{f.xK.set_value_temp(K[n].dotenv),me({model:"ace/mode/ini",open:!0,fileName:"",save:async e=>{K[n].dotenv=e,O(K),f.xK.set_value_temp(""),je(K)}})}})]}),(0,h.jsx)(p.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{K.splice(e,1),O([...K])})(n)}),(0,h.jsx)(a.rA,{icon:"copy_all",title:e("复制"),onClick:()=>(e=>{O([...K,{...K[e],open:!1}])})(n)})]})];return s}),width:"10rem"})})})}),(0,h.jsx)(c.fI,{children:(0,h.jsx)(c.VP,{widthPer:70,children:(0,h.jsx)(m.uF,{self_title:(0,h.jsxs)("span",{className:" div-row ",children:[(0,h.jsxs)("h2",{children:[e("MCP")+" "+e("设置")," - stdio"]})," ",(0,h.jsx)(a.rA,{icon:"info",onClick:()=>{ce("\n1. 这里配置的是 MCP Client 启动参数,当前实现的是 stdio 模式,也就是通过 command + args 启动本地 MCP Server\n2. 例如可以填 npx / uvx / python 等命令,再配合对应的 MCP server 包参数\n3. 保存后会自动重新加载 MCP 工具,agent 聊天时会把这些工具一起带给模型\n4. 建议把 cwd 配到具体项目目录,避免 server 在错误目录里运行\n")},title:"信息"})]}),titleCom:(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>ge("stdio")}),(0,h.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:()=>{ye()}})]}),children:(0,h.jsx)(d.X,{headers:ne,onRowDrag:(e,t)=>{X((0,A.TI)(P,P.indexOf(ee[e]),P.indexOf(ee[t]))),R.current=!0},rows:ee.map((t,n)=>{const s=P.indexOf(t);return[(0,h.jsx)("div",{children:n}),(0,h.jsx)(p.Sm,{value:t.name,handleInputChange:e=>{t.name=e,R.current=!0},no_border:!0}),(0,h.jsx)(p.l6,{value:t.open,onChange:e=>{t.open=e,X([...P]),R.current=!0},options:_e,no_border:!0}),Ae(P.indexOf(t)),(0,h.jsx)(p.Sm,{value:t.command,handleInputChange:e=>{t.command=e,R.current=!0},no_border:!0}),(0,h.jsx)(p.Sm,{value:t.args,handleInputChange:e=>{t.args=e,R.current=!0},no_border:!0}),(0,h.jsx)(p.Sm,{value:t.cwd,handleInputChange:e=>{t.cwd=e,R.current=!0},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"visibility",title:"查看工具",onClick:()=>{be(t,s)}}),(0,h.jsx)(a.rA,{icon:"settings",title:"env",onClick:()=>{f.xK.set_value_temp(t.env??""),me({model:"ace/mode/ini",open:!0,fileName:"",save:async e=>{t.env=e,X([...P]),f.xK.set_value_temp(""),R.current=!0,ye()}})}})]}),(0,h.jsx)(p.Sm,{value:t.note,handleInputChange:e=>{t.note=e,R.current=!0},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"delete",title:e("删除"),onClick:()=>ve(t)}),(0,h.jsx)(a.rA,{icon:"copy_all",title:e("复制"),onClick:()=>fe(t)})]})]}),width:"10rem"})})})}),(0,h.jsx)(c.fI,{children:(0,h.jsxs)(c.VP,{widthPer:70,children:[(0,h.jsx)(m.uF,{self_title:(0,h.jsxs)("span",{className:" div-row ",children:[(0,h.jsxs)("h2",{children:[e("MCP")+" "+e("设置")," - HTTP"]})," "]}),titleCom:(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>ge("http")}),(0,h.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:()=>{ye()}})]}),children:(0,h.jsx)(d.X,{headers:se,onRowDrag:(e,t)=>{X((0,A.TI)(P,P.indexOf(te[e]),P.indexOf(te[t]))),R.current=!0},rows:te.map((t,n)=>{const s=P.indexOf(t);return[(0,h.jsx)("div",{children:n}),(0,h.jsx)(p.Sm,{value:t.name,handleInputChange:e=>{t.name=e,R.current=!0},no_border:!0}),(0,h.jsx)(p.l6,{value:t.open,onChange:e=>{t.open=e,X([...P]),R.current=!0},options:_e,no_border:!0}),Ae(P.indexOf(t)),(0,h.jsx)(p.Sm,{value:t.endpoint,handleInputChange:e=>{t.endpoint=e,R.current=!0},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"visibility",title:"查看工具",onClick:()=>{be(t,s)}}),(0,h.jsx)(a.rA,{icon:"settings",title:"headers",onClick:()=>{f.xK.set_value_temp(t.headers??""),me({model:"ace/mode/ini",open:!0,fileName:"",save:async e=>{t.headers=e,X([...P]),f.xK.set_value_temp(""),R.current=!0,ye()}})}})]}),(0,h.jsx)(p.Sm,{value:t.note,handleInputChange:e=>{t.note=e,R.current=!0},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"delete",title:e("删除"),onClick:()=>ve(t)}),(0,h.jsx)(a.rA,{icon:"copy_all",title:e("复制"),onClick:()=>fe(t)})]})]}),width:"10rem"})}),(0,h.jsx)(m.uF,{self_title:(0,h.jsxs)("span",{className:" div-row ",children:[(0,h.jsx)("h2",{children:e("系统会话提示词")})," ",(0,h.jsx)(a.rA,{icon:"info",onClick:()=>{ce('\n1. 系统会话提示词,在 AI 聊天页创建会话时可以选择,选中的提示词会自动填入聊天框作为第一条系统消息\n2. 适用于预先设定常用的会话场景模板,如"代码审查"、"翻译助手"、"运维诊断"等\n3. "LLM编辑开关":开启后,当用户选择了该系统提示词发起对话时,AI 将会获得一个"更新会话提示词"工具,允许 AI 在对话中对当前会话进行总结,并写入到本提示词的"LLM编辑提示词"字段(全局保存,供之后的新会话沿用),使 AI 能自我维护长期上下文。\n4. "LLM编辑提示词":可选。AI 编辑后写回的内容(可预填初始方向)。仅在"LLM编辑开关"开启时生效。\n5. "编辑规则":可选。给 LLM 的编辑要求,例如"总结时不要超过 300 token"、"用简洁的项目要点记录"等。仅在"LLM编辑开关"开启时生效。\n')},title:"信息"})]}),titleCom:(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>{re([...ae,{prompt:"",note:"",llm_prompt_enable:!1}])}}),(0,h.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:()=>{Se()}})]}),children:(0,h.jsx)(d.X,{headers:oe,onRowDrag:(e,t)=>{re((0,A.TI)(ae,e,t))},rows:ae.map((t,n)=>{const s=[(0,h.jsx)("div",{children:n}),(0,h.jsx)("div",{children:(0,h.jsx)(a.rA,{icon:"short_text",title:e("提示词"),onClick:()=>{f.xK.set_value_temp(t.prompt??""),me({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{t.prompt=e,re([...ae]),f.xK.set_value_temp(""),Se()}})}})}),(0,h.jsx)(a.Ay,{checked:!!t.llm_prompt_enable,onChange:e=>{t.llm_prompt_enable=e,re([...ae])},title:e("LLM编辑开关")}),(0,h.jsx)("div",{children:(0,h.jsx)(a.rA,{icon:"edit_note",title:e("llm_pmt"),onClick:()=>{f.xK.set_value_temp(t.llm_prompt??""),me({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{t.llm_prompt=e,re([...ae]),f.xK.set_value_temp(""),Se()}})}})}),(0,h.jsx)("div",{children:(0,h.jsx)(a.rA,{icon:"rule",title:e("编辑规则"),onClick:()=>{f.xK.set_value_temp(t.llm_prompt_tip??""),me({model:"ace/mode/text",open:!0,fileName:"",save:async e=>{t.llm_prompt_tip=e,re([...ae]),f.xK.set_value_temp(""),Se()}})}})}),(0,h.jsx)(p.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,h.jsx)("div",{children:(0,h.jsx)(a.rA,{icon:"delete",title:e("删除"),onClick:()=>(e=>{ae.splice(e,1),re([...ae])})(n)})})];return s}),width:"10rem"})}),(0,h.jsx)(m.uF,{self_title:(0,h.jsxs)("span",{className:" div-row ",children:[(0,h.jsx)("h2",{children:e("长期记忆")})," ",(0,h.jsx)(a.rA,{icon:"info",onClick:()=>{ce(e("开启后跨会话保存记忆。四个固定文件:周/月/年/永久。每周结束自动压缩周→月,每月结束自动压缩月→年,每年结束自动压缩年→永久。编辑按钮可手动查看和修改。"))},title:"信息"})]}),titleCom:(0,h.jsx)("div",{children:(0,h.jsx)(a.Ay,{checked:ie,onChange:async t=>{le(t),await _.XO.post("ai_long_term_memory_setting/save",{open:t}),(0,g.SK)(e("长期记忆设置已保存"))},title:e("开关")})}),children:(0,h.jsx)("div",{style:{display:"flex",gap:"0.5rem",padding:"0.5rem 0",flexWrap:"wrap"},children:[{type:"week",label:e("周记忆"),tip:e("上限3000字")},{type:"month",label:e("月记忆"),tip:e("上限6000字")},{type:"year",label:e("年记忆"),tip:e("上限9000字")},{type:"forever",label:e("永久记忆"),tip:e("上限12000字")}].map(({type:t,label:n,tip:s})=>(0,h.jsx)(a.rA,{icon:"edit",title:`${e("编辑")} ${n} (${s})`,onClick:async()=>{const s=await _.XO.get(`ai_long_term_memory_bucket/${t}`),o=s.code===x.m.Success?s.data??"":"";f.xK.set_value_temp(o),me({model:"ace/mode/text",open:!0,fileName:`long_term_memory_${t}.txt`,save:async s=>{await _.XO.post(`ai_long_term_memory_bucket/${t}/save`,{data:s}),f.xK.set_value_temp(""),(0,g.SK)(`${n} ${e("已保存")}`)}})}},t))})})]})}),(0,h.jsxs)(c.fI,{children:[(0,h.jsx)(c.VP,{widthPer:50,children:(0,h.jsx)(m.uF,{self_title:(0,h.jsxs)("span",{className:" div-row ",children:[(0,h.jsx)("h2",{children:e("本地知识库")})," ",(0,h.jsx)(a.rA,{icon:"info",onClick:()=>{ce("\n1. 本地知识库用于为AI增强理解能力,或者分析本地文件,原理读取本地的文件,对文件在内存中建立全文索引,为AI提供额外数据(需要有模型开启才能使用)\n2. 该功能只能用于小型知识库,作为本地小型或者公司内部资料使用还是没有问题的\n3. 每次保存都会重新加载知识库中的文件,不会全部重新加载,而是检测哪些文件有变更\n")},title:"信息"})]}),titleCom:(0,h.jsxs)("div",{children:[(0,h.jsx)(a.Ay,{checked:Z,onChange:async e=>{await _.jV.post("docs_on_set",{status:e}),xe(),t()},title:e("知识库开关")}),(0,h.jsx)(a.rA,{icon:"settings",title:"额外参数设置",onClick:()=>{f.xK.set_value_temp(H.current),me({model:"ace/mode/ini",open:!0,fileName:"",save:async e=>{H.current=e,f.xK.set_value_temp(""),ke(H.current)}})}}),(0,h.jsx)(a.rA,{icon:"add",title:e("添加"),onClick:()=>{M([...L,{note:"",auto_load:!1,dir:""}]),q.current=!0}}),(0,h.jsx)(a.rA,{icon:"save",title:e("保存"),onClick:()=>{ke()}})]}),children:(0,h.jsx)(d.X,{headers:$,onRowDrag:(e,t)=>{M((0,A.TI)(L,e,t)),q.current=!0},rows:L.map((t,n)=>{const s=[(0,h.jsx)("div",{children:n}),(0,h.jsx)(p.Sm,{value:t.dir,handleInputChange:e=>{t.dir=e,q.current=!0},no_border:!0}),(0,h.jsx)(p.l6,{value:t.auto_load,onChange:e=>{t.auto_load=e,M([...L]),q.current=!0},options:_e,no_border:!0}),(0,h.jsx)(p.Sm,{value:t.note,handleInputChange:e=>{t.note=e},no_border:!0}),(0,h.jsxs)("div",{children:[(0,h.jsx)(a.rA,{icon:"delete",title:e("删除记录"),onClick:()=>(e=>{L.splice(e,1),M([...L]),q.current=!0})(n)}),(0,h.jsx)(a.rA,{icon:"restore",title:e("手动加载"),onClick:()=>{he({sub_title:"手动加载",confirm_fun:()=>{_.jV.post("docs_load_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("docs_del",{param_path:t.dir}),(0,g.SK)("ok")}})}})]})];return s}),width:"10rem"})})}),D&&(0,h.jsx)(c.VP,{widthPer:50,children:(0,h.jsxs)(m.Zp,{title:e("知识库加载信息"),children:[(0,h.jsx)(c.Yh,{left:e("最近一次加载")+","+e("加载进度"),right:D?.progress}),(0,h.jsx)(c.Yh,{left:`${e("最近一次加载")},${e("总文件数量")}`,right:D?.num}),(0,h.jsx)(c.Yh,{left:`${e("最近一次加载")},${e("总文件字符数量")}`,right:D?.char_num}),(0,h.jsx)(c.Yh,{left:`${e("最近一次加载")},${e("总文件大小")}`,right:(0,b.v7)(D?.size)}),(0,h.jsx)(c.Yh,{left:`${e("最近一次加载")},${e("总耗时")}`,right:(0,b.a3)(D?.consume_time_ms_len)}),(0,h.jsx)(c.Yh,{left:`${e("总文件数量")}`,right:D?.total_num})]})})]})]})})})]})}},34299(e,t,n){n.r(t),n.d(t,{default:()=>C});var s=n(96540),o=n(23802),a=n(53995),r=n(18569),i=n(77979),l=n(8263),c=n(69428),d=n.n(c),p=(n(3775),n(21499)),m=n(99214),u=n(89117),h=n(86063),_=n(89334),x=n(41105),g=n(52388),v=n(19878),f=(n(72411),n(74848));const j=new o.A({html:!0,highlight:function(e,t){if(t&&v.A.getLanguage(t))try{return`<pre class="hljs code-block-with-copy"><code class="hljs language-${t}">${v.A.highlight(e,{language:t}).value}</code></pre>`}catch(e){}try{return`<pre class="hljs code-block-with-copy"><code class="hljs">${v.A.highlightAuto(e).value}</code></pre>`}catch(e){}return`<pre class="hljs code-block-with-copy"><code>${j.utils.escapeHtml(e)}</code></pre>`}});async function y(e,t){e.className="md-graph md-graph--mind md-graph--loading",e.textContent=g.A.t("rendering");const n=await(0,h.Hn)(t);e.isConnected&&(e.className="md-graph md-graph--mind",e.textContent="",await n.mount(e))}function w(e){const t=e.className.match(/language-([\w-]+)/);return t?t[1]:""}function C(e){const t=(0,s.useRef)(null);return(0,m.VD)(),(0,s.useEffect)(()=>{t.current&&(t.current.innerHTML=j.render(e.context??""),async function(e){const t=e.querySelectorAll("pre > code[class*='language-']");for(const e of Array.from(t)){const t=w(e),n=(0,u.Hm)(t),s=(0,h.hj)(t);if(!n&&!s)continue;const o=e.closest(".code-block-with-copy")??e.parentElement;if(!o)continue;const a=e.textContent??"",r=document.createElement("div");if(o.replaceWith(r),s){try{await y(r,a)}catch(e){console.error("[mind] render failed",e),r.className="md-graph md-graph--mind",r.textContent=String(e)}continue}r.className="md-graph md-graph--loading",r.textContent=g.A.t("rendering");const i=await(0,u.U6)(t,a);r.isConnected&&(i.error?(r.className="md-graph md-graph--error",r.textContent=i.error):(r.className="md-graph",r.innerHTML=i.svg))}}(t.current),(0,_.rg)(t.current))},[e.context]),(0,f.jsx)("div",{ref:t})}j.use(a.A).use(r.A).use(i.A).use(l.A).use(d()).use(e=>{e.renderer.rules.fence;e.renderer.rules.fence=(t,n,s,o,a)=>{const r=t[n],i=r.content.trim(),l=r.info.trim();let c="";if(l&&v.A.getLanguage(l))try{c=v.A.highlight(i,{language:l}).value}catch(t){c=e.utils.escapeHtml(i)}else try{c=v.A.highlightAuto(i).value}catch(t){c=e.utils.escapeHtml(i)}return`\n <div class="code-block-with-copy">\n <div class="code-header">\n <span class="code-language">${l||"code"}</span>\n <button class="copy-btn" data-code="${e.utils.escapeHtml(i)}">复制</button>\n </div>\n <pre><code class="hljs ${l?`language-${l}`:""}">${c}</code></pre>\n </div>`}}).use(e=>{const t=e.renderer.rules.link_open||function(e,t,n,s,o){return o.renderToken(e,t,n)};e.renderer.rules.link_open=(e,n,s,o,a)=>{const r=e[n],i=r.attrIndex("href");if(i>=0){const e=r.attrs[i][1];r.attrs[i][1]=(0,p.bi)(window.location.href,e)}return t(e,n,s,o,a)}}),(0,_.Rh)(j,x.pC)},24659(e,t,n){var s=n(22022);n.d(t,["K",0,()=>{const{t:e}=(0,s.Bd)();return[{title:e("是"),value:!0,color:"#28a745"},{title:e("否"),value:!1,color:"#666666"}]}])},60840(e){e.exports="data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 version=%271.1%27 aria-hidden=%27true%27><path fill-rule=%27evenodd%27 d=%27M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z%27></path></svg>"}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9334],{89117(t,e,n){n.d(e,{Hm:()=>s,U6:()=>c});const r=["mermaid","svg"];function s(t){return r.includes(t)}let o=null;let i=0;async function a(t){const e=t.trim();if(!e)return{svg:"",error:null};const r=await(o||(o=n.e(2300).then(n.bind(n,62300)).then(t=>{const e=t.default;return e.initialize({startOnLoad:!1,securityLevel:"loose",theme:"default",fontFamily:"inherit",suppressErrorRendering:!0}),e})),o),s="md-mermaid-"+ ++i;try{const{svg:t}=await r.render(s,e);return{svg:t,error:null}}catch(t){return document.getElementById(s)?.remove(),document.getElementById(`d${s}`)?.remove(),{svg:"",error:t?.message??String(t)}}}async function c(t,e){return"svg"===t?function(t){const e=t.trim();if(!e)return{svg:"",error:null};const n=(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("parsererror");return n?{svg:"",error:n.textContent?.trim()||"SVG 解析失败"}:{svg:e,error:null}}(e):a(e)}},41105(t,e,n){n.d(e,{KR:()=>f,Ne:()=>h,op:()=>E,pC:()=>u,sL:()=>p});var r=n(5338),s=n(96540),o=n(14284),i=n(19878),a=n(89117),c=n(86063),l=n(93392),d=n(20892);function u(t){return btoa(unescape(encodeURIComponent(t)))}function h(t){return decodeURIComponent(escape(atob(t)))}let m="";function p(t){m=t||""}function f(t){if(/^(https?:|data:|blob:|\/\/|\/)/i.test(t))return t;const e=t.replace(/^\.\//,"");return o.$M.getDownloadUrl(m+e)}const g=new Set(["a","abbr","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","mark","ol","p","pre","q","s","samp","small","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","u","ul","var","wbr"]),_=new Set(["align","alt","border","cellpadding","cellspacing","class","colspan","height","href","id","rowspan","src","style","target","title","valign","width"]);function v(t){const e=(new DOMParser).parseFromString(`<div>${t}</div>`,"text/html").body.firstElementChild,n=document.createDocumentFragment();if(!e)return n;const r=(t,e)=>{t.childNodes.forEach(t=>{if(t.nodeType===Node.TEXT_NODE)return void e.appendChild(document.createTextNode(t.textContent??""));if(t.nodeType!==Node.ELEMENT_NODE)return;const n=t;if(!g.has(n.tagName.toLowerCase()))return void r(n,e);const s=document.createElement(n.tagName.toLowerCase());for(const t of Array.from(n.attributes)){const e=t.name.toLowerCase();e.startsWith("on")||(_.has(e)||e.startsWith("data-"))&&("href"!==e&&"src"!==e||!/^\s*javascript:/i.test(t.value))&&("src"!==e?s.setAttribute(e,t.value):s.setAttribute(e,f(t.value)))}r(n,s),e.appendChild(s)})};return r(e,n),n}class b{dom;node;view;get_pos;render_box;source_box;source_input;source_hl;source_hl_code;mode="preview";draft=null;constructor(t,e,n){this.node=t,this.view=e,this.get_pos=n,this.dom=document.createElement("div"),this.dom.className="md-html-block",this.dom.setAttribute("data-mode","preview"),this.render_box=document.createElement("div"),this.render_box.className="md-html-block__render",this.source_box=document.createElement("div"),this.source_box.className="md-html-block__source",this.source_input=document.createElement("textarea"),this.source_input.className="md-html-block__input",this.source_input.setAttribute("spellcheck","false"),this.source_input.setAttribute("wrap","off"),this.source_hl=document.createElement("pre"),this.source_hl.className="md-html-block__highlight",this.source_hl.setAttribute("aria-hidden","true");const r=document.createElement("code");this.source_hl.appendChild(r),this.source_hl_code=r,this.source_box.append(this.source_hl,this.source_input);const s=document.createElement("span");s.className="md-html-block__toggle",s.setAttribute("contenteditable","false"),s.textContent="HTML",s.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),this.toggle_mode()}),this.source_input.addEventListener("blur",()=>this.commit()),this.source_input.addEventListener("keydown",t=>{"Escape"===t.key&&(t.preventDefault(),this.draft=null,this.toggle_mode()),t.stopPropagation()}),this.source_input.addEventListener("input",()=>{this.draft=this.source_input.value,this.paint_highlight(),this.source_hl.scrollLeft=this.source_input.scrollLeft}),this.source_hl.addEventListener("scroll",()=>{this.source_input.scrollLeft=this.source_hl.scrollLeft});for(const t of["beforeinput","paste","input","keyup","keypress"])this.source_input.addEventListener(t,t=>t.stopPropagation());this.dom.append(this.render_box,this.source_box,s),this.render_box.replaceChildren(v(t.attrs.value)),this.set_source_value(t.attrs.value)}set_source_value(t){this.source_input.value=t,this.paint_highlight()}paint_highlight(){const t=this.source_input.value;this.source_hl_code.innerHTML=i.A.highlight(t+"\n",{language:"xml",ignoreIllegals:!0}).value}toggle_mode(){if("source"===this.mode)return this.commit(),this.mode="preview",void this.dom.setAttribute("data-mode","preview");this.mode="source",this.dom.setAttribute("data-mode","source"),this.set_source_value(this.node.attrs.value),this.draft=null,this.source_input.focus()}commit(){if(null===this.draft)return;const t=this.draft;if(this.draft=null,t===this.node.attrs.value)return;const e=this.get_pos(),n=this.view.state.doc.nodeAt(e);n&&this.view.dispatch(this.view.state.tr.setNodeMarkup(e,void 0,{...n.attrs,value:t}))}update(t){return t.type===this.node.type&&(this.node=t,null===this.draft&&(this.render_box.replaceChildren(v(t.attrs.value)),"preview"===this.mode&&this.set_source_value(t.attrs.value)),!0)}stopEvent(t){return this.dom.contains(t.target)}ignoreMutation(){return!0}}class w{dom;node;view;get_pos;constructor(t,e,n){this.node=t,this.view=e,this.get_pos=n,this.dom=document.createElement("span"),this.dom.className="md-html-inline",this.dom.setAttribute("contenteditable","true"),this.dom.textContent=t.attrs.value,this.dom.addEventListener("blur",()=>this.commit());for(const t of["beforeinput","paste","input"])this.dom.addEventListener(t,t=>t.stopPropagation())}commit(){const t=this.dom.textContent??"";if(t===this.node.attrs.value)return;const e=this.get_pos(),n=this.view.state.doc.nodeAt(e);n&&this.view.dispatch(this.view.state.tr.setNodeMarkup(e,void 0,{...n.attrs,value:t}))}update(t){return t.type===this.node.type&&(this.node=t,!0)}stopEvent(t){return this.dom.contains(t.target)}ignoreMutation(){return!0}}function y(t){const e=t.split(/[?#]/)[0].toLowerCase();return e.endsWith(".mermaid")?"mermaid":e.endsWith(".mind")?"mind":e.endsWith(".timeline")?"timeline":null}class k{dom;node;kind;src;mind_unmount=null;timeline_root=null;constructor(t){this.node=t,this.src=t.attrs.src,this.kind=y(this.src),this.dom=this.kind?this.build_graph():this.build_image()}build_image(){const t=document.createElement("img");t.src=f(this.src),t.alt=this.node.attrs.alt??"";const e=this.node.attrs.title;return e&&(t.title=e),t}build_graph(){const t=document.createElement("span");t.className="md-graph md-graph--file",t.setAttribute("contenteditable","false");const e=document.createElement("span");return e.className="md-graph__body",t.append(e),this.render_graph_body(e),t}render_graph_body(t){const e=f(this.src);t.textContent="loading",fetch(e).then(t=>t.text()).then(async e=>{if(!this.dom.isConnected)return;if("mermaid"===this.kind){const n=await(0,a.U6)("mermaid",e);if(!t.isConnected)return;return n.error?(this.dom.classList.add("md-graph--error"),void(t.textContent=n.error)):void(t.innerHTML=n.svg)}if("timeline"===this.kind){const n=(0,l.dO)(e);if(!t.isConnected)return;if(!n)return this.dom.classList.add("md-graph--error"),void(t.textContent="invalid timeline");this.dom.classList.add("md-graph--timeline"),t.remove(),this.dom.textContent="";const o=document.createElement("div");o.className="md-timeline-embed",this.dom.append(o);const i=(0,r.createRoot)(o);return i.render((0,s.createElement)(d.default,{doc:n,readonly:!0})),void(this.timeline_root=i)}const n=await(0,c.Hn)(e);if(!this.dom.isConnected)return;this.dom.classList.add("md-graph--mind"),t.remove(),this.dom.textContent="";const o=await n.mount(this.dom);this.mind_unmount=()=>o.destroy()}).catch(()=>{t.isConnected&&(this.dom.classList.add("md-graph--error"),t.textContent="load failed")})}update(t){if(t.type!==this.node.type)return!1;this.node=t;const e=t.attrs.src;if(e!==this.src){this.destroy_instance(),this.src=e,this.kind=y(e);const t=this.kind?this.build_graph():this.build_image();this.dom.replaceWith(t),this.dom=t}else if(!this.kind){const e=this.dom;e.alt=t.attrs.alt??"";const n=t.attrs.title;n&&(e.title=n)}return!0}destroy_instance(){this.mind_unmount?.(),this.mind_unmount=null,this.timeline_root?.unmount(),this.timeline_root=null}destroy(){this.destroy_instance()}stopEvent(t){return!!this.kind&&this.dom.contains(t.target)}ignoreMutation(){return!0}}function E(){return{html_block:(t,e,n)=>new b(t,e,n),html_inline:(t,e,n)=>new w(t,e,n),image:t=>new k(t)}}},89334(t,e,n){n.d(e,{Rh:()=>p,V:()=>a,lG:()=>o,rg:()=>f,z$:()=>u});var r=n(41105);n(6704);const s=["math","latex","katex"];function o(t){return s.includes(t.toLowerCase())}const i=[{open:"$$",close:"$$",mode:"block"},{open:"\\[",close:"\\]",mode:"block"},{open:"\\(",close:"\\)",mode:"inline"},{open:"$",close:"$",mode:"inline"}];function a(t){const e=t.trim();if(!e)return null;for(const t of i){if(e.length<=t.open.length+t.close.length)continue;if(!e.startsWith(t.open)||!e.endsWith(t.close))continue;const n=e.slice(t.open.length,e.length-t.close.length);if(("$"!==t.open||!e.startsWith("$$"))&&n.trim())return{tex:n,mode:t.mode,raw:e}}return null}let c=null;const l=new Map;async function d(t,e){const r=t.trim();if(!r)return{html:"",error:null};const s=`${e}\0${r}`,o=l.get(s);if(o)return o;let i;try{const{renderToString:t}=await(c||(c=n.e(2130).then(n.bind(n,99749))),c);i={html:t(r,{displayMode:"block"===e,throwOnError:!1,strict:!1,trust:!1,output:"html"}),error:null}}catch(t){i={html:"",error:t?.message??String(t)}}return l.size>=500&&l.clear(),l.set(s,i),i}async function u(t,e,n,r){const s=await d(e,n);if(t.isConnected){if(t.classList.remove("md-math--loading","md-math--error"),s.error)return t.classList.add("md-math--error"),t.textContent=r,void(t.title=s.error);t.innerHTML=s.html}}function h(t,e){const n=t.pos,r=t.src;if(r.startsWith("$$",n))return!1;const s=[{open:"\\(",close:"\\)"},{open:"$",close:"$"}];for(const o of s){if(!r.startsWith(o.open,n))continue;const s=n+o.open.length,i=r.indexOf(o.close,s);if(i<0)continue;const a=r.slice(s,i);if(a.trim()){if("$"===o.open){const t=r[i+1];if(void 0!==t&&/\d/.test(t))continue}if(!e){const e=t.push("math_inline","span",0);e.content=a,e.markup=o.open,e.meta={raw:r.slice(n,i+o.close.length)}}return t.pos=i+o.close.length,!0}}return!1}function m(t,e,n,r){const s=t.bMarks[e]+t.tShift[e],o=t.eMarks[e],i=t.src.slice(s,o).trim(),a=[{open:"\\[",close:"\\]"},{open:"$$",close:"$$"}];for(const o of a){if(!i.startsWith(o.open))continue;if(i.endsWith(o.close)&&i.length>o.open.length+o.close.length){if(r)return!0;const n=t.push("math_block","div",0);return n.content=i.slice(o.open.length,i.length-o.close.length),n.markup=o.open,n.meta={raw:i},n.map=[e,e+1],t.line=e+1,!0}const a=i.slice(o.open.length);for(let i=e+1;i<n;i++){const n=t.bMarks[i]+t.tShift[i],c=t.eMarks[i],l=t.src.slice(n,c);if(!l.trimEnd().endsWith(o.close))continue;if(r)return!0;const d=[];a.trim()&&d.push(a),t.getLines(e+1,i,t.tShift[e],!1).split("\n").forEach(t=>d.push(t)),d.push(l.trimEnd().slice(0,-o.close.length));const u=t.push("math_block","div",0);return u.content=d.join("\n").trim(),u.markup=o.open,u.meta={raw:t.src.slice(s,t.eMarks[i]).trimEnd()},u.map=[e,i+1],t.line=i+1,!0}}return!1}function p(t,e){t.inline.ruler.before("escape","math_inline",h),t.block.ruler.before("fence","math_block",m,{alt:["paragraph","reference","blockquote","list"]}),t.renderer.rules.math_inline=(t,n)=>`<span data-math-inline="${e(t[n].meta.raw)}"></span>`,t.renderer.rules.math_block=(t,n)=>`<div data-math-block="${e(t[n].meta.raw)}"></div>`;const n=t.renderer.rules.fence||function(t,e,n,r,s){return s.renderToken(t,e,n)};t.renderer.rules.fence=(t,r,s,i,a)=>o(t[r].info.trim())?`<div data-math-block="${e(`$$\n${t[r].content.trim()}\n$$`)}"></div>`:n(t,r,s,i,a)}async function f(t){const e=t.querySelectorAll("[data-math-inline], [data-math-block]");for(const t of Array.from(e)){const e=t.getAttribute("data-math-inline"),n=t.getAttribute("data-math-block"),s=e??n;if(null===s)continue;const o=a((0,r.Ne)(s));if(!o)continue;const i=null!==e?"inline":"block";t.classList.add("md-math","block"===i?"md-math--block":"md-math--inline"),await u(t,o.tex,i,o.raw)}}},86063(t,e,n){function r(t){return"smm-mind"===t}n.d(e,{Hn:()=>d,hj:()=>r,tW:()=>i});const s={mousewheelMoveStep:35,scaleRatio:.08};let o=null;function i(t){return t&&"object"==typeof t?t.data?.nodeData?a(t.data.nodeData):t.root&&"object"==typeof t.root?t.root.data?t.root:c(t.root):t.data&&"object"==typeof t.data?t:c(t):null}function a(t){return{data:{text:"string"==typeof t?.topic?t.topic:"string"==typeof t?.data?.text?t.data.text:""},children:Array.isArray(t?.children)?t.children.map(a):[]}}function c(t){return{data:{text:"string"==typeof t?.text?t.text:"",...t?.note?{note:t.note}:{}},children:Array.isArray(t?.children)?t.children.map(c):[]}}function l(t){t.stopPropagation()}async function d(t){const e=function(t){const e=t.trim();if(!e)return null;let n=null;try{n=JSON.parse(e)}catch{return null}return i(n)}(t),r=await(o||(o=Promise.all([n.e(1417).then(n.bind(n,21417)),n.e(8781).then(n.bind(n,88781))]).then(([t])=>t.default)),o);return{data:e,async mount(t,n){let o=!1;const i=await function(t,e){return new Promise(n=>{const r=()=>{e()?n(!1):t.isConnected&&t.clientWidth&&t.clientHeight?n(!0):window.setTimeout(r,16)};r()})}(t,()=>o);if(!i)return{destroy:()=>{},get_data:()=>null};const a=document.createElement("div");a.className="md-graph__mind-host",!1!==n?.release_wheel&&t.addEventListener("wheel",l,{capture:!0,passive:!0}),t.append(a);const c=new r({el:a,data:e??{data:{text:""}},readonly:!n?.editable,fit:!0,...s});return{destroy:()=>{o=!0,t.removeEventListener("wheel",l,{capture:!0}),c?.destroy?.()},get_data:()=>c?.getData?.(!1)}}}}n.d(e,["k$",0,s])}}]);
|