import{b as Xi}from"./chunk-EA6H37XC.min.js";import{Ga as zt,Ia as Hr,J as ph,M as Yi,N as Hi,O as $i,Qa as $r,_a as _i,b as dh,c as gh,eb as Wi,h as Ui,nb as ka,rb as Ki}from"./chunk-VMREMWJS.min.js";import{b as ne,d as Yr}from"./chunk-P42HNYSU.min.js";var gr=ne((E1,Zi)=>{function yh(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}Zi.exports=yh});var Ji=ne((w1,Qi)=>{var mh=typeof global=="object"&&global&&global.Object===Object&&global;Qi.exports=mh});var Xr=ne((x1,ji)=>{var bh=Ji(),Eh=typeof self=="object"&&self&&self.Object===Object&&self,wh=bh||Eh||Function("return this")();ji.exports=wh});var ts=ne((T1,es)=>{var xh=Xr(),Th=function(){return xh.Date.now()};es.exports=Th});var as=ne((C1,rs)=>{var Ch=/\s/;function Dh(t){for(var e=t.length;e--&&Ch.test(t.charAt(e)););return e}rs.exports=Dh});var is=ne((D1,ns)=>{var Sh=as(),Lh=/^\s+/;function Ah(t){return t&&t.slice(0,Sh(t)+1).replace(Lh,"")}ns.exports=Ah});var Pa=ne((S1,ss)=>{var Oh=Xr(),Nh=Oh.Symbol;ss.exports=Nh});var fs=ne((L1,ls)=>{var os=Pa(),us=Object.prototype,Ih=us.hasOwnProperty,Mh=us.toString,_r=os?os.toStringTag:void 0;function Rh(t){var e=Ih.call(t,_r),r=t[_r];try{t[_r]=void 0;var a=!0}catch{}var n=Mh.call(t);return a&&(e?t[_r]=r:delete t[_r]),n}ls.exports=Rh});var cs=ne((A1,hs)=>{var kh=Object.prototype,Ph=kh.toString;function Bh(t){return Ph.call(t)}hs.exports=Bh});var In=ne((O1,gs)=>{var vs=Pa(),Fh=fs(),Gh=cs(),zh="[object Null]",qh="[object Undefined]",ds=vs?vs.toStringTag:void 0;function Vh(t){return t==null?t===void 0?qh:zh:ds&&ds in Object(t)?Fh(t):Gh(t)}gs.exports=Vh});var ys=ne((N1,ps)=>{function Uh(t){return t!=null&&typeof t=="object"}ps.exports=Uh});var pr=ne((I1,ms)=>{var Yh=In(),Hh=ys(),$h="[object Symbol]";function Xh(t){return typeof t=="symbol"||Hh(t)&&Yh(t)==$h}ms.exports=Xh});var xs=ne((M1,ws)=>{var _h=is(),bs=gr(),Wh=pr(),Es=NaN,Kh=/^[-+]0x[0-9a-f]+$/i,Zh=/^0b[01]+$/i,Qh=/^0o[0-7]+$/i,Jh=parseInt;function jh(t){if(typeof t=="number")return t;if(Wh(t))return Es;if(bs(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=bs(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=_h(t);var r=Zh.test(t);return r||Qh.test(t)?Jh(t.slice(2),r?2:8):Kh.test(t)?Es:+t}ws.exports=jh});var Ds=ne((R1,Cs)=>{var ec=gr(),Mn=ts(),Ts=xs(),tc="Expected a function",rc=Math.max,ac=Math.min;function nc(t,e,r){var a,n,i,s,o,l,u=0,f=!1,h=!1,c=!0;if(typeof t!="function")throw new TypeError(tc);e=Ts(e)||0,ec(r)&&(f=!!r.leading,h="maxWait"in r,i=h?rc(Ts(r.maxWait)||0,e):i,c="trailing"in r?!!r.trailing:c);function v(x){var E=a,C=n;return a=n=void 0,u=x,s=t.apply(C,E),s}function d(x){return u=x,o=setTimeout(y,e),f?v(x):s}function g(x){var E=x-l,C=x-u,T=e-E;return h?ac(T,i-C):T}function p(x){var E=x-l,C=x-u;return l===void 0||E>=e||E<0||h&&C>=i}function y(){var x=Mn();if(p(x))return b(x);o=setTimeout(y,g(x))}function b(x){return o=void 0,c&&a?v(x):(a=n=void 0,s)}function w(){o!==void 0&&clearTimeout(o),u=0,a=l=n=o=void 0}function D(){return o===void 0?s:b(Mn())}function m(){var x=Mn(),E=p(x);if(a=arguments,n=this,l=x,E){if(o===void 0)return d(l);if(h)return clearTimeout(o),o=setTimeout(y,e),v(l)}return o===void 0&&(o=setTimeout(y,e)),s}return m.cancel=w,m.flush=D,m}Cs.exports=nc});var Ls=ne((Rn,Ss)=>{(function(){var t,e,r,a,n,i,s,o,l,u,f,h,c,v,d;r=Math.floor,u=Math.min,e=function(g,p){return g
p?1:0},l=function(g,p,y,b,w){var D;if(y==null&&(y=0),w==null&&(w=e),y<0)throw new Error("lo must be non-negative");for(b==null&&(b=g.length);yL;0<=L?T++:T--)C.push(T);return C}.apply(this).reverse(),E=[],b=0,D=x.length;b1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=r;s1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(r,a):(a1&&arguments[1]!==void 0?arguments[1]:!0,a=this[0],n=a.cy();if(n.styleEnabled()&&a){this.cleanStyle();var i=a._private.style[e];return i??(r?n.style().getDefaultProperty(e):null)}},numericStyle:function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var a=r.pstyle(e);return a.pfValue!==void 0?a.pfValue:a.value}},numericStyleUnits:function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},renderedStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var a=this[0];if(a)return r.style().getRenderedStyle(a,e)},style:function(e,r){var a=this.cy();if(!a.styleEnabled())return this;var n=!1,i=a.style();if(Se(e)){var s=e;i.applyBypass(this,s,n),this.emitAndNotify("style")}else if(ve(e))if(r===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}else i.applyBypass(this,e,r,n),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?i.getRawStyle(l):void 0}return this},removeStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var a=!1,n=r.style(),i=this;if(e===void 0)for(var s=0;s=s?h(y+1):f(p+1)}var b=i.w/u,w=i.h/l;if(e.condense&&(b=0,w=0),e.avoidOverlap)for(var D=0;D
)/g,`
`);Xi(f,h,{useHtmlLabels:i,width:r.width,classes:"mindmap-node-label"}),i||f.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let c=f.node().getBBox(),[v]=_i(n.fontSize);if(r.height=c.height+v*1.1*.5+r.padding,r.width=c.width+2*r.padding,r.icon)if(r.type===t.nodeType.CIRCLE)r.height+=50,r.width+=50,o.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),f.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")");else{r.width+=50;let d=r.height;r.height=Math.max(d,60);let g=Math.abs(r.height-d);o.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+g/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),f.attr("transform","translate("+(25+r.width/2)+", "+(g/2+r.padding/2)+")")}else if(i){let d=(r.width-c.width)/2,g=(r.height-c.height)/2;f.attr("transform","translate("+d+", "+g+")")}else{let d=r.width/2,g=r.padding/2;f.attr("transform","translate("+d+", "+g+")")}switch(r.type){case t.nodeType.DEFAULT:r1(t,u,r,s);break;case t.nodeType.ROUNDED_RECT:l1(t,u,r);break;case t.nodeType.RECT:a1(t,u,r);break;case t.nodeType.CIRCLE:u.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),s1(t,u,r);break;case t.nodeType.CLOUD:n1(t,u,r);break;case t.nodeType.BANG:i1(t,u,r);break;case t.nodeType.HEXAGON:u1(t,u,r);break}return t.setElementForId(r.id,o),r.height},h1=function(t,e){let r=t.getElementById(e.id),a=e.x||0,n=e.y||0;r.attr("transform","translate("+a+","+n+")")};Bi.default.use(th.default);function ah(t,e,r,a,n){f1(t,e,r,a,n),r.children&&r.children.forEach((i,s)=>{ah(t,e,i,a<0?s:a,n)})}function c1(t,e){e.edges().map((r,a)=>{let n=r.data();if(r[0]._private.bodyBounds){let i=r[0]._private.rscratch;zt.trace("Edge: ",a,n),t.insert("path").attr("d",`M ${i.startX},${i.startY} L ${i.midX},${i.midY} L${i.endX},${i.endY} `).attr("class","edge section-edge-"+n.section+" edge-depth-"+n.depth)}})}function nh(t,e,r,a){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:a,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach(n=>{nh(n,e,r,a+1),e.add({group:"edges",data:{id:`${t.id}_${n.id}`,source:t.id,target:n.id,depth:a,section:n.section}})})}function v1(t,e){return new Promise(r=>{let a=Ui("body").append("div").attr("id","cy").attr("style","display:none"),n=(0,Bi.default)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});a.remove(),nh(t,n,e,0),n.nodes().forEach(function(i){i.layoutDimensions=()=>{let s=i.data();return{w:s.width,h:s.height}}}),n.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),n.ready(i=>{zt.info("Ready",i),r(n)})})}function d1(t,e){e.nodes().map((r,a)=>{let n=r.data();n.x=r.position().x,n.y=r.position().y,h1(t,n);let i=t.getElementById(n.nodeId);zt.info("Id:",a,"Position: (",r.position().x,", ",r.position().y,")",n),i.attr("transform",`translate(${r.position().x-n.width/2}, ${r.position().y-n.height/2})`),i.attr("attr",`apa-${a})`)})}var g1=async(t,e,r,a)=>{var n,i;zt.debug(`Rendering mindmap diagram
`+t);let s=a.db,o=s.getMindmap();if(!o)return;let l=ka();l.htmlLabels=!1;let u=Ki(e),f=u.append("g");f.attr("class","mindmap-edges");let h=u.append("g");h.attr("class","mindmap-nodes"),ah(s,h,o,-1,l);let c=await v1(o,l);c1(f,c),d1(s,c),Wi(void 0,u,((n=l.mindmap)==null?void 0:n.padding)??$r.mindmap.padding,((i=l.mindmap)==null?void 0:i.useMaxWidth)??$r.mindmap.useMaxWidth)},p1={draw:g1},y1=t=>{let e="";for(let r=0;r