@keadex/mina-mcp-server-linux-x64 3.1.4

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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @keadex/mina-mcp-server-linux-x64
2
+
3
+ [Mina MCP Server](https://www.npmjs.com/package/@keadex/mina-mcp-server) binary for `linux-x64`
Binary file
Binary file
Binary file
Binary file
package/mina.js ADDED
@@ -0,0 +1 @@
1
+ (()=>{var e={542(e){e.exports={Tooltip:class{},Popover:class{},Modal:class{}}}},t={};function n(l){var o=t[l];if(void 0!==o)return o.exports;var a=t[l]={exports:{}};return e[l](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var l in t)n.o(t,l)&&!n.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};n.r(e),n.d(e,{renderDiagram:()=>Gt});const t=require("readline"),l=["https://","http://"];let o=function(e){return e.Alias="Alias",e}({});const a="object:modified",i="mouseup",r="modified",s="selected",u="deselected",d="#FFFFFF",c="#000000",_=12,p=10,h=20,g=20,O=120,v=20,m=10,b={SIZES:{DEFAULT_TOP:h+v,DEFAULT_LEFT:g+O+50,BORDER_WIDTH:1},FONT:{FAMILY:"Roboto"}},f={COLORS:{BG_COLOR_SOFTWARE_SYSTEM_PERSON:"#1168BD",BG_COLOR_CONTAINER:"#438DD5",BG_COLOR_COMPONENT:"#85BBF0",BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT:"#686868",BG_COLOR_CONTAINER_EXT:"#999999",BG_COLOR_COMPONENT_EXT:"#CCCCCC",BG_COLOR_BOUNDARY:d,BG_COLOR_DEPLOYMENT_NODE:d,BORDER_COLOR_SOFTWARE_SYSTEM_PERSON:"#0F5BA6",BORDER_COLOR_CONTAINER:"#3E84C7",BORDER_COLOR_COMPONENT:"#7BADDE",BORDER_COLOR_SOFTWARE_SYSTEM_PERSON_EXT:"#525252",BORDER_COLOR_CONTAINER_EXT:"#8A8A8A",BORDER_COLOR_COMPONENT_EXT:"#BDBDBD",BORDER_COLOR_BOUNDARY:"#666666",BORDER_COLOR_DEPLOYMENT_NODE:"#666666",TEXT_COLOR_SOFTWARE_SYSTEM_PERSON:"#FFFFFF",TEXT_COLOR_CONTAINER:"#FFFFFF",TEXT_COLOR_COMPONENT:"#000000",TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT:"#FFFFFF",TEXT_COLOR_CONTAINER_EXT:"#FFFFFF",TEXT_COLOR_COMPONENT_EXT:"#000000",TEXT_COLOR_BOUNDARY:"#333333",TEXT_COLOR_DEPLOYMENT_NODE:"#333333"},SIZES:{WIDTH:220,MIN_HEIGHT:100,PADDING_BOTTOM:15,BORDER_RADIUS:10,TOP_LABEL:20,TOP_TAGS:5,TOP_TYPE_TECHNOLOGY:2,TOP_DESCRIPTION:25,PADDING_Y_DESCRIPTION:10},FONT:{SIZE:14,SIZE_TAG:12,SIZE_TYPE_TECHNOLOGY:12,SIZE_DESCRIPTION:10}},S={SIZES:{SCALE_Y_TAIL_HEAD:.3,HEAD_BOX_WIDTH:20,RADIUS_TAIL_HEAD:f.SIZES.MIN_HEIGHT/2-b.SIZES.BORDER_WIDTH/2,SCALED_RADIUS_TAIL_HEAD:1/0,WIDTH_TAIL:1/0,WIDTH_HEAD:1/0}};S.SIZES.SCALED_RADIUS_TAIL_HEAD=S.SIZES.RADIUS_TAIL_HEAD*S.SIZES.SCALE_Y_TAIL_HEAD,S.SIZES.WIDTH_TAIL=S.SIZES.SCALED_RADIUS_TAIL_HEAD,S.SIZES.WIDTH_HEAD=S.SIZES.HEAD_BOX_WIDTH+S.SIZES.SCALED_RADIUS_TAIL_HEAD;const E={SIZES:{SCALE_X_TOP_BOTTOM:.15,TOP_BOX_HEIGHT:14,RADIUS_TOP_BOTTOM:f.SIZES.WIDTH/2-b.SIZES.BORDER_WIDTH/2,SCALED_RADIUS_TOP_BOTTOM:1/0,WIDTH_TOP:1/0,WIDTH_BOTTOM:1/0}};E.SIZES.SCALED_RADIUS_TOP_BOTTOM=E.SIZES.RADIUS_TOP_BOTTOM*E.SIZES.SCALE_X_TOP_BOTTOM,E.SIZES.WIDTH_TOP=E.SIZES.TOP_BOX_HEIGHT+E.SIZES.SCALED_RADIUS_TOP_BOTTOM,E.SIZES.WIDTH_BOTTOM=E.SIZES.SCALED_RADIUS_TOP_BOTTOM;const T="rgba(0,0,0,0)",y="#828282",R="#404040",C="#ff8f26",D=10,I=10,x=3,w=3,L=9,A=1,k=2,N=90,P=40,B=45,F=10,M=10,X=150,Z=80,Y=10,W={SIZES:{STROKE_DASH_ARRAY:[5,5]}},H={'"dashed"':{name:'"dashed"',value:[8,5]}},j=require("fast-deep-equal/es6/react");var G=n.n(j);const z=require("lodash.clonedeep");var U=n.n(z);function $(e){return e?e.replace(/\\n/g,"\n").replace(/\\t/g," ").replace(/\\r/g,"\n"):void 0}function q(e,t=96){return Number.parseFloat((e/t).toFixed(2))}require("jszip"),require("change-case");const Q=require("pluralize");n.n(Q)().addPluralRule(/Person/,"Persons"),require("react"),require("react-html-parser"),require("tailwind-merge"),n(542),require("react/jsx-runtime");const V=require("fabric"),J="idle",K="panning";class ee extends V.fabric.Canvas{constructor(e,t){super(e,t),this.gridEnabled=void 0,this.gridBgColor=void 0,ne(this),le(this)}initialize(e,t){return this.gridEnabled=null==t?void 0:t.gridEnabled,ne(this),le(this),!0===(null==t?void 0:t.readOnly)&&this.setReadOnly(),!0===(null==t?void 0:t.gridEnabled)&&this.enableGrid(),!0===(null==t?void 0:t.enableSnapToGrid)&&function(e,t){const n=null!=t?t:5;e.on("object:moving",(e=>{var t,l,o;null==(t=e.target)||t.set({left:Math.round((null!=(l=e.target.left)?l:0)/n)*n,top:Math.round((null!=(o=e.target.top)?o:0)/n)*n})}))}(this,t.gridSize),super.initialize(e,t)}isReadOnly(){return V.fabric.Object.prototype.lockMovementX&&V.fabric.Object.prototype.lockMovementY&&V.fabric.Object.prototype.lockRotation&&V.fabric.Object.prototype.lockScalingFlip&&V.fabric.Object.prototype.lockScalingX&&V.fabric.Object.prototype.lockScalingY&&V.fabric.Object.prototype.lockSkewingX&&V.fabric.Object.prototype.lockSkewingY}setReadOnly(){V.fabric.Object.prototype.lockMovementX=!0,V.fabric.Object.prototype.lockMovementY=!0,V.fabric.Object.prototype.lockRotation=!0,V.fabric.Object.prototype.lockScalingFlip=!0,V.fabric.Object.prototype.lockScalingX=!0,V.fabric.Object.prototype.lockScalingY=!0,V.fabric.Object.prototype.lockSkewingX=!0,V.fabric.Object.prototype.lockSkewingY=!0}setReadAndWrite(){V.fabric.Object.prototype.lockMovementX=!1,V.fabric.Object.prototype.lockMovementY=!1,V.fabric.Object.prototype.lockRotation=!1,V.fabric.Object.prototype.lockScalingFlip=!1,V.fabric.Object.prototype.lockScalingX=!1,V.fabric.Object.prototype.lockScalingY=!1,V.fabric.Object.prototype.lockSkewingX=!1,V.fabric.Object.prototype.lockSkewingY=!1}zoomIn(){this.setZoom(1.1*this.getZoom())}zoomOut(){this.setZoom(this.getZoom()/1.1)}resetZoom(){this.setZoom(1)}panLeft(){this.relativePan(new V.fabric.Point(5,0))}panRight(){this.relativePan(new V.fabric.Point(-5,0))}panUp(){this.relativePan(new V.fabric.Point(0,5))}panDown(){this.relativePan(new V.fabric.Point(0,-5))}resetPan(){this.absolutePan(new V.fabric.Point(0,0))}isGridEnabled(){var e;return null!=(e=this.gridEnabled)&&e}enableGrid(){if(!this.gridEnabled){this.gridEnabled=!0,this.gridBgColor=this.backgroundColor;const e=`\n<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160"><rect width="160" height="160" fill="${this.gridBgColor}" /><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><rect x="0.38" y="0.38" width="160" height="160" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.75px"/><line x1="0.38" y1="140.38" x2="160.38" y2="140.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="120.38" x2="160.38" y2="120.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="100.38" x2="160.38" y2="100.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="80.38" x2="160.38" y2="80.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.5px"/><line x1="0.38" y1="60.38" x2="160.38" y2="60.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="40.38" x2="160.38" y2="40.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="20.38" x2="160.38" y2="20.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="140.38" y1="0.38" x2="140.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="120.38" y1="0.38" x2="120.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="100.38" y1="0.38" x2="100.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="80.38" y1="0.38" x2="80.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.5px"/><line x1="60.38" y1="0.38" x2="60.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="40.38" y1="0.38" x2="40.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="20.38" y1="0.38" x2="20.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/></g></g></svg>\n`,t=new Blob([e],{type:"image/svg+xml"}),n=URL.createObjectURL(t);V.fabric.Image.fromURL(n,(e=>{var t,n;e.scaleToWidth(null!=(t=this.width)?t:0),e.scaleToHeight(null!=(n=this.height)?n:0);const l=new V.fabric.Pattern({source:e.getElement(),repeat:"repeat"});this.setBackgroundColor(l,this.renderAll.bind(this))}))}}disableGrid(){this.gridEnabled&&(this.gridEnabled=!1,this.gridBgColor&&(this.setBackgroundColor(this.gridBgColor,this.renderAll.bind(this)),this.gridBgColor=void 0))}}function te(e){return 3===e.button}function ne(e){e.on("mouse:wheel",(function(t){const n=t.e.deltaY;let l=e.getZoom();l*=.999**n,l>20&&(l=20),l<.01&&(l=.01),e.zoomToPoint({x:t.e.offsetX,y:t.e.offsetY},l),t.e.preventDefault(),t.e.stopPropagation()}))}function le(e){let t,n,l=J;e.discardActiveObject(),e.on("mouse:up",(function(t){te(t)&&(l=J,e.defaultCursor="default")})),e.on("mouse:down",(o=>{te(o)&&(e.defaultCursor="move",l=K,t=o.e.clientX,n=o.e.clientY)})),e.on("mouse:move",(o=>{if(l===K&&o&&o.e){let l=0,a=0;t&&(l=o.e.clientX-t),n&&(a=o.e.clientY-n),t=o.e.clientX,n=o.e.clientY;const i=new V.fabric.Point(l,a);e.relativePan(i),e.fire("moved")}}))}require("react-color"),require("react-hotkeys-hook"),require("ts-key-enum");const oe=require("@fortawesome/free-solid-svg-icons");function ae(e){try{return`Open Link ${new URL(e).host.replace("www.","")}`}catch(e){return"Open Link"}}function ie(e){return`<${e.toString().toUpperCase()}>`}function re(e,t){let n=-1;return e&&(n=e.getObjects().indexOf(t)),-1!==n?n:void 0}function se(e,t,n=Number.MAX_SAFE_INTEGER){let l=n;return t.forEach((t=>{const n=re(e,t);void 0!==n&&n<l&&(l=n)})),l!==Number.MAX_SAFE_INTEGER?l:void 0}function ue(e,t=!0){let n=[];return e&&e.forEach((e=>{(e.visible||!e.visible&&t)&&n.push(e),e.children&&(n=n.concat(ue(e.children,t)))})),n}function de(e){let t=0,n=0;if(e){const l=e.viewportTransform;t=l?l[4]:0,n=l?l[5]:0}return{panX:t,panY:n}}function ce(e){var t;const n=e.parent,l=function(e){let t=[];const n=new Set;if(e){let l=[];e.forEach((e=>{const t=e.getVirtualGroupRoot();t&&n.add(t)})),n.forEach((e=>{var t;l=l.concat(ue(null!=(t=e.children)?t:[],!0))})),t=e.filter((e=>!l.includes(e)))}return{filteredObjects:t,virtualGroupsRoots:n}}(null==(t=e.canvas)?void 0:t.getActiveObjects());let o,a;if(l.filteredObjects.length>0||l.virtualGroupsRoots.size>1){let e=l.filteredObjects;l.virtualGroupsRoots.forEach((t=>{var n;return e=e.concat(ue(null!=(n=t.children)?n:[],!1))})),o=e,a="multiple"}else{var i;o=ue(null!=(i=null==n?void 0:n.children)?i:[],!1),a="single"}return{objects:o,type:a}}function _e(e,t){var n,l;return(null==e?void 0:e.length)===(null==t?void 0:t.length)&&(null!=(n=null==e?void 0:e.map((e=>{var t;return null!=(t=e.name)?t:"undefined"})))?n:[]).sort().join(",")===(null!=(l=null==t?void 0:t.map((e=>{var t;return null!=(t=e.name)?t:"undefined"})))?l:[]).sort().join(",")}require("@fortawesome/react-fontawesome"),require("react-dom"),require("react-player"),require("@tanstack/react-table"),require("react-i18next"),require("@yaireo/tagify"),require("js-cookie"),require("react-ga4"),require("react-router-dom"),V.fabric.ActiveSelection.prototype._controlsVisibility={tl:!0,tr:!0,br:!0,bl:!0,ml:!1,mt:!1,mr:!1,mb:!1,mtr:!1},V.fabric.Object.prototype.isVirtualGroupParent=function(){return void 0!==this.children&&this.children.length>0},V.fabric.Object.prototype.isVirtualGroupChild=function(){return void 0!==this.parent},V.fabric.Object.prototype.isVirtualGroupRoot=function(){return this.isVirtualGroupParent()&&void 0===this.parent},V.fabric.Object.prototype.isVirtualGroupLeaf=function(){return this.isVirtualGroupChild()&&!this.isVirtualGroupParent()},V.fabric.Object.prototype.isVirtualGroupBaseShape=function(){return this.isVirtualGroupChild()&&this.parent.children[0]===this},V.fabric.Object.prototype.getVirtualGroupRoot=function(){let e=this.parent;for(;e&&e.parent;)e=e.parent;return e};class pe extends V.fabric.Point{constructor(e,t,n){super(e,t),this.customType=void 0,this.data=void 0,this.customType=n}}class he extends V.fabric.ActiveSelection{}const ge=e=>"getUpdatedSpecs"in e;class Oe extends V.fabric.Group{constructor(e,t,n,l,o,a,r,s,u=!1){var d,c,_,p,h,g,O,v,m,b,f;super(o,Object.assign({data:{rawDiagramElementSpec:t,rawData:e,rawAutoLayout:l},name:null!=(d=n.alias)?d:"undefined",left:void 0!==(null==t||null==(c=t.position)?void 0:c.left)?null==t||null==(_=t.position)?void 0:_.left:null==(p=n.position)?void 0:p.left,top:void 0!==(null==t||null==(h=t.position)?void 0:h.top)?null==t||null==(g=t.position)?void 0:g.top:null==(O=n.position)?void 0:O.top,scaleX:void 0!==(null==t||null==(v=t.size)?void 0:v.scale_x)?null==t||null==(m=t.size)?void 0:m.scale_x:1,scaleY:void 0!==(null==t||null==(b=t.size)?void 0:b.scale_y)?null==t||null==(f=t.size)?void 0:f.scale_y:1},a)),this.parent=r,this.children=null!=s?s:[],this.setControlsVisibility({mb:!1,ml:!1,mr:!1,mt:!1,mtr:!1}),u||this.on(i,(e=>{var t;this.onComponentMouseUp(null==(t=e.target)?void 0:t.canvas,e,this)}))}getUpdatedSpecs(){var e,t;null==(e=this.canvas)||e.discardActiveObject();const n=null==(t=this.data)?void 0:t.rawDiagramElementSpec;if(n){var l,o,a,i,r,s,u,d,c,_,p,h,g,O,v,m;const e=(b=n,U()(b));return e.position={left:null!=(l=this.left)?l:null==(o=n.position)?void 0:o.left,top:null!=(a=this.top)?a:null==(i=n.position)?void 0:i.top,z_index:null!=(r=re(this.canvas,this))?r:null==(s=n.position)?void 0:s.z_index,angle:null!=(u=this.angle)?u:null==(d=n.position)?void 0:d.angle},e.size={width:null!=(c=this.width)?c:null==(_=n.size)?void 0:_.width,height:null!=(p=this.height)?p:null==(h=n.size)?void 0:h.height,scale_x:null!=(g=this.scaleX)?g:null==(O=n.size)?void 0:O.scale_x,scale_y:null!=(v=this.scaleY)?v:null==(m=n.size)?void 0:m.scale_y},e}var b}onComponentMouseUp(e,t,n,l){if(e)switch(t.e.preventDefault(),t.button){case 3:{e.setActiveObject(n),e.renderAll();const o=e.contextTop,a=V.fabric.util.getPointer(t.e,o.canvas),i=new CustomEvent("contextmenu",{detail:{sourceEvent:t,pageX:a.x,pageY:a.y,menuItems:null!=l?l:ve(e,t,n)}});document.dispatchEvent(i);break}}}}const ve=(e,t,n,i=!0)=>{var r,s,u,d;const c=[],_=n instanceof he?n.parent:n,p=null==_?void 0:_.data,h=null==p||null==(r=p.rawDiagramElementSpec)?void 0:r.element_type,g=null==p||null==(s=p.rawData)||null==(s=s.base_data)||null==(s=s.link)?void 0:s.split(";"),O=e.isReadOnly(),v=e.codingFeaturesEnabled,m=void 0!==h&&g&&g.length>0&&void 0!==(xe(b=h)||Re(b)||ye(b)||Te(b));var b;let f=0,S=null==_?void 0:_.parent;for(;S;){var E;f++,S=null==(E=S)?void 0:E.parent}return m&&g.forEach(((t,n)=>{const a=t.replace(/ /gi,"");a.length>0&&(function(e){return l.some((t=>e.startsWith(t)))}(a)?c.push({isHeaderMenuItem:!1,id:`openLink${n}`,label:ae(a),onClick:()=>{e.diagramListener&&e.diagramListener.onOpenExternalLinkClick(function(e,t){let n=`${e}`;for(const e in o){var l;e===o.Alias.toString()&&n.includes(ie(o.Alias))&&null!=t&&null!=(l=t.base_data)&&l.alias&&(n=n.replace(new RegExp(ie(o.Alias),"gi"),t.base_data.alias))}return n}(a,null==p?void 0:p.rawData))}}):c.push({isHeaderMenuItem:!1,id:"openDiagram",label:"Open Diagram",onClick:()=>{e.diagramListener&&e.diagramListener.onOpenDiagramClick(a)}}))})),v&&null!=p&&p.rawData&&null!=(u=p.rawDiagramElementSpec)&&u.element_type&&c.push({isHeaderMenuItem:!1,id:"selectDiagramElementCode",label:"Select code",onClick:()=>{var t;null!=(t=e.diagramListener)&&t.onSelectElementCode&&e.diagramListener.onSelectElementCode(p.rawData,p.rawDiagramElementSpec.element_type,f)}}),!O&&(m||v&&null!=p&&p.rawData&&null!=(d=p.rawDiagramElementSpec)&&d.element_type)&&c.push({id:"separatorCommon",isSepator:!0}),O||c.push({isHeaderMenuItem:!1,id:"bringToFront",label:"Bring to Front",onClick:()=>{var e;n.bringToFront(),null==(e=n.canvas)||e.fire(a)}},{isHeaderMenuItem:!1,id:"bringForward",label:"Bring Forward",onClick:()=>{var e;n.bringForward(),null==(e=n.canvas)||e.fire(a)}},{isHeaderMenuItem:!1,id:"sentToBack",label:"Send to Back",onClick:()=>me(n)},{isHeaderMenuItem:!1,id:"sendBackwards",label:"Send Backwards",onClick:()=>be(n)}),i?[{isHeaderMenuItem:!0,id:"baseComponentContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:c}]:c},me=e=>{var t;e.parent||(e.sendToBack(),null==(t=e.canvas)||t.fire(a))},be=e=>{if(e instanceof he){var t,n,l;const i=e.parent,r=se(e.canvas,null!=(t=null==i?void 0:i.children)?t:[]),s=se(e.canvas,null!=(n=null==i||null==(l=i.parent)?void 0:l.children)?n:[]);var o;void 0===s||void 0===r||r-1>s?(e.sendBackwards(),null==(o=e.canvas)||o.fire(a)):console.debug(`cannot send backwards ${r} ${s}`)}else{var i,r;const t=re(e.canvas,e),n=se(e.canvas,null!=(i=null==(r=e.parent)?void 0:r.children)?i:[]);var s;void 0===n||void 0===t||t-1>n?(e.sendBackwards(),null==(s=e.canvas)||s.fire(a)):console.debug(`cannot send backwards ${t} ${n}`)}},fe=(e,t,n,l,o)=>Se(e,t,n,l,o.elements_specs)||Ee(e,t,n,l),Se=(e,t,n,l,o)=>{for(let r=0;r<o.length;r++){const s=o[r],u=s.alias===e,d=(a=s.element_type,i=l,G()(a,i));if(u&&d)return s;if(s.inner_specs){const o=s.inner_specs,a=Se(e,t,n,l,o);if(a)return a}}var a,i},Ee=(e,t,n,l)=>({alias:e,from:t,to:n,element_type:l}),Te=e=>{if("Boundary"in e)return e.Boundary},ye=e=>{if("Component"in e)return e.Component},Re=e=>{if("Container"in e)return e.Container},Ce=e=>{if("DeploymentNode"in e)return e.DeploymentNode},De=e=>{if("Person"in e)return e.Person},Ie=e=>{if("Relationship"in e)return e.Relationship},xe=e=>{if("SoftwareSystem"in e)return e.SoftwareSystem},we=(e,t)=>{var n,l,o;return e&&null!=(n=t[e])&&n.position?{left:null==(l=t[e].position)?void 0:l.x,top:null==(o=t[e].position)?void 0:o.y}:{left:b.SIZES.DEFAULT_LEFT,top:b.SIZES.DEFAULT_TOP}};function Le(e){return btoa(e)}const Ae="_margin_hack";function ke(e,t,n){return 2===n.length?n.map(((n,l)=>{const o=function(e,t=96){return Number.parseFloat((e*t).toFixed(2))}(0===l?e.x:e.y);return function(e,t=96){return Number.parseFloat((e*(t/72)).toFixed(2))}(0===l?n:t-n,Ne)+o})):n}const Ne=96,Pe=q(b.SIZES.DEFAULT_LEFT),Be=q(b.SIZES.DEFAULT_TOP),Fe=4.5;function Me(e){const t={x:f.SIZES.WIDTH,y:f.SIZES.MIN_HEIGHT+2*B},n={x:f.SIZES.WIDTH,y:f.SIZES.MIN_HEIGHT},l={x:f.SIZES.WIDTH+S.SIZES.WIDTH_TAIL+S.SIZES.WIDTH_HEAD,y:f.SIZES.MIN_HEIGHT},o={x:f.SIZES.WIDTH,y:f.SIZES.MIN_HEIGHT+E.SIZES.WIDTH_TOP+E.SIZES.WIDTH_BOTTOM};if(De(e))return t;if(xe(e)){const t=xe(e);return"SystemDb"===t.system_type||"SystemDb_Ext"===t.system_type?o:"SystemQueue"===t.system_type||"SystemQueue_Ext"===t.system_type?l:n}if(Re(e)){const t=Re(e);return"ContainerDb"===t.container_type||"ContainerDb_Ext"===t.container_type?o:"ContainerQueue"===t.container_type||"ContainerQueue_Ext"===t.container_type?l:n}if(ye(e)){const t=ye(e);return"ComponentDb"===t.component_type||"ComponentDb_Ext"===t.component_type?o:"ComponentQueue"===t.component_type||"ComponentQueue_Ext"===t.component_type?l:n}return{x:100,y:100}}function Xe(e,t,n,l,o){return`\n subgraph "${a=e,`${a}${Ae}`}" {\n cluster=true\n margin="${o}"\n fontsize="0pt"\n label=""\n subgraph "${e}" {\n cluster=true\n margin="${l}"\n label=" "\n labelloc="b"\n fontsize="17pt"\n "${e}" [peripheries=0, height=0, width=0, label=""] // invisible node that is used as a workaround to let the connection between nodes and subgraphs\n ${Ze(t,n,l,o)}\n }\n }\n `;var a}function Ze(e,t,n,l){let o="";for(const s of e){const e=Me(s);let u;if(De(s))u=De(s).base_data.alias;else if(xe(s))u=xe(s).base_data.alias;else if(Re(s))u=Re(s).base_data.alias;else if(ye(s))u=ye(s).base_data.alias;else if(Te(s)){const e=Te(s);u=e.base_data.alias,u&&(t.add(u),o=o.concat(Xe(u,e.sub_elements,t,n,l))),u=void 0}else if(Ce(s)){const e=Ce(s);u=e.base_data.alias,u&&(t.add(u),o=o.concat(Xe(u,e.sub_elements,t,n,l))),u=void 0}else if(Ie(s)){const e=Ie(s);var a,i;e.from&&e.to&&(o=o.concat(`\n"${e.from}" -> "${e.to}" [name="${e.base_data.alias}", xlabel="${r=[null!=(a=e.base_data.label)?a:"",null!=(i=e.technology)?i:""],r.sort(((e,t)=>t.length-e.length))[0]}", ltail="${e.from}", lhead="${e.to}", fontsize="${D}", keadex_fromissubgraph=${t.has(e.from)}, keadex_toissubgraph=${t.has(e.to)}]`)),u=void 0}u&&(o=o.concat(`\n"${u}" [width=${q(e.x,Ne)}, height=${q(e.y,Ne)}, peripheries=2]`))}var r;return o}const Ye=require("@hpcc-js/wasm-graphviz"),We=require("react-toastify");function He(e){if(e)return H[e]}const je="legend",Ge=(e,t,n,l,o,a)=>{var i,r,s;const u=[],d=n?1:0,c=new V.fabric.Rect({fill:t,stroke:n,strokeWidth:d,strokeDashArray:l,left:g,top:h+v*a,width:O-d,height:v-d});u.push(c);const _=new V.fabric.Text(e,{fill:o,fontFamily:b.FONT.FAMILY,fontSize:p,fontWeight:"normal",textAlign:"left",originX:"left",originY:"top",left:g+m});return _.top=(null!=(i=c.top)?i:0)+(null!=(r=c.height)?r:0)/2-(null!=(s=_.height)?s:0)/2,u.push(_),u},ze=(e,t)=>{var n,l,o,a,i,r,s,u,d,p,O,v,m,S,E,T,y,R,C,D,I,x,w,L,A,k,N,P,B,F,M,X,Z,Y;let W=[];const H=new V.fabric.Text("LEGEND",{fill:c,fontFamily:b.FONT.FAMILY,fontSize:_,fontWeight:"bold",textAlign:"left",originX:"left",originY:"top",left:g,top:h});W.push(H),W=W.concat(Ge("Person",null!=(n=null==t||null==(l=t.diagramsThemeSettings)?void 0:l.bg_color_person)?n:f.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,void 0,void 0,null!=(o=null==t||null==(a=t.diagramsThemeSettings)?void 0:a.text_color_person)?o:f.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON,1)),W=W.concat(Ge("Person External",null!=(i=null==t||null==(r=t.diagramsThemeSettings)?void 0:r.bg_color_person_ext)?i:f.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,void 0,void 0,null!=(s=null==t||null==(u=t.diagramsThemeSettings)?void 0:u.text_color_person_ext)?s:f.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,2)),W=W.concat(Ge("System",null!=(d=null==t||null==(p=t.diagramsThemeSettings)?void 0:p.bg_color_software_system)?d:f.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,void 0,void 0,null!=(O=null==t||null==(v=t.diagramsThemeSettings)?void 0:v.text_color_software_system)?O:f.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON,3)),W=W.concat(Ge("System External",null!=(m=null==t||null==(S=t.diagramsThemeSettings)?void 0:S.bg_color_software_system_ext)?m:f.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,void 0,void 0,null!=(E=null==t||null==(T=t.diagramsThemeSettings)?void 0:T.text_color_software_system_ext)?E:f.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,4)),W=W.concat(Ge("Container",null!=(y=null==t||null==(R=t.diagramsThemeSettings)?void 0:R.bg_color_container)?y:f.COLORS.BG_COLOR_CONTAINER,void 0,void 0,null!=(C=null==t||null==(D=t.diagramsThemeSettings)?void 0:D.text_color_container)?C:f.COLORS.TEXT_COLOR_CONTAINER,5)),W=W.concat(Ge("Container External",null!=(I=null==t||null==(x=t.diagramsThemeSettings)?void 0:x.bg_color_container_ext)?I:f.COLORS.BG_COLOR_CONTAINER_EXT,void 0,void 0,null!=(w=null==t||null==(L=t.diagramsThemeSettings)?void 0:L.text_color_container_ext)?w:f.COLORS.TEXT_COLOR_CONTAINER_EXT,6)),W=W.concat(Ge("Component",null!=(A=null==t||null==(k=t.diagramsThemeSettings)?void 0:k.bg_color_component)?A:f.COLORS.BG_COLOR_COMPONENT,void 0,void 0,null!=(N=null==t||null==(P=t.diagramsThemeSettings)?void 0:P.text_color_component)?N:f.COLORS.TEXT_COLOR_COMPONENT,7)),W=W.concat(Ge("Component External",null!=(B=null==t||null==(F=t.diagramsThemeSettings)?void 0:F.bg_color_component_ext)?B:f.COLORS.BG_COLOR_COMPONENT_EXT,void 0,void 0,null!=(M=null==t||null==(X=t.diagramsThemeSettings)?void 0:X.text_color_component_ext)?M:f.COLORS.TEXT_COLOR_COMPONENT_EXT,8));let j=8;var G,z,U,$;null!=t&&null!=(Z=t.diagramsThemeSettings)&&Z.bg_color_boundary&&(j++,W=W.concat(Ge("Boundary",t.diagramsThemeSettings.bg_color_boundary,void 0,void 0,null!=(G=null==t||null==(z=t.diagramsThemeSettings)?void 0:z.text_color_boundary)?G:f.COLORS.TEXT_COLOR_BOUNDARY,j))),null!=t&&null!=(Y=t.diagramsThemeSettings)&&Y.bg_color_deployment_node&&(j++,W=W.concat(Ge("Deployment Node",t.diagramsThemeSettings.bg_color_deployment_node,void 0,void 0,null!=(U=null==t||null==($=t.diagramsThemeSettings)?void 0:$.text_color_deployment_node)?U:f.COLORS.TEXT_COLOR_DEPLOYMENT_NODE,j))),null!=t&&t.tags&&Object.entries(t.tags).forEach((([e,t],n)=>{var l,o,a,i,r;j++,W=W.concat(Ge(null!=(l=null!=(o=t.legend_text)?o:t.tag)?l:"<no tag>",t.bg_color,null!=(a=t.border_color)?a:t.bg_color?void 0:"black",null==(i=He(t.border_style))?void 0:i.value,null!=(r=t.font_color)?r:"black",j))}));return new Oe(void 0,e,{alias:je,position:{left:g,top:h}},{},W)},Ue="The diagram contains too many elements and relationships, which may cause the auto layout to break. Try adjusting auto layout settings like orientation, ranksep or subgraph margins.",$e="Graphviz not initialized. Cannot generate auto layout.",qe="triangulation failed";function Qe(e){return null==e?void 0:e.split("+")}function Ve(e,t){if(e&&t){const n=[];for(const l of e){const e=t[Le(l)];e&&n.push(e)}if(n.length>0)return Object.assign({},...n)}}let Je=function(e){return e.Rectangle="RECTANGLE",e.Footer="FOOTER",e}({});class Ke extends Oe{getUpdatedSpecs(){const e=super.getUpdatedSpecs();var t;if(e&&(null==(t=this.canvas)||t.discardActiveObject(),delete e.position,delete e.size,e.inner_specs=[],e.shapes=[],this.children))for(const t of this.children)if(ge(t)){const n=t.getUpdatedSpecs();n&&e.inner_specs.push(n)}else if(t.name!==Je.Footer){var n,l;e.shapes.push({position:{left:t.left,top:t.top,z_index:re(t.canvas,t)},size:{scale_x:null!=(n=t.scaleX)?n:1,scale_y:null!=(l=t.scaleY)?l:1},shape_type:t.name})}else e.shapes.push({position:{z_index:re(t.canvas,t)},shape_type:t.name});return e}}const et=e=>{var t,n,l,o,a,i,r,s,u,d,c;let _,p;const h=(null==(t=e.data)||null==(t=t.rawData)||null==(t=t.base_data)?void 0:t.alias)&&e.data.rawAutoLayout&&void 0!==e.data.rawAutoLayout[e.data.rawData.base_data.alias],g=[];null==(n=e.children)||n.forEach((e=>{e.name===Je.Footer?p=e:e.name===Je.Rectangle?_=e:g.push(e)}));const O=function(e,t=!0,n){var l,o,a,i;let r,s,u,d;return e.forEach((e=>{if(e.visible){const l=e.getBoundingRect(!1,!0),o=t?e.getBoundingRect(!0,!1):l;let a=o.left,i=o.top;if(n&&a&&i){const e=fabric.util.transformPoint(new fabric.Point(a,i),n);a=e.x,i=e.y}(void 0===r||a<r)&&(r=a),void 0!==a&&void 0!==l.width&&(void 0===s||a+l.width>s)&&(s=a+l.width),(void 0===d||void 0!==i&&i<d)&&(d=i),void 0!==i&&void 0!==l.height&&(void 0===u||l.height+i>u)&&(u=i+l.height)}})),{left:r,right:s,top:d,bottom:u,width:(null!=(l=s)?l:0)-(null!=(o=r)?o:0),height:(null!=(a=u)?a:0)-(null!=(i=d)?i:0)}}(ue(g),!1),v=null!=(l=null==(o=_)?void 0:o.scaleX)?l:1,m=null!=(a=null==(i=_)?void 0:i.scaleY)?a:1,b=null!=(r=null==(s=_)||null==(s=s.canvas)?void 0:s.getZoom())?r:1,f=de(e.canvas),S=Y*v,E=Y*m,T=Y*v,y=Y*m;var R;_&&void 0!==O.left&&void 0!==O.right&&void 0!==O.top&&void 0!==O.bottom&&void 0!==O.width&&void 0!==O.height&&void 0!==p?(O.left=(O.left-f.panX)/b,O.top=(O.top-f.panY)/b,O.right=(O.right-f.panX)/b,O.bottom=(O.bottom-f.panY)/b,O.width=O.right-O.left,O.height=O.bottom-O.top,h||(_.width=O.width/v+S/v*2,_.height=O.height/m+E/m*3+(null!=(R=p.height)?R:0),_.left=O.left-S,_.top=O.top-E)):_&&void 0!==p&&(_.width=X,_.height=Z+p.getScaledHeight()),null==(u=e.canvas)||u.renderAll(),_&&p&&void 0!==_.left&&void 0!==_.top&&void 0!==_.height&&void 0!==p.height&&(p.top=_.top+_.getScaledHeight()-p.getScaledHeight()-y,p.left=_.left+T),null==(d=_)||d.setCoords(),null==(c=p)||c.setCoords()},tt=e=>{e.on(s,(t=>{lt(t,e)}))},nt=e=>{e.on(s,(t=>{lt(t,e)}))},lt=(e,t)=>{var n;if(e.e&&null!=(n=t.parent)&&n.children){var l;const e=ce(t);if(!_e(null==(l=t.canvas)?void 0:l.getActiveObjects(),e.objects)){var o,a,s;null==(o=t.canvas)||o.discardActiveObject();const n=t.parent;let l;"multiple"===e.type?l=new V.fabric.ActiveSelection(e.objects,{canvas:t.canvas}):(l=new he(e.objects,{canvas:t.canvas}),l.parent=n,l.on(i,(e=>{at(l.canvas,e,l,n)})),l.on(r,(e=>{var l;null==(l=t.canvas)||l.discardActiveObject(),n.fire(r)}))),null==(a=t.canvas)||a.setActiveObject(l),null==(s=t.canvas)||s.requestRenderAll()}}},ot=(e,t)=>{e&&t&&et(e)},at=(e,t,n,l)=>{n instanceof V.fabric.ActiveSelection&&e&&l.onComponentMouseUp(e,t,n,((e,t,n)=>n instanceof V.fabric.ActiveSelection?[{isHeaderMenuItem:!0,id:"baseElasticContainerContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:[...ve(e,t,n,!1)]}]:[])(e,t,n))},it=(e,t,n,l,o,a)=>{var i,s;const u=Ve(Qe(null==(i=e.base_data)?void 0:i.tags),null==a?void 0:a.tags),d={alias:null==(s=e.base_data)?void 0:s.alias},c=new Ke(e,t,d,l,[],void 0,void 0,void 0,!0);c.visible=!1;const _=((e,t,n,l,o)=>{var a,i,r,s,u,d,c,_,p,h,g,O;const v=null==e||null==(a=e.shapes)?void 0:a.filter((e=>e.shape_type===Je.Rectangle))[0],m=new V.fabric.Rect({fill:null!=(i=null==o?void 0:o.bg_color)?i:n.bgColor,stroke:null!=(r=null==o?void 0:o.border_color)?r:n.borderColor,strokeWidth:b.SIZES.BORDER_WIDTH,strokeDashArray:n.strokeDashArray,left:null!=(s=null==v||null==(u=v.position)?void 0:u.left)?s:we(e.alias,t).left,top:null!=(d=null==v||null==(c=v.position)?void 0:c.top)?d:we(e.alias,t).top,name:Je.Rectangle,rx:f.SIZES.BORDER_RADIUS,ry:f.SIZES.BORDER_RADIUS,scaleX:null!=(_=null==v||null==(p=v.size)?void 0:p.scale_x)?_:1,scaleY:null!=(h=null==v||null==(g=v.size)?void 0:g.scale_y)?h:1}),S=((e,t)=>{var n,l,o;if(e&&null!=(n=t[e])&&n.size)return{width:null==(l=t[e].size)?void 0:l.x,height:null==(o=t[e].size)?void 0:o.y}})(e.alias,t);return S&&(m.width=S.width,m.height=S.height),m.data={rawDiagramElementSpec:v},m.parent=l,tt(m),null==(O=l.children)||O.push(m),m})(t,l,o,c,u);((e,t,n,l,o,a,i)=>{var r,s,u,d,c,_,p,h,g,O,v;const m=null==e||null==(r=e.shapes)?void 0:r.filter((e=>e.shape_type===Je.Footer))[0],f=[],S={fontFamily:b.FONT.FAMILY,fill:null!=(s=null==i?void 0:i.font_color)?s:n.textColor};let E;var T;let y;var R,C;null!=(u=l.base_data)&&u.link&&(E=new V.fabric.Path(oe.faLink.icon[4].toString(),{fill:null!=(T=null==i?void 0:i.font_color)?T:n.textColor,opacity:1,originX:"left",originY:"top",top:1,left:0}),E.scaleToWidth(10),f.push(E)),null!=(d=l.base_data)&&d.label&&(y=new V.fabric.Text(l.base_data.label,Object.assign({},S,{fontSize:F,fontWeight:"bold"})),y.top=0,y.left=null!=(R=E)&&R.getScaledWidth()?(null==(C=E)?void 0:C.getScaledWidth())+3:0,f.push(y));let D=null!=(c=null!=(_=l.boundary_type)?_:l.deployment_node_type)?c:"";D=null!=(p=null!=(h=l.boundary_custom_type)?h:l.deploymeny_node_custom_type)?p:D,D+=l.technology?`: ${l.technology}`:"",D=`[${D}]`;const I=new V.fabric.Text(D,Object.assign({},S,{fontSize:M,left:0,top:null!=(g=null==(O=y)?void 0:O.height)?g:0}));f.push(I);const x=new V.fabric.Group(f,{name:Je.Footer,selectable:!1,evented:!1,left:o.left,top:o.top,scaleX:o.scaleX,scaleY:o.scaleY});x.data={rawDiagramElementSpec:m},x.parent=a,nt(x),null==(v=a.children)||v.push(x)})(t,0,o,e,_,c,u);let p=[];return e.sub_elements&&(p=Zt(void 0,e.sub_elements,n,l,Object.assign({},a,{skipAddToCanvas:!0,skipLegendRendering:!0})),p.forEach((e=>{var t;e.parent=c,null==(t=c.children)||t.push(e)}))),et(c),(e=>{var t;null==(t=e.children)||t.forEach((t=>{t.on(r,(t=>{ot(e,t)})),t.children&&t.children.forEach((t=>{t.on(r,(t=>{ot(e,t)}))}))}))})(c),c},rt=(e,t,n,l,o)=>{if(t.base_data&&t.base_data.alias&&t.base_data.label&&t.boundary_type&&(n.auto_layout_enabled&&l[t.base_data.alias]||!n.auto_layout_enabled)){var a;const i=((e,t,n,l,o,a)=>{var i,r,s,u,d,c;const _={bgColor:null!=(i=null==a||null==(r=a.diagramsThemeSettings)?void 0:r.bg_color_boundary)?i:f.COLORS.BG_COLOR_BOUNDARY,borderColor:null!=(s=null==a||null==(u=a.diagramsThemeSettings)?void 0:u.border_color_boundary)?s:f.COLORS.BORDER_COLOR_BOUNDARY,textColor:null!=(d=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_boundary)?d:f.COLORS.TEXT_COLOR_BOUNDARY,strokeDashArray:W.SIZES.STROKE_DASH_ARRAY},p=Object.assign({},_,o);return it(e,t,n,l,p,a)})(t,fe(t.base_data.alias,void 0,void 0,{Boundary:t.boundary_type},n),n,l,void 0,o);return o&&o.skipAddToCanvas||!i||null==e||e.add(i,...ue(null!=(a=i.children)?a:[])),i}},st=(e,t,n,l,o)=>{var a,i,r,s,u,d;const c=Ve(Qe(null==(a=e.base_data)?void 0:a.tags),null==o?void 0:o.tags),_=[],p=((e,t,n)=>{var l,o,a,i,r,s,u;const d=new V.fabric.Rect({fill:null!=(l=null==n?void 0:n.bg_color)?l:t.bgColor,stroke:null!=(o=null==n?void 0:n.border_color)?o:t.borderColor,strokeWidth:b.SIZES.BORDER_WIDTH,left:b.SIZES.DEFAULT_LEFT,top:b.SIZES.DEFAULT_TOP,width:null!=(a=t.widthBox)?a:f.SIZES.WIDTH,height:f.SIZES.MIN_HEIGHT,name:null!=(i=null==(r=e.base_data)?void 0:r.alias)?i:"undefined",rx:null!=(s=t.borderRadius)?s:f.SIZES.BORDER_RADIUS,ry:null!=(u=t.borderRadius)?u:f.SIZES.BORDER_RADIUS});return d.on("scaling",(e=>{var t;null!=(t=e.target)&&t.width&&e.target.height&&e.target.scaleX&&e.target.scaleY&&e.target.set({width:e.target.width*e.target.scaleX,height:e.target.height*e.target.scaleY,scaleX:1,scaleY:1})})),d})(e,l,c);let h;_.push(p),null!=(i=e.base_data)&&i.tags&&(h=((e,t,n,l)=>{var o,a,i,r,s;return new V.fabric.Text(`«${null==(o=t.base_data)?void 0:o.tags}»`,{fill:null!=(a=null==l?void 0:l.font_color)?a:n.textColor,fontFamily:b.FONT.FAMILY,fontSize:f.FONT.SIZE_TAG,fontStyle:"italic",fontWeight:"normal",textAlign:"center",originX:"center",originY:"top",left:(null!=(i=e.left)?i:b.SIZES.DEFAULT_LEFT)+(null!=(r=e.width)?r:0)/2,top:(null!=(s=e.top)?s:b.SIZES.DEFAULT_TOP)+f.SIZES.TOP_TAGS})})(p,e,l,c),_.push(h));const g=((e,t,n,l,o)=>{var a,i,r,s,u,d;return new V.fabric.Text(null!=(a=$(null==(i=n.base_data)?void 0:i.label))?a:"undefined",{fill:null!=(r=null==o?void 0:o.font_color)?r:l.textColor,fontFamily:b.FONT.FAMILY,fontSize:f.FONT.SIZE,fontWeight:"bold",textAlign:"center",originX:"center",originY:"top",left:(null!=(s=e.left)?s:b.SIZES.DEFAULT_LEFT)+(null!=(u=e.width)?u:0)/2,top:(null!=(d=null==t?void 0:t.top)?d:b.SIZES.DEFAULT_TOP)+f.SIZES.TOP_LABEL})})(p,h,e,l,c);_.push(g);const O=((e,t,n,l,o)=>{var a,i,r,s,u,d,c,_,p,h,g,O;const v=`[${null!=(a=null!=(i=null!=(r=null!=(s=null!=(u=null!=(d=null!=(c=n.boundary_custom_type)?c:n.boundary_type)?d:n.component_type)?u:n.container_type)?s:n.deployment_node_type)?r:n.deploymeny_node_custom_type)?i:n.person_type)?a:n.system_type}${n.technology?`: ${n.technology}`:""}]`;return new V.fabric.Text(v,{fill:null!=(_=null==o?void 0:o.font_color)?_:l.textColor,fontFamily:b.FONT.FAMILY,fontSize:f.FONT.SIZE_TYPE_TECHNOLOGY,fontWeight:"normal",textAlign:"center",originX:"center",originY:"top",left:(null!=(p=e.left)?p:b.SIZES.DEFAULT_LEFT)+(null!=(h=e.width)?h:0)/2,top:(null!=(g=null==t?void 0:t.top)?g:b.SIZES.DEFAULT_TOP)+f.SIZES.TOP_TYPE_TECHNOLOGY+(null!=(O=null==t?void 0:t.height)?O:0)})})(p,g,e,l,c);let v;_.push(O),null!=(r=e.base_data)&&r.description&&(v=((e,t,n,l,o)=>{var a,i,r,s,u,d,c;const _=null!=(a=l.widthDescription)?a:e.width;return new V.fabric.Textbox(null!=(i=$(null==(r=n.base_data)?void 0:r.description))?i:"",{fill:null!=(s=null==o?void 0:o.font_color)?s:l.textColor,fontFamily:b.FONT.FAMILY,fontSize:f.FONT.SIZE_DESCRIPTION,fontWeight:400,opacity:.7,splitByGrapheme:!0,width:_?_-f.SIZES.PADDING_Y_DESCRIPTION:0,textAlign:"center",originX:"center",originY:"top",left:(null!=(u=e.left)?u:b.SIZES.DEFAULT_LEFT)+(null!=(d=e.width)?d:0)/2,top:(null!=(c=null==t?void 0:t.top)?c:0)+f.SIZES.TOP_DESCRIPTION})})(p,O,e,l,c),_.push(v)),null!=(s=e.base_data)&&s.link&&_.push(((e,t,n)=>{var l,o,a;const i=new V.fabric.Path(oe.faLink.icon[4].toString(),{fill:null!=(l=null==n?void 0:n.font_color)?l:t.textColor,opacity:1,originX:"left",originY:"top",left:(null!=(o=e.left)?o:0)+5,top:(null!=(a=e.top)?a:0)+5});return i.scaleToWidth(10),i})(p,l,c)),((e,t)=>{var n,l,o;let a=(null!=(n=null==t?void 0:t.height)?n:0)+((null!=(l=null==t?void 0:t.top)?l:0)-(null!=(o=null==e?void 0:e.top)?o:0))+f.SIZES.PADDING_BOTTOM;a<f.SIZES.MIN_HEIGHT&&(a=f.SIZES.MIN_HEIGHT),e.height=a})(p,v);const m={alias:null==(u=e.base_data)?void 0:u.alias,position:we(null==(d=e.base_data)?void 0:d.alias,n)};return new Oe(e,t,m,n,_)},ut=(e,t,n,l,o)=>{var a,i,r,s;const u=Ve(Qe(null==(a=e.base_data)?void 0:a.tags),null==o?void 0:o.tags),d=[],c=((e,t,n)=>{const l=Object.assign({},t,{borderRadius:0});return st(e,{},{},l,n)})(e,l,o);d.push(c);const _=(null!=(i=c.width)?i:0)/2-b.SIZES.BORDER_WIDTH/2;d.push(((e,t,n,l)=>{var o,a,i,r,s,u,d,c,_,p,h,g,O,v,m,f,S,T,y,R,C,D;const I=[],x=b.SIZES.BORDER_WIDTH,w=E.SIZES.TOP_BOX_HEIGHT,L=new V.fabric.Rect({fill:null!=(o=null==l?void 0:l.bg_color)?o:n.bgColor,strokeWidth:0,left:(null!=(a=e.left)?a:0)+b.SIZES.BORDER_WIDTH,top:(null!=(i=e.top)?i:0)-w+x,width:(null!=(r=e.width)?r:0)-2*b.SIZES.BORDER_WIDTH,height:w});return I.push(L),I.push(new V.fabric.Line([null!=(s=e.left)?s:0,null!=(u=e.top)?u:0,null!=(d=e.left)?d:0,null!=(c=L.top)?c:0],{strokeWidth:b.SIZES.BORDER_WIDTH,stroke:null!=(_=null==l?void 0:l.border_color)?_:n.borderColor,originX:"left",originY:"top"})),I.push(new V.fabric.Line([(null!=(p=e.left)?p:0)+(null!=(h=e.width)?h:0)-b.SIZES.BORDER_WIDTH,null!=(g=e.top)?g:0,(null!=(O=e.left)?O:0)+(null!=(v=e.width)?v:0)-b.SIZES.BORDER_WIDTH,null!=(m=L.top)?m:0],{strokeWidth:b.SIZES.BORDER_WIDTH,stroke:null!=(f=null==l?void 0:l.border_color)?f:n.borderColor,originX:"left",originY:"top"})),I.push(new V.fabric.Circle({fill:null!=(S=null==l?void 0:l.bg_color)?S:n.bgColor,stroke:null!=(T=null==l?void 0:l.border_color)?T:n.borderColor,strokeWidth:b.SIZES.BORDER_WIDTH,radius:t,top:(null!=(y=L.top)?y:0)-(null!=(R=e.width)?R:0)*E.SIZES.SCALE_X_TOP_BOTTOM/2,left:(null!=(C=L.left)?C:0)+ +(null!=(D=e.width)?D:0)-x,angle:90,startAngle:0,endAngle:360,scaleX:E.SIZES.SCALE_X_TOP_BOTTOM})),new V.fabric.Group(I)})(c,_,l,u)),d.push(((e,t,n,l)=>{var o,a,i,r,s,u;return new V.fabric.Circle({fill:null!=(o=null==l?void 0:l.bg_color)?o:n.bgColor,stroke:null!=(a=null==l?void 0:l.border_color)?a:n.borderColor,strokeWidth:b.SIZES.BORDER_WIDTH,radius:t,top:(null!=(i=e.top)?i:0)+(null!=(r=e.height)?r:0)-2*t*E.SIZES.SCALE_X_TOP_BOTTOM/2-b.SIZES.BORDER_WIDTH,left:(null!=(s=e.left)?s:0)+(null!=(u=e.width)?u:0),angle:90,startAngle:270,endAngle:90,scaleX:E.SIZES.SCALE_X_TOP_BOTTOM})})(c,_,l,u));const p={alias:null==(r=e.base_data)?void 0:r.alias,position:we(null==(s=e.base_data)?void 0:s.alias,n)};return new Oe(e,t,p,n,d)},dt=(e,t,n,l,o)=>{var a,i,r,s;const u=Ve(Qe(null==(a=e.base_data)?void 0:a.tags),null==o?void 0:o.tags),d=[],c=ct(e,l,o);d.push(c);const _=(null!=(i=c.height)?i:0)/2-b.SIZES.BORDER_WIDTH/2;d.push(_t(c,_,l,u)),d.push(pt(c,_,l,u));const p={alias:null==(r=e.base_data)?void 0:r.alias,position:we(null==(s=e.base_data)?void 0:s.alias,n)};return new Oe(e,t,p,n,d)},ct=(e,t,n)=>{const l=Object.assign({},t,{borderRadius:0});return st(e,{},{},l,n)},_t=(e,t,n,l)=>{var o,a,i;return new V.fabric.Circle({fill:null!=(o=null==l?void 0:l.bg_color)?o:n.bgColor,stroke:null!=(a=null==l?void 0:l.border_color)?a:n.borderColor,strokeWidth:b.SIZES.BORDER_WIDTH,radius:t,top:e.top,left:(null!=(i=e.left)?i:0)+2*t*S.SIZES.SCALE_Y_TAIL_HEAD/2+2*b.SIZES.BORDER_WIDTH,angle:90,startAngle:0,endAngle:180,scaleY:S.SIZES.SCALE_Y_TAIL_HEAD})},pt=(e,t,n,l)=>{var o,a,i,r,s,u,d,c,_,p,h,g,O,v,m,f,E,T,y,R,C,D,I,x;const w=[],L=b.SIZES.BORDER_WIDTH,A=new V.fabric.Rect({fill:null!=(o=null==l?void 0:l.bg_color)?o:n.bgColor,strokeWidth:0,left:(null!=(a=e.left)?a:0)+(null!=(i=e.width)?i:0)-L,top:(null!=(r=e.top)?r:0)+b.SIZES.BORDER_WIDTH,width:S.SIZES.HEAD_BOX_WIDTH,height:(null!=(s=e.height)?s:0)-2*b.SIZES.BORDER_WIDTH});return w.push(A),w.push(new V.fabric.Line([null!=(u=A.left)?u:0,null!=(d=e.top)?d:0,(null!=(c=A.left)?c:0)+(null!=(_=A.width)?_:0),null!=(p=e.top)?p:0],{strokeWidth:b.SIZES.BORDER_WIDTH,stroke:null!=(h=null==l?void 0:l.border_color)?h:n.borderColor,originX:"left",originY:"top"})),w.push(new V.fabric.Line([null!=(g=A.left)?g:0,(null!=(O=A.top)?O:0)+(null!=(v=A.height)?v:0),(null!=(m=A.left)?m:0)+(null!=(f=A.width)?f:0),(null!=(E=A.top)?E:0)+(null!=(T=A.height)?T:0)],{strokeWidth:b.SIZES.BORDER_WIDTH,stroke:null!=(y=null==l?void 0:l.border_color)?y:n.borderColor,originX:"left",originY:"top"})),w.push(new V.fabric.Circle({fill:null!=(R=null==l?void 0:l.bg_color)?R:n.bgColor,stroke:null!=(C=null==l?void 0:l.border_color)?C:n.borderColor,strokeWidth:b.SIZES.BORDER_WIDTH,radius:t,top:e.top,left:(null!=(D=A.left)?D:0)+(null!=(I=A.width)?I:0)+(null!=(x=e.height)?x:0)*S.SIZES.SCALE_Y_TAIL_HEAD/2-L,angle:90,startAngle:0,endAngle:360,scaleY:S.SIZES.SCALE_Y_TAIL_HEAD})),new V.fabric.Group(w)},ht=dt,gt=(e,t,n,l,o)=>{if(t.base_data&&t.base_data.alias&&t.component_type&&(n.auto_layout_enabled&&l[t.base_data.alias]||!n.auto_layout_enabled)){let a;switch(t.component_type){case"Component":case"ComponentDb":case"ComponentQueue":a=((e,t,n,l,o)=>{var a,i,r,s,u,d;const c={bgColor:null!=(a=null==o||null==(i=o.diagramsThemeSettings)?void 0:i.bg_color_component)?a:f.COLORS.BG_COLOR_COMPONENT,borderColor:null!=(r=null==o||null==(s=o.diagramsThemeSettings)?void 0:s.border_color_component)?r:f.COLORS.BORDER_COLOR_COMPONENT,textColor:null!=(u=null==o||null==(d=o.diagramsThemeSettings)?void 0:d.text_color_component)?u:f.COLORS.TEXT_COLOR_COMPONENT},_=Object.assign({},c,l);if(e.component_type)switch(e.component_type){case"Component":return st(e,t,n,_,o);case"ComponentDb":return ut(e,t,n,_,o);case"ComponentQueue":return ht(e,t,n,_,o)}})(t,fe(t.base_data.alias,void 0,void 0,{Component:t.component_type},n),l,void 0,o);break;case"Component_Ext":case"ComponentDb_Ext":case"ComponentQueue_Ext":a=((e,t,n,l,o)=>{var a,i,r,s,u,d;const c={bgColor:null!=(a=null==o||null==(i=o.diagramsThemeSettings)?void 0:i.bg_color_component_ext)?a:f.COLORS.BG_COLOR_COMPONENT_EXT,borderColor:null!=(r=null==o||null==(s=o.diagramsThemeSettings)?void 0:s.border_color_component_ext)?r:f.COLORS.BORDER_COLOR_COMPONENT_EXT,textColor:null!=(u=null==o||null==(d=o.diagramsThemeSettings)?void 0:d.text_color_component_ext)?u:f.COLORS.TEXT_COLOR_COMPONENT_EXT},_=Object.assign({},c,l);if(e.component_type)switch(e.component_type){case"Component_Ext":return st(e,t,n,_,o);case"ComponentDb_Ext":return ut(e,t,n,_,o);case"ComponentQueue_Ext":return ht(e,t,n,_,o)}})(t,fe(t.base_data.alias,void 0,void 0,{Component:t.component_type},n),l,void 0,o)}return o&&o.skipAddToCanvas||!a||null==e||e.add(a),a}},Ot=(e,t,n,l,o)=>{if(t.base_data&&t.base_data.alias&&t.container_type&&(n.auto_layout_enabled&&l[t.base_data.alias]||!n.auto_layout_enabled)){let a;switch(t.container_type){case"Container":case"ContainerDb":case"ContainerQueue":a=((e,t,n,l,o)=>{var a,i,r,s,u,d;const c={bgColor:null!=(a=null==o||null==(i=o.diagramsThemeSettings)?void 0:i.bg_color_container)?a:f.COLORS.BG_COLOR_CONTAINER,borderColor:null!=(r=null==o||null==(s=o.diagramsThemeSettings)?void 0:s.border_color_container)?r:f.COLORS.BORDER_COLOR_CONTAINER,textColor:null!=(u=null==o||null==(d=o.diagramsThemeSettings)?void 0:d.text_color_container)?u:f.COLORS.TEXT_COLOR_CONTAINER},_=Object.assign({},c,l);if(e.container_type)switch(e.container_type){case"Container":return st(e,t,n,_,o);case"ContainerDb":return ut(e,t,n,_,o);case"ContainerQueue":return dt(e,t,n,_,o)}})(t,fe(t.base_data.alias,void 0,void 0,{Container:t.container_type},n),l,void 0,o);break;case"Container_Ext":case"ContainerDb_Ext":case"ContainerQueue_Ext":a=((e,t,n,l,o)=>{var a,i,r,s,u,d;const c={bgColor:null!=(a=null==o||null==(i=o.diagramsThemeSettings)?void 0:i.bg_color_container_ext)?a:f.COLORS.BG_COLOR_CONTAINER_EXT,borderColor:null!=(r=null==o||null==(s=o.diagramsThemeSettings)?void 0:s.border_color_container_ext)?r:f.COLORS.BORDER_COLOR_CONTAINER_EXT,textColor:null!=(u=null==o||null==(d=o.diagramsThemeSettings)?void 0:d.text_color_container_ext)?u:f.COLORS.TEXT_COLOR_CONTAINER_EXT},_=Object.assign({},c,l);if(e.container_type)switch(e.container_type){case"Container_Ext":return st(e,t,n,_,o);case"ContainerDb_Ext":return ut(e,t,n,_,o);case"ContainerQueue_Ext":return ht(e,t,n,_,o)}})(t,fe(t.base_data.alias,void 0,void 0,{Container:t.container_type},n),l,void 0,o)}return o&&o.skipAddToCanvas||!a||null==e||e.add(a),a}},vt=(e,t,n,l,o)=>{if(t.base_data&&t.base_data.alias&&t.base_data.label&&t.deployment_node_type&&(n.auto_layout_enabled&&l[t.base_data.alias]||!n.auto_layout_enabled)){var a;const i=((e,t,n,l,o,a)=>{var i,r,s,u,d,c;const _={bgColor:null!=(i=null==a||null==(r=a.diagramsThemeSettings)?void 0:r.bg_color_deployment_node)?i:f.COLORS.BG_COLOR_DEPLOYMENT_NODE,borderColor:null!=(s=null==a||null==(u=a.diagramsThemeSettings)?void 0:u.border_color_deployment_node)?s:f.COLORS.BORDER_COLOR_DEPLOYMENT_NODE,textColor:null!=(d=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_deployment_node)?d:f.COLORS.TEXT_COLOR_DEPLOYMENT_NODE},p=Object.assign({},_,o);return it(e,t,n,l,p,a)})(t,fe(t.base_data.alias,void 0,void 0,{DeploymentNode:t.deployment_node_type},n),n,l,void 0,o);return o&&o.skipAddToCanvas||!i||null==e||e.add(i,...ue(null!=(a=i.children)?a:[])),i}},mt=(e,t,n,l,o)=>{var a,i;const r=[],s=((e,t,n)=>{const l=Object.assign({},t,{borderRadius:P});return st(e,{},{},l,n)})(e,l,o);r.push(s);const u=((e,t)=>{var n,l,o,a,i;const r=new V.fabric.Circle({radius:B,top:t.top,left:t.left,fill:e.bgColor,stroke:e.borderColor,strokeWidth:b.SIZES.BORDER_WIDTH});return r.left=(null!=(n=r.left)?n:0)+(null!=(l=t.getScaledWidth())?l:0)/2-(null!=(o=r.getScaledWidth())?o:0)/2,r.top=(null!=(a=r.top)?a:0)-(null!=(i=r.getScaledWidth())?i:0)+5,r})(l,s);r.push(u);const d={alias:null==(a=e.base_data)?void 0:a.alias,position:we(null==(i=e.base_data)?void 0:i.alias,n)};return new Oe(e,t,d,n,r)},bt=(e,t,n,l,o)=>{if(t.base_data&&t.base_data.alias&&t.person_type&&(n.auto_layout_enabled&&l[t.base_data.alias]||!n.auto_layout_enabled)){let a;switch(t.person_type){case"Person":a=((e,t,n,l,o)=>{var a,i,r,s,u,d;const c={bgColor:null!=(a=null==o||null==(i=o.diagramsThemeSettings)?void 0:i.bg_color_person)?a:f.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,borderColor:null!=(r=null==o||null==(s=o.diagramsThemeSettings)?void 0:s.border_color_person)?r:f.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON,textColor:null!=(u=null==o||null==(d=o.diagramsThemeSettings)?void 0:d.text_color_person)?u:f.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON},_=Object.assign({},c,l);return mt(e,t,n,_,o)})(t,fe(t.base_data.alias,void 0,void 0,{Person:t.person_type},n),l,void 0,o);break;case"Person_Ext":a=((e,t,n,l,o)=>{var a,i,r,s,u,d;const c={bgColor:null!=(a=null==o||null==(i=o.diagramsThemeSettings)?void 0:i.bg_color_person_ext)?a:f.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,borderColor:null!=(r=null==o||null==(s=o.diagramsThemeSettings)?void 0:s.border_color_person_ext)?r:f.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,textColor:null!=(u=null==o||null==(d=o.diagramsThemeSettings)?void 0:d.text_color_person_ext)?u:f.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT},_=Object.assign({},c,l);return mt(e,t,n,_,o)})(t,fe(t.base_data.alias,void 0,void 0,{Person:t.person_type},n),l,void 0,o)}return o&&o.skipAddToCanvas||!a||null==e||e.add(a),a}};let ft=function(e){return e.Dot="DOT",e.Line="LINE",e.Text="TEXT",e.Triangle="TRIANGLE",e.Rectangle="RECTANGLE",e}({});class St extends Oe{getUpdatedSpecs(){const e=super.getUpdatedSpecs();var t,n;return e&&(null==(t=this.canvas)||t.discardActiveObject(),delete e.position,delete e.size,e.shapes=[],null==(n=this.children)||n.forEach((t=>{const n=V.fabric.util.object.clone(t);if(n.name===ft.Line||n.name===ft.Rectangle)e.shapes.push({position:{z_index:re(n.canvas,n)},shape_type:n.name});else{var l,o;let t=0,a=0;const i=n.angle;if(n.name===ft.Text)t=n.getCenterPoint().x,a=n.getCenterPoint().y;else if(n.name===ft.Dot||n.name===ft.Triangle){n.name===ft.Triangle&&n.rotate(N);const e=Ct(this.canvas,n.left,n.top,n.name===ft.Triangle,i,n.scaleX,n.scaleY,!0);t=e.left,a=e.top}const r={position:{left:t,top:a,z_index:re(n.canvas,n)},size:{scale_x:null!=(l=n.scaleX)?l:1,scale_y:null!=(o=n.scaleY)?o:1},shape_type:n.name};n.name===ft.Triangle&&(r.position.angle=i),e.shapes.push(r)}}))),e}}const Et=e=>{var t;e.children=null==(t=e.children)?void 0:t.sort(((e,t)=>e.name===ft.Rectangle||e.name===ft.Line&&t.name!==ft.Rectangle?-1:t.name===ft.Rectangle||e.name!==ft.Rectangle&&t.name===ft.Line?1:e.name===t.name?0:1))},Tt=e=>{const t=e.parent;let n,l=1;const o=e.canvas;if(t&&o){const r=[],s=[];if(t.children){var a,i;t.children.forEach((e=>{if(e.name===ft.Triangle&&(n=e),e.name===ft.Dot||e.name===ft.Triangle){var t;s.push(e),l=null!=(t=e.scaleX)?t:1;const n=e.getPointByOrigin("center","center"),o=new pe(n.x,n.y,e.name);r.push(o)}}));const u=t.children.findIndex((e=>e.name===ft.Line));void 0!==u&&u>-1&&t.children.splice(u,1);const d=re(o,e),c=null==(a=e.data)?void 0:a.rawDiagramElementSpec,_=e.stroke,p=e.strokeDashArray,h=null==(i=e.data)?void 0:i.otherData.selectedRelColor;o.remove(e);const g=wt(c,r,t,l,_,h,void 0,p);o.add(g),d&&g.moveTo(d),n&&Rt(r,n)}}},yt=e=>{const t=e.findIndex((e=>e.customType===ft.Triangle)),n=e[t],l=e[t>0?t-1:t+1];return 180*Math.atan2(n.y-l.y,n.x-l.x)/Math.PI+90},Rt=(e,t)=>{let n;e&&(n=yt(e),t.rotate(n))},Ct=(e,t,n,l,o=N,a=1,i=1,r)=>{var s;const u=null!=(s=null==e?void 0:e.getZoom())?s:1,d=de(e);let c=t,_=n;if(l){const e=L*a/2+A*a/2,t=L*i/2+A*i/2;r?(c-=e,_+=t):(c+=e,_-=t)}else{const e=w*a*2+A*a/2,t=w*i+A*i/2;r?(c+=e,_+=t):(c-=e,_-=t)}return r||(c=(c-d.panX)/u,_=(_-d.panY)/u),{left:c,top:_,angle:o}},Dt=(e,t)=>{let n=[];if(null!=e&&e.shapes)null==e||e.shapes.forEach((e=>{var t,l;if((e.shape_type===ft.Dot||e.shape_type===ft.Triangle)&&void 0!==(null==(t=e.position)?void 0:t.left)&&void 0!==(null==(l=e.position)?void 0:l.top)){const t=new pe(e.position.left,e.position.top,e.shape_type);t.data={rawDiagramElementSpec:e},n.push(t)}}));else{var l,o;let a;null!=e&&e.alias&&null!=(l=t[e.alias])&&l.start&&null!=(o=t[e.alias])&&o.end?(a=[],a.push(new pe(t[e.alias].start.x,t[e.alias].start.y,ft.Dot)),t[e.alias].path&&t[e.alias].path.forEach((e=>{a.push(new pe(e.x,e.y,ft.Dot))})),a.push(new pe(t[e.alias].end.x,t[e.alias].end.y,ft.Triangle))):a=[new pe(b.SIZES.DEFAULT_LEFT,b.SIZES.DEFAULT_TOP,ft.Dot),new pe(100+b.SIZES.DEFAULT_LEFT,b.SIZES.DEFAULT_TOP,ft.Triangle)],n=n.concat(a)}return n},It=(e,t,n,l,o,a)=>{const i=[],r=void 0!==(null==e?void 0:e.alias)&&void 0!==t[e.alias];for(let e=0;e<n.length;e++){var s,u,d,c;i.push(xt(void 0,n[e],n[e].customType===ft.Triangle?null!=(s=null==(u=n[e].data)||null==(u=u.rawDiagramElementSpec)||null==(u=u.position)?void 0:u.angle)?s:yt(n):void 0,n[e].customType===ft.Triangle,l,!0,null==(d=n[e].data)||null==(d=d.rawDiagramElementSpec)||null==(d=d.size)?void 0:d.scale_x,null==(c=n[e].data)||null==(c=c.rawDiagramElementSpec)||null==(c=c.size)?void 0:c.scale_y,o,a,r))}return i},xt=(e,t,n,l,o,a=!0,i=1,r=1,s,u,d)=>{var c;s=null!=(c=s)?c:y;const{left:_,top:p,angle:h}=Ct(e,t.x,t.y,l,n,i,r,!1);if(l){var g,O;const e=new V.fabric.Triangle({left:_,top:p,width:L,height:L,fill:s,scaleX:i,scaleY:r,hasControls:!1,name:ft.Triangle,angle:N});return e.rotate(h),e.data={rawDiagramElementSpec:null==(g=t.data)?void 0:g.rawDiagramElementSpec,otherData:{selectedRelColor:null!=u?u:C}},e.parent=o,a&&(null==(O=o.children)||O.push(e)),kt(e,s),e}{var v,m;const e=new V.fabric.Circle({left:_,top:p,radius:w,fill:s,opacity:.2,scaleX:i,scaleY:r,hasControls:!1,name:ft.Dot,visible:!d,selectable:!d,hasBorders:!d});return e.data={rawDiagramElementSpec:null==(v=t.data)?void 0:v.rawDiagramElementSpec,otherData:{selectedRelColor:null!=u?u:C}},e.parent=o,a&&(null==(m=o.children)||m.push(e)),kt(e,s),e}},wt=(e,t,n,l=1,o,a,i,r)=>{var s,u,d;const c=null==e||null==(s=e.shapes)?void 0:s.filter((e=>e.shape_type===ft.Line))[0];let _;return _=i&&null!=e&&e.alias&&null!=(u=i[e.alias])&&u.svg_path?new V.fabric.Path(i[e.alias].svg_path,{stroke:null!=o?o:y,strokeDashArray:r,fill:"",strokeWidth:A*l,scaleX:1,scaleY:1,name:ft.Line,perPixelTargetFind:!0,hasBorders:!1}):new V.fabric.Polyline(t,{stroke:null!=o?o:y,strokeDashArray:r,fill:"",strokeWidth:A*l,scaleX:1,scaleY:1,name:ft.Line,perPixelTargetFind:!0,hasBorders:!1}),_.data={rawDiagramElementSpec:c,otherData:{selectedRelColor:null!=a?a:C}},_.parent=n,At(_,_.stroke,_.strokeWidth),null==(d=n.children)||d.push(_),_},Lt=(e,t,n,l,o,a,i,r)=>{var s,u,d,c,_,p,h;let g,O=1,v=1;var m,f,S,E;null!=t&&t.shapes&&(g=t.shapes.filter((e=>e.shape_type===ft.Text))[0],g&&(O=null!=(m=null==(f=g.size)?void 0:f.scale_x)?m:1,v=null!=(S=null==(E=g.size)?void 0:E.scale_y)?S:1));const y=[],C={fontFamily:b.FONT.FAMILY,fill:null!=(s=null!=(u=null==r?void 0:r.font_color)?u:null==i||null==(d=i.diagramsThemeSettings)?void 0:d.text_color_relationship)?s:R};if(null!=(c=e.base_data)&&c.label){var w,L,A,k,N;const t=new V.fabric.Text($(e.base_data.label),Object.assign({},C,{fontSize:D,fontWeight:"bold",textAlign:"center"}));t.top=e.technology?-(null!=(w=t.height)?w:0):-(null!=(L=t.height)?L:0)/2,t.left=(null!=(A=l.width)?A:0)/2-(null!=(k=t.width)?k:0)/2-(null!=(N=o[0].width)?N:0)/2,y.push(t)}if(e.technology){var P,B,F;const t=new V.fabric.Text(`[${e.technology}]`,Object.assign({},C,{fontSize:I,textAlign:"center"}));t.left=(null!=(P=l.width)?P:0)/2-(null!=(B=t.width)?B:0)/2-(null!=(F=o[0].width)?F:0)/2,y.push(t)}const M=new V.fabric.Group(y),X=M.getBoundingRect(),Z=new V.fabric.Rect({top:X.top-x,left:X.left-x,width:X.width+2*x,height:X.height+2*x,fill:null!=(_=null==i||null==(p=i.diagramsThemeSettings)?void 0:p.bg_color_relationship)?_:T});let Y,W;var H,j,G,z,U,q,Q,J;null!=t&&t.alias&&n[t.alias]&&n[t.alias].label_position?(Y=n[t.alias].label_position.x-(null!=(H=Z.width)?H:0)/2,W=n[t.alias].label_position.y-(null!=(j=Z.height)?j:0)/2):(Y=(null!=(G=l.left)?G:0)+(null!=(z=l.width)?z:0)/2-(null!=(U=Z.width)?U:0)/2,W=(null!=(q=l.top)?q:0)+(null!=(Q=l.height)?Q:0)/2-(null!=(J=Z.height)?J:0)/2);const K=new V.fabric.Group([Z,M],{name:ft.Text,hasControls:!1,left:Y,top:W,scaleX:O,scaleY:v});var ee,te;return K.data={rawDiagramElementSpec:g},K.parent=a,null==(h=a.children)||h.push(K),g&&void 0!==(null==(ee=g.position)?void 0:ee.left)&&void 0!==(null==(te=g.position)?void 0:te.top)&&K.setPositionByOrigin(new V.fabric.Point(g.position.left,g.position.top),"center","center"),K},At=(e,t,n)=>{const l=e.parent;e.on(s,(t=>{var n,l,o;e.stroke=null==(n=e.data)||null==(n=n.otherData)?void 0:n.selectedRelColor,e.strokeWidth=(null!=(l=e.strokeWidth)?l:0)+k,e.dirty=!0,null==(o=e.canvas)||o.renderAll(),((e,t)=>{var n;if(e.e&&null!=(n=t.parent)&&n.children){var l;const e=ce(t);if(!_e(null==(l=t.canvas)?void 0:l.getActiveObjects(),e.objects)){var o,a,s;null==(o=t.canvas)||o.discardActiveObject();const n=t.parent;let l;"multiple"===e.type?l=new V.fabric.ActiveSelection(e.objects,{canvas:t.canvas}):(l=new he(e.objects,{canvas:t.canvas}),l.parent=t.parent,l.on(i,(e=>{Bt(l.canvas,e,l,n)})),l.on(r,(e=>{var l;null==(l=t.canvas)||l.discardActiveObject(),n.fire(r)}))),l.hasBorders=!1,null==(a=t.canvas)||a.setActiveObject(l),null==(s=t.canvas)||s.requestRenderAll()}}})(t,e)})),e.on(u,(l=>{var o;e.stroke=t,e.strokeWidth=n,e.dirty=!0,null==(o=e.canvas)||o.renderAll()})),e.on(i,(t=>{Bt(e.canvas,t,e,l)}))},kt=(e,t)=>{const n=e.parent;e.on("moving",(e=>{Nt(e)})),e.on(i,(t=>{Bt(e.canvas,t,e,n)})),e.on(s,(t=>{var n,l;e.fill=null==(n=e.data)||null==(n=n.otherData)?void 0:n.selectedRelColor,e.dirty=!0,null==(l=e.canvas)||l.renderAll()})),e.on(u,(n=>{var l;e.fill=t,e.dirty=!0,null==(l=e.canvas)||l.renderAll()}))},Nt=e=>{var t;if(null!=(t=e.transform)&&t.target){const t=e.transform.target.parent;if(t){var n;const e=null==(n=t.children)?void 0:n.filter((e=>e.name===ft.Line))[0];e&&Tt(e)}}},Pt=(e,t,n)=>{if(n instanceof V.fabric.ActiveSelection){const l=[];return e.isReadOnly()?e.codingFeaturesEnabled&&l.push(...ve(e,t,n,!1)):l.push({isHeaderMenuItem:!1,id:"addPoint",label:"Add point",onClick:()=>{((e,t)=>{const n=e.canvas;if(t.pointer&&n){const o=e.getObjects().filter((e=>e.name===ft.Line))[0],a=e.getObjects().filter((e=>e.name===ft.Dot))[0];n.discardActiveObject();const i=o.parent;if(i){var l;const e=new pe(t.pointer.x,t.pointer.y,ft.Dot),r=xt(n,e,void 0,!1,i,!1,a.scaleX,a.scaleY,o.stroke,null==(l=a.data)?void 0:l.otherData.selectedRelColor,!1);((e,t)=>{const n=e.parent;if(n){var l;let o,a;const i=[];null==(l=n.children)||l.forEach((e=>{e.name===ft.Text?o=e:e.name===ft.Rectangle?a=e:e.name!==ft.Dot&&e.name!==ft.Triangle||i.push(e)})),i.push(t),i.sort(((e,t)=>e.getCenterPoint().x-t.getCenterPoint().x)),n.children=i,n.children.push(e),o&&n.children.push(o),a&&n.children.push(a)}})(o,r),n.add(r),Tt(o)}}})(n,t)}},{id:"separatorRel",isSepator:!0},...ve(e,t,n,!1)),[{isHeaderMenuItem:!0,id:"relationshipContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:l}]}return n.name!==ft.Dot||e.isReadOnly()?[]:[{isHeaderMenuItem:!0,id:"dotContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:[{isHeaderMenuItem:!1,id:"removePoint",label:"Remove point",onClick:()=>{(e=>{const t=e.parent;if(t&&e.canvas){var n;const i=null==(n=t.children)?void 0:n.filter((e=>e.name===ft.Dot||e.name===ft.Triangle));if(void 0!==i&&i.length>2){var l,o;const n=null==(l=t.children)?void 0:l.filter((e=>e.name===ft.Line))[0],i=null==(o=t.children)?void 0:o.findIndex((t=>t.getCenterPoint().eq(e.getCenterPoint())));var a;void 0!==i&&i>-1&&(null==(a=t.children)||a.splice(i,1)),e.canvas.remove(e),Tt(n)}}})(n)}}]}]},Bt=(e,t,n,l)=>{n.name!==ft.Line&&n.name!==ft.Rectangle&&e&&l.onComponentMouseUp(e,t,n,Pt(e,t,n))},Ft=(e,t,n,l,o)=>{if(t.base_data&&t.base_data.alias&&t.relationship_type&&(n.auto_layout_enabled&&l[t.base_data.alias]||!n.auto_layout_enabled)){var a;const i=((e,t,n,l)=>{var o,a,i,r,s,u,d,c,_,p,h,g;const O=Ve(Qe(null==(o=e.base_data)?void 0:o.tags),null==l?void 0:l.tags),v={alias:null==(a=e.base_data)?void 0:a.alias};let m=1;const b=null==(i=t.shapes)?void 0:i.filter((e=>e.shape_type===ft.Dot));b&&b.length>0&&(m=null!=(r=null==(s=b[0].size)?void 0:s.scale_x)?r:1);const f=new St(e,t,v,n,[],{visible:!1,selectable:!1},void 0,void 0,!0),S=Dt(t,n),E=It(t,n,S,f,null!=(u=null==O?void 0:O.border_color)?u:null==l||null==(d=l.diagramsThemeSettings)?void 0:d.line_color_relationship,null==l||null==(c=l.diagramsThemeSettings)?void 0:c.selected_color_relationship),T=E.map((e=>new pe(e.getCenterPoint().x,e.getCenterPoint().y,e.name))),y=wt(t,T,f,m,null!=(_=null==O?void 0:O.border_color)?_:null==l||null==(p=l.diagramsThemeSettings)?void 0:p.line_color_relationship,null==l||null==(h=l.diagramsThemeSettings)?void 0:h.selected_color_relationship,n,null==(g=He(null==O?void 0:O.border_style))?void 0:g.value);return Lt(e,t,n,y,E,f,l,O),Et(f),f})(t,fe(t.base_data.alias,t.from,t.to,{Relationship:t.relationship_type},n),l,o);return o&&o.skipAddToCanvas||!i||null==e||e.add(i,...null!=(a=i.children)?a:[]),i}},Mt=(e,t,n,l,o)=>{if(t.base_data&&t.base_data.alias&&t.system_type&&(n.auto_layout_enabled&&l[t.base_data.alias]||!n.auto_layout_enabled)){let a;switch(t.system_type){case"System":case"SystemDb":case"SystemQueue":a=((e,t,n,l,o)=>{var a,i,r,s,u,d;const c={bgColor:null!=(a=null==o||null==(i=o.diagramsThemeSettings)?void 0:i.bg_color_software_system)?a:f.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,borderColor:null!=(r=null==o||null==(s=o.diagramsThemeSettings)?void 0:s.border_color_software_system)?r:f.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON,textColor:null!=(u=null==o||null==(d=o.diagramsThemeSettings)?void 0:d.text_color_software_system)?u:f.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON},_=Object.assign({},c,l);if(e.system_type)switch(e.system_type){case"System":return st(e,t,n,_,o);case"SystemDb":return ut(e,t,n,_,o);case"SystemQueue":return ht(e,t,n,_,o)}})(t,fe(t.base_data.alias,void 0,void 0,{SoftwareSystem:t.system_type},n),l,void 0,o);break;case"System_Ext":case"SystemDb_Ext":case"SystemQueue_Ext":a=((e,t,n,l,o)=>{var a,i,r,s,u,d;const c={bgColor:null!=(a=null==o||null==(i=o.diagramsThemeSettings)?void 0:i.bg_color_software_system_ext)?a:f.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,borderColor:null!=(r=null==o||null==(s=o.diagramsThemeSettings)?void 0:s.border_color_software_system_ext)?r:f.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,textColor:null!=(u=null==o||null==(d=o.diagramsThemeSettings)?void 0:d.text_color_software_system_ext)?u:f.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT},_=Object.assign({},c,l);if(e.system_type)switch(e.system_type){case"System_Ext":return st(e,t,n,_,o);case"SystemDb_Ext":return ut(e,t,n,_,o);case"SystemQueue_Ext":return ht(e,t,n,_,o)}})(t,fe(t.base_data.alias,void 0,void 0,{SoftwareSystem:t.system_type},n),l,void 0,o)}return o&&o.skipAddToCanvas||!a||null==e||e.add(a),a}};class Xt{constructor(){this.graphviz=void 0}async initialize(){return this.graphviz=await Ye.Graphviz.load(),this}renderDiagram(e,t,n,l){if(e&&n){var o,a,i,r,s,u,c,_;if(e.diagramListener=t,e.autoLayoutEnabled=null==(o=n.diagram_spec)?void 0:o.auto_layout_enabled,e.autoLayoutOrientation=null==(a=n.diagram_spec)?void 0:a.auto_layout_orientation,e.backgroundColor=null!=(i=null==l?void 0:l.bg_color_diagram)?i:d,null!=(r=n.diagram_spec)&&r.auto_layout_enabled)if(this.graphviz){const e=function(e,t){var n,l;const o={},a=[];if(null!=(n=t.diagram_spec)&&n.auto_layout_enabled&&t.diagram_spec.auto_layout_orientation&&null!=(l=t.diagram_plantuml)&&l.elements){console.time("autoLayoutGeneration");const n=t.diagram_plantuml.elements,l=t.diagram_spec.auto_layout_orientation,s=t.diagram_spec.auto_layout_ranksep,u=t.diagram_spec.auto_layout_subgraph_inner_margin,d=t.diagram_spec.auto_layout_subgraph_outer_margin,c=t.diagram_spec.auto_layout_only_straight_arrows,_=(e=>{for(const t of e)if(Te(t)||Ce(t))return!0;return!1})(n),p=function(e){let t=Pe,n=Be;return e&&(t-=.1,n-=.1),{x:Number.parseFloat(t.toFixed(2)),y:Number.parseFloat(n.toFixed(2))}}(_),h=function(e,t,n,l,o,a,i){const r=new Set;return`\n digraph G {\n pad = "${i.x},${i.y}"\n dpi = ${Ne.toFixed(1)}\n penwidth="1"\n rankdir = ${"LeftToRight"===t?"LR":"TB"}\n nodesep=0\n ranksep=${n}\n compound=true\n bgcolor="red"\n ${a?"splines=ortho":""}\n node [shape="rect", fixedsize=true, penwidth="1"]\n ${Ze(e,r,l,o)}\n }\n `}(n,l,s,u,d,c,p);try{var i,r;const t=e.dot(h,"json"),n=JSON.parse(t),l=function(e){const t=e.split(",");return Number.parseFloat(t[3])}(n.bb);null==(i=n.objects)||i.forEach((e=>{if(!function(e){return e.width&&0===Number.parseInt(e.width)&&e.height&&0===Number.parseInt(e.height)&&e.peripheries&&0===Number.parseInt(e.peripheries)&&""===e.label}(e)&&!function(e){return e.name.endsWith(Ae)}(e)&&e._draw_){const t=e._draw_.filter((e=>"p"===e.op||"P"===e.op))[0],n=ke(p,l,t.points[0]),a=ke(p,l,t.points[1]),i=ke(p,l,t.points[2]),r=a[0],s=a[1];let u;4===t.points.length&&(u={x:i[0]-a[0],y:n[1]-a[1]}),o[e.name]={position:{x:r,y:s},size:u}}})),null==(r=n.edges)||r.forEach((e=>{const t={path:[]};if(e._draw_?e._draw_.filter((e=>"b"===e.op))[0].points.forEach(((e,n)=>{var o;const a=ke(p,l,e),i=a[0],r=a[1];0===n?t.start={x:i,y:r}:null==(o=t.path)||o.push({x:i,y:r})})):a.push(qe),e._hdraw_){const n=e._hdraw_.filter((e=>"P"===e.op))[0].points,o=ke(p,l,n[1]);t.end={x:o[0],y:o[1]}}if(e._ldraw_){var n;const o=null==(n=e._ldraw_)?void 0:n.filter((e=>"T"===e.op))[0].pt;if(o){const e=ke(p,l,o);t.label_position={x:e[0],y:e[1]}}}if(t.start&&t.end){const n=t.path&&t.path.length>2?t.path[1]:t.end,o=t.path&&t.path.length>2?t.path[t.path.length-2]:t.start;"false"===e.keadex_fromissubgraph&&n.x&&n.y&&(t.start.x<n.x?t.start.x-=Fe:t.start.x>n.x&&(t.start.x+=Fe),t.start.y<n.y?t.start.y-=Fe:t.start.y>n.y&&(t.start.y+=Fe)),"false"===e.keadex_toissubgraph&&o.x&&o.y&&(t.end.x<o.x?t.end.x-=Fe:t.end.x>o.x&&(t.end.x+=Fe),t.end.y<o.y?t.end.y-=Fe:t.end.y>o.y&&(t.end.y+=Fe)),t.svg_path=function(e,t,n,l,o){const a=e.split(" ").slice(1).map((e=>e.split(",").map(Number)));let i=`M ${n.x} ${n.y}`;for(let e=a.length-3;e>=0;e-=3){const[n,r]=ke(l,o,a[e+1]),[s,u]=ke(l,o,a[e]),[d,c]=ke(l,o,a[e-1]);let _=d,p=c;1===e&&(_=t.x,p=t.y),i+=` C ${n} ${r}, ${s} ${u}, ${_} ${p}`}return i}(e.pos,t.start,t.end,p,l)}o[e.name]=t}))}catch(e){console.error(e),a.push(qe)}}return console.timeEnd("autoLayoutGeneration"),{positions:o,errors:a}}(this.graphviz,n);n.auto_layout=e.positions,n.auto_layout_errors=e.errors,e.errors.length>0&&(e.errors.indexOf(qe)>=0?(console.warn(Ue),We.toast.warn(Ue)):(console.error(e.errors.join(", ")),We.toast.error(e.errors.join(", "))))}else console.error($e),We.toast.error($e);null!=(s=n.diagram_spec)&&s.grid_enabled?e.enableGrid():e.disableGrid();const p=Zt(e,null==(u=n.diagram_plantuml)?void 0:u.elements,n.diagram_spec,null!=(c=n.auto_layout)?c:{},{diagramsThemeSettings:l,tags:null==(_=n.diagram_plantuml)?void 0:_.tags});return Yt(p),p}}}const Zt=(e,t,n,l,o)=>{const a=[];if(n){if(!o||!o.skipLegendRendering){const t=ze(fe(je,void 0,void 0,void 0,n),o);t&&(a.push(t),null==e||e.add(t))}if(t)for(const i of t)if(Te(i)){const t=rt(e,Te(i),n,l,o);t&&a.push(t)}else if(ye(i)){const t=gt(e,ye(i),n,l,o);t&&a.push(t)}else if(Re(i)){const t=Ot(e,Re(i),n,l,o);t&&a.push(t)}else if(Ce(i)){const t=vt(e,Ce(i),n,l,o);t&&a.push(t)}else if(De(i)){const t=bt(e,De(i),n,l,o);t&&a.push(t)}else if(Ie(i)){const t=Ft(e,Ie(i),n,l,o);t&&a.push(t)}else if(xe(i)){const t=Mt(e,xe(i),n,l,o);t&&a.push(t)}}return a},Yt=(e,t)=>{e.forEach((e=>{let n=function(e){let t;var n,l;return t=e.isVirtualGroupParent()?null==(n=e.data)||null==(n=n.rawDiagramElementSpec)||null==(n=n.shapes)||null==(n=n.reduce(((e,t)=>{var n,l;return void 0===(null==(n=e.position)?void 0:n.z_index)?t:(void 0===(null==(l=t.position)?void 0:l.z_index)||(t.position.z_index,e.position.z_index),e)})).position)?void 0:n.z_index:null==(l=e.data)||null==(l=l.rawDiagramElementSpec)||null==(l=l.position)?void 0:l.z_index,t}(e);var l;n&&(t&&n<=t&&(n=t+1,t++),e.moveTo(n)),e.isVirtualGroupParent()&&Yt(e.children,null!=(l=n)?l:re(e.canvas,e.children[0]))}))},Wt=require("@resvg/resvg-js"),Ht=require("canvas"),jt=require("path");async function Gt(e,t="png"){const n=new Xt;await n.initialize();const l={onOpenDiagramClick:e=>{},onOpenExternalLinkClick:e=>{}};if(e&&e.diagram){var o;null!=(o=e.diagram.diagram_spec)&&o.grid_enabled&&(e.diagram.diagram_spec.grid_enabled=!1);const a=new ee(null);[(0,jt.join)(__dirname,"fonts/Roboto-Bold.ttf"),(0,jt.join)(__dirname,"fonts/Roboto-Italic.ttf"),(0,jt.join)(__dirname,"fonts/Roboto-Regular.ttf")].forEach((e=>{(0,Ht.registerFont)(e,{family:"Roboto"})})),n.renderDiagram(a,l,e.diagram,e.diagramsThemeSettings);const i=a.getObjects();let r;0===i.length?r={left:0,top:0,right:800,bottom:600}:(r=i.reduce(((e,t)=>{const n=t.getBoundingRect(!0,!0);return Number.isNaN(n.left)||Number.isNaN(n.top)||Number.isNaN(n.width)||Number.isNaN(n.height)||(e.left=Math.min(e.left,n.left),e.top=Math.min(e.top,n.top),e.right=Math.max(e.right,n.left+n.width),e.bottom=Math.max(e.bottom,n.top+n.height)),e}),{left:1/0,top:1/0,right:-1/0,bottom:-1/0}),r.left!==1/0&&r.top!==1/0&&r.right!==-1/0&&r.bottom!==-1/0||(r={left:0,top:0,right:800,bottom:600}));const s="#ffffff",u=r.right-r.left,d=r.bottom-r.top,c=20,_=u>0?u+2*c:800,p=d>0?d+2*c:600;i.forEach((e=>{var t,n;e.set({left:(null!=(t=e.left)?t:0)-r.left+c,top:(null!=(n=e.top)?n:0)-r.top+c}),e.setCoords()})),a.setWidth(_),a.setHeight(p),a.viewportTransform=[1,0,0,1,0,0],a.calcOffset(),a.backgroundColor=s,a.renderAll();let h=a.toSVG({width:_,height:p,suppressPreamble:!0});return h=h.replace("<svg ",`<svg style='background-color: ${s}' `),"png"===t?new Wt.Resvg(h,{background:"rgba(255, 255, 255, 1)",fitTo:{mode:"width",value:a.getWidth()}}).render().asPng().toString("base64"):h}}!function(){const n=t.createInterface({input:process.stdin,terminal:!1});n.on("line",(async t=>{let n;try{const{id:l,fn:o,args:a}=JSON.parse(t);n=l;const i=e[o];if("function"!=typeof i)throw new Error(`"${String(o)}" is not a function exported by @keadex/mina`);const r={id:n,ok:!0,result:await Promise.resolve(i(...a))};process.stdout.write(`${JSON.stringify(r)}\n`)}catch(e){var l;const t={id:null!=(l=n)?l:-1,ok:!1,error:e instanceof Error?e.message:String(e)};process.stdout.write(`${JSON.stringify(t)}\n`)}})),n.on("close",(()=>{process.exit(0)}))}()})(),module.exports={}})();
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@keadex/mina-mcp-server-linux-x64",
3
+ "description": "Linux x64 binary for @keadex/mina-mcp-server",
4
+ "os": [
5
+ "linux"
6
+ ],
7
+ "cpu": [
8
+ "x64"
9
+ ],
10
+ "main": "./mina-mcp-server",
11
+ "files": [
12
+ "mina-mcp-server",
13
+ "mina.js",
14
+ "fonts"
15
+ ],
16
+ "author": "Keadex <keadex.it@gmail.com>",
17
+ "license": "MIT",
18
+ "version": "3.1.4",
19
+ "private": false,
20
+ "homepage": "https://keadex.dev",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/keadex/keadex"
24
+ },
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "keywords": [
29
+ "mina",
30
+ "diagrams",
31
+ "c4model",
32
+ "mcp",
33
+ "model-context-protocol"
34
+ ],
35
+ "exports": {
36
+ "./package.json": "./package.json"
37
+ }
38
+ }