@next-bricks/diagram 0.42.8 → 0.42.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +1 -1
- package/dist/chunks/{1371.442bf966.js → 1371.218524fa.js} +2 -2
- package/dist/chunks/{1371.442bf966.js.map → 1371.218524fa.js.map} +1 -1
- package/dist/chunks/{2416.26e2c5da.js → 2416.eaefd889.js} +2 -2
- package/dist/chunks/{2416.26e2c5da.js.map → 2416.eaefd889.js.map} +1 -1
- package/dist/chunks/{3171.6f1d29dd.js → 3171.9a74d0e1.js} +2 -2
- package/dist/chunks/{3171.6f1d29dd.js.map → 3171.9a74d0e1.js.map} +1 -1
- package/dist/chunks/3933.e4f7efe6.js +2 -0
- package/dist/chunks/{6314.9ad0e0c5.js.map → 3933.e4f7efe6.js.map} +1 -1
- package/dist/chunks/4017.2680d65a.js +3 -0
- package/dist/chunks/{4017.57c2da6f.js.map → 4017.2680d65a.js.map} +1 -1
- package/dist/chunks/{4837.230db1f8.js → 4837.a685aa89.js} +2 -2
- package/dist/chunks/{4837.230db1f8.js.map → 4837.a685aa89.js.map} +1 -1
- package/dist/chunks/5399.1f67d9c4.js +2 -0
- package/dist/chunks/5399.1f67d9c4.js.map +1 -0
- package/dist/chunks/{5552.7a071072.js → 5552.69fe3835.js} +2 -2
- package/dist/chunks/{5552.7a071072.js.map → 5552.69fe3835.js.map} +1 -1
- package/dist/chunks/6314.d82ad8ed.js +2 -0
- package/dist/chunks/{3933.2ad1c91c.js.map → 6314.d82ad8ed.js.map} +1 -1
- package/dist/chunks/6773.8b791d47.js +2 -0
- package/dist/chunks/6773.8b791d47.js.map +1 -0
- package/dist/chunks/{7218.49d6f1ce.js → 7218.96746625.js} +2 -2
- package/dist/chunks/{7218.49d6f1ce.js.map → 7218.96746625.js.map} +1 -1
- package/dist/chunks/799.68fd97c4.js +3 -0
- package/dist/chunks/799.68fd97c4.js.map +1 -0
- package/dist/chunks/eo-display-canvas.e43ca2e5.js +2 -0
- package/dist/chunks/{eo-display-canvas.a7443413.js.map → eo-display-canvas.e43ca2e5.js.map} +1 -1
- package/dist/chunks/eo-draw-canvas.91b46e0d.js +2 -0
- package/dist/chunks/{eo-draw-canvas.e74e9ce4.js.map → eo-draw-canvas.91b46e0d.js.map} +1 -1
- package/dist/chunks/main.30b4fffd.js +2 -0
- package/dist/chunks/main.30b4fffd.js.map +1 -0
- package/dist/examples.json +3 -3
- package/dist/index.36ae90a9.js +2 -0
- package/dist/index.36ae90a9.js.map +1 -0
- package/dist/manifest.json +77 -77
- package/package.json +2 -2
- package/dist/chunks/3657.62b00acc.js +0 -3
- package/dist/chunks/3657.62b00acc.js.map +0 -1
- package/dist/chunks/3933.2ad1c91c.js +0 -2
- package/dist/chunks/4017.57c2da6f.js +0 -3
- package/dist/chunks/5399.004ae086.js +0 -2
- package/dist/chunks/5399.004ae086.js.map +0 -1
- package/dist/chunks/6314.9ad0e0c5.js +0 -2
- package/dist/chunks/6773.9e6346d4.js +0 -2
- package/dist/chunks/6773.9e6346d4.js.map +0 -1
- package/dist/chunks/eo-display-canvas.a7443413.js +0 -2
- package/dist/chunks/eo-draw-canvas.e74e9ce4.js +0 -2
- package/dist/chunks/main.a67553ed.js +0 -2
- package/dist/chunks/main.a67553ed.js.map +0 -1
- package/dist/index.7b880ff1.js +0 -2
- package/dist/index.7b880ff1.js.map +0 -1
- /package/dist/chunks/{4017.57c2da6f.js.LICENSE.txt → 4017.2680d65a.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{3657.62b00acc.js.LICENSE.txt → 799.68fd97c4.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[3933,6314],{3933:(e,t,o)=>{function n(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(r,s){if("string"==typeof t?r.name===t:t.includes(r.name)){const t=[];for(let i=1;i<=o;i++){const o=s[s.length-i];if("MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key){const s=o.node;s.computed||"Identifier"!==s.property.type?s.computed&&"Literal"===s.property.type&&"string"==typeof s.property.value?t.push(n?`${r.name}.${s.property.value}`:s.property.value):e.hasNonStaticUsage=!0:t.push(n?`${r.name}.${s.property.name}`:s.property.name)}else e.hasNonStaticUsage=!0}t.length===o&&e.usedProperties.add(t.join("."))}}}function r(e,t){return function(o,n,r){if(n.name===e){const e=r[r.length-1],n=r[r.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==e?void 0:e.node.type)&&"object"===e.key&&(e.node.computed?"Literal"===e.node.property.type&&e.node.property.value===t:"Identifier"===e.node.property.type&&e.node.property.name===t)){const e=n.node.arguments;if(e.length>0){const t=e[0];"Literal"===t.type&&"string"==typeof t.value?o.usedArgs.add(t.value):o.hasNonStaticUsage=!0}}}}}o.r(t),o.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>s,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>p,collectMemberUsageInFunction:()=>S,createProviderClass:()=>c.createProviderClass,scanPermissionActionsInAny:()=>P,scanPermissionActionsInStoryboard:()=>v,strictCollectMemberUsage:()=>l,track:()=>f,trackAll:()=>y,traverseStoryboardExpressions:()=>u,traverseStoryboardFunction:()=>g,traverseStoryboardFunctions:()=>h,unwrapProvider:()=>c.unwrapProvider});const s=r("APP","getMenu"),i=r("INSTALLED_APPS","has");var a=o(8897),c=o(1351);function u(e,t,o){const n=new WeakSet,{matchExpressionString:r,visitNotMatchedExpressionString:s,visitNonExpressionString:i,visitObject:u}="string"==typeof o?{matchExpressionString:e=>e.includes(o)}:o;!function e(o){if("string"==typeof o)if((0,a.isEvaluable)(o))if(r(o))try{(0,a.preevaluate)(o,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,o)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==s||s(o);else null==i||i(o);else if((0,c.isObject)(o)){if(n.has(o))return;n.add(o),null==u||u(o);for(const t of Array.isArray(o)?o:Object.values(o))e(t)}}(e)}function l(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{hasNonStaticUsage:n,nonStaticUsage:r,usedProperties:s}=p(e,t,o);if(n)throw new Error(`Non-static usage of ${t} is prohibited, check your expression: "${r}"`);return s}function p(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r={usedProperties:new Set,hasNonStaticUsage:!1},s=n(r,t,o);return u(e,((e,t,o)=>{s(e,t),r.hasNonStaticUsage&&(r.nonStaticUsage=o)}),t),r}const d=["CTX","STATE","FORM_STATE"];function f(e,t,o){if(e.includes(t)){const r={usedProperties:new Set,hasNonStaticUsage:!1},{expression:s}=(0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(r,o)}});let i;if("SequenceExpression"===s.type&&(i=s.expressions[0])&&"Literal"===i.type&&i.value===t){if(r.usedProperties.size>0)return r.usedProperties;console.warn(`You are using "${t}" but no \`${o}\` usage found in your expression: ${JSON.stringify(e)}`)}}return!1}function y(e){if(d.some((t=>e.includes(t)))){const t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(t,d,1,!0)}}),t.usedProperties.size>0){const e=[...t.usedProperties],o={context:!1,state:!1,formState:!1},n={CTX:"context",STATE:"state",FORM_STATE:"formState"};return e.forEach((e=>{const[t,r]=e.split(".");o[n[t]]||(o[n[t]]=[]),o[n[t]].push(r)})),o}console.warn(`You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: ${JSON.stringify(e)}`)}return!1}function h(e,t,o){if(Array.isArray(e))for(const n of e)null!=o&&o.matchSource&&!o.matchSource(n.source)||g(n,t)}function g(e,t,o){try{(0,a.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t},cacheKey:e})}catch(t){o||console.error(`Parse storyboard function "${e.name}" failed:`,t)}}function S(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const s={usedProperties:new Set,hasNonStaticUsage:!1};if(e.source.includes(t)&&g(e,n(s,t,r),o),s.hasNonStaticUsage&&!o)throw new Error(`Non-static usage of ${t} is prohibited, check your function: "${e.name}"`);return s.usedProperties.delete(e.name),s.usedProperties}const m="PERMISSIONS",b="check";function v(e){const t=new Set,o=k(t),{customTemplates:n,functions:r}=e.meta??{};return u([e.routes,n],o,m),h(r,o,{matchSource:e=>e.includes(m)}),Array.from(t)}function P(e){const t=new Set;return u(e,k(t),m),Array.from(t)}function k(e){return function(t,o){if(t.name===m){const t=o[o.length-1],n=o[o.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==t?void 0:t.node.type)&&"object"===t.key&&(t.node.computed?"Literal"===t.node.property.type&&t.node.property.value===b:"Identifier"===t.node.property.type&&t.node.property.name===b))for(const t of n.node.arguments)"Literal"===t.type&&"string"==typeof t.value&&e.add(t.value)}}}}}]);
|
|
2
|
-
//# sourceMappingURL=3933.2ad1c91c.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 4017.57c2da6f.js.LICENSE.txt */
|
|
2
|
-
"use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[4017,8939],{9711:(e,t,n)=>{n.r(t);var a,i=n(4635),s=n(918),l=n(6902),o=n(5536),r=n(6121),h=n(829),c=n(2740),d=n(8769),u=n.n(d),p=n(4782),g=n(1389),A=(n(6477),n(7566)),f=n(9047),y=n(3373),v=n.n(y),b=n(1030),m=n(9126),k=n(8892),w=n(5157),_=n(8308),x=n(9576),M=n(9137),C=n(2547),E=n(1803),N=n(3739),W=n(9191),T=n(6671),R=n(8060),S=n(2448),z=n(8657),$=n(8069),L=n(1324),B=n(821),D=n(9741),P=n(2673),O=n(5987);let H,I,K,U,Y,V,j,X,q,F,Z,J,G,Q,ee,te,ne,ae,ie,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe;const{defineElement:He,property:Ie,event:Ke,method:Ue}=(0,p.createDecorators)(),Ye=(0,d.forwardRef)(wt);let Ve;var je=new WeakMap,Xe=new WeakMap,qe=new WeakMap,Fe=new WeakMap,Ze=new WeakMap,Je=new WeakMap,Ge=new WeakMap,Qe=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,at=new WeakMap,it=new WeakMap,st=new WeakMap,lt=new WeakMap,ot=new WeakSet,rt=new WeakMap,ht=new WeakMap,ct=new WeakMap,dt=new WeakMap,ut=new WeakMap,pt=new WeakMap,gt=new WeakMap,At=new WeakMap,ft=new WeakMap,yt=new WeakMap,vt=new WeakMap,bt=new WeakMap,mt=new WeakMap;class kt extends g.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,ot),(0,s.A)(this,je,(H(this),K(this))),(0,s.A)(this,Xe,(U(this),Y(this))),(0,s.A)(this,qe,(V(this),j(this))),(0,s.A)(this,Fe,(X(this),q(this))),(0,s.A)(this,Ze,(F(this),Z(this))),(0,s.A)(this,Je,(J(this),G(this))),(0,s.A)(this,Ge,(Q(this),ee(this))),(0,s.A)(this,Qe,(te(this),ne(this))),(0,s.A)(this,et,(ae(this),ie(this))),(0,s.A)(this,tt,(se(this),le(this))),(0,s.A)(this,nt,(oe(this),re(this,!0))),(0,s.A)(this,at,(he(this),ce(this,!0))),(0,s.A)(this,it,(de(this),ue(this,!0))),(0,s.A)(this,st,(pe(this),ge(this))),(0,s.A)(this,lt,(Ae(this),fe(this))),(0,s.A)(this,rt,(be(this),e=>{(0,o.A)(ot,this,ye).emit(e)})),(0,s.A)(this,ht,me(this)),(0,s.A)(this,ct,(_e(this),e=>{(0,o.A)(ot,this,ke).emit(e)})),(0,s.A)(this,dt,xe(this)),(0,s.A)(this,ut,(Ee(this),e=>{(0,o.A)(ot,this,Me).emit(e)})),(0,s.A)(this,pt,Ne(this)),(0,s.A)(this,gt,(Re(this),e=>{(0,o.A)(ot,this,We).emit(e)})),(0,s.A)(this,At,Se(this)),(0,s.A)(this,ft,(Le(this),e=>{(0,o.A)(ot,this,ze).emit(e)})),(0,s.A)(this,yt,Be(this)),(0,s.A)(this,vt,(Oe(this),e=>{(0,o.A)(ot,this,De).emit(e)})),(0,s.A)(this,bt,(e=>{(0,P.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,s.A)(this,mt,(0,d.createRef)())}get layout(){return(0,h.A)(je,this)}set layout(e){(0,r.A)(je,this,e)}get nodes(){return(0,h.A)(Xe,this)}set nodes(e){(0,r.A)(Xe,this,e)}get edges(){return(0,h.A)(qe,this)}set edges(e){(0,r.A)(qe,this,e)}get nodeBricks(){return(0,h.A)(Fe,this)}set nodeBricks(e){(0,r.A)(Fe,this,e)}get lines(){return(0,h.A)(Ze,this)}set lines(e){(0,r.A)(Ze,this,e)}get layoutOptions(){return(0,h.A)(Je,this)}set layoutOptions(e){(0,r.A)(Je,this,e)}get activeTarget(){return(0,h.A)(Ge,this)}set activeTarget(e){(0,r.A)(Ge,this,e)}get disableKeyboardAction(){return(0,h.A)(Qe,this)}set disableKeyboardAction(e){(0,r.A)(Qe,this,e)}get connectNodes(){return(0,h.A)(et,this)}set connectNodes(e){(0,r.A)(et,this,e)}get dragNodes(){return(0,h.A)(tt,this)}set dragNodes(e){(0,r.A)(tt,this,e)}get zoomable(){return(0,h.A)(nt,this)}set zoomable(e){(0,r.A)(nt,this,e)}get scrollable(){return(0,h.A)(at,this)}set scrollable(e){(0,r.A)(at,this,e)}get pannable(){return(0,h.A)(it,this)}set pannable(e){(0,r.A)(it,this,e)}get scaleRange(){return(0,h.A)(st,this)}set scaleRange(e){(0,r.A)(st,this,e)}callOnLineLabel(e,t){for(var n,a=arguments.length,i=new Array(a>2?a-2:0),s=2;s<a;s++)i[s-2]=arguments[s];null===(n=(0,h.A)(mt,this).current)||void 0===n||n.callOnLineLabel(e,t,...i)}render(){return u().createElement(Ye,{ref:(0,h.A)(mt,this),layout:this.layout,nodes:this.nodes,edges:this.edges,nodeBricks:this.nodeBricks,lines:this.lines,layoutOptions:this.layoutOptions,connectNodes:this.connectNodes,dragNodes:this.dragNodes,activeTarget:this.activeTarget,disableKeyboardAction:this.disableKeyboardAction,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:(0,h.A)(rt,this),onSwitchActiveTarget:(0,h.A)(bt,this),onNodeDelete:(0,h.A)(ct,this),onEdgeDelete:(0,h.A)(ut,this),onLineClick:(0,h.A)(gt,this),onLineDoubleClick:(0,h.A)(ft,this),onNodesConnect:(0,h.A)(vt,this)})}}function wt(e,t){let{layout:n,nodes:a,edges:i,nodeBricks:s,lines:l,layoutOptions:o,connectNodes:r,dragNodes:h,activeTarget:c,disableKeyboardAction:p,zoomable:g,scrollable:y,pannable:B,scaleRange:H,onActiveTargetChange:I,onSwitchActiveTarget:K,onNodeDelete:U,onEdgeDelete:Y,onLineClick:V,onLineDoubleClick:j,onNodesConnect:X}=e;const[q,F]=(0,d.useState)(!1),[Z,J]=(0,d.useState)(0),[G,Q]=(0,d.useState)(null),[ee,te]=(0,d.useState)(!1),[ne,ae]=(0,d.useState)(0),[ie,se]=(0,d.useState)(null),[le,oe]=(0,d.useState)([]),[re,he]=(0,d.useState)(!1),[ce,de]=(0,d.useState)({k:1,x:0,y:0}),ue=(0,d.useRef)(new Map),pe=(0,d.useRef)(null),ge=(0,d.useRef)(null),[Ae,fe]=(0,d.useState)(!1),{userViewReady:ye,userViewNodesMap:ve,saveUserView:be}=(0,D._)(null==h?void 0:h.save),[me,ke]=(0,d.useState)([0,0]),[we,_e]=(0,d.useState)(null),[xe,Me]=(0,d.useState)("initial"),[Ce,Ee]=(0,d.useState)(null);(0,d.useImperativeHandle)(t,(()=>({callOnLineLabel(e,t){for(var n,a=arguments.length,i=new Array(a>2?a-2:0),s=2;s<a;s++)i[s-2]=arguments[s];null==ie||null===(n=ie.get(e))||void 0===n||null===(n=n.firstElementChild)||void 0===n||n[t](...i)}}))),(0,d.useEffect)((()=>{const e=e=>{(0,S.P)(e,{nodes:a,nodesRefRepository:G,connectNodes:r,dragNodes:h,scale:ce.k,setConnectLineState:_e,setConnectLineTo:ke,setManualLayoutStatus:Me,setNodeMovement:Ee,onSwitchActiveTarget:K,onNodesConnect:X})},t=ge.current;return null==t||t.addEventListener("mousedown",e),()=>{null==t||t.removeEventListener("mousedown",e)}}),[a,r,h,ce.k,G,X,K]);const{normalizedLines:Ne,normalizedLinesMap:We,markers:Te}=(0,d.useMemo)((()=>(0,M.t)(i,l)),[i,l]),Re=(0,d.useMemo)((()=>Ne.flatMap((e=>{let t,n,{line:{text:a,label:i,$id:s},edge:l}=e;return a||i?(i?(t="label",n=[].concat(i)):(t="text",n=[].concat(a)),n.map((e=>({[t]:e,id:`${s}-${e.placement??"center"}`,edge:l})))):[]}))),[Ne]),{nodes:Se,edges:ze}=(0,$.o)({layout:n,nodes:a,edges:i,manualLayoutStatus:xe,userViewReady:ye,userViewNodesMap:ve,nodeMovement:Ce,nodesRefRepository:G,lineLabelsRefRepository:ie,normalizedLinesMap:We,layoutOptions:o,nodesRenderId:Z,lineLabelsRenderId:ne});(0,d.useEffect)((()=>{"finished"===xe&&be(Se.map((e=>({id:e.id,x:e.x,y:e.y}))))}),[xe]);const $e=(0,d.useMemo)((()=>(0,x.R)(ze,Se,Ne)),[Ne,Se,ze]),Le=c??null,[Be,De]=(0,d.useState)(Le);(0,d.useEffect)((()=>{De((e=>(0,P.c)(e,Le)?e:Le))}),[Le]);const Pe=(0,d.useRef)(!1);(0,d.useEffect)((()=>{Pe.current?null==I||I(Be):Pe.current=!0}),[Be,I]),(0,d.useEffect)((()=>{const e=pe.current;if(!e||p)return;const t=e=>{const t=(0,w.a)(e,{renderedNodes:Se,activeTarget:Be});"delete-node"===(null==t?void 0:t.action)?null==U||U(t.node):"delete-edge"===(null==t?void 0:t.action)?null==Y||Y(t.edge):"switch-active-node"===(null==t?void 0:t.action)&&t.node&&(null==K||K({type:"node",nodeId:t.node.id}))};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[Be,Se,p,K,U,Y]);const Oe=(0,d.useCallback)((e=>{e&&(J((e=>e+1)),Q(e)),F((t=>t||!!e))}),[]),He=(0,d.useCallback)((e=>{e&&(ae((e=>e+1)),se(e)),te((t=>t||!!e))}),[]),Ie=(0,d.useMemo)((()=>H??[z.sS,z.Yt]),[H]),Ke=(0,d.useMemo)((()=>(0,f.s_)()),[]);(0,d.useEffect)((()=>{let e=!1;Ke.scaleExtent(g?Ie:[1,1]).on("start",(()=>{e=!1,he(!0)})).on("zoom",(t=>{e=!0,de(t.transform)})).on("end",(()=>{he(!1),e||null==K||K(null)}))}),[K,Ie,g,Ke]),(0,d.useEffect)((()=>{const e=pe.current;if(!e)return;const t=(0,A.A)(e),n=()=>{t.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(g||y||B)return(g||y)&&t.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),y&&(e.preventDefault(),Ke.translateBy(t,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),t.call(Ke).on("wheel",(e=>e.preventDefault())).on("dblclick.zoom",null),B||t.on("mousedown.zoom",null).on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),n;n()}),[B,y,g,Ke]),(0,d.useEffect)((()=>{const e=pe.current;if(0===Se.length||!e||Ae)return;const{k:t,x:n,y:a}=(0,_.r)(Se,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:g?Ie:void 0});Ke.transform((0,A.A)(e),new f.uV(t,n,a)),fe(!0)}),[Ae,Se,Ie,g,Ke]);const Ue=(0,d.useMemo)((()=>`${(0,b.uniqueId)("diagram-")}-`),[]),Ye=`${Ue}line-arrow-`,Ve=`${Ue}mask-`,je=`${Ue}active-line-`;(0,d.useEffect)((()=>{oe((e=>(0,R.z)(e,$e,ue.current)))}),[$e]);const[Xe,qe]=u().useState(new Map);return(0,d.useEffect)((()=>{if(!ie)return;(0,L.F)(le,ie);const e=new m.A((()=>{qe((0,O.G)(le,ie))}));for(const t of ie.values())e.observe(t);return()=>{e.disconnect()}}),[ne,ie,le]),"dagre"!==n&&"force"!==n?u().createElement("div",null,`Diagram layout not supported: "${n}"`):u().createElement("div",{className:v()("diagram",{ready:q&&Ae,grabbing:re,pannable:B}),tabIndex:-1,ref:pe},u().createElement("svg",{width:"100%",height:"100%",className:"lines"},u().createElement("defs",null,Te.map(((e,t)=>{let{type:n,strokeColor:a}=e;return u().createElement(N.c,{key:t,id:`${Ye}${t}`,type:n,strokeColor:a})})),[...Xe].map((e=>{let[t,n]=e;return u().createElement(W.y,{key:t,lineId:t,rects:n,maskPrefix:Ve,renderedLineLabels:le})})),u().createElement("marker",{id:`${je}start`,viewBox:"0 0 8 8",refX:4,refY:4,markerWidth:8,markerHeight:8,orient:"auto"},u().createElement("path",{d:"M 0.5 0.5 H 7.5 V 7.5 H 0.5 Z",stroke:"var(--palette-gray-7)",strokeWidth:1,fill:"var(--palette-gray-1)"})),u().createElement("marker",{id:`${je}end`,viewBox:"0 0 14 8",refX:3,refY:4,markerWidth:14,markerHeight:8,orient:"auto"},u().createElement("path",{d:"M 0.5 1.5 L 5.5 4 L 0.5 6.5 z",stroke:"var(--palette-blue-3)",strokeWidth:1,fill:"var(--palette-blue-3)"}),u().createElement("path",{d:"M 6.5 0.5 H 13.5 V 7.5 H 6.5 Z",stroke:"var(--palette-gray-7)",strokeWidth:1,fill:"var(--palette-gray-1)"}))),u().createElement("g",{transform:`translate(${ce.x} ${ce.y}) scale(${ce.k})`},$e.map((e=>u().createElement(E.m,{key:e.line.$id,line:e,linePaths:ue.current,lineMaskRects:Xe,maskPrefix:Ve,markerPrefix:Ye,activeLineMarkerPrefix:je,active:"edge"===(null==Be?void 0:Be.type)&&Be.edge.source===e.edge.source&&Be.edge.target===e.edge.target,activeRelated:"node"===(null==Be?void 0:Be.type)&&(e.edge.source===Be.nodeId||e.edge.target===Be.nodeId),onLineClick:V,onLineDoubleClick:j}))))),u().createElement("div",{className:v()("line-labels",{ready:ee}),style:{left:ce.x,top:ce.y,transform:`scale(${ce.k})`}},u().createElement(C.d2,{labels:Re,onRendered:He})),u().createElement("div",{className:"nodes",ref:ge,style:{left:ce.x,top:ce.y,transform:`scale(${ce.k})`}},u().createElement(k.p,{nodes:a,nodeBricks:s,onRendered:Oe})),u().createElement(T.w,{connectLineState:we,connectLineTo:me,markerPrefix:Ye}))}a=kt,({e:[K,U,Y,V,j,X,q,F,Z,J,G,Q,ee,te,ne,ae,ie,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe,H],c:[Ve,I]}=(0,c.A)(a,[He("eo-diagram",{styleTexts:[B.A]})],[[Ie({type:String}),1,"layout"],[Ie({attribute:!1}),1,"nodes"],[Ie({attribute:!1}),1,"edges"],[Ie({attribute:!1}),1,"nodeBricks"],[Ie({attribute:!1}),1,"lines"],[Ie({attribute:!1}),1,"layoutOptions"],[Ie({attribute:!1}),1,"activeTarget"],[Ie({type:Boolean}),1,"disableKeyboardAction"],[Ie({attribute:!1}),1,"connectNodes"],[Ie({attribute:!1}),1,"dragNodes"],[Ie({type:Boolean}),1,"zoomable"],[Ie({type:Boolean}),1,"scrollable"],[Ie({type:Boolean}),1,"pannable"],[Ie({attribute:!1}),1,"scaleRange"],[Ke({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,h.A)(lt,e),(e,t)=>(0,r.A)(lt,e,t)],[Ke({type:"node.delete"}),1,"nodeDelete",e=>(0,h.A)(ht,e),(e,t)=>(0,r.A)(ht,e,t)],[Ke({type:"edge.delete"}),1,"edgeDelete",e=>(0,h.A)(dt,e),(e,t)=>(0,r.A)(dt,e,t)],[Ke({type:"line.click"}),1,"lineClick",e=>(0,h.A)(pt,e),(e,t)=>(0,r.A)(pt,e,t)],[Ke({type:"line.dblclick"}),1,"lineDoubleClick",e=>(0,h.A)(At,e),(e,t)=>(0,r.A)(At,e,t)],[Ke({type:"nodes.connect"}),1,"connectNodes",e=>(0,h.A)(yt,e),(e,t)=>(0,r.A)(yt,e,t)],[Ue(),2,"callOnLineLabel"]],0,(e=>mt.has((0,l.A)(e))),g.ReactNextElement)),I();var _t,xt=n(3971);let Mt,Ct,Et,Nt,Wt,Tt,Rt,St,zt,$t,Lt,Bt,Dt,Pt;const{defineElement:Ot,property:Ht,event:It,method:Kt}=(0,p.createDecorators)(),Ut=(0,d.forwardRef)(en);let Yt;var Vt=new WeakMap,jt=new WeakMap,Xt=new WeakMap,qt=new WeakSet,Ft=new WeakMap,Zt=new WeakMap,Jt=new WeakMap,Gt=new WeakMap;class Qt extends g.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,qt),(0,s.A)(this,Vt,(Mt(this),Et(this))),(0,s.A)(this,jt,(Nt(this),Wt(this))),(0,s.A)(this,Xt,(Tt(this),Rt(this))),(0,s.A)(this,Ft,($t(this),e=>{(0,o.A)(qt,this,St).emit(e)})),(0,s.A)(this,Zt,Lt(this)),(0,s.A)(this,Jt,(Pt(this),e=>{(0,o.A)(qt,this,Bt).emit(e)})),(0,s.A)(this,Gt,(0,d.createRef)())}get label(){return(0,h.A)(Vt,this)}set label(e){(0,r.A)(Vt,this,e)}get type(){return(0,h.A)(jt,this)}set type(e){(0,r.A)(jt,this,e)}enableEditing(){var e;null===(e=(0,h.A)(Gt,this).current)||void 0===e||e.enableEditing()}render(){return u().createElement(Ut,{ref:(0,h.A)(Gt,this),label:this.label,onLabelEditingChange:(0,h.A)(Ft,this),onLabelChange:(0,h.A)(Jt,this)})}}function en(e,t){let{label:n,onLabelChange:a,onLabelEditingChange:i}=e;const s=n??"",[l,o]=(0,d.useState)(s),[r,h]=(0,d.useState)(!1),c=(0,d.useRef)(!1),[p,g]=(0,d.useState)(!1),A=(0,d.useRef)(null);(0,d.useImperativeHandle)(t,(()=>({enableEditing(){h(!0)}}))),(0,d.useEffect)((()=>{o(s)}),[s]);const f=(0,d.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),h(!0)}),[]);(0,d.useEffect)((()=>{var e,t;r&&(null===(e=A.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=A.current)||void 0===t||t.select())}),[r]),(0,d.useEffect)((()=>{c.current?null==i||i(r):c.current=!0}),[r,i]);const y=(0,d.useCallback)((e=>{o(e.target.value)}),[]),b=(0,d.useCallback)((e=>{const t=e.key||e.keyCode||e.which;var n;"Enter"!==t&&13!==t||null===(n=A.current)||void 0===n||n.blur()}),[]),m=(0,d.useCallback)((()=>{h(!1),g(!0)}),[]);(0,d.useEffect)((()=>{p&&(null==a||a(l),g(!1))}),[l,a,p]);const k=(0,d.useCallback)((e=>{e.stopPropagation()}),[]);return u().createElement("div",{className:v()("label",{editing:r,empty:!l}),onDoubleClick:k,onMouseDown:k},u().createElement("input",{className:"label-input",value:l,ref:A,onChange:y,onKeyDown:b,onBlur:m}),u().createElement("div",{className:"label-text",onDoubleClick:f},l))}_t=Qt,({e:[Et,Nt,Wt,Tt,Rt,St,zt,$t,Lt,Bt,Dt,Pt,Mt],c:[Yt,Ct]}=(0,c.A)(_t,[Ot("diagram.editable-label",{styleTexts:[xt.A]})],[[Ht(),1,"label"],[Ht({render:!1}),1,"type"],[It({type:"label.editing.change"}),1,"labelEditingChange",e=>(0,h.A)(Xt,e),(e,t)=>(0,r.A)(Xt,e,t)],[It({type:"label.change"}),1,"labelChange",e=>(0,h.A)(Zt,e),(e,t)=>(0,r.A)(Zt,e,t)],[Kt(),2,"enableEditing"]],0,(e=>Gt.has((0,l.A)(e))),g.ReactNextElement)),Ct(),n(9068);var tn,nn=n(497);let an,sn,ln,on,rn,hn,cn,dn,un,pn,gn,An,fn,yn,vn,bn,mn,kn,wn;const{defineElement:_n,property:xn,event:Mn}=(0,p.createDecorators)();let Cn;var En=new WeakMap,Nn=new WeakMap,Wn=new WeakMap,Tn=new WeakMap,Rn=new WeakSet,Sn=new WeakMap,zn=new WeakMap,$n=new WeakMap,Ln=new WeakMap,Bn=new WeakMap;class Dn extends g.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Rn),(0,s.A)(this,En,sn(this)),(0,s.A)(this,Nn,(ln(this),on(this))),(0,s.A)(this,Wn,(rn(this),hn(this))),(0,s.A)(this,Tn,(cn(this),dn(this))),(0,s.A)(this,Sn,(gn(this),e=>{(0,o.A)(Rn,this,un).emit(e)})),(0,s.A)(this,zn,An(this)),(0,s.A)(this,$n,(vn(this),e=>{(0,o.A)(Rn,this,fn).emit(e)})),(0,s.A)(this,Ln,bn(this)),(0,s.A)(this,Bn,(wn(this),e=>{(0,o.A)(Rn,this,mn).emit(e)}))}get usage(){return(0,h.A)(En,this)}set usage(e){(0,r.A)(En,this,e)}get status(){return(0,h.A)(Nn,this)}set status(e){(0,r.A)(Nn,this,e)}get decorator(){return(0,h.A)(Wn,this)}set decorator(e){(0,r.A)(Wn,this,e)}render(){return u().createElement(Pn,{usage:this.usage,onDragStart:(0,h.A)(Sn,this),onDragMove:(0,h.A)($n,this),onDragEnd:(0,h.A)(Bn,this)})}}function Pn(e){let{usage:t,onDragStart:n,onDragMove:a,onDragEnd:i}=e;const s=(0,d.useCallback)((e=>{if("library"!==t)return;e.stopPropagation(),e.preventDefault();const s=[e.clientX,e.clientY];let l=!1;const o=e=>{l||(l=(e.clientX-s[0])**2+(e.clientY-s[1])**2>=9,l&&(null==n||n([e.clientX,e.clientY]))),l&&(null==a||a([e.clientX,e.clientY]))},r=e=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r),l&&(null==i||i([e.clientX,e.clientY]))};document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)}),[i,a,n,t]);return u().createElement("div",{onMouseDown:s},u().createElement("slot",null))}tn=Dn,({e:[sn,ln,on,rn,hn,cn,dn,un,pn,gn,An,fn,yn,vn,bn,mn,kn,wn],c:[Cn,an]}=(0,c.A)(tn,[_n("diagram.experimental-node",{styleTexts:[nn.A]})],[[xn(),1,"usage"],[xn({type:String,render:!1}),1,"status"],[xn({type:String}),1,"decorator"],[Mn({type:"drag.start"}),1,"dragStartEvent",e=>(0,h.A)(Tn,e),(e,t)=>(0,r.A)(Tn,e,t)],[Mn({type:"drag.move"}),1,"dragMoveEvent",e=>(0,h.A)(zn,e),(e,t)=>(0,r.A)(zn,e,t)],[Mn({type:"drag.end"}),1,"dragEndEvent",e=>(0,h.A)(Ln,e),(e,t)=>(0,r.A)(Ln,e,t)]],0,(e=>Bn.has((0,l.A)(e))),g.ReactNextElement)),an();var On,Hn=n(8185),In=n(2140),Kn=n(3783),Un=n(3033),Yn=n(8091),Vn=n(1819),jn=n(5748),Xn=n(227),qn=n(531),Fn=n(7099),Zn=n(1484),Jn=n(8197),Gn=n(7531),Qn=n(2098),ea=n(3012),ta=n(6237);let na,aa,ia,sa,la,oa,ra,ha,ca,da,ua,pa,ga,Aa,fa,ya,va,ba,ma,ka,wa,_a,xa,Ma,Ca,Ea,Na,Wa,Ta,Ra,Sa,za,$a,La,Ba,Da,Pa,Oa,Ha,Ia,Ka;const{defineElement:Ua,property:Ya,event:Va}=(0,p.createDecorators)();let ja;var Xa=new WeakMap,qa=new WeakMap,Fa=new WeakMap,Za=new WeakMap,Ja=new WeakMap,Ga=new WeakMap,Qa=new WeakMap,ei=new WeakMap,ti=new WeakMap,ni=new WeakMap,ai=new WeakMap,ii=new WeakMap,si=new WeakMap,li=new WeakMap,oi=new WeakMap,ri=new WeakSet,hi=new WeakMap,ci=new WeakMap,di=new WeakMap,ui=new WeakMap,pi=new WeakMap,gi=new WeakMap;class Ai extends g.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,ri),(0,s.A)(this,Xa,aa(this)),(0,s.A)(this,qa,(ia(this),sa(this))),(0,s.A)(this,Fa,(la(this),oa(this))),(0,s.A)(this,Za,(ra(this),ha(this,[Un.HP,Un.HP]))),(0,s.A)(this,Ja,(ca(this),da(this))),(0,s.A)(this,Ga,(ua(this),pa(this))),(0,s.A)(this,Qa,(ga(this),Aa(this))),(0,s.A)(this,ei,(fa(this),ya(this))),(0,s.A)(this,ti,(va(this),ba(this))),(0,s.A)(this,ni,(ma(this),ka(this))),(0,s.A)(this,ai,(wa(this),_a(this,!0))),(0,s.A)(this,ii,(xa(this),Ma(this,!0))),(0,s.A)(this,si,(Ca(this),Ea(this,!0))),(0,s.A)(this,li,(Na(this),Wa(this))),(0,s.A)(this,oi,(Ta(this),Ra(this))),(0,s.A)(this,hi,($a(this),e=>{(0,o.A)(ri,this,Sa).emit(e)})),(0,s.A)(this,ci,(e=>{(0,Hn.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,s.A)(this,di,La(this)),(0,s.A)(this,ui,(Pa(this),e=>{(0,o.A)(ri,this,Ba).emit(e)})),(0,s.A)(this,pi,Oa(this)),(0,s.A)(this,gi,(Ka(this),e=>{(0,o.A)(ri,this,Ha).emit(e)}))}get cells(){return(0,h.A)(Xa,this)}set cells(e){(0,r.A)(Xa,this,e)}get layout(){return(0,h.A)(qa,this)}set layout(e){(0,r.A)(qa,this,e)}get layoutOptions(){return(0,h.A)(Fa,this)}set layoutOptions(e){(0,r.A)(Fa,this,e)}get defaultNodeSize(){return(0,h.A)(Za,this)}set defaultNodeSize(e){(0,r.A)(Za,this,e)}get defaultNodeBricks(){return(0,h.A)(Ja,this)}set defaultNodeBricks(e){(0,r.A)(Ja,this,e)}get degradedThreshold(){return(0,h.A)(Ga,this)}set degradedThreshold(e){(0,r.A)(Ga,this,e)}get degradedNodeLabel(){return(0,h.A)(Qa,this)}set degradedNodeLabel(e){(0,r.A)(Qa,this,e)}get defaultEdgeLines(){return(0,h.A)(ei,this)}set defaultEdgeLines(e){(0,r.A)(ei,this,e)}get activeTarget(){return(0,h.A)(ti,this)}set activeTarget(e){(0,r.A)(ti,this,e)}get fadeUnrelatedCells(){return(0,h.A)(ni,this)}set fadeUnrelatedCells(e){(0,r.A)(ni,this,e)}get zoomable(){return(0,h.A)(ai,this)}set zoomable(e){(0,r.A)(ai,this,e)}get scrollable(){return(0,h.A)(ii,this)}set scrollable(e){(0,r.A)(ii,this,e)}get pannable(){return(0,h.A)(si,this)}set pannable(e){(0,r.A)(si,this,e)}get scaleRange(){return(0,h.A)(li,this)}set scaleRange(e){(0,r.A)(li,this,e)}render(){return u().createElement(fi,{shadowRoot:this.shadowRoot,cells:this.cells,layout:this.layout,layoutOptions:this.layoutOptions,defaultNodeSize:this.defaultNodeSize,defaultNodeBricks:this.defaultNodeBricks,defaultEdgeLines:this.defaultEdgeLines,degradedThreshold:this.degradedThreshold,degradedNodeLabel:this.degradedNodeLabel,activeTarget:this.activeTarget,fadeUnrelatedCells:this.fadeUnrelatedCells,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:(0,h.A)(hi,this),onSwitchActiveTarget:(0,h.A)(ci,this),onCellContextMenu:(0,h.A)(ui,this),onCellClick:(0,h.A)(gi,this)})}}function fi(e){let{shadowRoot:t,cells:n,layout:a,layoutOptions:i,defaultNodeSize:s,defaultNodeBricks:l,defaultEdgeLines:o,degradedThreshold:r,degradedNodeLabel:h,activeTarget:c,fadeUnrelatedCells:p,zoomable:g,scrollable:f,pannable:y,scaleRange:m,onActiveTargetChange:k,onSwitchActiveTarget:w,onCellContextMenu:_,onCellClick:x}=e;const[{cells:M,layoutKey:C},E]=(0,d.useReducer)(jn.d,n,(e=>({cells:(0,Kn.C)(e,{defaultNodeSize:s}),layoutKey:1}))),W=(0,d.useMemo)((()=>M.filter(qn.N).length>=(r??Un.pC)),[M,r]),T=(0,d.useRef)(null),R=(0,d.useRef)(null),{grabbing:S,transform:z,zoomer:$,scaleRange:L}=(0,Yn.f)({rootRef:T,zoomable:g,scrollable:f,pannable:y,draggable:!0,scaleRange:m,onSwitchActiveTarget:w}),{centered:B,setCentered:D,getNextLayoutKey:P}=(0,Zn.g)({layout:a,layoutOptions:i,rootRef:T,cells:M,zoomable:g,zoomer:$,scaleRange:L,layoutKey:C,dispatch:E}),O=(0,d.useCallback)((()=>{D(!1)}),[D]),H=(0,d.useRef)(n);(0,d.useEffect)((()=>{if(n!==H.current){H.current=n;const e=(0,Qn.L)({canvasWidth:t.host.clientWidth,canvasHeight:t.host.clientHeight,defaultNodeSize:s,layout:a,previousCells:M,cells:n,scaleRange:L,transform:z});E({type:"update-cells",payload:e.cells})}}),[M,s,n,a,L,t,z]);const I=(0,Vn.J)({cellsRef:R,activeTarget:c,onActiveTargetChange:k}),K=`${(0,d.useMemo)((()=>`${(0,b.uniqueId)("diagram-")}-`),[])}line-arrow-`,U=(0,d.useCallback)(((e,t)=>{E({type:"update-node-size",payload:{id:e,size:t},layoutKey:P()})}),[P]),[Y,V]=(0,d.useState)(null),j=(0,d.useCallback)((e=>{V(e)}),[]),X=(0,d.useCallback)((e=>{V((t=>t===e?null:t))}),[]),[q,F]=(0,d.useState)([]);(0,d.useEffect)((()=>{const e=p?(0,Xn.Y)(M,null,Y):[];F((t=>0===t.length&&0===e.length?t:e))}),[M,p,Y]);const Z=(0,d.useCallback)((e=>{$.scaleTo((0,A.A)(T.current),e/100)}),[$]),[J,G]=(0,Gn.d)({cells:M,defaultEdgeLines:o,markerPrefix:K}),Q=(0,Jn.H)({cells:M,layout:a,centered:B});return u().createElement(u().Fragment,null,u().createElement("svg",{width:"100%",height:"100%",ref:T,className:v()("root",{grabbing:S,pannable:y,ready:Q}),tabIndex:-1},u().createElement("defs",null,G.map(((e,t)=>u().createElement(N.c,{key:t,id:`${K}${t}`,type:"arrow",strokeColor:e.strokeColor})))),u().createElement("g",{transform:`translate(${z.x} ${z.y}) scale(${z.k})`},u().createElement("g",{className:"cells",ref:R},M.map((e=>u().createElement(In.m,{key:`${e.type}:${(0,qn.WW)(e)?`${e.source}~${e.target}`:e.id}`,layout:a,cell:e,cells:M,degraded:W,degradedNodeLabel:h,defaultNodeBricks:l,lineConfMap:J,transform:z,activeTarget:I,readOnly:!0,unrelatedCells:q,onSwitchActiveTarget:w,onCellContextMenu:_,onCellClick:x,onNodeBrickResize:U,onCellMouseEnter:p&&(0,qn.N)(e)?j:void 0,onCellMouseLeave:p&&(0,qn.N)(e)?X:void 0})))))),u().createElement(Fn.Y,{shadowRoot:t,scale:z.k,scaleRange:L,onZoomChange:Z,onReCenter:O}))}On=Ai,({e:[aa,ia,sa,la,oa,ra,ha,ca,da,ua,pa,ga,Aa,fa,ya,va,ba,ma,ka,wa,_a,xa,Ma,Ca,Ea,Na,Wa,Ta,Ra,Sa,za,$a,La,Ba,Da,Pa,Oa,Ha,Ia,Ka],c:[ja,na]}=(0,c.A)(On,[Ua("eo-display-canvas",{styleTexts:[ea.A,ta.A]})],[[Ya({attribute:!1}),1,"cells"],[Ya({type:String}),1,"layout"],[Ya({attribute:!1}),1,"layoutOptions"],[Ya({attribute:!1}),1,"defaultNodeSize"],[Ya({attribute:!1}),1,"defaultNodeBricks"],[Ya({type:Number}),1,"degradedThreshold"],[Ya({attribute:!1}),1,"degradedNodeLabel"],[Ya({attribute:!1}),1,"defaultEdgeLines"],[Ya({attribute:!1}),1,"activeTarget"],[Ya({type:Boolean}),1,"fadeUnrelatedCells"],[Ya({type:Boolean}),1,"zoomable"],[Ya({type:Boolean}),1,"scrollable"],[Ya({type:Boolean}),1,"pannable"],[Ya({attribute:!1}),1,"scaleRange"],[Va({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,h.A)(oi,e),(e,t)=>(0,r.A)(oi,e,t)],[Va({type:"cell.contextmenu"}),1,"cellContextMenu",e=>(0,h.A)(di,e),(e,t)=>(0,r.A)(di,e,t)],[Va({type:"cell.click"}),1,"cellClick",e=>(0,h.A)(pi,e),(e,t)=>(0,r.A)(pi,e,t)]],0,(e=>gi.has((0,l.A)(e))),g.ReactNextElement)),na()},9068:(e,t,n)=>{n.d(t,{uuidV4:()=>kn});var a,i=n(4635),s=n(918),l=n(6902),o=n(2559),r=n(5536),h=n(6121),c=n(829),d=n(2740),u=n(8769),p=n.n(u),g=n(4782),A=n(1389),f=n(1351),y=(n(6477),n(1030)),v=n(3373),b=n.n(v),m=n(7566),k=n(5748),w=n(3739),_=n(531),x=n(8185),M=n(5114),C=n(2140),E=n(3639),N=n(3783),W=n(2098),T=n(227),R=n(3033),S=n(8091),z=n(1819),$=n(7099),L=n(1484),B=n(8197),D=n(7531),P=n(2219),O=n(3012),H=n(6237),I=n(9386),K=n(1991);let U,Y,V,j,X,q,F,Z,J,G,Q,ee,te,ne,ae,ie,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe,He,Ie,Ke,Ue,Ye,Ve,je,Xe,qe,Fe,Ze,Je,Ge,Qe,et,tt,nt,at,it,st,lt,ot,rt,ht,ct,dt,ut,pt,gt,At,ft,yt,vt,bt,mt;const kt=(0,f.unwrapProvider)("basic.lock-body-scroll"),{defineElement:wt,property:_t,method:xt,event:Mt}=(0,g.createDecorators)(),Ct=p().forwardRef(mn);let Et;var Nt=new WeakMap,Wt=new WeakMap,Tt=new WeakMap,Rt=new WeakMap,St=new WeakMap,zt=new WeakMap,$t=new WeakMap,Lt=new WeakMap,Bt=new WeakMap,Dt=new WeakMap,Pt=new WeakMap,Ot=new WeakMap,Ht=new WeakMap,It=new WeakMap,Kt=new WeakMap,Ut=new WeakMap,Yt=new WeakMap,Vt=new WeakMap,jt=new WeakMap,Xt=new WeakSet,qt=new WeakMap,Ft=new WeakMap,Zt=new WeakMap,Jt=new WeakMap,Gt=new WeakMap,Qt=new WeakMap,en=new WeakMap,tn=new WeakMap,nn=new WeakMap,an=new WeakMap,sn=new WeakMap,ln=new WeakMap,on=new WeakMap,rn=new WeakMap,hn=new WeakMap,cn=new WeakMap,dn=new WeakMap,un=new WeakMap,pn=new WeakMap,gn=new WeakMap,An=new WeakMap,fn=new WeakMap,yn=new WeakMap;class vn extends A.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Xt),(0,s.A)(this,Nt,(U(this),V(this))),(0,s.A)(this,Wt,(j(this),X(this))),(0,s.A)(this,Tt,(q(this),F(this))),(0,s.A)(this,Rt,(Z(this),J(this,[R.HP,R.HP]))),(0,s.A)(this,St,(G(this),Q(this))),(0,s.A)(this,zt,(ee(this),te(this))),(0,s.A)(this,$t,(ne(this),ae(this))),(0,s.A)(this,Lt,(ie(this),se(this))),(0,s.A)(this,Bt,(le(this),oe(this))),(0,s.A)(this,Dt,(re(this),he(this))),(0,s.A)(this,Pt,(ce(this),de(this,!0))),(0,s.A)(this,Ot,(ue(this),pe(this,!0))),(0,s.A)(this,Ht,(ge(this),Ae(this,!0))),(0,s.A)(this,It,(fe(this),ye(this,!0))),(0,s.A)(this,Kt,(ve(this),be(this,!1))),(0,s.A)(this,Ut,(me(this),ke(this))),(0,s.A)(this,Yt,(we(this),_e(this))),(0,s.A)(this,Vt,(xe(this),Me(this))),(0,s.A)(this,jt,(Ce(this),Ee(this))),(0,s.A)(this,qt,(Te(this),e=>{(0,r.A)(Xt,this,Ne).emit(e)})),(0,s.A)(this,Ft,(e=>{(0,x.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,s.A)(this,Zt,Re(this)),(0,s.A)(this,Jt,($e(this),Le(this))),(0,s.A)(this,Gt,(Pe(this),e=>{(0,r.A)(Xt,this,Be).emit(e),"node"===e.type&&(0,r.A)(Xt,this,Se).emit(e)})),(0,s.A)(this,Qt,Oe(this)),(0,s.A)(this,en,(Ke(this),e=>{(0,r.A)(Xt,this,He).emit(e)})),(0,s.A)(this,tn,Ue(this)),(0,s.A)(this,nn,(je(this),e=>{(0,r.A)(Xt,this,Ye).emit(e)})),(0,s.A)(this,an,Xe(this)),(0,s.A)(this,sn,(Ze(this),Je(this))),(0,s.A)(this,ln,(et(this),e=>{(0,r.A)(Xt,this,Ge).emit(e),"node"===e.type&&(0,r.A)(Xt,this,qe).emit(e)})),(0,s.A)(this,on,tt(this)),(0,s.A)(this,rn,(it(this),e=>{(0,r.A)(Xt,this,nt).emit(e)})),(0,s.A)(this,hn,st(this)),(0,s.A)(this,cn,(rt(this),e=>{(0,r.A)(Xt,this,lt).emit(e)})),(0,s.A)(this,dn,ht(this)),(0,s.A)(this,un,(ut(this),e=>{(0,r.A)(Xt,this,ct).emit(e)})),(0,s.A)(this,pn,pt(this)),(0,s.A)(this,gn,(ft(this),e=>{(0,r.A)(Xt,this,gt).emit(e)})),(0,s.A)(this,An,yt(this)),(0,s.A)(this,fn,(mt(this),e=>{(0,r.A)(Xt,this,vt).emit(e)})),(0,s.A)(this,yn,(0,u.createRef)())}get cells(){return(0,c.A)(Nt,this)}set cells(e){(0,h.A)(Nt,this,e)}get layout(){return(0,c.A)(Wt,this)}set layout(e){(0,h.A)(Wt,this,e)}get layoutOptions(){return(0,c.A)(Tt,this)}set layoutOptions(e){(0,h.A)(Tt,this,e)}get defaultNodeSize(){return(0,c.A)(Rt,this)}set defaultNodeSize(e){(0,h.A)(Rt,this,e)}get defaultNodeBricks(){return(0,c.A)(St,this)}set defaultNodeBricks(e){(0,h.A)(St,this,e)}get degradedThreshold(){return(0,c.A)(zt,this)}set degradedThreshold(e){(0,h.A)(zt,this,e)}get degradedNodeLabel(){return(0,c.A)($t,this)}set degradedNodeLabel(e){(0,h.A)($t,this,e)}get defaultEdgeLines(){return(0,c.A)(Lt,this)}set defaultEdgeLines(e){(0,h.A)(Lt,this,e)}get activeTarget(){return(0,c.A)(Bt,this)}set activeTarget(e){(0,h.A)(Bt,this,e)}get fadeUnrelatedCells(){return(0,c.A)(Dt,this)}set fadeUnrelatedCells(e){(0,h.A)(Dt,this,e)}get zoomable(){return(0,c.A)(Pt,this)}set zoomable(e){(0,h.A)(Pt,this,e)}get scrollable(){return(0,c.A)(Ot,this)}set scrollable(e){(0,h.A)(Ot,this,e)}get pannable(){return(0,c.A)(Ht,this)}set pannable(e){(0,h.A)(Ht,this,e)}get selectable(){return(0,c.A)(It,this)}set selectable(e){(0,h.A)(It,this,e)}get allowEdgeToArea(){return(0,c.A)(Kt,this)}set allowEdgeToArea(e){(0,h.A)(Kt,this,e)}get dragBehavior(){return(0,c.A)(Ut,this)}set dragBehavior(e){(0,h.A)(Ut,this,e)}get ctrlDragBehavior(){return(0,c.A)(Yt,this)}set ctrlDragBehavior(e){(0,h.A)(Yt,this,e)}get scaleRange(){return(0,c.A)(Vt,this)}set scaleRange(e){(0,h.A)(Vt,this,e)}async dropNode(e){var t,n;let{id:a,position:i,size:s,data:l,useBrick:o}=e;if(null===(t=(n=document).elementsFromPoint)||void 0===t||null===(t=t.call(n,i[0],i[1]))||void 0===t?void 0:t.includes(this)){var r;const e=this.getBoundingClientRect(),t=(0,c.A)(yn,this).current.getTransform(),n={type:"node",id:a,view:{..."force"===this.layout||"dagre"===this.layout?null:{x:(i[0]-e.left-t.x)/t.k,y:(i[1]-e.top-t.y)/t.k},width:(null==s?void 0:s[0])??this.defaultNodeSize[0],height:(null==s?void 0:s[1])??this.defaultNodeSize[0]},data:l,useBrick:o};return null===(r=(0,c.A)(yn,this).current)||void 0===r||r.dropNode(n),n}return null}async dropDecorator(e){var t,n;let{position:a,decorator:i,text:s,direction:l}=e;if(null===(t=(n=document).elementsFromPoint)||void 0===t||null===(t=t.call(n,a[0],a[1]))||void 0===t?void 0:t.includes(this)){var o;const e=this.getBoundingClientRect(),t=(0,c.A)(yn,this).current.getTransform(),n={type:"decorator",decorator:i,id:kn(),view:{x:(a[0]-e.left-t.x)/t.k,y:(a[1]-e.top-t.y)/t.k,width:R.N8,height:R.w1,text:s,direction:l}};return null===(o=(0,c.A)(yn,this).current)||void 0===o||o.dropDecorator(n),n}return null}async addNodes(e){if(0===e.length)return[];const t=e.map((e=>{let{size:t,useBrick:n,id:a,data:i}=e;return{type:"node",id:a,data:i,view:{width:(null==t?void 0:t[0])??this.defaultNodeSize[0],height:(null==t?void 0:t[1])??this.defaultNodeSize[0]},useBrick:n}}));return(0,c.A)(yn,this).current.addNodes(t,{defaultNodeSize:this.defaultNodeSize,canvasWidth:this.clientWidth,canvasHeight:this.clientHeight})}async addEdge(e){var t;let{source:n,target:a,data:i}=e;const s={type:"edge",source:n,target:a,data:i};return null===(t=(0,c.A)(yn,this).current)||void 0===t||t.addEdge(s),s}manuallyConnectNodes(e){return(0,c.A)(yn,this).current.manuallyConnectNodes(e)}async updateCells(e,t){await(0,o.A)(Xt,this,bn).call(this);const{updated:n}=(0,c.A)(yn,this).current.updateCells(e,{...t,defaultNodeSize:this.defaultNodeSize,canvasWidth:this.clientWidth,canvasHeight:this.clientHeight});return{updated:n}}disconnectedCallback(){super.disconnectedCallback(),kt(this,!1)}render(){return p().createElement(Ct,{host:this,ref:(0,c.A)(yn,this),layout:this.layout,layoutOptions:this.layoutOptions,cells:this.cells,defaultNodeSize:this.defaultNodeSize,defaultNodeBricks:this.defaultNodeBricks,defaultEdgeLines:this.defaultEdgeLines,degradedThreshold:this.degradedThreshold,degradedNodeLabel:this.degradedNodeLabel,activeTarget:this.activeTarget,fadeUnrelatedCells:this.fadeUnrelatedCells,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,dragBehavior:this.dragBehavior,ctrlDragBehavior:this.ctrlDragBehavior,scaleRange:this.scaleRange,allowEdgeToArea:this.allowEdgeToArea,onActiveTargetChange:(0,c.A)(qt,this),onSwitchActiveTarget:(0,c.A)(Ft,this),onCellMove:(0,c.A)(Gt,this),onCellsMove:(0,c.A)(en,this),onCellResize:(0,c.A)(nn,this),onCellDelete:(0,c.A)(ln,this),onCellsDelete:(0,c.A)(rn,this),onCellContextMenu:(0,c.A)(cn,this),onDecoratorTextChange:(0,c.A)(un,this),onContainerContainerChange:(0,c.A)(gn,this),onScaleChange:(0,c.A)(fn,this)})}}function bn(){return new Promise((e=>{const t=()=>{(0,c.A)(yn,this).current?e():setTimeout(t,10)};t()}))}function mn(e,t){let{host:n,layout:a,layoutOptions:i,cells:s,defaultNodeSize:l,defaultNodeBricks:o,defaultEdgeLines:r,degradedThreshold:h,degradedNodeLabel:c,activeTarget:d,fadeUnrelatedCells:g,zoomable:A,scrollable:f,pannable:v,dragBehavior:x,ctrlDragBehavior:O,scaleRange:H,allowEdgeToArea:U,onActiveTargetChange:Y,onSwitchActiveTarget:V,onCellMove:j,onCellResize:X,onCellDelete:q,onCellsMove:F,onCellsDelete:Z,onCellContextMenu:J,onDecoratorTextChange:G,onScaleChange:Q,onContainerContainerChange:ee}=e;const[{cells:te,layoutKey:ne},ae]=(0,u.useReducer)(k.d,s,(e=>({cells:(0,N.C)(e,{defaultNodeSize:l}),layoutKey:0}))),ie=(0,u.useMemo)((()=>te.filter(_.N).length>=(h??R.pC)),[te,h]),se=(0,u.useRef)(null),le=(0,u.useRef)(null),oe=(0,u.useRef)(null),[re,he]=(0,u.useState)([]),[ce,de]=(0,u.useState)([]),{grabbing:ue,transform:pe,zoomer:ge,scaleRange:Ae}=(0,S.f)({rootRef:se,zoomable:A,scrollable:f,pannable:v,draggable:"grab"===x,ctrlDraggable:"grab"===O,scaleRange:H,onSwitchActiveTarget:V});(0,u.useEffect)((()=>{Q(pe.k)}),[Q,pe.k]);const[fe,ye]=(0,u.useState)(null),[ve,be]=(0,u.useState)(null),{centered:me,setCentered:ke,getNextLayoutKey:we}=(0,L.g)({layout:a,layoutOptions:i,rootRef:se,cells:te,zoomable:A,zoomer:ge,scaleRange:Ae,layoutKey:ne,allowEdgeToArea:U,dispatch:ae});(0,u.useImperativeHandle)(t,(()=>({dropNode(e){"dagre"!==a&&"force"!==a&&ke(!0),ae({type:"drop-node",payload:e})},dropDecorator(e){"dagre"!==a&&"force"!==a&&ke(!0),ae({type:"drop-decorator",payload:e})},addNodes(e,t){let{defaultNodeSize:n,canvasWidth:i,canvasHeight:s}=t;const l=te.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1,o=[...te.slice(0,l),...e,...te.slice(l)],{cells:r,updated:h,shouldReCenter:c}=(0,W.L)({cells:o,layout:a,previousCells:te,defaultNodeSize:n,canvasWidth:i,canvasHeight:s,scaleRange:Ae,transform:pe,allowEdgeToArea:U});return c&&ke(!1),ae({type:"update-cells",payload:r}),h.filter((t=>e.includes(t)))},addEdge(e){ae({type:"add-edge",payload:e})},updateCells(e,t){const{shouldReCenter:n,...i}=(0,W.L)({...t,layout:a,previousCells:te,cells:e,scaleRange:Ae,transform:pe,allowEdgeToArea:U});return n&&ke(!1),ae({type:"update-cells",payload:i.cells}),i},getTransform:()=>pe,manuallyConnectNodes(e){const t=te.find((t=>(U&&(0,_.o6)(t)||(0,_.N)(t))&&t.id===e));if(t){const e=se.current.getBoundingClientRect();return be({source:t,from:[t.view.x+t.view.width/2,t.view.y+t.view.height/2],offset:[e.left,e.top]}),new Promise(((e,t)=>{oe.current={resolve:e,reject:t}}))}return Promise.reject(null)}})),[te,a,Ae,ke,pe,U]);const _e=(0,u.useCallback)(((e,t)=>{var n;for(let n=te.length-1;n>=0;n--){const i=te[n];if((U&&(0,_.o6)(i)||(0,_.N)(i))&&i.id!==e.source.id&&i.view.x<t[0]&&i.view.x+i.view.width>t[0]&&i.view.y<t[1]&&i.view.y+i.view.height>t[1]){var a;null===(a=oe.current)||void 0===a||a.resolve({source:e.source,target:i});break}}null===(n=oe.current)||void 0===n||n.reject(null),be(null)}),[te]);(0,u.useEffect)((()=>{kt(n,!(!ve&&!fe))}),[ve,n,fe]);const xe=(0,z.J)({cellsRef:le,activeTarget:d,onActiveTargetChange:Y}),[Me,Ce]=(0,u.useState)([]);(0,u.useEffect)((()=>{const e=g?(0,T.Y)(te,ve,xe,U):[];Ce((t=>0===t.length&&0===e.length?t:e))}),[xe,te,ve,g,U]),(0,u.useEffect)((()=>{const e=se.current;if(!e||re.length>0)return;const t=e=>{const t=(0,M.a)(e,{cells:te,activeTarget:xe});"delete-cells"===(null==t?void 0:t.action)&&(Z(t.cells),1===t.cells.length&&q(t.cells[0]))};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[xe,te,re.length,q,Z]);const Ee=`${(0,u.useMemo)((()=>`${(0,y.uniqueId)("diagram-")}-`),[])}line-arrow-`,Ne=(0,u.useCallback)((e=>{ae({type:"move-cells",payload:e});const t=[];(0,K._)(e,te).forEach((e=>{var n,a;null!==(n=e.containerCell)&&void 0!==n&&n.id&&t.push(null===(a=e.containerCell)||void 0===a?void 0:a.id)})),de(t)}),[te]),We=(0,u.useCallback)((e=>{ae({type:"move-cells",payload:e}),F(e),1===e.length&&j(e[0]),(0,K._)(e,te,ee),de([])}),[j,F,te,ee]),Te=(0,u.useCallback)((e=>{ae({type:"resize-cell",payload:e})}),[]),Re=(0,u.useCallback)((e=>{ae({type:"resize-cell",payload:e}),X(e)}),[X]),Se=(0,u.useCallback)((e=>{let{id:t,editing:n}=e;he(n?e=>e.includes(t)?e:[...e,t]:e=>e.filter((e=>e!==t)))}),[]),ze=(0,u.useCallback)(((e,t)=>{const n=we();ae({type:"update-node-size",payload:{id:e,size:t},layoutKey:n})}),[we]),$e=(0,u.useCallback)((e=>{ge.scaleTo((0,m.A)(se.current),e/100)}),[ge]),Le=(0,u.useCallback)((()=>{ke(!1)}),[ke]),[Be,De]=(0,D.d)({cells:te,defaultEdgeLines:r,markerPrefix:Ee}),Pe=(0,B.H)({cells:te,layout:a,centered:me});return(0,u.useEffect)((()=>{const e=se.current;if(!e||"lasso"!==x)return;const t=e.getBoundingClientRect(),n=e=>{(0,P.F)(e,{transform:pe,offset:[t.left,t.top],onLassoing(e){ye(e)},onLassoed(e){ye(null);const t=[];for(const n of te)if((0,_.t2)(n)||(0,_.o6)(n)||(0,_.Hs)(n)){const a=n.view.x,i=n.view.y;a>=e.x&&a+n.view.width<=e.x+e.width&&i>=e.y&&i+n.view.height<=e.y+e.height&&t.push(n)}null==V||V(t.length>1?{type:"multi",targets:t.map(I.P)}:1===t.length?(0,I.P)(t[0]):null)}})};return e.addEventListener("mousedown",n),()=>{e.removeEventListener("mousedown",n)}}),[pe,te,x,V]),p().createElement(p().Fragment,null,p().createElement("svg",{width:"100%",height:"100%",ref:se,className:b()("root",{grabbing:ue,pannable:v,ready:Pe}),tabIndex:-1},p().createElement("defs",null,De.map(((e,t)=>p().createElement(w.c,{key:t,id:`${Ee}${t}`,type:"arrow",strokeColor:e.strokeColor})))),p().createElement("g",{transform:`translate(${pe.x} ${pe.y}) scale(${pe.k})`},p().createElement("g",{className:b()("cells",{allowEdgeToArea:U}),ref:le},te.map((e=>p().createElement(C.m,{key:`${e.type}:${(0,_.WW)(e)?`${e.source}~${e.target}`:e.id}`,dragNodeToContainerActive:!(0,_.WW)(e)&&ce.includes(e.id),layout:a,cell:e,cells:te,degraded:ie,degradedNodeLabel:c,defaultNodeBricks:o,transform:pe,lineConfMap:Be,activeTarget:xe,unrelatedCells:Me,onCellsMoving:Ne,onCellsMoved:We,onCellResizing:Te,onCellResized:Re,onSwitchActiveTarget:V,onCellContextMenu:J,onDecoratorTextChange:G,onDecoratorTextEditing:Se,onNodeBrickResize:ze})))),p().createElement(E.w,{connectLineState:ve,transform:pe,markerEnd:`${Ee}0`,onConnect:_e}),fe&&p().createElement("rect",{x:fe.x,y:fe.y,width:fe.width,height:fe.height,fill:"var(--palette-gray-5)",fillOpacity:.3,stroke:"var(--palette-gray-5)",strokeDasharray:2}))),p().createElement($.Y,{shadowRoot:n.shadowRoot,scale:pe.k,scaleRange:Ae,onZoomChange:$e,onReCenter:Le}))}function kn(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}a=vn,({e:[V,j,X,q,F,Z,J,G,Q,ee,te,ne,ae,ie,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe,He,Ie,Ke,Ue,Ye,Ve,je,Xe,qe,Fe,Ze,Je,Ge,Qe,et,tt,nt,at,it,st,lt,ot,rt,ht,ct,dt,ut,pt,gt,At,ft,yt,vt,bt,mt,U],c:[Et,Y]}=(0,d.A)(a,[wt("eo-draw-canvas",{styleTexts:[O.A,H.A]})],[[_t({attribute:!1}),1,"cells"],[_t({type:String}),1,"layout"],[_t({attribute:!1}),1,"layoutOptions"],[_t({attribute:!1}),1,"defaultNodeSize"],[_t({attribute:!1}),1,"defaultNodeBricks"],[_t({type:Number}),1,"degradedThreshold"],[_t({attribute:!1}),1,"degradedNodeLabel"],[_t({attribute:!1}),1,"defaultEdgeLines"],[_t({attribute:!1}),1,"activeTarget"],[_t({type:Boolean}),1,"fadeUnrelatedCells"],[_t({type:Boolean}),1,"zoomable"],[_t({type:Boolean}),1,"scrollable"],[_t({type:Boolean}),1,"pannable"],[_t({type:Boolean}),1,"selectable"],[_t({type:Boolean}),1,"allowEdgeToArea"],[_t(),1,"dragBehavior"],[_t(),1,"ctrlDragBehavior"],[_t({attribute:!1}),1,"scaleRange"],[Mt({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,c.A)(jt,e),(e,t)=>(0,h.A)(jt,e,t)],[Mt({type:"node.move"}),1,"nodeMoveEvent",e=>(0,c.A)(Zt,e),(e,t)=>(0,h.A)(Zt,e,t)],[Mt({type:"cell.move"}),1,"cellMoveEvent",e=>(0,c.A)(Jt,e),(e,t)=>(0,h.A)(Jt,e,t)],[Mt({type:"cells.move"}),1,"cellsMoveEvent",e=>(0,c.A)(Qt,e),(e,t)=>(0,h.A)(Qt,e,t)],[Mt({type:"cell.resize"}),1,"cellResizeEvent",e=>(0,c.A)(tn,e),(e,t)=>(0,h.A)(tn,e,t)],[Mt({type:"node.delete"}),1,"nodeDelete",e=>(0,c.A)(an,e),(e,t)=>(0,h.A)(an,e,t)],[Mt({type:"cell.delete"}),1,"cellDelete",e=>(0,c.A)(sn,e),(e,t)=>(0,h.A)(sn,e,t)],[Mt({type:"cells.delete"}),1,"cellsDelete",e=>(0,c.A)(on,e),(e,t)=>(0,h.A)(on,e,t)],[Mt({type:"cell.contextmenu"}),1,"cellContextMenu",e=>(0,c.A)(hn,e),(e,t)=>(0,h.A)(hn,e,t)],[Mt({type:"decorator.text.change"}),1,"decoratorTextChange",e=>(0,c.A)(dn,e),(e,t)=>(0,h.A)(dn,e,t)],[Mt({type:"node.container.change"}),1,"containerContainerChange",e=>(0,c.A)(pn,e),(e,t)=>(0,h.A)(pn,e,t)],[Mt({type:"scale.change"}),1,"scaleChange",e=>(0,c.A)(An,e),(e,t)=>(0,h.A)(An,e,t)],[xt(),2,"dropNode"],[xt(),2,"dropDecorator"],[xt(),2,"addNodes"],[xt(),2,"addEdge"],[xt(),2,"manuallyConnectNodes"],[xt(),2,"updateCells"]],0,(e=>yn.has((0,l.A)(e))),A.ReactNextElement)),Y()},3971:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(6758),i=n.n(a),s=n(935),l=n.n(s)()(i());l.push([e.id,':host{display:block;--local-label-line-height:inherit;--local-label-font-size:inherit;--local-label-color:inherit;--local-label-font-weight:inherit}:host([hidden]){display:none}:host([type="line"]){--local-label-line-height:18px;--local-label-font-size:11px;--local-label-color:var(--color-secondary-text);--local-label-font-weight:400}*{box-sizing:border-box}.label{max-width:168px;margin:-3px}.label-text,\n.label-input{width:100%;height:24px;padding:3px;border:none;line-height:var(--local-label-line-height);font-size:var(--local-label-font-size);color:var(--local-label-color);font-weight:var(--local-label-font-weight);text-align:center;font-family:inherit;cursor:text;-webkit-user-select:text;user-select:text}.label-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.label.editing .label-text,\n.label.empty:not(.editing) .label-text,\n.label:not(.editing) .label-input{display:none}',""]);const o=l.toString()},497:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(6758),i=n.n(a),s=n(935),l=n.n(s)()(i());l.push([e.id,'*{box-sizing:border-box}:host{display:block;border:1px solid var(--palette-gray-5);cursor:default;-webkit-user-select:none;user-select:none}:host([hidden]){display:none}:host([usage="dragging"]){opacity:0.75;position:fixed}:host(:not([usage="library"])){background:var(--palette-gray-3);width:60px;height:60px}:host([usage="library"]){width:180px;height:30px;margin-bottom:10px}div{width:100%;height:100%;display:flex;align-items:center;justify-content:center}:host(:not([usage="dragging"]):not([usage="library"]):hover),\n:host([status="highlighted"]){color:var(--palette-blue-5);background:var(--palette-blue-1);border-color:1px solid var(--palette-blue-4)}:host([status="faded"]){opacity:0.3}:host([decorator="area"]){width:100px;height:60px;background:rgba(119,141,195,0.1);border:none}:host([decorator="text"]){width:auto;height:auto;background:none;border:none}',""]);const o=l.toString()},780:(e,t,n)=>{n.d(t,{_:()=>s});var a=n(6330),i=n(3496),s=function(){var e=(0,a.A)((function*(e,t,n){return(yield i.http.post("api/gateway/cmdb.instance.CreateInstance/v2/object/".concat(e,"/instance"),t,n)).data}));return function(t,n,a){return e.apply(this,arguments)}}()},8406:(e,t,n)=>{n.d(t,{y:()=>s});var a=n(6330),i=n(3496),s=function(){var e=(0,a.A)((function*(e,t,n){return(yield i.http.post("api/gateway/cmdb.instance.PostSearchV3/v3/object/".concat(e,"/instance/_search"),t,n)).data}));return function(t,n,a){return e.apply(this,arguments)}}()},6841:(e,t,n)=>{n.d(t,{x:()=>s});var a=n(6330),i=n(3496),s=function(){var e=(0,a.A)((function*(e,t,n,a){return(yield i.http.put("api/gateway/cmdb.instance.UpdateInstanceV2/v2/object/".concat(e,"/instance/").concat(t),n,a)).data}));return function(t,n,a,i){return e.apply(this,arguments)}}()},4993:(e,t,n)=>{function a(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function i(e){this._context=e}function s(e){return new i(e)}n.d(t,{Ay:()=>s}),i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:a(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:a(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}},4643:(e,t,n)=>{n.d(t,{dJ:()=>i,kl:()=>s});class a{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function i(e){return new a(e,!0)}function s(e){return new a(e,!1)}},482:(e,t,n)=>{function a(e){this._context=e}function i(e){return new a(e)}n.d(t,{A:()=>i}),a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}}},3488:(e,t,n)=>{function a(e){return e<0?-1:1}function i(e,t,n){var i=e._x1-e._x0,s=t-e._x1,l=(e._y1-e._y0)/(i||s<0&&-0),o=(n-e._y1)/(s||i<0&&-0),r=(l*s+o*i)/(i+s);return(a(l)+a(o))*Math.min(Math.abs(l),Math.abs(o),.5*Math.abs(r))||0}function s(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function l(e,t,n){var a=e._x0,i=e._y0,s=e._x1,l=e._y1,o=(s-a)/3;e._context.bezierCurveTo(a+o,i+o*t,s-o,l-o*n,s,l)}function o(e){this._context=e}function r(e){this._context=new h(e)}function h(e){this._context=e}function c(e){return new o(e)}function d(e){return new r(e)}n.d(t,{G:()=>c,N:()=>d}),o.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:l(this,this._t0,s(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,l(this,s(this,n=i(this,e,t)),n);break;default:l(this,this._t0,n=i(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(r.prototype=Object.create(o.prototype)).point=function(e,t){o.prototype.point.call(this,t,e)},h.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,a,i,s){this._context.bezierCurveTo(t,e,a,n,s,i)}}},6066:(e,t,n)=>{function a(e){this._context=e}function i(e){var t,n,a=e.length-1,i=new Array(a),s=new Array(a),l=new Array(a);for(i[0]=0,s[0]=2,l[0]=e[0]+2*e[1],t=1;t<a-1;++t)i[t]=1,s[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[a-1]=2,s[a-1]=7,l[a-1]=8*e[a-1]+e[a],t=1;t<a;++t)n=i[t]/s[t-1],s[t]-=n,l[t]-=n*l[t-1];for(i[a-1]=l[a-1]/s[a-1],t=a-2;t>=0;--t)i[t]=(l[t]-i[t+1])/s[t];for(s[a-1]=(e[a]+i[a-1])/2,t=0;t<a-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function s(e){return new a(e)}n.d(t,{A:()=>s}),a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var a=i(e),s=i(t),l=0,o=1;o<n;++l,++o)this._context.bezierCurveTo(a[0][l],s[0][l],a[1][l],s[1][l],e[o],t[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}}},3269:(e,t,n)=>{function a(e){return function(){return e}}n.d(t,{A:()=>p}),Array.prototype.slice;var i=n(482);const s=Math.PI,l=2*s,o=1e-6,r=l-o;function h(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class c{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?h:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return h;const n=10**t;return function(e){this._+=e[0];for(let t=1,a=e.length;t<a;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,a){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(e,t,n,a,i,s){this._append`C${+e},${+t},${+n},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(e,t,n,a,i){if(e=+e,t=+t,n=+n,a=+a,(i=+i)<0)throw new Error(`negative radius: ${i}`);let l=this._x1,r=this._y1,h=n-e,c=a-t,d=l-e,u=r-t,p=d*d+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(p>o)if(Math.abs(u*h-c*d)>o&&i){let g=n-l,A=a-r,f=h*h+c*c,y=g*g+A*A,v=Math.sqrt(f),b=Math.sqrt(p),m=i*Math.tan((s-Math.acos((f+p-y)/(2*v*b)))/2),k=m/b,w=m/v;Math.abs(k-1)>o&&this._append`L${e+k*d},${t+k*u}`,this._append`A${i},${i},0,0,${+(u*g>d*A)},${this._x1=e+w*h},${this._y1=t+w*c}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,a,i,h){if(e=+e,t=+t,h=!!h,(n=+n)<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(a),d=n*Math.sin(a),u=e+c,p=t+d,g=1^h,A=h?a-i:i-a;null===this._x1?this._append`M${u},${p}`:(Math.abs(this._x1-u)>o||Math.abs(this._y1-p)>o)&&this._append`L${u},${p}`,n&&(A<0&&(A=A%l+l),A>r?this._append`A${n},${n},0,1,${g},${e-c},${t-d}A${n},${n},0,1,${g},${this._x1=u},${this._y1=p}`:A>o&&this._append`A${n},${n},0,${+(A>=s)},${g},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function d(e){return e[0]}function u(e){return e[1]}function p(e,t){var n=a(!0),s=null,l=i.A,o=null,r=function(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new c(t)}(h);function h(a){var i,h,c,d=(a=function(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}(a)).length,u=!1;for(null==s&&(o=l(c=r())),i=0;i<=d;++i)!(i<d&&n(h=a[i],i,a))===u&&((u=!u)?o.lineStart():o.lineEnd()),u&&o.point(+e(h,i,a),+t(h,i,a));if(c)return o=null,c+""||null}return e="function"==typeof e?e:void 0===e?d:a(e),t="function"==typeof t?t:void 0===t?u:a(t),h.x=function(t){return arguments.length?(e="function"==typeof t?t:a(+t),h):e},h.y=function(e){return arguments.length?(t="function"==typeof e?e:a(+e),h):t},h.defined=function(e){return arguments.length?(n="function"==typeof e?e:a(!!e),h):n},h.curve=function(e){return arguments.length?(l=e,null!=s&&(o=l(s)),h):l},h.context=function(e){return arguments.length?(null==e?s=o=null:o=l(s=e),h):s},h}c.prototype}}]);
|
|
3
|
-
//# sourceMappingURL=4017.57c2da6f.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[5399],{7780:(e,t,s)=>{s.r(t),s.d(t,{enqueueStableLoadBricks:()=>f,enqueueStableLoadProcessors:()=>p,flushStableLoadBricks:()=>u,loadBricksImperatively:()=>w,loadEditorsImperatively:()=>h,loadProcessorsImperatively:()=>m,loadScript:()=>o,loadSharedModule:()=>a,loadStyle:()=>i});const n=new Map;function r(e,t,s,o){if(Array.isArray(t))return Promise.all(t.map((t=>r(e,t,s))));const i=s&&!/^https?:/.test(t)?`${s}${t}`:t,a=n.get(i);if(a)return a;const c=new Promise(((t,s)=>{const n=()=>{window.dispatchEvent(new Event("request.end"))},r=document.createElement("style"===e?"link":"script");"script"===e?Object.assign(r,{type:"text/javascript",async:!0,...o,src:i}):Object.assign(r,{rel:"stylesheet",...o,href:i}),r.onload=()=>{t(i),n()},r.onerror=e=>{s(e),n()};const a=document.currentScript||document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a),window.dispatchEvent(new Event("request.start"))}));return n.set(i,c),c}function o(e,t,s){return r("script",e,t,s)}function i(e,t,s){return r("style",e,t,s)}async function a(e,t){await s.I("default");const n=window[e];return await n.init(s.S.default),(await n.get(t))()}let c,l=!1;const d=new Promise((e=>{c=e}));function u(){l||c()}function f(e,t){return E(P("bricks",e,t))}function p(e,t){return E(P("processors",e,t))}async function w(e,t){const s=P("bricks",e,t);return u(),E(s)}function m(e,t){const s=P("processors",e,t);return u(),E(s)}function h(e,t){const s=P("editors",e,t);return u(),E(s)}let v;const y="v2-adapter.load-bricks";function b(e,t,s){const n=new Map,r=new Set,o=t=>{var i;if(r.has(t))return;let a,c,l;if(r.add(t),"editors"===e){l=t;for(const e of s.values()){var d;null!==(d=e.propertyEditors??e.editors)&&void 0!==d&&d.some((e=>e===l))&&(a=e)}}else if("processors"===e||t.includes(".")){[c,l]=t.split(".");const n=`bricks/${"processors"===e?(p=c,p.replace(/[A-Z]/g,(e=>`-${e[0].toLocaleLowerCase()}`)).replace(/_[0-9]/g,(e=>`-${e[1]}`))):c}`;a=s.get(n)}else{let e;l=t;for(const n of s.values()){var u;if(null!==(u=n.elements)&&void 0!==u&&u.some((e=>e===l))){var f;if(null===(f=n.deprecatedElements)||void 0===f||!f.includes(t)){a=n;break}e=n}}!a&&e&&(a=e)}var p;if(!a)return void console.error(`Package for ${t} not found.`);let w=n.get(a);w||(w=[],n.set(a,w)),w.push({fullName:t,lastName:l});const m=null===(i=a.dependencies)||void 0===i?void 0:i[t];if(m)for(const e of m)o(e)};for(const e of t)o(e);return n}async function k(e,t,s){const n=`${"processors"===e||"editors"===e?`./${e}/`:"./"}${"editors"===e?s.fullName:s.lastName}`;try{await a(t,n)}catch(t){throw console.error(t),new Error(`Load ${e} of "${s.fullName}" failed: ${null==t?void 0:t.message}`)}}function g(e,t,s){return t.map((async t=>(await o(t.filePath,window.PUBLIC_ROOT??""),await d,Promise.all(s.get(t).map((s=>k(e,t.id,s)))))))}async function P(e,t,s){const n=new Map;for(const e of s){const t=e.id||$(e.filePath);n.set(t,e)}const r=b(e,t,n);let i;const a=[],d=[];let u;for(const e of r.keys())if(e.id)"bricks/basic"===e.id?i=e:d.push(e);else if(a.push(e),u=n.get("bricks/v2-adapter"),!u)throw new Error("Using v2 bricks, but v2-adapter not found");const f=u;let p;const w=i;if(w){const t=o(w.filePath,window.PUBLIC_ROOT??"");l||(l=!0,t.then((()=>Promise.resolve())).then(c)),p=t.then((()=>Promise.all(r.get(w).map((t=>k(e,w.id,t))))))}const m=[p].concat(g(e,d,r));if(f&&a.length>0){if(!v){const e=b("bricks",[y],n),t=[...e.keys()];v=(async()=>(await Promise.all(g("bricks",t,e)),document.createElement(y)))()}m.push(v.then((t=>Promise.all(a.map((n=>{const o=$(n.filePath).split("/")[1];return t.resolve(f.filePath,"editors"===e?n.propertyEditorsJsFilePath??n.filePath:n.filePath,"bricks"===e?r.get(n).map((e=>`${o}.${e.lastName}`)):[],n.dll,s)}))))))}await Promise.all(m)}async function E(e){window.dispatchEvent(new Event("request.start"));try{await e}finally{window.dispatchEvent(new Event("request.end"))}}function $(e){return e.split("/").slice(0,2).join("/")}}}]);
|
|
2
|
-
//# sourceMappingURL=5399.004ae086.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/5399.004ae086.js","mappings":"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","sources":["webpack:///../../node_modules/@next-core/loader/dist/esm/loadScriptOrStyle.js","webpack:///../../node_modules/@next-core/loader/dist/esm/loadScript.js","webpack:///../../node_modules/@next-core/loader/dist/esm/loadStyle.js","webpack:///../../node_modules/@next-core/loader/dist/esm/loadSharedModule.js","webpack:///../../node_modules/@next-core/loader/dist/esm/stableLoadBricks.js"],"sourcesContent":["const cache = new Map();\nexport default function loadScriptOrStyle(type, src, prefix, attrs) {\n if (Array.isArray(src)) {\n return Promise.all(src.map(item => loadScriptOrStyle(type, item, prefix)));\n }\n const fixedSrc = prefix && !/^https?:/.test(src) ? `${prefix}${src}` : src;\n const cachedPromise = cache.get(fixedSrc);\n if (cachedPromise) {\n return cachedPromise;\n }\n const promise = new Promise((resolve, reject) => {\n const end = () => {\n window.dispatchEvent(new Event(\"request.end\"));\n };\n const element = document.createElement(type === \"style\" ? \"link\" : \"script\");\n if (type === \"script\") {\n Object.assign(element, {\n type: \"text/javascript\",\n async: true,\n ...attrs,\n src: fixedSrc\n });\n } else {\n Object.assign(element, {\n rel: \"stylesheet\",\n ...attrs,\n href: fixedSrc\n });\n }\n element.onload = () => {\n resolve(fixedSrc);\n end();\n };\n element.onerror = e => {\n reject(e);\n end();\n };\n const firstScript = document.currentScript || document.getElementsByTagName(\"script\")[0];\n firstScript.parentNode.insertBefore(element, firstScript);\n window.dispatchEvent(new Event(\"request.start\"));\n });\n cache.set(fixedSrc, promise);\n return promise;\n}\n//# sourceMappingURL=loadScriptOrStyle.js.map","import loadScriptOrStyle from \"./loadScriptOrStyle.js\";\nexport default function loadScript(src, prefix, attrs) {\n return loadScriptOrStyle(\"script\", src, prefix, attrs);\n}\n//# sourceMappingURL=loadScript.js.map","import loadScriptOrStyle from \"./loadScriptOrStyle.js\";\nexport default function loadStyle(src, prefix, attrs) {\n return loadScriptOrStyle(\"style\", src, prefix, attrs);\n}\n//# sourceMappingURL=loadStyle.js.map","// https://github.com/module-federation/module-federation-examples/blob/eda9493f3991a423479fd834cfb1d7b241d9d1f0/advanced-api/dynamic-remotes/app1/src/App.js\nexport default async function loadSharedModule(scope, module) {\n // Initializes the share scope. This fills it with known provided modules from this build and all remotes\n await __webpack_init_sharing__(\"default\");\n const container = window[scope]; // or get the container somewhere else\n // Initialize the container, it may provide shared modules\n await container.init(__webpack_share_scopes__.default);\n const factory = await container.get(module);\n return factory();\n}\n//# sourceMappingURL=loadSharedModule.js.map","import loadScript from \"./loadScript.js\";\nimport loadSharedModule from \"./loadSharedModule.js\";\nlet resolveBasicPkg;\nlet basicPkgWillBeResolved = false;\nconst waitBasicPkg = new Promise(resolve => {\n resolveBasicPkg = resolve;\n});\nexport function flushStableLoadBricks() {\n if (!basicPkgWillBeResolved) {\n resolveBasicPkg();\n }\n}\n\n/**\n * When loading bundles with webpack module federation concurrently, if\n * these bundles share some modules, webpack will load a singleton module\n * if versions are matched. Webpack will use the first bundle who started\n * to init the shared scope. Generally which bundle to use for a specific\n * module, does not matter. However, it may cause flaky result since the\n * shared module may from different bundles which maybe not exactly the\n * same, especially developers declare dependencies incorrectly sometimes.\n * So in order to make it less flaky, we try to make a BASIC package takes\n * precedence over others. We will always load the shared modules from the\n * basic package bundle if it contains the shared modules.\n */\nexport function enqueueStableLoadBricks(bricks, brickPackages) {\n const promise = enqueueStableLoad(\"bricks\", bricks, brickPackages);\n return dispatchRequestStatus(promise);\n}\nexport function enqueueStableLoadProcessors(processors, brickPackages) {\n const promise = enqueueStableLoad(\"processors\", processors, brickPackages);\n return dispatchRequestStatus(promise);\n}\nexport async function loadBricksImperatively(bricks, brickPackages) {\n const promise = enqueueStableLoad(\"bricks\", bricks, brickPackages);\n flushStableLoadBricks();\n return dispatchRequestStatus(promise);\n}\nexport function loadProcessorsImperatively(processors, brickPackages) {\n const promise = enqueueStableLoad(\"processors\", processors, brickPackages);\n flushStableLoadBricks();\n return dispatchRequestStatus(promise);\n}\nexport function loadEditorsImperatively(editors, brickPackages) {\n const promise = enqueueStableLoad(\"editors\", editors, brickPackages);\n flushStableLoadBricks();\n return dispatchRequestStatus(promise);\n}\nlet v2AdapterPromise;\nconst V2_ADAPTER_LOAD_BRICKS = \"v2-adapter.load-bricks\";\n// Get brick/processor items including their dependencies\nfunction getItemsByPkg(type, list, brickPackagesMap) {\n const itemsByPkg = new Map();\n const listToLoad = new Set();\n const add = item => {\n var _pkg$dependencies;\n if (listToLoad.has(item)) {\n return;\n }\n listToLoad.add(item);\n let pkg;\n let namespace;\n let lastName;\n if (type === \"editors\") {\n lastName = item;\n for (const p of brickPackagesMap.values()) {\n var _ref;\n if ((_ref = p.propertyEditors ?? p.editors) !== null && _ref !== void 0 && _ref.some(e => e === lastName)) {\n pkg = p;\n }\n }\n } else if (type === \"processors\" || item.includes(\".\")) {\n [namespace, lastName] = item.split(\".\");\n const pkgId = `bricks/${type === \"processors\" ? getProcessorPackageName(namespace) : namespace}`;\n pkg = brickPackagesMap.get(pkgId);\n } else {\n lastName = item;\n let deprecatedBrickInThisPkg;\n for (const p of brickPackagesMap.values()) {\n var _p$elements;\n if ((_p$elements = p.elements) !== null && _p$elements !== void 0 && _p$elements.some(e => e === lastName)) {\n var _p$deprecatedElements;\n if ((_p$deprecatedElements = p.deprecatedElements) !== null && _p$deprecatedElements !== void 0 && _p$deprecatedElements.includes(item)) {\n deprecatedBrickInThisPkg = p;\n } else {\n pkg = p;\n break;\n }\n }\n }\n if (!pkg && deprecatedBrickInThisPkg) {\n pkg = deprecatedBrickInThisPkg;\n }\n }\n if (!pkg) {\n // eslint-disable-next-line no-console\n console.error(`Package for ${item} not found.`);\n return;\n }\n let groupItems = itemsByPkg.get(pkg);\n if (!groupItems) {\n groupItems = [];\n itemsByPkg.set(pkg, groupItems);\n }\n groupItems.push({\n fullName: item,\n lastName\n });\n\n // Load their dependencies too\n const deps = (_pkg$dependencies = pkg.dependencies) === null || _pkg$dependencies === void 0 ? void 0 : _pkg$dependencies[item];\n if (deps) {\n for (const dep of deps) {\n add(dep);\n }\n }\n };\n for (const item of list) {\n add(item);\n }\n return itemsByPkg;\n}\nasync function loadBrickModule(type, pkgId, item) {\n const moduleName = `${type === \"processors\" || type === \"editors\" ? `./${type}/` : \"./\"}${type === \"editors\" ? item.fullName : item.lastName}`;\n try {\n await loadSharedModule(pkgId, moduleName);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n throw new Error(`Load ${type} of \"${item.fullName}\" failed: ${error === null || error === void 0 ? void 0 : error.message}`);\n }\n}\nfunction loadRestBricks(type, pkgs, itemsMap) {\n return pkgs.map(async pkg => {\n await loadScript(pkg.filePath, window.PUBLIC_ROOT ?? \"\");\n await waitBasicPkg;\n return Promise.all(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n itemsMap.get(pkg).map(item => loadBrickModule(type, pkg.id, item)));\n });\n}\nasync function enqueueStableLoad(type, list, brickPackages) {\n const brickPackagesMap = new Map();\n for (const pkg of brickPackages) {\n const pkgId = pkg.id || getPkgIdByFilePath(pkg.filePath);\n brickPackagesMap.set(pkgId, pkg);\n }\n const itemsByPkg = getItemsByPkg(type, list, brickPackagesMap);\n let foundBasicPkg;\n const v2Packages = [];\n const v3PackagesOtherThanBasic = [];\n let maybeV2Adapter;\n for (const pkg of itemsByPkg.keys()) {\n if (pkg.id) {\n if (pkg.id === \"bricks/basic\") {\n foundBasicPkg = pkg;\n } else {\n v3PackagesOtherThanBasic.push(pkg);\n }\n } else {\n // Brick packages of v2 has no `id`\n v2Packages.push(pkg);\n maybeV2Adapter = brickPackagesMap.get(\"bricks/v2-adapter\");\n if (!maybeV2Adapter) {\n throw new Error(\"Using v2 bricks, but v2-adapter not found\");\n }\n }\n }\n const v2Adapter = maybeV2Adapter;\n let basicPkgPromise;\n const basicPkg = foundBasicPkg;\n if (basicPkg) {\n const tempPromise = loadScript(basicPkg.filePath, window.PUBLIC_ROOT ?? \"\");\n // Packages other than BASIC will wait for an extra micro-task tick.\n if (!basicPkgWillBeResolved) {\n basicPkgWillBeResolved = true;\n tempPromise.then(() => Promise.resolve()).then(resolveBasicPkg);\n }\n basicPkgPromise = tempPromise.then(() => Promise.all(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n itemsByPkg.get(basicPkg).map(item => loadBrickModule(type, basicPkg.id, item))));\n }\n const pkgPromises = [basicPkgPromise].concat(loadRestBricks(type, v3PackagesOtherThanBasic, itemsByPkg));\n if (v2Adapter && v2Packages.length > 0) {\n if (!v2AdapterPromise) {\n // Load `v2-adapter.load-bricks` and its dependencies\n const v2AdapterItemsByPkg = getItemsByPkg(\"bricks\", [V2_ADAPTER_LOAD_BRICKS], brickPackagesMap);\n const v2AdapterPackages = [...v2AdapterItemsByPkg.keys()];\n const loadV2Adapter = async () => {\n await Promise.all(loadRestBricks(\"bricks\", v2AdapterPackages, v2AdapterItemsByPkg));\n return document.createElement(V2_ADAPTER_LOAD_BRICKS);\n };\n v2AdapterPromise = loadV2Adapter();\n }\n pkgPromises.push(v2AdapterPromise.then(adapter => Promise.all(v2Packages.map(pkg => {\n const pkgId = getPkgIdByFilePath(pkg.filePath);\n const pkgNamespace = pkgId.split(\"/\")[1];\n return adapter.resolve(v2Adapter.filePath, type === \"editors\" ? pkg.propertyEditorsJsFilePath ?? pkg.filePath : pkg.filePath, type === \"bricks\" ?\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n itemsByPkg.get(pkg).map(item => `${pkgNamespace}.${item.lastName}`) : [], pkg.dll,\n // Todo: remove `brickPackages` as an argument\n brickPackages);\n }))));\n }\n await Promise.all(pkgPromises);\n}\nasync function dispatchRequestStatus(promise) {\n window.dispatchEvent(new Event(\"request.start\"));\n try {\n await promise;\n } finally {\n window.dispatchEvent(new Event(\"request.end\"));\n }\n}\nfunction getProcessorPackageName(camelPackageName) {\n return camelPackageName.replace(/[A-Z]/g, match => `-${match[0].toLocaleLowerCase()}`).replace(/_[0-9]/g, match => `-${match[1]}`);\n}\nfunction getPkgIdByFilePath(filePath) {\n return filePath.split(\"/\").slice(0, 2).join(\"/\");\n}\n//# sourceMappingURL=stableLoadBricks.js.map"],"names":["cache","Map","loadScriptOrStyle","type","src","prefix","attrs","Array","isArray","Promise","all","map","item","fixedSrc","test","cachedPromise","get","promise","resolve","reject","end","window","dispatchEvent","Event","element","document","createElement","Object","assign","async","rel","href","onload","onerror","e","firstScript","currentScript","getElementsByTagName","parentNode","insertBefore","set","loadScript","loadStyle","loadSharedModule","scope","module","container","init","default","resolveBasicPkg","basicPkgWillBeResolved","waitBasicPkg","flushStableLoadBricks","enqueueStableLoadBricks","bricks","brickPackages","dispatchRequestStatus","enqueueStableLoad","enqueueStableLoadProcessors","processors","loadBricksImperatively","loadProcessorsImperatively","loadEditorsImperatively","editors","v2AdapterPromise","V2_ADAPTER_LOAD_BRICKS","getItemsByPkg","list","brickPackagesMap","itemsByPkg","listToLoad","Set","add","_pkg$dependencies","has","pkg","namespace","lastName","p","values","_ref","propertyEditors","some","includes","split","pkgId","camelPackageName","replace","match","toLocaleLowerCase","deprecatedBrickInThisPkg","_p$elements","elements","_p$deprecatedElements","deprecatedElements","console","error","groupItems","push","fullName","deps","dependencies","dep","loadBrickModule","moduleName","Error","message","loadRestBricks","pkgs","itemsMap","filePath","PUBLIC_ROOT","id","getPkgIdByFilePath","foundBasicPkg","v2Packages","v3PackagesOtherThanBasic","maybeV2Adapter","keys","v2Adapter","basicPkgPromise","basicPkg","tempPromise","then","pkgPromises","concat","length","v2AdapterItemsByPkg","v2AdapterPackages","loadV2Adapter","adapter","pkgNamespace","propertyEditorsJsFilePath","dll","slice","join"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[6314,3933],{3933:(e,t,o)=>{function n(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(r,s){if("string"==typeof t?r.name===t:t.includes(r.name)){const t=[];for(let i=1;i<=o;i++){const o=s[s.length-i];if("MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key){const s=o.node;s.computed||"Identifier"!==s.property.type?s.computed&&"Literal"===s.property.type&&"string"==typeof s.property.value?t.push(n?`${r.name}.${s.property.value}`:s.property.value):e.hasNonStaticUsage=!0:t.push(n?`${r.name}.${s.property.name}`:s.property.name)}else e.hasNonStaticUsage=!0}t.length===o&&e.usedProperties.add(t.join("."))}}}function r(e,t){return function(o,n,r){if(n.name===e){const e=r[r.length-1],n=r[r.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==e?void 0:e.node.type)&&"object"===e.key&&(e.node.computed?"Literal"===e.node.property.type&&e.node.property.value===t:"Identifier"===e.node.property.type&&e.node.property.name===t)){const e=n.node.arguments;if(e.length>0){const t=e[0];"Literal"===t.type&&"string"==typeof t.value?o.usedArgs.add(t.value):o.hasNonStaticUsage=!0}}}}}o.r(t),o.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>s,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>p,collectMemberUsageInFunction:()=>S,createProviderClass:()=>c.createProviderClass,scanPermissionActionsInAny:()=>P,scanPermissionActionsInStoryboard:()=>v,strictCollectMemberUsage:()=>l,track:()=>f,trackAll:()=>y,traverseStoryboardExpressions:()=>u,traverseStoryboardFunction:()=>g,traverseStoryboardFunctions:()=>h,unwrapProvider:()=>c.unwrapProvider});const s=r("APP","getMenu"),i=r("INSTALLED_APPS","has");var a=o(8897),c=o(1351);function u(e,t,o){const n=new WeakSet,{matchExpressionString:r,visitNotMatchedExpressionString:s,visitNonExpressionString:i,visitObject:u}="string"==typeof o?{matchExpressionString:e=>e.includes(o)}:o;!function e(o){if("string"==typeof o)if((0,a.isEvaluable)(o))if(r(o))try{(0,a.preevaluate)(o,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,o)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==s||s(o);else null==i||i(o);else if((0,c.isObject)(o)){if(n.has(o))return;n.add(o),null==u||u(o);for(const t of Array.isArray(o)?o:Object.values(o))e(t)}}(e)}function l(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{hasNonStaticUsage:n,nonStaticUsage:r,usedProperties:s}=p(e,t,o);if(n)throw new Error(`Non-static usage of ${t} is prohibited, check your expression: "${r}"`);return s}function p(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r={usedProperties:new Set,hasNonStaticUsage:!1},s=n(r,t,o);return u(e,((e,t,o)=>{s(e,t),r.hasNonStaticUsage&&(r.nonStaticUsage=o)}),t),r}const d=["CTX","STATE","FORM_STATE"];function f(e,t,o){if(e.includes(t)){const r={usedProperties:new Set,hasNonStaticUsage:!1},{expression:s}=(0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(r,o)}});let i;if("SequenceExpression"===s.type&&(i=s.expressions[0])&&"Literal"===i.type&&i.value===t){if(r.usedProperties.size>0)return r.usedProperties;console.warn(`You are using "${t}" but no \`${o}\` usage found in your expression: ${JSON.stringify(e)}`)}}return!1}function y(e){if(d.some((t=>e.includes(t)))){const t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(t,d,1,!0)}}),t.usedProperties.size>0){const e=[...t.usedProperties],o={context:!1,state:!1,formState:!1},n={CTX:"context",STATE:"state",FORM_STATE:"formState"};return e.forEach((e=>{const[t,r]=e.split(".");o[n[t]]||(o[n[t]]=[]),o[n[t]].push(r)})),o}console.warn(`You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: ${JSON.stringify(e)}`)}return!1}function h(e,t,o){if(Array.isArray(e))for(const n of e)null!=o&&o.matchSource&&!o.matchSource(n.source)||g(n,t)}function g(e,t,o){try{(0,a.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t},cacheKey:e})}catch(t){o||console.error(`Parse storyboard function "${e.name}" failed:`,t)}}function S(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const s={usedProperties:new Set,hasNonStaticUsage:!1};if(e.source.includes(t)&&g(e,n(s,t,r),o),s.hasNonStaticUsage&&!o)throw new Error(`Non-static usage of ${t} is prohibited, check your function: "${e.name}"`);return s.usedProperties.delete(e.name),s.usedProperties}const m="PERMISSIONS",b="check";function v(e){const t=new Set,o=k(t),{customTemplates:n,functions:r}=e.meta??{};return u([e.routes,n],o,m),h(r,o,{matchSource:e=>e.includes(m)}),Array.from(t)}function P(e){const t=new Set;return u(e,k(t),m),Array.from(t)}function k(e){return function(t,o){if(t.name===m){const t=o[o.length-1],n=o[o.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==t?void 0:t.node.type)&&"object"===t.key&&(t.node.computed?"Literal"===t.node.property.type&&t.node.property.value===b:"Identifier"===t.node.property.type&&t.node.property.name===b))for(const t of n.node.arguments)"Literal"===t.type&&"string"==typeof t.value&&e.add(t.value)}}}}}]);
|
|
2
|
-
//# sourceMappingURL=6314.9ad0e0c5.js.map
|