@keadex/mina-react 2.7.1 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/core.js CHANGED
@@ -1 +1 @@
1
- var _,e,t,n,r={196:(_,e,t)=>{var n=t(457);_.exports=t.v(e,_.id,"2b7251ee9748ca2754a5",{"./mina_react_bg.js":{__wbg_log_c222819a41e063d3:n.pR9,__wbg_info_3daf2e093e091b66:n.ZrD,__wbg_warn_4ca3906c248c47c4:n.jwJ,__wbg_debug_3cb59063b29f58c1:n.F$t,__wbg_error_524f506f44df1645:n.pWA,__wbindgen_string_new:n.ycJ,__wbindgen_string_get:n.qNE,__wbindgen_bigint_get_as_i64:n.DMD,__wbindgen_memory:n.Py0,__wbindgen_throw:n.Qnr,__wbindgen_debug_string:n.rl,__wbg_new_5e0be73521bc8c17:n.aIY,__wbg_new_78feb108b6472713:n.M2,__wbindgen_number_new:n.QRK,__wbg_new_405e22f390576ce2:n.va5,__wbg_newnoargs_105ed471475aaf50:n.VrZ,__wbg_new_a12002a7f91c75be:n.vVD,__wbg_stringify_f7ed6987935b4a24:n.Y6F,__wbindgen_is_function:n.PRY,__wbindgen_is_string:n.GuA,__wbindgen_is_object:n.qvD,__wbg_next_25feadfc0913fea9:n.yqB,__wbg_buffer_609cc3eee51ed158:n.FHK,__wbg_byteLength_e674b853d9c77e1d:n.x6W,__wbg_byteOffset_fd862df290ef848d:n.cyg,__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a:n.hI8,__wbg_length_a446193dc22c12f8:n.eIr,__wbg_set_65595bdd868b3009:n.HBq,__wbg_newwithlength_a381634e90c276d4:n.HtP,__wbg_buffer_09165b52af8c5237:n._Ue,__wbg_subarray_aa9065fa9dc5df96:n.TOc,__wbg_done_769e5ede4b31c67b:n.Xb8,__wbg_value_cd1ffa7b1ab794f1:n.LMq,__wbg_next_c3ab0d59847b3b5c:n.tER,__wbg_instanceof_Error_4d54113b22d20306:n.fcg,__wbg_instanceof_Uint8Array_17156bcf118086a9:n.SJf,__wbg_instanceof_ArrayBuffer_e14585432e3737fc:n.gGA,__wbg_set_8fc6bf8a5b1071d1:n.iAh,__wbg_get_b9b93047fe3cf45b:n.RKz,__wbg_set_37837023f3d740e8:n.p8e,__wbg_length_e2d2a49132c1b256:n.Ry,__wbg_push_737cfc8c1432c2c6:n.tZf,__wbg_isArray_a1eab7e0d067391b:n.uod,__wbg_new_c68d7209be747379:n.wd3,__wbg_message_97a2af9b89d693a3:n.oGe,__wbg_isSafeInteger_343e2beeeece1bb0:n.Yb6,__wbg_entries_3265d4158b33e5dc:n.gHg,__wbg_iterator_9a24c88df860dc65:n.eW0,__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0:n.w6e,__wbindgen_is_undefined:n.vUM,__wbg_call_672a4d21634d4a24:n.wHY,__wbg_static_accessor_SELF_37c5d418e4bf5819:n.fb$,__wbg_static_accessor_GLOBAL_88a902d13a557d07:n.ii7,__wbg_static_accessor_WINDOW_5de37043a91a9c40:n.x0C,__wbg_new_23a2665fac83c611:n.c6u,__wbg_then_44b73946d2fb3e7d:n.GQG,__wbg_then_48b406749878a531:n.xV_,__wbg_resolve_4851785c9c5f573d:n.wJz,__wbg_call_7cccdd69e0791ae2:n.w9h,__wbg_next_6574e1a8a62d1055:n.Dn4,__wbindgen_number_get:n.sWe,__wbg_get_67b2ba62fc30de12:n.dzD,__wbg_setkeepexistingdata_ee7c8cb466e9477f:n.aKt,__wbg_container_unwrap:n.xB8,__wbg_instanceof_FileSystemFileHandle_d3d037cf85ee546c:n.KA3,__wbg_createWritable_b4ed240dc879905e:n.kPb,__wbg_getFile_2607bc0123c724e0:n.ycy,__wbg_postMessage_83a8d58d3fcb6c13:n.A2$,__wbg_byobRequest_77d9adf63337edfb:n.JpR,__wbg_close_5ce03e29be453811:n.sQY,__wbg_append_299d5d48292c0495:n.cVx,__wbg_append_b44785ebeb668479:n.d_N,__wbg_append_b2d1fc16de2a0e81:n.WqA,__wbg_new_9fd39a253424609a:n.z09,__wbg_respond_1f279fa9f8edcb1c:n.dSQ,__wbg_view_fd8a56e8983f448d:n.NgT,__wbg_seek_3f0f8d7591f648d7:n.Zk3,__wbg_write_397d977609afc729:n.Vob,__wbg_new_e25e5aab09ff45db:n.RG9,__wbg_abort_775ef1d17fc65868:n.gMQ,__wbg_signal_aaf9ad74119f20a4:n.CF8,__wbg_setcreate_4ca762e23d9f78da:n.N9Q,__wbg_enqueue_bb16ba72f537dc9e:n.QHd,__wbg_close_304cc1fef3466669:n.oaw,__wbg_instanceof_File_a4e2256bf71955a9:n.gjJ,__wbg_lastModified_7a9e61b3961224b8:n.gvw,__wbg_close_24caca68e93b9c03:n.jeC,__wbg_settype_39ed370d3edd403c:n.a4S,__wbg_setcreate_139bad94b2874fb5:n.kF0,__wbg_queueMicrotask_97d92b4fcc8a61c5:n._mt,__wbg_queueMicrotask_d3219def82552485:n.k2R,__wbindgen_cb_drop:n.LCp,__wbg_arrayBuffer_f18c144cd0125f07:n.RGi,__wbg_newwithu8arraysequenceandoptions_068570c487f69127:n.qe7,__wbg_size_3808d41635a9c259:n.$CF,__wbg_text_1f39a8afe3c70a99:n.CFe,__wbg_diagramelementspec_new:n.Dr_,__wbg_diagram_new:n.YLb,__wbg_point_new:n.nA9,__wbg_shape_new:n._cl,__wbg_relationship_new:n.NpJ,__wbg_minaerror_new:n.EkI,__wbg_person_new:n.c1W,__wbg_softwaresystem_new:n.dM0,__wbg_container_new:n.e57,__wbg_boundary_new:n.HCo,__wbg_deploymentnode_new:n.ezj,__wbg_component_new:n.WJm,__wbg_new_8a6f238a6ece86ea:n.$Pc,__wbg_stack_0ed75d68575b0f3c:n.x$X,__wbg_error_7534b8e9a36f1ab4:n.WYM,__wbindgen_jsval_loose_eq:n.U8c,__wbindgen_boolean_get:n.NhE,__wbindgen_as_number:n.qmw,__wbindgen_error_new:n.RjG,__wbg_getwithrefkey_2d7fdfea9645a25b:n.A2U,__wbg_set_2873a5cee2324875:n.v1k,__wbg_String_1b2069caba3b9783:n.JF5,__wbindgen_bigint_from_u64:n.Qg3,__wbg_boundary_unwrap:n.Wq,__wbg_shape_unwrap:n.D7n,__wbg_crypto_ed58b8e10a292839:n.ilI,__wbg_process_5c1d670bc53614b8:n.Evb,__wbg_versions_c71aa1626a93e0a1:n.ooJ,__wbg_node_02999533c4ea02e3:n.OtZ,__wbg_require_79b1e9274cde3c87:n.Ltb,__wbg_msCrypto_0a36e2ec3a343d26:n.HOd,__wbg_randomFillSync_ab2cfe79ebbf2740:n.NNx,__wbg_getRandomValues_bcb4912f16000dc4:n.FGp,__wbindgen_in:n.zEy,__wbindgen_is_bigint:n.YkQ,__wbindgen_jsval_eq:n.BGI,__wbg_deploymentnode_unwrap:n._Zx,__wbg_has_a5ea9117f258a0ec:n.HSm,__wbg_fetch_4465c2b10f21a927:n.o0R,__wbg_fetch_509096533071c657:n.gRe,__wbg_newwithstrandinit_06c535e0a867c635:n.heb,__wbg_setrecursive_536113a081d6177a:n.ugc,__wbg_instanceof_FileSystemDirectoryHandle_0906fc139d75557b:n.Cjr,__wbg_removeEntry_9f6bc325e3383e59:n.m_N,__wbg_removeEntry_a424e90dff229b19:n.lkn,__wbg_getFileHandle_5fb877d1ecc74d52:n.Wkh,__wbg_getDirectoryHandle_c48a138373d79b3d:n.kTu,__wbg_entries_19efe296f7d36df9:n.RCF,__wbg_new_018dcc2d6c8c2f6a:n.RR8,__wbg_append_8c7dd8d641a5f01b:n.Tbm,__wbg_name_e4a115def9e2bbaa:n.Yeo,__wbg_instanceof_Response_f2cc20d9f7dfd644:n.Hzn,__wbg_arrayBuffer_d1b44c4390db422f:n._iy,__wbg_url_ae10c34ca209681d:n.Tp3,__wbg_status_f6360336ca686bf0:n.kK3,__wbg_headers_9cb51cfd2ac780a4:n.Moj,__wbg_setmethod_3c5280fe5d890842:n._hX,__wbg_setsignal_75b21ef3a81de905:n.l0x,__wbg_setcredentials_c3a22f1cd105a2c6:n.uw1,__wbg_setheaders_834c0bdb6a8949ad:n.rk2,__wbg_setbody_5923b78a95eedf29:n.Nhd,__wbg_setmode_5dc300b865044b65:n.BFX,__wbg_softwaresystem_unwrap:n.qre,__wbg_relationship_unwrap:n.KM7,__wbg_point_unwrap:n._QJ,__wbg_person_unwrap:n.Xv$,__wbg_component_unwrap:n.dT0,__wbg_diagramelementspec_unwrap:n.W3f,__wbindgen_closure_wrapper1507:n.Cry,__wbindgen_init_externref_table:n.bLn}})},457:(_,e,t)=>{let n;function r(_){n=_}t.d(e,{$CF:()=>kt,$Pc:()=>Ae,A2$:()=>Te,A2U:()=>ne,BFX:()=>ht,BGI:()=>on,CF8:()=>xt,CFe:()=>Mt,Cjr:()=>ge,Cry:()=>Vt,D7n:()=>zt,DMD:()=>Tt,Dn4:()=>Le,Dr_:()=>L_,EkI:()=>Re,Evb:()=>Ye,F$t:()=>M_,FGp:()=>_e,FHK:()=>R_,GQG:()=>Ct,GuA:()=>an,HBq:()=>ct,HCo:()=>h_,HOd:()=>Fe,HSm:()=>re,HtP:()=>Me,Hzn:()=>we,JD7:()=>x,JF5:()=>b_,JpR:()=>F_,KA3:()=>ce,KM7:()=>et,LCp:()=>Kt,LMq:()=>Lt,Llp:()=>k,Ltb:()=>rt,M2:()=>Se,Moj:()=>ie,N9Q:()=>dt,NNx:()=>Xe,NgT:()=>Bt,NhE:()=>Yt,Nhd:()=>wt,NpJ:()=>_t,OtZ:()=>Be,Oxg:()=>F,PRY:()=>nn,Py0:()=>cn,QHd:()=>U_,QRK:()=>wn,Qg3:()=>Qt,Qnr:()=>ln,RCF:()=>$_,RG9:()=>Ie,RGi:()=>y_,RKz:()=>te,RR8:()=>xe,RjG:()=>Xt,Ry:()=>he,SJf:()=>ue,TOc:()=>Jt,Tbm:()=>d_,Tp3:()=>Wt,U8c:()=>gn,Vob:()=>$t,VrZ:()=>He,W3f:()=>N_,WJm:()=>D_,WYM:()=>T_,Wkh:()=>Z_,Wq:()=>m_,WqA:()=>l_,Xb8:()=>B_,Xv$:()=>$e,Y6F:()=>Ht,YLb:()=>W_,Yb6:()=>le,Yeo:()=>ze,YkQ:()=>tn,Zk3:()=>st,ZrD:()=>ae,_Cc:()=>j,_QJ:()=>Qe,_Ue:()=>v_,_Zx:()=>G_,_cl:()=>Ft,_hX:()=>yt,_iy:()=>f_,_mt:()=>Ve,a4S:()=>Rt,aIY:()=>Oe,aKt:()=>ft,bLn:()=>en,c1W:()=>Ue,c6u:()=>ke,cVx:()=>u_,cyg:()=>x_,dM0:()=>jt,dSQ:()=>at,dT0:()=>q_,d_N:()=>p_,dzD:()=>ee,e57:()=>E_,eIr:()=>ye,eW0:()=>pe,ezj:()=>C_,fb$:()=>qt,fcg:()=>oe,gGA:()=>se,gHg:()=>P_,gMQ:()=>w_,gRe:()=>K_,gjJ:()=>be,gvw:()=>fe,hI8:()=>Je,heb:()=>Ce,iAh:()=>bt,ii7:()=>At,ilI:()=>J_,jeC:()=>O_,jwJ:()=>Ut,k2R:()=>Ze,kF0:()=>ut,kK3:()=>It,kPb:()=>H_,kTu:()=>V_,l0x:()=>vt,lIU:()=>r,lkn:()=>nt,m_N:()=>tt,nA9:()=>Pe,o0R:()=>Y_,oGe:()=>ve,oaw:()=>S_,ooJ:()=>Nt,p8e:()=>gt,pR9:()=>me,pWA:()=>Q_,qNE:()=>un,qe7:()=>Ge,qmw:()=>Pt,qre:()=>Ot,qvD:()=>rn,rk2:()=>pt,rl:()=>Zt,sQY:()=>A_,sWe:()=>bn,tER:()=>Ne,tZf:()=>Ke,ugc:()=>mt,uod:()=>de,uw1:()=>lt,v1k:()=>ot,vUM:()=>sn,vVD:()=>qe,va5:()=>je,w6e:()=>Dt,w9h:()=>j_,wHY:()=>k_,wJz:()=>it,wd3:()=>Ee,x$X:()=>St,x0C:()=>Et,x6W:()=>z_,xB8:()=>I_,xV_:()=>Gt,ycJ:()=>dn,ycy:()=>X_,yqB:()=>We,z09:()=>De,zEy:()=>_n}),_=t.hmd(_);let i=0,a=null;function s(){return null!==a&&0!==a.byteLength||(a=new Uint8Array(n.memory.buffer)),a}let o=new("undefined"==typeof TextEncoder?(0,_.require)("util").TextEncoder:TextEncoder)("utf-8");const g="function"==typeof o.encodeInto?function(_,e){return o.encodeInto(_,e)}:function(_,e){const t=o.encode(_);return e.set(t),{read:_.length,written:t.length}};function c(_,e,t){if(void 0===t){const t=o.encode(_),n=e(t.length,1)>>>0;return s().subarray(n,n+t.length).set(t),i=t.length,n}let n=_.length,r=e(n,1)>>>0;const a=s();let c=0;for(;c<n;c++){const e=_.charCodeAt(c);if(e>127)break;a[r+c]=e}if(c!==n){0!==c&&(_=_.slice(c)),r=t(r,n,n=c+3*_.length,1)>>>0;const e=s().subarray(r+c,r+n);c+=g(_,e).written,r=t(r,n,c,1)>>>0}return i=c,r}let b=null;function w(){return(null===b||!0===b.buffer.detached||void 0===b.buffer.detached&&b.buffer!==n.memory.buffer)&&(b=new DataView(n.memory.buffer)),b}let u=new("undefined"==typeof TextDecoder?(0,_.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});function d(_,e){return _>>>=0,u.decode(s().subarray(_,_+e))}function l(_){const e=n.__externref_table_alloc();return n.__wbindgen_export_4.set(e,_),e}function p(_,e){try{return _.apply(this,e)}catch(_){const e=l(_);n.__wbindgen_exn_store(e)}}function f(_){return null==_}u.decode();const y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>{n.__wbindgen_export_6.get(_.dtor)(_.a,_.b)}));function h(_){const e=typeof _;if("number"==e||"boolean"==e||null==_)return`${_}`;if("string"==e)return`"${_}"`;if("symbol"==e){const e=_.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==e){const e=_.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(_)){const e=_.length;let t="[";e>0&&(t+=h(_[0]));for(let n=1;n<e;n++)t+=", "+h(_[n]);return t+="]",t}const t=/\[object ([^\]]+)\]/.exec(toString.call(_));let n;if(!(t&&t.length>1))return toString.call(_);if(n=t[1],"Object"==n)try{return"Object("+JSON.stringify(_)+")"}catch(_){return"Object"}return _ instanceof Error?`${_.name}: ${_.message}\n${_.stack}`:n}function m(_,e){if(!(_ instanceof e))throw new Error(`expected instance of ${e.name}`)}function v(_,e){_>>>=0;const t=w(),r=[];for(let i=_;i<_+4*e;i+=4)r.push(n.__wbindgen_export_4.get(t.getUint32(i,!0)));return n.__externref_drop_slice(_,e),r}function R(_,e){const t=e(4*_.length,4)>>>0;for(let e=0;e<_.length;e++){const n=l(_[e]);w().setUint32(t+4*e,n,!0)}return i=_.length,t}function F(_,e,t,r){const a=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),s=i,o=c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),g=i,b=c(t,n.__wbindgen_malloc,n.__wbindgen_realloc),w=i,u=c(r,n.__wbindgen_malloc,n.__wbindgen_realloc),d=i;return n.open_remote_diagram(a,s,o,g,b,w,u,d)}function z(_){const e=n.__wbindgen_export_4.get(_);return n.__externref_table_dealloc(_),e}function x(_,e){let t,r;try{const o=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),g=i,b=c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),w=i,u=n.diagram_spec_url_from_diagram_url(o,g,b,w);var a=u[0],s=u[1];if(u[3])throw a=0,s=0,z(u[2]);return t=a,r=s,d(a,s)}finally{n.__wbindgen_free(t,r,1)}}function k(_,e){let t,r;try{const o=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),g=i,b=c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),w=i,u=n.diagram_plantuml_url_from_diagram_url(o,g,b,w);var a=u[0],s=u[1];if(u[3])throw a=0,s=0,z(u[2]);return t=a,r=s,d(a,s)}finally{n.__wbindgen_free(t,r,1)}}function j(_){let e,t;try{const r=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),a=i,s=n.project_settings_url(r,a);return e=s[0],t=s[1],d(s[0],s[1])}finally{n.__wbindgen_free(e,t,1)}}function O(_,e,t){n.closure147_externref_shim(_,e,t)}const S=["omit","same-origin","include"],A=["same-origin","no-cors","cors","navigate"];"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_aisettings_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_addelementtag_free(_>>>0,1)));const D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_baseelement_free(_>>>0,1)));class q{static __wrap(_){_>>>=0;const e=Object.create(q.prototype);return e.__wbg_ptr=_,D.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_baseelement_free(_,0)}get alias(){const _=n.__wbg_get_baseelement_alias(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set alias(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_alias(this.__wbg_ptr,e,t)}get label(){const _=n.__wbg_get_baseelement_label(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set label(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_label(this.__wbg_ptr,e,t)}get description(){const _=n.__wbg_get_baseelement_description(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set description(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_description(this.__wbg_ptr,e,t)}get sprite(){const _=n.__wbg_get_baseelement_sprite(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set sprite(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_sprite(this.__wbg_ptr,e,t)}get tags(){const _=n.__wbg_get_baseelement_tags(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set tags(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_tags(this.__wbg_ptr,e,t)}get link(){const _=n.__wbg_get_baseelement_link(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set link(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_link(this.__wbg_ptr,e,t)}get uuid(){const _=n.__wbg_get_baseelement_uuid(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set uuid(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_uuid(this.__wbg_ptr,e,t)}get notes(){const _=n.__wbg_get_baseelement_notes(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set notes(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_notes(this.__wbg_ptr,e,t)}}const E="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_boundary_free(_>>>0,1)));class I{static __wrap(_){_>>>=0;const e=Object.create(I.prototype);return e.__wbg_ptr=_,E.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof I?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,E.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_boundary_free(_,0)}get base_data(){const _=n.__wbg_get_boundary_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){m(_,q);var e=_.__destroy_into_raw();n.__wbg_set_boundary_base_data(this.__wbg_ptr,e)}get boundary_type(){return n.__wbg_get_boundary_boundary_type(this.__wbg_ptr)}set boundary_type(_){n.__wbg_set_boundary_boundary_type(this.__wbg_ptr,f(_)?0:l(_))}get boundary_custom_type(){const _=n.__wbg_get_boundary_boundary_custom_type(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set boundary_custom_type(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_addelementtag_legend_sprite(this.__wbg_ptr,e,t)}get sub_elements(){const _=n.__wbg_get_boundary_sub_elements(this.__wbg_ptr);var e=v(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set sub_elements(_){const e=R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_boundary_sub_elements(this.__wbg_ptr,e,t)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_c4elements_free(_>>>0,1)));const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_component_free(_>>>0,1)));class J{static __wrap(_){_>>>=0;const e=Object.create(J.prototype);return e.__wbg_ptr=_,H.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof J?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_component_free(_,0)}get base_data(){const _=n.__wbg_get_component_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){m(_,q);var e=_.__destroy_into_raw();n.__wbg_set_component_base_data(this.__wbg_ptr,e)}get technology(){const _=n.__wbg_get_component_technology(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set technology(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_component_technology(this.__wbg_ptr,e,t)}get component_type(){return n.__wbg_get_component_component_type(this.__wbg_ptr)}set component_type(_){n.__wbg_set_component_component_type(this.__wbg_ptr,f(_)?0:l(_))}}const M="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_container_free(_>>>0,1)));class C{static __wrap(_){_>>>=0;const e=Object.create(C.prototype);return e.__wbg_ptr=_,M.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof C?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,M.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_container_free(_,0)}get base_data(){const _=n.__wbg_get_container_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){m(_,q);var e=_.__destroy_into_raw();n.__wbg_set_container_base_data(this.__wbg_ptr,e)}get technology(){const _=n.__wbg_get_container_technology(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set technology(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_container_technology(this.__wbg_ptr,e,t)}get container_type(){return n.__wbg_get_container_container_type(this.__wbg_ptr)}set container_type(_){n.__wbg_set_container_container_type(this.__wbg_ptr,f(_)?0:l(_))}}const G="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_deploymentnode_free(_>>>0,1)));class W{static __wrap(_){_>>>=0;const e=Object.create(W.prototype);return e.__wbg_ptr=_,G.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof W?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,G.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_deploymentnode_free(_,0)}get base_data(){const _=n.__wbg_get_boundary_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){m(_,q);var e=_.__destroy_into_raw();n.__wbg_set_boundary_base_data(this.__wbg_ptr,e)}get deploymeny_node_custom_type(){const _=n.__wbg_get_deploymentnode_deploymeny_node_custom_type(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set deploymeny_node_custom_type(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_addelementtag_legend_sprite(this.__wbg_ptr,e,t)}get deployment_node_type(){return n.__wbg_get_deploymentnode_deployment_node_type(this.__wbg_ptr)}set deployment_node_type(_){n.__wbg_set_deploymentnode_deployment_node_type(this.__wbg_ptr,f(_)?0:l(_))}get sub_elements(){const _=n.__wbg_get_deploymentnode_sub_elements(this.__wbg_ptr);var e=v(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set sub_elements(_){const e=R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_boundary_sub_elements(this.__wbg_ptr,e,t)}}const L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_diagram_free(_>>>0,1)));class N{static __wrap(_){_>>>=0;const e=Object.create(N.prototype);return e.__wbg_ptr=_,L.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_diagram_free(_,0)}get diagram_name(){const _=n.__wbg_get_diagram_diagram_name(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set diagram_name(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagram_diagram_name(this.__wbg_ptr,e,t)}get diagram_type(){return n.__wbg_get_diagram_diagram_type(this.__wbg_ptr)}set diagram_type(_){n.__wbg_set_diagram_diagram_type(this.__wbg_ptr,f(_)?0:l(_))}get diagram_spec(){const _=n.__wbg_get_diagram_diagram_spec(this.__wbg_ptr);return 0===_?void 0:T.__wrap(_)}set diagram_spec(_){let e=0;f(_)||(m(_,T),e=_.__destroy_into_raw()),n.__wbg_set_diagram_diagram_spec(this.__wbg_ptr,e)}get diagram_plantuml(){const _=n.__wbg_get_diagram_diagram_plantuml(this.__wbg_ptr);return 0===_?void 0:P.__wrap(_)}set diagram_plantuml(_){let e=0;f(_)||(m(_,P),e=_.__destroy_into_raw()),n.__wbg_set_diagram_diagram_plantuml(this.__wbg_ptr,e)}get raw_plantuml(){const _=n.__wbg_get_diagram_raw_plantuml(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set raw_plantuml(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagram_raw_plantuml(this.__wbg_ptr,e,t)}get last_modified(){const _=n.__wbg_get_diagram_last_modified(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set last_modified(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagram_last_modified(this.__wbg_ptr,e,t)}get auto_layout_errors(){const _=n.__wbg_get_diagram_auto_layout_errors(this.__wbg_ptr);let e;return 0!==_[0]&&(e=v(_[0],_[1]).slice(),n.__wbindgen_free(_[0],4*_[1],4)),e}set auto_layout_errors(_){var e=f(_)?0:R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagram_auto_layout_errors(this.__wbg_ptr,e,t)}get auto_layout(){return n.diagram_auto_layout(this.__wbg_ptr)}set auto_layout(_){n.diagram_set_auto_layout(this.__wbg_ptr,_)}}const B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_diagramelementspec_free(_>>>0,1)));class U{static __wrap(_){_>>>=0;const e=Object.create(U.prototype);return e.__wbg_ptr=_,B.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof U?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_diagramelementspec_free(_,0)}get alias(){const _=n.__wbg_get_diagramelementspec_alias(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set alias(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramelementspec_alias(this.__wbg_ptr,e,t)}get from(){const _=n.__wbg_get_diagramelementspec_from(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set from(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramelementspec_from(this.__wbg_ptr,e,t)}get to(){const _=n.__wbg_get_diagramelementspec_to(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set to(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramelementspec_to(this.__wbg_ptr,e,t)}get shapes(){const _=n.__wbg_get_diagramelementspec_shapes(this.__wbg_ptr);let e;return 0!==_[0]&&(e=v(_[0],_[1]).slice(),n.__wbindgen_free(_[0],4*_[1],4)),e}set shapes(_){var e=f(_)?0:R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramelementspec_shapes(this.__wbg_ptr,e,t)}get element_type(){return n.__wbg_get_diagramelementspec_element_type(this.__wbg_ptr)}set element_type(_){n.__wbg_set_diagramelementspec_element_type(this.__wbg_ptr,f(_)?0:l(_))}get position(){const _=n.__wbg_get_diagramelementspec_position(this.__wbg_ptr);return 0===_?void 0:t_.__wrap(_)}set position(_){let e=0;f(_)||(m(_,t_),e=_.__destroy_into_raw()),n.__wbg_set_diagramelementspec_position(this.__wbg_ptr,e)}get size(){const _=n.__wbg_get_diagramelementspec_size(this.__wbg_ptr);return 0===_?void 0:o_.__wrap(_)}set size(_){let e=0;f(_)||(m(_,o_),e=_.__destroy_into_raw()),n.__wbg_set_diagramelementspec_size(this.__wbg_ptr,e)}get inner_specs(){const _=n.__wbg_get_diagramelementspec_inner_specs(this.__wbg_ptr);let e;return 0!==_[0]&&(e=v(_[0],_[1]).slice(),n.__wbindgen_free(_[0],4*_[1],4)),e}set inner_specs(_){var e=f(_)?0:R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramelementspec_inner_specs(this.__wbg_ptr,e,t)}}const $="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_diagramplantuml_free(_>>>0,1)));class P{static __wrap(_){_>>>=0;const e=Object.create(P.prototype);return e.__wbg_ptr=_,$.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,$.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_diagramplantuml_free(_,0)}get tags(){return n.diagramplantuml_tags(this.__wbg_ptr)}set tags(_){n.diagramplantuml_set_tags(this.__wbg_ptr,_)}get diagram_id(){const _=n.__wbg_get_diagramplantuml_diagram_id(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set diagram_id(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramplantuml_diagram_id(this.__wbg_ptr,e,t)}get elements(){const _=n.__wbg_get_diagramplantuml_elements(this.__wbg_ptr);var e=v(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set elements(_){const e=R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramplantuml_elements(this.__wbg_ptr,e,t)}get aliases(){const _=n.__wbg_get_diagramplantuml_aliases(this.__wbg_ptr);var e=v(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set aliases(_){const e=R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramplantuml_aliases(this.__wbg_ptr,e,t)}}const Q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_diagramspec_free(_>>>0,1)));class T{static __wrap(_){_>>>=0;const e=Object.create(T.prototype);return e.__wbg_ptr=_,Q.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Q.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_diagramspec_free(_,0)}get uuid(){let _,e;try{const t=n.__wbg_get_diagramspec_uuid(this.__wbg_ptr);return _=t[0],e=t[1],d(t[0],t[1])}finally{n.__wbindgen_free(_,e,1)}}set uuid(_){const e=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramspec_uuid(this.__wbg_ptr,e,t)}get description(){const _=n.__wbg_get_diagramspec_description(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set description(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramspec_description(this.__wbg_ptr,e,t)}get tags(){const _=n.__wbg_get_diagramspec_tags(this.__wbg_ptr);let e;return 0!==_[0]&&(e=v(_[0],_[1]).slice(),n.__wbindgen_free(_[0],4*_[1],4)),e}set tags(_){var e=f(_)?0:R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramspec_tags(this.__wbg_ptr,e,t)}get elements_specs(){const _=n.__wbg_get_diagramspec_elements_specs(this.__wbg_ptr);var e=v(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set elements_specs(_){const e=R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramspec_elements_specs(this.__wbg_ptr,e,t)}get shapes(){const _=n.__wbg_get_diagramspec_shapes(this.__wbg_ptr);var e=v(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set shapes(_){const e=R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramspec_shapes(this.__wbg_ptr,e,t)}get auto_layout_enabled(){return 0!==n.__wbg_get_diagramspec_auto_layout_enabled(this.__wbg_ptr)}set auto_layout_enabled(_){n.__wbg_set_diagramspec_auto_layout_enabled(this.__wbg_ptr,_)}get auto_layout_orientation(){return n.__wbg_get_diagramspec_auto_layout_orientation(this.__wbg_ptr)}set auto_layout_orientation(_){n.__wbg_set_diagramspec_auto_layout_orientation(this.__wbg_ptr,_)}get auto_layout_only_straight_arrows(){return 0!==n.__wbg_get_diagramspec_auto_layout_only_straight_arrows(this.__wbg_ptr)}set auto_layout_only_straight_arrows(_){n.__wbg_set_diagramspec_auto_layout_only_straight_arrows(this.__wbg_ptr,_)}get auto_layout_ranksep(){return n.__wbg_get_diagramspec_auto_layout_ranksep(this.__wbg_ptr)}set auto_layout_ranksep(_){n.__wbg_set_diagramspec_auto_layout_ranksep(this.__wbg_ptr,_)}get auto_layout_subgraph_inner_margin(){return n.__wbg_get_diagramspec_auto_layout_subgraph_inner_margin(this.__wbg_ptr)}set auto_layout_subgraph_inner_margin(_){n.__wbg_set_diagramspec_auto_layout_subgraph_inner_margin(this.__wbg_ptr,_)}get auto_layout_subgraph_outer_margin(){return n.__wbg_get_diagramspec_auto_layout_subgraph_outer_margin(this.__wbg_ptr)}set auto_layout_subgraph_outer_margin(_){n.__wbg_set_diagramspec_auto_layout_subgraph_outer_margin(this.__wbg_ptr,_)}get grid_enabled(){return 0!==n.__wbg_get_diagramspec_grid_enabled(this.__wbg_ptr)}set grid_enabled(_){n.__wbg_set_diagramspec_grid_enabled(this.__wbg_ptr,_)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_diagramsthemesettings_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_elementdata_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_hookpayload_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_intounderlyingbytesource_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_intounderlyingsink_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_intounderlyingsource_free(_>>>0,1)));const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_minaerror_free(_>>>0,1)));class K{static __wrap(_){_>>>=0;const e=Object.create(K.prototype);return e.__wbg_ptr=_,Y.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_minaerror_free(_,0)}get code(){return n.__wbg_get_minaerror_code(this.__wbg_ptr)}set code(_){n.__wbg_set_minaerror_code(this.__wbg_ptr,_)}get msg(){let _,e;try{const t=n.__wbg_get_minaerror_msg(this.__wbg_ptr);return _=t[0],e=t[1],d(t[0],t[1])}finally{n.__wbindgen_free(_,e,1)}}set msg(_){const e=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_minaerror_msg(this.__wbg_ptr,e,t)}}const V="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_person_free(_>>>0,1)));class Z{static __wrap(_){_>>>=0;const e=Object.create(Z.prototype);return e.__wbg_ptr=_,V.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof Z?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,V.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_person_free(_,0)}get base_data(){const _=n.__wbg_get_component_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){m(_,q);var e=_.__destroy_into_raw();n.__wbg_set_component_base_data(this.__wbg_ptr,e)}get person_type(){return n.__wbg_get_person_person_type(this.__wbg_ptr)}set person_type(_){n.__wbg_set_person_person_type(this.__wbg_ptr,f(_)?0:l(_))}}const X="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_point_free(_>>>0,1)));class __{static __wrap(_){_>>>=0;const e=Object.create(__.prototype);return e.__wbg_ptr=_,X.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof __?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,X.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_point_free(_,0)}get x(){return n.__wbg_get_point_x(this.__wbg_ptr)}set x(_){n.__wbg_set_point_x(this.__wbg_ptr,_)}get y(){return n.__wbg_get_point_y(this.__wbg_ptr)}set y(_){n.__wbg_set_point_y(this.__wbg_ptr,_)}}const e_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_position_free(_>>>0,1)));class t_{static __wrap(_){_>>>=0;const e=Object.create(t_.prototype);return e.__wbg_ptr=_,e_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,e_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_position_free(_,0)}get left(){const _=n.__wbg_get_position_left(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set left(_){n.__wbg_set_position_left(this.__wbg_ptr,!f(_),f(_)?0:_)}get top(){const _=n.__wbg_get_position_top(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set top(_){n.__wbg_set_position_top(this.__wbg_ptr,!f(_),f(_)?0:_)}get z_index(){const _=n.__wbg_get_position_z_index(this.__wbg_ptr);return 4294967297===_?void 0:_}set z_index(_){n.__wbg_set_position_z_index(this.__wbg_ptr,f(_)?4294967297:0|_)}get angle(){const _=n.__wbg_get_position_angle(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set angle(_){n.__wbg_set_position_angle(this.__wbg_ptr,!f(_),f(_)?0:_)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_project_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_projectlibrary_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_projectsettings_free(_>>>0,1)));const n_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_relationship_free(_>>>0,1)));class r_{static __wrap(_){_>>>=0;const e=Object.create(r_.prototype);return e.__wbg_ptr=_,n_.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof r_?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,n_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_relationship_free(_,0)}get base_data(){const _=n.__wbg_get_component_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){m(_,q);var e=_.__destroy_into_raw();n.__wbg_set_component_base_data(this.__wbg_ptr,e)}get from(){const _=n.__wbg_get_relationship_from(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set from(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_component_technology(this.__wbg_ptr,e,t)}get to(){const _=n.__wbg_get_relationship_to(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set to(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_relationship_to(this.__wbg_ptr,e,t)}get technology(){const _=n.__wbg_get_relationship_technology(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set technology(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_relationship_technology(this.__wbg_ptr,e,t)}get relationship_type(){return n.__wbg_get_relationship_relationship_type(this.__wbg_ptr)}set relationship_type(_){n.__wbg_set_relationship_relationship_type(this.__wbg_ptr,f(_)?0:l(_))}}const i_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_shape_free(_>>>0,1)));class a_{static __wrap(_){_>>>=0;const e=Object.create(a_.prototype);return e.__wbg_ptr=_,i_.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof a_?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,i_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_shape_free(_,0)}get shape_type(){return n.__wbg_get_shape_shape_type(this.__wbg_ptr)}set shape_type(_){n.__wbg_set_shape_shape_type(this.__wbg_ptr,f(_)?0:l(_))}get position(){const _=n.__wbg_get_shape_position(this.__wbg_ptr);return 0===_?void 0:t_.__wrap(_)}set position(_){let e=0;f(_)||(m(_,t_),e=_.__destroy_into_raw()),n.__wbg_set_shape_position(this.__wbg_ptr,e)}get size(){const _=n.__wbg_get_shape_size(this.__wbg_ptr);return 0===_?void 0:o_.__wrap(_)}set size(_){let e=0;f(_)||(m(_,o_),e=_.__destroy_into_raw()),n.__wbg_set_shape_size(this.__wbg_ptr,e)}}const s_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_size_free(_>>>0,1)));class o_{static __wrap(_){_>>>=0;const e=Object.create(o_.prototype);return e.__wbg_ptr=_,s_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,s_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_size_free(_,0)}get width(){const _=n.__wbg_get_size_width(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set width(_){n.__wbg_set_size_width(this.__wbg_ptr,!f(_),f(_)?0:_)}get height(){const _=n.__wbg_get_size_height(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set height(_){n.__wbg_set_size_height(this.__wbg_ptr,!f(_),f(_)?0:_)}get scale_x(){const _=n.__wbg_get_size_scale_x(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set scale_x(_){n.__wbg_set_size_scale_x(this.__wbg_ptr,!f(_),f(_)?0:_)}get scale_y(){const _=n.__wbg_get_size_scale_y(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set scale_y(_){n.__wbg_set_size_scale_y(this.__wbg_ptr,!f(_),f(_)?0:_)}}const g_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_softwaresystem_free(_>>>0,1)));class c_{static __wrap(_){_>>>=0;const e=Object.create(c_.prototype);return e.__wbg_ptr=_,g_.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof c_?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,g_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_softwaresystem_free(_,0)}get base_data(){const _=n.__wbg_get_container_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){m(_,q);var e=_.__destroy_into_raw();n.__wbg_set_container_base_data(this.__wbg_ptr,e)}get system_type(){return n.__wbg_get_softwaresystem_system_type(this.__wbg_ptr)}set system_type(_){n.__wbg_set_softwaresystem_system_type(this.__wbg_ptr,f(_)?0:l(_))}}function b_(_,e){const t=c(String(e),n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function w_(_){_.abort()}function u_(){return p((function(_,e,t,n,r){_.append(d(e,t),d(n,r))}),arguments)}function d_(){return p((function(_,e,t,n,r){_.append(d(e,t),d(n,r))}),arguments)}function l_(){return p((function(_,e,t,n,r,i){_.append(d(e,t),n,d(r,i))}),arguments)}function p_(){return p((function(_,e,t,n){_.append(d(e,t),n)}),arguments)}function f_(){return p((function(_){return _.arrayBuffer()}),arguments)}function y_(_){return _.arrayBuffer()}function h_(_){return I.__wrap(_)}function m_(_){return I.__unwrap(_)}function v_(_){return _.buffer}function R_(_){return _.buffer}function F_(_){const e=_.byobRequest;return f(e)?0:l(e)}function z_(_){return _.byteLength}function x_(_){return _.byteOffset}function k_(){return p((function(_,e){return _.call(e)}),arguments)}function j_(){return p((function(_,e,t){return _.call(e,t)}),arguments)}function O_(_){return _.close()}function S_(){return p((function(_){_.close()}),arguments)}function A_(){return p((function(_){_.close()}),arguments)}function D_(_){return J.__wrap(_)}function q_(_){return J.__unwrap(_)}function E_(_){return C.__wrap(_)}function I_(_){return C.__unwrap(_)}function H_(_,e){return _.createWritable(e)}function J_(_){return _.crypto}function M_(_){console.debug(_)}function C_(_){return W.__wrap(_)}function G_(_){return W.__unwrap(_)}function W_(_){return N.__wrap(_)}function L_(_){return U.__wrap(_)}function N_(_){return U.__unwrap(_)}function B_(_){return _.done}function U_(){return p((function(_,e){_.enqueue(e)}),arguments)}function $_(_){return _.entries()}function P_(_){return Object.entries(_)}function Q_(_){console.error(_)}function T_(_,e){let t,r;try{t=_,r=e,console.error(d(_,e))}finally{n.__wbindgen_free(t,r,1)}}function Y_(_){return fetch(_)}function K_(_,e){return _.fetch(e)}function V_(_,e,t,n){return _.getDirectoryHandle(d(e,t),n)}function Z_(_,e,t,n){return _.getFileHandle(d(e,t),n)}function X_(_){return _.getFile()}function _e(){return p((function(_,e){_.getRandomValues(e)}),arguments)}function ee(){return p((function(_,e){return Reflect.get(_,e)}),arguments)}function te(_,e){return _[e>>>0]}function ne(_,e){return _[e]}function re(){return p((function(_,e){return Reflect.has(_,e)}),arguments)}function ie(_){return _.headers}function ae(_){console.info(_)}function se(_){let e;try{e=_ instanceof ArrayBuffer}catch(_){e=!1}return e}function oe(_){let e;try{e=_ instanceof Error}catch(_){e=!1}return e}function ge(_){let e;try{e=_ instanceof FileSystemDirectoryHandle}catch(_){e=!1}return e}function ce(_){let e;try{e=_ instanceof FileSystemFileHandle}catch(_){e=!1}return e}function be(_){let e;try{e=_ instanceof File}catch(_){e=!1}return e}function we(_){let e;try{e=_ instanceof Response}catch(_){e=!1}return e}function ue(_){let e;try{e=_ instanceof Uint8Array}catch(_){e=!1}return e}function de(_){return Array.isArray(_)}function le(_){return Number.isSafeInteger(_)}function pe(){return Symbol.iterator}function fe(_){return _.lastModified}function ye(_){return _.length}function he(_){return _.length}function me(_){console.log(_)}function ve(_){return _.message}function Re(_){return K.__wrap(_)}function Fe(_){return _.msCrypto}function ze(_,e){const t=c(e.name,n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function xe(){return p((function(){return new Headers}),arguments)}function ke(_,e){try{var t={a:_,b:e};const r=new Promise(((_,e)=>{const r=t.a;t.a=0;try{return function(_,e,t,r){n.closure72_externref_shim(_,e,t,r)}(r,t.b,_,e)}finally{t.a=r}}));return r}finally{t.a=t.b=0}}function je(){return new Object}function Oe(){return new Map}function Se(){return new Array}function Ae(){return new Error}function De(){return p((function(){return new FormData}),arguments)}function qe(_){return new Uint8Array(_)}function Ee(_,e){return new Error(d(_,e))}function Ie(){return p((function(){return new AbortController}),arguments)}function He(_,e){return new Function(d(_,e))}function Je(_,e,t){return new Uint8Array(_,e>>>0,t>>>0)}function Me(_){return new Uint8Array(_>>>0)}function Ce(){return p((function(_,e,t){return new Request(d(_,e),t)}),arguments)}function Ge(){return p((function(_,e){return new Blob(_,e)}),arguments)}function We(_){return _.next}function Le(){return p((function(_){return _.next()}),arguments)}function Ne(){return p((function(_){return _.next()}),arguments)}function Be(_){return _.node}function Ue(_){return Z.__wrap(_)}function $e(_){return Z.__unwrap(_)}function Pe(_){return __.__wrap(_)}function Qe(_){return __.__unwrap(_)}function Te(){return p((function(_,e){_.postMessage(e)}),arguments)}function Ye(_){return _.process}function Ke(_,e){return _.push(e)}function Ve(_){queueMicrotask(_)}function Ze(_){return _.queueMicrotask}function Xe(){return p((function(_,e){_.randomFillSync(e)}),arguments)}function _t(_){return r_.__wrap(_)}function et(_){return r_.__unwrap(_)}function tt(_,e,t){return _.removeEntry(d(e,t))}function nt(_,e,t,n){return _.removeEntry(d(e,t),n)}function rt(){return p((function(){return _.require}),arguments)}function it(_){return Promise.resolve(_)}function at(){return p((function(_,e){_.respond(e>>>0)}),arguments)}function st(){return p((function(_,e){return _.seek(e)}),arguments)}function ot(_,e,t){_[e]=t}function gt(_,e,t){_[e>>>0]=t}function ct(_,e,t){_.set(e,t>>>0)}function bt(_,e,t){return _.set(e,t)}function wt(_,e){_.body=e}function ut(_,e){_.create=0!==e}function dt(_,e){_.create=0!==e}function lt(_,e){_.credentials=S[e]}function pt(_,e){_.headers=e}function ft(_,e){_.keepExistingData=0!==e}function yt(_,e,t){_.method=d(e,t)}function ht(_,e){_.mode=A[e]}function mt(_,e){_.recursive=0!==e}function vt(_,e){_.signal=e}function Rt(_,e,t){_.type=d(e,t)}function Ft(_){return a_.__wrap(_)}function zt(_){return a_.__unwrap(_)}function xt(_){return _.signal}function kt(_){return _.size}function jt(_){return c_.__wrap(_)}function Ot(_){return c_.__unwrap(_)}function St(_,e){const t=c(e.stack,n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function At(){const _="undefined"==typeof global?null:global;return f(_)?0:l(_)}function Dt(){const _="undefined"==typeof globalThis?null:globalThis;return f(_)?0:l(_)}function qt(){const _="undefined"==typeof self?null:self;return f(_)?0:l(_)}function Et(){const _="undefined"==typeof window?null:window;return f(_)?0:l(_)}function It(_){return _.status}function Ht(){return p((function(_){return JSON.stringify(_)}),arguments)}function Jt(_,e,t){return _.subarray(e>>>0,t>>>0)}function Mt(_){return _.text()}function Ct(_,e){return _.then(e)}function Gt(_,e,t){return _.then(e,t)}function Wt(_,e){const t=c(e.url,n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function Lt(_){return _.value}function Nt(_){return _.versions}function Bt(_){const e=_.view;return f(e)?0:l(e)}function Ut(_){console.warn(_)}function $t(){return p((function(_,e){return _.write(e)}),arguments)}function Pt(_){return+_}function Qt(_){return BigInt.asUintN(64,_)}function Tt(_,e){const t="bigint"==typeof e?e:void 0;w().setBigInt64(_+8,f(t)?BigInt(0):t,!0),w().setInt32(_+0,!f(t),!0)}function Yt(_){return"boolean"==typeof _?_?1:0:2}function Kt(_){const e=_.original;return 1==e.cnt--&&(e.a=0,!0)}function Vt(_,e,t){const r=function(_,e,t,r){const i={a:_,b:e,cnt:1,dtor:148},a=(..._)=>{i.cnt++;const e=i.a;i.a=0;try{return r(e,i.b,..._)}finally{0==--i.cnt?(n.__wbindgen_export_6.get(i.dtor)(e,i.b),y.unregister(i)):i.a=e}};return a.original=i,y.register(a,i,i),a}(_,e,0,O);return r}function Zt(_,e){const t=c(h(e),n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function Xt(_,e){return new Error(d(_,e))}function _n(_,e){return _ in e}function en(){const _=n.__wbindgen_export_4,e=_.grow(4);_.set(0,void 0),_.set(e+0,void 0),_.set(e+1,null),_.set(e+2,!0),_.set(e+3,!1)}function tn(_){return"bigint"==typeof _}function nn(_){return"function"==typeof _}function rn(_){return"object"==typeof _&&null!==_}function an(_){return"string"==typeof _}function sn(_){return void 0===_}function on(_,e){return _===e}function gn(_,e){return _==e}function cn(){return n.memory}function bn(_,e){const t="number"==typeof e?e:void 0;w().setFloat64(_+8,f(t)?0:t,!0),w().setInt32(_+0,!f(t),!0)}function wn(_){return _}function un(_,e){const t="string"==typeof e?e:void 0;var r=f(t)?0:c(t,n.__wbindgen_malloc,n.__wbindgen_realloc),a=i;w().setInt32(_+4,a,!0),w().setInt32(_+0,r,!0)}function dn(_,e){return d(_,e)}function ln(_,e){throw new Error(d(_,e))}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_themessettings_free(_>>>0,1)))},507:(_,e,t)=>{t.a(_,(async(_,n)=>{try{t.d(e,{Ay:()=>g,RC:()=>o,Y$:()=>a,wS:()=>s});var r=t(519),i=_([r]);async function a(_,e){if(e){const t="https://keadex.dev/api/download-gh-raw-file",n={headers:{"Keadex-Gh-Url":_}};return e&&(n.headers["Keadex-Gh-Authorization"]=e),await fetch(t,n)}return await fetch(_)}async function s(_,e,t){let n,i,s;try{n=(0,r._Cc)(_),i=(0,r.Llp)(_,e),s=(0,r.JD7)(_,e)}catch(_){throw console.error(_),new Error("Invalid URL: the provided URL is an invalid Mina project or diagram.")}if(n&&i&&s){let _,e,r;try{const o=await a(n,t),g=await a(i,t),c=await a(s,t);if(o.ok&&g.ok&&c.ok)return _=await o.text(),e=await g.text(),r=await c.text(),{projectSettingsJson:_,plantuml:e,spec:r};throw new Error}catch(_){throw console.error(_),new Error("Diagram or project settings not found. Please verify the URLs provided, or, if linking to a private repository, ensure the GitHub token is configured.")}}}async function o(_,e,t){try{const i=await s(_,e,t);var n;if(i)return{diagram:await(0,r.Oxg)(_,e,i.plantuml,i.spec),diagramsThemeSettings:null==(n=JSON.parse(i.projectSettingsJson).themes_settings)?void 0:n.diagrams_theme_settings}}catch(_){console.error(_)}}r=(i.then?(await i)():i)[0];const g={fetchGhRawFile:a,downloadDiagramData:s,openRemoteProjectDiagram:o};n()}catch(c){n(c)}}))},519:(_,e,t)=>{t.a(_,(async(_,n)=>{try{t.d(e,{JD7:()=>i.JD7,Llp:()=>i.Llp,Oxg:()=>i.Oxg,_Cc:()=>i._Cc});var r=t(196),i=t(457),a=_([r]);r=(a.then?(await a)():a)[0],(0,i.lIU)(r),r.__wbindgen_start(),n()}catch(_){n(_)}}))}},i={};function a(_){var e=i[_];if(void 0!==e)return e.exports;var t=i[_]={id:_,loaded:!1,exports:{}};return r[_](t,t.exports,a),t.loaded=!0,t.exports}_="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",e="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",n=_=>{_&&_.d<1&&(_.d=1,_.forEach((_=>_.r--)),_.forEach((_=>_.r--?_.r++:_())))},a.a=(r,i,a)=>{var s;a&&((s=[]).d=-1);var o,g,c,b=new Set,w=r.exports,u=new Promise(((_,e)=>{c=e,g=_}));u[e]=w,u[_]=_=>(s&&_(s),b.forEach(_),u.catch((_=>{}))),r.exports=u,i((r=>{var i;o=(r=>r.map((r=>{if(null!==r&&"object"==typeof r){if(r[_])return r;if(r.then){var i=[];i.d=0,r.then((_=>{a[e]=_,n(i)}),(_=>{a[t]=_,n(i)}));var a={};return a[_]=_=>_(i),a}}var s={};return s[_]=_=>{},s[e]=r,s})))(r);var a=()=>o.map((_=>{if(_[t])throw _[t];return _[e]})),g=new Promise((e=>{(i=()=>e(a)).r=0;var t=_=>_!==s&&!b.has(_)&&(b.add(_),_&&!_.d&&(i.r++,_.push(i)));o.map((e=>e[_](t)))}));return i.r?g:a()}),(_=>(_?c(u[t]=_):g(w),n(s)))),s&&s.d<0&&(s.d=0)},a.d=(_,e)=>{for(var t in e)a.o(e,t)&&!a.o(_,t)&&Object.defineProperty(_,t,{enumerable:!0,get:e[t]})},a.hmd=_=>((_=Object.create(_)).children||(_.children=[]),Object.defineProperty(_,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+_.id)}}),_),a.o=(_,e)=>Object.prototype.hasOwnProperty.call(_,e),a.v=(_,e,t,n)=>Promise.all([import("fs"),import("url")]).then((([{readFile:_},{URL:e}])=>new Promise(((n,r)=>{_(new e(t+".module.wasm",import.meta.url),((_,e)=>{if(_)return r(_);n({arrayBuffer:()=>e})}))})))).then((_=>_.arrayBuffer())).then((_=>WebAssembly.instantiate(_,n))).then((e=>Object.assign(_,e.instance.exports)));var s=a(507),o=(s=await s).Ay,g=s.wS,c=s.Y$,b=s.RC;export{o as default,g as downloadDiagramData,c as fetchGhRawFile,b as openRemoteProjectDiagram};
1
+ var e,_,t,n,r={196:(e,_,t)=>{var n=t(457);e.exports=t.v(_,e.id,"e8590bb9b6876c786962",{"./mina_react_bg.js":{__wbg_log_c222819a41e063d3:n.pR9,__wbg_info_3daf2e093e091b66:n.ZrD,__wbg_warn_4ca3906c248c47c4:n.jwJ,__wbg_debug_3cb59063b29f58c1:n.F$t,__wbg_error_524f506f44df1645:n.pWA,__wbindgen_string_new:n.ycJ,__wbindgen_string_get:n.qNE,__wbindgen_bigint_get_as_i64:n.DMD,__wbindgen_memory:n.Py0,__wbindgen_throw:n.Qnr,__wbindgen_debug_string:n.rl,__wbg_new_5e0be73521bc8c17:n.aIY,__wbg_new_78feb108b6472713:n.M2,__wbindgen_number_new:n.QRK,__wbg_new_405e22f390576ce2:n.va5,__wbg_newnoargs_105ed471475aaf50:n.VrZ,__wbg_new_a12002a7f91c75be:n.vVD,__wbg_stringify_f7ed6987935b4a24:n.Y6F,__wbindgen_is_function:n.PRY,__wbindgen_is_string:n.GuA,__wbindgen_is_object:n.qvD,__wbg_next_25feadfc0913fea9:n.yqB,__wbg_buffer_609cc3eee51ed158:n.FHK,__wbg_byteLength_e674b853d9c77e1d:n.x6W,__wbg_byteOffset_fd862df290ef848d:n.cyg,__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a:n.hI8,__wbg_length_a446193dc22c12f8:n.eIr,__wbg_set_65595bdd868b3009:n.HBq,__wbg_newwithlength_a381634e90c276d4:n.HtP,__wbg_buffer_09165b52af8c5237:n._Ue,__wbg_subarray_aa9065fa9dc5df96:n.TOc,__wbg_done_769e5ede4b31c67b:n.Xb8,__wbg_value_cd1ffa7b1ab794f1:n.LMq,__wbg_next_c3ab0d59847b3b5c:n.tER,__wbg_instanceof_Error_4d54113b22d20306:n.fcg,__wbg_instanceof_Uint8Array_17156bcf118086a9:n.SJf,__wbg_instanceof_ArrayBuffer_e14585432e3737fc:n.gGA,__wbg_set_8fc6bf8a5b1071d1:n.iAh,__wbg_get_b9b93047fe3cf45b:n.RKz,__wbg_set_37837023f3d740e8:n.p8e,__wbg_length_e2d2a49132c1b256:n.Ry,__wbg_push_737cfc8c1432c2c6:n.tZf,__wbg_isArray_a1eab7e0d067391b:n.uod,__wbg_new_c68d7209be747379:n.wd3,__wbg_message_97a2af9b89d693a3:n.oGe,__wbg_isSafeInteger_343e2beeeece1bb0:n.Yb6,__wbg_entries_3265d4158b33e5dc:n.gHg,__wbg_iterator_9a24c88df860dc65:n.eW0,__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0:n.w6e,__wbindgen_is_undefined:n.vUM,__wbg_call_672a4d21634d4a24:n.wHY,__wbg_static_accessor_SELF_37c5d418e4bf5819:n.fb$,__wbg_static_accessor_GLOBAL_88a902d13a557d07:n.ii7,__wbg_static_accessor_WINDOW_5de37043a91a9c40:n.x0C,__wbg_new_23a2665fac83c611:n.c6u,__wbg_then_44b73946d2fb3e7d:n.GQG,__wbg_then_48b406749878a531:n.xV_,__wbg_resolve_4851785c9c5f573d:n.wJz,__wbg_call_7cccdd69e0791ae2:n.w9h,__wbg_next_6574e1a8a62d1055:n.Dn4,__wbindgen_number_get:n.sWe,__wbg_get_67b2ba62fc30de12:n.dzD,__wbg_setmethod_3c5280fe5d890842:n._hX,__wbg_setsignal_75b21ef3a81de905:n.l0x,__wbg_setcredentials_c3a22f1cd105a2c6:n.uw1,__wbg_setheaders_834c0bdb6a8949ad:n.rk2,__wbg_instanceof_FileSystemFileHandle_d3d037cf85ee546c:n.KA3,__wbg_createWritable_b4ed240dc879905e:n.kPb,__wbg_getFile_2607bc0123c724e0:n.ycy,__wbg_byobRequest_77d9adf63337edfb:n.JpR,__wbg_close_5ce03e29be453811:n.sQY,__wbg_close_24caca68e93b9c03:n.jeC,__wbg_postMessage_83a8d58d3fcb6c13:n.A2$,__wbg_instanceof_FileSystemDirectoryHandle_0906fc139d75557b:n.Cjr,__wbg_removeEntry_9f6bc325e3383e59:n.m_N,__wbg_removeEntry_a424e90dff229b19:n.lkn,__wbg_getFileHandle_5fb877d1ecc74d52:n.Wkh,__wbg_getDirectoryHandle_c48a138373d79b3d:n.kTu,__wbg_entries_19efe296f7d36df9:n.RCF,__wbg_setrecursive_536113a081d6177a:n.ugc,__wbg_new_018dcc2d6c8c2f6a:n.RR8,__wbg_append_8c7dd8d641a5f01b:n.Tbm,__wbg_name_e4a115def9e2bbaa:n.Yeo,__wbg_setcreate_139bad94b2874fb5:n.kF0,__wbg_seek_3f0f8d7591f648d7:n.Zk3,__wbg_write_397d977609afc729:n.Vob,__wbg_newwithstrandinit_06c535e0a867c635:n.heb,__wbg_append_299d5d48292c0495:n.cVx,__wbg_append_b44785ebeb668479:n.d_N,__wbg_append_b2d1fc16de2a0e81:n.WqA,__wbg_new_9fd39a253424609a:n.z09,__wbg_respond_1f279fa9f8edcb1c:n.dSQ,__wbg_view_fd8a56e8983f448d:n.NgT,__wbg_setbody_5923b78a95eedf29:n.Nhd,__wbg_setmode_5dc300b865044b65:n.BFX,__wbg_setkeepexistingdata_ee7c8cb466e9477f:n.aKt,__wbg_instanceof_File_a4e2256bf71955a9:n.gjJ,__wbg_lastModified_7a9e61b3961224b8:n.gvw,__wbg_instanceof_Response_f2cc20d9f7dfd644:n.Hzn,__wbg_arrayBuffer_d1b44c4390db422f:n._iy,__wbg_url_ae10c34ca209681d:n.Tp3,__wbg_status_f6360336ca686bf0:n.kK3,__wbg_headers_9cb51cfd2ac780a4:n.Moj,__wbg_new_e25e5aab09ff45db:n.RG9,__wbg_abort_775ef1d17fc65868:n.gMQ,__wbg_signal_aaf9ad74119f20a4:n.CF8,__wbg_settype_39ed370d3edd403c:n.a4S,__wbg_setcreate_4ca762e23d9f78da:n.N9Q,__wbg_enqueue_bb16ba72f537dc9e:n.QHd,__wbg_close_304cc1fef3466669:n.oaw,__wbg_has_a5ea9117f258a0ec:n.HSm,__wbg_fetch_4465c2b10f21a927:n.o0R,__wbg_fetch_509096533071c657:n.gRe,__wbg_arrayBuffer_f18c144cd0125f07:n.RGi,__wbg_newwithu8arraysequenceandoptions_068570c487f69127:n.qe7,__wbg_size_3808d41635a9c259:n.$CF,__wbg_text_1f39a8afe3c70a99:n.CFe,__wbg_queueMicrotask_97d92b4fcc8a61c5:n._mt,__wbg_queueMicrotask_d3219def82552485:n.k2R,__wbindgen_cb_drop:n.LCp,__wbg_point_unwrap:n._QJ,__wbg_boundary_unwrap:n.Wq,__wbg_person_unwrap:n.Xv$,__wbg_container_unwrap:n.xB8,__wbindgen_jsval_loose_eq:n.U8c,__wbindgen_boolean_get:n.NhE,__wbindgen_as_number:n.qmw,__wbindgen_error_new:n.RjG,__wbg_getwithrefkey_2d7fdfea9645a25b:n.A2U,__wbg_set_2873a5cee2324875:n.v1k,__wbg_String_1b2069caba3b9783:n.JF5,__wbindgen_bigint_from_u64:n.Qg3,__wbindgen_in:n.zEy,__wbg_crypto_ed58b8e10a292839:n.ilI,__wbg_process_5c1d670bc53614b8:n.Evb,__wbg_versions_c71aa1626a93e0a1:n.ooJ,__wbg_node_02999533c4ea02e3:n.OtZ,__wbg_require_79b1e9274cde3c87:n.Ltb,__wbg_msCrypto_0a36e2ec3a343d26:n.HOd,__wbg_randomFillSync_ab2cfe79ebbf2740:n.NNx,__wbg_getRandomValues_bcb4912f16000dc4:n.FGp,__wbindgen_is_bigint:n.YkQ,__wbindgen_jsval_eq:n.BGI,__wbg_relationship_unwrap:n.KM7,__wbg_new_8a6f238a6ece86ea:n.$Pc,__wbg_stack_0ed75d68575b0f3c:n.x$X,__wbg_error_7534b8e9a36f1ab4:n.WYM,__wbg_deploymentnode_unwrap:n._Zx,__wbg_minaerror_new:n.EkI,__wbg_diagramelementspec_new:n.Dr_,__wbg_shape_new:n._cl,__wbg_shape_unwrap:n.D7n,__wbg_softwaresystem_new:n.dM0,__wbg_person_new:n.c1W,__wbg_container_new:n.e57,__wbg_component_new:n.WJm,__wbg_point_new:n.nA9,__wbg_deploymentnode_new:n.ezj,__wbg_relationship_new:n.NpJ,__wbg_boundary_new:n.HCo,__wbg_component_unwrap:n.dT0,__wbg_softwaresystem_unwrap:n.qre,__wbg_diagramelementspec_unwrap:n.W3f,__wbindgen_closure_wrapper3317:n.TiG,__wbindgen_init_externref_table:n.bLn}})},457:(e,_,t)=>{let n;function r(e){n=e}t.d(_,{$CF:()=>ht,$Pc:()=>F_,A2$:()=>N_,A2U:()=>Ke,BFX:()=>wt,BGI:()=>en,CF8:()=>yt,CFe:()=>At,Cjr:()=>t_,D7n:()=>pt,DMD:()=>Nt,Dn4:()=>I_,Dr_:()=>Ie,EkI:()=>f_,Evb:()=>B_,F$t:()=>De,FGp:()=>Pe,FHK:()=>le,GQG:()=>Dt,GuA:()=>Zt,HBq:()=>nt,HCo:()=>ue,HOd:()=>l_,HSm:()=>Ve,HtP:()=>A_,Hzn:()=>i_,JD7:()=>j,JF5:()=>ie,JpR:()=>pe,KA3:()=>n_,KM7:()=>Q_,LCp:()=>Ut,LMq:()=>It,Llp:()=>k,Ltb:()=>V_,M2:()=>R_,Moj:()=>Ze,N9Q:()=>st,NNx:()=>$_,NgT:()=>Jt,NhE:()=>Bt,Nhd:()=>it,NpJ:()=>P_,OtZ:()=>J_,Oxg:()=>z,PRY:()=>Kt,Py0:()=>tn,QHd:()=>Me,QRK:()=>rn,Qg3:()=>Wt,Qnr:()=>an,RCF:()=>Ge,RG9:()=>k_,RGi:()=>we,RKz:()=>Ye,RR8:()=>y_,RjG:()=>$t,Ry:()=>w_,SJf:()=>o_,TOc:()=>St,Tbm:()=>ae,TiG:()=>Lt,Tp3:()=>Et,U8c:()=>_n,Vob:()=>Gt,VrZ:()=>O_,W3f:()=>He,WJm:()=>xe,WYM:()=>Ne,Wkh:()=>Te,Wq:()=>de,WqA:()=>ge,Xb8:()=>Je,Xv$:()=>G_,Y6F:()=>Ot,Yb6:()=>a_,Yeo:()=>p_,YkQ:()=>Yt,Zk3:()=>et,ZrD:()=>Xe,_Cc:()=>m,_QJ:()=>W_,_Ue:()=>fe,_Zx:()=>Ee,_cl:()=>lt,_hX:()=>bt,_iy:()=>be,_mt:()=>L_,a4S:()=>ft,aIY:()=>v_,aKt:()=>ct,bLn:()=>Qt,c1W:()=>M_,c6u:()=>h_,cVx:()=>se,cyg:()=>he,dM0:()=>mt,dSQ:()=>X_,dT0:()=>je,d_N:()=>ce,dzD:()=>Qe,e57:()=>ke,eIr:()=>b_,eW0:()=>g_,ezj:()=>qe,fb$:()=>xt,fcg:()=>__,gGA:()=>e_,gHg:()=>Ce,gMQ:()=>oe,gRe:()=>Ue,gjJ:()=>r_,gvw:()=>c_,hI8:()=>S_,heb:()=>D_,iAh:()=>rt,ii7:()=>Ft,ilI:()=>Ae,jeC:()=>Re,jwJ:()=>Mt,k2R:()=>T_,kF0:()=>ot,kK3:()=>kt,kPb:()=>Se,kTu:()=>Le,l0x:()=>dt,lIU:()=>r,lkn:()=>K_,m_N:()=>Y_,nA9:()=>C_,o0R:()=>Be,oGe:()=>d_,oaw:()=>Fe,ooJ:()=>Ht,p8e:()=>tt,pR9:()=>u_,pWA:()=>We,qNE:()=>on,qe7:()=>q_,qmw:()=>Ct,qre:()=>vt,qvD:()=>Vt,rk2:()=>gt,rl:()=>Tt,sQY:()=>ze,sWe:()=>nn,tER:()=>H_,tZf:()=>U_,ugc:()=>ut,uod:()=>s_,uw1:()=>at,v1k:()=>_t,vUM:()=>Xt,vVD:()=>x_,va5:()=>m_,w6e:()=>zt,w9h:()=>ve,wHY:()=>me,wJz:()=>Z_,wd3:()=>j_,x$X:()=>Rt,x0C:()=>jt,x6W:()=>ye,xB8:()=>Oe,xV_:()=>qt,ycJ:()=>sn,ycy:()=>$e,yqB:()=>E_,z09:()=>z_,zEy:()=>Pt}),e=t.hmd(e);let i=0,o=null;function s(){return null!==o&&0!==o.byteLength||(o=new Uint8Array(n.memory.buffer)),o}let a=new("undefined"==typeof TextEncoder?(0,e.require)("util").TextEncoder:TextEncoder)("utf-8");const g="function"==typeof a.encodeInto?function(e,_){return a.encodeInto(e,_)}:function(e,_){const t=a.encode(e);return _.set(t),{read:e.length,written:t.length}};function c(e,_,t){if(void 0===t){const t=a.encode(e),n=_(t.length,1)>>>0;return s().subarray(n,n+t.length).set(t),i=t.length,n}let n=e.length,r=_(n,1)>>>0;const o=s();let c=0;for(;c<n;c++){const _=e.charCodeAt(c);if(_>127)break;o[r+c]=_}if(c!==n){0!==c&&(e=e.slice(c)),r=t(r,n,n=c+3*e.length,1)>>>0;const _=s().subarray(r+c,r+n);c+=g(e,_).written,r=t(r,n,c,1)>>>0}return i=c,r}let b=null;function w(){return(null===b||!0===b.buffer.detached||void 0===b.buffer.detached&&b.buffer!==n.memory.buffer)&&(b=new DataView(n.memory.buffer)),b}let u=new("undefined"==typeof TextDecoder?(0,e.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});function d(e,_){return e>>>=0,u.decode(s().subarray(e,e+_))}function f(e){const _=n.__externref_table_alloc();return n.__wbindgen_export_4.set(_,e),_}function l(e,_){try{return e.apply(this,_)}catch(e){const _=f(e);n.__wbindgen_exn_store(_)}}function p(e){return null==e}u.decode();const y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>{n.__wbindgen_export_6.get(e.dtor)(e.a,e.b)}));function h(e){const _=typeof e;if("number"==_||"boolean"==_||null==e)return`${e}`;if("string"==_)return`"${e}"`;if("symbol"==_){const _=e.description;return null==_?"Symbol":`Symbol(${_})`}if("function"==_){const _=e.name;return"string"==typeof _&&_.length>0?`Function(${_})`:"Function"}if(Array.isArray(e)){const _=e.length;let t="[";_>0&&(t+=h(e[0]));for(let n=1;n<_;n++)t+=", "+h(e[n]);return t+="]",t}const t=/\[object ([^\]]+)\]/.exec(toString.call(e));let n;if(!(t&&t.length>1))return toString.call(e);if(n=t[1],"Object"==n)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:n}function m(e){let _,t;try{const r=c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),o=i,s=n.project_settings_url(r,o);return _=s[0],t=s[1],d(s[0],s[1])}finally{n.__wbindgen_free(_,t,1)}}function v(e,_){if(!(e instanceof _))throw new Error(`expected instance of ${_.name}`)}function R(e,_){e>>>=0;const t=w(),r=[];for(let i=e;i<e+4*_;i+=4)r.push(n.__wbindgen_export_4.get(t.getUint32(i,!0)));return n.__externref_drop_slice(e,_),r}function F(e,_){const t=_(4*e.length,4)>>>0;for(let _=0;_<e.length;_++){const n=f(e[_]);w().setUint32(t+4*_,n,!0)}return i=e.length,t}function z(e,_,t,r){return n.open_remote_diagram(e,_,t,r)}function x(e){const _=n.__wbindgen_export_4.get(e);return n.__externref_table_dealloc(e),_}function j(e,_){let t,r;try{const a=c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),g=i,b=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=i,u=n.diagram_spec_url_from_diagram_url(a,g,b,w);var o=u[0],s=u[1];if(u[3])throw o=0,s=0,x(u[2]);return t=o,r=s,d(o,s)}finally{n.__wbindgen_free(t,r,1)}}function k(e,_){let t,r;try{const a=c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),g=i,b=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),w=i,u=n.diagram_plantuml_url_from_diagram_url(a,g,b,w);var o=u[0],s=u[1];if(u[3])throw o=0,s=0,x(u[2]);return t=o,r=s,d(o,s)}finally{n.__wbindgen_free(t,r,1)}}function O(e,_,t){n.closure976_externref_shim(e,_,t)}const S=["omit","same-origin","include"],A=["same-origin","no-cors","cors","navigate"];"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_aisettings_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_addelementtag_free(e>>>0,1)));const D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>n.__wbg_baseelement_free(e>>>0,1)));class q{static __wrap(e){e>>>=0;const _=Object.create(q.prototype);return _.__wbg_ptr=e,D.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_baseelement_free(e,0)}get alias(){const e=n.__wbg_get_baseelement_alias(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set alias(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_alias(this.__wbg_ptr,_,t)}get label(){const e=n.__wbg_get_baseelement_label(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set label(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_label(this.__wbg_ptr,_,t)}get description(){const e=n.__wbg_get_baseelement_description(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set description(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_description(this.__wbg_ptr,_,t)}get sprite(){const e=n.__wbg_get_baseelement_sprite(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set sprite(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_sprite(this.__wbg_ptr,_,t)}get tags(){const e=n.__wbg_get_baseelement_tags(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set tags(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_tags(this.__wbg_ptr,_,t)}get link(){const e=n.__wbg_get_baseelement_link(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set link(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_link(this.__wbg_ptr,_,t)}get uuid(){const e=n.__wbg_get_baseelement_uuid(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set uuid(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_uuid(this.__wbg_ptr,_,t)}get notes(){const e=n.__wbg_get_baseelement_notes(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set notes(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_notes(this.__wbg_ptr,_,t)}}const E="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>n.__wbg_boundary_free(e>>>0,1)));class I{static __wrap(e){e>>>=0;const _=Object.create(I.prototype);return _.__wbg_ptr=e,E.register(_,_.__wbg_ptr,_),_}static __unwrap(e){return e instanceof I?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,E.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_boundary_free(e,0)}get base_data(){const e=n.__wbg_get_boundary_base_data(this.__wbg_ptr);return q.__wrap(e)}set base_data(e){v(e,q);var _=e.__destroy_into_raw();n.__wbg_set_boundary_base_data(this.__wbg_ptr,_)}get boundary_type(){return n.__wbg_get_boundary_boundary_type(this.__wbg_ptr)}set boundary_type(e){n.__wbg_set_boundary_boundary_type(this.__wbg_ptr,p(e)?0:f(e))}get boundary_custom_type(){const e=n.__wbg_get_boundary_boundary_custom_type(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set boundary_custom_type(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_addelementtag_legend_sprite(this.__wbg_ptr,_,t)}get sub_elements(){const e=n.__wbg_get_boundary_sub_elements(this.__wbg_ptr);var _=R(e[0],e[1]).slice();return n.__wbindgen_free(e[0],4*e[1],4),_}set sub_elements(e){const _=F(e,n.__wbindgen_malloc),t=i;n.__wbg_set_boundary_sub_elements(this.__wbg_ptr,_,t)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_c4elements_free(e>>>0,1)));const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>n.__wbg_component_free(e>>>0,1)));class J{static __wrap(e){e>>>=0;const _=Object.create(J.prototype);return _.__wbg_ptr=e,H.register(_,_.__wbg_ptr,_),_}static __unwrap(e){return e instanceof J?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_component_free(e,0)}get base_data(){const e=n.__wbg_get_component_base_data(this.__wbg_ptr);return q.__wrap(e)}set base_data(e){v(e,q);var _=e.__destroy_into_raw();n.__wbg_set_component_base_data(this.__wbg_ptr,_)}get technology(){const e=n.__wbg_get_component_technology(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set technology(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_component_technology(this.__wbg_ptr,_,t)}get component_type(){return n.__wbg_get_component_component_type(this.__wbg_ptr)}set component_type(e){n.__wbg_set_component_component_type(this.__wbg_ptr,p(e)?0:f(e))}}const M="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>n.__wbg_container_free(e>>>0,1)));class G{static __wrap(e){e>>>=0;const _=Object.create(G.prototype);return _.__wbg_ptr=e,M.register(_,_.__wbg_ptr,_),_}static __unwrap(e){return e instanceof G?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,M.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_container_free(e,0)}get base_data(){const e=n.__wbg_get_container_base_data(this.__wbg_ptr);return q.__wrap(e)}set base_data(e){v(e,q);var _=e.__destroy_into_raw();n.__wbg_set_container_base_data(this.__wbg_ptr,_)}get technology(){const e=n.__wbg_get_container_technology(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set technology(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_container_technology(this.__wbg_ptr,_,t)}get container_type(){return n.__wbg_get_container_container_type(this.__wbg_ptr)}set container_type(e){n.__wbg_set_container_container_type(this.__wbg_ptr,p(e)?0:f(e))}}const C="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>n.__wbg_deploymentnode_free(e>>>0,1)));class W{static __wrap(e){e>>>=0;const _=Object.create(W.prototype);return _.__wbg_ptr=e,C.register(_,_.__wbg_ptr,_),_}static __unwrap(e){return e instanceof W?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,C.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_deploymentnode_free(e,0)}get base_data(){const e=n.__wbg_get_boundary_base_data(this.__wbg_ptr);return q.__wrap(e)}set base_data(e){v(e,q);var _=e.__destroy_into_raw();n.__wbg_set_boundary_base_data(this.__wbg_ptr,_)}get deploymeny_node_custom_type(){const e=n.__wbg_get_deploymentnode_deploymeny_node_custom_type(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set deploymeny_node_custom_type(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_addelementtag_legend_sprite(this.__wbg_ptr,_,t)}get deployment_node_type(){return n.__wbg_get_deploymentnode_deployment_node_type(this.__wbg_ptr)}set deployment_node_type(e){n.__wbg_set_deploymentnode_deployment_node_type(this.__wbg_ptr,p(e)?0:f(e))}get sub_elements(){const e=n.__wbg_get_deploymentnode_sub_elements(this.__wbg_ptr);var _=R(e[0],e[1]).slice();return n.__wbindgen_free(e[0],4*e[1],4),_}set sub_elements(e){const _=F(e,n.__wbindgen_malloc),t=i;n.__wbg_set_boundary_sub_elements(this.__wbg_ptr,_,t)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_diagram_free(e>>>0,1)));const N="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>n.__wbg_diagramelementspec_free(e>>>0,1)));class B{static __wrap(e){e>>>=0;const _=Object.create(B.prototype);return _.__wbg_ptr=e,N.register(_,_.__wbg_ptr,_),_}static __unwrap(e){return e instanceof B?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_diagramelementspec_free(e,0)}get alias(){const e=n.__wbg_get_diagramelementspec_alias(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set alias(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramelementspec_alias(this.__wbg_ptr,_,t)}get from(){const e=n.__wbg_get_diagramelementspec_from(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set from(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramelementspec_from(this.__wbg_ptr,_,t)}get to(){const e=n.__wbg_get_diagramelementspec_to(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set to(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramelementspec_to(this.__wbg_ptr,_,t)}get shapes(){const e=n.__wbg_get_diagramelementspec_shapes(this.__wbg_ptr);let _;return 0!==e[0]&&(_=R(e[0],e[1]).slice(),n.__wbindgen_free(e[0],4*e[1],4)),_}set shapes(e){var _=p(e)?0:F(e,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramelementspec_shapes(this.__wbg_ptr,_,t)}get element_type(){return n.__wbg_get_diagramelementspec_element_type(this.__wbg_ptr)}set element_type(e){n.__wbg_set_diagramelementspec_element_type(this.__wbg_ptr,p(e)?0:f(e))}get position(){const e=n.__wbg_get_diagramelementspec_position(this.__wbg_ptr);return 0===e?void 0:K.__wrap(e)}set position(e){let _=0;p(e)||(v(e,K),_=e.__destroy_into_raw()),n.__wbg_set_diagramelementspec_position(this.__wbg_ptr,_)}get size(){const e=n.__wbg_get_diagramelementspec_size(this.__wbg_ptr);return 0===e?void 0:te.__wrap(e)}set size(e){let _=0;p(e)||(v(e,te),_=e.__destroy_into_raw()),n.__wbg_set_diagramelementspec_size(this.__wbg_ptr,_)}get inner_specs(){const e=n.__wbg_get_diagramelementspec_inner_specs(this.__wbg_ptr);let _;return 0!==e[0]&&(_=R(e[0],e[1]).slice(),n.__wbindgen_free(e[0],4*e[1],4)),_}set inner_specs(e){var _=p(e)?0:F(e,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramelementspec_inner_specs(this.__wbg_ptr,_,t)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_diagramplantuml_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_diagramspec_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_diagramsthemesettings_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_elementdata_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_hookpayload_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_intounderlyingbytesource_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_intounderlyingsink_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_intounderlyingsource_free(e>>>0,1)));const U="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>n.__wbg_minaerror_free(e>>>0,1)));class L{static __wrap(e){e>>>=0;const _=Object.create(L.prototype);return _.__wbg_ptr=e,U.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,U.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_minaerror_free(e,0)}get code(){return n.__wbg_get_minaerror_code(this.__wbg_ptr)}set code(e){n.__wbg_set_minaerror_code(this.__wbg_ptr,e)}get msg(){let e,_;try{const t=n.__wbg_get_minaerror_msg(this.__wbg_ptr);return e=t[0],_=t[1],d(t[0],t[1])}finally{n.__wbindgen_free(e,_,1)}}set msg(e){const _=c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_minaerror_msg(this.__wbg_ptr,_,t)}}const T="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>n.__wbg_person_free(e>>>0,1)));class ${static __wrap(e){e>>>=0;const _=Object.create($.prototype);return _.__wbg_ptr=e,T.register(_,_.__wbg_ptr,_),_}static __unwrap(e){return e instanceof $?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,T.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_person_free(e,0)}get base_data(){const e=n.__wbg_get_container_base_data(this.__wbg_ptr);return q.__wrap(e)}set base_data(e){v(e,q);var _=e.__destroy_into_raw();n.__wbg_set_container_base_data(this.__wbg_ptr,_)}get person_type(){return n.__wbg_get_person_person_type(this.__wbg_ptr)}set person_type(e){n.__wbg_set_person_person_type(this.__wbg_ptr,p(e)?0:f(e))}}const P="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>n.__wbg_point_free(e>>>0,1)));class Q{static __wrap(e){e>>>=0;const _=Object.create(Q.prototype);return _.__wbg_ptr=e,P.register(_,_.__wbg_ptr,_),_}static __unwrap(e){return e instanceof Q?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_point_free(e,0)}get x(){return n.__wbg_get_point_x(this.__wbg_ptr)}set x(e){n.__wbg_set_point_x(this.__wbg_ptr,e)}get y(){return n.__wbg_get_point_y(this.__wbg_ptr)}set y(e){n.__wbg_set_point_y(this.__wbg_ptr,e)}}const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>n.__wbg_position_free(e>>>0,1)));class K{static __wrap(e){e>>>=0;const _=Object.create(K.prototype);return _.__wbg_ptr=e,Y.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_position_free(e,0)}get left(){const e=n.__wbg_get_position_left(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set left(e){n.__wbg_set_position_left(this.__wbg_ptr,!p(e),p(e)?0:e)}get top(){const e=n.__wbg_get_position_top(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set top(e){n.__wbg_set_position_top(this.__wbg_ptr,!p(e),p(e)?0:e)}get z_index(){const e=n.__wbg_get_position_z_index(this.__wbg_ptr);return 4294967297===e?void 0:e}set z_index(e){n.__wbg_set_position_z_index(this.__wbg_ptr,p(e)?4294967297:0|e)}get angle(){const e=n.__wbg_get_position_angle(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set angle(e){n.__wbg_set_position_angle(this.__wbg_ptr,!p(e),p(e)?0:e)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_project_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_projectlibrary_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_projectsettings_free(e>>>0,1)));const V="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>n.__wbg_relationship_free(e>>>0,1)));class Z{static __wrap(e){e>>>=0;const _=Object.create(Z.prototype);return _.__wbg_ptr=e,V.register(_,_.__wbg_ptr,_),_}static __unwrap(e){return e instanceof Z?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,V.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_relationship_free(e,0)}get base_data(){const e=n.__wbg_get_container_base_data(this.__wbg_ptr);return q.__wrap(e)}set base_data(e){v(e,q);var _=e.__destroy_into_raw();n.__wbg_set_container_base_data(this.__wbg_ptr,_)}get from(){const e=n.__wbg_get_relationship_from(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set from(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_container_technology(this.__wbg_ptr,_,t)}get to(){const e=n.__wbg_get_relationship_to(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set to(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_relationship_to(this.__wbg_ptr,_,t)}get technology(){const e=n.__wbg_get_relationship_technology(this.__wbg_ptr);let _;return 0!==e[0]&&(_=d(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),_}set technology(e){var _=p(e)?0:c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_relationship_technology(this.__wbg_ptr,_,t)}get relationship_type(){return n.__wbg_get_relationship_relationship_type(this.__wbg_ptr)}set relationship_type(e){n.__wbg_set_relationship_relationship_type(this.__wbg_ptr,p(e)?0:f(e))}}const X="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>n.__wbg_shape_free(e>>>0,1)));class ee{static __wrap(e){e>>>=0;const _=Object.create(ee.prototype);return _.__wbg_ptr=e,X.register(_,_.__wbg_ptr,_),_}static __unwrap(e){return e instanceof ee?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,X.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_shape_free(e,0)}get shape_type(){return n.__wbg_get_shape_shape_type(this.__wbg_ptr)}set shape_type(e){n.__wbg_set_shape_shape_type(this.__wbg_ptr,p(e)?0:f(e))}get position(){const e=n.__wbg_get_diagramelementspec_position(this.__wbg_ptr);return 0===e?void 0:K.__wrap(e)}set position(e){let _=0;p(e)||(v(e,K),_=e.__destroy_into_raw()),n.__wbg_set_diagramelementspec_position(this.__wbg_ptr,_)}get size(){const e=n.__wbg_get_diagramelementspec_size(this.__wbg_ptr);return 0===e?void 0:te.__wrap(e)}set size(e){let _=0;p(e)||(v(e,te),_=e.__destroy_into_raw()),n.__wbg_set_diagramelementspec_size(this.__wbg_ptr,_)}}const _e="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>n.__wbg_size_free(e>>>0,1)));class te{static __wrap(e){e>>>=0;const _=Object.create(te.prototype);return _.__wbg_ptr=e,_e.register(_,_.__wbg_ptr,_),_}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,_e.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_size_free(e,0)}get width(){const e=n.__wbg_get_size_width(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set width(e){n.__wbg_set_size_width(this.__wbg_ptr,!p(e),p(e)?0:e)}get height(){const e=n.__wbg_get_size_height(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set height(e){n.__wbg_set_size_height(this.__wbg_ptr,!p(e),p(e)?0:e)}get scale_x(){const e=n.__wbg_get_size_scale_x(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set scale_x(e){n.__wbg_set_size_scale_x(this.__wbg_ptr,!p(e),p(e)?0:e)}get scale_y(){const e=n.__wbg_get_size_scale_y(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set scale_y(e){n.__wbg_set_size_scale_y(this.__wbg_ptr,!p(e),p(e)?0:e)}}const ne="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>n.__wbg_softwaresystem_free(e>>>0,1)));class re{static __wrap(e){e>>>=0;const _=Object.create(re.prototype);return _.__wbg_ptr=e,ne.register(_,_.__wbg_ptr,_),_}static __unwrap(e){return e instanceof re?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ne.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_softwaresystem_free(e,0)}get base_data(){const e=n.__wbg_get_component_base_data(this.__wbg_ptr);return q.__wrap(e)}set base_data(e){v(e,q);var _=e.__destroy_into_raw();n.__wbg_set_component_base_data(this.__wbg_ptr,_)}get system_type(){return n.__wbg_get_softwaresystem_system_type(this.__wbg_ptr)}set system_type(e){n.__wbg_set_softwaresystem_system_type(this.__wbg_ptr,p(e)?0:f(e))}}function ie(e,_){const t=c(String(_),n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(e+4,r,!0),w().setInt32(e+0,t,!0)}function oe(e){e.abort()}function se(){return l((function(e,_,t,n,r){e.append(d(_,t),d(n,r))}),arguments)}function ae(){return l((function(e,_,t,n,r){e.append(d(_,t),d(n,r))}),arguments)}function ge(){return l((function(e,_,t,n,r,i){e.append(d(_,t),n,d(r,i))}),arguments)}function ce(){return l((function(e,_,t,n){e.append(d(_,t),n)}),arguments)}function be(){return l((function(e){return e.arrayBuffer()}),arguments)}function we(e){return e.arrayBuffer()}function ue(e){return I.__wrap(e)}function de(e){return I.__unwrap(e)}function fe(e){return e.buffer}function le(e){return e.buffer}function pe(e){const _=e.byobRequest;return p(_)?0:f(_)}function ye(e){return e.byteLength}function he(e){return e.byteOffset}function me(){return l((function(e,_){return e.call(_)}),arguments)}function ve(){return l((function(e,_,t){return e.call(_,t)}),arguments)}function Re(e){return e.close()}function Fe(){return l((function(e){e.close()}),arguments)}function ze(){return l((function(e){e.close()}),arguments)}function xe(e){return J.__wrap(e)}function je(e){return J.__unwrap(e)}function ke(e){return G.__wrap(e)}function Oe(e){return G.__unwrap(e)}function Se(e,_){return e.createWritable(_)}function Ae(e){return e.crypto}function De(e){console.debug(e)}function qe(e){return W.__wrap(e)}function Ee(e){return W.__unwrap(e)}function Ie(e){return B.__wrap(e)}function He(e){return B.__unwrap(e)}function Je(e){return e.done}function Me(){return l((function(e,_){e.enqueue(_)}),arguments)}function Ge(e){return e.entries()}function Ce(e){return Object.entries(e)}function We(e){console.error(e)}function Ne(e,_){let t,r;try{t=e,r=_,console.error(d(e,_))}finally{n.__wbindgen_free(t,r,1)}}function Be(e){return fetch(e)}function Ue(e,_){return e.fetch(_)}function Le(e,_,t,n){return e.getDirectoryHandle(d(_,t),n)}function Te(e,_,t,n){return e.getFileHandle(d(_,t),n)}function $e(e){return e.getFile()}function Pe(){return l((function(e,_){e.getRandomValues(_)}),arguments)}function Qe(){return l((function(e,_){return Reflect.get(e,_)}),arguments)}function Ye(e,_){return e[_>>>0]}function Ke(e,_){return e[_]}function Ve(){return l((function(e,_){return Reflect.has(e,_)}),arguments)}function Ze(e){return e.headers}function Xe(e){console.info(e)}function e_(e){let _;try{_=e instanceof ArrayBuffer}catch(e){_=!1}return _}function __(e){let _;try{_=e instanceof Error}catch(e){_=!1}return _}function t_(e){let _;try{_=e instanceof FileSystemDirectoryHandle}catch(e){_=!1}return _}function n_(e){let _;try{_=e instanceof FileSystemFileHandle}catch(e){_=!1}return _}function r_(e){let _;try{_=e instanceof File}catch(e){_=!1}return _}function i_(e){let _;try{_=e instanceof Response}catch(e){_=!1}return _}function o_(e){let _;try{_=e instanceof Uint8Array}catch(e){_=!1}return _}function s_(e){return Array.isArray(e)}function a_(e){return Number.isSafeInteger(e)}function g_(){return Symbol.iterator}function c_(e){return e.lastModified}function b_(e){return e.length}function w_(e){return e.length}function u_(e){console.log(e)}function d_(e){return e.message}function f_(e){return L.__wrap(e)}function l_(e){return e.msCrypto}function p_(e,_){const t=c(_.name,n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(e+4,r,!0),w().setInt32(e+0,t,!0)}function y_(){return l((function(){return new Headers}),arguments)}function h_(e,_){try{var t={a:e,b:_};const r=new Promise(((e,_)=>{const r=t.a;t.a=0;try{return function(e,_,t,r){n.closure72_externref_shim(e,_,t,r)}(r,t.b,e,_)}finally{t.a=r}}));return r}finally{t.a=t.b=0}}function m_(){return new Object}function v_(){return new Map}function R_(){return new Array}function F_(){return new Error}function z_(){return l((function(){return new FormData}),arguments)}function x_(e){return new Uint8Array(e)}function j_(e,_){return new Error(d(e,_))}function k_(){return l((function(){return new AbortController}),arguments)}function O_(e,_){return new Function(d(e,_))}function S_(e,_,t){return new Uint8Array(e,_>>>0,t>>>0)}function A_(e){return new Uint8Array(e>>>0)}function D_(){return l((function(e,_,t){return new Request(d(e,_),t)}),arguments)}function q_(){return l((function(e,_){return new Blob(e,_)}),arguments)}function E_(e){return e.next}function I_(){return l((function(e){return e.next()}),arguments)}function H_(){return l((function(e){return e.next()}),arguments)}function J_(e){return e.node}function M_(e){return $.__wrap(e)}function G_(e){return $.__unwrap(e)}function C_(e){return Q.__wrap(e)}function W_(e){return Q.__unwrap(e)}function N_(){return l((function(e,_){e.postMessage(_)}),arguments)}function B_(e){return e.process}function U_(e,_){return e.push(_)}function L_(e){queueMicrotask(e)}function T_(e){return e.queueMicrotask}function $_(){return l((function(e,_){e.randomFillSync(_)}),arguments)}function P_(e){return Z.__wrap(e)}function Q_(e){return Z.__unwrap(e)}function Y_(e,_,t){return e.removeEntry(d(_,t))}function K_(e,_,t,n){return e.removeEntry(d(_,t),n)}function V_(){return l((function(){return e.require}),arguments)}function Z_(e){return Promise.resolve(e)}function X_(){return l((function(e,_){e.respond(_>>>0)}),arguments)}function et(){return l((function(e,_){return e.seek(_)}),arguments)}function _t(e,_,t){e[_]=t}function tt(e,_,t){e[_>>>0]=t}function nt(e,_,t){e.set(_,t>>>0)}function rt(e,_,t){return e.set(_,t)}function it(e,_){e.body=_}function ot(e,_){e.create=0!==_}function st(e,_){e.create=0!==_}function at(e,_){e.credentials=S[_]}function gt(e,_){e.headers=_}function ct(e,_){e.keepExistingData=0!==_}function bt(e,_,t){e.method=d(_,t)}function wt(e,_){e.mode=A[_]}function ut(e,_){e.recursive=0!==_}function dt(e,_){e.signal=_}function ft(e,_,t){e.type=d(_,t)}function lt(e){return ee.__wrap(e)}function pt(e){return ee.__unwrap(e)}function yt(e){return e.signal}function ht(e){return e.size}function mt(e){return re.__wrap(e)}function vt(e){return re.__unwrap(e)}function Rt(e,_){const t=c(_.stack,n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(e+4,r,!0),w().setInt32(e+0,t,!0)}function Ft(){const e="undefined"==typeof global?null:global;return p(e)?0:f(e)}function zt(){const e="undefined"==typeof globalThis?null:globalThis;return p(e)?0:f(e)}function xt(){const e="undefined"==typeof self?null:self;return p(e)?0:f(e)}function jt(){const e="undefined"==typeof window?null:window;return p(e)?0:f(e)}function kt(e){return e.status}function Ot(){return l((function(e){return JSON.stringify(e)}),arguments)}function St(e,_,t){return e.subarray(_>>>0,t>>>0)}function At(e){return e.text()}function Dt(e,_){return e.then(_)}function qt(e,_,t){return e.then(_,t)}function Et(e,_){const t=c(_.url,n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(e+4,r,!0),w().setInt32(e+0,t,!0)}function It(e){return e.value}function Ht(e){return e.versions}function Jt(e){const _=e.view;return p(_)?0:f(_)}function Mt(e){console.warn(e)}function Gt(){return l((function(e,_){return e.write(_)}),arguments)}function Ct(e){return+e}function Wt(e){return BigInt.asUintN(64,e)}function Nt(e,_){const t="bigint"==typeof _?_:void 0;w().setBigInt64(e+8,p(t)?BigInt(0):t,!0),w().setInt32(e+0,!p(t),!0)}function Bt(e){return"boolean"==typeof e?e?1:0:2}function Ut(e){const _=e.original;return 1==_.cnt--&&(_.a=0,!0)}function Lt(e,_,t){const r=function(e,_,t,r){const i={a:e,b:_,cnt:1,dtor:977},o=(...e)=>{i.cnt++;const _=i.a;i.a=0;try{return r(_,i.b,...e)}finally{0==--i.cnt?(n.__wbindgen_export_6.get(i.dtor)(_,i.b),y.unregister(i)):i.a=_}};return o.original=i,y.register(o,i,i),o}(e,_,0,O);return r}function Tt(e,_){const t=c(h(_),n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(e+4,r,!0),w().setInt32(e+0,t,!0)}function $t(e,_){return new Error(d(e,_))}function Pt(e,_){return e in _}function Qt(){const e=n.__wbindgen_export_4,_=e.grow(4);e.set(0,void 0),e.set(_+0,void 0),e.set(_+1,null),e.set(_+2,!0),e.set(_+3,!1)}function Yt(e){return"bigint"==typeof e}function Kt(e){return"function"==typeof e}function Vt(e){return"object"==typeof e&&null!==e}function Zt(e){return"string"==typeof e}function Xt(e){return void 0===e}function en(e,_){return e===_}function _n(e,_){return e==_}function tn(){return n.memory}function nn(e,_){const t="number"==typeof _?_:void 0;w().setFloat64(e+8,p(t)?0:t,!0),w().setInt32(e+0,!p(t),!0)}function rn(e){return e}function on(e,_){const t="string"==typeof _?_:void 0;var r=p(t)?0:c(t,n.__wbindgen_malloc,n.__wbindgen_realloc),o=i;w().setInt32(e+4,o,!0),w().setInt32(e+0,r,!0)}function sn(e,_){return d(e,_)}function an(e,_){throw new Error(d(e,_))}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>n.__wbg_themessettings_free(e>>>0,1)))},507:(e,_,t)=>{t.a(e,(async(e,n)=>{try{t.d(_,{Ay:()=>g,RC:()=>a,Y$:()=>o,wS:()=>s});var r=t(519),i=e([r]);async function o(e,_){if(_){const t="https://keadex.dev/api/download-gh-raw-file",n={headers:{"Keadex-Gh-Url":e}};return _&&(n.headers["Keadex-Gh-Authorization"]=_),await fetch(t,n)}return await fetch(e)}async function s(e,_,t){let n,i,s;try{n=(0,r._Cc)(e),i=(0,r.Llp)(e,_),s=(0,r.JD7)(e,_)}catch(e){throw console.error(e),new Error("Invalid URL: the provided URL is an invalid Mina project or diagram.")}if(n&&i&&s){let e,_,r;try{const a=await o(n,t),g=await o(i,t),c=await o(s,t);if(a.ok&&g.ok&&c.ok)return e=await a.text(),_=await g.text(),r=await c.text(),{projectSettingsJson:e,plantuml:_,spec:r};throw new Error}catch(e){throw console.error(e),new Error("Diagram or project settings not found. Please verify the URLs provided, or, if linking to a private repository, ensure the GitHub token is configured.")}}}async function a(e,_,t){try{const i=await s(e,_,t);var n;if(i)return{diagram:await(0,r.Oxg)(e,_,i.plantuml,i.spec),diagramsThemeSettings:null==(n=JSON.parse(i.projectSettingsJson).themes_settings)?void 0:n.diagrams_theme_settings}}catch(e){console.error(e)}}r=(i.then?(await i)():i)[0];const g={fetchGhRawFile:o,downloadDiagramData:s,openRemoteProjectDiagram:a};n()}catch(c){n(c)}}))},519:(e,_,t)=>{t.a(e,(async(e,n)=>{try{t.d(_,{JD7:()=>i.JD7,Llp:()=>i.Llp,Oxg:()=>i.Oxg,_Cc:()=>i._Cc});var r=t(196),i=t(457),o=e([r]);r=(o.then?(await o)():o)[0],(0,i.lIU)(r),r.__wbindgen_start(),n()}catch(e){n(e)}}))}},i={};function o(e){var _=i[e];if(void 0!==_)return _.exports;var t=i[e]={id:e,loaded:!1,exports:{}};return r[e](t,t.exports,o),t.loaded=!0,t.exports}e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",_="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",n=e=>{e&&e.d<1&&(e.d=1,e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},o.a=(r,i,o)=>{var s;o&&((s=[]).d=-1);var a,g,c,b=new Set,w=r.exports,u=new Promise(((e,_)=>{c=_,g=e}));u[_]=w,u[e]=e=>(s&&e(s),b.forEach(e),u.catch((e=>{}))),r.exports=u,i((r=>{var i;a=(r=>r.map((r=>{if(null!==r&&"object"==typeof r){if(r[e])return r;if(r.then){var i=[];i.d=0,r.then((e=>{o[_]=e,n(i)}),(e=>{o[t]=e,n(i)}));var o={};return o[e]=e=>e(i),o}}var s={};return s[e]=e=>{},s[_]=r,s})))(r);var o=()=>a.map((e=>{if(e[t])throw e[t];return e[_]})),g=new Promise((_=>{(i=()=>_(o)).r=0;var t=e=>e!==s&&!b.has(e)&&(b.add(e),e&&!e.d&&(i.r++,e.push(i)));a.map((_=>_[e](t)))}));return i.r?g:o()}),(e=>(e?c(u[t]=e):g(w),n(s)))),s&&s.d<0&&(s.d=0)},o.d=(e,_)=>{for(var t in _)o.o(_,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:_[t]})},o.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),o.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),o.v=(e,_,t,n)=>Promise.all([import("fs"),import("url")]).then((([{readFile:e},{URL:_}])=>new Promise(((n,r)=>{e(new _(t+".module.wasm",import.meta.url),((e,_)=>{if(e)return r(e);n({arrayBuffer:()=>_})}))})))).then((e=>e.arrayBuffer())).then((e=>WebAssembly.instantiate(e,n))).then((_=>Object.assign(e,_.instance.exports)));var s=o(507),a=(s=await s).Ay,g=s.wS,c=s.Y$,b=s.RC;export{a as default,g as downloadDiagramData,c as fetchGhRawFile,b as openRemoteProjectDiagram};
Binary file
package/index.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";var e,t,n,r,a,o,i={15:e=>{e.exports=require("react")},53:e=>{e.exports=require("@fortawesome/react-fontawesome")},61:e=>{e.exports=require("react-i18next")},177:e=>{e.exports=require("@fortawesome/free-solid-svg-icons")},196:(e,t,n)=>{var r=n(457);e.exports=n.v(t,e.id,"9f2e5fcb4b8da9f0a47d",{"./mina_react_bg.js":{__wbg_log_c222819a41e063d3:r.pR9,__wbg_info_3daf2e093e091b66:r.ZrD,__wbg_warn_4ca3906c248c47c4:r.jwJ,__wbg_debug_3cb59063b29f58c1:r.F$t,__wbg_error_524f506f44df1645:r.pWA,__wbindgen_string_new:r.ycJ,__wbindgen_string_get:r.qNE,__wbindgen_bigint_get_as_i64:r.DMD,__wbindgen_memory:r.Py0,__wbindgen_throw:r.Qnr,__wbindgen_debug_string:r.rl,__wbg_new_5e0be73521bc8c17:r.aIY,__wbg_new_78feb108b6472713:r.M2,__wbindgen_number_new:r.QRK,__wbg_new_405e22f390576ce2:r.va5,__wbg_newnoargs_105ed471475aaf50:r.VrZ,__wbg_new_a12002a7f91c75be:r.vVD,__wbg_stringify_f7ed6987935b4a24:r.Y6F,__wbindgen_is_function:r.PRY,__wbindgen_is_string:r.GuA,__wbindgen_is_object:r.qvD,__wbg_next_25feadfc0913fea9:r.yqB,__wbg_buffer_609cc3eee51ed158:r.FHK,__wbg_byteLength_e674b853d9c77e1d:r.x6W,__wbg_byteOffset_fd862df290ef848d:r.cyg,__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a:r.hI8,__wbg_length_a446193dc22c12f8:r.eIr,__wbg_set_65595bdd868b3009:r.HBq,__wbg_newwithlength_a381634e90c276d4:r.HtP,__wbg_buffer_09165b52af8c5237:r._Ue,__wbg_subarray_aa9065fa9dc5df96:r.TOc,__wbg_done_769e5ede4b31c67b:r.Xb8,__wbg_value_cd1ffa7b1ab794f1:r.LMq,__wbg_next_c3ab0d59847b3b5c:r.tER,__wbg_instanceof_Error_4d54113b22d20306:r.fcg,__wbg_instanceof_Uint8Array_17156bcf118086a9:r.SJf,__wbg_instanceof_ArrayBuffer_e14585432e3737fc:r.gGA,__wbg_set_8fc6bf8a5b1071d1:r.iAh,__wbg_get_b9b93047fe3cf45b:r.RKz,__wbg_set_37837023f3d740e8:r.p8e,__wbg_length_e2d2a49132c1b256:r.Ry,__wbg_push_737cfc8c1432c2c6:r.tZf,__wbg_isArray_a1eab7e0d067391b:r.uod,__wbg_new_c68d7209be747379:r.wd3,__wbg_message_97a2af9b89d693a3:r.oGe,__wbg_isSafeInteger_343e2beeeece1bb0:r.Yb6,__wbg_entries_3265d4158b33e5dc:r.gHg,__wbg_iterator_9a24c88df860dc65:r.eW0,__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0:r.w6e,__wbindgen_is_undefined:r.vUM,__wbg_call_672a4d21634d4a24:r.wHY,__wbg_static_accessor_SELF_37c5d418e4bf5819:r.fb$,__wbg_static_accessor_GLOBAL_88a902d13a557d07:r.ii7,__wbg_static_accessor_WINDOW_5de37043a91a9c40:r.x0C,__wbg_new_23a2665fac83c611:r.c6u,__wbg_then_44b73946d2fb3e7d:r.GQG,__wbg_then_48b406749878a531:r.xV_,__wbg_resolve_4851785c9c5f573d:r.wJz,__wbg_call_7cccdd69e0791ae2:r.w9h,__wbg_next_6574e1a8a62d1055:r.Dn4,__wbindgen_number_get:r.sWe,__wbg_get_67b2ba62fc30de12:r.dzD,__wbg_setkeepexistingdata_ee7c8cb466e9477f:r.aKt,__wbg_container_unwrap:r.xB8,__wbg_instanceof_FileSystemFileHandle_d3d037cf85ee546c:r.KA3,__wbg_createWritable_b4ed240dc879905e:r.kPb,__wbg_getFile_2607bc0123c724e0:r.ycy,__wbg_postMessage_83a8d58d3fcb6c13:r.A2$,__wbg_byobRequest_77d9adf63337edfb:r.JpR,__wbg_close_5ce03e29be453811:r.sQY,__wbg_append_299d5d48292c0495:r.cVx,__wbg_append_b44785ebeb668479:r.d_N,__wbg_append_b2d1fc16de2a0e81:r.WqA,__wbg_new_9fd39a253424609a:r.z09,__wbg_respond_1f279fa9f8edcb1c:r.dSQ,__wbg_view_fd8a56e8983f448d:r.NgT,__wbg_seek_3f0f8d7591f648d7:r.Zk3,__wbg_write_397d977609afc729:r.Vob,__wbg_new_e25e5aab09ff45db:r.RG9,__wbg_abort_775ef1d17fc65868:r.gMQ,__wbg_signal_aaf9ad74119f20a4:r.CF8,__wbg_setcreate_4ca762e23d9f78da:r.N9Q,__wbg_enqueue_bb16ba72f537dc9e:r.QHd,__wbg_close_304cc1fef3466669:r.oaw,__wbg_instanceof_File_a4e2256bf71955a9:r.gjJ,__wbg_lastModified_7a9e61b3961224b8:r.gvw,__wbg_close_24caca68e93b9c03:r.jeC,__wbg_settype_39ed370d3edd403c:r.a4S,__wbg_setcreate_139bad94b2874fb5:r.kF0,__wbg_queueMicrotask_97d92b4fcc8a61c5:r._mt,__wbg_queueMicrotask_d3219def82552485:r.k2R,__wbindgen_cb_drop:r.LCp,__wbg_arrayBuffer_f18c144cd0125f07:r.RGi,__wbg_newwithu8arraysequenceandoptions_068570c487f69127:r.qe7,__wbg_size_3808d41635a9c259:r.$CF,__wbg_text_1f39a8afe3c70a99:r.CFe,__wbg_diagramelementspec_new:r.Dr_,__wbg_diagram_new:r.YLb,__wbg_point_new:r.nA9,__wbg_shape_new:r._cl,__wbg_relationship_new:r.NpJ,__wbg_minaerror_new:r.EkI,__wbg_person_new:r.c1W,__wbg_softwaresystem_new:r.dM0,__wbg_container_new:r.e57,__wbg_boundary_new:r.HCo,__wbg_deploymentnode_new:r.ezj,__wbg_component_new:r.WJm,__wbg_new_8a6f238a6ece86ea:r.$Pc,__wbg_stack_0ed75d68575b0f3c:r.x$X,__wbg_error_7534b8e9a36f1ab4:r.WYM,__wbindgen_jsval_loose_eq:r.U8c,__wbindgen_boolean_get:r.NhE,__wbindgen_as_number:r.qmw,__wbindgen_error_new:r.RjG,__wbg_getwithrefkey_2d7fdfea9645a25b:r.A2U,__wbg_set_2873a5cee2324875:r.v1k,__wbg_String_1b2069caba3b9783:r.JF5,__wbindgen_bigint_from_u64:r.Qg3,__wbg_boundary_unwrap:r.Wq,__wbg_shape_unwrap:r.D7n,__wbg_crypto_ed58b8e10a292839:r.ilI,__wbg_process_5c1d670bc53614b8:r.Evb,__wbg_versions_c71aa1626a93e0a1:r.ooJ,__wbg_node_02999533c4ea02e3:r.OtZ,__wbg_require_79b1e9274cde3c87:r.Ltb,__wbg_msCrypto_0a36e2ec3a343d26:r.HOd,__wbg_randomFillSync_ab2cfe79ebbf2740:r.NNx,__wbg_getRandomValues_bcb4912f16000dc4:r.FGp,__wbindgen_in:r.zEy,__wbindgen_is_bigint:r.YkQ,__wbindgen_jsval_eq:r.BGI,__wbg_deploymentnode_unwrap:r._Zx,__wbg_has_a5ea9117f258a0ec:r.HSm,__wbg_fetch_4465c2b10f21a927:r.o0R,__wbg_fetch_509096533071c657:r.gRe,__wbg_newwithstrandinit_06c535e0a867c635:r.heb,__wbg_setrecursive_536113a081d6177a:r.ugc,__wbg_instanceof_FileSystemDirectoryHandle_0906fc139d75557b:r.Cjr,__wbg_removeEntry_9f6bc325e3383e59:r.m_N,__wbg_removeEntry_a424e90dff229b19:r.lkn,__wbg_getFileHandle_5fb877d1ecc74d52:r.Wkh,__wbg_getDirectoryHandle_c48a138373d79b3d:r.kTu,__wbg_entries_19efe296f7d36df9:r.RCF,__wbg_new_018dcc2d6c8c2f6a:r.RR8,__wbg_append_8c7dd8d641a5f01b:r.Tbm,__wbg_name_e4a115def9e2bbaa:r.Yeo,__wbg_instanceof_Response_f2cc20d9f7dfd644:r.Hzn,__wbg_arrayBuffer_d1b44c4390db422f:r._iy,__wbg_url_ae10c34ca209681d:r.Tp3,__wbg_status_f6360336ca686bf0:r.kK3,__wbg_headers_9cb51cfd2ac780a4:r.Moj,__wbg_setmethod_3c5280fe5d890842:r._hX,__wbg_setsignal_75b21ef3a81de905:r.l0x,__wbg_setcredentials_c3a22f1cd105a2c6:r.uw1,__wbg_setheaders_834c0bdb6a8949ad:r.rk2,__wbg_setbody_5923b78a95eedf29:r.Nhd,__wbg_setmode_5dc300b865044b65:r.BFX,__wbg_softwaresystem_unwrap:r.qre,__wbg_relationship_unwrap:r.KM7,__wbg_point_unwrap:r._QJ,__wbg_person_unwrap:r.Xv$,__wbg_component_unwrap:r.dT0,__wbg_diagramelementspec_unwrap:r.W3f,__wbindgen_closure_wrapper1507:r.Cry,__wbindgen_init_externref_table:r.bLn}})},221:e=>{e.exports=require("tw-elements")},334:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.r(t),n.d(t,{MinaReact:()=>d,default:()=>g});var a=n(571),o=n(636),i=n(385),_=n(15),l=n(507),s=n(519),c=n(732),u=e([l,s]);[l,s]=u.then?(await u)():u,(0,i.aC)();const d=e=>{var t;const{projectRootUrl:r,diagramUrl:i,ghToken:u}=e;(0,o.T_)({initTE:async function(){const{initTE:e,Dropdown:t}=await Promise.resolve().then(n.t.bind(n,221,23));await e({Dropdown:t})}});const d=(0,_.useRef)(null),[g,p]=(0,_.useState)(),[b,f]=(0,_.useState)(),[m,w]=(0,_.useState)(),h={onOpenDiagramClick:e=>{let t;try{t=(0,s.qjW)(r,e)}catch(e){console.error(e),y("Invalid URL: the provided URL is an invalid Mina project or diagram.")}t&&v(t)},onOpenExternalLinkClick:e=>{window.open(e,"_blank")}};function y(e){p(null),w(e)}async function v(e){var t,n,a,o;let i;null==(t=d.current)||t.resetCanvas();try{i=await(0,l.wS)(r,e,u)}catch(e){const t=e;if(!(t.message&&t.message.replace(/ /g,"").length>0))throw new Error;y(t.message)}if(null!=(n=i)&&n.projectSettingsJson&&null!=(a=i)&&a.plantuml&&null!=(o=i)&&o.spec)try{f(JSON.parse(i.projectSettingsJson));const t=await(0,s.Oxg)(r,e,i.plantuml,i.spec);p(t)}catch(e){y("Invalid diagram or project settings.")}}(0,_.useEffect)((()=>{y(null),v(i)}),[i,r,u]);return(0,c.jsxs)("div",{className:"h-full w-full border-t flex items-center",children:[(0,c.jsx)(o.rI,{menuItemsProps:[{id:"dropdown-init",label:"",isHeaderMenuItem:!0,subMenuItems:[{id:"dropdown-init-1",label:""}]}],className:"hidden"}),(0,c.jsx)(o.tz,{}),null===m&&g&&(0,c.jsx)(a.D,{diagramListener:h,diagram:g,ref:d,diagramsThemeSettings:null==b||null==(t=b.themes_settings)?void 0:t.diagrams_theme_settings,target:"web",readOnly:!0}),m&&(0,c.jsx)("div",{className:"w-full text-center text-black",children:m})]})},g=d;r()}catch(e){r(e)}}))},385:(e,t,n)=>{n.d(t,{mg:()=>s,Cp:()=>r,qI:()=>g,aC:()=>b,l:()=>u,$r:()=>l,cr:()=>p,wF:()=>d,x4:()=>c});const r=(e={})=>Object.keys(e).reduce(((t,n)=>(n.startsWith("data-")&&(t[n]=e[n]),t)),{}),a=require("fast-deep-equal/es6/react");var o=n.n(a);const i=require("lodash.clonedeep");var _=n.n(i);const l=(e,t)=>o()(e,t),s=e=>_()(e);function c(e){return e?e.replace(/\\n/g,"\n").replace(/\\t/g," ").replace(/\\r/g,"\n"):void 0}function u(e){return e.sort(((e,t)=>t.length-e.length))[0]}function d(e,t=96){return Number.parseFloat((e/t).toFixed(2))}function g(e,t=96){return Number.parseFloat((e*t).toFixed(2))}function p(e,t=96){return Number.parseFloat((e*(t/72)).toFixed(2))}function b(){console.log=()=>{},console.debug=()=>{}}},416:(e,t,n)=>{function r(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}n.d(t,{A:()=>r})},452:e=>{e.exports=require("pluralize")},457:(e,t,n)=>{let r;function a(e){r=e}n.d(t,{$CF:()=>Cn,$Pc:()=>kt,A2$:()=>qt,A2U:()=>at,BFX:()=>vn,BGI:()=>sr,CF8:()=>Rn,CFe:()=>zn,Cjr:()=>ct,Cry:()=>Kn,D7n:()=>Tn,DMD:()=>Vn,Dn4:()=>Wt,Dr_:()=>We,EkI:()=>St,Evb:()=>Vt,F$t:()=>Pe,FGp:()=>tt,FHK:()=>Se,GQG:()=>Bn,GuA:()=>_r,HBq:()=>dn,HCo:()=>ye,HOd:()=>Et,HSm:()=>ot,HtP:()=>Pt,Hzn:()=>gt,JD7:()=>x,JF5:()=>de,JpR:()=>Ee,KA3:()=>ut,KM7:()=>nn,LCp:()=>Jn,LMq:()=>Yn,Llp:()=>R,Ltb:()=>on,M2:()=>Dt,Moj:()=>it,N9Q:()=>fn,NNx:()=>en,NgT:()=>Zn,NhE:()=>Qn,Nhd:()=>pn,NpJ:()=>tn,OtZ:()=>Xt,Oxg:()=>S,PRY:()=>or,Py0:()=>ur,QHd:()=>Ze,QRK:()=>gr,Qg3:()=>qn,Qnr:()=>fr,RCF:()=>$e,RG9:()=>jt,RGi:()=>he,RKz:()=>rt,RR8:()=>Tt,RjG:()=>tr,Ry:()=>yt,SJf:()=>pt,TOc:()=>Pn,Tbm:()=>be,Tp3:()=>Wn,U8c:()=>cr,Vob:()=>Gn,VrZ:()=>Ft,W3f:()=>Ye,WJm:()=>Le,WYM:()=>qe,Wkh:()=>Ke,Wq:()=>ve,WqA:()=>fe,Xb8:()=>Xe,Xv$:()=>$t,Y6F:()=>Mn,YLb:()=>He,Yb6:()=>ft,Yeo:()=>xt,YkQ:()=>ar,Zk3:()=>sn,ZrD:()=>_t,_Cc:()=>C,_QJ:()=>Ut,_Ue:()=>Oe,_Zx:()=>Be,_cl:()=>xn,_hX:()=>yn,_iy:()=>we,_mt:()=>Jt,a4S:()=>En,aIY:()=>It,aKt:()=>hn,bLn:()=>rr,c1W:()=>Zt,c6u:()=>Rt,cVx:()=>pe,cyg:()=>Te,dM0:()=>In,dSQ:()=>ln,dT0:()=>Ae,d_N:()=>me,dzD:()=>nt,e57:()=>Ne,eIr:()=>ht,eW0:()=>mt,ezj:()=>ze,fb$:()=>Nn,fcg:()=>st,gGA:()=>lt,gHg:()=>Ge,gMQ:()=>ge,gRe:()=>Qe,gjJ:()=>dt,gvw:()=>wt,hI8:()=>Mt,heb:()=>zt,iAh:()=>gn,ii7:()=>Ln,ilI:()=>Me,jeC:()=>Ie,jwJ:()=>$n,k2R:()=>Kt,kF0:()=>bn,kK3:()=>Fn,kPb:()=>Fe,kTu:()=>Je,l0x:()=>Sn,lIU:()=>a,lkn:()=>an,m_N:()=>rn,nA9:()=>Gt,o0R:()=>Ve,oGe:()=>Ot,oaw:()=>De,ooJ:()=>Xn,p8e:()=>un,pR9:()=>vt,pWA:()=>Ue,qNE:()=>pr,qe7:()=>Bt,qjW:()=>T,qmw:()=>Un,qre:()=>Dn,qvD:()=>ir,rk2:()=>wn,rl:()=>er,sQY:()=>ke,sWe:()=>dr,tER:()=>Yt,tZf:()=>Qt,ugc:()=>On,uod:()=>bt,uw1:()=>mn,v1k:()=>cn,vUM:()=>lr,vVD:()=>At,va5:()=>Ct,w6e:()=>An,w9h:()=>Ce,wHY:()=>Re,wJz:()=>_n,wd3:()=>Nt,x$X:()=>kn,x0C:()=>jn,x6W:()=>xe,xB8:()=>je,xV_:()=>Hn,ycJ:()=>br,ycy:()=>et,yqB:()=>Ht,z09:()=>Lt,zEy:()=>nr}),e=n.hmd(e);let o=0,i=null;function _(){return null!==i&&0!==i.byteLength||(i=new Uint8Array(r.memory.buffer)),i}let l=new("undefined"==typeof TextEncoder?(0,e.require)("util").TextEncoder:TextEncoder)("utf-8");const s="function"==typeof l.encodeInto?function(e,t){return l.encodeInto(e,t)}:function(e,t){const n=l.encode(e);return t.set(n),{read:e.length,written:n.length}};function c(e,t,n){if(void 0===n){const n=l.encode(e),r=t(n.length,1)>>>0;return _().subarray(r,r+n.length).set(n),o=n.length,r}let r=e.length,a=t(r,1)>>>0;const i=_();let c=0;for(;c<r;c++){const t=e.charCodeAt(c);if(t>127)break;i[a+c]=t}if(c!==r){0!==c&&(e=e.slice(c)),a=n(a,r,r=c+3*e.length,1)>>>0;const t=_().subarray(a+c,a+r);c+=s(e,t).written,a=n(a,r,c,1)>>>0}return o=c,a}let u=null;function d(){return(null===u||!0===u.buffer.detached||void 0===u.buffer.detached&&u.buffer!==r.memory.buffer)&&(u=new DataView(r.memory.buffer)),u}let g=new("undefined"==typeof TextDecoder?(0,e.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});function p(e,t){return e>>>=0,g.decode(_().subarray(e,e+t))}function b(e){const t=r.__externref_table_alloc();return r.__wbindgen_export_4.set(t,e),t}function f(e,t){try{return e.apply(this,t)}catch(e){const t=b(e);r.__wbindgen_exn_store(t)}}function m(e){return null==e}g.decode();const w="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>{r.__wbindgen_export_6.get(e.dtor)(e.a,e.b)}));function h(e){const t=typeof e;if("number"==t||"boolean"==t||null==e)return`${e}`;if("string"==t)return`"${e}"`;if("symbol"==t){const t=e.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=e.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(e)){const t=e.length;let n="[";t>0&&(n+=h(e[0]));for(let r=1;r<t;r++)n+=", "+h(e[r]);return n+="]",n}const n=/\[object ([^\]]+)\]/.exec(toString.call(e));let r;if(!(n&&n.length>1))return toString.call(e);if(r=n[1],"Object"==r)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:r}function y(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function v(e,t){e>>>=0;const n=d(),a=[];for(let o=e;o<e+4*t;o+=4)a.push(r.__wbindgen_export_4.get(n.getUint32(o,!0)));return r.__externref_drop_slice(e,t),a}function O(e,t){const n=t(4*e.length,4)>>>0;for(let t=0;t<e.length;t++){const r=b(e[t]);d().setUint32(n+4*t,r,!0)}return o=e.length,n}function S(e,t,n,a){const i=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),_=o,l=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),s=o,u=c(n,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=c(a,r.__wbindgen_malloc,r.__wbindgen_realloc),p=o;return r.open_remote_diagram(i,_,l,s,u,d,g,p)}function E(e){const t=r.__wbindgen_export_4.get(e);return r.__externref_table_dealloc(e),t}function x(e,t){let n,a;try{const l=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_spec_url_from_diagram_url(l,s,u,d);var i=g[0],_=g[1];if(g[3])throw i=0,_=0,E(g[2]);return n=i,a=_,p(i,_)}finally{r.__wbindgen_free(n,a,1)}}function T(e,t){let n,a;try{const l=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_url_from_link_string(l,s,u,d);var i=g[0],_=g[1];if(g[3])throw i=0,_=0,E(g[2]);return n=i,a=_,p(i,_)}finally{r.__wbindgen_free(n,a,1)}}function R(e,t){let n,a;try{const l=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_plantuml_url_from_diagram_url(l,s,u,d);var i=g[0],_=g[1];if(g[3])throw i=0,_=0,E(g[2]);return n=i,a=_,p(i,_)}finally{r.__wbindgen_free(n,a,1)}}function C(e){let t,n;try{const a=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),i=o,_=r.project_settings_url(a,i);return t=_[0],n=_[1],p(_[0],_[1])}finally{r.__wbindgen_free(t,n,1)}}function I(e,t,n){r.closure147_externref_shim(e,t,n)}const D=["omit","same-origin","include"],k=["same-origin","no-cors","cors","navigate"];"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_aisettings_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_addelementtag_free(e>>>0,1)));const L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_baseelement_free(e>>>0,1)));class A{static __wrap(e){e>>>=0;const t=Object.create(A.prototype);return t.__wbg_ptr=e,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_baseelement_free(e,0)}get alias(){const e=r.__wbg_get_baseelement_alias(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set alias(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_alias(this.__wbg_ptr,t,n)}get label(){const e=r.__wbg_get_baseelement_label(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set label(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_label(this.__wbg_ptr,t,n)}get description(){const e=r.__wbg_get_baseelement_description(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set description(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_description(this.__wbg_ptr,t,n)}get sprite(){const e=r.__wbg_get_baseelement_sprite(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set sprite(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_sprite(this.__wbg_ptr,t,n)}get tags(){const e=r.__wbg_get_baseelement_tags(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set tags(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_tags(this.__wbg_ptr,t,n)}get link(){const e=r.__wbg_get_baseelement_link(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set link(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_link(this.__wbg_ptr,t,n)}get uuid(){const e=r.__wbg_get_baseelement_uuid(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set uuid(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_uuid(this.__wbg_ptr,t,n)}get notes(){const e=r.__wbg_get_baseelement_notes(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set notes(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_notes(this.__wbg_ptr,t,n)}}const N="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_boundary_free(e>>>0,1)));class j{static __wrap(e){e>>>=0;const t=Object.create(j.prototype);return t.__wbg_ptr=e,N.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof j?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_boundary_free(e,0)}get base_data(){const e=r.__wbg_get_boundary_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){y(e,A);var t=e.__destroy_into_raw();r.__wbg_set_boundary_base_data(this.__wbg_ptr,t)}get boundary_type(){return r.__wbg_get_boundary_boundary_type(this.__wbg_ptr)}set boundary_type(e){r.__wbg_set_boundary_boundary_type(this.__wbg_ptr,m(e)?0:b(e))}get boundary_custom_type(){const e=r.__wbg_get_boundary_boundary_custom_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set boundary_custom_type(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_addelementtag_legend_sprite(this.__wbg_ptr,t,n)}get sub_elements(){const e=r.__wbg_get_boundary_sub_elements(this.__wbg_ptr);var t=v(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set sub_elements(e){const t=O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_boundary_sub_elements(this.__wbg_ptr,t,n)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_c4elements_free(e>>>0,1)));const F="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_component_free(e>>>0,1)));class M{static __wrap(e){e>>>=0;const t=Object.create(M.prototype);return t.__wbg_ptr=e,F.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof M?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_component_free(e,0)}get base_data(){const e=r.__wbg_get_component_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){y(e,A);var t=e.__destroy_into_raw();r.__wbg_set_component_base_data(this.__wbg_ptr,t)}get technology(){const e=r.__wbg_get_component_technology(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set technology(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_component_technology(this.__wbg_ptr,t,n)}get component_type(){return r.__wbg_get_component_component_type(this.__wbg_ptr)}set component_type(e){r.__wbg_set_component_component_type(this.__wbg_ptr,m(e)?0:b(e))}}const P="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_container_free(e>>>0,1)));class z{static __wrap(e){e>>>=0;const t=Object.create(z.prototype);return t.__wbg_ptr=e,P.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof z?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_container_free(e,0)}get base_data(){const e=r.__wbg_get_container_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){y(e,A);var t=e.__destroy_into_raw();r.__wbg_set_container_base_data(this.__wbg_ptr,t)}get technology(){const e=r.__wbg_get_container_technology(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set technology(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_container_technology(this.__wbg_ptr,t,n)}get container_type(){return r.__wbg_get_container_container_type(this.__wbg_ptr)}set container_type(e){r.__wbg_set_container_container_type(this.__wbg_ptr,m(e)?0:b(e))}}const B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_deploymentnode_free(e>>>0,1)));class H{static __wrap(e){e>>>=0;const t=Object.create(H.prototype);return t.__wbg_ptr=e,B.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof H?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_deploymentnode_free(e,0)}get base_data(){const e=r.__wbg_get_boundary_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){y(e,A);var t=e.__destroy_into_raw();r.__wbg_set_boundary_base_data(this.__wbg_ptr,t)}get deploymeny_node_custom_type(){const e=r.__wbg_get_deploymentnode_deploymeny_node_custom_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set deploymeny_node_custom_type(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_addelementtag_legend_sprite(this.__wbg_ptr,t,n)}get deployment_node_type(){return r.__wbg_get_deploymentnode_deployment_node_type(this.__wbg_ptr)}set deployment_node_type(e){r.__wbg_set_deploymentnode_deployment_node_type(this.__wbg_ptr,m(e)?0:b(e))}get sub_elements(){const e=r.__wbg_get_deploymentnode_sub_elements(this.__wbg_ptr);var t=v(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set sub_elements(e){const t=O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_boundary_sub_elements(this.__wbg_ptr,t,n)}}const W="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_diagram_free(e>>>0,1)));class Y{static __wrap(e){e>>>=0;const t=Object.create(Y.prototype);return t.__wbg_ptr=e,W.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,W.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_diagram_free(e,0)}get diagram_name(){const e=r.__wbg_get_diagram_diagram_name(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set diagram_name(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagram_diagram_name(this.__wbg_ptr,t,n)}get diagram_type(){return r.__wbg_get_diagram_diagram_type(this.__wbg_ptr)}set diagram_type(e){r.__wbg_set_diagram_diagram_type(this.__wbg_ptr,m(e)?0:b(e))}get diagram_spec(){const e=r.__wbg_get_diagram_diagram_spec(this.__wbg_ptr);return 0===e?void 0:q.__wrap(e)}set diagram_spec(e){let t=0;m(e)||(y(e,q),t=e.__destroy_into_raw()),r.__wbg_set_diagram_diagram_spec(this.__wbg_ptr,t)}get diagram_plantuml(){const e=r.__wbg_get_diagram_diagram_plantuml(this.__wbg_ptr);return 0===e?void 0:G.__wrap(e)}set diagram_plantuml(e){let t=0;m(e)||(y(e,G),t=e.__destroy_into_raw()),r.__wbg_set_diagram_diagram_plantuml(this.__wbg_ptr,t)}get raw_plantuml(){const e=r.__wbg_get_diagram_raw_plantuml(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set raw_plantuml(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagram_raw_plantuml(this.__wbg_ptr,t,n)}get last_modified(){const e=r.__wbg_get_diagram_last_modified(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set last_modified(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagram_last_modified(this.__wbg_ptr,t,n)}get auto_layout_errors(){const e=r.__wbg_get_diagram_auto_layout_errors(this.__wbg_ptr);let t;return 0!==e[0]&&(t=v(e[0],e[1]).slice(),r.__wbindgen_free(e[0],4*e[1],4)),t}set auto_layout_errors(e){var t=m(e)?0:O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagram_auto_layout_errors(this.__wbg_ptr,t,n)}get auto_layout(){return r.diagram_auto_layout(this.__wbg_ptr)}set auto_layout(e){r.diagram_set_auto_layout(this.__wbg_ptr,e)}}const X="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_diagramelementspec_free(e>>>0,1)));class Z{static __wrap(e){e>>>=0;const t=Object.create(Z.prototype);return t.__wbg_ptr=e,X.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof Z?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,X.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_diagramelementspec_free(e,0)}get alias(){const e=r.__wbg_get_diagramelementspec_alias(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set alias(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramelementspec_alias(this.__wbg_ptr,t,n)}get from(){const e=r.__wbg_get_diagramelementspec_from(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set from(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramelementspec_from(this.__wbg_ptr,t,n)}get to(){const e=r.__wbg_get_diagramelementspec_to(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set to(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramelementspec_to(this.__wbg_ptr,t,n)}get shapes(){const e=r.__wbg_get_diagramelementspec_shapes(this.__wbg_ptr);let t;return 0!==e[0]&&(t=v(e[0],e[1]).slice(),r.__wbindgen_free(e[0],4*e[1],4)),t}set shapes(e){var t=m(e)?0:O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramelementspec_shapes(this.__wbg_ptr,t,n)}get element_type(){return r.__wbg_get_diagramelementspec_element_type(this.__wbg_ptr)}set element_type(e){r.__wbg_set_diagramelementspec_element_type(this.__wbg_ptr,m(e)?0:b(e))}get position(){const e=r.__wbg_get_diagramelementspec_position(this.__wbg_ptr);return 0===e?void 0:re.__wrap(e)}set position(e){let t=0;m(e)||(y(e,re),t=e.__destroy_into_raw()),r.__wbg_set_diagramelementspec_position(this.__wbg_ptr,t)}get size(){const e=r.__wbg_get_diagramelementspec_size(this.__wbg_ptr);return 0===e?void 0:se.__wrap(e)}set size(e){let t=0;m(e)||(y(e,se),t=e.__destroy_into_raw()),r.__wbg_set_diagramelementspec_size(this.__wbg_ptr,t)}get inner_specs(){const e=r.__wbg_get_diagramelementspec_inner_specs(this.__wbg_ptr);let t;return 0!==e[0]&&(t=v(e[0],e[1]).slice(),r.__wbindgen_free(e[0],4*e[1],4)),t}set inner_specs(e){var t=m(e)?0:O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramelementspec_inner_specs(this.__wbg_ptr,t,n)}}const $="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_diagramplantuml_free(e>>>0,1)));class G{static __wrap(e){e>>>=0;const t=Object.create(G.prototype);return t.__wbg_ptr=e,$.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,$.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_diagramplantuml_free(e,0)}get tags(){return r.diagramplantuml_tags(this.__wbg_ptr)}set tags(e){r.diagramplantuml_set_tags(this.__wbg_ptr,e)}get diagram_id(){const e=r.__wbg_get_diagramplantuml_diagram_id(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set diagram_id(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramplantuml_diagram_id(this.__wbg_ptr,t,n)}get elements(){const e=r.__wbg_get_diagramplantuml_elements(this.__wbg_ptr);var t=v(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set elements(e){const t=O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramplantuml_elements(this.__wbg_ptr,t,n)}get aliases(){const e=r.__wbg_get_diagramplantuml_aliases(this.__wbg_ptr);var t=v(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set aliases(e){const t=O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramplantuml_aliases(this.__wbg_ptr,t,n)}}const U="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_diagramspec_free(e>>>0,1)));class q{static __wrap(e){e>>>=0;const t=Object.create(q.prototype);return t.__wbg_ptr=e,U.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,U.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_diagramspec_free(e,0)}get uuid(){let e,t;try{const n=r.__wbg_get_diagramspec_uuid(this.__wbg_ptr);return e=n[0],t=n[1],p(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}set uuid(e){const t=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramspec_uuid(this.__wbg_ptr,t,n)}get description(){const e=r.__wbg_get_diagramspec_description(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set description(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramspec_description(this.__wbg_ptr,t,n)}get tags(){const e=r.__wbg_get_diagramspec_tags(this.__wbg_ptr);let t;return 0!==e[0]&&(t=v(e[0],e[1]).slice(),r.__wbindgen_free(e[0],4*e[1],4)),t}set tags(e){var t=m(e)?0:O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramspec_tags(this.__wbg_ptr,t,n)}get elements_specs(){const e=r.__wbg_get_diagramspec_elements_specs(this.__wbg_ptr);var t=v(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set elements_specs(e){const t=O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramspec_elements_specs(this.__wbg_ptr,t,n)}get shapes(){const e=r.__wbg_get_diagramspec_shapes(this.__wbg_ptr);var t=v(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set shapes(e){const t=O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramspec_shapes(this.__wbg_ptr,t,n)}get auto_layout_enabled(){return 0!==r.__wbg_get_diagramspec_auto_layout_enabled(this.__wbg_ptr)}set auto_layout_enabled(e){r.__wbg_set_diagramspec_auto_layout_enabled(this.__wbg_ptr,e)}get auto_layout_orientation(){return r.__wbg_get_diagramspec_auto_layout_orientation(this.__wbg_ptr)}set auto_layout_orientation(e){r.__wbg_set_diagramspec_auto_layout_orientation(this.__wbg_ptr,e)}get auto_layout_only_straight_arrows(){return 0!==r.__wbg_get_diagramspec_auto_layout_only_straight_arrows(this.__wbg_ptr)}set auto_layout_only_straight_arrows(e){r.__wbg_set_diagramspec_auto_layout_only_straight_arrows(this.__wbg_ptr,e)}get auto_layout_ranksep(){return r.__wbg_get_diagramspec_auto_layout_ranksep(this.__wbg_ptr)}set auto_layout_ranksep(e){r.__wbg_set_diagramspec_auto_layout_ranksep(this.__wbg_ptr,e)}get auto_layout_subgraph_inner_margin(){return r.__wbg_get_diagramspec_auto_layout_subgraph_inner_margin(this.__wbg_ptr)}set auto_layout_subgraph_inner_margin(e){r.__wbg_set_diagramspec_auto_layout_subgraph_inner_margin(this.__wbg_ptr,e)}get auto_layout_subgraph_outer_margin(){return r.__wbg_get_diagramspec_auto_layout_subgraph_outer_margin(this.__wbg_ptr)}set auto_layout_subgraph_outer_margin(e){r.__wbg_set_diagramspec_auto_layout_subgraph_outer_margin(this.__wbg_ptr,e)}get grid_enabled(){return 0!==r.__wbg_get_diagramspec_grid_enabled(this.__wbg_ptr)}set grid_enabled(e){r.__wbg_set_diagramspec_grid_enabled(this.__wbg_ptr,e)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_diagramsthemesettings_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_elementdata_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_hookpayload_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_intounderlyingbytesource_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_intounderlyingsink_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_intounderlyingsource_free(e>>>0,1)));const V="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_minaerror_free(e>>>0,1)));class Q{static __wrap(e){e>>>=0;const t=Object.create(Q.prototype);return t.__wbg_ptr=e,V.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,V.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_minaerror_free(e,0)}get code(){return r.__wbg_get_minaerror_code(this.__wbg_ptr)}set code(e){r.__wbg_set_minaerror_code(this.__wbg_ptr,e)}get msg(){let e,t;try{const n=r.__wbg_get_minaerror_msg(this.__wbg_ptr);return e=n[0],t=n[1],p(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}set msg(e){const t=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_minaerror_msg(this.__wbg_ptr,t,n)}}const J="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_person_free(e>>>0,1)));class K{static __wrap(e){e>>>=0;const t=Object.create(K.prototype);return t.__wbg_ptr=e,J.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof K?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,J.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_person_free(e,0)}get base_data(){const e=r.__wbg_get_component_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){y(e,A);var t=e.__destroy_into_raw();r.__wbg_set_component_base_data(this.__wbg_ptr,t)}get person_type(){return r.__wbg_get_person_person_type(this.__wbg_ptr)}set person_type(e){r.__wbg_set_person_person_type(this.__wbg_ptr,m(e)?0:b(e))}}const ee="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_point_free(e>>>0,1)));class te{static __wrap(e){e>>>=0;const t=Object.create(te.prototype);return t.__wbg_ptr=e,ee.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof te?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ee.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_point_free(e,0)}get x(){return r.__wbg_get_point_x(this.__wbg_ptr)}set x(e){r.__wbg_set_point_x(this.__wbg_ptr,e)}get y(){return r.__wbg_get_point_y(this.__wbg_ptr)}set y(e){r.__wbg_set_point_y(this.__wbg_ptr,e)}}const ne="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_position_free(e>>>0,1)));class re{static __wrap(e){e>>>=0;const t=Object.create(re.prototype);return t.__wbg_ptr=e,ne.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ne.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_position_free(e,0)}get left(){const e=r.__wbg_get_position_left(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set left(e){r.__wbg_set_position_left(this.__wbg_ptr,!m(e),m(e)?0:e)}get top(){const e=r.__wbg_get_position_top(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set top(e){r.__wbg_set_position_top(this.__wbg_ptr,!m(e),m(e)?0:e)}get z_index(){const e=r.__wbg_get_position_z_index(this.__wbg_ptr);return 4294967297===e?void 0:e}set z_index(e){r.__wbg_set_position_z_index(this.__wbg_ptr,m(e)?4294967297:0|e)}get angle(){const e=r.__wbg_get_position_angle(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set angle(e){r.__wbg_set_position_angle(this.__wbg_ptr,!m(e),m(e)?0:e)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_project_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_projectlibrary_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_projectsettings_free(e>>>0,1)));const ae="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_relationship_free(e>>>0,1)));class oe{static __wrap(e){e>>>=0;const t=Object.create(oe.prototype);return t.__wbg_ptr=e,ae.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof oe?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ae.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_relationship_free(e,0)}get base_data(){const e=r.__wbg_get_component_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){y(e,A);var t=e.__destroy_into_raw();r.__wbg_set_component_base_data(this.__wbg_ptr,t)}get from(){const e=r.__wbg_get_relationship_from(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set from(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_component_technology(this.__wbg_ptr,t,n)}get to(){const e=r.__wbg_get_relationship_to(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set to(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_relationship_to(this.__wbg_ptr,t,n)}get technology(){const e=r.__wbg_get_relationship_technology(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set technology(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_relationship_technology(this.__wbg_ptr,t,n)}get relationship_type(){return r.__wbg_get_relationship_relationship_type(this.__wbg_ptr)}set relationship_type(e){r.__wbg_set_relationship_relationship_type(this.__wbg_ptr,m(e)?0:b(e))}}const ie="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_shape_free(e>>>0,1)));class _e{static __wrap(e){e>>>=0;const t=Object.create(_e.prototype);return t.__wbg_ptr=e,ie.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof _e?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ie.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_shape_free(e,0)}get shape_type(){return r.__wbg_get_shape_shape_type(this.__wbg_ptr)}set shape_type(e){r.__wbg_set_shape_shape_type(this.__wbg_ptr,m(e)?0:b(e))}get position(){const e=r.__wbg_get_shape_position(this.__wbg_ptr);return 0===e?void 0:re.__wrap(e)}set position(e){let t=0;m(e)||(y(e,re),t=e.__destroy_into_raw()),r.__wbg_set_shape_position(this.__wbg_ptr,t)}get size(){const e=r.__wbg_get_shape_size(this.__wbg_ptr);return 0===e?void 0:se.__wrap(e)}set size(e){let t=0;m(e)||(y(e,se),t=e.__destroy_into_raw()),r.__wbg_set_shape_size(this.__wbg_ptr,t)}}const le="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_size_free(e>>>0,1)));class se{static __wrap(e){e>>>=0;const t=Object.create(se.prototype);return t.__wbg_ptr=e,le.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,le.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_size_free(e,0)}get width(){const e=r.__wbg_get_size_width(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set width(e){r.__wbg_set_size_width(this.__wbg_ptr,!m(e),m(e)?0:e)}get height(){const e=r.__wbg_get_size_height(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set height(e){r.__wbg_set_size_height(this.__wbg_ptr,!m(e),m(e)?0:e)}get scale_x(){const e=r.__wbg_get_size_scale_x(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set scale_x(e){r.__wbg_set_size_scale_x(this.__wbg_ptr,!m(e),m(e)?0:e)}get scale_y(){const e=r.__wbg_get_size_scale_y(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set scale_y(e){r.__wbg_set_size_scale_y(this.__wbg_ptr,!m(e),m(e)?0:e)}}const ce="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_softwaresystem_free(e>>>0,1)));class ue{static __wrap(e){e>>>=0;const t=Object.create(ue.prototype);return t.__wbg_ptr=e,ce.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof ue?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ce.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_softwaresystem_free(e,0)}get base_data(){const e=r.__wbg_get_container_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){y(e,A);var t=e.__destroy_into_raw();r.__wbg_set_container_base_data(this.__wbg_ptr,t)}get system_type(){return r.__wbg_get_softwaresystem_system_type(this.__wbg_ptr)}set system_type(e){r.__wbg_set_softwaresystem_system_type(this.__wbg_ptr,m(e)?0:b(e))}}function de(e,t){const n=c(String(t),r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function ge(e){e.abort()}function pe(){return f((function(e,t,n,r,a){e.append(p(t,n),p(r,a))}),arguments)}function be(){return f((function(e,t,n,r,a){e.append(p(t,n),p(r,a))}),arguments)}function fe(){return f((function(e,t,n,r,a,o){e.append(p(t,n),r,p(a,o))}),arguments)}function me(){return f((function(e,t,n,r){e.append(p(t,n),r)}),arguments)}function we(){return f((function(e){return e.arrayBuffer()}),arguments)}function he(e){return e.arrayBuffer()}function ye(e){return j.__wrap(e)}function ve(e){return j.__unwrap(e)}function Oe(e){return e.buffer}function Se(e){return e.buffer}function Ee(e){const t=e.byobRequest;return m(t)?0:b(t)}function xe(e){return e.byteLength}function Te(e){return e.byteOffset}function Re(){return f((function(e,t){return e.call(t)}),arguments)}function Ce(){return f((function(e,t,n){return e.call(t,n)}),arguments)}function Ie(e){return e.close()}function De(){return f((function(e){e.close()}),arguments)}function ke(){return f((function(e){e.close()}),arguments)}function Le(e){return M.__wrap(e)}function Ae(e){return M.__unwrap(e)}function Ne(e){return z.__wrap(e)}function je(e){return z.__unwrap(e)}function Fe(e,t){return e.createWritable(t)}function Me(e){return e.crypto}function Pe(e){console.debug(e)}function ze(e){return H.__wrap(e)}function Be(e){return H.__unwrap(e)}function He(e){return Y.__wrap(e)}function We(e){return Z.__wrap(e)}function Ye(e){return Z.__unwrap(e)}function Xe(e){return e.done}function Ze(){return f((function(e,t){e.enqueue(t)}),arguments)}function $e(e){return e.entries()}function Ge(e){return Object.entries(e)}function Ue(e){console.error(e)}function qe(e,t){let n,a;try{n=e,a=t,console.error(p(e,t))}finally{r.__wbindgen_free(n,a,1)}}function Ve(e){return fetch(e)}function Qe(e,t){return e.fetch(t)}function Je(e,t,n,r){return e.getDirectoryHandle(p(t,n),r)}function Ke(e,t,n,r){return e.getFileHandle(p(t,n),r)}function et(e){return e.getFile()}function tt(){return f((function(e,t){e.getRandomValues(t)}),arguments)}function nt(){return f((function(e,t){return Reflect.get(e,t)}),arguments)}function rt(e,t){return e[t>>>0]}function at(e,t){return e[t]}function ot(){return f((function(e,t){return Reflect.has(e,t)}),arguments)}function it(e){return e.headers}function _t(e){console.info(e)}function lt(e){let t;try{t=e instanceof ArrayBuffer}catch(e){t=!1}return t}function st(e){let t;try{t=e instanceof Error}catch(e){t=!1}return t}function ct(e){let t;try{t=e instanceof FileSystemDirectoryHandle}catch(e){t=!1}return t}function ut(e){let t;try{t=e instanceof FileSystemFileHandle}catch(e){t=!1}return t}function dt(e){let t;try{t=e instanceof File}catch(e){t=!1}return t}function gt(e){let t;try{t=e instanceof Response}catch(e){t=!1}return t}function pt(e){let t;try{t=e instanceof Uint8Array}catch(e){t=!1}return t}function bt(e){return Array.isArray(e)}function ft(e){return Number.isSafeInteger(e)}function mt(){return Symbol.iterator}function wt(e){return e.lastModified}function ht(e){return e.length}function yt(e){return e.length}function vt(e){console.log(e)}function Ot(e){return e.message}function St(e){return Q.__wrap(e)}function Et(e){return e.msCrypto}function xt(e,t){const n=c(t.name,r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function Tt(){return f((function(){return new Headers}),arguments)}function Rt(e,t){try{var n={a:e,b:t};const a=new Promise(((e,t)=>{const a=n.a;n.a=0;try{return function(e,t,n,a){r.closure72_externref_shim(e,t,n,a)}(a,n.b,e,t)}finally{n.a=a}}));return a}finally{n.a=n.b=0}}function Ct(){return new Object}function It(){return new Map}function Dt(){return new Array}function kt(){return new Error}function Lt(){return f((function(){return new FormData}),arguments)}function At(e){return new Uint8Array(e)}function Nt(e,t){return new Error(p(e,t))}function jt(){return f((function(){return new AbortController}),arguments)}function Ft(e,t){return new Function(p(e,t))}function Mt(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)}function Pt(e){return new Uint8Array(e>>>0)}function zt(){return f((function(e,t,n){return new Request(p(e,t),n)}),arguments)}function Bt(){return f((function(e,t){return new Blob(e,t)}),arguments)}function Ht(e){return e.next}function Wt(){return f((function(e){return e.next()}),arguments)}function Yt(){return f((function(e){return e.next()}),arguments)}function Xt(e){return e.node}function Zt(e){return K.__wrap(e)}function $t(e){return K.__unwrap(e)}function Gt(e){return te.__wrap(e)}function Ut(e){return te.__unwrap(e)}function qt(){return f((function(e,t){e.postMessage(t)}),arguments)}function Vt(e){return e.process}function Qt(e,t){return e.push(t)}function Jt(e){queueMicrotask(e)}function Kt(e){return e.queueMicrotask}function en(){return f((function(e,t){e.randomFillSync(t)}),arguments)}function tn(e){return oe.__wrap(e)}function nn(e){return oe.__unwrap(e)}function rn(e,t,n){return e.removeEntry(p(t,n))}function an(e,t,n,r){return e.removeEntry(p(t,n),r)}function on(){return f((function(){return e.require}),arguments)}function _n(e){return Promise.resolve(e)}function ln(){return f((function(e,t){e.respond(t>>>0)}),arguments)}function sn(){return f((function(e,t){return e.seek(t)}),arguments)}function cn(e,t,n){e[t]=n}function un(e,t,n){e[t>>>0]=n}function dn(e,t,n){e.set(t,n>>>0)}function gn(e,t,n){return e.set(t,n)}function pn(e,t){e.body=t}function bn(e,t){e.create=0!==t}function fn(e,t){e.create=0!==t}function mn(e,t){e.credentials=D[t]}function wn(e,t){e.headers=t}function hn(e,t){e.keepExistingData=0!==t}function yn(e,t,n){e.method=p(t,n)}function vn(e,t){e.mode=k[t]}function On(e,t){e.recursive=0!==t}function Sn(e,t){e.signal=t}function En(e,t,n){e.type=p(t,n)}function xn(e){return _e.__wrap(e)}function Tn(e){return _e.__unwrap(e)}function Rn(e){return e.signal}function Cn(e){return e.size}function In(e){return ue.__wrap(e)}function Dn(e){return ue.__unwrap(e)}function kn(e,t){const n=c(t.stack,r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function Ln(){const e=void 0===n.g?null:n.g;return m(e)?0:b(e)}function An(){const e="undefined"==typeof globalThis?null:globalThis;return m(e)?0:b(e)}function Nn(){const e="undefined"==typeof self?null:self;return m(e)?0:b(e)}function jn(){const e="undefined"==typeof window?null:window;return m(e)?0:b(e)}function Fn(e){return e.status}function Mn(){return f((function(e){return JSON.stringify(e)}),arguments)}function Pn(e,t,n){return e.subarray(t>>>0,n>>>0)}function zn(e){return e.text()}function Bn(e,t){return e.then(t)}function Hn(e,t,n){return e.then(t,n)}function Wn(e,t){const n=c(t.url,r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function Yn(e){return e.value}function Xn(e){return e.versions}function Zn(e){const t=e.view;return m(t)?0:b(t)}function $n(e){console.warn(e)}function Gn(){return f((function(e,t){return e.write(t)}),arguments)}function Un(e){return+e}function qn(e){return BigInt.asUintN(64,e)}function Vn(e,t){const n="bigint"==typeof t?t:void 0;d().setBigInt64(e+8,m(n)?BigInt(0):n,!0),d().setInt32(e+0,!m(n),!0)}function Qn(e){return"boolean"==typeof e?e?1:0:2}function Jn(e){const t=e.original;return 1==t.cnt--&&(t.a=0,!0)}function Kn(e,t,n){const a=function(e,t,n,a){const o={a:e,b:t,cnt:1,dtor:148},i=(...e)=>{o.cnt++;const t=o.a;o.a=0;try{return a(t,o.b,...e)}finally{0==--o.cnt?(r.__wbindgen_export_6.get(o.dtor)(t,o.b),w.unregister(o)):o.a=t}};return i.original=o,w.register(i,o,o),i}(e,t,0,I);return a}function er(e,t){const n=c(h(t),r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function tr(e,t){return new Error(p(e,t))}function nr(e,t){return e in t}function rr(){const e=r.__wbindgen_export_4,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}function ar(e){return"bigint"==typeof e}function or(e){return"function"==typeof e}function ir(e){return"object"==typeof e&&null!==e}function _r(e){return"string"==typeof e}function lr(e){return void 0===e}function sr(e,t){return e===t}function cr(e,t){return e==t}function ur(){return r.memory}function dr(e,t){const n="number"==typeof t?t:void 0;d().setFloat64(e+8,m(n)?0:n,!0),d().setInt32(e+0,!m(n),!0)}function gr(e){return e}function pr(e,t){const n="string"==typeof t?t:void 0;var a=m(n)?0:c(n,r.__wbindgen_malloc,r.__wbindgen_realloc),i=o;d().setInt32(e+4,i,!0),d().setInt32(e+0,a,!0)}function br(e,t){return p(e,t)}function fr(e,t){throw new Error(p(e,t))}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_themessettings_free(e>>>0,1)))},489:e=>{e.exports=require("fabric")},507:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.d(t,{wS:()=>_});var a=n(519),o=e([a]);async function i(e,t){if(t){const n="https://keadex.dev/api/download-gh-raw-file",r={headers:{"Keadex-Gh-Url":e}};return t&&(r.headers["Keadex-Gh-Authorization"]=t),await fetch(n,r)}return await fetch(e)}async function _(e,t,n){let r,o,_;try{r=(0,a._Cc)(e),o=(0,a.Llp)(e,t),_=(0,a.JD7)(e,t)}catch(e){throw console.error(e),new Error("Invalid URL: the provided URL is an invalid Mina project or diagram.")}if(r&&o&&_){let e,t,a;try{const l=await i(r,n),s=await i(o,n),c=await i(_,n);if(l.ok&&s.ok&&c.ok)return e=await l.text(),t=await s.text(),a=await c.text(),{projectSettingsJson:e,plantuml:t,spec:a};throw new Error}catch(e){throw console.error(e),new Error("Diagram or project settings not found. Please verify the URLs provided, or, if linking to a private repository, ensure the GitHub token is configured.")}}}a=(o.then?(await o)():o)[0],r()}catch(l){r(l)}}))},519:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.d(t,{JD7:()=>o.JD7,Llp:()=>o.Llp,Oxg:()=>o.Oxg,_Cc:()=>o._Cc,qjW:()=>o.qjW});var a=n(196),o=n(457),i=e([a]);a=(i.then?(await i)():i)[0],(0,o.lIU)(a),a.__wbindgen_start(),r()}catch(e){r(e)}}))},571:(e,t,n)=>{n.d(t,{D:()=>tn});var r=n(416);const a=["TopToBottom","LeftToRight"],o=["https://","http://"];let i=function(e){return e.Alias="Alias",e}({});const _="object:modified",l="mouseup",s="modified",c="selected",u="deselected",d="#FFFFFF",g="#000000",p=12,b=10,f=20,m=20,w=120,h=20,y=10,v={SIZES:{DEFAULT_TOP:f+h,DEFAULT_LEFT:m+w+50,BORDER_WIDTH:1},FONT:{FAMILY:"Roboto"}},O={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:O.SIZES.MIN_HEIGHT/2-v.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:O.SIZES.WIDTH/2-v.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 x="rgba(0,0,0,0)",T="#828282",R="#404040",C="#ff8f26",I=10,D=10,k=3,L=3,A=9,N=1,j=2,F=90,M=40,P=45,z=10,B=10,H=150,W=80,Y=10,X={SIZES:{STROKE_DASH_ARRAY:[5,5]}},Z={'"dashed"':{name:'"dashed"',value:[8,5]}};var $=n(385);const G=require("change-case");n(452);var U=n(636),q=n(489);function V(e){try{return`Open Link ${new URL(e).host.replace("www.","")}`}catch(e){return"Open Link"}}function Q(e){return`<${e.toString().toUpperCase()}>`}function J(e,t=!0,n){var r,a,o,i;let _,l,s,c;return e.forEach((e=>{if(e.visible){const r=e.getBoundingRect(!1,!0),a=t?e.getBoundingRect(!0,!1):r;let o=a.left,i=a.top;if(n&&o&&i){const e=fabric.util.transformPoint(new fabric.Point(o,i),n);o=e.x,i=e.y}(void 0===_||o<_)&&(_=o),void 0!==o&&void 0!==r.width&&(void 0===l||o+r.width>l)&&(l=o+r.width),(void 0===c||void 0!==i&&i<c)&&(c=i),void 0!==i&&void 0!==r.height&&(void 0===s||r.height+i>s)&&(s=i+r.height)}})),{left:_,right:l,top:c,bottom:s,width:(null!=(r=l)?r:0)-(null!=(a=_)?a:0),height:(null!=(o=s)?o:0)-(null!=(i=c)?i:0)}}function K(e,t){let n=-1;return e&&(n=e.getObjects().indexOf(t)),-1!==n?n:void 0}function ee(e,t,n=Number.MAX_SAFE_INTEGER){let r=n;return t.forEach((t=>{const n=K(e,t);void 0!==n&&n<r&&(r=n)})),r!==Number.MAX_SAFE_INTEGER?r:void 0}function te(e,t=!0){let n=[];return e&&e.forEach((e=>{(e.visible||!e.visible&&t)&&n.push(e),e.children&&(n=n.concat(te(e.children,t)))})),n}function ne(e){let t=0,n=0;if(e){const r=e.viewportTransform;t=r?r[4]:0,n=r?r[5]:0}return{panX:t,panY:n}}function re(e){var t;const n=e.parent,r=function(e){let t=[];const n=new Set;if(e){let r=[];e.forEach((e=>{const t=e.getVirtualGroupRoot();t&&n.add(t)})),n.forEach((e=>{var t;r=r.concat(te(null!=(t=e.children)?t:[],!0))})),t=e.filter((e=>!r.includes(e)))}return{filteredObjects:t,virtualGroupsRoots:n}}(null==(t=e.canvas)?void 0:t.getActiveObjects());let a,o;if(r.filteredObjects.length>0||r.virtualGroupsRoots.size>1){let e=r.filteredObjects;r.virtualGroupsRoots.forEach((t=>{var n;return e=e.concat(te(null!=(n=t.children)?n:[],!1))})),a=e,o="multiple"}else{var i;a=te(null!=(i=null==n?void 0:n.children)?i:[],!1),o="single"}return{objects:a,type:o}}function ae(e,t){var n,r;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!=(r=null==t?void 0:t.map((e=>{var t;return null!=(t=e.name)?t:"undefined"})))?r:[]).sort().join(",")}q.fabric.ActiveSelection.prototype._controlsVisibility={tl:!0,tr:!0,br:!0,bl:!0,ml:!1,mt:!1,mr:!1,mb:!1,mtr:!1},q.fabric.Object.prototype.isVirtualGroupParent=function(){return void 0!==this.children&&this.children.length>0},q.fabric.Object.prototype.isVirtualGroupChild=function(){return void 0!==this.parent},q.fabric.Object.prototype.isVirtualGroupRoot=function(){return this.isVirtualGroupParent()&&void 0===this.parent},q.fabric.Object.prototype.isVirtualGroupLeaf=function(){return this.isVirtualGroupChild()&&!this.isVirtualGroupParent()},q.fabric.Object.prototype.isVirtualGroupBaseShape=function(){return this.isVirtualGroupChild()&&this.parent.children[0]===this},q.fabric.Object.prototype.getVirtualGroupRoot=function(){let e=this.parent;for(;e&&e.parent;)e=e.parent;return e};class oe extends q.fabric.Point{constructor(e,t,n){super(e,t),this.customType=void 0,this.data=void 0,this.customType=n}}class ie extends q.fabric.ActiveSelection{}const _e=e=>"getUpdatedSpecs"in e;class le extends q.fabric.Group{constructor(e,t,n,r,a,o,i,_,s=!1){var c,u,d,g,p,b,f,m,w,h,y;super(a,Object.assign({data:{rawDiagramElementSpec:t,rawData:e,rawAutoLayout:r},name:null!=(c=n.alias)?c:"undefined",left:void 0!==(null==t||null==(u=t.position)?void 0:u.left)?null==t||null==(d=t.position)?void 0:d.left:null==(g=n.position)?void 0:g.left,top:void 0!==(null==t||null==(p=t.position)?void 0:p.top)?null==t||null==(b=t.position)?void 0:b.top:null==(f=n.position)?void 0:f.top,scaleX:void 0!==(null==t||null==(m=t.size)?void 0:m.scale_x)?null==t||null==(w=t.size)?void 0:w.scale_x:1,scaleY:void 0!==(null==t||null==(h=t.size)?void 0:h.scale_y)?null==t||null==(y=t.size)?void 0:y.scale_y:1},o)),this.parent=i,this.children=null!=_?_:[],this.setControlsVisibility({mb:!1,ml:!1,mr:!1,mt:!1,mtr:!1}),s||this.on(l,(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 r,a,o,i,_,l,s,c,u,d,g,p,b,f,m,w;const e=(0,$.mg)(n);return e.position={left:null!=(r=this.left)?r:null==(a=n.position)?void 0:a.left,top:null!=(o=this.top)?o:null==(i=n.position)?void 0:i.top,z_index:null!=(_=K(this.canvas,this))?_:null==(l=n.position)?void 0:l.z_index,angle:null!=(s=this.angle)?s:null==(c=n.position)?void 0:c.angle},e.size={width:null!=(u=this.width)?u:null==(d=n.size)?void 0:d.width,height:null!=(g=this.height)?g:null==(p=n.size)?void 0:p.height,scale_x:null!=(b=this.scaleX)?b:null==(f=n.size)?void 0:f.scale_x,scale_y:null!=(m=this.scaleY)?m:null==(w=n.size)?void 0:w.scale_y},e}}onComponentMouseUp(e,t,n,r){if(e)switch(t.e.preventDefault(),t.button){case 3:{e.setActiveObject(n),e.renderAll();const a=e.contextTop,o=q.fabric.util.getPointer(t.e,a.canvas),i=new CustomEvent(U.UW.CONTEXT_MENU,{detail:{sourceEvent:t,pageX:o.x,pageY:o.y,menuItems:null!=r?r:se(e,t,n)}});document.dispatchEvent(i);break}}}}const se=(e,t,n,r=!0)=>{var a,l,s,c;const u=[],d=n instanceof ie?n.parent:n,g=null==d?void 0:d.data,p=null==g||null==(a=g.rawDiagramElementSpec)?void 0:a.element_type,b=null==g||null==(l=g.rawData)||null==(l=l.base_data)||null==(l=l.link)?void 0:l.split(";"),f=e.isReadOnly(),m=e.codingFeaturesEnabled,w=void 0!==p&&b&&b.length>0&&void 0!==(ve(h=p)||me(h)||fe(h)||be(h));var h;let y=0,v=null==d?void 0:d.parent;for(;v;){var O;y++,v=null==(O=v)?void 0:O.parent}return w&&b.forEach(((t,n)=>{const r=t.replace(/ /gi,"");r.length>0&&(function(e){return o.some((t=>e.startsWith(t)))}(r)?u.push({isHeaderMenuItem:!1,id:`openLink${n}`,label:V(r),onClick:()=>{e.diagramListener&&e.diagramListener.onOpenExternalLinkClick(function(e,t){let n=`${e}`;for(const e in i){var r;e===i.Alias.toString()&&n.includes(Q(i.Alias))&&null!=t&&null!=(r=t.base_data)&&r.alias&&(n=n.replace(new RegExp(Q(i.Alias),"gi"),t.base_data.alias))}return n}(r,null==g?void 0:g.rawData))}}):u.push({isHeaderMenuItem:!1,id:"openDiagram",label:"Open Diagram",onClick:()=>{e.diagramListener&&e.diagramListener.onOpenDiagramClick(r)}}))})),m&&null!=g&&g.rawData&&null!=(s=g.rawDiagramElementSpec)&&s.element_type&&u.push({isHeaderMenuItem:!1,id:"selectDiagramElementCode",label:"Select code",onClick:()=>{var t;null!=(t=e.diagramListener)&&t.onSelectElementCode&&e.diagramListener.onSelectElementCode(g.rawData,g.rawDiagramElementSpec.element_type,y)}}),!f&&(w||m&&null!=g&&g.rawData&&null!=(c=g.rawDiagramElementSpec)&&c.element_type)&&u.push({id:"separatorCommon",isSepator:!0}),f||u.push({isHeaderMenuItem:!1,id:"bringToFront",label:"Bring to Front",onClick:()=>{var e;n.bringToFront(),null==(e=n.canvas)||e.fire(_)}},{isHeaderMenuItem:!1,id:"bringForward",label:"Bring Forward",onClick:()=>{var e;n.bringForward(),null==(e=n.canvas)||e.fire(_)}},{isHeaderMenuItem:!1,id:"sentToBack",label:"Send to Back",onClick:()=>ce(n)},{isHeaderMenuItem:!1,id:"sendBackwards",label:"Send Backwards",onClick:()=>ue(n)}),r?[{isHeaderMenuItem:!0,id:"baseComponentContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:u}]:u},ce=e=>{var t;e.parent||(e.sendToBack(),null==(t=e.canvas)||t.fire(_))},ue=e=>{if(e instanceof ie){var t,n,r;const o=e.parent,i=ee(e.canvas,null!=(t=null==o?void 0:o.children)?t:[]),l=ee(e.canvas,null!=(n=null==o||null==(r=o.parent)?void 0:r.children)?n:[]);var a;void 0===l||void 0===i||i-1>l?(e.sendBackwards(),null==(a=e.canvas)||a.fire(_)):console.debug(`cannot send backwards ${i} ${l}`)}else{var o,i;const t=K(e.canvas,e),n=ee(e.canvas,null!=(o=null==(i=e.parent)?void 0:i.children)?o:[]);var l;void 0===n||void 0===t||t-1>n?(e.sendBackwards(),null==(l=e.canvas)||l.fire(_)):console.debug(`cannot send backwards ${t} ${n}`)}},de=(e,t,n,r,a)=>ge(e,t,n,r,a.elements_specs)||pe(e,t,n,r),ge=(e,t,n,r,a)=>{for(let o=0;o<a.length;o++){const i=a[o],_=i.alias===e,l=(0,$.$r)(i.element_type,r);if(_&&l)return i;if(i.inner_specs){const a=i.inner_specs,o=ge(e,t,n,r,a);if(o)return o}}},pe=(e,t,n,r)=>({alias:e,from:t,to:n,element_type:r}),be=e=>{if("Boundary"in e)return e.Boundary},fe=e=>{if("Component"in e)return e.Component},me=e=>{if("Container"in e)return e.Container},we=e=>{if("DeploymentNode"in e)return e.DeploymentNode},he=e=>{if("Person"in e)return e.Person},ye=e=>{if("Relationship"in e)return e.Relationship},ve=e=>{if("SoftwareSystem"in e)return e.SoftwareSystem},Oe=(e,t)=>{var n,r,a;return e&&null!=(n=t[e])&&n.position?{left:null==(r=t[e].position)?void 0:r.x,top:null==(a=t[e].position)?void 0:a.y}:{left:v.SIZES.DEFAULT_LEFT,top:v.SIZES.DEFAULT_TOP}};function Se(e){return btoa(e)}const Ee="_margin_hack";function xe(e,t,n){return 2===n.length?n.map(((n,r)=>{const a=0===r?(0,$.qI)(e.x):(0,$.qI)(e.y),o=0===r?n:t-n;return(0,$.cr)(o,Te)+a})):n}const Te=96,Re=(0,$.wF)(v.SIZES.DEFAULT_LEFT),Ce=(0,$.wF)(v.SIZES.DEFAULT_TOP),Ie=4.5;function De(e){const t={x:O.SIZES.WIDTH,y:O.SIZES.MIN_HEIGHT+2*P},n={x:O.SIZES.WIDTH,y:O.SIZES.MIN_HEIGHT},r={x:O.SIZES.WIDTH+S.SIZES.WIDTH_TAIL+S.SIZES.WIDTH_HEAD,y:O.SIZES.MIN_HEIGHT},a={x:O.SIZES.WIDTH,y:O.SIZES.MIN_HEIGHT+E.SIZES.WIDTH_TOP+E.SIZES.WIDTH_BOTTOM};if(he(e))return t;if(ve(e)){const t=ve(e);return"SystemDb"===t.system_type||"SystemDb_Ext"===t.system_type?a:"SystemQueue"===t.system_type||"SystemQueue_Ext"===t.system_type?r:n}if(me(e)){const t=me(e);return"ContainerDb"===t.container_type||"ContainerDb_Ext"===t.container_type?a:"ContainerQueue"===t.container_type||"ContainerQueue_Ext"===t.container_type?r:n}if(fe(e)){const t=fe(e);return"ComponentDb"===t.component_type||"ComponentDb_Ext"===t.component_type?a:"ComponentQueue"===t.component_type||"ComponentQueue_Ext"===t.component_type?r:n}return{x:100,y:100}}function ke(e,t,n,r,a){return`\n subgraph "${o=e,`${o}${Ee}`}" {\n cluster=true\n margin="${a}"\n fontsize="0pt"\n label=""\n subgraph "${e}" {\n cluster=true\n margin="${r}"\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 ${Le(t,n,r,a)}\n }\n }\n `;var o}function Le(e,t,n,r){let a="";for(const _ of e){const e=De(_);let l;if(he(_))l=he(_).base_data.alias;else if(ve(_))l=ve(_).base_data.alias;else if(me(_))l=me(_).base_data.alias;else if(fe(_))l=fe(_).base_data.alias;else if(be(_)){const e=be(_);l=e.base_data.alias,l&&(t.add(l),a=a.concat(ke(l,e.sub_elements,t,n,r))),l=void 0}else if(we(_)){const e=we(_);l=e.base_data.alias,l&&(t.add(l),a=a.concat(ke(l,e.sub_elements,t,n,r))),l=void 0}else if(ye(_)){const e=ye(_);var o,i;e.from&&e.to&&(a=a.concat(`\n"${e.from}" -> "${e.to}" [name="${e.base_data.alias}", xlabel="${(0,$.l)([null!=(o=e.base_data.label)?o:"",null!=(i=e.technology)?i:""])}", ltail="${e.from}", lhead="${e.to}", fontsize="${I}", keadex_fromissubgraph=${t.has(e.from)}, keadex_toissubgraph=${t.has(e.to)}]`)),l=void 0}l&&(a=a.concat(`\n"${l}" [width=${(0,$.wF)(e.x,Te)}, height=${(0,$.wF)(e.y,Te)}, peripheries=2]`))}return a}const Ae=require("@hpcc-js/wasm-graphviz"),Ne=require("react-toastify");function je(e){if(e)return Z[e]}const Fe="legend",Me=(e,t,n,r,a,o)=>{var i,_,l;const s=[],c=n?1:0,u=new q.fabric.Rect({fill:t,stroke:n,strokeWidth:c,strokeDashArray:r,left:m,top:f+h*o,width:w-c,height:h-c});s.push(u);const d=new q.fabric.Text(e,{fill:a,fontFamily:v.FONT.FAMILY,fontSize:b,fontWeight:"normal",textAlign:"left",originX:"left",originY:"top",left:m+y});return d.top=(null!=(i=u.top)?i:0)+(null!=(_=u.height)?_:0)/2-(null!=(l=d.height)?l:0)/2,s.push(d),s},Pe=(e,t)=>{var n,r,a,o,i,_,l,s,c,u,d,b,w,h,y,S,E,x,T,R,C,I,D,k,L,A,N,j,F,M,P,z,B,H;let W=[];const Y=new q.fabric.Text("LEGEND",{fill:g,fontFamily:v.FONT.FAMILY,fontSize:p,fontWeight:"bold",textAlign:"left",originX:"left",originY:"top",left:m,top:f});W.push(Y),W=W.concat(Me("Person",null!=(n=null==t||null==(r=t.diagramsThemeSettings)?void 0:r.bg_color_person)?n:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,void 0,void 0,null!=(a=null==t||null==(o=t.diagramsThemeSettings)?void 0:o.text_color_person)?a:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON,1)),W=W.concat(Me("Person External",null!=(i=null==t||null==(_=t.diagramsThemeSettings)?void 0:_.bg_color_person_ext)?i:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,void 0,void 0,null!=(l=null==t||null==(s=t.diagramsThemeSettings)?void 0:s.text_color_person_ext)?l:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,2)),W=W.concat(Me("System",null!=(c=null==t||null==(u=t.diagramsThemeSettings)?void 0:u.bg_color_software_system)?c:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,void 0,void 0,null!=(d=null==t||null==(b=t.diagramsThemeSettings)?void 0:b.text_color_software_system)?d:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON,3)),W=W.concat(Me("System External",null!=(w=null==t||null==(h=t.diagramsThemeSettings)?void 0:h.bg_color_software_system_ext)?w:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,void 0,void 0,null!=(y=null==t||null==(S=t.diagramsThemeSettings)?void 0:S.text_color_software_system_ext)?y:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,4)),W=W.concat(Me("Container",null!=(E=null==t||null==(x=t.diagramsThemeSettings)?void 0:x.bg_color_container)?E:O.COLORS.BG_COLOR_CONTAINER,void 0,void 0,null!=(T=null==t||null==(R=t.diagramsThemeSettings)?void 0:R.text_color_container)?T:O.COLORS.TEXT_COLOR_CONTAINER,5)),W=W.concat(Me("Container External",null!=(C=null==t||null==(I=t.diagramsThemeSettings)?void 0:I.bg_color_container_ext)?C:O.COLORS.BG_COLOR_CONTAINER_EXT,void 0,void 0,null!=(D=null==t||null==(k=t.diagramsThemeSettings)?void 0:k.text_color_container_ext)?D:O.COLORS.TEXT_COLOR_CONTAINER_EXT,6)),W=W.concat(Me("Component",null!=(L=null==t||null==(A=t.diagramsThemeSettings)?void 0:A.bg_color_component)?L:O.COLORS.BG_COLOR_COMPONENT,void 0,void 0,null!=(N=null==t||null==(j=t.diagramsThemeSettings)?void 0:j.text_color_component)?N:O.COLORS.TEXT_COLOR_COMPONENT,7)),W=W.concat(Me("Component External",null!=(F=null==t||null==(M=t.diagramsThemeSettings)?void 0:M.bg_color_component_ext)?F:O.COLORS.BG_COLOR_COMPONENT_EXT,void 0,void 0,null!=(P=null==t||null==(z=t.diagramsThemeSettings)?void 0:z.text_color_component_ext)?P:O.COLORS.TEXT_COLOR_COMPONENT_EXT,8));let X=8;var Z,$,G,U;null!=t&&null!=(B=t.diagramsThemeSettings)&&B.bg_color_boundary&&(X++,W=W.concat(Me("Boundary",t.diagramsThemeSettings.bg_color_boundary,void 0,void 0,null!=(Z=null==t||null==($=t.diagramsThemeSettings)?void 0:$.text_color_boundary)?Z:O.COLORS.TEXT_COLOR_BOUNDARY,X))),null!=t&&null!=(H=t.diagramsThemeSettings)&&H.bg_color_deployment_node&&(X++,W=W.concat(Me("Deployment Node",t.diagramsThemeSettings.bg_color_deployment_node,void 0,void 0,null!=(G=null==t||null==(U=t.diagramsThemeSettings)?void 0:U.text_color_deployment_node)?G:O.COLORS.TEXT_COLOR_DEPLOYMENT_NODE,X))),null!=t&&t.tags&&Object.entries(t.tags).forEach((([e,t],n)=>{var r,a,o,i,_;X++,W=W.concat(Me(null!=(r=null!=(a=t.legend_text)?a:t.tag)?r:"<no tag>",t.bg_color,null!=(o=t.border_color)?o:t.bg_color?void 0:"black",null==(i=je(t.border_style))?void 0:i.value,null!=(_=t.font_color)?_:"black",X))}));return new le(void 0,e,{alias:Fe,position:{left:m,top:f}},{},W)},ze="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.",Be="Graphviz not initialized. Cannot generate auto layout.",He="triangulation failed";var We=n(177);function Ye(e){return null==e?void 0:e.split("+")}function Xe(e,t){if(e&&t){const n=[];for(const r of e){const e=t[Se(r)];e&&n.push(e)}if(n.length>0)return Object.assign({},...n)}}let Ze=function(e){return e.Rectangle="RECTANGLE",e.Footer="FOOTER",e}({});class $e extends le{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(_e(t)){const n=t.getUpdatedSpecs();n&&e.inner_specs.push(n)}else if(t.name!==Ze.Footer){var n,r;e.shapes.push({position:{left:t.left,top:t.top,z_index:K(t.canvas,t)},size:{scale_x:null!=(n=t.scaleX)?n:1,scale_y:null!=(r=t.scaleY)?r:1},shape_type:t.name})}else e.shapes.push({position:{z_index:K(t.canvas,t)},shape_type:t.name});return e}}const Ge=e=>{var t,n,r,a,o,i,_,l,s,c,u;let d,g;const p=(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],b=[];null==(n=e.children)||n.forEach((e=>{e.name===Ze.Footer?g=e:e.name===Ze.Rectangle?d=e:b.push(e)}));const f=J(te(b),!1),m=null!=(r=null==(a=d)?void 0:a.scaleX)?r:1,w=null!=(o=null==(i=d)?void 0:i.scaleY)?o:1,h=null!=(_=null==(l=d)||null==(l=l.canvas)?void 0:l.getZoom())?_:1,y=ne(e.canvas),v=Y*m,O=Y*w,S=Y*m,E=Y*w;var x;d&&void 0!==f.left&&void 0!==f.right&&void 0!==f.top&&void 0!==f.bottom&&void 0!==f.width&&void 0!==f.height&&void 0!==g?(f.left=(f.left-y.panX)/h,f.top=(f.top-y.panY)/h,f.right=(f.right-y.panX)/h,f.bottom=(f.bottom-y.panY)/h,f.width=f.right-f.left,f.height=f.bottom-f.top,p||(d.width=f.width/m+v/m*2,d.height=f.height/w+O/w*3+(null!=(x=g.height)?x:0),d.left=f.left-v,d.top=f.top-O)):d&&void 0!==g&&(d.width=H,d.height=W+g.getScaledHeight()),null==(s=e.canvas)||s.renderAll(),d&&g&&void 0!==d.left&&void 0!==d.top&&void 0!==d.height&&void 0!==g.height&&(g.top=d.top+d.getScaledHeight()-g.getScaledHeight()-E,g.left=d.left+S),null==(c=d)||c.setCoords(),null==(u=g)||u.setCoords()},Ue=e=>{e.on(c,(t=>{Ve(t,e)}))},qe=e=>{e.on(c,(t=>{Ve(t,e)}))},Ve=(e,t)=>{var n;if(e.e&&null!=(n=t.parent)&&n.children){var r;const e=re(t);if(!ae(null==(r=t.canvas)?void 0:r.getActiveObjects(),e.objects)){var a,o,i;null==(a=t.canvas)||a.discardActiveObject();const n=t.parent;let r;"multiple"===e.type?r=new q.fabric.ActiveSelection(e.objects,{canvas:t.canvas}):(r=new ie(e.objects,{canvas:t.canvas}),r.parent=n,r.on(l,(e=>{Je(r.canvas,e,r,n)})),r.on(s,(e=>{var r;null==(r=t.canvas)||r.discardActiveObject(),n.fire(s)}))),null==(o=t.canvas)||o.setActiveObject(r),null==(i=t.canvas)||i.requestRenderAll()}}},Qe=(e,t)=>{e&&t&&Ge(e)},Je=(e,t,n,r)=>{n instanceof q.fabric.ActiveSelection&&e&&r.onComponentMouseUp(e,t,n,((e,t,n)=>n instanceof q.fabric.ActiveSelection?[{isHeaderMenuItem:!0,id:"baseElasticContainerContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:[...se(e,t,n,!1)]}]:[])(e,t,n))},Ke=(e,t,n,r,a,o)=>{var i,_;const l=Xe(Ye(null==(i=e.base_data)?void 0:i.tags),null==o?void 0:o.tags),c={alias:null==(_=e.base_data)?void 0:_.alias},u=new $e(e,t,c,r,[],void 0,void 0,void 0,!0);u.visible=!1;const d=((e,t,n,r,a)=>{var o,i,_,l,s,c,u,d,g,p,b,f;const m=null==e||null==(o=e.shapes)?void 0:o.filter((e=>e.shape_type===Ze.Rectangle))[0],w=new q.fabric.Rect({fill:null!=(i=null==a?void 0:a.bg_color)?i:n.bgColor,stroke:null!=(_=null==a?void 0:a.border_color)?_:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,strokeDashArray:n.strokeDashArray,left:null!=(l=null==m||null==(s=m.position)?void 0:s.left)?l:Oe(e.alias,t).left,top:null!=(c=null==m||null==(u=m.position)?void 0:u.top)?c:Oe(e.alias,t).top,name:Ze.Rectangle,rx:O.SIZES.BORDER_RADIUS,ry:O.SIZES.BORDER_RADIUS,scaleX:null!=(d=null==m||null==(g=m.size)?void 0:g.scale_x)?d:1,scaleY:null!=(p=null==m||null==(b=m.size)?void 0:b.scale_y)?p:1}),h=((e,t)=>{var n,r,a;if(e&&null!=(n=t[e])&&n.size)return{width:null==(r=t[e].size)?void 0:r.x,height:null==(a=t[e].size)?void 0:a.y}})(e.alias,t);return h&&(w.width=h.width,w.height=h.height),w.data={rawDiagramElementSpec:m},w.parent=r,Ue(w),null==(f=r.children)||f.push(w),w})(t,r,a,u,l);((e,t,n,r,a,o,i)=>{var _,l,s,c,u,d,g,p,b,f,m;const w=null==e||null==(_=e.shapes)?void 0:_.filter((e=>e.shape_type===Ze.Footer))[0],h=[],y={fontFamily:v.FONT.FAMILY,fill:null!=(l=null==i?void 0:i.font_color)?l:n.textColor};let O;var S;let E;var x,T;null!=(s=r.base_data)&&s.link&&(O=new q.fabric.Path(We.faLink.icon[4].toString(),{fill:null!=(S=null==i?void 0:i.font_color)?S:n.textColor,opacity:1,originX:"left",originY:"top",top:1,left:0}),O.scaleToWidth(10),h.push(O)),null!=(c=r.base_data)&&c.label&&(E=new q.fabric.Text(r.base_data.label,Object.assign({},y,{fontSize:z,fontWeight:"bold"})),E.top=0,E.left=null!=(x=O)&&x.getScaledWidth()?(null==(T=O)?void 0:T.getScaledWidth())+3:0,h.push(E));let R=null!=(u=null!=(d=r.boundary_type)?d:r.deployment_node_type)?u:"";R=null!=(g=null!=(p=r.boundary_custom_type)?p:r.deploymeny_node_custom_type)?g:R,R+=r.technology?`: ${r.technology}`:"",R=`[${R}]`;const C=new q.fabric.Text(R,Object.assign({},y,{fontSize:B,left:0,top:null!=(b=null==(f=E)?void 0:f.height)?b:0}));h.push(C);const I=new q.fabric.Group(h,{name:Ze.Footer,selectable:!1,evented:!1,left:a.left,top:a.top,scaleX:a.scaleX,scaleY:a.scaleY});I.data={rawDiagramElementSpec:w},I.parent=o,qe(I),null==(m=o.children)||m.push(I)})(t,0,a,e,d,u,l);let g=[];return e.sub_elements&&(g=At(void 0,e.sub_elements,n,r,Object.assign({},o,{skipAddToCanvas:!0,skipLegendRendering:!0})),g.forEach((e=>{var t;e.parent=u,null==(t=u.children)||t.push(e)}))),Ge(u),(e=>{var t;null==(t=e.children)||t.forEach((t=>{t.on(s,(t=>{Qe(e,t)})),t.children&&t.children.forEach((t=>{t.on(s,(t=>{Qe(e,t)}))}))}))})(u),u},et=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.base_data.label&&t.boundary_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){var o;const i=((e,t,n,r,a,o)=>{var i,_,l,s,c,u;const d={bgColor:null!=(i=null==o||null==(_=o.diagramsThemeSettings)?void 0:_.bg_color_boundary)?i:O.COLORS.BG_COLOR_BOUNDARY,borderColor:null!=(l=null==o||null==(s=o.diagramsThemeSettings)?void 0:s.border_color_boundary)?l:O.COLORS.BORDER_COLOR_BOUNDARY,textColor:null!=(c=null==o||null==(u=o.diagramsThemeSettings)?void 0:u.text_color_boundary)?c:O.COLORS.TEXT_COLOR_BOUNDARY,strokeDashArray:X.SIZES.STROKE_DASH_ARRAY},g=Object.assign({},d,a);return Ke(e,t,n,r,g,o)})(t,de(t.base_data.alias,void 0,void 0,{Boundary:t.boundary_type},n),n,r,void 0,a);return a&&a.skipAddToCanvas||!i||null==e||e.add(i,...te(null!=(o=i.children)?o:[])),i}},tt=(e,t,n,r,a)=>{var o,i,_,l,s,c;const u=Xe(Ye(null==(o=e.base_data)?void 0:o.tags),null==a?void 0:a.tags),d=[],g=((e,t,n)=>{var r,a,o,i,_,l,s;const c=new q.fabric.Rect({fill:null!=(r=null==n?void 0:n.bg_color)?r:t.bgColor,stroke:null!=(a=null==n?void 0:n.border_color)?a:t.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,left:v.SIZES.DEFAULT_LEFT,top:v.SIZES.DEFAULT_TOP,width:null!=(o=t.widthBox)?o:O.SIZES.WIDTH,height:O.SIZES.MIN_HEIGHT,name:null!=(i=null==(_=e.base_data)?void 0:_.alias)?i:"undefined",rx:null!=(l=t.borderRadius)?l:O.SIZES.BORDER_RADIUS,ry:null!=(s=t.borderRadius)?s:O.SIZES.BORDER_RADIUS});return c.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})})),c})(e,r,u);let p;d.push(g),null!=(i=e.base_data)&&i.tags&&(p=((e,t,n,r)=>{var a,o,i,_,l;return new q.fabric.Text(`«${null==(a=t.base_data)?void 0:a.tags}»`,{fill:null!=(o=null==r?void 0:r.font_color)?o:n.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE_TAG,fontStyle:"italic",fontWeight:"normal",textAlign:"center",originX:"center",originY:"top",left:(null!=(i=e.left)?i:v.SIZES.DEFAULT_LEFT)+(null!=(_=e.width)?_:0)/2,top:(null!=(l=e.top)?l:v.SIZES.DEFAULT_TOP)+O.SIZES.TOP_TAGS})})(g,e,r,u),d.push(p));const b=((e,t,n,r,a)=>{var o,i,_,l,s,c;return new q.fabric.Text(null!=(o=(0,$.x4)(null==(i=n.base_data)?void 0:i.label))?o:"undefined",{fill:null!=(_=null==a?void 0:a.font_color)?_:r.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE,fontWeight:"bold",textAlign:"center",originX:"center",originY:"top",left:(null!=(l=e.left)?l:v.SIZES.DEFAULT_LEFT)+(null!=(s=e.width)?s:0)/2,top:(null!=(c=null==t?void 0:t.top)?c:v.SIZES.DEFAULT_TOP)+O.SIZES.TOP_LABEL})})(g,p,e,r,u);d.push(b);const f=((e,t,n,r,a)=>{var o,i,_,l,s,c,u,d,g,p,b,f;const m=`[${null!=(o=null!=(i=null!=(_=null!=(l=null!=(s=null!=(c=null!=(u=n.boundary_custom_type)?u:n.boundary_type)?c:n.component_type)?s:n.container_type)?l:n.deployment_node_type)?_:n.deploymeny_node_custom_type)?i:n.person_type)?o:n.system_type}${n.technology?`: ${n.technology}`:""}]`;return new q.fabric.Text(m,{fill:null!=(d=null==a?void 0:a.font_color)?d:r.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE_TYPE_TECHNOLOGY,fontWeight:"normal",textAlign:"center",originX:"center",originY:"top",left:(null!=(g=e.left)?g:v.SIZES.DEFAULT_LEFT)+(null!=(p=e.width)?p:0)/2,top:(null!=(b=null==t?void 0:t.top)?b:v.SIZES.DEFAULT_TOP)+O.SIZES.TOP_TYPE_TECHNOLOGY+(null!=(f=null==t?void 0:t.height)?f:0)})})(g,b,e,r,u);let m;d.push(f),null!=(_=e.base_data)&&_.description&&(m=((e,t,n,r,a)=>{var o,i,_,l,s,c,u;const d=null!=(o=r.widthDescription)?o:e.width;return new q.fabric.Textbox(null!=(i=(0,$.x4)(null==(_=n.base_data)?void 0:_.description))?i:"",{fill:null!=(l=null==a?void 0:a.font_color)?l:r.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE_DESCRIPTION,fontWeight:400,opacity:.7,splitByGrapheme:!0,width:d?d-O.SIZES.PADDING_Y_DESCRIPTION:0,textAlign:"center",originX:"center",originY:"top",left:(null!=(s=e.left)?s:v.SIZES.DEFAULT_LEFT)+(null!=(c=e.width)?c:0)/2,top:(null!=(u=null==t?void 0:t.top)?u:0)+O.SIZES.TOP_DESCRIPTION})})(g,f,e,r,u),d.push(m)),null!=(l=e.base_data)&&l.link&&d.push(((e,t,n)=>{var r,a,o;const i=new q.fabric.Path(We.faLink.icon[4].toString(),{fill:null!=(r=null==n?void 0:n.font_color)?r:t.textColor,opacity:1,originX:"left",originY:"top",left:(null!=(a=e.left)?a:0)+5,top:(null!=(o=e.top)?o:0)+5});return i.scaleToWidth(10),i})(g,r,u)),((e,t)=>{var n,r,a;let o=(null!=(n=null==t?void 0:t.height)?n:0)+((null!=(r=null==t?void 0:t.top)?r:0)-(null!=(a=null==e?void 0:e.top)?a:0))+O.SIZES.PADDING_BOTTOM;o<O.SIZES.MIN_HEIGHT&&(o=O.SIZES.MIN_HEIGHT),e.height=o})(g,m);const w={alias:null==(s=e.base_data)?void 0:s.alias,position:Oe(null==(c=e.base_data)?void 0:c.alias,n)};return new le(e,t,w,n,d)},nt=(e,t,n,r,a)=>{var o,i,_,l;const s=Xe(Ye(null==(o=e.base_data)?void 0:o.tags),null==a?void 0:a.tags),c=[],u=((e,t,n)=>{const r=Object.assign({},t,{borderRadius:0});return tt(e,{},{},r,n)})(e,r,a);c.push(u);const d=(null!=(i=u.width)?i:0)/2-v.SIZES.BORDER_WIDTH/2;c.push(((e,t,n,r)=>{var a,o,i,_,l,s,c,u,d,g,p,b,f,m,w,h,y,O,S,x,T,R;const C=[],I=v.SIZES.BORDER_WIDTH,D=E.SIZES.TOP_BOX_HEIGHT,k=new q.fabric.Rect({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,strokeWidth:0,left:(null!=(o=e.left)?o:0)+v.SIZES.BORDER_WIDTH,top:(null!=(i=e.top)?i:0)-D+I,width:(null!=(_=e.width)?_:0)-2*v.SIZES.BORDER_WIDTH,height:D});return C.push(k),C.push(new q.fabric.Line([null!=(l=e.left)?l:0,null!=(s=e.top)?s:0,null!=(c=e.left)?c:0,null!=(u=k.top)?u:0],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(d=null==r?void 0:r.border_color)?d:n.borderColor,originX:"left",originY:"top"})),C.push(new q.fabric.Line([(null!=(g=e.left)?g:0)+(null!=(p=e.width)?p:0)-v.SIZES.BORDER_WIDTH,null!=(b=e.top)?b:0,(null!=(f=e.left)?f:0)+(null!=(m=e.width)?m:0)-v.SIZES.BORDER_WIDTH,null!=(w=k.top)?w:0],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(h=null==r?void 0:r.border_color)?h:n.borderColor,originX:"left",originY:"top"})),C.push(new q.fabric.Circle({fill:null!=(y=null==r?void 0:r.bg_color)?y:n.bgColor,stroke:null!=(O=null==r?void 0:r.border_color)?O:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,radius:t,top:(null!=(S=k.top)?S:0)-(null!=(x=e.width)?x:0)*E.SIZES.SCALE_X_TOP_BOTTOM/2,left:(null!=(T=k.left)?T:0)+ +(null!=(R=e.width)?R:0)-I,angle:90,startAngle:0,endAngle:360,scaleX:E.SIZES.SCALE_X_TOP_BOTTOM})),new q.fabric.Group(C)})(u,d,r,s)),c.push(((e,t,n,r)=>{var a,o,i,_,l,s;return new q.fabric.Circle({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,stroke:null!=(o=null==r?void 0:r.border_color)?o:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,radius:t,top:(null!=(i=e.top)?i:0)+(null!=(_=e.height)?_:0)-2*t*E.SIZES.SCALE_X_TOP_BOTTOM/2-v.SIZES.BORDER_WIDTH,left:(null!=(l=e.left)?l:0)+(null!=(s=e.width)?s:0),angle:90,startAngle:270,endAngle:90,scaleX:E.SIZES.SCALE_X_TOP_BOTTOM})})(u,d,r,s));const g={alias:null==(_=e.base_data)?void 0:_.alias,position:Oe(null==(l=e.base_data)?void 0:l.alias,n)};return new le(e,t,g,n,c)},rt=(e,t,n,r,a)=>{var o,i,_,l;const s=Xe(Ye(null==(o=e.base_data)?void 0:o.tags),null==a?void 0:a.tags),c=[],u=at(e,r,a);c.push(u);const d=(null!=(i=u.height)?i:0)/2-v.SIZES.BORDER_WIDTH/2;c.push(ot(u,d,r,s)),c.push(it(u,d,r,s));const g={alias:null==(_=e.base_data)?void 0:_.alias,position:Oe(null==(l=e.base_data)?void 0:l.alias,n)};return new le(e,t,g,n,c)},at=(e,t,n)=>{const r=Object.assign({},t,{borderRadius:0});return tt(e,{},{},r,n)},ot=(e,t,n,r)=>{var a,o,i;return new q.fabric.Circle({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,stroke:null!=(o=null==r?void 0:r.border_color)?o:n.borderColor,strokeWidth:v.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*v.SIZES.BORDER_WIDTH,angle:90,startAngle:0,endAngle:180,scaleY:S.SIZES.SCALE_Y_TAIL_HEAD})},it=(e,t,n,r)=>{var a,o,i,_,l,s,c,u,d,g,p,b,f,m,w,h,y,O,E,x,T,R,C,I;const D=[],k=v.SIZES.BORDER_WIDTH,L=new q.fabric.Rect({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,strokeWidth:0,left:(null!=(o=e.left)?o:0)+(null!=(i=e.width)?i:0)-k,top:(null!=(_=e.top)?_:0)+v.SIZES.BORDER_WIDTH,width:S.SIZES.HEAD_BOX_WIDTH,height:(null!=(l=e.height)?l:0)-2*v.SIZES.BORDER_WIDTH});return D.push(L),D.push(new q.fabric.Line([null!=(s=L.left)?s:0,null!=(c=e.top)?c:0,(null!=(u=L.left)?u:0)+(null!=(d=L.width)?d:0),null!=(g=e.top)?g:0],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(p=null==r?void 0:r.border_color)?p:n.borderColor,originX:"left",originY:"top"})),D.push(new q.fabric.Line([null!=(b=L.left)?b:0,(null!=(f=L.top)?f:0)+(null!=(m=L.height)?m:0),(null!=(w=L.left)?w:0)+(null!=(h=L.width)?h:0),(null!=(y=L.top)?y:0)+(null!=(O=L.height)?O:0)],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(E=null==r?void 0:r.border_color)?E:n.borderColor,originX:"left",originY:"top"})),D.push(new q.fabric.Circle({fill:null!=(x=null==r?void 0:r.bg_color)?x:n.bgColor,stroke:null!=(T=null==r?void 0:r.border_color)?T:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,radius:t,top:e.top,left:(null!=(R=L.left)?R:0)+(null!=(C=L.width)?C:0)+(null!=(I=e.height)?I:0)*S.SIZES.SCALE_Y_TAIL_HEAD/2-k,angle:90,startAngle:0,endAngle:360,scaleY:S.SIZES.SCALE_Y_TAIL_HEAD})),new q.fabric.Group(D)},_t=rt,lt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.component_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.component_type){case"Component":case"ComponentDb":case"ComponentQueue":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_component)?o:O.COLORS.BG_COLOR_COMPONENT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_component)?_:O.COLORS.BORDER_COLOR_COMPONENT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_component)?s:O.COLORS.TEXT_COLOR_COMPONENT},d=Object.assign({},u,r);if(e.component_type)switch(e.component_type){case"Component":return tt(e,t,n,d,a);case"ComponentDb":return nt(e,t,n,d,a);case"ComponentQueue":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Component:t.component_type},n),r,void 0,a);break;case"Component_Ext":case"ComponentDb_Ext":case"ComponentQueue_Ext":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_component_ext)?o:O.COLORS.BG_COLOR_COMPONENT_EXT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_component_ext)?_:O.COLORS.BORDER_COLOR_COMPONENT_EXT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_component_ext)?s:O.COLORS.TEXT_COLOR_COMPONENT_EXT},d=Object.assign({},u,r);if(e.component_type)switch(e.component_type){case"Component_Ext":return tt(e,t,n,d,a);case"ComponentDb_Ext":return nt(e,t,n,d,a);case"ComponentQueue_Ext":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Component:t.component_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}},st=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.container_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.container_type){case"Container":case"ContainerDb":case"ContainerQueue":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_container)?o:O.COLORS.BG_COLOR_CONTAINER,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_container)?_:O.COLORS.BORDER_COLOR_CONTAINER,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_container)?s:O.COLORS.TEXT_COLOR_CONTAINER},d=Object.assign({},u,r);if(e.container_type)switch(e.container_type){case"Container":return tt(e,t,n,d,a);case"ContainerDb":return nt(e,t,n,d,a);case"ContainerQueue":return rt(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Container:t.container_type},n),r,void 0,a);break;case"Container_Ext":case"ContainerDb_Ext":case"ContainerQueue_Ext":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_container_ext)?o:O.COLORS.BG_COLOR_CONTAINER_EXT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_container_ext)?_:O.COLORS.BORDER_COLOR_CONTAINER_EXT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_container_ext)?s:O.COLORS.TEXT_COLOR_CONTAINER_EXT},d=Object.assign({},u,r);if(e.container_type)switch(e.container_type){case"Container_Ext":return tt(e,t,n,d,a);case"ContainerDb_Ext":return nt(e,t,n,d,a);case"ContainerQueue_Ext":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Container:t.container_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}},ct=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.base_data.label&&t.deployment_node_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){var o;const i=((e,t,n,r,a,o)=>{var i,_,l,s,c,u;const d={bgColor:null!=(i=null==o||null==(_=o.diagramsThemeSettings)?void 0:_.bg_color_deployment_node)?i:O.COLORS.BG_COLOR_DEPLOYMENT_NODE,borderColor:null!=(l=null==o||null==(s=o.diagramsThemeSettings)?void 0:s.border_color_deployment_node)?l:O.COLORS.BORDER_COLOR_DEPLOYMENT_NODE,textColor:null!=(c=null==o||null==(u=o.diagramsThemeSettings)?void 0:u.text_color_deployment_node)?c:O.COLORS.TEXT_COLOR_DEPLOYMENT_NODE},g=Object.assign({},d,a);return Ke(e,t,n,r,g,o)})(t,de(t.base_data.alias,void 0,void 0,{DeploymentNode:t.deployment_node_type},n),n,r,void 0,a);return a&&a.skipAddToCanvas||!i||null==e||e.add(i,...te(null!=(o=i.children)?o:[])),i}},ut=(e,t,n,r,a)=>{var o,i;const _=[],l=((e,t,n)=>{const r=Object.assign({},t,{borderRadius:M});return tt(e,{},{},r,n)})(e,r,a);_.push(l);const s=((e,t)=>{var n,r,a,o,i;const _=new q.fabric.Circle({radius:P,top:t.top,left:t.left,fill:e.bgColor,stroke:e.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH});return _.left=(null!=(n=_.left)?n:0)+(null!=(r=t.getScaledWidth())?r:0)/2-(null!=(a=_.getScaledWidth())?a:0)/2,_.top=(null!=(o=_.top)?o:0)-(null!=(i=_.getScaledWidth())?i:0)+5,_})(r,l);_.push(s);const c={alias:null==(o=e.base_data)?void 0:o.alias,position:Oe(null==(i=e.base_data)?void 0:i.alias,n)};return new le(e,t,c,n,_)},dt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.person_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.person_type){case"Person":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_person)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_person)?_:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_person)?s:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON},d=Object.assign({},u,r);return ut(e,t,n,d,a)})(t,de(t.base_data.alias,void 0,void 0,{Person:t.person_type},n),r,void 0,a);break;case"Person_Ext":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_person_ext)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_person_ext)?_:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_person_ext)?s:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT},d=Object.assign({},u,r);return ut(e,t,n,d,a)})(t,de(t.base_data.alias,void 0,void 0,{Person:t.person_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}};let gt=function(e){return e.Dot="DOT",e.Line="LINE",e.Text="TEXT",e.Triangle="TRIANGLE",e.Rectangle="RECTANGLE",e}({});class pt extends le{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=q.fabric.util.object.clone(t);if(n.name===gt.Line||n.name===gt.Rectangle)e.shapes.push({position:{z_index:K(n.canvas,n)},shape_type:n.name});else{var r,a;let t=0,o=0;const i=n.angle;if(n.name===gt.Text)t=n.getCenterPoint().x,o=n.getCenterPoint().y;else if(n.name===gt.Dot||n.name===gt.Triangle){n.name===gt.Triangle&&n.rotate(F);const e=ht(this.canvas,n.left,n.top,n.name===gt.Triangle,i,n.scaleX,n.scaleY,!0);t=e.left,o=e.top}const _={position:{left:t,top:o,z_index:K(n.canvas,n)},size:{scale_x:null!=(r=n.scaleX)?r:1,scale_y:null!=(a=n.scaleY)?a:1},shape_type:n.name};n.name===gt.Triangle&&(_.position.angle=i),e.shapes.push(_)}}))),e}}const bt=e=>{var t;e.children=null==(t=e.children)?void 0:t.sort(((e,t)=>e.name===gt.Rectangle||e.name===gt.Line&&t.name!==gt.Rectangle?-1:t.name===gt.Rectangle||e.name!==gt.Rectangle&&t.name===gt.Line?1:e.name===t.name?0:1))},ft=e=>{const t=e.parent;let n,r=1;const a=e.canvas;if(t&&a){const _=[],l=[];if(t.children){var o,i;t.children.forEach((e=>{if(e.name===gt.Triangle&&(n=e),e.name===gt.Dot||e.name===gt.Triangle){var t;l.push(e),r=null!=(t=e.scaleX)?t:1;const n=e.getPointByOrigin("center","center"),a=new oe(n.x,n.y,e.name);_.push(a)}}));const s=t.children.findIndex((e=>e.name===gt.Line));void 0!==s&&s>-1&&t.children.splice(s,1);const c=K(a,e),u=null==(o=e.data)?void 0:o.rawDiagramElementSpec,d=e.stroke,g=e.strokeDashArray,p=null==(i=e.data)?void 0:i.otherData.selectedRelColor;a.remove(e);const b=St(u,_,t,r,d,p,void 0,g);a.add(b),c&&b.moveTo(c),n&&wt(_,n)}}},mt=e=>{const t=e.findIndex((e=>e.customType===gt.Triangle)),n=e[t],r=e[t>0?t-1:t+1];return 180*Math.atan2(n.y-r.y,n.x-r.x)/Math.PI+90},wt=(e,t)=>{let n;e&&(n=mt(e),t.rotate(n))},ht=(e,t,n,r,a=F,o=1,i=1,_)=>{var l;const s=null!=(l=null==e?void 0:e.getZoom())?l:1,c=ne(e);let u=t,d=n;if(r){const e=A*o/2+N*o/2,t=A*i/2+N*i/2;_?(u-=e,d+=t):(u+=e,d-=t)}else{const e=L*o*2+N*o/2,t=L*i+N*i/2;_?(u+=e,d+=t):(u-=e,d-=t)}return _||(u=(u-c.panX)/s,d=(d-c.panY)/s),{left:u,top:d,angle:a}},yt=(e,t)=>{let n=[];if(null!=e&&e.shapes)null==e||e.shapes.forEach((e=>{var t,r;if((e.shape_type===gt.Dot||e.shape_type===gt.Triangle)&&void 0!==(null==(t=e.position)?void 0:t.left)&&void 0!==(null==(r=e.position)?void 0:r.top)){const t=new oe(e.position.left,e.position.top,e.shape_type);t.data={rawDiagramElementSpec:e},n.push(t)}}));else{var r,a;let o;null!=e&&e.alias&&null!=(r=t[e.alias])&&r.start&&null!=(a=t[e.alias])&&a.end?(o=[],o.push(new oe(t[e.alias].start.x,t[e.alias].start.y,gt.Dot)),t[e.alias].path&&t[e.alias].path.forEach((e=>{o.push(new oe(e.x,e.y,gt.Dot))})),o.push(new oe(t[e.alias].end.x,t[e.alias].end.y,gt.Triangle))):o=[new oe(v.SIZES.DEFAULT_LEFT,v.SIZES.DEFAULT_TOP,gt.Dot),new oe(100+v.SIZES.DEFAULT_LEFT,v.SIZES.DEFAULT_TOP,gt.Triangle)],n=n.concat(o)}return n},vt=(e,t,n,r,a,o)=>{const i=[],_=void 0!==(null==e?void 0:e.alias)&&void 0!==t[e.alias];for(let e=0;e<n.length;e++){var l,s,c,u;i.push(Ot(void 0,n[e],n[e].customType===gt.Triangle?null!=(l=null==(s=n[e].data)||null==(s=s.rawDiagramElementSpec)||null==(s=s.position)?void 0:s.angle)?l:mt(n):void 0,n[e].customType===gt.Triangle,r,!0,null==(c=n[e].data)||null==(c=c.rawDiagramElementSpec)||null==(c=c.size)?void 0:c.scale_x,null==(u=n[e].data)||null==(u=u.rawDiagramElementSpec)||null==(u=u.size)?void 0:u.scale_y,a,o,_))}return i},Ot=(e,t,n,r,a,o=!0,i=1,_=1,l,s,c)=>{var u;l=null!=(u=l)?u:T;const{left:d,top:g,angle:p}=ht(e,t.x,t.y,r,n,i,_,!1);if(r){var b,f;const e=new q.fabric.Triangle({left:d,top:g,width:A,height:A,fill:l,scaleX:i,scaleY:_,hasControls:!1,name:gt.Triangle,angle:F});return e.rotate(p),e.data={rawDiagramElementSpec:null==(b=t.data)?void 0:b.rawDiagramElementSpec,otherData:{selectedRelColor:null!=s?s:C}},e.parent=a,o&&(null==(f=a.children)||f.push(e)),Tt(e,l),e}{var m,w;const e=new q.fabric.Circle({left:d,top:g,radius:L,fill:l,opacity:.2,scaleX:i,scaleY:_,hasControls:!1,name:gt.Dot,visible:!c,selectable:!c,hasBorders:!c});return e.data={rawDiagramElementSpec:null==(m=t.data)?void 0:m.rawDiagramElementSpec,otherData:{selectedRelColor:null!=s?s:C}},e.parent=a,o&&(null==(w=a.children)||w.push(e)),Tt(e,l),e}},St=(e,t,n,r=1,a,o,i,_)=>{var l,s,c;const u=null==e||null==(l=e.shapes)?void 0:l.filter((e=>e.shape_type===gt.Line))[0];let d;return d=i&&null!=e&&e.alias&&null!=(s=i[e.alias])&&s.svg_path?new q.fabric.Path(i[e.alias].svg_path,{stroke:null!=a?a:T,strokeDashArray:_,fill:"",strokeWidth:N*r,scaleX:1,scaleY:1,name:gt.Line,perPixelTargetFind:!0,hasBorders:!1}):new q.fabric.Polyline(t,{stroke:null!=a?a:T,strokeDashArray:_,fill:"",strokeWidth:N*r,scaleX:1,scaleY:1,name:gt.Line,perPixelTargetFind:!0,hasBorders:!1}),d.data={rawDiagramElementSpec:u,otherData:{selectedRelColor:null!=o?o:C}},d.parent=n,xt(d,d.stroke,d.strokeWidth),null==(c=n.children)||c.push(d),d},Et=(e,t,n,r,a,o,i,_)=>{var l,s,c,u,d,g,p;let b,f=1,m=1;var w,h,y,O;null!=t&&t.shapes&&(b=t.shapes.filter((e=>e.shape_type===gt.Text))[0],b&&(f=null!=(w=null==(h=b.size)?void 0:h.scale_x)?w:1,m=null!=(y=null==(O=b.size)?void 0:O.scale_y)?y:1));const S=[],E={fontFamily:v.FONT.FAMILY,fill:null!=(l=null!=(s=null==_?void 0:_.font_color)?s:null==i||null==(c=i.diagramsThemeSettings)?void 0:c.text_color_relationship)?l:R};if(null!=(u=e.base_data)&&u.label){var T,C,L,A,N;const t=new q.fabric.Text((0,$.x4)(e.base_data.label),Object.assign({},E,{fontSize:I,fontWeight:"bold",textAlign:"center"}));t.top=e.technology?-(null!=(T=t.height)?T:0):-(null!=(C=t.height)?C:0)/2,t.left=(null!=(L=r.width)?L:0)/2-(null!=(A=t.width)?A:0)/2-(null!=(N=a[0].width)?N:0)/2,S.push(t)}if(e.technology){var j,F,M;const t=new q.fabric.Text(`[${e.technology}]`,Object.assign({},E,{fontSize:D,textAlign:"center"}));t.left=(null!=(j=r.width)?j:0)/2-(null!=(F=t.width)?F:0)/2-(null!=(M=a[0].width)?M:0)/2,S.push(t)}const P=new q.fabric.Group(S),z=P.getBoundingRect(),B=new q.fabric.Rect({top:z.top-k,left:z.left-k,width:z.width+2*k,height:z.height+2*k,fill:null!=(d=null==i||null==(g=i.diagramsThemeSettings)?void 0:g.bg_color_relationship)?d:x});let H,W;var Y,X,Z,G,U,V,Q,J;null!=t&&t.alias&&n[t.alias]&&n[t.alias].label_position?(H=n[t.alias].label_position.x-(null!=(Y=B.width)?Y:0)/2,W=n[t.alias].label_position.y-(null!=(X=B.height)?X:0)/2):(H=(null!=(Z=r.left)?Z:0)+(null!=(G=r.width)?G:0)/2-(null!=(U=B.width)?U:0)/2,W=(null!=(V=r.top)?V:0)+(null!=(Q=r.height)?Q:0)/2-(null!=(J=B.height)?J:0)/2);const K=new q.fabric.Group([B,P],{name:gt.Text,hasControls:!1,left:H,top:W,scaleX:f,scaleY:m});var ee,te;return K.data={rawDiagramElementSpec:b},K.parent=o,null==(p=o.children)||p.push(K),b&&void 0!==(null==(ee=b.position)?void 0:ee.left)&&void 0!==(null==(te=b.position)?void 0:te.top)&&K.setPositionByOrigin(new q.fabric.Point(b.position.left,b.position.top),"center","center"),K},xt=(e,t,n)=>{const r=e.parent;e.on(c,(t=>{var n,r,a;e.stroke=null==(n=e.data)||null==(n=n.otherData)?void 0:n.selectedRelColor,e.strokeWidth=(null!=(r=e.strokeWidth)?r:0)+j,e.dirty=!0,null==(a=e.canvas)||a.renderAll(),((e,t)=>{var n;if(e.e&&null!=(n=t.parent)&&n.children){var r;const e=re(t);if(!ae(null==(r=t.canvas)?void 0:r.getActiveObjects(),e.objects)){var a,o,i;null==(a=t.canvas)||a.discardActiveObject();const n=t.parent;let r;"multiple"===e.type?r=new q.fabric.ActiveSelection(e.objects,{canvas:t.canvas}):(r=new ie(e.objects,{canvas:t.canvas}),r.parent=t.parent,r.on(l,(e=>{It(r.canvas,e,r,n)})),r.on(s,(e=>{var r;null==(r=t.canvas)||r.discardActiveObject(),n.fire(s)}))),r.hasBorders=!1,null==(o=t.canvas)||o.setActiveObject(r),null==(i=t.canvas)||i.requestRenderAll()}}})(t,e)})),e.on(u,(r=>{var a;e.stroke=t,e.strokeWidth=n,e.dirty=!0,null==(a=e.canvas)||a.renderAll()})),e.on(l,(t=>{It(e.canvas,t,e,r)}))},Tt=(e,t)=>{const n=e.parent;e.on("moving",(e=>{Rt(e)})),e.on(l,(t=>{It(e.canvas,t,e,n)})),e.on(c,(t=>{var n,r;e.fill=null==(n=e.data)||null==(n=n.otherData)?void 0:n.selectedRelColor,e.dirty=!0,null==(r=e.canvas)||r.renderAll()})),e.on(u,(n=>{var r;e.fill=t,e.dirty=!0,null==(r=e.canvas)||r.renderAll()}))},Rt=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===gt.Line))[0];e&&ft(e)}}},Ct=(e,t,n)=>{if(n instanceof q.fabric.ActiveSelection){const r=[];return e.isReadOnly()?e.codingFeaturesEnabled&&r.push(...se(e,t,n,!1)):r.push({isHeaderMenuItem:!1,id:"addPoint",label:"Add point",onClick:()=>{((e,t)=>{const n=e.canvas;if(t.pointer&&n){const a=e.getObjects().filter((e=>e.name===gt.Line))[0],o=e.getObjects().filter((e=>e.name===gt.Dot))[0];n.discardActiveObject();const i=a.parent;if(i){var r;const e=new oe(t.pointer.x,t.pointer.y,gt.Dot),_=Ot(n,e,void 0,!1,i,!1,o.scaleX,o.scaleY,a.stroke,null==(r=o.data)?void 0:r.otherData.selectedRelColor,!1);((e,t)=>{const n=e.parent;if(n){var r;let a,o;const i=[];null==(r=n.children)||r.forEach((e=>{e.name===gt.Text?a=e:e.name===gt.Rectangle?o=e:e.name!==gt.Dot&&e.name!==gt.Triangle||i.push(e)})),i.push(t),i.sort(((e,t)=>e.getCenterPoint().x-t.getCenterPoint().x)),n.children=i,n.children.push(e),a&&n.children.push(a),o&&n.children.push(o)}})(a,_),n.add(_),ft(a)}}})(n,t)}},{id:"separatorRel",isSepator:!0},...se(e,t,n,!1)),[{isHeaderMenuItem:!0,id:"relationshipContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:r}]}return n.name!==gt.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===gt.Dot||e.name===gt.Triangle));if(void 0!==i&&i.length>2){var r,a;const n=null==(r=t.children)?void 0:r.filter((e=>e.name===gt.Line))[0],i=null==(a=t.children)?void 0:a.findIndex((t=>t.getCenterPoint().eq(e.getCenterPoint())));var o;void 0!==i&&i>-1&&(null==(o=t.children)||o.splice(i,1)),e.canvas.remove(e),ft(n)}}})(n)}}]}]},It=(e,t,n,r)=>{n.name!==gt.Line&&n.name!==gt.Rectangle&&e&&r.onComponentMouseUp(e,t,n,Ct(e,t,n))},Dt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.relationship_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){var o;const i=((e,t,n,r)=>{var a,o,i,_,l,s,c,u,d,g,p,b;const f=Xe(Ye(null==(a=e.base_data)?void 0:a.tags),null==r?void 0:r.tags),m={alias:null==(o=e.base_data)?void 0:o.alias};let w=1;const h=null==(i=t.shapes)?void 0:i.filter((e=>e.shape_type===gt.Dot));h&&h.length>0&&(w=null!=(_=null==(l=h[0].size)?void 0:l.scale_x)?_:1);const y=new pt(e,t,m,n,[],{visible:!1,selectable:!1},void 0,void 0,!0),v=yt(t,n),O=vt(t,n,v,y,null!=(s=null==f?void 0:f.border_color)?s:null==r||null==(c=r.diagramsThemeSettings)?void 0:c.line_color_relationship,null==r||null==(u=r.diagramsThemeSettings)?void 0:u.selected_color_relationship),S=O.map((e=>new oe(e.getCenterPoint().x,e.getCenterPoint().y,e.name))),E=St(t,S,y,w,null!=(d=null==f?void 0:f.border_color)?d:null==r||null==(g=r.diagramsThemeSettings)?void 0:g.line_color_relationship,null==r||null==(p=r.diagramsThemeSettings)?void 0:p.selected_color_relationship,n,null==(b=je(null==f?void 0:f.border_style))?void 0:b.value);return Et(e,t,n,E,O,y,r,f),bt(y),y})(t,de(t.base_data.alias,t.from,t.to,{Relationship:t.relationship_type},n),r,a);return a&&a.skipAddToCanvas||!i||null==e||e.add(i,...null!=(o=i.children)?o:[]),i}},kt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.system_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.system_type){case"System":case"SystemDb":case"SystemQueue":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_software_system)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_software_system)?_:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_software_system)?s:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON},d=Object.assign({},u,r);if(e.system_type)switch(e.system_type){case"System":return tt(e,t,n,d,a);case"SystemDb":return nt(e,t,n,d,a);case"SystemQueue":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{SoftwareSystem:t.system_type},n),r,void 0,a);break;case"System_Ext":case"SystemDb_Ext":case"SystemQueue_Ext":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_software_system_ext)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_software_system_ext)?_:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_software_system_ext)?s:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT},d=Object.assign({},u,r);if(e.system_type)switch(e.system_type){case"System_Ext":return tt(e,t,n,d,a);case"SystemDb_Ext":return nt(e,t,n,d,a);case"SystemQueue_Ext":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{SoftwareSystem:t.system_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}};class Lt{constructor(){this.graphviz=void 0}async initialize(){return this.graphviz=await Ae.Graphviz.load(),this}renderDiagram(e,t,n,r){if(e&&n){var a,o,i,_,l,s,c,u;if(e.diagramListener=t,e.autoLayoutEnabled=null==(a=n.diagram_spec)?void 0:a.auto_layout_enabled,e.autoLayoutOrientation=null==(o=n.diagram_spec)?void 0:o.auto_layout_orientation,e.backgroundColor=null!=(i=null==r?void 0:r.bg_color_diagram)?i:d,null!=(_=n.diagram_spec)&&_.auto_layout_enabled)if(this.graphviz){const e=function(e,t){var n,r;const a={},o=[];if(null!=(n=t.diagram_spec)&&n.auto_layout_enabled&&t.diagram_spec.auto_layout_orientation&&null!=(r=t.diagram_plantuml)&&r.elements){console.time("autoLayoutGeneration");const n=t.diagram_plantuml.elements,r=t.diagram_spec.auto_layout_orientation,l=t.diagram_spec.auto_layout_ranksep,s=t.diagram_spec.auto_layout_subgraph_inner_margin,c=t.diagram_spec.auto_layout_subgraph_outer_margin,u=t.diagram_spec.auto_layout_only_straight_arrows,d=(e=>{for(const t of e)if(be(t)||we(t))return!0;return!1})(n),g=function(e){let t=Re,n=Ce;return e&&(t-=.1,n-=.1),{x:Number.parseFloat(t.toFixed(2)),y:Number.parseFloat(n.toFixed(2))}}(d),p=function(e,t,n,r,a,o,i){const _=new Set;return`\n digraph G {\n pad = "${i.x},${i.y}"\n dpi = ${Te.toFixed(1)}\n penwidth="1"\n rankdir = ${"LeftToRight"===t?"LR":"TB"}\n nodesep=0\n ranksep=${n}\n compound=true\n bgcolor="red"\n ${o?"splines=ortho":""}\n node [shape="rect", fixedsize=true, penwidth="1"]\n ${Le(e,_,r,a)}\n }\n `}(n,r,l,s,c,u,g);try{var i,_;let t=e.dot(p,"json");const n=JSON.parse(t),r=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(Ee)}(e)&&e._draw_){const t=e._draw_.filter((e=>"p"===e.op||"P"===e.op))[0],n=xe(g,r,t.points[0]),o=xe(g,r,t.points[1]),i=xe(g,r,t.points[2]),_=o[0],l=o[1];let s;4===t.points.length&&(s={x:i[0]-o[0],y:n[1]-o[1]}),a[e.name]={position:{x:_,y:l},size:s}}})),null==(_=n.edges)||_.forEach((e=>{const t={path:[]};if(e._draw_?e._draw_.filter((e=>"b"===e.op))[0].points.forEach(((e,n)=>{var a;const o=xe(g,r,e),i=o[0],_=o[1];0===n?t.start={x:i,y:_}:null==(a=t.path)||a.push({x:i,y:_})})):o.push(He),e._hdraw_){const n=e._hdraw_.filter((e=>"P"===e.op))[0].points,a=xe(g,r,n[1]);t.end={x:a[0],y:a[1]}}if(e._ldraw_){var n;const a=null==(n=e._ldraw_)?void 0:n.filter((e=>"T"===e.op))[0].pt;if(a){const e=xe(g,r,a);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,a=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-=Ie:t.start.x>n.x&&(t.start.x+=Ie),t.start.y<n.y?t.start.y-=Ie:t.start.y>n.y&&(t.start.y+=Ie)),"false"===e.keadex_toissubgraph&&a.x&&a.y&&(t.end.x<a.x?t.end.x-=Ie:t.end.x>a.x&&(t.end.x+=Ie),t.end.y<a.y?t.end.y-=Ie:t.end.y>a.y&&(t.end.y+=Ie)),t.svg_path=function(e,t,n,r,a){const o=e.split(" ").slice(1).map((e=>e.split(",").map(Number)));let i=`M ${n.x} ${n.y}`;for(let e=o.length-3;e>=0;e-=3){const[n,_]=xe(r,a,o[e+1]),[l,s]=xe(r,a,o[e]),[c,u]=xe(r,a,o[e-1]);let d=c,g=u;1===e&&(d=t.x,g=t.y),i+=` C ${n} ${_}, ${l} ${s}, ${d} ${g}`}return i}(e.pos,t.start,t.end,g,r)}a[e.name]=t}))}catch(e){console.error(e),o.push(He)}}return console.timeEnd("autoLayoutGeneration"),{positions:a,errors:o}}(this.graphviz,n);n.auto_layout=e.positions,n.auto_layout_errors=e.errors,e.errors.length>0&&(e.errors.indexOf(He)>=0?(console.warn(ze),Ne.toast.warn(ze)):(console.error(e.errors.join(", ")),Ne.toast.error(e.errors.join(", "))))}else console.error(Be),Ne.toast.error(Be);null!=(l=n.diagram_spec)&&l.grid_enabled?e.enableGrid():e.disableGrid();const g=At(e,null==(s=n.diagram_plantuml)?void 0:s.elements,n.diagram_spec,null!=(c=n.auto_layout)?c:{},{diagramsThemeSettings:r,tags:null==(u=n.diagram_plantuml)?void 0:u.tags});return Nt(g),g}}}const At=(e,t,n,r,a)=>{const o=[];if(n){if(!a||!a.skipLegendRendering){const t=Pe(de(Fe,void 0,void 0,void 0,n),a);t&&(o.push(t),null==e||e.add(t))}if(t)for(const i of t)if(be(i)){const t=et(e,be(i),n,r,a);t&&o.push(t)}else if(fe(i)){const t=lt(e,fe(i),n,r,a);t&&o.push(t)}else if(me(i)){const t=st(e,me(i),n,r,a);t&&o.push(t)}else if(we(i)){const t=ct(e,we(i),n,r,a);t&&o.push(t)}else if(he(i)){const t=dt(e,he(i),n,r,a);t&&o.push(t)}else if(ye(i)){const t=Dt(e,ye(i),n,r,a);t&&o.push(t)}else if(ve(i)){const t=kt(e,ve(i),n,r,a);t&&o.push(t)}}return o},Nt=(e,t)=>{e.forEach((e=>{let n=function(e){let t;var n,r;return t=e.isVirtualGroupParent()?null==(n=e.data)||null==(n=n.rawDiagramElementSpec)||null==(n=n.shapes)||null==(n=n.reduce(((e,t)=>{var n,r;return void 0===(null==(n=e.position)?void 0:n.z_index)?t:(void 0===(null==(r=t.position)?void 0:r.z_index)||(t.position.z_index,e.position.z_index),e)})).position)?void 0:n.z_index:null==(r=e.data)||null==(r=r.rawDiagramElementSpec)||null==(r=r.position)?void 0:r.z_index,t}(e);var r;n&&(t&&n<=t&&(n=t+1,t++),e.moveTo(n)),e.isVirtualGroupParent()&&Nt(e.children,null!=(r=n)?r:K(e.canvas,e.children[0]))}))};var jt=n(15),Ft=n.n(jt),Mt=n(61);const Pt=require("react-resize-detector");var zt=n(732);const Bt="text-5xl text-dark-primary hover:text-third",Ht="text-2xl text-dark-primary hover:text-third",Wt=Ft().memo((e=>{const{canvas:t,readOnly:n,diagramInfoPanelVisible:r,setDiagramInfoPanelVisible:a}=e;function o(){return n}return(0,zt.jsxs)("div",{className:"absolute bottom-0 left-0 z-[1] scale-[85%] opacity-20 transition hover:scale-[100%] hover:opacity-100 flex flex-row mx-2",children:[(0,zt.jsx)(U.K0,{className:`${Ht} ${o()?"absolute":"hidden"}`,icon:We.faCircleInfo,onClick:function(){o()&&a(!r)}}),(0,zt.jsx)("div",{className:"flex flex-col",children:(0,zt.jsx)(U.K0,{className:`${Bt} !my-auto`,icon:We.faCaretLeft,onClick:()=>null==t?void 0:t.panLeft()})}),(0,zt.jsxs)("div",{className:"flex flex-col",children:[(0,zt.jsx)(U.K0,{className:Bt,icon:We.faCaretUp,onClick:()=>null==t?void 0:t.panDown()}),(0,zt.jsxs)("div",{children:[(0,zt.jsx)(U.K0,{className:`${Ht} ml-1`,icon:We.faMagnifyingGlassPlus,onClick:()=>null==t?void 0:t.zoomIn()}),(0,zt.jsx)(U.K0,{className:`${Ht} mx-2 !text-xl`,icon:We.faRotateLeft,onClick:()=>{null==t||t.resetZoom(),null==t||t.resetPan()}}),(0,zt.jsx)(U.K0,{className:`${Ht} mr-1`,icon:We.faMagnifyingGlassMinus,onClick:()=>null==t?void 0:t.zoomOut()})]}),(0,zt.jsx)(U.K0,{className:Bt,icon:We.faCaretDown,onClick:()=>null==t?void 0:t.panUp()})]}),(0,zt.jsx)("div",{className:"flex flex-col",children:(0,zt.jsx)(U.K0,{className:`${Bt} !my-auto`,icon:We.faCaretRight,onClick:()=>null==t?void 0:t.panRight()})})]})})),Yt=require("@tauri-apps/api/core");JSON.parse(!0),JSON.parse(!0);const Xt=require("fontfaceobserver");var Zt=n.n(Xt),$t=n(53);const Gt=e=>{const{t}=(0,Mt.useTranslation)(),[n,r]=(0,jt.useState)(e.enabled),[o,i]=(0,jt.useState)(e.orientation),[_,l]=(0,jt.useState)(e.generateOnlyStraightArrows),[s,c]=(0,jt.useState)(e.ranksep),[u,d]=(0,jt.useState)(e.subgraphInnerMargin),[g,p]=(0,jt.useState)(e.subgraphOuterMargin);return(0,zt.jsxs)("div",{children:[(0,zt.jsxs)("div",{className:"modal__body",children:[(0,zt.jsxs)("div",{className:"flex flex-col",children:[(0,zt.jsxs)("div",{className:"flex flex-row",children:[(0,zt.jsxs)("span",{children:[t("common.status"),"*:"]}),(0,zt.jsx)(U.sx,{id:"autolayout-status",className:"ml-5",value:n,options:[{label:t("common.enabled"),value:!0},{label:t("common.disabled"),value:!1}],onChange:e=>{r(e)}})]}),(0,zt.jsxs)("span",{className:"text-sm text-orange-500 mt-2 "+(!e.enabled&&n?"block":"hidden"),children:[(0,zt.jsx)($t.FontAwesomeIcon,{icon:We.faWarning,className:"mr-1 text-yellow-500"}),t("diagram_editor.warning_enable_autolayout")]})]}),(0,zt.jsxs)("div",{className:"flex flex-row mt-5",children:[(0,zt.jsxs)("span",{children:[`${t("diagrams_settings.gen_only_straight_arrows")}*`,":"]}),(0,zt.jsx)(U.sx,{id:"autolayout-straight-arrows-status",className:"ml-5",value:_,options:[{label:t("common.yes"),value:!0},{label:t("common.no"),value:!1}],onChange:e=>{l(e)}})]}),(0,zt.jsx)(U.l6,{id:"autolayout-orientation-selector",label:`${t("common.orientation")}*`,className:"mt-8",value:o,options:a.map((e=>({label:e,value:e}))),onChange:e=>i(e.target.value)}),(0,zt.jsx)(U.pd,{id:"autolayout-ranksep",type:"number",label:"ranksep*",min:0,classNameRoot:"mt-6",info:`${t("diagrams_settings.ranksep_description")}`,value:s,onChange:e=>c(Number.parseFloat(e.target.value))}),(0,zt.jsx)(U.pd,{id:"autolayout-subgraph-inner-margin",type:"number",label:`${t("diagrams_settings.subgraph_inner_margin")}`,min:0,classNameRoot:"mt-6",value:u,onChange:e=>d(Number.parseFloat(e.target.value))}),(0,zt.jsx)(U.pd,{id:"autolayout-subgraph-outer-margin",type:"number",label:`${t("diagrams_settings.subgraph_outer_margin")}`,min:0,classNameRoot:"mt-6",value:g,onChange:e=>p(Number.parseFloat(e.target.value))})]}),(0,zt.jsx)("div",{className:"modal__footer",children:(0,U.CL)([{key:"button-cancel",children:(0,zt.jsx)("span",{children:t("common.cancel")}),"data-te-modal-dismiss":!0},{key:"button-save",children:(0,zt.jsx)("span",{children:t("common.save")}),onClick:function(){e.onAutoLayoutConfigured(n,o,_,s,u,g),e.hideModal()}}])})]})},Ut=Ft().memo((e=>{var t,n,r;const{tagsDirection:a,scrollable:o,diagram:i,handleDiagramHeaderClick:_}=e;return(null==i?void 0:i.diagram_type)&&(0,zt.jsxs)("div",{className:"w-full flex flex-col items-center py-1 pr-3 "+(_?"cursor-pointer":""),onClick:function(){_&&_()},children:[(0,zt.jsxs)("div",{className:"flex w-full my-auto "+("bottom"===a?"flex-col":""),children:[(0,zt.jsxs)("div",{className:"text-lg text-accent-primary grow truncate",children:[(l=i.diagram_type,(0,G.capitalCase)((0,G.noCase)(l)))," Diagram -"," ",i.diagram_name]}),(null==(t=i.diagram_spec)?void 0:t.tags)&&(0,zt.jsx)("div",{className:"bottom"===a?"mt-2 mb-5":"",children:(0,zt.jsx)(U.YD,{tags:i.diagram_spec.tags,className:"right"===a?"float-right top-1/2 -translate-y-1/2":""})})]}),(null==(n=i.diagram_spec)?void 0:n.description)&&(0,zt.jsx)("div",{className:"w-full text-sm whitespace-break-spaces "+(o?"":"line-clamp-3"),children:null==(r=i.diagram_spec)?void 0:r.description})]});var l})),qt=Ft().memo((e=>{const{setDiagramInfoPanelVisible:t,diagram:n,hidden:r}=e;return(0,zt.jsxs)("div",{className:r?"hidden":"absolute z-[1] bg-dark-primary bg-opacity-90 w-full p-2 max-h-96 overflow-auto",children:[(0,zt.jsx)(U.K0,{icon:We.faXmark,className:"absolute right-5 top-3",onClick:()=>t(!1)}),n&&(0,zt.jsx)(Ut,{diagram:n,tagsDirection:"bottom",scrollable:!0})]})})),Vt=e=>{const{t}=(0,Mt.useTranslation)(),[n,r]=(0,jt.useState)(e.settings);return(0,zt.jsxs)("div",{children:[(0,zt.jsx)("div",{className:"modal__body",children:(0,zt.jsx)("div",{className:"flex flex-col",children:(0,zt.jsxs)("div",{className:"flex flex-row",children:[(0,zt.jsxs)("span",{children:[t("diagrams_settings.grid_enabled"),"*:"]}),(0,zt.jsx)(U.sx,{id:"autolayout-status",className:"ml-5",value:n.gridEnabled,options:[{label:t("common.enabled"),value:!0},{label:t("common.disabled"),value:!1}],onChange:e=>{r(Object.assign({},n,{gridEnabled:e}))}})]})})}),(0,zt.jsx)("div",{className:"modal__footer",children:(0,U.CL)([{key:"button-cancel",children:(0,zt.jsx)("span",{children:t("common.cancel")}),"data-te-modal-dismiss":!0},{key:"button-save",children:(0,zt.jsx)("span",{children:t("common.save")}),onClick:function(){e.onSettingsChanged(n),e.hideModal()}}])})]})};var Qt=n(735),Jt=n(691);const Kt=["auto_layout"],en=["auto_layout"],tn=(0,jt.forwardRef)(((e,t)=>{const{readOnly:n,diagram:a,diagramListener:o,diagramDesignViewToolbarCommands:i,saveDiagram:l,diagramsThemeSettings:s}=e,{t:c}=(0,Mt.useTranslation)(),u=(0,jt.useRef)(),d=(0,jt.useRef)(null),g=(0,jt.useRef)(null),{ref:p}=(0,Pt.useResizeDetector)(),b=(0,jt.useRef)(),f=(0,jt.useRef)(!1),m=(0,jt.useRef)(!1),w=(0,jt.useRef)(!1),[h,y]=(0,jt.useState)([]),[O,S]=(0,jt.useState)([]),[E,x]=(0,jt.useState)(!1),[T,R]=(0,jt.useState)(),{modal:C,showModal:I,hideModal:D}=(0,U.hS)();let k=b.current,L=a;function A(){f.current=!0,n||function(){if(!w.current){const e=z();e&&y((t=>[...t,e]))}}()}function N(t){const n={fireRightClick:!0,fireMiddleClick:!0,stopContextMenu:!0,backgroundColor:"white",readOnly:e.readOnly,enableSnapToGrid:!0},r=new U.vL(d.current,n);r.on("object:added",A),r.on("object:removed",A),r.on(_,A),r.on("mouse:down",(()=>m.current=!0)),r.on("mouse:out",(()=>m.current=!1)),r.codingFeaturesEnabled="desktop"===e.target,f.current=!1,t&&(r.setZoom(t.zoom),r.relativePan(new q.fabric.Point(t.pan.panX,t.pan.panY))),u.current=r}function j(){u.current&&(u.current.dispose(),u.current=void 0)}function F(e){j(),N(e)}function M(){var e,t;return{zoom:null!=(e=null==(t=u.current)?void 0:t.getZoom())?e:1,pan:ne(u.current)}}async function P(){var e;if(null!=(e=b.current)&&e.diagram_name&&b.current.diagram_type&&u.current){const e="png";console.debug(`Exporting to ${e}`);const t=u.current.viewportTransform;u.current.viewportTransform=q.fabric.iMatrix.slice(0);let{width:n,height:r,left:a,top:o}=J(u.current.getObjects());n&&r&&a&&o&&(n+=50,r+=50,a-=25,o-=25),await async function(e,t,n,r){return(0,Yt.invoke)("export_diagram_to_file",{diagramDataUrl:n,format:r,diagramName:e,diagramType:t})}(b.current.diagram_name,b.current.diagram_type,u.current.toDataURL({format:e,enableRetinaScaling:!0,width:n,height:r,left:a,top:o}),e).then((e=>Ne.toast.success(c("common.info.diagram_exported",{pathExportedDiagram:e})))).catch((e=>Ne.toast.success(e.msg))),u.current.viewportTransform=t}}function z(){if(b.current&&b.current.diagram_plantuml&&b.current.diagram_spec&&b.current.diagram_name&&b.current.diagram_type){var e,t;const n=void 0!==(null==(e=u.current)?void 0:e.autoLayoutEnabled)?u.current.autoLayoutEnabled:b.current.diagram_spec.auto_layout_enabled;let r=[];return n||(r=(e=>{const t=Array();return e&&e.getObjects().forEach((e=>{if(e instanceof le){const n=e.getUpdatedSpecs();n&&t.push(n)}})),t})(u.current)),Object.assign({},b.current.diagram_spec,{auto_layout_enabled:n,auto_layout_orientation:void 0!==(null==(t=u.current)?void 0:t.autoLayoutOrientation)?u.current.autoLayoutOrientation:b.current.diagram_spec.auto_layout_orientation,elements_specs:r})}}function B(){return f.current}function H(){var e;return!(null==(e=b.current)||!e.diagram_spec)&&b.current.diagram_spec.auto_layout_enabled}function W(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_orientation:"TopToBottom"}function Y(){var e;return!(null==(e=b.current)||!e.diagram_spec)&&b.current.diagram_spec.auto_layout_only_straight_arrows}function X(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_ranksep:0}function Z(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_subgraph_inner_margin:0}function G(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_subgraph_outer_margin:6.5}function V(e,t,r,a,o,i){u.current&&b.current&&!n&&I({id:"showAutoLayoutConfigurationModal",title:`${c("diagram_editor.configure_auto_layout")}`,body:(0,zt.jsx)(Gt,{enabled:e,orientation:t,generateOnlyStraightArrows:r,ranksep:a,subgraphInnerMargin:o,subgraphOuterMargin:i,hideModal:D,onAutoLayoutConfigured:(e,t,r,a,o,i)=>{u.current&&b.current&&!n&&(u.current.autoLayoutEnabled=e,u.current.autoLayoutOrientation=t,b.current.diagram_spec&&(b.current.diagram_spec.auto_layout_only_straight_arrows=r,b.current.diagram_spec.auto_layout_ranksep=a,b.current.diagram_spec.auto_layout_subgraph_inner_margin=o,b.current.diagram_spec.auto_layout_subgraph_outer_margin=i),f.current=!0,l&&l())}}),buttons:!1})}function Q(){var e;if(null!=(e=b.current)&&e.diagram_spec)return{gridEnabled:b.current.diagram_spec.grid_enabled}}function K(e){e&&u.current&&b.current&&!n&&I({id:"showDiagramDesignViewSettingsModal",title:`${c("common.settings")}`,body:(0,zt.jsx)(Vt,{settings:e,hideModal:D,onSettingsChanged:e=>{var t;u.current&&b.current&&!n&&(e.gridEnabled?u.current.enableGrid():u.current.disableGrid(),b.current.diagram_spec&&(b.current.diagram_spec.grid_enabled=null!=(t=e.gridEnabled)&&t),f.current=!0,l&&l())}}),buttons:!1})}function ee(){var t,n;null!=(t=b.current)&&t.diagram_spec&&u.current&&!e.readOnly&&(null!=(n=b.current)&&n.diagram_spec.auto_layout_enabled?u.current.setReadOnly():u.current.setReadAndWrite())}function te(e){var t;u.current&&(F(M()),ee(),T?T.renderDiagram(u.current,o,Object.assign({},b.current,{diagram_spec:e}),s):console.error("DiagramRenderer not initialized"),null==(t=u.current)||t.renderAll(),f.current=!0,console.debug("Load history completed"))}function re(){if(w.current=!0,oe()){const e=h[h.length-1],t=h[h.length-2];b.current&&e&&t&&(console.debug("Undo design view"),y((e=>e.filter(((t,n)=>n!==e.length-1)))),S((t=>[...t,e])),te(t))}w.current=!1}function ae(){if(console.debug("Redo design view"),w.current=!0,ie()){const e=O[O.length-1];e&&(S((e=>e.filter(((t,n)=>n!==e.length-1)))),y((t=>[...t,e])),te(e))}w.current=!1}function oe(){return!n&&h.length>1}function ie(){return!n&&O.length>0}return k&&(k=(0,r.A)(k,Kt)),L&&(L=(0,r.A)(L,en)),(0,$.$r)(k,L)||(b.current=a),(0,jt.useImperativeHandle)(t,(()=>({resetCanvas:F,getCanvasState:M,exportDiagram:P,getUpdatedDiagramSpec:z,isDiagramChanged:B,undo:re,redo:ae,canUndo:oe,canRedo:ie,isAutoLayoutEnabled:H,autoLayoutOrientation:W,updateAutoLayoutOptions:V,isGenerateOnlyStraightArrowsEnabled:Y,ranksep:X,updateDiagramDesignViewSettings:K,diagramDesignViewSettings:Q,subgraphInnerMargin:Z,subgraphOuterMargin:G}))),(0,jt.useLayoutEffect)((()=>{var e,t,n,r,a,o,i;console.debug("Diagram Design View changed layout"),d.current&&null!=(e=g.current)&&e.clientWidth&&null!=(t=g.current)&&t.clientHeight&&(console.debug("Canvas resize"),d.current.parentElement&&(d.current.parentElement.style.display="none"),null==(n=u.current)||n.setWidth(null==(r=g.current)?void 0:r.getBoundingClientRect().width),null==(a=u.current)||a.setHeight(null==(o=g.current)?void 0:o.getBoundingClientRect().height),d.current.parentElement&&(d.current.parentElement.style.display="flex"),null==(i=u.current)||i.renderAll())})),(0,jt.useEffect)((()=>(new(Zt())(v.FONT.FAMILY).load(null,36e4).then((function(){u.current&&(function(e){e.getObjects().forEach((e=>e.set("dirty",!0)))}(u.current),u.current.renderAll())})),d.current&&!u.current&&N(),()=>{j()})),[]),(0,jt.useEffect)((()=>{function e(e){n||"Z"!==e.key.toUpperCase()&&"Y"!==e.key.toUpperCase()||!e.ctrlKey&&!e.metaKey||!m.current||(e.preventDefault(),"Z"===e.key.toUpperCase()?re():"Y"===e.key.toUpperCase()&&ae())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[n,h,O]),(0,jt.useEffect)((()=>{var e,t;u.current&&b.current&&T&&(w.current=!0,console.debug("Rendering the diagram"),ee(),T.renderDiagram(u.current,o,b.current,s),null==(e=u.current)||e.renderAll(),f.current=!1,w.current=!1,n||(w.current=!1,null!=(t=b.current)&&t.diagram_spec&&y([b.current.diagram_spec]),S([])))}),[b.current,T]),(0,jt.useEffect)((()=>{var e;!n&&i&&(console.debug("Update design toolbar"),null==(e=i.current)||e.forceUpdate())}),[n,h,O,i]),(0,jt.useEffect)((()=>{!async function(){const e=await(new Lt).initialize();R(e)}()}),[]),(0,Qt.useHotkeys)([Jt.Key.Escape],(e=>{var t;u.current&&(e.preventDefault(),null==(t=u.current)||t.discardActiveObject())})),(0,zt.jsxs)("div",{className:"relative h-full w-full",ref:p,children:[C,(0,zt.jsx)(Wt,{canvas:u.current,readOnly:n,diagramInfoPanelVisible:E,setDiagramInfoPanelVisible:x}),(0,zt.jsx)(qt,{diagram:a,hidden:!E,setDiagramInfoPanelVisible:x}),(0,zt.jsx)("div",{className:"h-full w-full flex-row flex-wrap",ref:g,children:(0,zt.jsx)("canvas",{ref:d})})]})}))},636:(e,t,n)=>{n.d(t,{tz:()=>b,rI:()=>g,UW:()=>v,K0:()=>L,pd:()=>Z,vL:()=>x,sx:()=>q,l6:()=>G,YD:()=>U,CL:()=>B,T_:()=>y,hS:()=>Y});var r=n(452),a=n.n(r);require("react-router-dom");var o=n(15),i=n.n(o);n(61);var _=n(732);a().addPluralRule(/Person/,"Persons");var l=n(177),s=n(53);const c="hide.te.dropdown",u="show.te.dropdown",d=i().memo((e=>{var t;const n=(0,o.useRef)(null),[r,a]=(0,o.useState)(!1);function i(e){let t;return t=e.isSepator?(0,_.jsx)("li",{className:"relative",children:(0,_.jsx)("span",{className:"bg-third my-1 block h-px w-full"})},e.id):(0,_.jsxs)("li",{className:"relative",children:[(0,_.jsxs)("button",{disabled:void 0!==e.disabled&&e.disabled,id:e.id,className:"\n hover:bg-link\n flex\n w-full\n items-center\n whitespace-nowrap\n px-4\n py-1\n text-left\n text-sm\n hover:text-white\n ","data-te-dropdown-item-ref":!0,onClick:t=>{e.onClick&&e.onClick(t)},children:[e.subMenuItems&&e.subMenuItems.length>0&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("span",{className:"mr-16 basis-11/12 pr-1",children:e.label}),(0,_.jsx)("span",{className:"basis-1/12 text-right",children:(0,_.jsx)(s.FontAwesomeIcon,{icon:l.faAngleRight})})]}),(!e.subMenuItems||0===e.subMenuItems.length)&&e.label]}),d(e.isHeaderMenuItem,e.id,e.subMenuItems)]},e.id),t}function d(e,t,n){const r=[];if(n&&n.length>0){for(const e of n)r.push(i(e));return(0,_.jsx)("ul",{className:`\n bg-secondary\n text-accent-primary\n absolute\n z-50\n m-0\n w-auto\n min-w-max\n list-none\n rounded-md\n border-none\n bg-clip-padding\n py-2\n shadow-[0_1px_2px_rgba(0,0,0,0.6)]\n [&[data-te-dropdown-show]]:block\n ${e?" dropdown-menu float-left hidden origin-top-left":" right-px top-0"}\n `,id:`menu-${t}`,"aria-labelledby":t,"data-te-dropdown-menu-ref":!0,children:r})}return(0,_.jsx)("div",{"data-te-dropdown-menu-ref":!0})}const g=t=>{e.increaseOpenedMenu&&e.setLastOpenedMenu&&e.decreaseOpenedMenu&&(t.type===u?(a(!0),e.increaseOpenedMenu(),e.setLastOpenedMenu(e.id)):(a(!1),e.decreaseOpenedMenu()))};return(0,o.useEffect)((()=>{const t=n.current;return null==t||t.addEventListener(c,g),null==t||t.addEventListener(u,g),(e.alwaysOpen&&!r||e.lastOpenedMenu!==e.id&&r)&&(null==t||t.dispatchEvent(new MouseEvent("click"))),()=>{null==t||t.removeEventListener(c,g),null==t||t.removeEventListener(u,g)}})),(0,_.jsxs)("div",{className:`relative ${null!=(t=e.className)?t:""}`,"data-te-dropdown-ref":!0,children:[(0,_.jsx)("button",{className:`\n ${r?"":" bg-dark-primary text-accent-primary"} \n hover:bg-primary\n flex\n items-center\n whitespace-nowrap\n rounded-md\n px-2\n py-0.5\n text-sm hover:text-white\n hover:shadow-[0_1px_2px_rgba(0,0,0,0.6)]\n focus:outline-none\n focus:ring-0\n ${r?" bg-primary show text-white":""}\n ${e.hidden?" h-0 opacity-0":""}\n ${e.buttonClassName?` ${e.buttonClassName}`:""}\n `,type:"button",id:e.id,"aria-expanded":"false",ref:n,"data-te-dropdown-toggle-ref":!0,"data-te-dropdown-animation":"off",onMouseEnter:t=>{e.atLeastOneOpenedMenu&&e.atLeastOneOpenedMenu()&&!r&&t.target.dispatchEvent(new MouseEvent("click"))},children:e.label}),d(e.isHeaderMenuItem,e.id,e.subMenuItems)]},e.id)})),g=i().memo((e=>{var t;const[n,r]=(0,o.useState)(0),[a,i]=(0,o.useState)("");function l(){r((e=>e+1))}function s(){r((e=>e-1))}function c(){return n>0}return(0,_.jsx)("div",{className:`dropdown-menu group flex ${c()?"open":""} ${null!=(t=e.className)?t:""}`,children:function(){const t=[];if(e.menuItemsProps&&e.menuItemsProps.length>0)for(const n of e.menuItemsProps)t.push((0,o.createElement)(d,Object.assign({},n,{key:n.id,increaseOpenedMenu:l,decreaseOpenedMenu:s,atLeastOneOpenedMenu:c,lastOpenedMenu:a,setLastOpenedMenu:i})));return t}()})})),p=g,b=()=>{const{anchorPoint:e,show:t,contextMenuItems:n}=(()=>{const[e,t]=(0,o.useState)({x:0,y:0}),[n,r]=(0,o.useState)(!1),[a,i]=(0,o.useState)([]),_=(0,o.useCallback)((e=>{if(e.preventDefault(),(n=e)instanceof CustomEvent&&n instanceof CustomEvent&&Object.keys(n.detail).includes("menuItems")){const n=e.detail.pageX,a=e.detail.pageY;i(e.detail.menuItems),t({x:n,y:a}),r(!0)}var n}),[r,t]),l=(0,o.useCallback)((()=>n?r(!1):null),[n]);return(0,o.useEffect)((()=>(document.addEventListener("click",l),document.addEventListener("contextmenu",_),()=>{document.removeEventListener("click",l),document.removeEventListener("contextmenu",_)}))),{anchorPoint:e,show:n,contextMenuItems:a}})(),r=(0,o.useRef)(),[a,i]=(0,o.useState)((0,_.jsx)(_.Fragment,{}));return r.current!==t&&(r.current=t),(0,o.useEffect)((()=>{void 0!==r.current&&(r.current?i((0,_.jsx)("div",{hidden:!t,className:"context-menu absolute",style:{top:e.y,left:e.x},children:(0,_.jsx)(p,{menuItemsProps:n})})):i((0,_.jsx)(_.Fragment,{})))}),[r.current]),a},f=require("js-cookie");var m=n.n(f);const w=require("react-ga4");var h=n.n(w);function y(e){const{initTE:t,initGA:n}=e,[r,a]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{(async()=>{t&&await t(),n&&function(e,t){var n;let r=m().get("CookieConsent");r=null==(n=r)?void 0:n.replace(/{/gi,'{"').replace(/:/gi,'":').replace(/,/gi,',"').replace(/'/gi,'"'),!e&&r&&JSON.parse(r).statistics&&({NODE_ENV:"production"}.NEXT_PUBLIC_GA_MEASUREMENT_ID&&h().initialize([{trackingId:{NODE_ENV:"production"}.NEXT_PUBLIC_GA_MEASUREMENT_ID,gtagOptions:{anonymize_ip:!0,send_page_view:!1}}]),t(!0)),e&&(console.debug(`Logging pageview for ${window.location.pathname}`),h().send({hitType:"pageview",page:window.location.pathname}))}(r,a)})()}),[r,n,t]),{isGAInitialized:r}}const v={CONTEXT_MENU:"contextmenu"};var O=n(489);const S="idle",E="panning";class x extends O.fabric.Canvas{constructor(e,t){super(e,t),this.gridEnabled=void 0,this.gridBgColor=void 0,R(this),C(this)}initialize(e,t){return this.gridEnabled=null==t?void 0:t.gridEnabled,R(this),C(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,r,a;null==(t=e.target)||t.set({left:Math.round((null!=(r=e.target.left)?r:0)/n)*n,top:Math.round((null!=(a=e.target.top)?a:0)/n)*n})}))}(this,t.gridSize),super.initialize(e,t)}isReadOnly(){return O.fabric.Object.prototype.lockMovementX&&O.fabric.Object.prototype.lockMovementY&&O.fabric.Object.prototype.lockRotation&&O.fabric.Object.prototype.lockScalingFlip&&O.fabric.Object.prototype.lockScalingX&&O.fabric.Object.prototype.lockScalingY&&O.fabric.Object.prototype.lockSkewingX&&O.fabric.Object.prototype.lockSkewingY}setReadOnly(){O.fabric.Object.prototype.lockMovementX=!0,O.fabric.Object.prototype.lockMovementY=!0,O.fabric.Object.prototype.lockRotation=!0,O.fabric.Object.prototype.lockScalingFlip=!0,O.fabric.Object.prototype.lockScalingX=!0,O.fabric.Object.prototype.lockScalingY=!0,O.fabric.Object.prototype.lockSkewingX=!0,O.fabric.Object.prototype.lockSkewingY=!0}setReadAndWrite(){O.fabric.Object.prototype.lockMovementX=!1,O.fabric.Object.prototype.lockMovementY=!1,O.fabric.Object.prototype.lockRotation=!1,O.fabric.Object.prototype.lockScalingFlip=!1,O.fabric.Object.prototype.lockScalingX=!1,O.fabric.Object.prototype.lockScalingY=!1,O.fabric.Object.prototype.lockSkewingX=!1,O.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 O.fabric.Point(5,0))}panRight(){this.relativePan(new O.fabric.Point(-5,0))}panUp(){this.relativePan(new O.fabric.Point(0,5))}panDown(){this.relativePan(new O.fabric.Point(0,-5))}resetPan(){this.absolutePan(new O.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);O.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 r=new O.fabric.Pattern({source:e.getElement(),repeat:"repeat"});this.setBackgroundColor(r,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 T(e){return 3===e.button}function R(e){e.on("mouse:wheel",(function(t){const n=t.e.deltaY;let r=e.getZoom();r*=.999**n,r>20&&(r=20),r<.01&&(r=.01),e.zoomToPoint({x:t.e.offsetX,y:t.e.offsetY},r),t.e.preventDefault(),t.e.stopPropagation()}))}function C(e){let t,n,r=S;e.discardActiveObject(),e.on("mouse:up",(function(t){T(t)&&(r=S,e.defaultCursor="default")})),e.on("mouse:down",(a=>{T(a)&&(e.defaultCursor="move",r=E,t=a.e.clientX,n=a.e.clientY)})),e.on("mouse:move",(a=>{if(r===E&&a&&a.e){let r=0,o=0;t&&(r=a.e.clientX-t),n&&(o=a.e.clientY-n),t=a.e.clientX,n=a.e.clientY;const i=new O.fabric.Point(r,o);e.relativePan(i),e.fire("moved")}}))}var I=n(416),D=n(385);const k=["icon","classNameIcon","classNameContent"],L=i().memo((e=>{const{icon:t,classNameIcon:n,classNameContent:r}=e,a=(0,I.A)(e,k),o=(0,D.Cp)(e);return(0,_.jsxs)("button",Object.assign({},a,o,{className:`${e.className} text-accent-secondary hover:text-accent-primary [&.active]:text-accent-primary disabled:hover:text-accent-secondary disabled:opacity-50`,children:[(0,_.jsx)(s.FontAwesomeIcon,{icon:null!=t?t:l.faXmark,className:null!=n?n:""}),(0,_.jsx)("div",{className:r,children:e.children})]}))})),A=(require("@tanstack/react-table"),i().memo((e=>{const{className:t}=e;return(0,_.jsx)("div",{className:`inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite] ${t}`,role:"status",children:(0,_.jsx)("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]",children:"Loading..."})})}))),N=["children","isLoading","disabled"],j=i().memo((e=>{const t=(0,D.Cp)(e),{children:n,isLoading:r,disabled:a}=e,o=(0,I.A)(e,N);return(0,_.jsxs)("button",Object.assign({},o,t,{disabled:a||r,type:"button","data-te-toggle":"button",className:`button--primary inline-block min-w-[75px] rounded px-5 py-2 text-xs font-medium uppercase leading-tight shadow-md transition duration-75 ease-in-out hover:shadow-lg focus:shadow-lg focus:outline-none focus:ring-0 active:shadow-lg ${e.className}`,children:[r&&(0,_.jsx)(A,{className:"icon !h-4 !w-4"}),!r&&n]}))})),F="modalRoot";var M=n(221);const P=["key"],z="hidden.te.modal";function B(e){const t=[];return"boolean"!=typeof e&&e&&e.forEach(((e,n,r)=>{const a=(0,D.Cp)(e),{key:o}=e,i=(0,I.A)(e,P);t.push((0,_.jsx)(j,Object.assign({},i,a,{className:`${0!==n&&r.length>1?"ml-3":""} ${e.className}`}),o))})),t}const H=(0,o.forwardRef)(((e,t)=>{var n;const{id:r,onHiddenModal:a}=e,i=null!=(n=e.size)?n:"md",c=(0,o.useRef)();return(0,o.useEffect)((()=>{function e(){a&&a()}const t=document.getElementById(r);return!c.current&&t&&(c.current=new M.Modal(t)),t&&t.addEventListener(z,e),()=>{t&&t.removeEventListener(z,e)}}),[r,a]),(0,o.useImperativeHandle)(t,(()=>({showModal:()=>{c.current.show()},hideModal:()=>{c.current.hide(),c.current=void 0}}))),(0,_.jsx)("div",{"data-te-modal-init":!0,className:"fixed left-0 top-8 bottom-0 z-[1055] hidden h-auto w-full overflow-y-auto overflow-x-hidden outline-none",id:r,tabIndex:-1,"aria-labelledby":`${r}Label`,children:(0,_.jsx)("div",{"data-te-modal-dialog-ref":!0,className:"pointer-events-none relative flex min-h-[calc(100%-1rem)] w-auto translate-y-[-50px] items-center justify-center opacity-0 transition-all duration-300 ease-in-out min-[576px]:mx-5 min-[576px]:my-7 min-[576px]:min-h-[calc(100%-3.5rem)]",children:(0,_.jsxs)("div",{className:`pointer-events-auto relative flex ${(()=>{switch(i){case"sm":return"w-[25rem]";case"md":return"w-[40rem]";case"lg":return"w-[70rem]";case"full":return"w-full"}})()} ${"full"===e.size?"mx-5":""} bg-primary flex-col rounded-md border-none bg-clip-padding text-current shadow-lg outline-none`,children:[(0,_.jsxs)("div",{className:"border-secondary flex flex-shrink-0 items-center justify-between rounded-t-md border-b-2 border-opacity-50 p-4",children:[(0,_.jsx)("h5",{className:"text-accent-primary text-xl font-medium leading-normal pointer-events-none",id:`${r}Label`,children:e.title}),(0,_.jsx)("button",{type:"button",className:"box-content rounded-none border-none hover:no-underline hover:opacity-75 focus:opacity-100 focus:shadow-none focus:outline-none","data-te-modal-dismiss":!0,"aria-label":"Close",children:(0,_.jsx)(s.FontAwesomeIcon,{icon:l.faXmark})})]}),"boolean"!=typeof e.buttons&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("div",{className:"modal__body",children:e.body}),(0,_.jsx)("div",{className:"modal__footer",children:B(e.buttons)})]}),"boolean"==typeof e.buttons&&e.body]})})})})),W=require("react-dom");function Y(){const[e,t]=(0,o.useState)(),[n,r]=(0,o.useState)(!0),a=(0,o.useRef)(null);return(0,o.useEffect)((()=>{a.current&&(n?a.current.showModal():a.current.hideModal())}),[e,n]),{modal:e,showModal:function(e){const n=document.getElementById(F);n&&(t((0,W.createPortal)((0,_.jsx)(H,Object.assign({},e,{ref:a,onHiddenModal:()=>{t(void 0)}})),n)),r(!0))},hideModal:function(){r(!1)}}}const X=["label","info","allowedChars","classNameRoot","key"],Z=i().memo((e=>{const[t,n]=(0,o.useState)(e.value),{info:r,classNameRoot:a,key:i}=e,l=(0,I.A)(e,X),s=(0,D.Cp)(e);return(0,o.useEffect)((()=>{n(e.value)}),[e.value]),(0,_.jsxs)("div",{className:`relative mb-3 ${null!=a?a:""}`,children:[(0,_.jsx)("input",Object.assign({maxLength:200},l,s,{onChange:function(r){!e.allowedChars||""===r.currentTarget.value||e.allowedChars.test(r.currentTarget.value)?(n(r.currentTarget.value),e.onChange&&e.onChange(r)):t&&(r.currentTarget.value=t.toString())},"data-te-input-state-active":!0,className:`peer transition-all duration-200 ease-linear placeholder:opacity-0 motion-reduce:transition-none ${e.className}`,placeholder:e.label}),i),(0,_.jsx)("label",{htmlFor:e.id,className:(null!=t&&""!==t?"input__label -translate-y-[1.1rem] scale-[0.9]":"")+" peer-focus:text-link peer-focus:input__label pointer-events-none absolute left-3 top-0 mb-0 max-w-[90%] origin-[0_0] truncate pt-[0.37rem] leading-[1.6] drop-shadow-[0_35px_35px_rgba(0,0,0,0.25)] transition-all duration-200 ease-out peer-focus:-translate-y-[1.1rem] peer-focus:scale-[0.9] motion-reduce:transition-none",children:e.label}),r&&(0,_.jsx)("div",{className:"text-sm px-3",children:r})]})})),$=["label","className","key"],G=i().memo((e=>{const{label:t,className:n,key:r}=e,a=(0,I.A)(e,$),i=(0,D.Cp)(e);return(0,o.useEffect)((()=>{const t=document.querySelector(`#${e.id}`);M.Select.getInstance(t)||new M.Select(document.querySelector(`#${e.id}`),{},{dropdown:"select__dropdown",formCheckInput:"bg-red-400 checked:after:border-red-500",selectInput:"peer select__input",selectOption:"select__option data-[te-select-option-selected]:data-[te-input-state-active]:link",selectLabelSizeDefault:"select__label-size-default",selectLabel:"select__label",selectArrow:"select__arrow top-[0.65rem]"})})),(0,_.jsxs)("div",{className:`relative mb-3 ${n}`,children:[(0,_.jsx)("select",Object.assign({"data-te-select-init":!0},a,i,{children:function(){const t=[];return e.options.forEach((e=>{var n;t.push((0,_.jsx)("option",{value:e.value,children:e.label},null==(n=e.value)?void 0:n.toString()))})),t}()}),r),(0,_.jsx)("label",{"data-te-select-label-ref":!0,children:t})]})})),U=(require("react-html-parser"),i().memo((({tags:e,className:t})=>(0,_.jsx)("ul",{className:`tags ${null!=t?t:""}`,children:e.map(((e,t)=>(0,_.jsx)("li",{children:e},t)))})))),q=(require("@yaireo/tagify"),e=>{var t;const{className:n,options:r}=e;return(0,_.jsx)("div",{className:`flex justify-center ${null!=n?n:""}`,id:null!=(t=e.id)?t:"",children:r.map(((t,n)=>(0,_.jsxs)("div",{className:"mb-[0.125rem] me-4 inline-block min-h-[1.5rem] ps-[1.5rem]",children:[(0,_.jsx)("input",{className:"relative float-left -ms-[1.5rem] me-1 mt-0.5 h-5 w-5 appearance-none rounded-full border-2 border-solid border-secondary-500 before:pointer-events-none before:absolute before:h-4 before:w-4 before:scale-0 before:rounded-full before:bg-transparent before:opacity-0 before:shadow-checkbox before:shadow-transparent before:content-[''] after:absolute after:z-[1] after:block after:h-4 after:w-4 after:rounded-full after:content-[''] checked:border-accent-secondary checked:before:opacity-[0.16] checked:after:absolute checked:after:left-1/2 checked:after:top-1/2 checked:after:h-[0.625rem] checked:after:w-[0.625rem] checked:after:rounded-full checked:after:border-accent-secondary checked:after:bg-accent-primary checked:after:content-[''] checked:after:[transform:translate(-50%,-50%)] hover:before:opacity-[0.04] hover:before:shadow-black/60 focus:shadow-none focus:outline-none focus:ring-0 focus:before:scale-100 focus:before:opacity-[0.12] focus:before:shadow-black/60 focus:before:transition-[box-shadow_0.2s,transform_0.2s] checked:focus:border-accent-secondary checked:focus:before:scale-100 checked:focus:before:shadow-checkbox checked:focus:before:transition-[box-shadow_0.2s,transform_0.2s] rtl:float-right "+(e.disabled?"":"hover:cursor-pointer"),type:"radio",name:`inlineRadioOptions-${e.id}`,id:`option-${e.id}-${n}`,value:JSON.stringify(t.value),onChange:()=>{e.onChange(t.value)},checked:JSON.stringify(t.value)===JSON.stringify(e.value),disabled:e.disabled}),(0,_.jsx)("label",{className:"mt-px inline-block ps-[0.15rem] "+(e.disabled?"":"hover:cursor-pointer"),htmlFor:e.disabled?void 0:`option-${e.id}-${n}`,children:t.label})]},`radioOption${n}`)))})});require("react-color"),n(735),n(691)},691:e=>{e.exports=require("ts-key-enum")},732:e=>{e.exports=require("react/jsx-runtime")},735:e=>{e.exports=require("react-hotkeys-hook")}},_={};function l(e){var t=_[e];if(void 0!==t)return t.exports;var n=_[e]={id:e,loaded:!1,exports:{}};return i[e](n,n.exports,l),n.loaded=!0,n.exports}e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",n="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",r=e=>{e&&e.d<1&&(e.d=1,e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},l.a=(a,o,i)=>{var _;i&&((_=[]).d=-1);var l,s,c,u=new Set,d=a.exports,g=new Promise(((e,t)=>{c=t,s=e}));g[t]=d,g[e]=e=>(_&&e(_),u.forEach(e),g.catch((e=>{}))),a.exports=g,o((a=>{var o;l=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[e])return a;if(a.then){var o=[];o.d=0,a.then((e=>{i[t]=e,r(o)}),(e=>{i[n]=e,r(o)}));var i={};return i[e]=e=>e(o),i}}var _={};return _[e]=e=>{},_[t]=a,_})))(a);var i=()=>l.map((e=>{if(e[n])throw e[n];return e[t]})),s=new Promise((t=>{(o=()=>t(i)).r=0;var n=e=>e!==_&&!u.has(e)&&(u.add(e),e&&!e.d&&(o.r++,e.push(o)));l.map((t=>t[e](n)))}));return o.r?s:i()}),(e=>(e?c(g[n]=e):s(d),r(_)))),_&&_.d<0&&(_.d=0)},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var n=Object.create(null);l.r(n);var r={};a=a||[null,o({}),o([]),o(o)];for(var i=2&t&&e;"object"==typeof i&&!~a.indexOf(i);i=o(i))Object.getOwnPropertyNames(i).forEach((t=>r[t]=()=>e[t]));return r.default=()=>e,l.d(n,r),n},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.v=(e,t,n,r)=>{var a=fetch(l.p+""+n+".module.wasm"),o=()=>a.then((e=>e.arrayBuffer())).then((e=>WebAssembly.instantiate(e,r))).then((t=>Object.assign(e,t.instance.exports)));return a.then((t=>"function"==typeof WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(t,r).then((t=>Object.assign(e,t.instance.exports)),(e=>{if("application/wasm"!==t.headers.get("Content-Type"))return console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e),o();throw e})):o()))},(()=>{var e;l.g.importScripts&&(e=l.g.location+"");var t=l.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l.p=e})();var s={};l.r(s),l.d(s,{default:()=>g});var c=l(15),u=l(732);const d=()=>null,g=e=>{const[t,n]=(0,c.useState)((()=>d));return(0,c.useEffect)((()=>{Promise.resolve().then(l.bind(l,334)).then((e=>n((()=>e.default))))}),[]),(0,u.jsx)(t,Object.assign({},e))};module.exports=s})();
1
+ (()=>{"use strict";var e,t,n,r,a,o,i={15:e=>{e.exports=require("react")},53:e=>{e.exports=require("@fortawesome/react-fontawesome")},61:e=>{e.exports=require("react-i18next")},177:e=>{e.exports=require("@fortawesome/free-solid-svg-icons")},196:(e,t,n)=>{var r=n(457);e.exports=n.v(t,e.id,"7c6cb7b2b9849bd7638f",{"./mina_react_bg.js":{__wbg_log_c222819a41e063d3:r.pR9,__wbg_info_3daf2e093e091b66:r.ZrD,__wbg_warn_4ca3906c248c47c4:r.jwJ,__wbg_debug_3cb59063b29f58c1:r.F$t,__wbg_error_524f506f44df1645:r.pWA,__wbindgen_string_new:r.ycJ,__wbindgen_string_get:r.qNE,__wbindgen_bigint_get_as_i64:r.DMD,__wbindgen_memory:r.Py0,__wbindgen_throw:r.Qnr,__wbindgen_debug_string:r.rl,__wbg_new_5e0be73521bc8c17:r.aIY,__wbg_new_78feb108b6472713:r.M2,__wbindgen_number_new:r.QRK,__wbg_new_405e22f390576ce2:r.va5,__wbg_newnoargs_105ed471475aaf50:r.VrZ,__wbg_new_a12002a7f91c75be:r.vVD,__wbg_stringify_f7ed6987935b4a24:r.Y6F,__wbindgen_is_function:r.PRY,__wbindgen_is_string:r.GuA,__wbindgen_is_object:r.qvD,__wbg_next_25feadfc0913fea9:r.yqB,__wbg_buffer_609cc3eee51ed158:r.FHK,__wbg_byteLength_e674b853d9c77e1d:r.x6W,__wbg_byteOffset_fd862df290ef848d:r.cyg,__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a:r.hI8,__wbg_length_a446193dc22c12f8:r.eIr,__wbg_set_65595bdd868b3009:r.HBq,__wbg_newwithlength_a381634e90c276d4:r.HtP,__wbg_buffer_09165b52af8c5237:r._Ue,__wbg_subarray_aa9065fa9dc5df96:r.TOc,__wbg_done_769e5ede4b31c67b:r.Xb8,__wbg_value_cd1ffa7b1ab794f1:r.LMq,__wbg_next_c3ab0d59847b3b5c:r.tER,__wbg_instanceof_Error_4d54113b22d20306:r.fcg,__wbg_instanceof_Uint8Array_17156bcf118086a9:r.SJf,__wbg_instanceof_ArrayBuffer_e14585432e3737fc:r.gGA,__wbg_set_8fc6bf8a5b1071d1:r.iAh,__wbg_get_b9b93047fe3cf45b:r.RKz,__wbg_set_37837023f3d740e8:r.p8e,__wbg_length_e2d2a49132c1b256:r.Ry,__wbg_push_737cfc8c1432c2c6:r.tZf,__wbg_isArray_a1eab7e0d067391b:r.uod,__wbg_new_c68d7209be747379:r.wd3,__wbg_message_97a2af9b89d693a3:r.oGe,__wbg_isSafeInteger_343e2beeeece1bb0:r.Yb6,__wbg_entries_3265d4158b33e5dc:r.gHg,__wbg_iterator_9a24c88df860dc65:r.eW0,__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0:r.w6e,__wbindgen_is_undefined:r.vUM,__wbg_call_672a4d21634d4a24:r.wHY,__wbg_static_accessor_SELF_37c5d418e4bf5819:r.fb$,__wbg_static_accessor_GLOBAL_88a902d13a557d07:r.ii7,__wbg_static_accessor_WINDOW_5de37043a91a9c40:r.x0C,__wbg_new_23a2665fac83c611:r.c6u,__wbg_then_44b73946d2fb3e7d:r.GQG,__wbg_then_48b406749878a531:r.xV_,__wbg_resolve_4851785c9c5f573d:r.wJz,__wbg_call_7cccdd69e0791ae2:r.w9h,__wbg_next_6574e1a8a62d1055:r.Dn4,__wbindgen_number_get:r.sWe,__wbg_get_67b2ba62fc30de12:r.dzD,__wbg_setmethod_3c5280fe5d890842:r._hX,__wbg_setsignal_75b21ef3a81de905:r.l0x,__wbg_setcredentials_c3a22f1cd105a2c6:r.uw1,__wbg_setheaders_834c0bdb6a8949ad:r.rk2,__wbg_instanceof_FileSystemFileHandle_d3d037cf85ee546c:r.KA3,__wbg_createWritable_b4ed240dc879905e:r.kPb,__wbg_getFile_2607bc0123c724e0:r.ycy,__wbg_byobRequest_77d9adf63337edfb:r.JpR,__wbg_close_5ce03e29be453811:r.sQY,__wbg_close_24caca68e93b9c03:r.jeC,__wbg_postMessage_83a8d58d3fcb6c13:r.A2$,__wbg_instanceof_FileSystemDirectoryHandle_0906fc139d75557b:r.Cjr,__wbg_removeEntry_9f6bc325e3383e59:r.m_N,__wbg_removeEntry_a424e90dff229b19:r.lkn,__wbg_getFileHandle_5fb877d1ecc74d52:r.Wkh,__wbg_getDirectoryHandle_c48a138373d79b3d:r.kTu,__wbg_entries_19efe296f7d36df9:r.RCF,__wbg_setrecursive_536113a081d6177a:r.ugc,__wbg_new_018dcc2d6c8c2f6a:r.RR8,__wbg_append_8c7dd8d641a5f01b:r.Tbm,__wbg_name_e4a115def9e2bbaa:r.Yeo,__wbg_setcreate_139bad94b2874fb5:r.kF0,__wbg_seek_3f0f8d7591f648d7:r.Zk3,__wbg_write_397d977609afc729:r.Vob,__wbg_newwithstrandinit_06c535e0a867c635:r.heb,__wbg_append_299d5d48292c0495:r.cVx,__wbg_append_b44785ebeb668479:r.d_N,__wbg_append_b2d1fc16de2a0e81:r.WqA,__wbg_new_9fd39a253424609a:r.z09,__wbg_respond_1f279fa9f8edcb1c:r.dSQ,__wbg_view_fd8a56e8983f448d:r.NgT,__wbg_setbody_5923b78a95eedf29:r.Nhd,__wbg_setmode_5dc300b865044b65:r.BFX,__wbg_setkeepexistingdata_ee7c8cb466e9477f:r.aKt,__wbg_instanceof_File_a4e2256bf71955a9:r.gjJ,__wbg_lastModified_7a9e61b3961224b8:r.gvw,__wbg_instanceof_Response_f2cc20d9f7dfd644:r.Hzn,__wbg_arrayBuffer_d1b44c4390db422f:r._iy,__wbg_url_ae10c34ca209681d:r.Tp3,__wbg_status_f6360336ca686bf0:r.kK3,__wbg_headers_9cb51cfd2ac780a4:r.Moj,__wbg_new_e25e5aab09ff45db:r.RG9,__wbg_abort_775ef1d17fc65868:r.gMQ,__wbg_signal_aaf9ad74119f20a4:r.CF8,__wbg_settype_39ed370d3edd403c:r.a4S,__wbg_setcreate_4ca762e23d9f78da:r.N9Q,__wbg_enqueue_bb16ba72f537dc9e:r.QHd,__wbg_close_304cc1fef3466669:r.oaw,__wbg_has_a5ea9117f258a0ec:r.HSm,__wbg_fetch_4465c2b10f21a927:r.o0R,__wbg_fetch_509096533071c657:r.gRe,__wbg_arrayBuffer_f18c144cd0125f07:r.RGi,__wbg_newwithu8arraysequenceandoptions_068570c487f69127:r.qe7,__wbg_size_3808d41635a9c259:r.$CF,__wbg_text_1f39a8afe3c70a99:r.CFe,__wbg_queueMicrotask_97d92b4fcc8a61c5:r._mt,__wbg_queueMicrotask_d3219def82552485:r.k2R,__wbindgen_cb_drop:r.LCp,__wbg_point_unwrap:r._QJ,__wbg_boundary_unwrap:r.Wq,__wbg_person_unwrap:r.Xv$,__wbg_container_unwrap:r.xB8,__wbindgen_jsval_loose_eq:r.U8c,__wbindgen_boolean_get:r.NhE,__wbindgen_as_number:r.qmw,__wbindgen_error_new:r.RjG,__wbg_getwithrefkey_2d7fdfea9645a25b:r.A2U,__wbg_set_2873a5cee2324875:r.v1k,__wbg_String_1b2069caba3b9783:r.JF5,__wbindgen_bigint_from_u64:r.Qg3,__wbindgen_in:r.zEy,__wbg_crypto_ed58b8e10a292839:r.ilI,__wbg_process_5c1d670bc53614b8:r.Evb,__wbg_versions_c71aa1626a93e0a1:r.ooJ,__wbg_node_02999533c4ea02e3:r.OtZ,__wbg_require_79b1e9274cde3c87:r.Ltb,__wbg_msCrypto_0a36e2ec3a343d26:r.HOd,__wbg_randomFillSync_ab2cfe79ebbf2740:r.NNx,__wbg_getRandomValues_bcb4912f16000dc4:r.FGp,__wbindgen_is_bigint:r.YkQ,__wbindgen_jsval_eq:r.BGI,__wbg_relationship_unwrap:r.KM7,__wbg_new_8a6f238a6ece86ea:r.$Pc,__wbg_stack_0ed75d68575b0f3c:r.x$X,__wbg_error_7534b8e9a36f1ab4:r.WYM,__wbg_deploymentnode_unwrap:r._Zx,__wbg_minaerror_new:r.EkI,__wbg_diagramelementspec_new:r.Dr_,__wbg_shape_new:r._cl,__wbg_shape_unwrap:r.D7n,__wbg_softwaresystem_new:r.dM0,__wbg_person_new:r.c1W,__wbg_container_new:r.e57,__wbg_component_new:r.WJm,__wbg_point_new:r.nA9,__wbg_deploymentnode_new:r.ezj,__wbg_relationship_new:r.NpJ,__wbg_boundary_new:r.HCo,__wbg_component_unwrap:r.dT0,__wbg_softwaresystem_unwrap:r.qre,__wbg_diagramelementspec_unwrap:r.W3f,__wbindgen_closure_wrapper3317:r.TiG,__wbindgen_init_externref_table:r.bLn}})},221:e=>{e.exports=require("tw-elements")},334:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.r(t),n.d(t,{MinaReact:()=>d,default:()=>g});var a=n(764),o=n(779),i=n(385),l=n(15),s=n(507),_=n(519),c=n(732),u=e([s,_]);[s,_]=u.then?(await u)():u,(0,i.aC)();const d=e=>{var t;const{projectRootUrl:r,diagramUrl:i,ghToken:u}=e;(0,o.T_)({initTE:async function(){const{initTE:e,Dropdown:t}=await Promise.resolve().then(n.t.bind(n,221,23));await e({Dropdown:t})}});const d=(0,l.useRef)(null),[g,p]=(0,l.useState)(),[b,f]=(0,l.useState)(),[m,h]=(0,l.useState)(),w={onOpenDiagramClick:e=>{let t;try{t=(0,_.qjW)(r,e)}catch(e){console.error(e),y("Invalid URL: the provided URL is an invalid Mina project or diagram.")}t&&v(t)},onOpenExternalLinkClick:e=>{window.open(e,"_blank")}};function y(e){p(null),h(e)}async function v(e){var t,n,a,o;let i;null==(t=d.current)||t.resetCanvas();try{i=await(0,s.wS)(r,e,u)}catch(e){const t=e;if(!(t.message&&t.message.replace(/ /g,"").length>0))throw new Error;y(t.message)}if(null!=(n=i)&&n.projectSettingsJson&&null!=(a=i)&&a.plantuml&&null!=(o=i)&&o.spec)try{f(JSON.parse(i.projectSettingsJson));const t=await(0,_.Oxg)(r,e,i.plantuml,i.spec);p(t)}catch(e){y("Invalid diagram or project settings.")}}(0,l.useEffect)((()=>{y(null),v(i)}),[i,r,u]);return(0,c.jsxs)("div",{className:"h-full w-full border-t flex items-center",children:[(0,c.jsx)(o.rI,{menuItemsProps:[{id:"dropdown-init",label:"",isHeaderMenuItem:!0,subMenuItems:[{id:"dropdown-init-1",label:""}]}],className:"hidden"}),(0,c.jsx)(o.tz,{}),null===m&&g&&(0,c.jsx)(a.D,{diagramListener:w,diagram:g,ref:d,diagramsThemeSettings:null==b||null==(t=b.themes_settings)?void 0:t.diagrams_theme_settings,target:"web",readOnly:!0}),m&&(0,c.jsx)("div",{className:"w-full text-center text-black",children:m})]})},g=d;r()}catch(e){r(e)}}))},385:(e,t,n)=>{n.d(t,{mg:()=>_,Cp:()=>r,qI:()=>g,aC:()=>b,l:()=>u,$r:()=>s,cr:()=>p,wF:()=>d,x4:()=>c});const r=(e={})=>Object.keys(e).reduce(((t,n)=>(n.startsWith("data-")&&(t[n]=e[n]),t)),{}),a=require("fast-deep-equal/es6/react");var o=n.n(a);const i=require("lodash.clonedeep");var l=n.n(i);const s=(e,t)=>o()(e,t),_=e=>l()(e);function c(e){return e?e.replace(/\\n/g,"\n").replace(/\\t/g," ").replace(/\\r/g,"\n"):void 0}function u(e){return e.sort(((e,t)=>t.length-e.length))[0]}function d(e,t=96){return Number.parseFloat((e/t).toFixed(2))}function g(e,t=96){return Number.parseFloat((e*t).toFixed(2))}function p(e,t=96){return Number.parseFloat((e*(t/72)).toFixed(2))}function b(){console.log=()=>{},console.debug=()=>{}}},416:(e,t,n)=>{function r(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}n.d(t,{A:()=>r})},423:e=>{e.exports=require("change-case")},452:e=>{e.exports=require("pluralize")},457:(e,t,n)=>{let r;function a(e){r=e}n.d(t,{$CF:()=>vn,$Pc:()=>Et,A2$:()=>Wt,A2U:()=>Je,BFX:()=>pn,BGI:()=>nr,CF8:()=>yn,CFe:()=>Ln,Cjr:()=>rt,D7n:()=>wn,DMD:()=>Xn,Dn4:()=>jt,Dr_:()=>je,EkI:()=>ft,Evb:()=>Xt,F$t:()=>Le,FGp:()=>Ue,FHK:()=>me,GQG:()=>Nn,GuA:()=>er,HBq:()=>an,HCo:()=>pe,HOd:()=>mt,HSm:()=>Qe,HtP:()=>kt,Hzn:()=>it,JD7:()=>R,JF5:()=>ie,JpR:()=>he,KA3:()=>at,KM7:()=>qt,LCp:()=>Zn,LMq:()=>Fn,Llp:()=>C,Ltb:()=>Qt,M2:()=>St,Moj:()=>Ke,N9Q:()=>_n,NNx:()=>Gt,NgT:()=>Pn,NhE:()=>Yn,Nhd:()=>ln,NpJ:()=>Ut,OtZ:()=>Mt,Oxg:()=>E,PRY:()=>Qn,Py0:()=>ar,QHd:()=>Pe,QRK:()=>ir,Qg3:()=>Wn,Qnr:()=>_r,RCF:()=>ze,RG9:()=>Ct,RGi:()=>ge,RKz:()=>Ve,RR8:()=>wt,RjG:()=>Un,Ry:()=>gt,SJf:()=>lt,TOc:()=>kn,Tbm:()=>_e,TiG:()=>$n,Tp3:()=>jn,U8c:()=>rr,Vob:()=>Bn,VrZ:()=>It,W3f:()=>Fe,WJm:()=>Te,WYM:()=>We,Wkh:()=>$e,Wq:()=>be,WqA:()=>ce,Xb8:()=>Me,Xv$:()=>zt,Y6F:()=>Dn,Yb6:()=>_t,Yeo:()=>ht,YkQ:()=>Jn,Zk3:()=>tn,ZrD:()=>et,_Cc:()=>y,_QJ:()=>Ht,_Ue:()=>fe,_Zx:()=>Ae,_cl:()=>hn,_hX:()=>gn,_iy:()=>de,_mt:()=>Zt,a4S:()=>mn,aIY:()=>Ot,aKt:()=>dn,bLn:()=>Vn,c1W:()=>Pt,c6u:()=>yt,cVx:()=>se,cyg:()=>ye,dM0:()=>On,dSQ:()=>en,dT0:()=>Re,d_N:()=>ue,dzD:()=>qe,e57:()=>Ce,eIr:()=>dt,eW0:()=>ct,ezj:()=>Ne,fb$:()=>Rn,fcg:()=>nt,gGA:()=>tt,gHg:()=>Be,gMQ:()=>le,gRe:()=>Ye,gjJ:()=>ot,gvw:()=>ut,hI8:()=>Dt,heb:()=>Lt,iAh:()=>on,ii7:()=>xn,ilI:()=>ke,jeC:()=>Se,jwJ:()=>zn,k2R:()=>$t,kF0:()=>sn,kK3:()=>In,kPb:()=>De,kTu:()=>Ze,l0x:()=>fn,lIU:()=>a,lkn:()=>Jt,m_N:()=>Vt,nA9:()=>Bt,o0R:()=>Xe,oGe:()=>bt,oaw:()=>Ee,ooJ:()=>Mn,p8e:()=>rn,pR9:()=>pt,pWA:()=>He,qNE:()=>lr,qe7:()=>Nt,qjW:()=>T,qmw:()=>Hn,qre:()=>Sn,qvD:()=>Kn,rk2:()=>un,rl:()=>Gn,sQY:()=>xe,sWe:()=>or,tER:()=>Ft,tZf:()=>Yt,ugc:()=>bn,uod:()=>st,uw1:()=>cn,v1k:()=>nn,vUM:()=>tr,vVD:()=>Tt,va5:()=>vt,w6e:()=>Tn,w9h:()=>Oe,wHY:()=>ve,wJz:()=>Kt,wd3:()=>Rt,x$X:()=>En,x0C:()=>Cn,x6W:()=>we,xB8:()=>Ie,xV_:()=>An,ycJ:()=>sr,ycy:()=>Ge,yqB:()=>At,z09:()=>xt,zEy:()=>qn}),e=n.hmd(e);let o=0,i=null;function l(){return null!==i&&0!==i.byteLength||(i=new Uint8Array(r.memory.buffer)),i}let s=new("undefined"==typeof TextEncoder?(0,e.require)("util").TextEncoder:TextEncoder)("utf-8");const _="function"==typeof s.encodeInto?function(e,t){return s.encodeInto(e,t)}:function(e,t){const n=s.encode(e);return t.set(n),{read:e.length,written:n.length}};function c(e,t,n){if(void 0===n){const n=s.encode(e),r=t(n.length,1)>>>0;return l().subarray(r,r+n.length).set(n),o=n.length,r}let r=e.length,a=t(r,1)>>>0;const i=l();let c=0;for(;c<r;c++){const t=e.charCodeAt(c);if(t>127)break;i[a+c]=t}if(c!==r){0!==c&&(e=e.slice(c)),a=n(a,r,r=c+3*e.length,1)>>>0;const t=l().subarray(a+c,a+r);c+=_(e,t).written,a=n(a,r,c,1)>>>0}return o=c,a}let u=null;function d(){return(null===u||!0===u.buffer.detached||void 0===u.buffer.detached&&u.buffer!==r.memory.buffer)&&(u=new DataView(r.memory.buffer)),u}let g=new("undefined"==typeof TextDecoder?(0,e.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});function p(e,t){return e>>>=0,g.decode(l().subarray(e,e+t))}function b(e){const t=r.__externref_table_alloc();return r.__wbindgen_export_4.set(t,e),t}function f(e,t){try{return e.apply(this,t)}catch(e){const t=b(e);r.__wbindgen_exn_store(t)}}function m(e){return null==e}g.decode();const h="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>{r.__wbindgen_export_6.get(e.dtor)(e.a,e.b)}));function w(e){const t=typeof e;if("number"==t||"boolean"==t||null==e)return`${e}`;if("string"==t)return`"${e}"`;if("symbol"==t){const t=e.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=e.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(e)){const t=e.length;let n="[";t>0&&(n+=w(e[0]));for(let r=1;r<t;r++)n+=", "+w(e[r]);return n+="]",n}const n=/\[object ([^\]]+)\]/.exec(toString.call(e));let r;if(!(n&&n.length>1))return toString.call(e);if(r=n[1],"Object"==r)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:r}function y(e){let t,n;try{const a=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),i=o,l=r.project_settings_url(a,i);return t=l[0],n=l[1],p(l[0],l[1])}finally{r.__wbindgen_free(t,n,1)}}function v(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function O(e,t){e>>>=0;const n=d(),a=[];for(let o=e;o<e+4*t;o+=4)a.push(r.__wbindgen_export_4.get(n.getUint32(o,!0)));return r.__externref_drop_slice(e,t),a}function S(e,t){const n=t(4*e.length,4)>>>0;for(let t=0;t<e.length;t++){const r=b(e[t]);d().setUint32(n+4*t,r,!0)}return o=e.length,n}function E(e,t,n,a){return r.open_remote_diagram(e,t,n,a)}function x(e){const t=r.__wbindgen_export_4.get(e);return r.__externref_table_dealloc(e),t}function T(e,t){let n,a;try{const s=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),_=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_url_from_link_string(s,_,u,d);var i=g[0],l=g[1];if(g[3])throw i=0,l=0,x(g[2]);return n=i,a=l,p(i,l)}finally{r.__wbindgen_free(n,a,1)}}function R(e,t){let n,a;try{const s=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),_=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_spec_url_from_diagram_url(s,_,u,d);var i=g[0],l=g[1];if(g[3])throw i=0,l=0,x(g[2]);return n=i,a=l,p(i,l)}finally{r.__wbindgen_free(n,a,1)}}function C(e,t){let n,a;try{const s=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),_=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_plantuml_url_from_diagram_url(s,_,u,d);var i=g[0],l=g[1];if(g[3])throw i=0,l=0,x(g[2]);return n=i,a=l,p(i,l)}finally{r.__wbindgen_free(n,a,1)}}function I(e,t,n){r.closure976_externref_shim(e,t,n)}const D=["omit","same-origin","include"],k=["same-origin","no-cors","cors","navigate"];"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_aisettings_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_addelementtag_free(e>>>0,1)));const L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_baseelement_free(e>>>0,1)));class N{static __wrap(e){e>>>=0;const t=Object.create(N.prototype);return t.__wbg_ptr=e,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_baseelement_free(e,0)}get alias(){const e=r.__wbg_get_baseelement_alias(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set alias(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_alias(this.__wbg_ptr,t,n)}get label(){const e=r.__wbg_get_baseelement_label(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set label(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_label(this.__wbg_ptr,t,n)}get description(){const e=r.__wbg_get_baseelement_description(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set description(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_description(this.__wbg_ptr,t,n)}get sprite(){const e=r.__wbg_get_baseelement_sprite(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set sprite(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_sprite(this.__wbg_ptr,t,n)}get tags(){const e=r.__wbg_get_baseelement_tags(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set tags(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_tags(this.__wbg_ptr,t,n)}get link(){const e=r.__wbg_get_baseelement_link(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set link(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_link(this.__wbg_ptr,t,n)}get uuid(){const e=r.__wbg_get_baseelement_uuid(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set uuid(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_uuid(this.__wbg_ptr,t,n)}get notes(){const e=r.__wbg_get_baseelement_notes(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set notes(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_notes(this.__wbg_ptr,t,n)}}const A="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_boundary_free(e>>>0,1)));class j{static __wrap(e){e>>>=0;const t=Object.create(j.prototype);return t.__wbg_ptr=e,A.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof j?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,A.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_boundary_free(e,0)}get base_data(){const e=r.__wbg_get_boundary_base_data(this.__wbg_ptr);return N.__wrap(e)}set base_data(e){v(e,N);var t=e.__destroy_into_raw();r.__wbg_set_boundary_base_data(this.__wbg_ptr,t)}get boundary_type(){return r.__wbg_get_boundary_boundary_type(this.__wbg_ptr)}set boundary_type(e){r.__wbg_set_boundary_boundary_type(this.__wbg_ptr,m(e)?0:b(e))}get boundary_custom_type(){const e=r.__wbg_get_boundary_boundary_custom_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set boundary_custom_type(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_addelementtag_legend_sprite(this.__wbg_ptr,t,n)}get sub_elements(){const e=r.__wbg_get_boundary_sub_elements(this.__wbg_ptr);var t=O(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set sub_elements(e){const t=S(e,r.__wbindgen_malloc),n=o;r.__wbg_set_boundary_sub_elements(this.__wbg_ptr,t,n)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_c4elements_free(e>>>0,1)));const F="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_component_free(e>>>0,1)));class M{static __wrap(e){e>>>=0;const t=Object.create(M.prototype);return t.__wbg_ptr=e,F.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof M?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_component_free(e,0)}get base_data(){const e=r.__wbg_get_component_base_data(this.__wbg_ptr);return N.__wrap(e)}set base_data(e){v(e,N);var t=e.__destroy_into_raw();r.__wbg_set_component_base_data(this.__wbg_ptr,t)}get technology(){const e=r.__wbg_get_component_technology(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set technology(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_component_technology(this.__wbg_ptr,t,n)}get component_type(){return r.__wbg_get_component_component_type(this.__wbg_ptr)}set component_type(e){r.__wbg_set_component_component_type(this.__wbg_ptr,m(e)?0:b(e))}}const P="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_container_free(e>>>0,1)));class z{static __wrap(e){e>>>=0;const t=Object.create(z.prototype);return t.__wbg_ptr=e,P.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof z?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_container_free(e,0)}get base_data(){const e=r.__wbg_get_container_base_data(this.__wbg_ptr);return N.__wrap(e)}set base_data(e){v(e,N);var t=e.__destroy_into_raw();r.__wbg_set_container_base_data(this.__wbg_ptr,t)}get technology(){const e=r.__wbg_get_container_technology(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set technology(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_container_technology(this.__wbg_ptr,t,n)}get container_type(){return r.__wbg_get_container_container_type(this.__wbg_ptr)}set container_type(e){r.__wbg_set_container_container_type(this.__wbg_ptr,m(e)?0:b(e))}}const B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_deploymentnode_free(e>>>0,1)));class H{static __wrap(e){e>>>=0;const t=Object.create(H.prototype);return t.__wbg_ptr=e,B.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof H?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_deploymentnode_free(e,0)}get base_data(){const e=r.__wbg_get_boundary_base_data(this.__wbg_ptr);return N.__wrap(e)}set base_data(e){v(e,N);var t=e.__destroy_into_raw();r.__wbg_set_boundary_base_data(this.__wbg_ptr,t)}get deploymeny_node_custom_type(){const e=r.__wbg_get_deploymentnode_deploymeny_node_custom_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set deploymeny_node_custom_type(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_addelementtag_legend_sprite(this.__wbg_ptr,t,n)}get deployment_node_type(){return r.__wbg_get_deploymentnode_deployment_node_type(this.__wbg_ptr)}set deployment_node_type(e){r.__wbg_set_deploymentnode_deployment_node_type(this.__wbg_ptr,m(e)?0:b(e))}get sub_elements(){const e=r.__wbg_get_deploymentnode_sub_elements(this.__wbg_ptr);var t=O(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set sub_elements(e){const t=S(e,r.__wbindgen_malloc),n=o;r.__wbg_set_boundary_sub_elements(this.__wbg_ptr,t,n)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_diagram_free(e>>>0,1)));const W="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_diagramelementspec_free(e>>>0,1)));class X{static __wrap(e){e>>>=0;const t=Object.create(X.prototype);return t.__wbg_ptr=e,W.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof X?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,W.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_diagramelementspec_free(e,0)}get alias(){const e=r.__wbg_get_diagramelementspec_alias(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set alias(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramelementspec_alias(this.__wbg_ptr,t,n)}get from(){const e=r.__wbg_get_diagramelementspec_from(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set from(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramelementspec_from(this.__wbg_ptr,t,n)}get to(){const e=r.__wbg_get_diagramelementspec_to(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set to(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramelementspec_to(this.__wbg_ptr,t,n)}get shapes(){const e=r.__wbg_get_diagramelementspec_shapes(this.__wbg_ptr);let t;return 0!==e[0]&&(t=O(e[0],e[1]).slice(),r.__wbindgen_free(e[0],4*e[1],4)),t}set shapes(e){var t=m(e)?0:S(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramelementspec_shapes(this.__wbg_ptr,t,n)}get element_type(){return r.__wbg_get_diagramelementspec_element_type(this.__wbg_ptr)}set element_type(e){r.__wbg_set_diagramelementspec_element_type(this.__wbg_ptr,m(e)?0:b(e))}get position(){const e=r.__wbg_get_diagramelementspec_position(this.__wbg_ptr);return 0===e?void 0:J.__wrap(e)}set position(e){let t=0;m(e)||(v(e,J),t=e.__destroy_into_raw()),r.__wbg_set_diagramelementspec_position(this.__wbg_ptr,t)}get size(){const e=r.__wbg_get_diagramelementspec_size(this.__wbg_ptr);return 0===e?void 0:re.__wrap(e)}set size(e){let t=0;m(e)||(v(e,re),t=e.__destroy_into_raw()),r.__wbg_set_diagramelementspec_size(this.__wbg_ptr,t)}get inner_specs(){const e=r.__wbg_get_diagramelementspec_inner_specs(this.__wbg_ptr);let t;return 0!==e[0]&&(t=O(e[0],e[1]).slice(),r.__wbindgen_free(e[0],4*e[1],4)),t}set inner_specs(e){var t=m(e)?0:S(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramelementspec_inner_specs(this.__wbg_ptr,t,n)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_diagramplantuml_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_diagramspec_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_diagramsthemesettings_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_elementdata_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_hookpayload_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_intounderlyingbytesource_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_intounderlyingsink_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_intounderlyingsource_free(e>>>0,1)));const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_minaerror_free(e>>>0,1)));class Z{static __wrap(e){e>>>=0;const t=Object.create(Z.prototype);return t.__wbg_ptr=e,Y.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_minaerror_free(e,0)}get code(){return r.__wbg_get_minaerror_code(this.__wbg_ptr)}set code(e){r.__wbg_set_minaerror_code(this.__wbg_ptr,e)}get msg(){let e,t;try{const n=r.__wbg_get_minaerror_msg(this.__wbg_ptr);return e=n[0],t=n[1],p(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}set msg(e){const t=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_minaerror_msg(this.__wbg_ptr,t,n)}}const $="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_person_free(e>>>0,1)));class G{static __wrap(e){e>>>=0;const t=Object.create(G.prototype);return t.__wbg_ptr=e,$.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof G?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,$.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_person_free(e,0)}get base_data(){const e=r.__wbg_get_container_base_data(this.__wbg_ptr);return N.__wrap(e)}set base_data(e){v(e,N);var t=e.__destroy_into_raw();r.__wbg_set_container_base_data(this.__wbg_ptr,t)}get person_type(){return r.__wbg_get_person_person_type(this.__wbg_ptr)}set person_type(e){r.__wbg_set_person_person_type(this.__wbg_ptr,m(e)?0:b(e))}}const U="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_point_free(e>>>0,1)));class q{static __wrap(e){e>>>=0;const t=Object.create(q.prototype);return t.__wbg_ptr=e,U.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof q?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,U.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_point_free(e,0)}get x(){return r.__wbg_get_point_x(this.__wbg_ptr)}set x(e){r.__wbg_set_point_x(this.__wbg_ptr,e)}get y(){return r.__wbg_get_point_y(this.__wbg_ptr)}set y(e){r.__wbg_set_point_y(this.__wbg_ptr,e)}}const V="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_position_free(e>>>0,1)));class J{static __wrap(e){e>>>=0;const t=Object.create(J.prototype);return t.__wbg_ptr=e,V.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,V.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_position_free(e,0)}get left(){const e=r.__wbg_get_position_left(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set left(e){r.__wbg_set_position_left(this.__wbg_ptr,!m(e),m(e)?0:e)}get top(){const e=r.__wbg_get_position_top(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set top(e){r.__wbg_set_position_top(this.__wbg_ptr,!m(e),m(e)?0:e)}get z_index(){const e=r.__wbg_get_position_z_index(this.__wbg_ptr);return 4294967297===e?void 0:e}set z_index(e){r.__wbg_set_position_z_index(this.__wbg_ptr,m(e)?4294967297:0|e)}get angle(){const e=r.__wbg_get_position_angle(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set angle(e){r.__wbg_set_position_angle(this.__wbg_ptr,!m(e),m(e)?0:e)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_project_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_projectlibrary_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_projectsettings_free(e>>>0,1)));const Q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_relationship_free(e>>>0,1)));class K{static __wrap(e){e>>>=0;const t=Object.create(K.prototype);return t.__wbg_ptr=e,Q.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof K?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Q.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_relationship_free(e,0)}get base_data(){const e=r.__wbg_get_container_base_data(this.__wbg_ptr);return N.__wrap(e)}set base_data(e){v(e,N);var t=e.__destroy_into_raw();r.__wbg_set_container_base_data(this.__wbg_ptr,t)}get from(){const e=r.__wbg_get_relationship_from(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set from(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_container_technology(this.__wbg_ptr,t,n)}get to(){const e=r.__wbg_get_relationship_to(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set to(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_relationship_to(this.__wbg_ptr,t,n)}get technology(){const e=r.__wbg_get_relationship_technology(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set technology(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_relationship_technology(this.__wbg_ptr,t,n)}get relationship_type(){return r.__wbg_get_relationship_relationship_type(this.__wbg_ptr)}set relationship_type(e){r.__wbg_set_relationship_relationship_type(this.__wbg_ptr,m(e)?0:b(e))}}const ee="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_shape_free(e>>>0,1)));class te{static __wrap(e){e>>>=0;const t=Object.create(te.prototype);return t.__wbg_ptr=e,ee.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof te?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ee.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_shape_free(e,0)}get shape_type(){return r.__wbg_get_shape_shape_type(this.__wbg_ptr)}set shape_type(e){r.__wbg_set_shape_shape_type(this.__wbg_ptr,m(e)?0:b(e))}get position(){const e=r.__wbg_get_diagramelementspec_position(this.__wbg_ptr);return 0===e?void 0:J.__wrap(e)}set position(e){let t=0;m(e)||(v(e,J),t=e.__destroy_into_raw()),r.__wbg_set_diagramelementspec_position(this.__wbg_ptr,t)}get size(){const e=r.__wbg_get_diagramelementspec_size(this.__wbg_ptr);return 0===e?void 0:re.__wrap(e)}set size(e){let t=0;m(e)||(v(e,re),t=e.__destroy_into_raw()),r.__wbg_set_diagramelementspec_size(this.__wbg_ptr,t)}}const ne="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_size_free(e>>>0,1)));class re{static __wrap(e){e>>>=0;const t=Object.create(re.prototype);return t.__wbg_ptr=e,ne.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ne.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_size_free(e,0)}get width(){const e=r.__wbg_get_size_width(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set width(e){r.__wbg_set_size_width(this.__wbg_ptr,!m(e),m(e)?0:e)}get height(){const e=r.__wbg_get_size_height(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set height(e){r.__wbg_set_size_height(this.__wbg_ptr,!m(e),m(e)?0:e)}get scale_x(){const e=r.__wbg_get_size_scale_x(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set scale_x(e){r.__wbg_set_size_scale_x(this.__wbg_ptr,!m(e),m(e)?0:e)}get scale_y(){const e=r.__wbg_get_size_scale_y(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set scale_y(e){r.__wbg_set_size_scale_y(this.__wbg_ptr,!m(e),m(e)?0:e)}}const ae="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_softwaresystem_free(e>>>0,1)));class oe{static __wrap(e){e>>>=0;const t=Object.create(oe.prototype);return t.__wbg_ptr=e,ae.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof oe?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ae.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_softwaresystem_free(e,0)}get base_data(){const e=r.__wbg_get_component_base_data(this.__wbg_ptr);return N.__wrap(e)}set base_data(e){v(e,N);var t=e.__destroy_into_raw();r.__wbg_set_component_base_data(this.__wbg_ptr,t)}get system_type(){return r.__wbg_get_softwaresystem_system_type(this.__wbg_ptr)}set system_type(e){r.__wbg_set_softwaresystem_system_type(this.__wbg_ptr,m(e)?0:b(e))}}function ie(e,t){const n=c(String(t),r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function le(e){e.abort()}function se(){return f((function(e,t,n,r,a){e.append(p(t,n),p(r,a))}),arguments)}function _e(){return f((function(e,t,n,r,a){e.append(p(t,n),p(r,a))}),arguments)}function ce(){return f((function(e,t,n,r,a,o){e.append(p(t,n),r,p(a,o))}),arguments)}function ue(){return f((function(e,t,n,r){e.append(p(t,n),r)}),arguments)}function de(){return f((function(e){return e.arrayBuffer()}),arguments)}function ge(e){return e.arrayBuffer()}function pe(e){return j.__wrap(e)}function be(e){return j.__unwrap(e)}function fe(e){return e.buffer}function me(e){return e.buffer}function he(e){const t=e.byobRequest;return m(t)?0:b(t)}function we(e){return e.byteLength}function ye(e){return e.byteOffset}function ve(){return f((function(e,t){return e.call(t)}),arguments)}function Oe(){return f((function(e,t,n){return e.call(t,n)}),arguments)}function Se(e){return e.close()}function Ee(){return f((function(e){e.close()}),arguments)}function xe(){return f((function(e){e.close()}),arguments)}function Te(e){return M.__wrap(e)}function Re(e){return M.__unwrap(e)}function Ce(e){return z.__wrap(e)}function Ie(e){return z.__unwrap(e)}function De(e,t){return e.createWritable(t)}function ke(e){return e.crypto}function Le(e){console.debug(e)}function Ne(e){return H.__wrap(e)}function Ae(e){return H.__unwrap(e)}function je(e){return X.__wrap(e)}function Fe(e){return X.__unwrap(e)}function Me(e){return e.done}function Pe(){return f((function(e,t){e.enqueue(t)}),arguments)}function ze(e){return e.entries()}function Be(e){return Object.entries(e)}function He(e){console.error(e)}function We(e,t){let n,a;try{n=e,a=t,console.error(p(e,t))}finally{r.__wbindgen_free(n,a,1)}}function Xe(e){return fetch(e)}function Ye(e,t){return e.fetch(t)}function Ze(e,t,n,r){return e.getDirectoryHandle(p(t,n),r)}function $e(e,t,n,r){return e.getFileHandle(p(t,n),r)}function Ge(e){return e.getFile()}function Ue(){return f((function(e,t){e.getRandomValues(t)}),arguments)}function qe(){return f((function(e,t){return Reflect.get(e,t)}),arguments)}function Ve(e,t){return e[t>>>0]}function Je(e,t){return e[t]}function Qe(){return f((function(e,t){return Reflect.has(e,t)}),arguments)}function Ke(e){return e.headers}function et(e){console.info(e)}function tt(e){let t;try{t=e instanceof ArrayBuffer}catch(e){t=!1}return t}function nt(e){let t;try{t=e instanceof Error}catch(e){t=!1}return t}function rt(e){let t;try{t=e instanceof FileSystemDirectoryHandle}catch(e){t=!1}return t}function at(e){let t;try{t=e instanceof FileSystemFileHandle}catch(e){t=!1}return t}function ot(e){let t;try{t=e instanceof File}catch(e){t=!1}return t}function it(e){let t;try{t=e instanceof Response}catch(e){t=!1}return t}function lt(e){let t;try{t=e instanceof Uint8Array}catch(e){t=!1}return t}function st(e){return Array.isArray(e)}function _t(e){return Number.isSafeInteger(e)}function ct(){return Symbol.iterator}function ut(e){return e.lastModified}function dt(e){return e.length}function gt(e){return e.length}function pt(e){console.log(e)}function bt(e){return e.message}function ft(e){return Z.__wrap(e)}function mt(e){return e.msCrypto}function ht(e,t){const n=c(t.name,r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function wt(){return f((function(){return new Headers}),arguments)}function yt(e,t){try{var n={a:e,b:t};const a=new Promise(((e,t)=>{const a=n.a;n.a=0;try{return function(e,t,n,a){r.closure72_externref_shim(e,t,n,a)}(a,n.b,e,t)}finally{n.a=a}}));return a}finally{n.a=n.b=0}}function vt(){return new Object}function Ot(){return new Map}function St(){return new Array}function Et(){return new Error}function xt(){return f((function(){return new FormData}),arguments)}function Tt(e){return new Uint8Array(e)}function Rt(e,t){return new Error(p(e,t))}function Ct(){return f((function(){return new AbortController}),arguments)}function It(e,t){return new Function(p(e,t))}function Dt(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)}function kt(e){return new Uint8Array(e>>>0)}function Lt(){return f((function(e,t,n){return new Request(p(e,t),n)}),arguments)}function Nt(){return f((function(e,t){return new Blob(e,t)}),arguments)}function At(e){return e.next}function jt(){return f((function(e){return e.next()}),arguments)}function Ft(){return f((function(e){return e.next()}),arguments)}function Mt(e){return e.node}function Pt(e){return G.__wrap(e)}function zt(e){return G.__unwrap(e)}function Bt(e){return q.__wrap(e)}function Ht(e){return q.__unwrap(e)}function Wt(){return f((function(e,t){e.postMessage(t)}),arguments)}function Xt(e){return e.process}function Yt(e,t){return e.push(t)}function Zt(e){queueMicrotask(e)}function $t(e){return e.queueMicrotask}function Gt(){return f((function(e,t){e.randomFillSync(t)}),arguments)}function Ut(e){return K.__wrap(e)}function qt(e){return K.__unwrap(e)}function Vt(e,t,n){return e.removeEntry(p(t,n))}function Jt(e,t,n,r){return e.removeEntry(p(t,n),r)}function Qt(){return f((function(){return e.require}),arguments)}function Kt(e){return Promise.resolve(e)}function en(){return f((function(e,t){e.respond(t>>>0)}),arguments)}function tn(){return f((function(e,t){return e.seek(t)}),arguments)}function nn(e,t,n){e[t]=n}function rn(e,t,n){e[t>>>0]=n}function an(e,t,n){e.set(t,n>>>0)}function on(e,t,n){return e.set(t,n)}function ln(e,t){e.body=t}function sn(e,t){e.create=0!==t}function _n(e,t){e.create=0!==t}function cn(e,t){e.credentials=D[t]}function un(e,t){e.headers=t}function dn(e,t){e.keepExistingData=0!==t}function gn(e,t,n){e.method=p(t,n)}function pn(e,t){e.mode=k[t]}function bn(e,t){e.recursive=0!==t}function fn(e,t){e.signal=t}function mn(e,t,n){e.type=p(t,n)}function hn(e){return te.__wrap(e)}function wn(e){return te.__unwrap(e)}function yn(e){return e.signal}function vn(e){return e.size}function On(e){return oe.__wrap(e)}function Sn(e){return oe.__unwrap(e)}function En(e,t){const n=c(t.stack,r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function xn(){const e=void 0===n.g?null:n.g;return m(e)?0:b(e)}function Tn(){const e="undefined"==typeof globalThis?null:globalThis;return m(e)?0:b(e)}function Rn(){const e="undefined"==typeof self?null:self;return m(e)?0:b(e)}function Cn(){const e="undefined"==typeof window?null:window;return m(e)?0:b(e)}function In(e){return e.status}function Dn(){return f((function(e){return JSON.stringify(e)}),arguments)}function kn(e,t,n){return e.subarray(t>>>0,n>>>0)}function Ln(e){return e.text()}function Nn(e,t){return e.then(t)}function An(e,t,n){return e.then(t,n)}function jn(e,t){const n=c(t.url,r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function Fn(e){return e.value}function Mn(e){return e.versions}function Pn(e){const t=e.view;return m(t)?0:b(t)}function zn(e){console.warn(e)}function Bn(){return f((function(e,t){return e.write(t)}),arguments)}function Hn(e){return+e}function Wn(e){return BigInt.asUintN(64,e)}function Xn(e,t){const n="bigint"==typeof t?t:void 0;d().setBigInt64(e+8,m(n)?BigInt(0):n,!0),d().setInt32(e+0,!m(n),!0)}function Yn(e){return"boolean"==typeof e?e?1:0:2}function Zn(e){const t=e.original;return 1==t.cnt--&&(t.a=0,!0)}function $n(e,t,n){const a=function(e,t,n,a){const o={a:e,b:t,cnt:1,dtor:977},i=(...e)=>{o.cnt++;const t=o.a;o.a=0;try{return a(t,o.b,...e)}finally{0==--o.cnt?(r.__wbindgen_export_6.get(o.dtor)(t,o.b),h.unregister(o)):o.a=t}};return i.original=o,h.register(i,o,o),i}(e,t,0,I);return a}function Gn(e,t){const n=c(w(t),r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function Un(e,t){return new Error(p(e,t))}function qn(e,t){return e in t}function Vn(){const e=r.__wbindgen_export_4,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}function Jn(e){return"bigint"==typeof e}function Qn(e){return"function"==typeof e}function Kn(e){return"object"==typeof e&&null!==e}function er(e){return"string"==typeof e}function tr(e){return void 0===e}function nr(e,t){return e===t}function rr(e,t){return e==t}function ar(){return r.memory}function or(e,t){const n="number"==typeof t?t:void 0;d().setFloat64(e+8,m(n)?0:n,!0),d().setInt32(e+0,!m(n),!0)}function ir(e){return e}function lr(e,t){const n="string"==typeof t?t:void 0;var a=m(n)?0:c(n,r.__wbindgen_malloc,r.__wbindgen_realloc),i=o;d().setInt32(e+4,i,!0),d().setInt32(e+0,a,!0)}function sr(e,t){return p(e,t)}function _r(e,t){throw new Error(p(e,t))}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_themessettings_free(e>>>0,1)))},489:e=>{e.exports=require("fabric")},507:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.d(t,{wS:()=>l});var a=n(519),o=e([a]);async function i(e,t){if(t){const n="https://keadex.dev/api/download-gh-raw-file",r={headers:{"Keadex-Gh-Url":e}};return t&&(r.headers["Keadex-Gh-Authorization"]=t),await fetch(n,r)}return await fetch(e)}async function l(e,t,n){let r,o,l;try{r=(0,a._Cc)(e),o=(0,a.Llp)(e,t),l=(0,a.JD7)(e,t)}catch(e){throw console.error(e),new Error("Invalid URL: the provided URL is an invalid Mina project or diagram.")}if(r&&o&&l){let e,t,a;try{const s=await i(r,n),_=await i(o,n),c=await i(l,n);if(s.ok&&_.ok&&c.ok)return e=await s.text(),t=await _.text(),a=await c.text(),{projectSettingsJson:e,plantuml:t,spec:a};throw new Error}catch(e){throw console.error(e),new Error("Diagram or project settings not found. Please verify the URLs provided, or, if linking to a private repository, ensure the GitHub token is configured.")}}}a=(o.then?(await o)():o)[0],r()}catch(s){r(s)}}))},519:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.d(t,{JD7:()=>o.JD7,Llp:()=>o.Llp,Oxg:()=>o.Oxg,_Cc:()=>o._Cc,qjW:()=>o.qjW});var a=n(196),o=n(457),i=e([a]);a=(i.then?(await i)():i)[0],(0,o.lIU)(a),a.__wbindgen_start(),r()}catch(e){r(e)}}))},691:e=>{e.exports=require("ts-key-enum")},732:e=>{e.exports=require("react/jsx-runtime")},735:e=>{e.exports=require("react-hotkeys-hook")},764:(e,t,n)=>{n.d(t,{D:()=>rn});var r=n(416);const a=["TopToBottom","LeftToRight"],o=["https://","http://"];let i=function(e){return e.Alias="Alias",e}({});const l="object:modified",s="mouseup",_="modified",c="selected",u="deselected",d="#FFFFFF",g="#000000",p=12,b=10,f=20,m=20,h=120,w=20,y=10,v={SIZES:{DEFAULT_TOP:f+w,DEFAULT_LEFT:m+h+50,BORDER_WIDTH:1},FONT:{FAMILY:"Roboto"}},O={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:O.SIZES.MIN_HEIGHT/2-v.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:O.SIZES.WIDTH/2-v.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 x="rgba(0,0,0,0)",T="#828282",R="#404040",C="#ff8f26",I=10,D=10,k=3,L=3,N=9,A=1,j=2,F=90,M=40,P=45,z=10,B=10,H=150,W=80,X=10,Y={SIZES:{STROKE_DASH_ARRAY:[5,5]}},Z={'"dashed"':{name:'"dashed"',value:[8,5]}};var $=n(385),G=n(423),U=(n(452),n(779)),q=n(489);function V(e){try{return`Open Link ${new URL(e).host.replace("www.","")}`}catch(e){return"Open Link"}}function J(e){return`<${e.toString().toUpperCase()}>`}function Q(e,t=!0,n){var r,a,o,i;let l,s,_,c;return e.forEach((e=>{if(e.visible){const r=e.getBoundingRect(!1,!0),a=t?e.getBoundingRect(!0,!1):r;let o=a.left,i=a.top;if(n&&o&&i){const e=fabric.util.transformPoint(new fabric.Point(o,i),n);o=e.x,i=e.y}(void 0===l||o<l)&&(l=o),void 0!==o&&void 0!==r.width&&(void 0===s||o+r.width>s)&&(s=o+r.width),(void 0===c||void 0!==i&&i<c)&&(c=i),void 0!==i&&void 0!==r.height&&(void 0===_||r.height+i>_)&&(_=i+r.height)}})),{left:l,right:s,top:c,bottom:_,width:(null!=(r=s)?r:0)-(null!=(a=l)?a:0),height:(null!=(o=_)?o:0)-(null!=(i=c)?i:0)}}function K(e,t){let n=-1;return e&&(n=e.getObjects().indexOf(t)),-1!==n?n:void 0}function ee(e,t,n=Number.MAX_SAFE_INTEGER){let r=n;return t.forEach((t=>{const n=K(e,t);void 0!==n&&n<r&&(r=n)})),r!==Number.MAX_SAFE_INTEGER?r:void 0}function te(e,t=!0){let n=[];return e&&e.forEach((e=>{(e.visible||!e.visible&&t)&&n.push(e),e.children&&(n=n.concat(te(e.children,t)))})),n}function ne(e){let t=0,n=0;if(e){const r=e.viewportTransform;t=r?r[4]:0,n=r?r[5]:0}return{panX:t,panY:n}}function re(e){var t;const n=e.parent,r=function(e){let t=[];const n=new Set;if(e){let r=[];e.forEach((e=>{const t=e.getVirtualGroupRoot();t&&n.add(t)})),n.forEach((e=>{var t;r=r.concat(te(null!=(t=e.children)?t:[],!0))})),t=e.filter((e=>!r.includes(e)))}return{filteredObjects:t,virtualGroupsRoots:n}}(null==(t=e.canvas)?void 0:t.getActiveObjects());let a,o;if(r.filteredObjects.length>0||r.virtualGroupsRoots.size>1){let e=r.filteredObjects;r.virtualGroupsRoots.forEach((t=>{var n;return e=e.concat(te(null!=(n=t.children)?n:[],!1))})),a=e,o="multiple"}else{var i;a=te(null!=(i=null==n?void 0:n.children)?i:[],!1),o="single"}return{objects:a,type:o}}function ae(e,t){var n,r;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!=(r=null==t?void 0:t.map((e=>{var t;return null!=(t=e.name)?t:"undefined"})))?r:[]).sort().join(",")}q.fabric.ActiveSelection.prototype._controlsVisibility={tl:!0,tr:!0,br:!0,bl:!0,ml:!1,mt:!1,mr:!1,mb:!1,mtr:!1},q.fabric.Object.prototype.isVirtualGroupParent=function(){return void 0!==this.children&&this.children.length>0},q.fabric.Object.prototype.isVirtualGroupChild=function(){return void 0!==this.parent},q.fabric.Object.prototype.isVirtualGroupRoot=function(){return this.isVirtualGroupParent()&&void 0===this.parent},q.fabric.Object.prototype.isVirtualGroupLeaf=function(){return this.isVirtualGroupChild()&&!this.isVirtualGroupParent()},q.fabric.Object.prototype.isVirtualGroupBaseShape=function(){return this.isVirtualGroupChild()&&this.parent.children[0]===this},q.fabric.Object.prototype.getVirtualGroupRoot=function(){let e=this.parent;for(;e&&e.parent;)e=e.parent;return e};class oe extends q.fabric.Point{constructor(e,t,n){super(e,t),this.customType=void 0,this.data=void 0,this.customType=n}}class ie extends q.fabric.ActiveSelection{}const le=e=>"getUpdatedSpecs"in e;class se extends q.fabric.Group{constructor(e,t,n,r,a,o,i,l,_=!1){var c,u,d,g,p,b,f,m,h,w,y;super(a,Object.assign({data:{rawDiagramElementSpec:t,rawData:e,rawAutoLayout:r},name:null!=(c=n.alias)?c:"undefined",left:void 0!==(null==t||null==(u=t.position)?void 0:u.left)?null==t||null==(d=t.position)?void 0:d.left:null==(g=n.position)?void 0:g.left,top:void 0!==(null==t||null==(p=t.position)?void 0:p.top)?null==t||null==(b=t.position)?void 0:b.top:null==(f=n.position)?void 0:f.top,scaleX:void 0!==(null==t||null==(m=t.size)?void 0:m.scale_x)?null==t||null==(h=t.size)?void 0:h.scale_x:1,scaleY:void 0!==(null==t||null==(w=t.size)?void 0:w.scale_y)?null==t||null==(y=t.size)?void 0:y.scale_y:1},o)),this.parent=i,this.children=null!=l?l:[],this.setControlsVisibility({mb:!1,ml:!1,mr:!1,mt:!1,mtr:!1}),_||this.on(s,(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 r,a,o,i,l,s,_,c,u,d,g,p,b,f,m,h;const e=(0,$.mg)(n);return e.position={left:null!=(r=this.left)?r:null==(a=n.position)?void 0:a.left,top:null!=(o=this.top)?o:null==(i=n.position)?void 0:i.top,z_index:null!=(l=K(this.canvas,this))?l:null==(s=n.position)?void 0:s.z_index,angle:null!=(_=this.angle)?_:null==(c=n.position)?void 0:c.angle},e.size={width:null!=(u=this.width)?u:null==(d=n.size)?void 0:d.width,height:null!=(g=this.height)?g:null==(p=n.size)?void 0:p.height,scale_x:null!=(b=this.scaleX)?b:null==(f=n.size)?void 0:f.scale_x,scale_y:null!=(m=this.scaleY)?m:null==(h=n.size)?void 0:h.scale_y},e}}onComponentMouseUp(e,t,n,r){if(e)switch(t.e.preventDefault(),t.button){case 3:{e.setActiveObject(n),e.renderAll();const a=e.contextTop,o=q.fabric.util.getPointer(t.e,a.canvas),i=new CustomEvent(U.UW.CONTEXT_MENU,{detail:{sourceEvent:t,pageX:o.x,pageY:o.y,menuItems:null!=r?r:_e(e,t,n)}});document.dispatchEvent(i);break}}}}const _e=(e,t,n,r=!0)=>{var a,s,_,c;const u=[],d=n instanceof ie?n.parent:n,g=null==d?void 0:d.data,p=null==g||null==(a=g.rawDiagramElementSpec)?void 0:a.element_type,b=null==g||null==(s=g.rawData)||null==(s=s.base_data)||null==(s=s.link)?void 0:s.split(";"),f=e.isReadOnly(),m=e.codingFeaturesEnabled,h=void 0!==p&&b&&b.length>0&&void 0!==(ve(w=p)||me(w)||fe(w)||be(w));var w;let y=0,v=null==d?void 0:d.parent;for(;v;){var O;y++,v=null==(O=v)?void 0:O.parent}return h&&b.forEach(((t,n)=>{const r=t.replace(/ /gi,"");r.length>0&&(function(e){return o.some((t=>e.startsWith(t)))}(r)?u.push({isHeaderMenuItem:!1,id:`openLink${n}`,label:V(r),onClick:()=>{e.diagramListener&&e.diagramListener.onOpenExternalLinkClick(function(e,t){let n=`${e}`;for(const e in i){var r;e===i.Alias.toString()&&n.includes(J(i.Alias))&&null!=t&&null!=(r=t.base_data)&&r.alias&&(n=n.replace(new RegExp(J(i.Alias),"gi"),t.base_data.alias))}return n}(r,null==g?void 0:g.rawData))}}):u.push({isHeaderMenuItem:!1,id:"openDiagram",label:"Open Diagram",onClick:()=>{e.diagramListener&&e.diagramListener.onOpenDiagramClick(r)}}))})),m&&null!=g&&g.rawData&&null!=(_=g.rawDiagramElementSpec)&&_.element_type&&u.push({isHeaderMenuItem:!1,id:"selectDiagramElementCode",label:"Select code",onClick:()=>{var t;null!=(t=e.diagramListener)&&t.onSelectElementCode&&e.diagramListener.onSelectElementCode(g.rawData,g.rawDiagramElementSpec.element_type,y)}}),!f&&(h||m&&null!=g&&g.rawData&&null!=(c=g.rawDiagramElementSpec)&&c.element_type)&&u.push({id:"separatorCommon",isSepator:!0}),f||u.push({isHeaderMenuItem:!1,id:"bringToFront",label:"Bring to Front",onClick:()=>{var e;n.bringToFront(),null==(e=n.canvas)||e.fire(l)}},{isHeaderMenuItem:!1,id:"bringForward",label:"Bring Forward",onClick:()=>{var e;n.bringForward(),null==(e=n.canvas)||e.fire(l)}},{isHeaderMenuItem:!1,id:"sentToBack",label:"Send to Back",onClick:()=>ce(n)},{isHeaderMenuItem:!1,id:"sendBackwards",label:"Send Backwards",onClick:()=>ue(n)}),r?[{isHeaderMenuItem:!0,id:"baseComponentContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:u}]:u},ce=e=>{var t;e.parent||(e.sendToBack(),null==(t=e.canvas)||t.fire(l))},ue=e=>{if(e instanceof ie){var t,n,r;const o=e.parent,i=ee(e.canvas,null!=(t=null==o?void 0:o.children)?t:[]),s=ee(e.canvas,null!=(n=null==o||null==(r=o.parent)?void 0:r.children)?n:[]);var a;void 0===s||void 0===i||i-1>s?(e.sendBackwards(),null==(a=e.canvas)||a.fire(l)):console.debug(`cannot send backwards ${i} ${s}`)}else{var o,i;const t=K(e.canvas,e),n=ee(e.canvas,null!=(o=null==(i=e.parent)?void 0:i.children)?o:[]);var s;void 0===n||void 0===t||t-1>n?(e.sendBackwards(),null==(s=e.canvas)||s.fire(l)):console.debug(`cannot send backwards ${t} ${n}`)}},de=(e,t,n,r,a)=>ge(e,t,n,r,a.elements_specs)||pe(e,t,n,r),ge=(e,t,n,r,a)=>{for(let o=0;o<a.length;o++){const i=a[o],l=i.alias===e,s=(0,$.$r)(i.element_type,r);if(l&&s)return i;if(i.inner_specs){const a=i.inner_specs,o=ge(e,t,n,r,a);if(o)return o}}},pe=(e,t,n,r)=>({alias:e,from:t,to:n,element_type:r}),be=e=>{if("Boundary"in e)return e.Boundary},fe=e=>{if("Component"in e)return e.Component},me=e=>{if("Container"in e)return e.Container},he=e=>{if("DeploymentNode"in e)return e.DeploymentNode},we=e=>{if("Person"in e)return e.Person},ye=e=>{if("Relationship"in e)return e.Relationship},ve=e=>{if("SoftwareSystem"in e)return e.SoftwareSystem},Oe=(e,t)=>{var n,r,a;return e&&null!=(n=t[e])&&n.position?{left:null==(r=t[e].position)?void 0:r.x,top:null==(a=t[e].position)?void 0:a.y}:{left:v.SIZES.DEFAULT_LEFT,top:v.SIZES.DEFAULT_TOP}};function Se(e){return btoa(e)}const Ee="_margin_hack";function xe(e,t,n){return 2===n.length?n.map(((n,r)=>{const a=0===r?(0,$.qI)(e.x):(0,$.qI)(e.y),o=0===r?n:t-n;return(0,$.cr)(o,Te)+a})):n}const Te=96,Re=(0,$.wF)(v.SIZES.DEFAULT_LEFT),Ce=(0,$.wF)(v.SIZES.DEFAULT_TOP),Ie=4.5;function De(e){const t={x:O.SIZES.WIDTH,y:O.SIZES.MIN_HEIGHT+2*P},n={x:O.SIZES.WIDTH,y:O.SIZES.MIN_HEIGHT},r={x:O.SIZES.WIDTH+S.SIZES.WIDTH_TAIL+S.SIZES.WIDTH_HEAD,y:O.SIZES.MIN_HEIGHT},a={x:O.SIZES.WIDTH,y:O.SIZES.MIN_HEIGHT+E.SIZES.WIDTH_TOP+E.SIZES.WIDTH_BOTTOM};if(we(e))return t;if(ve(e)){const t=ve(e);return"SystemDb"===t.system_type||"SystemDb_Ext"===t.system_type?a:"SystemQueue"===t.system_type||"SystemQueue_Ext"===t.system_type?r:n}if(me(e)){const t=me(e);return"ContainerDb"===t.container_type||"ContainerDb_Ext"===t.container_type?a:"ContainerQueue"===t.container_type||"ContainerQueue_Ext"===t.container_type?r:n}if(fe(e)){const t=fe(e);return"ComponentDb"===t.component_type||"ComponentDb_Ext"===t.component_type?a:"ComponentQueue"===t.component_type||"ComponentQueue_Ext"===t.component_type?r:n}return{x:100,y:100}}function ke(e,t,n,r,a){return`\n subgraph "${o=e,`${o}${Ee}`}" {\n cluster=true\n margin="${a}"\n fontsize="0pt"\n label=""\n subgraph "${e}" {\n cluster=true\n margin="${r}"\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 ${Le(t,n,r,a)}\n }\n }\n `;var o}function Le(e,t,n,r){let a="";for(const l of e){const e=De(l);let s;if(we(l))s=we(l).base_data.alias;else if(ve(l))s=ve(l).base_data.alias;else if(me(l))s=me(l).base_data.alias;else if(fe(l))s=fe(l).base_data.alias;else if(be(l)){const e=be(l);s=e.base_data.alias,s&&(t.add(s),a=a.concat(ke(s,e.sub_elements,t,n,r))),s=void 0}else if(he(l)){const e=he(l);s=e.base_data.alias,s&&(t.add(s),a=a.concat(ke(s,e.sub_elements,t,n,r))),s=void 0}else if(ye(l)){const e=ye(l);var o,i;e.from&&e.to&&(a=a.concat(`\n"${e.from}" -> "${e.to}" [name="${e.base_data.alias}", xlabel="${(0,$.l)([null!=(o=e.base_data.label)?o:"",null!=(i=e.technology)?i:""])}", ltail="${e.from}", lhead="${e.to}", fontsize="${I}", keadex_fromissubgraph=${t.has(e.from)}, keadex_toissubgraph=${t.has(e.to)}]`)),s=void 0}s&&(a=a.concat(`\n"${s}" [width=${(0,$.wF)(e.x,Te)}, height=${(0,$.wF)(e.y,Te)}, peripheries=2]`))}return a}const Ne=require("@hpcc-js/wasm-graphviz"),Ae=require("react-toastify");function je(e){if(e)return Z[e]}const Fe="legend",Me=(e,t,n,r,a,o)=>{var i,l,s;const _=[],c=n?1:0,u=new q.fabric.Rect({fill:t,stroke:n,strokeWidth:c,strokeDashArray:r,left:m,top:f+w*o,width:h-c,height:w-c});_.push(u);const d=new q.fabric.Text(e,{fill:a,fontFamily:v.FONT.FAMILY,fontSize:b,fontWeight:"normal",textAlign:"left",originX:"left",originY:"top",left:m+y});return d.top=(null!=(i=u.top)?i:0)+(null!=(l=u.height)?l:0)/2-(null!=(s=d.height)?s:0)/2,_.push(d),_},Pe=(e,t)=>{var n,r,a,o,i,l,s,_,c,u,d,b,h,w,y,S,E,x,T,R,C,I,D,k,L,N,A,j,F,M,P,z,B,H;let W=[];const X=new q.fabric.Text("LEGEND",{fill:g,fontFamily:v.FONT.FAMILY,fontSize:p,fontWeight:"bold",textAlign:"left",originX:"left",originY:"top",left:m,top:f});W.push(X),W=W.concat(Me("Person",null!=(n=null==t||null==(r=t.diagramsThemeSettings)?void 0:r.bg_color_person)?n:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,void 0,void 0,null!=(a=null==t||null==(o=t.diagramsThemeSettings)?void 0:o.text_color_person)?a:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON,1)),W=W.concat(Me("Person External",null!=(i=null==t||null==(l=t.diagramsThemeSettings)?void 0:l.bg_color_person_ext)?i:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,void 0,void 0,null!=(s=null==t||null==(_=t.diagramsThemeSettings)?void 0:_.text_color_person_ext)?s:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,2)),W=W.concat(Me("System",null!=(c=null==t||null==(u=t.diagramsThemeSettings)?void 0:u.bg_color_software_system)?c:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,void 0,void 0,null!=(d=null==t||null==(b=t.diagramsThemeSettings)?void 0:b.text_color_software_system)?d:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON,3)),W=W.concat(Me("System External",null!=(h=null==t||null==(w=t.diagramsThemeSettings)?void 0:w.bg_color_software_system_ext)?h:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,void 0,void 0,null!=(y=null==t||null==(S=t.diagramsThemeSettings)?void 0:S.text_color_software_system_ext)?y:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,4)),W=W.concat(Me("Container",null!=(E=null==t||null==(x=t.diagramsThemeSettings)?void 0:x.bg_color_container)?E:O.COLORS.BG_COLOR_CONTAINER,void 0,void 0,null!=(T=null==t||null==(R=t.diagramsThemeSettings)?void 0:R.text_color_container)?T:O.COLORS.TEXT_COLOR_CONTAINER,5)),W=W.concat(Me("Container External",null!=(C=null==t||null==(I=t.diagramsThemeSettings)?void 0:I.bg_color_container_ext)?C:O.COLORS.BG_COLOR_CONTAINER_EXT,void 0,void 0,null!=(D=null==t||null==(k=t.diagramsThemeSettings)?void 0:k.text_color_container_ext)?D:O.COLORS.TEXT_COLOR_CONTAINER_EXT,6)),W=W.concat(Me("Component",null!=(L=null==t||null==(N=t.diagramsThemeSettings)?void 0:N.bg_color_component)?L:O.COLORS.BG_COLOR_COMPONENT,void 0,void 0,null!=(A=null==t||null==(j=t.diagramsThemeSettings)?void 0:j.text_color_component)?A:O.COLORS.TEXT_COLOR_COMPONENT,7)),W=W.concat(Me("Component External",null!=(F=null==t||null==(M=t.diagramsThemeSettings)?void 0:M.bg_color_component_ext)?F:O.COLORS.BG_COLOR_COMPONENT_EXT,void 0,void 0,null!=(P=null==t||null==(z=t.diagramsThemeSettings)?void 0:z.text_color_component_ext)?P:O.COLORS.TEXT_COLOR_COMPONENT_EXT,8));let Y=8;var Z,$,G,U;null!=t&&null!=(B=t.diagramsThemeSettings)&&B.bg_color_boundary&&(Y++,W=W.concat(Me("Boundary",t.diagramsThemeSettings.bg_color_boundary,void 0,void 0,null!=(Z=null==t||null==($=t.diagramsThemeSettings)?void 0:$.text_color_boundary)?Z:O.COLORS.TEXT_COLOR_BOUNDARY,Y))),null!=t&&null!=(H=t.diagramsThemeSettings)&&H.bg_color_deployment_node&&(Y++,W=W.concat(Me("Deployment Node",t.diagramsThemeSettings.bg_color_deployment_node,void 0,void 0,null!=(G=null==t||null==(U=t.diagramsThemeSettings)?void 0:U.text_color_deployment_node)?G:O.COLORS.TEXT_COLOR_DEPLOYMENT_NODE,Y))),null!=t&&t.tags&&Object.entries(t.tags).forEach((([e,t],n)=>{var r,a,o,i,l;Y++,W=W.concat(Me(null!=(r=null!=(a=t.legend_text)?a:t.tag)?r:"<no tag>",t.bg_color,null!=(o=t.border_color)?o:t.bg_color?void 0:"black",null==(i=je(t.border_style))?void 0:i.value,null!=(l=t.font_color)?l:"black",Y))}));return new se(void 0,e,{alias:Fe,position:{left:m,top:f}},{},W)},ze="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.",Be="Graphviz not initialized. Cannot generate auto layout.",He="triangulation failed";var We=n(177);function Xe(e){return null==e?void 0:e.split("+")}function Ye(e,t){if(e&&t){const n=[];for(const r of e){const e=t[Se(r)];e&&n.push(e)}if(n.length>0)return Object.assign({},...n)}}let Ze=function(e){return e.Rectangle="RECTANGLE",e.Footer="FOOTER",e}({});class $e extends se{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(le(t)){const n=t.getUpdatedSpecs();n&&e.inner_specs.push(n)}else if(t.name!==Ze.Footer){var n,r;e.shapes.push({position:{left:t.left,top:t.top,z_index:K(t.canvas,t)},size:{scale_x:null!=(n=t.scaleX)?n:1,scale_y:null!=(r=t.scaleY)?r:1},shape_type:t.name})}else e.shapes.push({position:{z_index:K(t.canvas,t)},shape_type:t.name});return e}}const Ge=e=>{var t,n,r,a,o,i,l,s,_,c,u;let d,g;const p=(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],b=[];null==(n=e.children)||n.forEach((e=>{e.name===Ze.Footer?g=e:e.name===Ze.Rectangle?d=e:b.push(e)}));const f=Q(te(b),!1),m=null!=(r=null==(a=d)?void 0:a.scaleX)?r:1,h=null!=(o=null==(i=d)?void 0:i.scaleY)?o:1,w=null!=(l=null==(s=d)||null==(s=s.canvas)?void 0:s.getZoom())?l:1,y=ne(e.canvas),v=X*m,O=X*h,S=X*m,E=X*h;var x;d&&void 0!==f.left&&void 0!==f.right&&void 0!==f.top&&void 0!==f.bottom&&void 0!==f.width&&void 0!==f.height&&void 0!==g?(f.left=(f.left-y.panX)/w,f.top=(f.top-y.panY)/w,f.right=(f.right-y.panX)/w,f.bottom=(f.bottom-y.panY)/w,f.width=f.right-f.left,f.height=f.bottom-f.top,p||(d.width=f.width/m+v/m*2,d.height=f.height/h+O/h*3+(null!=(x=g.height)?x:0),d.left=f.left-v,d.top=f.top-O)):d&&void 0!==g&&(d.width=H,d.height=W+g.getScaledHeight()),null==(_=e.canvas)||_.renderAll(),d&&g&&void 0!==d.left&&void 0!==d.top&&void 0!==d.height&&void 0!==g.height&&(g.top=d.top+d.getScaledHeight()-g.getScaledHeight()-E,g.left=d.left+S),null==(c=d)||c.setCoords(),null==(u=g)||u.setCoords()},Ue=e=>{e.on(c,(t=>{Ve(t,e)}))},qe=e=>{e.on(c,(t=>{Ve(t,e)}))},Ve=(e,t)=>{var n;if(e.e&&null!=(n=t.parent)&&n.children){var r;const e=re(t);if(!ae(null==(r=t.canvas)?void 0:r.getActiveObjects(),e.objects)){var a,o,i;null==(a=t.canvas)||a.discardActiveObject();const n=t.parent;let r;"multiple"===e.type?r=new q.fabric.ActiveSelection(e.objects,{canvas:t.canvas}):(r=new ie(e.objects,{canvas:t.canvas}),r.parent=n,r.on(s,(e=>{Qe(r.canvas,e,r,n)})),r.on(_,(e=>{var r;null==(r=t.canvas)||r.discardActiveObject(),n.fire(_)}))),null==(o=t.canvas)||o.setActiveObject(r),null==(i=t.canvas)||i.requestRenderAll()}}},Je=(e,t)=>{e&&t&&Ge(e)},Qe=(e,t,n,r)=>{n instanceof q.fabric.ActiveSelection&&e&&r.onComponentMouseUp(e,t,n,((e,t,n)=>n instanceof q.fabric.ActiveSelection?[{isHeaderMenuItem:!0,id:"baseElasticContainerContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:[..._e(e,t,n,!1)]}]:[])(e,t,n))},Ke=(e,t,n,r,a,o)=>{var i,l;const s=Ye(Xe(null==(i=e.base_data)?void 0:i.tags),null==o?void 0:o.tags),c={alias:null==(l=e.base_data)?void 0:l.alias},u=new $e(e,t,c,r,[],void 0,void 0,void 0,!0);u.visible=!1;const d=((e,t,n,r,a)=>{var o,i,l,s,_,c,u,d,g,p,b,f;const m=null==e||null==(o=e.shapes)?void 0:o.filter((e=>e.shape_type===Ze.Rectangle))[0],h=new q.fabric.Rect({fill:null!=(i=null==a?void 0:a.bg_color)?i:n.bgColor,stroke:null!=(l=null==a?void 0:a.border_color)?l:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,strokeDashArray:n.strokeDashArray,left:null!=(s=null==m||null==(_=m.position)?void 0:_.left)?s:Oe(e.alias,t).left,top:null!=(c=null==m||null==(u=m.position)?void 0:u.top)?c:Oe(e.alias,t).top,name:Ze.Rectangle,rx:O.SIZES.BORDER_RADIUS,ry:O.SIZES.BORDER_RADIUS,scaleX:null!=(d=null==m||null==(g=m.size)?void 0:g.scale_x)?d:1,scaleY:null!=(p=null==m||null==(b=m.size)?void 0:b.scale_y)?p:1}),w=((e,t)=>{var n,r,a;if(e&&null!=(n=t[e])&&n.size)return{width:null==(r=t[e].size)?void 0:r.x,height:null==(a=t[e].size)?void 0:a.y}})(e.alias,t);return w&&(h.width=w.width,h.height=w.height),h.data={rawDiagramElementSpec:m},h.parent=r,Ue(h),null==(f=r.children)||f.push(h),h})(t,r,a,u,s);((e,t,n,r,a,o,i)=>{var l,s,_,c,u,d,g,p,b,f,m;const h=null==e||null==(l=e.shapes)?void 0:l.filter((e=>e.shape_type===Ze.Footer))[0],w=[],y={fontFamily:v.FONT.FAMILY,fill:null!=(s=null==i?void 0:i.font_color)?s:n.textColor};let O;var S;let E;var x,T;null!=(_=r.base_data)&&_.link&&(O=new q.fabric.Path(We.faLink.icon[4].toString(),{fill:null!=(S=null==i?void 0:i.font_color)?S:n.textColor,opacity:1,originX:"left",originY:"top",top:1,left:0}),O.scaleToWidth(10),w.push(O)),null!=(c=r.base_data)&&c.label&&(E=new q.fabric.Text(r.base_data.label,Object.assign({},y,{fontSize:z,fontWeight:"bold"})),E.top=0,E.left=null!=(x=O)&&x.getScaledWidth()?(null==(T=O)?void 0:T.getScaledWidth())+3:0,w.push(E));let R=null!=(u=null!=(d=r.boundary_type)?d:r.deployment_node_type)?u:"";R=null!=(g=null!=(p=r.boundary_custom_type)?p:r.deploymeny_node_custom_type)?g:R,R+=r.technology?`: ${r.technology}`:"",R=`[${R}]`;const C=new q.fabric.Text(R,Object.assign({},y,{fontSize:B,left:0,top:null!=(b=null==(f=E)?void 0:f.height)?b:0}));w.push(C);const I=new q.fabric.Group(w,{name:Ze.Footer,selectable:!1,evented:!1,left:a.left,top:a.top,scaleX:a.scaleX,scaleY:a.scaleY});I.data={rawDiagramElementSpec:h},I.parent=o,qe(I),null==(m=o.children)||m.push(I)})(t,0,a,e,d,u,s);let g=[];return e.sub_elements&&(g=Nt(void 0,e.sub_elements,n,r,Object.assign({},o,{skipAddToCanvas:!0,skipLegendRendering:!0})),g.forEach((e=>{var t;e.parent=u,null==(t=u.children)||t.push(e)}))),Ge(u),(e=>{var t;null==(t=e.children)||t.forEach((t=>{t.on(_,(t=>{Je(e,t)})),t.children&&t.children.forEach((t=>{t.on(_,(t=>{Je(e,t)}))}))}))})(u),u},et=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.base_data.label&&t.boundary_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){var o;const i=((e,t,n,r,a,o)=>{var i,l,s,_,c,u;const d={bgColor:null!=(i=null==o||null==(l=o.diagramsThemeSettings)?void 0:l.bg_color_boundary)?i:O.COLORS.BG_COLOR_BOUNDARY,borderColor:null!=(s=null==o||null==(_=o.diagramsThemeSettings)?void 0:_.border_color_boundary)?s:O.COLORS.BORDER_COLOR_BOUNDARY,textColor:null!=(c=null==o||null==(u=o.diagramsThemeSettings)?void 0:u.text_color_boundary)?c:O.COLORS.TEXT_COLOR_BOUNDARY,strokeDashArray:Y.SIZES.STROKE_DASH_ARRAY},g=Object.assign({},d,a);return Ke(e,t,n,r,g,o)})(t,de(t.base_data.alias,void 0,void 0,{Boundary:t.boundary_type},n),n,r,void 0,a);return a&&a.skipAddToCanvas||!i||null==e||e.add(i,...te(null!=(o=i.children)?o:[])),i}},tt=(e,t,n,r,a)=>{var o,i,l,s,_,c;const u=Ye(Xe(null==(o=e.base_data)?void 0:o.tags),null==a?void 0:a.tags),d=[],g=((e,t,n)=>{var r,a,o,i,l,s,_;const c=new q.fabric.Rect({fill:null!=(r=null==n?void 0:n.bg_color)?r:t.bgColor,stroke:null!=(a=null==n?void 0:n.border_color)?a:t.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,left:v.SIZES.DEFAULT_LEFT,top:v.SIZES.DEFAULT_TOP,width:null!=(o=t.widthBox)?o:O.SIZES.WIDTH,height:O.SIZES.MIN_HEIGHT,name:null!=(i=null==(l=e.base_data)?void 0:l.alias)?i:"undefined",rx:null!=(s=t.borderRadius)?s:O.SIZES.BORDER_RADIUS,ry:null!=(_=t.borderRadius)?_:O.SIZES.BORDER_RADIUS});return c.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})})),c})(e,r,u);let p;d.push(g),null!=(i=e.base_data)&&i.tags&&(p=((e,t,n,r)=>{var a,o,i,l,s;return new q.fabric.Text(`«${null==(a=t.base_data)?void 0:a.tags}»`,{fill:null!=(o=null==r?void 0:r.font_color)?o:n.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE_TAG,fontStyle:"italic",fontWeight:"normal",textAlign:"center",originX:"center",originY:"top",left:(null!=(i=e.left)?i:v.SIZES.DEFAULT_LEFT)+(null!=(l=e.width)?l:0)/2,top:(null!=(s=e.top)?s:v.SIZES.DEFAULT_TOP)+O.SIZES.TOP_TAGS})})(g,e,r,u),d.push(p));const b=((e,t,n,r,a)=>{var o,i,l,s,_,c;return new q.fabric.Text(null!=(o=(0,$.x4)(null==(i=n.base_data)?void 0:i.label))?o:"undefined",{fill:null!=(l=null==a?void 0:a.font_color)?l:r.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE,fontWeight:"bold",textAlign:"center",originX:"center",originY:"top",left:(null!=(s=e.left)?s:v.SIZES.DEFAULT_LEFT)+(null!=(_=e.width)?_:0)/2,top:(null!=(c=null==t?void 0:t.top)?c:v.SIZES.DEFAULT_TOP)+O.SIZES.TOP_LABEL})})(g,p,e,r,u);d.push(b);const f=((e,t,n,r,a)=>{var o,i,l,s,_,c,u,d,g,p,b,f;const m=`[${null!=(o=null!=(i=null!=(l=null!=(s=null!=(_=null!=(c=null!=(u=n.boundary_custom_type)?u:n.boundary_type)?c:n.component_type)?_:n.container_type)?s:n.deployment_node_type)?l:n.deploymeny_node_custom_type)?i:n.person_type)?o:n.system_type}${n.technology?`: ${n.technology}`:""}]`;return new q.fabric.Text(m,{fill:null!=(d=null==a?void 0:a.font_color)?d:r.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE_TYPE_TECHNOLOGY,fontWeight:"normal",textAlign:"center",originX:"center",originY:"top",left:(null!=(g=e.left)?g:v.SIZES.DEFAULT_LEFT)+(null!=(p=e.width)?p:0)/2,top:(null!=(b=null==t?void 0:t.top)?b:v.SIZES.DEFAULT_TOP)+O.SIZES.TOP_TYPE_TECHNOLOGY+(null!=(f=null==t?void 0:t.height)?f:0)})})(g,b,e,r,u);let m;d.push(f),null!=(l=e.base_data)&&l.description&&(m=((e,t,n,r,a)=>{var o,i,l,s,_,c,u;const d=null!=(o=r.widthDescription)?o:e.width;return new q.fabric.Textbox(null!=(i=(0,$.x4)(null==(l=n.base_data)?void 0:l.description))?i:"",{fill:null!=(s=null==a?void 0:a.font_color)?s:r.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE_DESCRIPTION,fontWeight:400,opacity:.7,splitByGrapheme:!0,width:d?d-O.SIZES.PADDING_Y_DESCRIPTION:0,textAlign:"center",originX:"center",originY:"top",left:(null!=(_=e.left)?_:v.SIZES.DEFAULT_LEFT)+(null!=(c=e.width)?c:0)/2,top:(null!=(u=null==t?void 0:t.top)?u:0)+O.SIZES.TOP_DESCRIPTION})})(g,f,e,r,u),d.push(m)),null!=(s=e.base_data)&&s.link&&d.push(((e,t,n)=>{var r,a,o;const i=new q.fabric.Path(We.faLink.icon[4].toString(),{fill:null!=(r=null==n?void 0:n.font_color)?r:t.textColor,opacity:1,originX:"left",originY:"top",left:(null!=(a=e.left)?a:0)+5,top:(null!=(o=e.top)?o:0)+5});return i.scaleToWidth(10),i})(g,r,u)),((e,t)=>{var n,r,a;let o=(null!=(n=null==t?void 0:t.height)?n:0)+((null!=(r=null==t?void 0:t.top)?r:0)-(null!=(a=null==e?void 0:e.top)?a:0))+O.SIZES.PADDING_BOTTOM;o<O.SIZES.MIN_HEIGHT&&(o=O.SIZES.MIN_HEIGHT),e.height=o})(g,m);const h={alias:null==(_=e.base_data)?void 0:_.alias,position:Oe(null==(c=e.base_data)?void 0:c.alias,n)};return new se(e,t,h,n,d)},nt=(e,t,n,r,a)=>{var o,i,l,s;const _=Ye(Xe(null==(o=e.base_data)?void 0:o.tags),null==a?void 0:a.tags),c=[],u=((e,t,n)=>{const r=Object.assign({},t,{borderRadius:0});return tt(e,{},{},r,n)})(e,r,a);c.push(u);const d=(null!=(i=u.width)?i:0)/2-v.SIZES.BORDER_WIDTH/2;c.push(((e,t,n,r)=>{var a,o,i,l,s,_,c,u,d,g,p,b,f,m,h,w,y,O,S,x,T,R;const C=[],I=v.SIZES.BORDER_WIDTH,D=E.SIZES.TOP_BOX_HEIGHT,k=new q.fabric.Rect({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,strokeWidth:0,left:(null!=(o=e.left)?o:0)+v.SIZES.BORDER_WIDTH,top:(null!=(i=e.top)?i:0)-D+I,width:(null!=(l=e.width)?l:0)-2*v.SIZES.BORDER_WIDTH,height:D});return C.push(k),C.push(new q.fabric.Line([null!=(s=e.left)?s:0,null!=(_=e.top)?_:0,null!=(c=e.left)?c:0,null!=(u=k.top)?u:0],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(d=null==r?void 0:r.border_color)?d:n.borderColor,originX:"left",originY:"top"})),C.push(new q.fabric.Line([(null!=(g=e.left)?g:0)+(null!=(p=e.width)?p:0)-v.SIZES.BORDER_WIDTH,null!=(b=e.top)?b:0,(null!=(f=e.left)?f:0)+(null!=(m=e.width)?m:0)-v.SIZES.BORDER_WIDTH,null!=(h=k.top)?h:0],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(w=null==r?void 0:r.border_color)?w:n.borderColor,originX:"left",originY:"top"})),C.push(new q.fabric.Circle({fill:null!=(y=null==r?void 0:r.bg_color)?y:n.bgColor,stroke:null!=(O=null==r?void 0:r.border_color)?O:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,radius:t,top:(null!=(S=k.top)?S:0)-(null!=(x=e.width)?x:0)*E.SIZES.SCALE_X_TOP_BOTTOM/2,left:(null!=(T=k.left)?T:0)+ +(null!=(R=e.width)?R:0)-I,angle:90,startAngle:0,endAngle:360,scaleX:E.SIZES.SCALE_X_TOP_BOTTOM})),new q.fabric.Group(C)})(u,d,r,_)),c.push(((e,t,n,r)=>{var a,o,i,l,s,_;return new q.fabric.Circle({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,stroke:null!=(o=null==r?void 0:r.border_color)?o:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,radius:t,top:(null!=(i=e.top)?i:0)+(null!=(l=e.height)?l:0)-2*t*E.SIZES.SCALE_X_TOP_BOTTOM/2-v.SIZES.BORDER_WIDTH,left:(null!=(s=e.left)?s:0)+(null!=(_=e.width)?_:0),angle:90,startAngle:270,endAngle:90,scaleX:E.SIZES.SCALE_X_TOP_BOTTOM})})(u,d,r,_));const g={alias:null==(l=e.base_data)?void 0:l.alias,position:Oe(null==(s=e.base_data)?void 0:s.alias,n)};return new se(e,t,g,n,c)},rt=(e,t,n,r,a)=>{var o,i,l,s;const _=Ye(Xe(null==(o=e.base_data)?void 0:o.tags),null==a?void 0:a.tags),c=[],u=at(e,r,a);c.push(u);const d=(null!=(i=u.height)?i:0)/2-v.SIZES.BORDER_WIDTH/2;c.push(ot(u,d,r,_)),c.push(it(u,d,r,_));const g={alias:null==(l=e.base_data)?void 0:l.alias,position:Oe(null==(s=e.base_data)?void 0:s.alias,n)};return new se(e,t,g,n,c)},at=(e,t,n)=>{const r=Object.assign({},t,{borderRadius:0});return tt(e,{},{},r,n)},ot=(e,t,n,r)=>{var a,o,i;return new q.fabric.Circle({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,stroke:null!=(o=null==r?void 0:r.border_color)?o:n.borderColor,strokeWidth:v.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*v.SIZES.BORDER_WIDTH,angle:90,startAngle:0,endAngle:180,scaleY:S.SIZES.SCALE_Y_TAIL_HEAD})},it=(e,t,n,r)=>{var a,o,i,l,s,_,c,u,d,g,p,b,f,m,h,w,y,O,E,x,T,R,C,I;const D=[],k=v.SIZES.BORDER_WIDTH,L=new q.fabric.Rect({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,strokeWidth:0,left:(null!=(o=e.left)?o:0)+(null!=(i=e.width)?i:0)-k,top:(null!=(l=e.top)?l:0)+v.SIZES.BORDER_WIDTH,width:S.SIZES.HEAD_BOX_WIDTH,height:(null!=(s=e.height)?s:0)-2*v.SIZES.BORDER_WIDTH});return D.push(L),D.push(new q.fabric.Line([null!=(_=L.left)?_:0,null!=(c=e.top)?c:0,(null!=(u=L.left)?u:0)+(null!=(d=L.width)?d:0),null!=(g=e.top)?g:0],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(p=null==r?void 0:r.border_color)?p:n.borderColor,originX:"left",originY:"top"})),D.push(new q.fabric.Line([null!=(b=L.left)?b:0,(null!=(f=L.top)?f:0)+(null!=(m=L.height)?m:0),(null!=(h=L.left)?h:0)+(null!=(w=L.width)?w:0),(null!=(y=L.top)?y:0)+(null!=(O=L.height)?O:0)],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(E=null==r?void 0:r.border_color)?E:n.borderColor,originX:"left",originY:"top"})),D.push(new q.fabric.Circle({fill:null!=(x=null==r?void 0:r.bg_color)?x:n.bgColor,stroke:null!=(T=null==r?void 0:r.border_color)?T:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,radius:t,top:e.top,left:(null!=(R=L.left)?R:0)+(null!=(C=L.width)?C:0)+(null!=(I=e.height)?I:0)*S.SIZES.SCALE_Y_TAIL_HEAD/2-k,angle:90,startAngle:0,endAngle:360,scaleY:S.SIZES.SCALE_Y_TAIL_HEAD})),new q.fabric.Group(D)},lt=rt,st=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.component_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.component_type){case"Component":case"ComponentDb":case"ComponentQueue":o=((e,t,n,r,a)=>{var o,i,l,s,_,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_component)?o:O.COLORS.BG_COLOR_COMPONENT,borderColor:null!=(l=null==a||null==(s=a.diagramsThemeSettings)?void 0:s.border_color_component)?l:O.COLORS.BORDER_COLOR_COMPONENT,textColor:null!=(_=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_component)?_:O.COLORS.TEXT_COLOR_COMPONENT},d=Object.assign({},u,r);if(e.component_type)switch(e.component_type){case"Component":return tt(e,t,n,d,a);case"ComponentDb":return nt(e,t,n,d,a);case"ComponentQueue":return lt(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Component:t.component_type},n),r,void 0,a);break;case"Component_Ext":case"ComponentDb_Ext":case"ComponentQueue_Ext":o=((e,t,n,r,a)=>{var o,i,l,s,_,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_component_ext)?o:O.COLORS.BG_COLOR_COMPONENT_EXT,borderColor:null!=(l=null==a||null==(s=a.diagramsThemeSettings)?void 0:s.border_color_component_ext)?l:O.COLORS.BORDER_COLOR_COMPONENT_EXT,textColor:null!=(_=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_component_ext)?_:O.COLORS.TEXT_COLOR_COMPONENT_EXT},d=Object.assign({},u,r);if(e.component_type)switch(e.component_type){case"Component_Ext":return tt(e,t,n,d,a);case"ComponentDb_Ext":return nt(e,t,n,d,a);case"ComponentQueue_Ext":return lt(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Component:t.component_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}},_t=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.container_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.container_type){case"Container":case"ContainerDb":case"ContainerQueue":o=((e,t,n,r,a)=>{var o,i,l,s,_,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_container)?o:O.COLORS.BG_COLOR_CONTAINER,borderColor:null!=(l=null==a||null==(s=a.diagramsThemeSettings)?void 0:s.border_color_container)?l:O.COLORS.BORDER_COLOR_CONTAINER,textColor:null!=(_=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_container)?_:O.COLORS.TEXT_COLOR_CONTAINER},d=Object.assign({},u,r);if(e.container_type)switch(e.container_type){case"Container":return tt(e,t,n,d,a);case"ContainerDb":return nt(e,t,n,d,a);case"ContainerQueue":return rt(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Container:t.container_type},n),r,void 0,a);break;case"Container_Ext":case"ContainerDb_Ext":case"ContainerQueue_Ext":o=((e,t,n,r,a)=>{var o,i,l,s,_,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_container_ext)?o:O.COLORS.BG_COLOR_CONTAINER_EXT,borderColor:null!=(l=null==a||null==(s=a.diagramsThemeSettings)?void 0:s.border_color_container_ext)?l:O.COLORS.BORDER_COLOR_CONTAINER_EXT,textColor:null!=(_=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_container_ext)?_:O.COLORS.TEXT_COLOR_CONTAINER_EXT},d=Object.assign({},u,r);if(e.container_type)switch(e.container_type){case"Container_Ext":return tt(e,t,n,d,a);case"ContainerDb_Ext":return nt(e,t,n,d,a);case"ContainerQueue_Ext":return lt(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Container:t.container_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}},ct=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.base_data.label&&t.deployment_node_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){var o;const i=((e,t,n,r,a,o)=>{var i,l,s,_,c,u;const d={bgColor:null!=(i=null==o||null==(l=o.diagramsThemeSettings)?void 0:l.bg_color_deployment_node)?i:O.COLORS.BG_COLOR_DEPLOYMENT_NODE,borderColor:null!=(s=null==o||null==(_=o.diagramsThemeSettings)?void 0:_.border_color_deployment_node)?s:O.COLORS.BORDER_COLOR_DEPLOYMENT_NODE,textColor:null!=(c=null==o||null==(u=o.diagramsThemeSettings)?void 0:u.text_color_deployment_node)?c:O.COLORS.TEXT_COLOR_DEPLOYMENT_NODE},g=Object.assign({},d,a);return Ke(e,t,n,r,g,o)})(t,de(t.base_data.alias,void 0,void 0,{DeploymentNode:t.deployment_node_type},n),n,r,void 0,a);return a&&a.skipAddToCanvas||!i||null==e||e.add(i,...te(null!=(o=i.children)?o:[])),i}},ut=(e,t,n,r,a)=>{var o,i;const l=[],s=((e,t,n)=>{const r=Object.assign({},t,{borderRadius:M});return tt(e,{},{},r,n)})(e,r,a);l.push(s);const _=((e,t)=>{var n,r,a,o,i;const l=new q.fabric.Circle({radius:P,top:t.top,left:t.left,fill:e.bgColor,stroke:e.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH});return l.left=(null!=(n=l.left)?n:0)+(null!=(r=t.getScaledWidth())?r:0)/2-(null!=(a=l.getScaledWidth())?a:0)/2,l.top=(null!=(o=l.top)?o:0)-(null!=(i=l.getScaledWidth())?i:0)+5,l})(r,s);l.push(_);const c={alias:null==(o=e.base_data)?void 0:o.alias,position:Oe(null==(i=e.base_data)?void 0:i.alias,n)};return new se(e,t,c,n,l)},dt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.person_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.person_type){case"Person":o=((e,t,n,r,a)=>{var o,i,l,s,_,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_person)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,borderColor:null!=(l=null==a||null==(s=a.diagramsThemeSettings)?void 0:s.border_color_person)?l:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON,textColor:null!=(_=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_person)?_:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON},d=Object.assign({},u,r);return ut(e,t,n,d,a)})(t,de(t.base_data.alias,void 0,void 0,{Person:t.person_type},n),r,void 0,a);break;case"Person_Ext":o=((e,t,n,r,a)=>{var o,i,l,s,_,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_person_ext)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,borderColor:null!=(l=null==a||null==(s=a.diagramsThemeSettings)?void 0:s.border_color_person_ext)?l:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,textColor:null!=(_=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_person_ext)?_:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT},d=Object.assign({},u,r);return ut(e,t,n,d,a)})(t,de(t.base_data.alias,void 0,void 0,{Person:t.person_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}};let gt=function(e){return e.Dot="DOT",e.Line="LINE",e.Text="TEXT",e.Triangle="TRIANGLE",e.Rectangle="RECTANGLE",e}({});class pt extends se{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=q.fabric.util.object.clone(t);if(n.name===gt.Line||n.name===gt.Rectangle)e.shapes.push({position:{z_index:K(n.canvas,n)},shape_type:n.name});else{var r,a;let t=0,o=0;const i=n.angle;if(n.name===gt.Text)t=n.getCenterPoint().x,o=n.getCenterPoint().y;else if(n.name===gt.Dot||n.name===gt.Triangle){n.name===gt.Triangle&&n.rotate(F);const e=wt(this.canvas,n.left,n.top,n.name===gt.Triangle,i,n.scaleX,n.scaleY,!0);t=e.left,o=e.top}const l={position:{left:t,top:o,z_index:K(n.canvas,n)},size:{scale_x:null!=(r=n.scaleX)?r:1,scale_y:null!=(a=n.scaleY)?a:1},shape_type:n.name};n.name===gt.Triangle&&(l.position.angle=i),e.shapes.push(l)}}))),e}}const bt=e=>{var t;e.children=null==(t=e.children)?void 0:t.sort(((e,t)=>e.name===gt.Rectangle||e.name===gt.Line&&t.name!==gt.Rectangle?-1:t.name===gt.Rectangle||e.name!==gt.Rectangle&&t.name===gt.Line?1:e.name===t.name?0:1))},ft=e=>{const t=e.parent;let n,r=1;const a=e.canvas;if(t&&a){const l=[],s=[];if(t.children){var o,i;t.children.forEach((e=>{if(e.name===gt.Triangle&&(n=e),e.name===gt.Dot||e.name===gt.Triangle){var t;s.push(e),r=null!=(t=e.scaleX)?t:1;const n=e.getPointByOrigin("center","center"),a=new oe(n.x,n.y,e.name);l.push(a)}}));const _=t.children.findIndex((e=>e.name===gt.Line));void 0!==_&&_>-1&&t.children.splice(_,1);const c=K(a,e),u=null==(o=e.data)?void 0:o.rawDiagramElementSpec,d=e.stroke,g=e.strokeDashArray,p=null==(i=e.data)?void 0:i.otherData.selectedRelColor;a.remove(e);const b=St(u,l,t,r,d,p,void 0,g);a.add(b),c&&b.moveTo(c),n&&ht(l,n)}}},mt=e=>{const t=e.findIndex((e=>e.customType===gt.Triangle)),n=e[t],r=e[t>0?t-1:t+1];return 180*Math.atan2(n.y-r.y,n.x-r.x)/Math.PI+90},ht=(e,t)=>{let n;e&&(n=mt(e),t.rotate(n))},wt=(e,t,n,r,a=F,o=1,i=1,l)=>{var s;const _=null!=(s=null==e?void 0:e.getZoom())?s:1,c=ne(e);let u=t,d=n;if(r){const e=N*o/2+A*o/2,t=N*i/2+A*i/2;l?(u-=e,d+=t):(u+=e,d-=t)}else{const e=L*o*2+A*o/2,t=L*i+A*i/2;l?(u+=e,d+=t):(u-=e,d-=t)}return l||(u=(u-c.panX)/_,d=(d-c.panY)/_),{left:u,top:d,angle:a}},yt=(e,t)=>{let n=[];if(null!=e&&e.shapes)null==e||e.shapes.forEach((e=>{var t,r;if((e.shape_type===gt.Dot||e.shape_type===gt.Triangle)&&void 0!==(null==(t=e.position)?void 0:t.left)&&void 0!==(null==(r=e.position)?void 0:r.top)){const t=new oe(e.position.left,e.position.top,e.shape_type);t.data={rawDiagramElementSpec:e},n.push(t)}}));else{var r,a;let o;null!=e&&e.alias&&null!=(r=t[e.alias])&&r.start&&null!=(a=t[e.alias])&&a.end?(o=[],o.push(new oe(t[e.alias].start.x,t[e.alias].start.y,gt.Dot)),t[e.alias].path&&t[e.alias].path.forEach((e=>{o.push(new oe(e.x,e.y,gt.Dot))})),o.push(new oe(t[e.alias].end.x,t[e.alias].end.y,gt.Triangle))):o=[new oe(v.SIZES.DEFAULT_LEFT,v.SIZES.DEFAULT_TOP,gt.Dot),new oe(100+v.SIZES.DEFAULT_LEFT,v.SIZES.DEFAULT_TOP,gt.Triangle)],n=n.concat(o)}return n},vt=(e,t,n,r,a,o)=>{const i=[],l=void 0!==(null==e?void 0:e.alias)&&void 0!==t[e.alias];for(let e=0;e<n.length;e++){var s,_,c,u;i.push(Ot(void 0,n[e],n[e].customType===gt.Triangle?null!=(s=null==(_=n[e].data)||null==(_=_.rawDiagramElementSpec)||null==(_=_.position)?void 0:_.angle)?s:mt(n):void 0,n[e].customType===gt.Triangle,r,!0,null==(c=n[e].data)||null==(c=c.rawDiagramElementSpec)||null==(c=c.size)?void 0:c.scale_x,null==(u=n[e].data)||null==(u=u.rawDiagramElementSpec)||null==(u=u.size)?void 0:u.scale_y,a,o,l))}return i},Ot=(e,t,n,r,a,o=!0,i=1,l=1,s,_,c)=>{var u;s=null!=(u=s)?u:T;const{left:d,top:g,angle:p}=wt(e,t.x,t.y,r,n,i,l,!1);if(r){var b,f;const e=new q.fabric.Triangle({left:d,top:g,width:N,height:N,fill:s,scaleX:i,scaleY:l,hasControls:!1,name:gt.Triangle,angle:F});return e.rotate(p),e.data={rawDiagramElementSpec:null==(b=t.data)?void 0:b.rawDiagramElementSpec,otherData:{selectedRelColor:null!=_?_:C}},e.parent=a,o&&(null==(f=a.children)||f.push(e)),Tt(e,s),e}{var m,h;const e=new q.fabric.Circle({left:d,top:g,radius:L,fill:s,opacity:.2,scaleX:i,scaleY:l,hasControls:!1,name:gt.Dot,visible:!c,selectable:!c,hasBorders:!c});return e.data={rawDiagramElementSpec:null==(m=t.data)?void 0:m.rawDiagramElementSpec,otherData:{selectedRelColor:null!=_?_:C}},e.parent=a,o&&(null==(h=a.children)||h.push(e)),Tt(e,s),e}},St=(e,t,n,r=1,a,o,i,l)=>{var s,_,c;const u=null==e||null==(s=e.shapes)?void 0:s.filter((e=>e.shape_type===gt.Line))[0];let d;return d=i&&null!=e&&e.alias&&null!=(_=i[e.alias])&&_.svg_path?new q.fabric.Path(i[e.alias].svg_path,{stroke:null!=a?a:T,strokeDashArray:l,fill:"",strokeWidth:A*r,scaleX:1,scaleY:1,name:gt.Line,perPixelTargetFind:!0,hasBorders:!1}):new q.fabric.Polyline(t,{stroke:null!=a?a:T,strokeDashArray:l,fill:"",strokeWidth:A*r,scaleX:1,scaleY:1,name:gt.Line,perPixelTargetFind:!0,hasBorders:!1}),d.data={rawDiagramElementSpec:u,otherData:{selectedRelColor:null!=o?o:C}},d.parent=n,xt(d,d.stroke,d.strokeWidth),null==(c=n.children)||c.push(d),d},Et=(e,t,n,r,a,o,i,l)=>{var s,_,c,u,d,g,p;let b,f=1,m=1;var h,w,y,O;null!=t&&t.shapes&&(b=t.shapes.filter((e=>e.shape_type===gt.Text))[0],b&&(f=null!=(h=null==(w=b.size)?void 0:w.scale_x)?h:1,m=null!=(y=null==(O=b.size)?void 0:O.scale_y)?y:1));const S=[],E={fontFamily:v.FONT.FAMILY,fill:null!=(s=null!=(_=null==l?void 0:l.font_color)?_:null==i||null==(c=i.diagramsThemeSettings)?void 0:c.text_color_relationship)?s:R};if(null!=(u=e.base_data)&&u.label){var T,C,L,N,A;const t=new q.fabric.Text((0,$.x4)(e.base_data.label),Object.assign({},E,{fontSize:I,fontWeight:"bold",textAlign:"center"}));t.top=e.technology?-(null!=(T=t.height)?T:0):-(null!=(C=t.height)?C:0)/2,t.left=(null!=(L=r.width)?L:0)/2-(null!=(N=t.width)?N:0)/2-(null!=(A=a[0].width)?A:0)/2,S.push(t)}if(e.technology){var j,F,M;const t=new q.fabric.Text(`[${e.technology}]`,Object.assign({},E,{fontSize:D,textAlign:"center"}));t.left=(null!=(j=r.width)?j:0)/2-(null!=(F=t.width)?F:0)/2-(null!=(M=a[0].width)?M:0)/2,S.push(t)}const P=new q.fabric.Group(S),z=P.getBoundingRect(),B=new q.fabric.Rect({top:z.top-k,left:z.left-k,width:z.width+2*k,height:z.height+2*k,fill:null!=(d=null==i||null==(g=i.diagramsThemeSettings)?void 0:g.bg_color_relationship)?d:x});let H,W;var X,Y,Z,G,U,V,J,Q;null!=t&&t.alias&&n[t.alias]&&n[t.alias].label_position?(H=n[t.alias].label_position.x-(null!=(X=B.width)?X:0)/2,W=n[t.alias].label_position.y-(null!=(Y=B.height)?Y:0)/2):(H=(null!=(Z=r.left)?Z:0)+(null!=(G=r.width)?G:0)/2-(null!=(U=B.width)?U:0)/2,W=(null!=(V=r.top)?V:0)+(null!=(J=r.height)?J:0)/2-(null!=(Q=B.height)?Q:0)/2);const K=new q.fabric.Group([B,P],{name:gt.Text,hasControls:!1,left:H,top:W,scaleX:f,scaleY:m});var ee,te;return K.data={rawDiagramElementSpec:b},K.parent=o,null==(p=o.children)||p.push(K),b&&void 0!==(null==(ee=b.position)?void 0:ee.left)&&void 0!==(null==(te=b.position)?void 0:te.top)&&K.setPositionByOrigin(new q.fabric.Point(b.position.left,b.position.top),"center","center"),K},xt=(e,t,n)=>{const r=e.parent;e.on(c,(t=>{var n,r,a;e.stroke=null==(n=e.data)||null==(n=n.otherData)?void 0:n.selectedRelColor,e.strokeWidth=(null!=(r=e.strokeWidth)?r:0)+j,e.dirty=!0,null==(a=e.canvas)||a.renderAll(),((e,t)=>{var n;if(e.e&&null!=(n=t.parent)&&n.children){var r;const e=re(t);if(!ae(null==(r=t.canvas)?void 0:r.getActiveObjects(),e.objects)){var a,o,i;null==(a=t.canvas)||a.discardActiveObject();const n=t.parent;let r;"multiple"===e.type?r=new q.fabric.ActiveSelection(e.objects,{canvas:t.canvas}):(r=new ie(e.objects,{canvas:t.canvas}),r.parent=t.parent,r.on(s,(e=>{It(r.canvas,e,r,n)})),r.on(_,(e=>{var r;null==(r=t.canvas)||r.discardActiveObject(),n.fire(_)}))),r.hasBorders=!1,null==(o=t.canvas)||o.setActiveObject(r),null==(i=t.canvas)||i.requestRenderAll()}}})(t,e)})),e.on(u,(r=>{var a;e.stroke=t,e.strokeWidth=n,e.dirty=!0,null==(a=e.canvas)||a.renderAll()})),e.on(s,(t=>{It(e.canvas,t,e,r)}))},Tt=(e,t)=>{const n=e.parent;e.on("moving",(e=>{Rt(e)})),e.on(s,(t=>{It(e.canvas,t,e,n)})),e.on(c,(t=>{var n,r;e.fill=null==(n=e.data)||null==(n=n.otherData)?void 0:n.selectedRelColor,e.dirty=!0,null==(r=e.canvas)||r.renderAll()})),e.on(u,(n=>{var r;e.fill=t,e.dirty=!0,null==(r=e.canvas)||r.renderAll()}))},Rt=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===gt.Line))[0];e&&ft(e)}}},Ct=(e,t,n)=>{if(n instanceof q.fabric.ActiveSelection){const r=[];return e.isReadOnly()?e.codingFeaturesEnabled&&r.push(..._e(e,t,n,!1)):r.push({isHeaderMenuItem:!1,id:"addPoint",label:"Add point",onClick:()=>{((e,t)=>{const n=e.canvas;if(t.pointer&&n){const a=e.getObjects().filter((e=>e.name===gt.Line))[0],o=e.getObjects().filter((e=>e.name===gt.Dot))[0];n.discardActiveObject();const i=a.parent;if(i){var r;const e=new oe(t.pointer.x,t.pointer.y,gt.Dot),l=Ot(n,e,void 0,!1,i,!1,o.scaleX,o.scaleY,a.stroke,null==(r=o.data)?void 0:r.otherData.selectedRelColor,!1);((e,t)=>{const n=e.parent;if(n){var r;let a,o;const i=[];null==(r=n.children)||r.forEach((e=>{e.name===gt.Text?a=e:e.name===gt.Rectangle?o=e:e.name!==gt.Dot&&e.name!==gt.Triangle||i.push(e)})),i.push(t),i.sort(((e,t)=>e.getCenterPoint().x-t.getCenterPoint().x)),n.children=i,n.children.push(e),a&&n.children.push(a),o&&n.children.push(o)}})(a,l),n.add(l),ft(a)}}})(n,t)}},{id:"separatorRel",isSepator:!0},..._e(e,t,n,!1)),[{isHeaderMenuItem:!0,id:"relationshipContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:r}]}return n.name!==gt.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===gt.Dot||e.name===gt.Triangle));if(void 0!==i&&i.length>2){var r,a;const n=null==(r=t.children)?void 0:r.filter((e=>e.name===gt.Line))[0],i=null==(a=t.children)?void 0:a.findIndex((t=>t.getCenterPoint().eq(e.getCenterPoint())));var o;void 0!==i&&i>-1&&(null==(o=t.children)||o.splice(i,1)),e.canvas.remove(e),ft(n)}}})(n)}}]}]},It=(e,t,n,r)=>{n.name!==gt.Line&&n.name!==gt.Rectangle&&e&&r.onComponentMouseUp(e,t,n,Ct(e,t,n))},Dt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.relationship_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){var o;const i=((e,t,n,r)=>{var a,o,i,l,s,_,c,u,d,g,p,b;const f=Ye(Xe(null==(a=e.base_data)?void 0:a.tags),null==r?void 0:r.tags),m={alias:null==(o=e.base_data)?void 0:o.alias};let h=1;const w=null==(i=t.shapes)?void 0:i.filter((e=>e.shape_type===gt.Dot));w&&w.length>0&&(h=null!=(l=null==(s=w[0].size)?void 0:s.scale_x)?l:1);const y=new pt(e,t,m,n,[],{visible:!1,selectable:!1},void 0,void 0,!0),v=yt(t,n),O=vt(t,n,v,y,null!=(_=null==f?void 0:f.border_color)?_:null==r||null==(c=r.diagramsThemeSettings)?void 0:c.line_color_relationship,null==r||null==(u=r.diagramsThemeSettings)?void 0:u.selected_color_relationship),S=O.map((e=>new oe(e.getCenterPoint().x,e.getCenterPoint().y,e.name))),E=St(t,S,y,h,null!=(d=null==f?void 0:f.border_color)?d:null==r||null==(g=r.diagramsThemeSettings)?void 0:g.line_color_relationship,null==r||null==(p=r.diagramsThemeSettings)?void 0:p.selected_color_relationship,n,null==(b=je(null==f?void 0:f.border_style))?void 0:b.value);return Et(e,t,n,E,O,y,r,f),bt(y),y})(t,de(t.base_data.alias,t.from,t.to,{Relationship:t.relationship_type},n),r,a);return a&&a.skipAddToCanvas||!i||null==e||e.add(i,...null!=(o=i.children)?o:[]),i}},kt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.system_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.system_type){case"System":case"SystemDb":case"SystemQueue":o=((e,t,n,r,a)=>{var o,i,l,s,_,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_software_system)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,borderColor:null!=(l=null==a||null==(s=a.diagramsThemeSettings)?void 0:s.border_color_software_system)?l:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON,textColor:null!=(_=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_software_system)?_:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON},d=Object.assign({},u,r);if(e.system_type)switch(e.system_type){case"System":return tt(e,t,n,d,a);case"SystemDb":return nt(e,t,n,d,a);case"SystemQueue":return lt(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{SoftwareSystem:t.system_type},n),r,void 0,a);break;case"System_Ext":case"SystemDb_Ext":case"SystemQueue_Ext":o=((e,t,n,r,a)=>{var o,i,l,s,_,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_software_system_ext)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,borderColor:null!=(l=null==a||null==(s=a.diagramsThemeSettings)?void 0:s.border_color_software_system_ext)?l:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,textColor:null!=(_=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_software_system_ext)?_:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT},d=Object.assign({},u,r);if(e.system_type)switch(e.system_type){case"System_Ext":return tt(e,t,n,d,a);case"SystemDb_Ext":return nt(e,t,n,d,a);case"SystemQueue_Ext":return lt(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{SoftwareSystem:t.system_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}};class Lt{constructor(){this.graphviz=void 0}async initialize(){return this.graphviz=await Ne.Graphviz.load(),this}renderDiagram(e,t,n,r){if(e&&n){var a,o,i,l,s,_,c,u;if(e.diagramListener=t,e.autoLayoutEnabled=null==(a=n.diagram_spec)?void 0:a.auto_layout_enabled,e.autoLayoutOrientation=null==(o=n.diagram_spec)?void 0:o.auto_layout_orientation,e.backgroundColor=null!=(i=null==r?void 0:r.bg_color_diagram)?i:d,null!=(l=n.diagram_spec)&&l.auto_layout_enabled)if(this.graphviz){const e=function(e,t){var n,r;const a={},o=[];if(null!=(n=t.diagram_spec)&&n.auto_layout_enabled&&t.diagram_spec.auto_layout_orientation&&null!=(r=t.diagram_plantuml)&&r.elements){console.time("autoLayoutGeneration");const n=t.diagram_plantuml.elements,r=t.diagram_spec.auto_layout_orientation,s=t.diagram_spec.auto_layout_ranksep,_=t.diagram_spec.auto_layout_subgraph_inner_margin,c=t.diagram_spec.auto_layout_subgraph_outer_margin,u=t.diagram_spec.auto_layout_only_straight_arrows,d=(e=>{for(const t of e)if(be(t)||he(t))return!0;return!1})(n),g=function(e){let t=Re,n=Ce;return e&&(t-=.1,n-=.1),{x:Number.parseFloat(t.toFixed(2)),y:Number.parseFloat(n.toFixed(2))}}(d),p=function(e,t,n,r,a,o,i){const l=new Set;return`\n digraph G {\n pad = "${i.x},${i.y}"\n dpi = ${Te.toFixed(1)}\n penwidth="1"\n rankdir = ${"LeftToRight"===t?"LR":"TB"}\n nodesep=0\n ranksep=${n}\n compound=true\n bgcolor="red"\n ${o?"splines=ortho":""}\n node [shape="rect", fixedsize=true, penwidth="1"]\n ${Le(e,l,r,a)}\n }\n `}(n,r,s,_,c,u,g);try{var i,l;let t=e.dot(p,"json");const n=JSON.parse(t),r=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(Ee)}(e)&&e._draw_){const t=e._draw_.filter((e=>"p"===e.op||"P"===e.op))[0],n=xe(g,r,t.points[0]),o=xe(g,r,t.points[1]),i=xe(g,r,t.points[2]),l=o[0],s=o[1];let _;4===t.points.length&&(_={x:i[0]-o[0],y:n[1]-o[1]}),a[e.name]={position:{x:l,y:s},size:_}}})),null==(l=n.edges)||l.forEach((e=>{const t={path:[]};if(e._draw_?e._draw_.filter((e=>"b"===e.op))[0].points.forEach(((e,n)=>{var a;const o=xe(g,r,e),i=o[0],l=o[1];0===n?t.start={x:i,y:l}:null==(a=t.path)||a.push({x:i,y:l})})):o.push(He),e._hdraw_){const n=e._hdraw_.filter((e=>"P"===e.op))[0].points,a=xe(g,r,n[1]);t.end={x:a[0],y:a[1]}}if(e._ldraw_){var n;const a=null==(n=e._ldraw_)?void 0:n.filter((e=>"T"===e.op))[0].pt;if(a){const e=xe(g,r,a);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,a=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-=Ie:t.start.x>n.x&&(t.start.x+=Ie),t.start.y<n.y?t.start.y-=Ie:t.start.y>n.y&&(t.start.y+=Ie)),"false"===e.keadex_toissubgraph&&a.x&&a.y&&(t.end.x<a.x?t.end.x-=Ie:t.end.x>a.x&&(t.end.x+=Ie),t.end.y<a.y?t.end.y-=Ie:t.end.y>a.y&&(t.end.y+=Ie)),t.svg_path=function(e,t,n,r,a){const o=e.split(" ").slice(1).map((e=>e.split(",").map(Number)));let i=`M ${n.x} ${n.y}`;for(let e=o.length-3;e>=0;e-=3){const[n,l]=xe(r,a,o[e+1]),[s,_]=xe(r,a,o[e]),[c,u]=xe(r,a,o[e-1]);let d=c,g=u;1===e&&(d=t.x,g=t.y),i+=` C ${n} ${l}, ${s} ${_}, ${d} ${g}`}return i}(e.pos,t.start,t.end,g,r)}a[e.name]=t}))}catch(e){console.error(e),o.push(He)}}return console.timeEnd("autoLayoutGeneration"),{positions:a,errors:o}}(this.graphviz,n);n.auto_layout=e.positions,n.auto_layout_errors=e.errors,e.errors.length>0&&(e.errors.indexOf(He)>=0?(console.warn(ze),Ae.toast.warn(ze)):(console.error(e.errors.join(", ")),Ae.toast.error(e.errors.join(", "))))}else console.error(Be),Ae.toast.error(Be);null!=(s=n.diagram_spec)&&s.grid_enabled?e.enableGrid():e.disableGrid();const g=Nt(e,null==(_=n.diagram_plantuml)?void 0:_.elements,n.diagram_spec,null!=(c=n.auto_layout)?c:{},{diagramsThemeSettings:r,tags:null==(u=n.diagram_plantuml)?void 0:u.tags});return At(g),g}}}const Nt=(e,t,n,r,a)=>{const o=[];if(n){if(!a||!a.skipLegendRendering){const t=Pe(de(Fe,void 0,void 0,void 0,n),a);t&&(o.push(t),null==e||e.add(t))}if(t)for(const i of t)if(be(i)){const t=et(e,be(i),n,r,a);t&&o.push(t)}else if(fe(i)){const t=st(e,fe(i),n,r,a);t&&o.push(t)}else if(me(i)){const t=_t(e,me(i),n,r,a);t&&o.push(t)}else if(he(i)){const t=ct(e,he(i),n,r,a);t&&o.push(t)}else if(we(i)){const t=dt(e,we(i),n,r,a);t&&o.push(t)}else if(ye(i)){const t=Dt(e,ye(i),n,r,a);t&&o.push(t)}else if(ve(i)){const t=kt(e,ve(i),n,r,a);t&&o.push(t)}}return o},At=(e,t)=>{e.forEach((e=>{let n=function(e){let t;var n,r;return t=e.isVirtualGroupParent()?null==(n=e.data)||null==(n=n.rawDiagramElementSpec)||null==(n=n.shapes)||null==(n=n.reduce(((e,t)=>{var n,r;return void 0===(null==(n=e.position)?void 0:n.z_index)?t:(void 0===(null==(r=t.position)?void 0:r.z_index)||(t.position.z_index,e.position.z_index),e)})).position)?void 0:n.z_index:null==(r=e.data)||null==(r=r.rawDiagramElementSpec)||null==(r=r.position)?void 0:r.z_index,t}(e);var r;n&&(t&&n<=t&&(n=t+1,t++),e.moveTo(n)),e.isVirtualGroupParent()&&At(e.children,null!=(r=n)?r:K(e.canvas,e.children[0]))}))};var jt=n(15),Ft=n.n(jt),Mt=n(61);const Pt=require("react-resize-detector");var zt=n(732);const Bt="text-5xl text-dark-primary hover:text-third",Ht="text-2xl text-dark-primary hover:text-third",Wt=Ft().memo((e=>{const{canvas:t,readOnly:n,diagramInfoPanelVisible:r,setDiagramInfoPanelVisible:a,diagramCodePanelVisible:o,setDiagramCodePanelVisible:i}=e;function l(){return n}return(0,zt.jsxs)("div",{className:"absolute bottom-0 left-0 z-[1] scale-[85%] opacity-20 transition hover:scale-[100%] hover:opacity-100 flex flex-row mx-2",children:[(0,zt.jsx)(U.K0,{className:`${Ht} ${l()?"absolute":"hidden"}`,icon:We.faCircleInfo,onClick:function(){l()&&(i(!1),a(!r))}}),(0,zt.jsx)(U.K0,{className:`${Ht} ${l()?"absolute bottom-1":"hidden"}`,icon:We.faCode,onClick:function(){l()&&(a(!1),i(!o))}}),(0,zt.jsx)("div",{className:"flex flex-col",children:(0,zt.jsx)(U.K0,{className:`${Bt} !my-auto`,icon:We.faCaretLeft,onClick:()=>null==t?void 0:t.panLeft()})}),(0,zt.jsxs)("div",{className:"flex flex-col",children:[(0,zt.jsx)(U.K0,{className:Bt,icon:We.faCaretUp,onClick:()=>null==t?void 0:t.panDown()}),(0,zt.jsxs)("div",{children:[(0,zt.jsx)(U.K0,{className:`${Ht} ml-1`,icon:We.faMagnifyingGlassPlus,onClick:()=>null==t?void 0:t.zoomIn()}),(0,zt.jsx)(U.K0,{className:`${Ht} mx-2 !text-xl`,icon:We.faRotateLeft,onClick:()=>{null==t||t.resetZoom(),null==t||t.resetPan()}}),(0,zt.jsx)(U.K0,{className:`${Ht} mr-1`,icon:We.faMagnifyingGlassMinus,onClick:()=>null==t?void 0:t.zoomOut()})]}),(0,zt.jsx)(U.K0,{className:Bt,icon:We.faCaretDown,onClick:()=>null==t?void 0:t.panUp()})]}),(0,zt.jsx)("div",{className:"flex flex-col",children:(0,zt.jsx)(U.K0,{className:`${Bt} !my-auto`,icon:We.faCaretRight,onClick:()=>null==t?void 0:t.panRight()})})]})})),Xt=require("@tauri-apps/api/core");JSON.parse(!0),JSON.parse(!0);const Yt=require("fontfaceobserver");var Zt=n.n(Yt),$t=n(53);const Gt=e=>{const{t}=(0,Mt.useTranslation)(),[n,r]=(0,jt.useState)(e.enabled),[o,i]=(0,jt.useState)(e.orientation),[l,s]=(0,jt.useState)(e.generateOnlyStraightArrows),[_,c]=(0,jt.useState)(e.ranksep),[u,d]=(0,jt.useState)(e.subgraphInnerMargin),[g,p]=(0,jt.useState)(e.subgraphOuterMargin);return(0,zt.jsxs)("div",{children:[(0,zt.jsxs)("div",{className:"modal__body",children:[(0,zt.jsxs)("div",{className:"flex flex-col",children:[(0,zt.jsxs)("div",{className:"flex flex-row",children:[(0,zt.jsxs)("span",{children:[t("common.status"),"*:"]}),(0,zt.jsx)(U.sx,{id:"autolayout-status",className:"ml-5",value:n,options:[{label:t("common.enabled"),value:!0},{label:t("common.disabled"),value:!1}],onChange:e=>{r(e)}})]}),(0,zt.jsxs)("span",{className:"text-sm text-orange-500 mt-2 "+(!e.enabled&&n?"block":"hidden"),children:[(0,zt.jsx)($t.FontAwesomeIcon,{icon:We.faWarning,className:"mr-1 text-yellow-500"}),t("diagram_editor.warning_enable_autolayout")]})]}),(0,zt.jsxs)("div",{className:"flex flex-row mt-5",children:[(0,zt.jsxs)("span",{children:[`${t("diagrams_settings.gen_only_straight_arrows")}*`,":"]}),(0,zt.jsx)(U.sx,{id:"autolayout-straight-arrows-status",className:"ml-5",value:l,options:[{label:t("common.yes"),value:!0},{label:t("common.no"),value:!1}],onChange:e=>{s(e)}})]}),(0,zt.jsx)(U.l6,{id:"autolayout-orientation-selector",label:`${t("common.orientation")}*`,className:"mt-8",value:o,options:a.map((e=>({label:e,value:e}))),onChange:e=>i(e.target.value)}),(0,zt.jsx)(U.pd,{id:"autolayout-ranksep",type:"number",label:"ranksep*",min:0,classNameRoot:"mt-6",info:`${t("diagrams_settings.ranksep_description")}`,value:_,onChange:e=>c(Number.parseFloat(e.target.value))}),(0,zt.jsx)(U.pd,{id:"autolayout-subgraph-inner-margin",type:"number",label:`${t("diagrams_settings.subgraph_inner_margin")}`,min:0,classNameRoot:"mt-6",value:u,onChange:e=>d(Number.parseFloat(e.target.value))}),(0,zt.jsx)(U.pd,{id:"autolayout-subgraph-outer-margin",type:"number",label:`${t("diagrams_settings.subgraph_outer_margin")}`,min:0,classNameRoot:"mt-6",value:g,onChange:e=>p(Number.parseFloat(e.target.value))})]}),(0,zt.jsx)("div",{className:"modal__footer",children:(0,U.CL)([{key:"button-cancel",children:(0,zt.jsx)("span",{children:t("common.cancel")}),"data-te-modal-dismiss":!0},{key:"button-save",children:(0,zt.jsx)("span",{children:t("common.save")}),onClick:function(){e.onAutoLayoutConfigured(n,o,l,_,u,g),e.hideModal()}}])})]})},Ut=Ft().memo((e=>{var t,n,r;const{tagsDirection:a,scrollable:o,diagram:i,handleDiagramHeaderClick:l}=e;return(null==i?void 0:i.diagram_type)&&(0,zt.jsxs)("div",{className:"w-full flex flex-col items-center py-1 pr-3 "+(l?"cursor-pointer":""),onClick:function(){l&&l()},children:[(0,zt.jsxs)("div",{className:"flex w-full my-auto "+("bottom"===a?"flex-col":""),children:[(0,zt.jsxs)("div",{className:"text-lg text-accent-primary grow truncate",children:[(s=i.diagram_type,(0,G.capitalCase)((0,G.noCase)(s)))," Diagram -"," ",i.diagram_name]}),(null==(t=i.diagram_spec)?void 0:t.tags)&&(0,zt.jsx)("div",{className:"bottom"===a?"mt-2 mb-5":"",children:(0,zt.jsx)(U.YD,{tags:i.diagram_spec.tags,className:"right"===a?"float-right top-1/2 -translate-y-1/2":""})})]}),(null==(n=i.diagram_spec)?void 0:n.description)&&(0,zt.jsx)("div",{className:"w-full text-sm whitespace-break-spaces "+(o?"":"line-clamp-3"),children:null==(r=i.diagram_spec)?void 0:r.description})]});var s})),qt=Ft().memo((e=>{const{setDiagramInfoPanelVisible:t,diagram:n,hidden:r}=e;return(0,zt.jsxs)("div",{className:r?"hidden":"absolute z-[1] bg-dark-primary bg-opacity-90 w-full p-2 max-h-96 overflow-auto",children:[(0,zt.jsx)(U.K0,{icon:We.faXmark,className:"absolute right-5 top-3",onClick:()=>t(!1)}),n&&(0,zt.jsx)(Ut,{diagram:n,tagsDirection:"bottom",scrollable:!0})]})}));var Vt=function(e){return e[e.PlantUML=0]="PlantUML",e[e.JSON=1]="JSON",e}(Vt||{});const Jt=Ft().memo((e=>{const{setDiagramCodePanelVisible:t,diagram:n,hidden:r}=e,[a,o]=(0,jt.useState)(Vt.PlantUML),[i,l]=(0,jt.useState)(null==n?void 0:n.raw_plantuml);return(0,jt.useEffect)((()=>{n&&l(a===Vt.PlantUML?n.raw_plantuml:JSON.stringify(n.diagram_spec,null,2))}),[n,a]),(0,zt.jsxs)("div",{className:r?"hidden":"absolute z-[1] bg-dark-primary bg-opacity-90 w-full h-full p-2 overflow-auto",children:[(0,zt.jsx)(U.K0,{icon:We.faXmark,className:"absolute right-5 top-3",onClick:()=>t(!1)}),n&&(0,zt.jsxs)("div",{className:"flex flex-col",children:[(0,zt.jsxs)("div",{children:[(0,zt.jsx)(U.$n,{className:"mr-3 w-32 normal-case "+(a===Vt.PlantUML?"!bg-green-700":""),onClick:()=>o(Vt.PlantUML),children:"PlantUML"}),(0,zt.jsx)(U.$n,{className:"w-32 normal-case "+(a===Vt.JSON?"!bg-green-700":""),onClick:()=>o(Vt.JSON),children:"JSON"})]}),(0,zt.jsxs)("div",{className:"mt-5 p-2 bg-primary rounded-md overflow-auto whitespace-pre-wrap text-sm font-mono",children:[(0,zt.jsx)(U.K0,{icon:We.faCopy,className:"absolute right-5 text-xl",onClick:()=>{i&&navigator.clipboard.writeText(i)}}),(0,zt.jsx)("div",{children:i})]})]})]})})),Qt=e=>{const{t}=(0,Mt.useTranslation)(),[n,r]=(0,jt.useState)(e.settings);return(0,zt.jsxs)("div",{children:[(0,zt.jsx)("div",{className:"modal__body",children:(0,zt.jsx)("div",{className:"flex flex-col",children:(0,zt.jsxs)("div",{className:"flex flex-row",children:[(0,zt.jsxs)("span",{children:[t("diagrams_settings.grid_enabled"),"*:"]}),(0,zt.jsx)(U.sx,{id:"autolayout-status",className:"ml-5",value:n.gridEnabled,options:[{label:t("common.enabled"),value:!0},{label:t("common.disabled"),value:!1}],onChange:e=>{r(Object.assign({},n,{gridEnabled:e}))}})]})})}),(0,zt.jsx)("div",{className:"modal__footer",children:(0,U.CL)([{key:"button-cancel",children:(0,zt.jsx)("span",{children:t("common.cancel")}),"data-te-modal-dismiss":!0},{key:"button-save",children:(0,zt.jsx)("span",{children:t("common.save")}),onClick:function(){e.onSettingsChanged(n),e.hideModal()}}])})]})};var Kt=n(735),en=n(691);const tn=["auto_layout"],nn=["auto_layout"],rn=(0,jt.forwardRef)(((e,t)=>{const{readOnly:n,diagram:a,diagramListener:o,diagramDesignViewToolbarCommands:i,saveDiagram:s,diagramsThemeSettings:_}=e,{t:c}=(0,Mt.useTranslation)(),u=(0,jt.useRef)(),d=(0,jt.useRef)(null),g=(0,jt.useRef)(null),{ref:p}=(0,Pt.useResizeDetector)(),b=(0,jt.useRef)(),f=(0,jt.useRef)(!1),m=(0,jt.useRef)(!1),h=(0,jt.useRef)(!1),[w,y]=(0,jt.useState)([]),[O,S]=(0,jt.useState)([]),[E,x]=(0,jt.useState)(!1),[T,R]=(0,jt.useState)(!1),[C,I]=(0,jt.useState)(),{modal:D,showModal:k,hideModal:L}=(0,U.hS)();let N=b.current,A=a;function j(){f.current=!0,n||function(){if(!h.current){const e=H();e&&y((t=>[...t,e]))}}()}function F(t){const n={fireRightClick:!0,fireMiddleClick:!0,stopContextMenu:!0,backgroundColor:"white",readOnly:e.readOnly,enableSnapToGrid:!0},r=new U.vL(d.current,n);r.on("object:added",j),r.on("object:removed",j),r.on(l,j),r.on("mouse:down",(()=>m.current=!0)),r.on("mouse:out",(()=>m.current=!1)),r.codingFeaturesEnabled="desktop"===e.target,f.current=!1,t&&(r.setZoom(t.zoom),r.relativePan(new q.fabric.Point(t.pan.panX,t.pan.panY))),u.current=r}function M(){u.current&&(u.current.dispose(),u.current=void 0)}function P(e){M(),F(e)}function z(){var e,t;return{zoom:null!=(e=null==(t=u.current)?void 0:t.getZoom())?e:1,pan:ne(u.current)}}async function B(){var e;if(null!=(e=b.current)&&e.diagram_name&&b.current.diagram_type&&u.current){const e="png";console.debug(`Exporting to ${e}`);const t=u.current.viewportTransform;u.current.viewportTransform=q.fabric.iMatrix.slice(0);let{width:n,height:r,left:a,top:o}=Q(u.current.getObjects());n&&r&&a&&o&&(n+=50,r+=50,a-=25,o-=25),await async function(e,t,n,r){return(0,Xt.invoke)("export_diagram_to_file",{diagramDataUrl:n,format:r,diagramName:e,diagramType:t})}(b.current.diagram_name,b.current.diagram_type,u.current.toDataURL({format:e,enableRetinaScaling:!0,width:n,height:r,left:a,top:o}),e).then((e=>Ae.toast.success(c("common.info.diagram_exported",{pathExportedDiagram:e})))).catch((e=>Ae.toast.success(e.msg))),u.current.viewportTransform=t}}function H(){if(b.current&&b.current.diagram_plantuml&&b.current.diagram_spec&&b.current.diagram_name&&b.current.diagram_type){var e,t;const n=void 0!==(null==(e=u.current)?void 0:e.autoLayoutEnabled)?u.current.autoLayoutEnabled:b.current.diagram_spec.auto_layout_enabled;let r=[];return n||(r=(e=>{const t=Array();return e&&e.getObjects().forEach((e=>{if(e instanceof se){const n=e.getUpdatedSpecs();n&&t.push(n)}})),t})(u.current)),Object.assign({},b.current.diagram_spec,{auto_layout_enabled:n,auto_layout_orientation:void 0!==(null==(t=u.current)?void 0:t.autoLayoutOrientation)?u.current.autoLayoutOrientation:b.current.diagram_spec.auto_layout_orientation,elements_specs:r})}}function W(){return f.current}function X(){var e;return!(null==(e=b.current)||!e.diagram_spec)&&b.current.diagram_spec.auto_layout_enabled}function Y(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_orientation:"TopToBottom"}function Z(){var e;return!(null==(e=b.current)||!e.diagram_spec)&&b.current.diagram_spec.auto_layout_only_straight_arrows}function G(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_ranksep:0}function V(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_subgraph_inner_margin:0}function J(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_subgraph_outer_margin:6.5}function K(e,t,r,a,o,i){u.current&&b.current&&!n&&k({id:"showAutoLayoutConfigurationModal",title:`${c("diagram_editor.configure_auto_layout")}`,body:(0,zt.jsx)(Gt,{enabled:e,orientation:t,generateOnlyStraightArrows:r,ranksep:a,subgraphInnerMargin:o,subgraphOuterMargin:i,hideModal:L,onAutoLayoutConfigured:(e,t,r,a,o,i)=>{u.current&&b.current&&!n&&(u.current.autoLayoutEnabled=e,u.current.autoLayoutOrientation=t,b.current.diagram_spec&&(b.current.diagram_spec.auto_layout_only_straight_arrows=r,b.current.diagram_spec.auto_layout_ranksep=a,b.current.diagram_spec.auto_layout_subgraph_inner_margin=o,b.current.diagram_spec.auto_layout_subgraph_outer_margin=i),f.current=!0,s&&s())}}),buttons:!1})}function ee(){var e;if(null!=(e=b.current)&&e.diagram_spec)return{gridEnabled:b.current.diagram_spec.grid_enabled}}function te(e){e&&u.current&&b.current&&!n&&k({id:"showDiagramDesignViewSettingsModal",title:`${c("common.settings")}`,body:(0,zt.jsx)(Qt,{settings:e,hideModal:L,onSettingsChanged:e=>{var t;u.current&&b.current&&!n&&(e.gridEnabled?u.current.enableGrid():u.current.disableGrid(),b.current.diagram_spec&&(b.current.diagram_spec.grid_enabled=null!=(t=e.gridEnabled)&&t),f.current=!0,s&&s())}}),buttons:!1})}function re(){var t,n;null!=(t=b.current)&&t.diagram_spec&&u.current&&!e.readOnly&&(null!=(n=b.current)&&n.diagram_spec.auto_layout_enabled?u.current.setReadOnly():u.current.setReadAndWrite())}function ae(e){var t;u.current&&(P(z()),re(),C?C.renderDiagram(u.current,o,Object.assign({},b.current,{diagram_spec:e}),_):console.error("DiagramRenderer not initialized"),null==(t=u.current)||t.renderAll(),f.current=!0,console.debug("Load history completed"))}function oe(){if(h.current=!0,le()){const e=w[w.length-1],t=w[w.length-2];b.current&&e&&t&&(console.debug("Undo design view"),y((e=>e.filter(((t,n)=>n!==e.length-1)))),S((t=>[...t,e])),ae(t))}h.current=!1}function ie(){if(console.debug("Redo design view"),h.current=!0,_e()){const e=O[O.length-1];e&&(S((e=>e.filter(((t,n)=>n!==e.length-1)))),y((t=>[...t,e])),ae(e))}h.current=!1}function le(){return!n&&w.length>1}function _e(){return!n&&O.length>0}return N&&(N=(0,r.A)(N,tn)),A&&(A=(0,r.A)(A,nn)),(0,$.$r)(N,A)||(b.current=a),(0,jt.useImperativeHandle)(t,(()=>({resetCanvas:P,getCanvasState:z,exportDiagram:B,getUpdatedDiagramSpec:H,isDiagramChanged:W,undo:oe,redo:ie,canUndo:le,canRedo:_e,isAutoLayoutEnabled:X,autoLayoutOrientation:Y,updateAutoLayoutOptions:K,isGenerateOnlyStraightArrowsEnabled:Z,ranksep:G,updateDiagramDesignViewSettings:te,diagramDesignViewSettings:ee,subgraphInnerMargin:V,subgraphOuterMargin:J}))),(0,jt.useLayoutEffect)((()=>{var e,t,n,r,a,o,i;console.debug("Diagram Design View changed layout"),d.current&&null!=(e=g.current)&&e.clientWidth&&null!=(t=g.current)&&t.clientHeight&&(console.debug("Canvas resize"),d.current.parentElement&&(d.current.parentElement.style.display="none"),null==(n=u.current)||n.setWidth(null==(r=g.current)?void 0:r.getBoundingClientRect().width),null==(a=u.current)||a.setHeight(null==(o=g.current)?void 0:o.getBoundingClientRect().height),d.current.parentElement&&(d.current.parentElement.style.display="flex"),null==(i=u.current)||i.renderAll())})),(0,jt.useEffect)((()=>(new(Zt())(v.FONT.FAMILY).load(null,36e4).then((function(){u.current&&(function(e){e.getObjects().forEach((e=>e.set("dirty",!0)))}(u.current),u.current.renderAll())})),d.current&&!u.current&&F(),()=>{M()})),[]),(0,jt.useEffect)((()=>{function e(e){n||"Z"!==e.key.toUpperCase()&&"Y"!==e.key.toUpperCase()||!e.ctrlKey&&!e.metaKey||!m.current||(e.preventDefault(),"Z"===e.key.toUpperCase()?oe():"Y"===e.key.toUpperCase()&&ie())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[n,w,O]),(0,jt.useEffect)((()=>{var e,t;u.current&&b.current&&C&&(h.current=!0,console.debug("Rendering the diagram"),re(),C.renderDiagram(u.current,o,b.current,_),null==(e=u.current)||e.renderAll(),f.current=!1,h.current=!1,n||(h.current=!1,null!=(t=b.current)&&t.diagram_spec&&y([b.current.diagram_spec]),S([])))}),[b.current,C]),(0,jt.useEffect)((()=>{var e;!n&&i&&(console.debug("Update design toolbar"),null==(e=i.current)||e.forceUpdate())}),[n,w,O,i]),(0,jt.useEffect)((()=>{!async function(){const e=await(new Lt).initialize();I(e)}()}),[]),(0,Kt.useHotkeys)([en.Key.Escape],(e=>{var t;u.current&&(e.preventDefault(),null==(t=u.current)||t.discardActiveObject())})),(0,zt.jsxs)("div",{className:"relative h-full w-full",ref:p,children:[D,(0,zt.jsx)(Wt,{canvas:u.current,readOnly:n,diagramInfoPanelVisible:E,setDiagramInfoPanelVisible:x,diagramCodePanelVisible:T,setDiagramCodePanelVisible:R}),(0,zt.jsx)(qt,{diagram:a,hidden:!E,setDiagramInfoPanelVisible:x}),(0,zt.jsx)(Jt,{diagram:a,hidden:!T,setDiagramCodePanelVisible:R}),(0,zt.jsx)("div",{className:"h-full w-full flex-row flex-wrap",ref:g,children:(0,zt.jsx)("canvas",{ref:d})})]})}))},779:(e,t,n)=>{n.d(t,{$n:()=>j,tz:()=>b,rI:()=>g,UW:()=>v,K0:()=>L,pd:()=>Z,vL:()=>x,sx:()=>q,l6:()=>G,YD:()=>U,CL:()=>B,T_:()=>y,hS:()=>X});var r=n(452),a=n.n(r);require("react-router-dom");var o=n(15),i=n.n(o);n(61);var l=n(732);a().addPluralRule(/Person/,"Persons");var s=n(177),_=n(53);const c="hide.te.dropdown",u="show.te.dropdown",d=i().memo((e=>{var t;const n=(0,o.useRef)(null),[r,a]=(0,o.useState)(!1);function i(e){let t;return t=e.isSepator?(0,l.jsx)("li",{className:"relative",children:(0,l.jsx)("span",{className:"bg-third my-1 block h-px w-full"})},e.id):(0,l.jsxs)("li",{className:"relative",children:[(0,l.jsxs)("button",{disabled:void 0!==e.disabled&&e.disabled,id:e.id,className:"\n hover:bg-link\n flex\n w-full\n items-center\n whitespace-nowrap\n px-4\n py-1\n text-left\n text-sm\n hover:text-white\n ","data-te-dropdown-item-ref":!0,onClick:t=>{e.onClick&&e.onClick(t)},children:[e.subMenuItems&&e.subMenuItems.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"mr-16 basis-11/12 pr-1",children:e.label}),(0,l.jsx)("span",{className:"basis-1/12 text-right",children:(0,l.jsx)(_.FontAwesomeIcon,{icon:s.faAngleRight})})]}),(!e.subMenuItems||0===e.subMenuItems.length)&&e.label]}),d(e.isHeaderMenuItem,e.id,e.subMenuItems)]},e.id),t}function d(e,t,n){const r=[];if(n&&n.length>0){for(const e of n)r.push(i(e));return(0,l.jsx)("ul",{className:`\n bg-secondary\n text-accent-primary\n absolute\n z-50\n m-0\n w-auto\n min-w-max\n list-none\n rounded-md\n border-none\n bg-clip-padding\n py-2\n shadow-[0_1px_2px_rgba(0,0,0,0.6)]\n [&[data-te-dropdown-show]]:block\n ${e?" dropdown-menu float-left hidden origin-top-left":" right-px top-0"}\n `,id:`menu-${t}`,"aria-labelledby":t,"data-te-dropdown-menu-ref":!0,children:r})}return(0,l.jsx)("div",{"data-te-dropdown-menu-ref":!0})}const g=t=>{e.increaseOpenedMenu&&e.setLastOpenedMenu&&e.decreaseOpenedMenu&&(t.type===u?(a(!0),e.increaseOpenedMenu(),e.setLastOpenedMenu(e.id)):(a(!1),e.decreaseOpenedMenu()))};return(0,o.useEffect)((()=>{const t=n.current;return null==t||t.addEventListener(c,g),null==t||t.addEventListener(u,g),(e.alwaysOpen&&!r||e.lastOpenedMenu!==e.id&&r)&&(null==t||t.dispatchEvent(new MouseEvent("click"))),()=>{null==t||t.removeEventListener(c,g),null==t||t.removeEventListener(u,g)}})),(0,l.jsxs)("div",{className:`relative ${null!=(t=e.className)?t:""}`,"data-te-dropdown-ref":!0,children:[(0,l.jsx)("button",{className:`\n ${r?"":" bg-dark-primary text-accent-primary"} \n hover:bg-primary\n flex\n items-center\n whitespace-nowrap\n rounded-md\n px-2\n py-0.5\n text-sm hover:text-white\n hover:shadow-[0_1px_2px_rgba(0,0,0,0.6)]\n focus:outline-none\n focus:ring-0\n ${r?" bg-primary show text-white":""}\n ${e.hidden?" h-0 opacity-0":""}\n ${e.buttonClassName?` ${e.buttonClassName}`:""}\n `,type:"button",id:e.id,"aria-expanded":"false",ref:n,"data-te-dropdown-toggle-ref":!0,"data-te-dropdown-animation":"off",onMouseEnter:t=>{e.atLeastOneOpenedMenu&&e.atLeastOneOpenedMenu()&&!r&&t.target.dispatchEvent(new MouseEvent("click"))},children:e.label}),d(e.isHeaderMenuItem,e.id,e.subMenuItems)]},e.id)})),g=i().memo((e=>{var t;const[n,r]=(0,o.useState)(0),[a,i]=(0,o.useState)("");function s(){r((e=>e+1))}function _(){r((e=>e-1))}function c(){return n>0}return(0,l.jsx)("div",{className:`dropdown-menu group flex ${c()?"open":""} ${null!=(t=e.className)?t:""}`,children:function(){const t=[];if(e.menuItemsProps&&e.menuItemsProps.length>0)for(const n of e.menuItemsProps)t.push((0,o.createElement)(d,Object.assign({},n,{key:n.id,increaseOpenedMenu:s,decreaseOpenedMenu:_,atLeastOneOpenedMenu:c,lastOpenedMenu:a,setLastOpenedMenu:i})));return t}()})})),p=g,b=()=>{const{anchorPoint:e,show:t,contextMenuItems:n}=(()=>{const[e,t]=(0,o.useState)({x:0,y:0}),[n,r]=(0,o.useState)(!1),[a,i]=(0,o.useState)([]),l=(0,o.useCallback)((e=>{if(e.preventDefault(),(n=e)instanceof CustomEvent&&n instanceof CustomEvent&&Object.keys(n.detail).includes("menuItems")){const n=e.detail.pageX,a=e.detail.pageY;i(e.detail.menuItems),t({x:n,y:a}),r(!0)}var n}),[r,t]),s=(0,o.useCallback)((()=>n?r(!1):null),[n]);return(0,o.useEffect)((()=>(document.addEventListener("click",s),document.addEventListener("contextmenu",l),()=>{document.removeEventListener("click",s),document.removeEventListener("contextmenu",l)}))),{anchorPoint:e,show:n,contextMenuItems:a}})(),r=(0,o.useRef)(),[a,i]=(0,o.useState)((0,l.jsx)(l.Fragment,{}));return r.current!==t&&(r.current=t),(0,o.useEffect)((()=>{void 0!==r.current&&(r.current?i((0,l.jsx)("div",{hidden:!t,className:"context-menu absolute",style:{top:e.y,left:e.x},children:(0,l.jsx)(p,{menuItemsProps:n})})):i((0,l.jsx)(l.Fragment,{})))}),[r.current]),a},f=require("js-cookie");var m=n.n(f);const h=require("react-ga4");var w=n.n(h);function y(e){const{initTE:t,initGA:n}=e,[r,a]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{(async()=>{t&&await t(),n&&function(e,t){var n;let r=m().get("CookieConsent");r=null==(n=r)?void 0:n.replace(/{/gi,'{"').replace(/:/gi,'":').replace(/,/gi,',"').replace(/'/gi,'"'),!e&&r&&JSON.parse(r).statistics&&({NODE_ENV:"production"}.NEXT_PUBLIC_GA_MEASUREMENT_ID&&w().initialize([{trackingId:{NODE_ENV:"production"}.NEXT_PUBLIC_GA_MEASUREMENT_ID,gtagOptions:{anonymize_ip:!0,send_page_view:!1}}]),t(!0)),e&&(console.debug(`Logging pageview for ${window.location.pathname}`),w().send({hitType:"pageview",page:window.location.pathname}))}(r,a)})()}),[r,n,t]),{isGAInitialized:r}}const v={CONTEXT_MENU:"contextmenu"};var O=n(489);const S="idle",E="panning";class x extends O.fabric.Canvas{constructor(e,t){super(e,t),this.gridEnabled=void 0,this.gridBgColor=void 0,R(this),C(this)}initialize(e,t){return this.gridEnabled=null==t?void 0:t.gridEnabled,R(this),C(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,r,a;null==(t=e.target)||t.set({left:Math.round((null!=(r=e.target.left)?r:0)/n)*n,top:Math.round((null!=(a=e.target.top)?a:0)/n)*n})}))}(this,t.gridSize),super.initialize(e,t)}isReadOnly(){return O.fabric.Object.prototype.lockMovementX&&O.fabric.Object.prototype.lockMovementY&&O.fabric.Object.prototype.lockRotation&&O.fabric.Object.prototype.lockScalingFlip&&O.fabric.Object.prototype.lockScalingX&&O.fabric.Object.prototype.lockScalingY&&O.fabric.Object.prototype.lockSkewingX&&O.fabric.Object.prototype.lockSkewingY}setReadOnly(){O.fabric.Object.prototype.lockMovementX=!0,O.fabric.Object.prototype.lockMovementY=!0,O.fabric.Object.prototype.lockRotation=!0,O.fabric.Object.prototype.lockScalingFlip=!0,O.fabric.Object.prototype.lockScalingX=!0,O.fabric.Object.prototype.lockScalingY=!0,O.fabric.Object.prototype.lockSkewingX=!0,O.fabric.Object.prototype.lockSkewingY=!0}setReadAndWrite(){O.fabric.Object.prototype.lockMovementX=!1,O.fabric.Object.prototype.lockMovementY=!1,O.fabric.Object.prototype.lockRotation=!1,O.fabric.Object.prototype.lockScalingFlip=!1,O.fabric.Object.prototype.lockScalingX=!1,O.fabric.Object.prototype.lockScalingY=!1,O.fabric.Object.prototype.lockSkewingX=!1,O.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 O.fabric.Point(5,0))}panRight(){this.relativePan(new O.fabric.Point(-5,0))}panUp(){this.relativePan(new O.fabric.Point(0,5))}panDown(){this.relativePan(new O.fabric.Point(0,-5))}resetPan(){this.absolutePan(new O.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);O.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 r=new O.fabric.Pattern({source:e.getElement(),repeat:"repeat"});this.setBackgroundColor(r,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 T(e){return 3===e.button}function R(e){e.on("mouse:wheel",(function(t){const n=t.e.deltaY;let r=e.getZoom();r*=.999**n,r>20&&(r=20),r<.01&&(r=.01),e.zoomToPoint({x:t.e.offsetX,y:t.e.offsetY},r),t.e.preventDefault(),t.e.stopPropagation()}))}function C(e){let t,n,r=S;e.discardActiveObject(),e.on("mouse:up",(function(t){T(t)&&(r=S,e.defaultCursor="default")})),e.on("mouse:down",(a=>{T(a)&&(e.defaultCursor="move",r=E,t=a.e.clientX,n=a.e.clientY)})),e.on("mouse:move",(a=>{if(r===E&&a&&a.e){let r=0,o=0;t&&(r=a.e.clientX-t),n&&(o=a.e.clientY-n),t=a.e.clientX,n=a.e.clientY;const i=new O.fabric.Point(r,o);e.relativePan(i),e.fire("moved")}}))}var I=n(416),D=n(385);const k=["icon","classNameIcon","classNameContent"],L=i().memo((e=>{const{icon:t,classNameIcon:n,classNameContent:r}=e,a=(0,I.A)(e,k),o=(0,D.Cp)(e);return(0,l.jsxs)("button",Object.assign({},a,o,{className:`${e.className} text-accent-secondary hover:text-accent-primary [&.active]:text-accent-primary disabled:hover:text-accent-secondary disabled:opacity-50`,children:[(0,l.jsx)(_.FontAwesomeIcon,{icon:null!=t?t:s.faXmark,className:null!=n?n:""}),(0,l.jsx)("div",{className:r,children:e.children})]}))})),N=(require("@tanstack/react-table"),i().memo((e=>{const{className:t}=e;return(0,l.jsx)("div",{className:`inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite] ${t}`,role:"status",children:(0,l.jsx)("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]",children:"Loading..."})})}))),A=["children","isLoading","disabled"],j=i().memo((e=>{const t=(0,D.Cp)(e),{children:n,isLoading:r,disabled:a}=e,o=(0,I.A)(e,A);return(0,l.jsxs)("button",Object.assign({},o,t,{disabled:a||r,type:"button","data-te-toggle":"button",className:`button--primary inline-block min-w-[75px] rounded px-5 py-2 text-xs font-medium uppercase leading-tight shadow-md transition duration-75 ease-in-out hover:shadow-lg focus:shadow-lg focus:outline-none focus:ring-0 active:shadow-lg ${e.className}`,children:[r&&(0,l.jsx)(N,{className:"icon !h-4 !w-4"}),!r&&n]}))})),F="modalRoot";var M=n(221);const P=["key"],z="hidden.te.modal";function B(e){const t=[];return"boolean"!=typeof e&&e&&e.forEach(((e,n,r)=>{const a=(0,D.Cp)(e),{key:o}=e,i=(0,I.A)(e,P);t.push((0,l.jsx)(j,Object.assign({},i,a,{className:`${0!==n&&r.length>1?"ml-3":""} ${e.className}`}),o))})),t}const H=(0,o.forwardRef)(((e,t)=>{var n;const{id:r,onHiddenModal:a}=e,i=null!=(n=e.size)?n:"md",c=(0,o.useRef)();return(0,o.useEffect)((()=>{function e(){a&&a()}const t=document.getElementById(r);return!c.current&&t&&(c.current=new M.Modal(t)),t&&t.addEventListener(z,e),()=>{t&&t.removeEventListener(z,e)}}),[r,a]),(0,o.useImperativeHandle)(t,(()=>({showModal:()=>{c.current.show()},hideModal:()=>{c.current.hide(),c.current=void 0}}))),(0,l.jsx)("div",{"data-te-modal-init":!0,className:"fixed left-0 top-8 bottom-0 z-[1055] hidden h-auto w-full overflow-y-auto overflow-x-hidden outline-none",id:r,tabIndex:-1,"aria-labelledby":`${r}Label`,children:(0,l.jsx)("div",{"data-te-modal-dialog-ref":!0,className:"pointer-events-none relative flex min-h-[calc(100%-1rem)] w-auto translate-y-[-50px] items-center justify-center opacity-0 transition-all duration-300 ease-in-out min-[576px]:mx-5 min-[576px]:my-7 min-[576px]:min-h-[calc(100%-3.5rem)]",children:(0,l.jsxs)("div",{className:`pointer-events-auto relative flex ${(()=>{switch(i){case"sm":return"w-[25rem]";case"md":return"w-[40rem]";case"lg":return"w-[70rem]";case"full":return"w-full"}})()} ${"full"===e.size?"mx-5":""} bg-primary flex-col rounded-md border-none bg-clip-padding text-current shadow-lg outline-none`,children:[(0,l.jsxs)("div",{className:"border-secondary flex flex-shrink-0 items-center justify-between rounded-t-md border-b-2 border-opacity-50 p-4",children:[(0,l.jsx)("h5",{className:"text-accent-primary text-xl font-medium leading-normal pointer-events-none",id:`${r}Label`,children:e.title}),(0,l.jsx)("button",{type:"button",className:"box-content rounded-none border-none hover:no-underline hover:opacity-75 focus:opacity-100 focus:shadow-none focus:outline-none","data-te-modal-dismiss":!0,"aria-label":"Close",children:(0,l.jsx)(_.FontAwesomeIcon,{icon:s.faXmark})})]}),"boolean"!=typeof e.buttons&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"modal__body",children:e.body}),(0,l.jsx)("div",{className:"modal__footer",children:B(e.buttons)})]}),"boolean"==typeof e.buttons&&e.body]})})})})),W=require("react-dom");function X(){const[e,t]=(0,o.useState)(),[n,r]=(0,o.useState)(!0),a=(0,o.useRef)(null);return(0,o.useEffect)((()=>{a.current&&(n?a.current.showModal():a.current.hideModal())}),[e,n]),{modal:e,showModal:function(e){const n=document.getElementById(F);n&&(t((0,W.createPortal)((0,l.jsx)(H,Object.assign({},e,{ref:a,onHiddenModal:()=>{t(void 0)}})),n)),r(!0))},hideModal:function(){r(!1)}}}const Y=["label","info","allowedChars","classNameRoot","key"],Z=i().memo((e=>{const[t,n]=(0,o.useState)(e.value),{info:r,classNameRoot:a,key:i}=e,s=(0,I.A)(e,Y),_=(0,D.Cp)(e);return(0,o.useEffect)((()=>{n(e.value)}),[e.value]),(0,l.jsxs)("div",{className:`relative mb-3 ${null!=a?a:""}`,children:[(0,l.jsx)("input",Object.assign({maxLength:200},s,_,{onChange:function(r){!e.allowedChars||""===r.currentTarget.value||e.allowedChars.test(r.currentTarget.value)?(n(r.currentTarget.value),e.onChange&&e.onChange(r)):t&&(r.currentTarget.value=t.toString())},"data-te-input-state-active":!0,className:`peer transition-all duration-200 ease-linear placeholder:opacity-0 motion-reduce:transition-none ${e.className}`,placeholder:e.label}),i),(0,l.jsx)("label",{htmlFor:e.id,className:(null!=t&&""!==t?"input__label -translate-y-[1.1rem] scale-[0.9]":"")+" peer-focus:text-link peer-focus:input__label pointer-events-none absolute left-3 top-0 mb-0 max-w-[90%] origin-[0_0] truncate pt-[0.37rem] leading-[1.6] drop-shadow-[0_35px_35px_rgba(0,0,0,0.25)] transition-all duration-200 ease-out peer-focus:-translate-y-[1.1rem] peer-focus:scale-[0.9] motion-reduce:transition-none",children:e.label}),r&&(0,l.jsx)("div",{className:"text-sm px-3",children:r})]})})),$=["label","className","key"],G=i().memo((e=>{const{label:t,className:n,key:r}=e,a=(0,I.A)(e,$),i=(0,D.Cp)(e);return(0,o.useEffect)((()=>{const t=document.querySelector(`#${e.id}`);M.Select.getInstance(t)||new M.Select(document.querySelector(`#${e.id}`),{},{dropdown:"select__dropdown",formCheckInput:"bg-red-400 checked:after:border-red-500",selectInput:"peer select__input",selectOption:"select__option data-[te-select-option-selected]:data-[te-input-state-active]:link",selectLabelSizeDefault:"select__label-size-default",selectLabel:"select__label",selectArrow:"select__arrow top-[0.65rem]"})})),(0,l.jsxs)("div",{className:`relative mb-3 ${n}`,children:[(0,l.jsx)("select",Object.assign({"data-te-select-init":!0},a,i,{children:function(){const t=[];return e.options.forEach((e=>{var n;t.push((0,l.jsx)("option",{value:e.value,children:e.label},null==(n=e.value)?void 0:n.toString()))})),t}()}),r),(0,l.jsx)("label",{"data-te-select-label-ref":!0,children:t})]})})),U=(require("react-html-parser"),i().memo((({tags:e,className:t})=>(0,l.jsx)("ul",{className:`tags ${null!=t?t:""}`,children:e.map(((e,t)=>(0,l.jsx)("li",{children:e},t)))})))),q=(require("@yaireo/tagify"),e=>{var t;const{className:n,options:r}=e;return(0,l.jsx)("div",{className:`flex justify-center ${null!=n?n:""}`,id:null!=(t=e.id)?t:"",children:r.map(((t,n)=>(0,l.jsxs)("div",{className:"mb-[0.125rem] me-4 inline-block min-h-[1.5rem] ps-[1.5rem]",children:[(0,l.jsx)("input",{className:"relative float-left -ms-[1.5rem] me-1 mt-0.5 h-5 w-5 appearance-none rounded-full border-2 border-solid border-secondary-500 before:pointer-events-none before:absolute before:h-4 before:w-4 before:scale-0 before:rounded-full before:bg-transparent before:opacity-0 before:shadow-checkbox before:shadow-transparent before:content-[''] after:absolute after:z-[1] after:block after:h-4 after:w-4 after:rounded-full after:content-[''] checked:border-accent-secondary checked:before:opacity-[0.16] checked:after:absolute checked:after:left-1/2 checked:after:top-1/2 checked:after:h-[0.625rem] checked:after:w-[0.625rem] checked:after:rounded-full checked:after:border-accent-secondary checked:after:bg-accent-primary checked:after:content-[''] checked:after:[transform:translate(-50%,-50%)] hover:before:opacity-[0.04] hover:before:shadow-black/60 focus:shadow-none focus:outline-none focus:ring-0 focus:before:scale-100 focus:before:opacity-[0.12] focus:before:shadow-black/60 focus:before:transition-[box-shadow_0.2s,transform_0.2s] checked:focus:border-accent-secondary checked:focus:before:scale-100 checked:focus:before:shadow-checkbox checked:focus:before:transition-[box-shadow_0.2s,transform_0.2s] rtl:float-right "+(e.disabled?"":"hover:cursor-pointer"),type:"radio",name:`inlineRadioOptions-${e.id}`,id:`option-${e.id}-${n}`,value:JSON.stringify(t.value),onChange:()=>{e.onChange(t.value)},checked:JSON.stringify(t.value)===JSON.stringify(e.value),disabled:e.disabled}),(0,l.jsx)("label",{className:"mt-px inline-block ps-[0.15rem] "+(e.disabled?"":"hover:cursor-pointer"),htmlFor:e.disabled?void 0:`option-${e.id}-${n}`,children:t.label})]},`radioOption${n}`)))})});require("react-color"),n(735),n(691),n(423)}},l={};function s(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={id:e,loaded:!1,exports:{}};return i[e](n,n.exports,s),n.loaded=!0,n.exports}e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",n="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",r=e=>{e&&e.d<1&&(e.d=1,e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},s.a=(a,o,i)=>{var l;i&&((l=[]).d=-1);var s,_,c,u=new Set,d=a.exports,g=new Promise(((e,t)=>{c=t,_=e}));g[t]=d,g[e]=e=>(l&&e(l),u.forEach(e),g.catch((e=>{}))),a.exports=g,o((a=>{var o;s=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[e])return a;if(a.then){var o=[];o.d=0,a.then((e=>{i[t]=e,r(o)}),(e=>{i[n]=e,r(o)}));var i={};return i[e]=e=>e(o),i}}var l={};return l[e]=e=>{},l[t]=a,l})))(a);var i=()=>s.map((e=>{if(e[n])throw e[n];return e[t]})),_=new Promise((t=>{(o=()=>t(i)).r=0;var n=e=>e!==l&&!u.has(e)&&(u.add(e),e&&!e.d&&(o.r++,e.push(o)));s.map((t=>t[e](n)))}));return o.r?_:i()}),(e=>(e?c(g[n]=e):_(d),r(l)))),l&&l.d<0&&(l.d=0)},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var n=Object.create(null);s.r(n);var r={};a=a||[null,o({}),o([]),o(o)];for(var i=2&t&&e;"object"==typeof i&&!~a.indexOf(i);i=o(i))Object.getOwnPropertyNames(i).forEach((t=>r[t]=()=>e[t]));return r.default=()=>e,s.d(n,r),n},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.v=(e,t,n,r)=>{var a=fetch(s.p+""+n+".module.wasm"),o=()=>a.then((e=>e.arrayBuffer())).then((e=>WebAssembly.instantiate(e,r))).then((t=>Object.assign(e,t.instance.exports)));return a.then((t=>"function"==typeof WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(t,r).then((t=>Object.assign(e,t.instance.exports)),(e=>{if("application/wasm"!==t.headers.get("Content-Type"))return console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e),o();throw e})):o()))},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})();var _={};s.r(_),s.d(_,{default:()=>g});var c=s(15),u=s(732);const d=()=>null,g=e=>{const[t,n]=(0,c.useState)((()=>d));return(0,c.useEffect)((()=>{Promise.resolve().then(s.bind(s,334)).then((e=>n((()=>e.default))))}),[]),(0,u.jsx)(t,Object.assign({},e))};module.exports=_})();
package/main.css CHANGED
@@ -939,6 +939,8 @@ video {
939
939
  bottom: 0px;
940
940
  }.bottom-0\.5 {
941
941
  bottom: 0.125rem;
942
+ }.bottom-1 {
943
+ bottom: 0.25rem;
942
944
  }.bottom-1\/2 {
943
945
  bottom: 50%;
944
946
  }.bottom-5 {
@@ -1098,6 +1100,8 @@ video {
1098
1100
  margin-bottom: auto;
1099
1101
  }.\!mb-0 {
1100
1102
  margin-bottom: 0px !important;
1103
+ }.\!mr-3 {
1104
+ margin-right: 0.75rem !important;
1101
1105
  }.\!mt-4 {
1102
1106
  margin-top: 1rem !important;
1103
1107
  }.-ml-\[1\.5rem\] {
@@ -1128,6 +1132,8 @@ video {
1128
1132
  margin-inline-end: 0.25rem;
1129
1133
  }.me-4 {
1130
1134
  margin-inline-end: 1rem;
1135
+ }.me-\[6px\] {
1136
+ margin-inline-end: 6px;
1131
1137
  }.ml-1 {
1132
1138
  margin-left: 0.25rem;
1133
1139
  }.ml-2 {
@@ -1138,6 +1144,8 @@ video {
1138
1144
  margin-left: 1.25rem;
1139
1145
  }.ml-6 {
1140
1146
  margin-left: 1.5rem;
1147
+ }.ml-\[0\.1rem\] {
1148
+ margin-left: 0.1rem;
1141
1149
  }.ml-\[30px\] {
1142
1150
  margin-left: 30px;
1143
1151
  }.ml-\[3px\] {
@@ -1194,6 +1202,8 @@ video {
1194
1202
  margin-top: 2rem;
1195
1203
  }.mt-\[0\.15rem\] {
1196
1204
  margin-top: 0.15rem;
1205
+ }.mt-\[0\.85rem\] {
1206
+ margin-top: 0.85rem;
1197
1207
  }.mt-\[3px\] {
1198
1208
  margin-top: 3px;
1199
1209
  }.mt-px {
@@ -1364,6 +1374,8 @@ video {
1364
1374
  width: 6rem;
1365
1375
  }.w-3 {
1366
1376
  width: 0.75rem;
1377
+ }.w-32 {
1378
+ width: 8rem;
1367
1379
  }.w-36 {
1368
1380
  width: 9rem;
1369
1381
  }.w-4 {
@@ -1707,6 +1719,8 @@ video {
1707
1719
  align-items: flex-end;
1708
1720
  }.items-center {
1709
1721
  align-items: center;
1722
+ }.\!justify-start {
1723
+ justify-content: flex-start !important;
1710
1724
  }.justify-end {
1711
1725
  justify-content: flex-end;
1712
1726
  }.justify-center {
@@ -1732,6 +1746,8 @@ video {
1732
1746
  --tw-space-x-reverse: 0;
1733
1747
  margin-right: calc(1rem * var(--tw-space-x-reverse));
1734
1748
  margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
1749
+ }.self-start {
1750
+ align-self: flex-start;
1735
1751
  }.self-stretch {
1736
1752
  align-self: stretch;
1737
1753
  }.overflow-auto {
@@ -1926,6 +1942,9 @@ video {
1926
1942
  }.\!bg-danger-100 {
1927
1943
  --tw-bg-opacity: 1 !important;
1928
1944
  background-color: rgb(250 229 233 / var(--tw-bg-opacity)) !important;
1945
+ }.\!bg-green-700 {
1946
+ --tw-bg-opacity: 1 !important;
1947
+ background-color: rgb(21 128 61 / var(--tw-bg-opacity)) !important;
1929
1948
  }.\!bg-neutral-100 {
1930
1949
  --tw-bg-opacity: 1 !important;
1931
1950
  background-color: rgb(245 245 245 / var(--tw-bg-opacity)) !important;
@@ -2231,6 +2250,8 @@ video {
2231
2250
  vertical-align: bottom;
2232
2251
  }.align-\[-0\.125em\] {
2233
2252
  vertical-align: -0.125em;
2253
+ }.font-mono {
2254
+ font-family: ui-monospace, monospace;
2234
2255
  }.\!text-xl {
2235
2256
  font-size: 1.25rem !important;
2236
2257
  line-height: 1.75rem !important;
@@ -2315,6 +2336,8 @@ video {
2315
2336
  line-height: 1.5;
2316
2337
  }.leading-\[1\.6\] {
2317
2338
  line-height: 1.6;
2339
+ }.leading-\[1\.7\] {
2340
+ line-height: 1.7;
2318
2341
  }.leading-\[2\.15\] {
2319
2342
  line-height: 2.15;
2320
2343
  }.leading-\[40px\] {
@@ -2765,6 +2788,9 @@ video {
2765
2788
  }.checked\:after\:ml-\[0\.25rem\]:checked::after {
2766
2789
  content: var(--tw-content);
2767
2790
  margin-left: 0.25rem;
2791
+ }.checked\:after\:ms-\[0\.25rem\]:checked::after {
2792
+ content: var(--tw-content);
2793
+ margin-inline-start: 0.25rem;
2768
2794
  }.checked\:after\:block:checked::after {
2769
2795
  content: var(--tw-content);
2770
2796
  display: block;
@@ -3091,6 +3117,9 @@ video {
3091
3117
  }.checked\:focus\:after\:ml-\[0\.25rem\]:focus:checked::after {
3092
3118
  content: var(--tw-content);
3093
3119
  margin-left: 0.25rem;
3120
+ }.checked\:focus\:after\:ms-\[0\.25rem\]:focus:checked::after {
3121
+ content: var(--tw-content);
3122
+ margin-inline-start: 0.25rem;
3094
3123
  }.checked\:focus\:after\:h-\[0\.8125rem\]:focus:checked::after {
3095
3124
  content: var(--tw-content);
3096
3125
  height: 0.8125rem;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "React library to render C4 Model diagrams created with Keadex Mina.",
4
4
  "author": "Keadex <keadex.it@gmail.com>",
5
5
  "license": "MIT",
6
- "version": "2.7.1",
6
+ "version": "2.9.0",
7
7
  "private": false,
8
8
  "homepage": "https://keadex.dev",
9
9
  "repository": {
Binary file
Binary file