@next-bricks/diagram 0.54.6 → 0.54.8

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.
Files changed (37) hide show
  1. package/dist/bricks.json +3 -3
  2. package/dist/chunks/4185.1e71810a.js +3 -0
  3. package/dist/chunks/4185.1e71810a.js.map +1 -0
  4. package/dist/chunks/5670.2d7e3824.js +3 -0
  5. package/dist/chunks/5670.2d7e3824.js.map +1 -0
  6. package/dist/chunks/{3025.e8c7b486.js → 7920.e59e82e7.js} +3 -3
  7. package/dist/chunks/7920.e59e82e7.js.map +1 -0
  8. package/dist/chunks/8552.0c89d62a.js +2 -0
  9. package/dist/chunks/8552.0c89d62a.js.map +1 -0
  10. package/dist/chunks/eo-diagram.5c99be44.js +2 -0
  11. package/dist/chunks/eo-diagram.5c99be44.js.map +1 -0
  12. package/dist/chunks/main.2a59de7e.js +2 -0
  13. package/dist/chunks/main.2a59de7e.js.map +1 -0
  14. package/dist/examples.json +3 -3
  15. package/dist/index.a0bd8d53.js +2 -0
  16. package/dist/index.a0bd8d53.js.map +1 -0
  17. package/dist/manifest.json +132 -132
  18. package/dist/types.json +4331 -4331
  19. package/package.json +2 -2
  20. package/dist/chunks/3025.e8c7b486.js.map +0 -1
  21. package/dist/chunks/5443.e0be670a.js +0 -3
  22. package/dist/chunks/5443.e0be670a.js.map +0 -1
  23. package/dist/chunks/5582.0b33142f.js +0 -3
  24. package/dist/chunks/5582.0b33142f.js.map +0 -1
  25. package/dist/chunks/7507.f8686358.js +0 -2
  26. package/dist/chunks/7507.f8686358.js.map +0 -1
  27. package/dist/chunks/8552.1ed604a7.js +0 -2
  28. package/dist/chunks/8552.1ed604a7.js.map +0 -1
  29. package/dist/chunks/eo-diagram.44df31ee.js +0 -2
  30. package/dist/chunks/eo-diagram.44df31ee.js.map +0 -1
  31. package/dist/chunks/main.433071ed.js +0 -2
  32. package/dist/chunks/main.433071ed.js.map +0 -1
  33. package/dist/index.f8c0d3b6.js +0 -2
  34. package/dist/index.f8c0d3b6.js.map +0 -1
  35. /package/dist/chunks/{5582.0b33142f.js.LICENSE.txt → 4185.1e71810a.js.LICENSE.txt} +0 -0
  36. /package/dist/chunks/{5443.e0be670a.js.LICENSE.txt → 5670.2d7e3824.js.LICENSE.txt} +0 -0
  37. /package/dist/chunks/{3025.e8c7b486.js.LICENSE.txt → 7920.e59e82e7.js.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[7507],{4579:(e,a,r)=>{r.d(a,{H:()=>g,K6:()=>f,Me:()=>l,Ob:()=>d,YL:()=>i,_:()=>n,g8:()=>u,n6:()=>s,oS:()=>h,wE:()=>c});var t=r(1071);function n(e,a,r){return{r:255*(0,t.Cg)(e,255),g:255*(0,t.Cg)(a,255),b:255*(0,t.Cg)(r,255)}}function f(e,a,r){e=(0,t.Cg)(e,255),a=(0,t.Cg)(a,255),r=(0,t.Cg)(r,255);var n=Math.max(e,a,r),f=Math.min(e,a,r),o=0,i=0,c=(n+f)/2;if(n===f)i=0,o=0;else{var l=n-f;switch(i=c>.5?l/(2-n-f):l/(n+f),n){case e:o=(a-r)/l+(a<r?6:0);break;case a:o=(r-e)/l+2;break;case r:o=(e-a)/l+4}o/=6}return{h:o,s:i,l:c}}function o(e,a,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*r*(a-e):r<.5?a:r<2/3?e+(a-e)*(2/3-r)*6:e}function i(e,a,r){var n,f,i;if(e=(0,t.Cg)(e,360),a=(0,t.Cg)(a,100),r=(0,t.Cg)(r,100),0===a)f=r,i=r,n=r;else{var c=r<.5?r*(1+a):r+a-r*a,l=2*r-c;n=o(l,c,e+1/3),f=o(l,c,e),i=o(l,c,e-1/3)}return{r:255*n,g:255*f,b:255*i}}function c(e,a,r){e=(0,t.Cg)(e,255),a=(0,t.Cg)(a,255),r=(0,t.Cg)(r,255);var n=Math.max(e,a,r),f=Math.min(e,a,r),o=0,i=n,c=n-f,l=0===n?0:c/n;if(n===f)o=0;else{switch(n){case e:o=(a-r)/c+(a<r?6:0);break;case a:o=(r-e)/c+2;break;case r:o=(e-a)/c+4}o/=6}return{h:o,s:l,v:i}}function l(e,a,r){e=6*(0,t.Cg)(e,360),a=(0,t.Cg)(a,100),r=(0,t.Cg)(r,100);var n=Math.floor(e),f=e-n,o=r*(1-a),i=r*(1-f*a),c=r*(1-(1-f)*a),l=n%6;return{r:255*[r,i,o,o,c,r][l],g:255*[c,r,r,i,o,o][l],b:255*[o,o,c,r,r,i][l]}}function d(e,a,r,n){var f=[(0,t.wl)(Math.round(e).toString(16)),(0,t.wl)(Math.round(a).toString(16)),(0,t.wl)(Math.round(r).toString(16))];return n&&f[0].startsWith(f[0].charAt(1))&&f[1].startsWith(f[1].charAt(1))&&f[2].startsWith(f[2].charAt(1))?f[0].charAt(0)+f[1].charAt(0)+f[2].charAt(0):f.join("")}function g(e,a,r,n,f){var o,i=[(0,t.wl)(Math.round(e).toString(16)),(0,t.wl)(Math.round(a).toString(16)),(0,t.wl)(Math.round(r).toString(16)),(0,t.wl)((o=n,Math.round(255*parseFloat(o)).toString(16)))];return f&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function s(e){return u(e)/255}function u(e){return parseInt(e,16)}function h(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}},2887:(e,a,r)=>{r.d(a,{D:()=>t});var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},4501:(e,a,r)=>{r.d(a,{RO:()=>o});var t=r(4579),n=r(2887),f=r(1071);function o(e){var a={r:0,g:0,b:0},r=1,o=null,i=null,c=null,l=!1,s=!1;return"string"==typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var a=!1;if(n.D[e])e=n.D[e],a=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var r=d.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=d.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=d.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=d.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=d.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=d.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=d.hex8.exec(e))?{r:(0,t.g8)(r[1]),g:(0,t.g8)(r[2]),b:(0,t.g8)(r[3]),a:(0,t.n6)(r[4]),format:a?"name":"hex8"}:(r=d.hex6.exec(e))?{r:(0,t.g8)(r[1]),g:(0,t.g8)(r[2]),b:(0,t.g8)(r[3]),format:a?"name":"hex"}:(r=d.hex4.exec(e))?{r:(0,t.g8)(r[1]+r[1]),g:(0,t.g8)(r[2]+r[2]),b:(0,t.g8)(r[3]+r[3]),a:(0,t.n6)(r[4]+r[4]),format:a?"name":"hex8"}:!!(r=d.hex3.exec(e))&&{r:(0,t.g8)(r[1]+r[1]),g:(0,t.g8)(r[2]+r[2]),b:(0,t.g8)(r[3]+r[3]),format:a?"name":"hex"}}(e)),"object"==typeof e&&(g(e.r)&&g(e.g)&&g(e.b)?(a=(0,t._)(e.r,e.g,e.b),l=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):g(e.h)&&g(e.s)&&g(e.v)?(o=(0,f.Px)(e.s),i=(0,f.Px)(e.v),a=(0,t.Me)(e.h,o,i),l=!0,s="hsv"):g(e.h)&&g(e.s)&&g(e.l)&&(o=(0,f.Px)(e.s),c=(0,f.Px)(e.l),a=(0,t.YL)(e.h,o,c),l=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=(0,f.TV)(r),{ok:l,format:e.format||s,r:Math.min(255,Math.max(a.r,0)),g:Math.min(255,Math.max(a.g,0)),b:Math.min(255,Math.max(a.b,0)),a:r}}var i="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),c="[\\s|\\(]+(".concat(i,")[,|\\s]+(").concat(i,")[,|\\s]+(").concat(i,")\\s*\\)?"),l="[\\s|\\(]+(".concat(i,")[,|\\s]+(").concat(i,")[,|\\s]+(").concat(i,")[,|\\s]+(").concat(i,")\\s*\\)?"),d={CSS_UNIT:new RegExp(i),rgb:new RegExp("rgb"+c),rgba:new RegExp("rgba"+l),hsl:new RegExp("hsl"+c),hsla:new RegExp("hsla"+l),hsv:new RegExp("hsv"+c),hsva:new RegExp("hsva"+l),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function g(e){return Boolean(d.CSS_UNIT.exec(String(e)))}},1071:(e,a,r)=>{function t(e,a){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===a?e:Math.min(a,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*a),10)/100),Math.abs(e-a)<1e-6?1:e=360===a?(e<0?e%a+a:e%a)/parseFloat(String(a)):e%a/parseFloat(String(a))}function n(e){return Math.min(1,Math.max(0,e))}function f(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function o(e){return e<=1?"".concat(100*Number(e),"%"):e}function i(e){return 1===e.length?"0"+e:String(e)}r.d(a,{Cg:()=>t,J$:()=>n,Px:()=>o,TV:()=>f,wl:()=>i})},2559:(e,a,r)=>{function t(e,a,r){if("function"==typeof e?e===a:e.has(a))return arguments.length<3?a:r;throw new TypeError("Private element is not present on this object")}r.d(a,{A:()=>t})},2016:(e,a,r)=>{function t(e,a){if(a.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}r.d(a,{A:()=>t})},829:(e,a,r)=>{r.d(a,{A:()=>n});var t=r(2559);function n(e,a){return e.get((0,t.A)(e,a))}},918:(e,a,r)=>{r.d(a,{A:()=>n});var t=r(2016);function n(e,a,r){(0,t.A)(e,a),a.set(e,r)}},6121:(e,a,r)=>{r.d(a,{A:()=>n});var t=r(2559);function n(e,a,r){return e.set((0,t.A)(e,a),r),r}},4635:(e,a,r)=>{r.d(a,{A:()=>n});var t=r(2016);function n(e,a){(0,t.A)(e,a),a.add(e)}},4586:(e,a,r)=>{r.d(a,{A:()=>n});var t=r(1369);function n(e,a,r){return(a=(0,t.A)(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}},1369:(e,a,r)=>{r.d(a,{A:()=>n});var t=r(7545);function n(e){var a=function(e,a){if("object"!=(0,t.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=(0,t.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,t.A)(a)?a:a+""}},7545:(e,a,r)=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}r.d(a,{A:()=>t})}}]);
2
- //# sourceMappingURL=7507.f8686358.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunks/7507.f8686358.js","mappings":"uPASO,SAASA,EAASC,EAAGC,EAAGC,GAC3B,MAAO,CACHF,EAAqB,KAAlB,QAAQA,EAAG,KACdC,EAAqB,KAAlB,QAAQA,EAAG,KACdC,EAAqB,KAAlB,QAAQA,EAAG,KAEtB,CAMO,SAASC,EAASH,EAAGC,EAAGC,GAC3BF,GAAI,QAAQA,EAAG,KACfC,GAAI,QAAQA,EAAG,KACfC,GAAI,QAAQA,EAAG,KACf,IAAIE,EAAMC,KAAKD,IAAIJ,EAAGC,EAAGC,GACrBI,EAAMD,KAAKC,IAAIN,EAAGC,EA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DCZe,SAASkB,EAAcxP,GACpC,IAAIK,ECFS,SAAqBL,EAAGd,GACrC,GAAI,WAAY,OAAQc,KAAOA,EAAG,OAAOA,EACzC,IAAIiO,EAAIjO,EAAEyP,OAAOC,aACjB,QAAI,IAAWzB,EAAG,CAChB,IAAI5N,EAAI4N,EAAEtB,KAAK3M,EAAGd,UAClB,GAAI,WAAY,OAAQmB,GAAI,OAAOA,EACnC,MAAM,IAAI+N,UAAU,+CACtB,CACA,OAAyB9B,OAAiBtM,EAC5C,CDPU0P,CAAY1P,GACpB,MAAO,WAAY,OAAQK,GAAKA,EAAIA,EAAI,EAC1C,C,iBELe,SAASsP,EAAQC,GAG9B,OAAOD,EAAU,mBAAqBF,QAAU,iBAAmBA,OAAOI,SAAW,SAAUD,GAC7F,cAAcA,CAChB,EAAI,SAAUA,GACZ,OAAOA,GAAK,mBAAqBH,QAAUG,EAAEE,cAAgBL,QAAUG,IAAMH,OAAOhD,UAAY,gBAAkBmD,CACpH,EAAGD,EAAQC,EACb,C","sources":["webpack:///../../node_modules/@ctrl/tinycolor/dist/module/conversion.js","webpack:///../../node_modules/@ctrl/tinycolor/dist/module/css-color-names.js","webpack:///../../node_modules/@ctrl/tinycolor/dist/module/format-input.js","webpack:///../../node_modules/@ctrl/tinycolor/dist/module/util.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/assertClassBrand.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/typeof.js"],"sourcesContent":["import { bound01, pad2 } from './util.js';\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>\n/**\n * Handle bounds / percentage checking to conform to CSS color spec\n * <http://www.w3.org/TR/css3-color/>\n * *Assumes:* r, g, b in [0, 255] or [0, 1]\n * *Returns:* { r, g, b } in [0, 255]\n */\nexport function rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255,\n };\n}\n/**\n * Converts an RGB color value to HSL.\n * *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n * *Returns:* { h, s, l } in [0,1]\n */\nexport function rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var s = 0;\n var l = (max + min) / 2;\n if (max === min) {\n s = 0;\n h = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, l: l };\n}\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * (6 * t);\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\n/**\n * Converts an HSL color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hslToRgb(h, s, l) {\n var r;\n var g;\n var b;\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n if (s === 0) {\n // achromatic\n g = l;\n b = l;\n r = l;\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color value to HSV\n *\n * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n * *Returns:* { h, s, v } in [0,1]\n */\nexport function rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var v = max;\n var d = max - min;\n var s = max === 0 ? 0 : d / max;\n if (max === min) {\n h = 0; // achromatic\n }\n else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n}\n/**\n * Converts an HSV color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n var i = Math.floor(h);\n var f = h - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n var mod = i % 6;\n var r = [v, q, p, p, t, v][mod];\n var g = [t, v, v, q, p, p][mod];\n var b = [p, p, t, v, v, q][mod];\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color to hex\n *\n * Assumes r, g, and b are contained in the set [0, 255]\n * Returns a 3 or 6 character hex\n */\nexport function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color plus alpha transparency to hex\n *\n * Assumes r, g, b are contained in the set [0, 255] and\n * a in [0, 1]. Returns a 4 or 8 character rgba hex\n */\n// eslint-disable-next-line max-params\nexport function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n pad2(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color to an ARGB Hex8 string\n * Rarely used, but required for \"toFilter()\"\n */\nexport function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}\n/** Converts a decimal to a hex value */\nexport function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n/** Converts a hex value to a decimal */\nexport function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}\n/** Parse a base-16 hex value into a base-10 integer */\nexport function parseIntFromHex(val) {\n return parseInt(val, 16);\n}\nexport function numberInputToObject(color) {\n return {\n r: color >> 16,\n g: (color & 0xff00) >> 8,\n b: color & 0xff,\n };\n}\n","// https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json\n/**\n * @hidden\n */\nexport var names = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n goldenrod: '#daa520',\n gold: '#ffd700',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavenderblush: '#fff0f5',\n lavender: '#e6e6fa',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32',\n};\n","/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\nimport { convertHexToDecimal, hslToRgb, hsvToRgb, parseIntFromHex, rgbToRgb, } from './conversion.js';\nimport { names } from './css-color-names.js';\nimport { boundAlpha, convertToPercentage } from './util.js';\n/**\n * Given a string or object, convert that input to RGB\n *\n * Possible string inputs:\n * ```\n * \"red\"\n * \"#f00\" or \"f00\"\n * \"#ff0000\" or \"ff0000\"\n * \"#ff000000\" or \"ff000000\"\n * \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n * \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n * \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n * \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n * \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n * \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n * \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n * ```\n */\nexport function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = 'hsv';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = boundAlpha(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a,\n };\n}\n// <http://www.w3.org/TR/css3-values/#integers>\nvar CSS_INTEGER = '[-\\\\+]?\\\\d+%?';\n// <http://www.w3.org/TR/css3-values/#number-value>\nvar CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?';\n// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\nvar CSS_UNIT = \"(?:\".concat(CSS_NUMBER, \")|(?:\").concat(CSS_INTEGER, \")\");\n// Actual matching.\n// Parentheses and commas are optional, but not required.\n// Whitespace can take the place of commas or opening paren\nvar PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar matchers = {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n};\n/**\n * Permissive string parsing. Take in a number of formats, and output an object\n * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\n */\nexport function stringInputToObject(color) {\n color = color.trim().toLowerCase();\n if (color.length === 0) {\n return false;\n }\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n }\n else if (color === 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: 'name' };\n }\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match = matchers.rgb.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n match = matchers.rgba.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n match = matchers.hsl.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n match = matchers.hsla.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n match = matchers.hsv.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n match = matchers.hsva.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n match = matchers.hex8.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex6.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n match = matchers.hex4.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n a: convertHexToDecimal(match[4] + match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex3.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n return false;\n}\n/**\n * Check to see if it looks like a CSS unit\n * (see `matchers` above for definition).\n */\nexport function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}\n","/**\n * Take input from [0, n] and return it as [0, 1]\n * @hidden\n */\nexport function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}\n/**\n * Force a number between 0 and 1\n * @hidden\n */\nexport function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}\n/**\n * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n * <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>\n * @hidden\n */\nexport function isOnePointZero(n) {\n return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;\n}\n/**\n * Check to see if string passed in is a percentage\n * @hidden\n */\nexport function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}\n/**\n * Return a valid alpha value [0,1] with all invalid values being set to 1\n * @hidden\n */\nexport function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}\n/**\n * Replace a decimal with it's percentage value\n * @hidden\n */\nexport function convertToPercentage(n) {\n if (n <= 1) {\n return \"\".concat(Number(n) * 100, \"%\");\n }\n return n;\n}\n/**\n * Force a hex value to have 2 characters\n * @hidden\n */\nexport function pad2(c) {\n return c.length === 1 ? '0' + c : String(c);\n}\n","export default function _assertClassBrand(e, t, n) {\n if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n throw new TypeError(\"Private element is not present on this object\");\n}","export default function _checkPrivateRedeclaration(obj, privateCollection) {\n if (privateCollection.has(obj)) {\n throw new TypeError(\"Cannot initialize the same private elements twice on an object\");\n }\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldGet2(s, a) {\n return s.get(assertClassBrand(s, a));\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateFieldInitSpec(obj, privateMap, value) {\n checkPrivateRedeclaration(obj, privateMap);\n privateMap.set(obj, value);\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldSet2(s, a, r) {\n return s.set(assertClassBrand(s, a), r), r;\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateMethodInitSpec(obj, privateSet) {\n checkPrivateRedeclaration(obj, privateSet);\n privateSet.add(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}"],"names":["rgbToRgb","r","g","b","rgbToHsl","max","Math","min","h","s","l","d","hue2rgb","p","q","t","hslToRgb","rgbToHsv","v","hsvToRgb","i","floor","f","mod","rgbToHex","allow3Char","hex","round","toString","startsWith","charAt","join","rgbaToHex","a","allow4Char","parseFloat","convertHexToDecimal","parseIntFromHex","val","parseInt","numberInputToObject","color","names","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","goldenrod","gold","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavenderblush","lavender","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","inputToRGB","rgb","ok","format","trim","toLowerCase","length","named","match","matchers","exec","rgba","hsl","hsla","hsv","hsva","hex8","hex6","hex4","hex3","stringInputToObject","isValidCSSUnit","String","substr","Object","prototype","hasOwnProperty","call","CSS_UNIT","concat","PERMISSIVE_MATCH3","PERMISSIVE_MATCH4","RegExp","Boolean","bound01","n","indexOf","isOnePointZero","isPercent","isPercentage","abs","clamp01","boundAlpha","isNaN","convertToPercentage","Number","pad2","c","_assertClassBrand","e","has","arguments","TypeError","_checkPrivateRedeclaration","obj","privateCollection","_classPrivateFieldGet2","get","_classPrivateFieldInitSpec","privateMap","value","set","_classPrivateFieldSet2","_classPrivateMethodInitSpec","privateSet","add","_defineProperty","key","defineProperty","enumerable","configurable","writable","toPropertyKey","Symbol","toPrimitive","_typeof","o","iterator","constructor"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[8552],{6787:(e,t,n)=>{n.d(t,{m:()=>D});var o=n(8769),r=n.n(o),i=n(3373),l=n.n(i),a=n(531),c=n(1030),s=n(9126),d=n(3033),u=n(8653),v=n(7531),f=n(2716),h=n(3848);function m(e){let{edge:t,position:n,offset:o,label:i,text:a,onRendered:c,onClick:s}=e;if(!i&&!a)return null;const d=!(!n||!o);return r().createElement("foreignObject",{className:l()("line-label-container",{ready:d}),x:d?n[0]+o[0]:0,y:d?n[1]+o[1]:0,onClick:s},i?r().createElement("div",{className:"line-label label"},r().createElement(p,{edge:t,label:i,onRendered:c})):r().createElement(g,{text:a,onRendered:c}))}function g(e){let{text:t,onRendered:n}=e;const i=(0,o.useCallback)((e=>{null==n||n(e)}),[n]);return r().createElement("div",{className:"line-label text",ref:i,style:t.style},t.content)}function p(e){let{edge:t,label:n,onRendered:i}=e;const l=(0,o.useMemo)((()=>(0,f.checkIfOfComputed)(n)?n.useBrick:null),[n]),a=(0,o.useMemo)((()=>({edge:t})),[t]);(0,o.useEffect)((()=>{l||setTimeout((()=>{null==i||i(null)}))}),[i,l]),(0,o.useEffect)((()=>()=>{null==i||i(null)}),[]);const c=(0,o.useCallback)((e=>{e&&setTimeout((()=>{null==i||i(e.parentElement)}))}),[i]),s=(0,o.useCallback)((()=>{setTimeout((()=>{null==i||i(null)}))}),[i]);return l?r().createElement(h.ReactUseBrick,{refCallback:c,ignoredCallback:s,useBrick:l,data:a}):null}var y=n(9386);function w(e){var t,n,i,a,f,h,g;let{edge:p,lineConfMap:w,editableLineMap:x,readOnly:E,active:k,activeRelated:b,onSwitchActiveTarget:C}=e;const M=(0,o.useRef)(null),I=w.get(p),{points:S}=null!==(t=x.get(p))&&void 0!==t?t:{},L=(0,o.useMemo)((()=>(0,u.S)(S,"curve"===I.type?I.curveType:"curveLinear",0,1)),[I,S]),z=(0,o.useMemo)((()=>(0,c.uniqueId)("line-mask-")),[]),[P,R]=(0,o.useState)(null),[N,A]=(0,o.useState)(null),[T,H]=(0,o.useState)(null),D=(0,o.useCallback)((()=>{const e=M.current,{label:t,text:n}=I;if(e&&S&&(t||n)){var o,r;const i=null!==(o=t?t.placement:n.placement)&&void 0!==o?o:"center",l=e.getTotalLength(),a=l/2,c=e.getPointAtLength("start"===i?Math.min(0,a):"end"===i?Math.max(l-0,a):a);let s="center",d=0;if("start"===i||"end"===i){let e,t;"start"===i?(e=S[0],t=S[1]):(e=S[S.length-1],t=S[S.length-2]),d=Math.atan2(t.y-e.y,t.x-e.x),s=Math.abs(e.x-t.x)>Math.abs(e.y-t.y)?e.x>t.x?"left":"right":e.y>t.y?"top":"bottom"}const u=null!==(r=t?t.offset:n.offset)&&void 0!==r?r:0;R([c.x,c.y,s,d,u]);const v=e.getBBox();H({x:v.x-1e3,y:v.y-1e3,width:v.width+2e3,height:v.height+2e3})}}),[I,S]),[W,Z]=(0,o.useState)(null),$=(0,o.useCallback)((e=>{var t,n;M.current=e,e&&Z(null!==(t=null===(n=e.getTotalLength)||void 0===n?void 0:n.call(e))&&void 0!==t?t:100),D()}),[D]),[B,j]=(0,o.useState)(null);(0,o.useEffect)((()=>{if(!B)return void A(null);const e=new s.A((()=>{const{offsetWidth:e,offsetHeight:t}=B;A(0!==e&&0!==t?[e,t]:null)}));return e.observe(B),()=>{e.disconnect()}}),[B]);const O=(0,o.useCallback)((e=>{j(e)}),[]);(0,o.useEffect)((()=>{D()}),[D,S]);const U=(0,o.useCallback)((()=>{null==C||C((0,y.P)(p))}),[p,C]),V=(0,o.useCallback)((e=>{var t,n;!E&&I.callLabelOnDoubleClick&&(e.preventDefault(),e.stopPropagation(),null==B||null===(t=B.firstElementChild)||void 0===t||null===(n=t[I.callLabelOnDoubleClick])||void 0===n||n.call(t))}),[B,I,E]),[G,X]=(0,o.useMemo)((()=>function(e,t){if(!e||!t)return[null,null];const[n,o,r,i,l]=e,[a,c]=t,s=n-a/2-3,d=o-c/2-3;let u=0,v=0;const f=a/2+3,h=c/2+3;switch(r){case"top":u=l*Math.cos(i)-h/Math.tan(i),v=l*Math.sin(i)-h;break;case"bottom":u=l*Math.cos(i)+h/Math.tan(i),v=l*Math.sin(i)+h;break;case"left":u=l*Math.cos(i)-f,v=l*Math.sin(i)-f*Math.tan(i);break;case"right":u=l*Math.cos(i)+f,v=l*Math.sin(i)+f*Math.tan(i)}return[{left:s+u,top:d+v,width:a+6,height:c+6},[u,v]]}(P,N)),[P,N]);if(!L||!S)return null;let Y,F,Q,J,K;const _=(0,v.I)(I);if(k){var q,ee,te;const e=null===(q=I.overrides)||void 0===q?void 0:q.active;Q=null!==(ee=null==e?void 0:e.strokeColor)&&void 0!==ee?ee:I.strokeColor,J=null!==(te=null==e?void 0:e.strokeWidth)&&void 0!==te?te:I.strokeWidth,K=null==e?void 0:e.motion;for(const e of _){var ne,oe;"start"===e.placement?Y=null!==(ne=I.$activeMarkerStartUrl)&&void 0!==ne?ne:I.$markerStartUrl:F=null!==(oe=I.$activeMarkerEndUrl)&&void 0!==oe?oe:I.$markerEndUrl}}else if(b){var re,ie,le;const e=null===(re=I.overrides)||void 0===re?void 0:re.activeRelated;Q=null!==(ie=null==e?void 0:e.strokeColor)&&void 0!==ie?ie:I.strokeColor,J=null!==(le=null==e?void 0:e.strokeWidth)&&void 0!==le?le:I.strokeWidth,K=null==e?void 0:e.motion;for(const e of _){var ae,ce;"start"===e.placement?Y=null!==(ae=I.$activeRelatedMarkerStartUrl)&&void 0!==ae?ae:I.$markerStartUrl:F=null!==(ce=I.$activeRelatedMarkerEndUrl)&&void 0!==ce?ce:I.$markerEndUrl}}else{Q=I.strokeColor,J=I.strokeWidth;for(const e of _)"start"===e.placement?Y=I.$markerStartUrl:F=I.$markerEndUrl}let se,de;if("dot"===(null===(n=K)||void 0===n?void 0:n.shape)){const e=null==K.size?2*J:K.size/2;se=`M 0,${-e} A ${e},${e} 0,1,1 0,${e} A ${e},${e} 0,1,1 0,${-e} z`}else if("triangle"===(null===(i=K)||void 0===i?void 0:i.shape)){const e=null==K.size?2*J:K.size/2,t=e/Math.sqrt(3);se=`M ${-t},${e} v ${2*-e} L ${2*t},0 z`}var ue,ve;W&&(de=W/(null!==(ue=null===(ve=K)||void 0===ve?void 0:ve.speed)&&void 0!==ue?ue:d.Jo)+"s");const fe=[null===(a=I.overrides)||void 0===a||null===(a=a.active)||void 0===a||null===(a=a.motion)||void 0===a?void 0:a.shape,null===(f=I.overrides)||void 0===f||null===(f=f.activeRelated)||void 0===f||null===(f=f.motion)||void 0===f?void 0:f.shape].some((e=>"dot"===e||"triangle"===e)),he=G?`url(#${z})`:void 0;return r().createElement(r().Fragment,null,G&&T&&r().createElement("defs",null,r().createElement("mask",{id:z,maskUnits:"userSpaceOnUse",x:T.x,y:T.y,width:T.width,height:T.height},r().createElement("rect",{x:T.x,y:T.y,width:T.width,height:T.height,fill:"white"}),r().createElement("rect",{x:G.left,y:G.top,width:G.width,height:G.height,fill:"black"}))),r().createElement("g",{className:"line-group",onDoubleClick:V},r().createElement("path",{d:L,fill:"none",stroke:"transparent",strokeWidth:I.interactStrokeWidth,mask:he}),r().createElement("path",{ref:$,className:l()("line",{dashed:I.dashed,dotted:I.dotted,[(I.dashed?"dashed":I.dotted?"dotted":"solid")+"-animation"]:I.animate.useAnimate}),mask:he,style:{"--time":`${null!==(h=I.animate.duration)&&void 0!==h?h:d.Be}s`,"--solid-length":W},d:L,fill:"none",stroke:Q,strokeWidth:J,markerStart:Y,markerEnd:F}),!(null!==(g=I.overrides)&&void 0!==g&&g.active)&&r().createElement("path",{className:"line-active-bg",d:L,fill:"none",mask:he}),fe&&de&&r().createElement("path",{className:l()("motion",{visible:!!se}),d:se,fill:Q},r().createElement("animateMotion",{dur:de,repeatCount:"indefinite",rotate:"auto",path:L}))),r().createElement(m,{edge:p,position:P,offset:X,label:I.label,text:I.text,onClick:U,onRendered:O}))}function x(e){let{node:t,degraded:n,degradedNodeLabel:i,defaultNodeBricks:l,onResize:a}=e;const d=function(e){const[t,n]=(0,o.useState)(e);return(0,o.useEffect)((()=>{n((t=>(0,c.isEqual)(t,e)?t:e))}),[e]),t}({node:{id:t.id,data:t.data}}),u=t.useBrick,v=(0,o.useRef)(null),m=(0,o.useMemo)((()=>{var e;return n?null:null!=u?u:null==l||null===(e=l.find((e=>(0,f.checkIfByTransform)(e,d))))||void 0===e?void 0:e.useBrick}),[n,u,l,d]),g=(0,o.useMemo)((()=>n?String(f.__secret_internals.legacyDoTransform(d,null!=i?i:"<% DATA.node.id %>")):""),[n,i,d]),p=(0,o.useCallback)((e=>{const n=v.current;n&&(n.disconnect(),v.current=null),e?setTimeout((()=>{const n=new s.A((()=>{a(t.id,[e.offsetWidth,e.offsetHeight])}));n.observe(e),v.current=n})):a(t.id,null)}),[t.id,a]),y=(0,o.useCallback)((e=>{if(e){const n=e.getBBox();a(t.id,[n.width,n.height])}else a(t.id,null)}),[t.id,a]);return m?r().createElement("foreignObject",{width:9999,height:9999,className:"node"},m&&r().createElement(h.ReactUseBrick,{useBrick:m,data:d,refCallback:p})):n?r().createElement("g",{className:"degraded",ref:y},r().createElement("circle",{cx:8,cy:8,r:8}),r().createElement("text",{x:8,y:32},g)):null}const E=["center","top","bottom","left","right"];function k(e,t){const n={};for(const i of null!==(o=null==t||null===(r=t.split(/\s+/g))||void 0===r?void 0:r.flatMap((e=>"all"===e?E:e)))&&void 0!==o?o:[]){var o,r;let t;const l=e.x+e.width/2,a=e.y+e.height/2;switch(i){case"center":t=[l,a];break;case"top":t=[l,e.y];break;case"right":t=[e.x+e.width,a];break;case"bottom":t=[l,e.y+e.height];break;case"left":t=[e.x,a];break;default:throw new Error(`Unknown snap position: "${i}"`)}n[i]=t}return n}var b=n(4197);const C=["left","center","right"],M=["top","center","bottom"];function I(e,t){var n;let{action:o,cell:r,scale:i,layout:l,layoutOptions:c,activeTarget:s,cells:u,onCellsMoving:v,onCellsMoved:f,onCellResizing:h,onCellResized:m,onSwitchActiveTarget:g}=t;if(e.stopPropagation(),"resize"!==o&&(0,b.Q)(r,s)||null==g||g((0,y.P)(r)),(0,a.WW)(r))return;const p=[],w="multi"===(null==s?void 0:s.type)&&"move"===o?u.filter((e=>(0,b.Q)(e,s))):[r];w.forEach((e=>{p.push(e),"move"===o&&(0,a.t2)(e)&&p.push(...u.filter((t=>(0,a.N)(t)&&t.containerId===e.id&&!w.includes(t))))}));const x="force"===l||"dagre"===l,E=p.filter((e=>(0,a.N)(e)&&!x||(0,a.mH)(e)));if(0===E.length)return;const I=function(e){var t,n,o;const r=e?!0===e?{grid:!0,object:!0}:e:null,i=null!=r&&r.grid?!0===r.grid?{}:r.grid:null,l=null!=r&&r.object?!0===r.object?{}:r.object:null;return{grid:i?{size:null!==(t=i.size)&&void 0!==t?t:d.gx}:null,object:l?{distance:null!==(n=l.distance)&&void 0!==n?n:d.ld,positions:null!==(o=l.positions)&&void 0!==o?o:d.o5}:null}}(null==c?void 0:c.snap),S=null===(n=I.object)||void 0===n?void 0:n.positions,L=[e.clientX,e.clientY],z=E.map((e=>({cell:e,position:"move"===o?[e.view.x,e.view.y]:[e.view.width,e.view.height],snapPositions:"move"!==o||(0,a.WW)(e)?null:k(e.view,S)}))),P=z[0].position;let R=z.map((e=>{let{position:t}=e;return t})),N=[];if("move"===o&&I.object){const e=u.filter((e=>!(0,a.WW)(e)&&!p.includes(e)));N=e.map((e=>({cell:e,snapPositions:k(e.view,S)})))}let A=!1;const T=(e,t)=>{const n=function(e){return[(e.clientX-L[0])/i,(e.clientY-L[1])/i]}(e);let l,c,s,d,u;if(!I.grid&&!I.object||e.altKey)l=z.map((e=>{let{position:t}=e;return[t[0]+n[0],t[1]+n[1]]})),A||(A=n[0]**2+n[1]**2>=9);else{let e=1/0,t=1/0;const o=[...n];if(I.object){const r=I.object.distance;let i,l,a,v,f=0,h=0;for(const{cell:c,snapPositions:s}of N)for(const{cell:m,snapPositions:g}of z)for(const[p,y]of Object.entries(g)){const g=C.includes(p),w=M.includes(p),[x,E]=s[p],[k,b]=y;if(g){const t=Math.abs(k+n[0]-x);t<r&&t<e&&(e=t,o[0]=x-k,d=m,a=c,i=[x,E],f=b)}if(w){const e=Math.abs(b+n[1]-E);e<r&&e<t&&(t=e,o[1]=E-b,u=m,v=c,l=[x,E],h=k)}}if(a&&a===v){const e=a.view.height/2,t=a.view.width/2;c=[[i[0],i[1]-e],[i[0],i[1]+e]],s=[[l[0]-t,l[1]],[l[0]+t,l[1]]]}else i&&(c=[i,[i[0],f+o[1]]]),l&&(s=[l,[h+o[0],l[1]]])}if(I.grid){const r=I.grid.size,i=[Math.round((P[0]+n[0])/r)*r,Math.round((P[1]+n[1])/r)*r],l=[i[0]-P[0],i[1]-P[1]],a=Math.abs(l[0]-n[0]),v=Math.abs(l[1]-n[1]);a<e&&(e=a,o[0]=l[0],c=void 0,d=void 0),v<t&&(t=v,o[1]=l[1],s=void 0,u=void 0)}l=z.map((e=>{let{position:t}=e;return[Math.round(t[0]+o[0]),Math.round(t[1]+o[1])]})),(l[0][0]!==R[0][0]||l[0][1]!==R[0][1])&&(R=l,A=!0)}if(A)if("move"===o){var g;const e=z.map(((e,n)=>{let{cell:o}=e;return{type:o.type,id:o.id,x:l[n][0],y:l[n][1],width:o.view.width,height:o.view.height,decorator:(0,a.mH)(o)?o.decorator:void 0,guideLines:t?void 0:[...d===o?[c]:[],...u===o?[s]:[]]}}));null===(g=t?f:v)||void 0===g||g(e)}else{var p;null===(p=t?m:h)||void 0===p||p({type:r.type,id:r.id,width:l[0][0],height:l[0][1]})}},H=e=>{T(e)},D=e=>{T(e,!0),A=!1,document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",D)};document.addEventListener("mousemove",H),document.addEventListener("mouseup",D)}function S(e){let{cell:t,transform:n,readOnly:i,layoutOptions:l,activeTarget:a,cells:c,onCellResizing:s,onCellResized:d,onSwitchActiveTarget:u}=e;const v=r().useRef(null);return(0,o.useEffect)((()=>{const e=v.current;if(!e||i)return;const o=e=>{I(e,{action:"resize",cell:t,scale:n.k,layoutOptions:l,activeTarget:a,cells:c,onCellResizing:s,onCellResized:d,onSwitchActiveTarget:u})};return e.addEventListener("mousedown",o),()=>{e.removeEventListener("mousedown",o)}}),[a,t,c,l,d,s,u,i,n.k]),r().createElement("g",{className:"decorator-area"},r().createElement("rect",{width:t.view.width,height:t.view.height,className:"area"}),!i&&r().createElement("g",{ref:v,className:"resize-handle",transform:`translate(${t.view.width-20} ${t.view.height-20})`},r().createElement("rect",{width:20,height:20}),r().createElement("path",{d:"M10 18L18 10 M15 18L18 15"})))}function L(e){var t;let{cell:n,readOnly:i,onDecoratorTextEditing:a,onDecoratorTextChange:c}=e;const s=null!==(t=n.view.text)&&void 0!==t?t:"",[d,u]=(0,o.useState)(s),[v,f]=(0,o.useState)(!1),h=(0,o.useRef)(!1),[m,g]=(0,o.useState)(!1),p=(0,o.useRef)(null),y=(0,o.useCallback)((e=>{i||(e.preventDefault(),e.stopPropagation(),f(!0))}),[i]);(0,o.useEffect)((()=>{const e=p.current;e&&e.textContent!==d&&(e.textContent=d)}),[d]),(0,o.useEffect)((()=>{var e;const t=null===(e=p.current)||void 0===e?void 0:e.parentElement;t&&(n.view.width=t.clientWidth,n.view.height=t.clientHeight)}),[d,n.id]),(0,o.useEffect)((()=>{v&&p.current&&(p.current.focus(),z(p.current)),null==a||a({id:n.id,editing:v})}),[n.id,v,a]),(0,o.useEffect)((()=>{h.current?null==a||a({id:n.id,editing:v}):h.current=!0}),[n.id,v,a]);const w=(0,o.useCallback)((e=>{i||u(e.target.textContent)}),[i]),x=(0,o.useCallback)((()=>{i||(f(!1),g(!0))}),[i]);return(0,o.useEffect)((()=>{m&&(null==c||c({id:n.id,view:{...n.view,text:d}}),g(!1))}),[n,d,c,m]),r().createElement("foreignObject",{className:"decorator-text"},r().createElement("div",{className:l()("text-container",{editing:v}),onDoubleClick:y},r().createElement("div",{className:"text",contentEditable:v,ref:p,onInput:w,onBlur:x})))}function z(e){const t=document.createRange();t.selectNodeContents(e);const n=window.getSelection();n.removeAllRanges(),n.addRange(t)}var P=n(9068);function R(e){let{cell:t,transform:n,readOnly:i,layout:s,view:d,activeTarget:u,cells:v,onCellResizing:f,onCellResized:h,onSwitchActiveTarget:m,onDecoratorTextEditing:g,onDecoratorTextChange:p}=e;const y=(0,c.get)(t.view,"text",""),w=(0,c.get)(t.view,"direction","top"),x=(0,o.useRef)(null),E=r().useRef(null),[k,b]=(0,o.useState)(!1),[C,M]=(0,o.useState)(y),[S,L]=(0,o.useState)(!1),[R,N]=(0,o.useState)(),[A,T]=(0,o.useState)({x:0,y:0,width:t.view.width,height:t.view.height}),H=(0,o.useCallback)((e=>{i||(e.preventDefault(),e.stopPropagation(),b(!0))}),[i]),D=(0,o.useCallback)((e=>{i||M(e.target.textContent)}),[i]),W=(0,o.useCallback)((()=>{i||(b(!1),L(!0),N((0,P.uuidV4)()))}),[i]);return(0,o.useEffect)((()=>{M(y)}),[y]),(0,o.useEffect)((()=>{const e=x.current;e&&e.textContent!==C&&(e.textContent=C)}),[C]),(0,o.useEffect)((()=>{var e;const t=null===(e=x.current)||void 0===e?void 0:e.parentElement;if(t){const{clientWidth:e,clientHeight:n}=t;if(["left","right"].includes(w)){const t={width:e,height:d.height,x:"left"===w?-e:d.width,y:0};T(t)}else{const e={width:d.width,height:n,x:0,y:"top"===w?-n:d.height};T(e)}}}),[d,C,w,R]),(0,o.useEffect)((()=>{k&&x.current&&(x.current.focus(),z(x.current)),null==g||g({id:t.id,editing:k})}),[t.id,k,g]),(0,o.useEffect)((()=>{S&&(null==p||p({id:t.id,view:{...d,text:C}}),L(!1))}),[t,d,C,p,S]),(0,o.useEffect)((()=>{const e=E.current;if(!e||i)return;const o=e=>{I(e,{action:"resize",cell:t,scale:n.k,activeTarget:u,cells:v,onCellResizing:f,onCellResized:h,onSwitchActiveTarget:m})};return e.addEventListener("mousedown",o),()=>{e.removeEventListener("mousedown",o)}}),[u,t,v,h,f,m,i,n.k]),r().createElement("g",{className:"decorator-container"},r().createElement("foreignObject",A,r().createElement("div",{className:l()("text-container",{editing:k,[["left","right"].includes(w)?"vertical":"horizontal"]:!0}),onDoubleClick:H},r().createElement("div",{className:"text",contentEditable:k,ref:x,onInput:D,onBlur:W}))),r().createElement("rect",{width:d.width,height:d.height,className:"container"}),!i&&!(0,a.OD)(s)&&r().createElement("g",{ref:E,className:"resize-handle",transform:`translate(${d.width-20} ${d.height-20})`},r().createElement("rect",{width:20,height:20}),r().createElement("path",{d:"M10 18L18 10 M15 18L18 15"})))}function N(e){let t,{cell:n,view:o,transform:i,readOnly:l,layout:a,layoutOptions:c,activeTarget:s,cells:d,onCellResizing:u,onCellResized:v,onSwitchActiveTarget:f,onDecoratorTextEditing:h,onDecoratorTextChange:m}=e;switch(n.decorator){case"container":t=R;break;case"area":t=S;break;case"text":t=L;break;default:return console.error(`Unknown decorator: ${n.decorator}`),null}return r().createElement(t,{cell:n,view:o,transform:i,readOnly:l,layout:a,layoutOptions:c,activeTarget:s,cells:d,onCellResizing:u,onCellResized:v,onSwitchActiveTarget:f,onDecoratorTextEditing:h,onDecoratorTextChange:m})}var A=n(8185);function T(e){let t=1/0,n=1/0,o=-1/0,r=-1/0;return e.forEach((e=>{const{x:i,y:l,width:a,height:c}=e.view;i<t&&(t=i),l<n&&(n=l),i+a>o&&(o=i+a),l+c>r&&(r=l+c)})),[t,o,n,r].some((e=>isFinite(e)))?{x:t-20,y:n-20,width:o-t+40,height:r-n+40}:{}}var H=n(9978);function D(e){let{layout:t,layoutOptions:n,cell:i,cells:s,degraded:d,degradedNodeLabel:u,defaultNodeBricks:v,lineConfMap:f,editableLineMap:h,activeTarget:m,dragNodeToContainerActive:g,readOnly:p,transform:E,hoverCell:k,unrelatedCells:C,allowEdgeToArea:M,onCellsMoving:S,onCellsMoved:L,onCellResizing:z,onCellResized:P,onSwitchActiveTarget:R,onCellContextMenu:D,onCellClick:W,onDecoratorTextEditing:Z,onDecoratorTextChange:$,onNodeBrickResize:B,onCellMouseEnter:j,onCellMouseLeave:O}=e;const{activeEditableEdge:U,lineEditorState:V,smartConnectLineState:G,setSmartConnectLineState:X,onConnect:Y,setLineEditorState:F,onChangeEdgeView:Q}=(0,H.s)(),J=(0,o.useRef)(null),K=(0,o.useMemo)((()=>C.some((e=>(0,A.c)(e,i)))),[i,C]),_=(0,o.useMemo)((()=>{if((0,a.t2)(i)&&(0,a.OD)(t)){const e=s.filter((e=>(0,a.N)(e)&&e.containerId===i.id)),t={...i.view,...T(e)};return i.view=t,t}return(0,a.WW)(i)?void 0:(0,c.get)(i,"view",{x:0,y:0,width:0,height:0})}),[t,i,s]);(0,o.useEffect)((()=>{const e=J.current;if(!e)return;const o=e=>{p||(0,a.t2)(i)&&(0,a.OD)(t)?e.stopPropagation():I(e,{layout:t,layoutOptions:n,action:"move",cell:i,scale:E.k,activeTarget:m,cells:s,onCellsMoving:S,onCellsMoved:L,onSwitchActiveTarget:R})};return e.addEventListener("mousedown",o),()=>{e.removeEventListener("mousedown",o)}}),[t,n,i,m,s,L,S,R,p,E.k]),(0,o.useEffect)((()=>{const e=J.current;if(!e||!(0,a.bo)(i,M)||!(G||V&&"control"!==V.type))return;const t=e=>{if(e.preventDefault(),e.stopPropagation(),G)G.source!==i&&(null==Y||Y(G.source,i,G.exitPosition,void 0)),X(null);else if(U&&V){const{type:e}=V,{source:t,target:n}=h.get(U),{view:o}=U,r="entry"===e;(r?n:t)===i&&(r?null==Q||Q(t,n,{...o,entryPosition:null}):null==Q||Q(t,n,{...o,exitPosition:null})),F(null)}};return e.addEventListener("mouseup",t),()=>{e.removeEventListener("mouseup",t)}}),[U,h,M,i,V,Q,Y,F,X,G]);const q=(0,o.useCallback)((e=>{p&&"decorator"===i.type||(e.preventDefault(),R((0,y.P)(i)),D({cell:i,clientX:e.clientX,clientY:e.clientY}))}),[i,D,R,p]),ee=(0,o.useCallback)((e=>{W&&"decorator"!==i.type&&W({cell:i,clientX:e.clientX,clientY:e.clientY})}),[i,W]),te=(0,o.useCallback)((()=>{null==j||j(i)}),[i,j]),ne=(0,o.useCallback)((()=>{null==O||O(i)}),[i,O]),oe=(0,b.Q)(i,m);return r().createElement("g",{className:l()("cell",{active:oe,faded:K,"read-only":p,"container-active":g}),ref:J,transform:"edge"===i.type||null==i.view.x?void 0:`translate(${_.x} ${_.y})`,onContextMenu:q,onClick:ee,onMouseEnter:te,onMouseLeave:ne},(0,a.N)(i)?r().createElement(x,{node:i,degraded:d,degradedNodeLabel:u,defaultNodeBricks:v,onResize:B}):(0,a.WW)(i)?r().createElement(w,{edge:i,active:p?k===i:(0,A.c)(m,i),activeRelated:!!(p?k:m)&&!K,lineConfMap:f,editableLineMap:h,readOnly:p,onSwitchActiveTarget:R}):(0,a.mH)(i)?r().createElement(N,{cell:i,view:_,transform:E,readOnly:p,layout:t,layoutOptions:n,activeTarget:m,cells:s,onCellResizing:z,onCellResized:P,onSwitchActiveTarget:R,onDecoratorTextEditing:Z,onDecoratorTextChange:$}):null)}},3639:(e,t,n)=>{n.d(t,{w:()=>a});var o=n(8769),r=n.n(o),i=n(3373),l=n.n(i);function a(e){let{connectLineState:t,transform:n,markerEnd:i,onConnect:a}=e;const[c,s]=(0,o.useState)(null);return(0,o.useEffect)((()=>{t&&s(t.from)}),[t]),(0,o.useEffect)((()=>{if(t){const e=e=>[(e.clientX-n.x-t.offset[0])/n.k,(e.clientY-n.y-t.offset[1])/n.k],o=t=>{s(e(t))},r=e=>{e.stopPropagation()},i=n=>{n.stopPropagation(),l(),a(t,e(n))},l=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mousedown",r,{capture:!0}),document.removeEventListener("click",i,{capture:!0}),s(null)};return document.addEventListener("mousemove",o),document.addEventListener("mousedown",r,{capture:!0}),document.addEventListener("click",i,{capture:!0}),l}}),[t,a,n]),r().createElement("path",{className:l()("connect-line",{connecting:!!t&&c&&(c[0]-t.from[0])**2+(c[1]-t.from[1])**2>25}),d:t&&c?`M${t.from.join(" ")}L${c.join(" ")}`:"",fill:"none",stroke:"gray",strokeWidth:1,markerEnd:`url(#${i})`})}},1825:(e,t,n)=>{n.d(t,{W:()=>f});var o=n(8769),r=n.n(o),i=n(3373),l=n.n(i),a=n(8653),c=n(9978),s=n(1030),d=n(967);function u(e,t,n,o){const{control:r}=t,{points:i}=n.get(e),l=[],[a,c]=o,s=i[0],u=i[i.length-1];0===r.index&&l.push("ns"===r.direction?{x:s.x,y:c}:{x:a,y:s.y});for(let e=1;e<i.length-1;e++){const t=i[e];l.push(e===r.index||e===r.index+1?"ns"===r.direction?{x:t.x,y:c}:{x:a,y:t.y}:t)}return r.index===i.length-2&&l.push("ns"===r.direction?{x:u.x,y:c}:{x:a,y:u.y}),(0,d.P)(s,l,u)}var v=n(7531);function f(e){let{cells:t,editableLineMap:n,transform:i,options:f}=e;const[h,m]=(0,o.useState)(null),{activeEditableEdge:g,hoverState:p,lineEditorState:y,setLineEditorState:w,onChangeEdgeView:x}=(0,c.s)(),E=(0,o.useRef)(!1);(0,o.useEffect)((()=>{y||setTimeout((()=>{E.current=!1}),0)}),[y]),(0,o.useEffect)((()=>{if(!g||!y)return;E.current=!1;const{type:e,offset:o,from:r}=y,l=l=>{const a={x:(l.clientX-i.x-o[0])/i.k,y:(l.clientY-i.y-o[1])/i.k};let c=1/0;if("control"===e&&!l.altKey){const{control:e}=y,o=n.get(g).points,r="ns"===e.direction?"y":"x",i=e[r],l=o.filter(((t,n)=>0===n||n===o.length-1||n!==e.index&&n!==e.index+1)),s=5;for(const e of t){if("edge"!==e.type||e===g)continue;const t=n.get(e);t&&l.push(...t.points.slice(1,-1))}for(const e of l){const t=Math.abs(e[r]-a[r]);t<=s&&t<c&&(a[r]=e[r],c=t,E.current||i===a[r]||(E.current=!0))}}if(c===1/0&&!E.current){const e=(l.clientX-r[0])/i.k,t=(l.clientY-r[1])/i.k;E.current=e**2+t**2>=9}return[a.x,a.y]},a=e=>{const t=l(e);E.current&&m(t)};function c(e){if(e.preventDefault(),s(),"control"===(null==y?void 0:y.type)){const t=l(e);if(E.current){const{source:e,target:o}=n.get(g),{view:r}=g;null==x||x(e,o,{...r,vertices:u(g,y,n,t)})}}}function s(){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",c),m(null),w(null)}return document.addEventListener("mousemove",a),document.addEventListener("mouseup",c),s}),[g,n,y,i,w,x,t]),(0,o.useEffect)((()=>{if(!g)return;const e=e=>{E.current&&(e.stopPropagation(),e.preventDefault())};return document.body.addEventListener("click",e),()=>{document.body.removeEventListener("click",e)}}),[g]);const k=(0,o.useMemo)((()=>{var e;const t=function(e,t,n,o,r){if(!e||!t||!(o||"control"!==t.type&&void 0!==(null==r?void 0:r.activePointIndex)))return null;const{type:i}=t,{source:l,target:a}=n.get(e),{view:c}=e,{exitPosition:v,entryPosition:f,vertices:h}=null!=c?c:{},m=(0,s.pick)(c,["type","curveType"]);if("control"===i){const r=u(e,t,n,o);return(0,d.V)(l.view,a.view,{...m,exitPosition:v,entryPosition:f,vertices:r})}if(void 0!==(null==r?void 0:r.activePointIndex)){const e=r.relativePoints[r.activePointIndex];return(0,d.V)(l.view,a.view,{...m,..."entry"===i?{exitPosition:v,entryPosition:e}:{exitPosition:e,entryPosition:f},vertices:h})}const[g,p]=o;return"entry"===i?(0,d.V)(l.view,{x:g,y:p,width:0,height:0},{...m,exitPosition:v,vertices:h}):(0,d.V)({x:g,y:p,width:0,height:0},a.view,{...m,entryPosition:f,vertices:h})}(g,y,n,h,p);return(0,a.S)(t,"curve"===(null==g||null===(e=g.view)||void 0===e?void 0:e.type)?g.view.curveType:"curveLinear",0,1)}),[h,p,g,y,n]);let b,C;const M=(0,v.I)(f);for(const e of M)"start"===e.placement?b=f.$editingStartMarkerUrl:C=f.$editingEndMarkerUrl;return r().createElement("path",{className:l()("editing-line",{editing:!(!y||!h)}),d:k,fill:"none",stroke:f.editingStrokeColor,markerStart:b,markerEnd:C})}},9978:(e,t,n)=>{n.d(t,{H:()=>i,s:()=>l});var o=n(8769),r=n.n(o);const i=r().createContext({rootRef:{current:null},smartConnectLineState:null,unsetHoverStateTimeoutRef:{current:null},hoverState:null,activeEditableEdge:null,lineEditorState:null,setLineEditorState:()=>{},setHoverState:()=>{},setSmartConnectLineState:()=>{}});function l(){return r().useContext(i)}},2722:(e,t,n)=>{n.d(t,{T:()=>v});var o=n(8769),r=n.n(o),i=n(9978),l=n(4197),a=n(3033);const c="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSI1cHgiIGhlaWdodD0iNXB4IiB2ZXJzaW9uPSIxLjEiPjxwYXRoIGQ9Im0gMCAwIEwgNSA1IE0gMCA1IEwgNSAwIiBzdHJva2Utd2lkdGg9IjIiIHN0eWxlPSJzdHJva2Utb3BhY2l0eTowLjQiIHN0cm9rZT0iI2ZmZmZmZiIvPjxwYXRoIGQ9Im0gMCAwIEwgNSA1IE0gMCA1IEwgNSAwIiBzdHJva2U9IiMyOWI2ZjIiLz48L3N2Zz4=",s=5,d=8,u=s/2;function v(e){let{activeTarget:t,editableLineMap:n,scale:c,disabled:s}=e;const{unsetHoverStateTimeoutRef:u,hoverState:v,setHoverState:h,smartConnectLineState:m,activeEditableEdge:g,lineEditorState:p}=(0,i.s)(),y=(0,o.useCallback)((()=>{null!==u.current&&(clearTimeout(u.current),u.current=null)}),[u]),w=(0,o.useCallback)((()=>{y(),h((e=>void 0===(null==e?void 0:e.activePointIndex)?e:{...v,activePointIndex:void 0}))}),[v,h,y]),x=(0,o.useCallback)((()=>{u.current=setTimeout((()=>{h(null)}))}),[h,u]);let E,k;const b=!s&&v&&(!!m||(g&&p&&(({source:E,target:k}=n.get(g)),1)?"entry"===p.type?v.cell===k:"exit"===p.type&&v.cell===E:!(0,l.Q)(v.cell,t)&&!function(e){return e&&("edge"===e.type||"multi"===e.type&&e.targets.some((e=>"edge"===e.type)))}(t))),C=a.XK,M=C/2;return r().createElement("g",{onMouseEnter:w,onMouseLeave:x},b&&r().createElement(r().Fragment,null,r().createElement("rect",{x:v.cell.view.x-M,y:v.cell.view.y-M,width:v.cell.view.width+C,height:v.cell.view.height+C,fill:"none",stroke:"transparent",strokeWidth:2*d/c,pointerEvents:"stroke"}),void 0!==v.activePointIndex&&r().createElement("circle",{cx:v.points[v.activePointIndex].x,cy:v.points[v.activePointIndex].y,r:d/c,fill:"lightgreen",fillOpacity:.5,pointerEvents:"none"}),v.points.map(((e,t)=>r().createElement(f,{key:t,editableLineMap:n,index:t,point:e,scale:c,unsetActivePointIndex:w,unsetTimeout:y})))))}function f(e){let{editableLineMap:t,index:n,point:l,scale:a,unsetTimeout:v,unsetActivePointIndex:f}=e;const{rootRef:h,smartConnectLineState:m,hoverState:g,setHoverState:p,setSmartConnectLineState:y,onConnect:w,activeEditableEdge:x,lineEditorState:E,setLineEditorState:k,onChangeEdgeView:b}=(0,i.s)(),C=(0,o.useRef)(null);return(0,o.useEffect)((()=>{const e=C.current,t=o=>{"mousemove"===o.type&&(null==e||e.removeEventListener(o.type,t)),v(),p((e=>e&&e.activePointIndex!==n?{...g,activePointIndex:n}:e))};return null==e||e.addEventListener("mouseenter",t),null==e||e.addEventListener("mousemove",t),()=>{null==e||e.removeEventListener("mouseenter",t),null==e||e.removeEventListener("mousemove",t)}}),[g,n,p,v]),(0,o.useEffect)((()=>{if(E)return;const e=e=>{e.preventDefault(),e.stopPropagation();const t=h.current.getBoundingClientRect(),o=g.points[n];y({source:g.cell,from:[o.x,o.y],offset:[t.left,t.top],exitPosition:g.relativePoints[n]})},t=C.current;return null==t||t.addEventListener("mousedown",e),()=>{null==t||t.removeEventListener("mousedown",e)}}),[g,n,E,h,y]),(0,o.useEffect)((()=>{const e=e=>{if(e.preventDefault(),e.stopPropagation(),m)m.source!==(null==g?void 0:g.cell)&&(null==w||w(m.source,g.cell,m.exitPosition,g.relativePoints[g.activePointIndex])),y(null);else if(x&&E){const e=g.relativePoints[g.activePointIndex],{type:n}=E,{source:o,target:r}=t.get(x),{view:i}=x;"entry"===n?null==b||b(o,r,{...i,entryPosition:e}):null==b||b(o,r,{...i,exitPosition:e}),k(null)}},n=C.current;return null==n||n.addEventListener("mouseup",e),()=>{null==n||n.removeEventListener("mouseup",e)}}),[m,g,w,y,x,E,t,b,k]),r().createElement("g",{ref:C,onMouseLeave:f},r().createElement("circle",{cx:l.x,cy:l.y,r:d,fill:"transparent"}),r().createElement("image",{x:l.x-u/a,y:l.y-u/a,width:s/a,height:s/a,xlinkHref:c,preserveAspectRatio:"none"}))}},2202:(e,t,n)=>{n.d(t,{F:()=>v});var o=n(9575),r=n(8769),i=n.n(r),l=n(9978),a=n(531);const c="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIyMnB4IiBoZWlnaHQ9IjIycHgiIHZlcnNpb249IjEuMSI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iNyIgc3Ryb2tlPSIjZmZmIiBmaWxsPSIjMjliNmYyIi8+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iMyIgc3Ryb2tlPSIjZmZmIiBmaWxsPSJ0cmFuc3BhcmVudCIvPjwvc3ZnPg==",s="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIyMnB4IiBoZWlnaHQ9IjIycHgiIHZlcnNpb249IjEuMSI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iNyIgc3Ryb2tlPSIjZmZmIiBmaWxsPSIjMDFiZDIyIi8+PHBhdGggZD0ibSA4IDggTCAxNCAxNE0gOCAxNCBMIDE0IDgiIHN0cm9rZT0iI2ZmZiIvPjwvc3ZnPg==",d="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiIHZlcnNpb249IjEuMSI+PGNpcmNsZSBjeD0iOSIgY3k9IjkiIHI9IjUiIHN0cm9rZT0iI2ZmZiIgZmlsbD0iIzI5YjZmMiIvPjwvc3ZnPg==",u=22;function v(e){let{scale:t,editableLineMap:n}=e;const{rootRef:v,activeEditableEdge:f,setLineEditorState:h}=(0,l.s)(),m=(0,r.useRef)(null),g=(0,r.useRef)(null),p=(0,r.useRef)([]);(0,r.useEffect)((()=>{const e=m.current,t=g.current;if(!e||!t||!f)return;const n=e=>t=>{t.stopPropagation(),t.preventDefault();const n=v.current.getBoundingClientRect();h({offset:[n.left,n.top],from:[t.clientX,t.clientY],type:e})},o=n("exit"),r=n("entry");return e.addEventListener("mousedown",o),t.addEventListener("mousedown",r),()=>{e.removeEventListener("mousedown",o),t.removeEventListener("mousedown",r)}}),[f,v,h]);const y=(0,r.useMemo)((()=>{var e;return f&&!(0,a.jw)(null===(e=f.view)||void 0===e?void 0:e.type)?function(e){const t=[];let n=e[0],o=1;for(;o<e.length;){const r=e[o],i=n.y===r.y,l=n.x===r.x;if(!i||!l){const e=i?"ns":"ew";t.push({direction:e,index:o-1,x:(n.x+r.x)/2,y:(n.y+r.y)/2})}n=r,o++}return t}(n.get(f).points):[]}),[f,n]);(0,r.useEffect)((()=>{if(!f)return;const e=p.current,t=y.map((e=>(e=>t=>{t.stopPropagation(),t.preventDefault();const n=v.current.getBoundingClientRect();h({offset:[n.left,n.top],from:[t.clientX,t.clientY],type:"control",control:e})})(e)));return e.forEach(((e,n)=>{null==e||e.addEventListener("mousedown",t[n])})),()=>{e.forEach(((e,n)=>{null==e||e.removeEventListener("mousedown",t[n])}))}}),[f,y,v,h]);const w=(0,r.useRef)(null);if((0,r.useEffect)((()=>{const e=w.current,t=e=>{e.stopPropagation(),e.preventDefault()};return null==e||e.addEventListener("click",t),()=>{null==e||e.removeEventListener("click",t)}}),[]),!f)return null;const{view:x}=f,E=n.get(f).points,{exitPosition:k,entryPosition:b}=null!=x?x:{},C={width:u/t,height:u/t,preserveAspectRatio:"none",cursor:"pointer",pointerEvents:"fill"},M=E[0],I=E[E.length-1],S=u/t/2;return i().createElement("g",{ref:w},i().createElement("image",(0,o.A)({ref:m},C,{x:M.x-S,y:M.y-S,xlinkHref:k?s:c})),y.map(((e,t)=>i().createElement("image",(0,o.A)({key:t,ref:e=>{p.current[t]=e}},C,{x:e.x-S,y:e.y-S,xlinkHref:d,cursor:"ns"===e.direction?"row-resize":"col-resize"})))),i().createElement("image",(0,o.A)({ref:g},C,{x:I.x-S,y:I.y-S,xlinkHref:b?s:c})))}},1103:(e,t,n)=>{n.d(t,{X:()=>u});var o=n(8769),r=n.n(o),i=n(3373),l=n.n(i),a=n(8653),c=n(9978),s=n(967),d=n(7531);function u(e){let{transform:t,lineSettings:n,options:i}=e;const[u,v]=(0,o.useState)(null),{hoverState:f,smartConnectLineState:h,setSmartConnectLineState:m}=(0,c.s)();(0,o.useEffect)((()=>{if(h)return document.addEventListener("mousemove",e),document.addEventListener("mouseup",n),o;function e(e){v([(e.clientX-t.x-h.offset[0])/t.k,(e.clientY-t.y-h.offset[1])/t.k])}function n(e){e.preventDefault(),o()}function o(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n),v(null),m(null)}}),[m,h,t]);const g=(0,o.useMemo)((()=>{const e=function(e,t,n,o){if(!e||!t&&void 0===(null==n?void 0:n.activePointIndex))return null;const r=e.source.view;if(void 0!==(null==n?void 0:n.activePointIndex))return(0,s.V)(r,n.cell.view,{...o,exitPosition:e.exitPosition,entryPosition:n.relativePoints[n.activePointIndex]});const[i,l]=t;return(0,s.V)(r,{x:i,y:l,width:0,height:0},{...o,exitPosition:e.exitPosition})}(h,u,f,n);return(0,a.S)(e,"curve"===(null==n?void 0:n.type)?n.curveType:"curveLinear",0,1)}),[u,f,h,n]);let p,y;const w=(0,d.I)(i);for(const e of w)"start"===e.placement?p=i.$markerStartUrl:y=i.$markerEndUrl;return r().createElement("path",{className:l()("connect-line",{connecting:!(!h||!u)}),d:g,fill:"none",stroke:i.strokeColor,strokeWidth:i.strokeWidth,markerStart:p,markerEnd:y})}},3033:(e,t,n)=>{n.d(t,{Be:()=>p,CV:()=>o,D9:()=>a,Dm:()=>l,HP:()=>i,Ie:()=>h,Jo:()=>C,N8:()=>c,Ub:()=>g,VO:()=>f,XK:()=>b,XV:()=>m,Yt:()=>u,gx:()=>w,ld:()=>x,mF:()=>v,o5:()=>E,p6:()=>k,pC:()=>y,sS:()=>d,w1:()=>s,xc:()=>r});const o=Symbol.for("size-initialized"),r=Symbol.for("layout-initialized"),i=20,l=36,a=50,c=180,s=120,d=.5,u=2,v="gray",f=1,h=15,m=!1,g=!0,p=1,y=500,w=10,x=5,E="all",k=5,b=0,C=50},531:(e,t,n)=>{function o(e){return"node"===e.type}function r(e){return"decorator"===e.type}function i(e){return"node"===e.type}function l(e){return"edge"===e.type}function a(e){return"node"===e.type||"edge"===e.type}function c(e){return"node"===e.type||"decorator"===e.type&&"area"===e.decorator}function s(e,t){return"node"===e.type||!!t&&"decorator"===e.type&&"area"===e.decorator}function d(e){return"decorator"===e.type&&"text"===e.decorator}function u(e){return"decorator"===e.type&&"container"===e.decorator}function v(e){return!["manual",void 0].includes(e)}function f(e){return!("polyline"===e||"curve"===e)}n.d(t,{Hs:()=>d,N:()=>o,OD:()=>v,WW:()=>l,bo:()=>s,jw:()=>f,mH:()=>r,nv:()=>a,o6:()=>c,t2:()=>u,vC:()=>i})},9386:(e,t,n)=>{n.d(t,{P:()=>r});var o=n(1030);function r(e){return"edge"===e.type?(0,o.pick)(e,["type","source","target","data"]):(0,o.pick)(e,["type","id","data"])}},227:(e,t,n)=>{n.d(t,{Y:()=>r});var o=n(4197);function r(e,t,n,r){const i=[];if(t){const n=new Set;for(const o of e)"edge"===o.type&&o.source===t.source.id&&n.add(o.target);for(const t of e)switch(t.type){case"node":n.has(t.id)&&i.push(t);break;case"decorator":r&&"text"!=t.decorator&&!n.has(t.id)||i.push(t);break;default:i.push(t)}}else switch(null==n?void 0:n.type){case"multi":{const t=new Map,r=new Set,l=new Set;for(const e of n.targets)"node"===e.type&&(r.add(e.id),l.add(e.id));for(const a of e)"node"===a.type?t.set(a.id,a):"edge"===a.type?r.has(a.source)?l.add(a.target):r.has(a.target)?l.add(a.source):(0,o.Q)(a,n)||i.push(a):(0,o.Q)(a,n)||i.push(a);for(const[e,n]of t)l.has(e)||i.push(n);break}case"node":{const t=new Map,o=new Set([n.id]);for(const r of e)"node"===r.type?t.set(r.id,r):"edge"===r.type?r.source===n.id?o.add(r.target):r.target===n.id?o.add(r.source):i.push(r):i.push(r);for(const[e,n]of t)o.has(e)||i.push(n);break}case"edge":for(const t of e)("edge"===t.type?(0,o.Q)(t,n):"node"===t.type&&(t.id===n.source||t.id===n.target))||i.push(t)}return i}},2733:(e,t,n)=>{n.d(t,{a:()=>r});var o=n(4197);function r(e,t){let{cells:n,activeTarget:r}=t;const i=n.filter((e=>(0,o.Q)(e,r)));if(0!==i.length)switch(e.key||e.keyCode||e.which){case"Backspace":case 8:case"Delete":case 46:return e.preventDefault(),e.stopPropagation(),{action:"delete-cells",cells:i}}}},2219:(e,t,n)=>{function o(e,t){let{transform:n,offset:o,onLassoing:r,onLassoed:i}=t;if(e.ctrlKey||e.button)return;e.stopPropagation();const l=[e.clientX,e.clientY],a=(e.clientX-o[0]-n.x)/n.k,c=(e.clientY-o[1]-n.y)/n.k;let s=!1;const d=(e,t)=>{const o=function(e){return[(e.clientX-l[0])/n.k,(e.clientY-l[1])/n.k]}(e);if(s||(s=o[0]**2+o[1]**2>=9),s){let[e,n]=o,l=a,s=c;e<0&&(l=a+e,e=-e),n<0&&(s=c+n,n=-n),(t?i:r)({x:l,y:s,width:e,height:n})}},u=e=>{d(e)},v=e=>{d(e,!0),s=!1,document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",u),document.addEventListener("mouseup",v)}n.d(t,{F:()=>o})},1991:(e,t,n)=>{n.d(t,{_:()=>r});var o=n(531);function r(e,t,n){const r=t.filter((e=>(0,o.N)(e))),i=e.filter((e=>(0,o.t2)(e))).map((e=>e.id)),l=e.filter((e=>{const t=r.find((t=>t.id===e.id)),n=(null==t?void 0:t.containerId)&&i.includes(t.containerId);return(0,o.N)(e)&&!n}));l.forEach((e=>{const n=e.x,r=e.x+e.width,i=e.y,l=e.y+e.height,a=t.filter((e=>(0,o.t2)(e)));for(const t of a){const o=t.view.x,a=t.view.x+t.view.width,c=t.view.y,s=t.view.y+t.view.height;if(n>=o&&r<=a&&i>=c&&l<=s){e.containerCell=t;break}}}));let a=[];return a=l.filter((e=>{var t;const n=r.find((t=>t.id===e.id));return(null==n?void 0:n.containerId)!==(null===(t=e.containerCell)||void 0===t?void 0:t.id)})),a.length>0&&(null==n||n(a)),a}},3783:(e,t,n)=>{n.d(t,{C:()=>r});var o=n(531);function r(e,t){let{defaultNodeSize:n}=t;return(null!=e?e:[]).map((e=>{var t,r;return!(0,o.vC)(e)||void 0!==(null===(t=e.view)||void 0===t?void 0:t.width)&&void 0!==(null===(r=e.view)||void 0===r?void 0:r.height)?e:{...e,view:{width:n[0],height:n[1],...e.view}}}))}},8185:(e,t,n)=>{function o(e,t){return e?!!t&&e.type===t.type&&("multi"===e.type?e.targets.length===t.targets.length&&e.targets.every((e=>t.targets.some((t=>o(e,t))))):"node"===e.type||"decorator"===e.type?e.id===t.id:e.source===t.source&&e.target===t.target):!t}n.d(t,{c:()=>o})},4197:(e,t,n)=>{n.d(t,{Q:()=>r});var o=n(8185);function r(e,t){return!!t&&("multi"===t.type?t.targets:[t]).some((t=>(0,o.c)(t,e)))}},908:(e,t,n)=>{n.d(t,{r:()=>r});var o=n(531);function r(e,t){let{canvasWidth:n,canvasHeight:r,scaleRange:i}=t,l=1/0,a=1/0,c=-1/0,s=-1/0,d=!0;for(const t of e)if(!(0,o.WW)(t)){d=!1;const{view:e}=t,n=e.x+e.width,o=e.y+e.height;e.x<l&&(l=e.x),n>c&&(c=n),e.y<a&&(a=e.y),o>s&&(s=o)}const u=c-l,v=s-a,f=i&&!d&&(u>n||v>r)?Math.max(Math.min(n/u,r/v,i[1]),i[0]):1;return{x:d?0:(n-u*f)/2-l*f,y:d?0:(r-v*f)/2-a*f,k:f}}},2098:(e,t,n)=>{n.d(t,{L:()=>u});var o=n(1030),r=n(3033),i=n(531),l=n(3783),a=n(908),c=n(6170),s=n(9127),d=n(8185);function u(e){let{cells:t,layout:n,previousCells:u,defaultNodeSize:v,canvasWidth:f,canvasHeight:h,scaleRange:m,transform:g,reason:p,parent:y,allowEdgeToArea:w}=e;const x="force"!==n&&"dagre"!==n,E=(0,l.C)(t,{defaultNodeSize:v}),k=[];let b=!1;const C=new Map;let M=!1;for(const e of u)(0,i.mH)(e)?M=!0:(0,i.N)(e)&&(M=!0,e[r.CV]&&C.set(e.id,e));const I=new Map;for(const e of E)if((0,i.N)(e)){I.set(e.id,e);const t=C.get(e.id);t&&(e.view.width=t.view.width,e.view.height=t.view.height,e[r.CV]=!0)}let S=!1;if("add-related-nodes"===p&&y){const e=new Set;for(const t of E)(0,i.WW)(t)&&t.source===y&&t.target!==y&&e.add(t.target);const t=I.get(y);if(void 0!==(null==t?void 0:t.view.x)&&void 0!==t.view.y){if(S=!0,x)for(const t of E)((0,i.N)(t)&&void 0===t.view.x||(0,i.N)(t)&&void 0===t.view.y)&&e.add(t.id);const n=[...e].map((e=>I.get(e))).filter(Boolean);let o;for(const e of n)void 0!==e.view.x&&void 0!==e.view.y?(!o||e.view.x>o.view.x)&&e.view.y>t.view.y&&(o=e):k.push(e);if(k.length>0&&x){let e,n;if(o)e=o.view.x+o.view.width+r.Dm,n=o.view.y;else{const o=k.reduce(((e,t)=>e+t.view.width+r.Dm),-r.Dm);e=t.view.x-o/2+t.view.width/2,n=t.view.y+t.view.height+r.D9}for(const t of k)t.view.x=e,t.view.y=n,e+=t.view.width+r.Dm}}}if(!S){const e=[];let t=!1;for(const n of E)(0,i.N)(n)?void 0===n.view.x||void 0===n.view.y?k.push(n):e.push(n):(0,i.mH)(n)&&(t=!0);if(x){let n;M||(g=(0,a.r)((0,o.without)(E,...k),{canvasWidth:f,canvasHeight:h,scaleRange:m})),0===e.length||1===e.length&&!t&&k.length>0?(k.push(...e),({getNodeView:n}=(0,s.C)({cells:E,allowEdgeToArea:w})),b=0===u.length||u.length===E.length&&u.every(((e,t)=>(0,d.c)(e,E[t])))):({getNodeView:n}=(0,c.k)({cells:E,fixedPosition:!0,allowEdgeToArea:w,center:[(f/2-g.x)/g.k,(h/2-g.y)/g.k]}));for(const e of E)if((0,i.N)(e)){const t=n(e.id);e.view.x=t.x,e.view.y=t.y}}}return{cells:E,updated:k,shouldReCenter:b}}},5748:(e,t,n)=>{n.d(t,{d:()=>l});var o=n(531),r=n(3033);function i(e,t,n){const o=e.findLastIndex(n)+1;return[...e.slice(0,o),t,...e.slice(o)]}const l=(a={cells:(e,t)=>{switch(t.type){case"drop-node":return i(e,t.payload,(e=>!("decorator"===e.type&&"text"===e.decorator)));case"drop-decorator":return"text"===t.payload.decorator?[...e,t.payload]:i(e,t.payload,(e=>"decorator"===e.type&&"area"===e.decorator));case"add-nodes":{const n=e.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1;return[...e.slice(0,n),...t.payload,...e.slice(n)]}case"add-edge":{const n=e.findIndex((e=>"edge"===e.type&&e.source===t.payload.source&&e.target===t.payload.target));return-1===n?i(e,t.payload,(e=>"edge"===e.type||"decorator"===e.type&&"area"===e.decorator)):[...e.slice(0,n),t.payload,...e.slice(n+1)]}case"change-edge-view":{const n=e.findIndex((e=>"edge"===e.type&&e.source===t.payload.source&&e.target===t.payload.target));return-1===n?e:[...e.slice(0,n),{...e[n],view:{...e[n].view,...t.payload.view}},...e.slice(n+1)]}case"move-cells":{let n=!1;const o=e.map((e=>{const o=t.payload.find((t=>e.type===t.type&&e.id===t.id));return o?(n=!0,{...e,view:{...e.view,x:o.x,y:o.y}}):e}));return n?o:e}case"resize-cell":{const{type:n,id:o,width:r,height:i}=t.payload,l=e.findIndex((e=>e.type===n&&e.id===o));if(-1!==l){const t=e[l];return[...e.slice(0,l),{...t,view:{...t.view,width:r,height:i}},...e.slice(l+1)]}return e}case"update-cells":return t.payload;case"update-node-size":return e.map((e=>(0,o.N)(e)&&e.id===t.payload.id?{...e,[r.CV]:!0,view:t.payload.size?{...e.view,width:t.payload.size[0],height:t.payload.size[1]}:e.view}:e))}return e},layoutKey:(e,t)=>"update-node-size"===t.type?t.layoutKey:e},(e,t)=>Object.fromEntries(Object.entries(a).map((n=>{let[o,r]=n;return[o,r(e[o],t)]}))));var a},7099:(e,t,n)=>{n.d(t,{Y:()=>h});var o=n(8769),r=n.n(o),i=n(2588),l=n(6768),a=n(6313),c=n(5694),s=n(3848),d=n(9575);const u=e=>o.createElement("svg",(0,d.A)({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"},e),o.createElement("path",{d:"M12 0a.5.5 0 0 1 .5.5v2.013a9.5 9.5 0 0 1 8.987 8.988L23.5 11.5a.5.5 0 0 1 0 1h-2.013a9.5 9.5 0 0 1-8.987 8.987V23.5a.5.5 0 0 1-1 0v-2.013A9.5 9.5 0 0 1 2.514 12.5H.5a.5.5 0 0 1 0-1h2.013A9.5 9.5 0 0 1 11.5 2.514V.5A.5.5 0 0 1 12 0M3.514 11.5H7.5a.5.5 0 0 1 0 1H3.514a8.5 8.5 0 0 0 7.987 7.986L11.5 16.5a.5.5 0 0 1 1 0v3.986a8.5 8.5 0 0 0 7.986-7.986H16.5a.5.5 0 0 1 0-1h3.986A8.5 8.5 0 0 0 12.5 3.515V7.5a.5.5 0 0 1-1 0V3.514a8.5 8.5 0 0 0-7.986 7.987zm8.486-1a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3"})),v=e=>o.createElement("svg",(0,d.A)({xmlns:"http://www.w3.org/2000/svg",width:128,height:128,className:"icon",viewBox:"0 0 1024 1024"},e),o.createElement("path",{d:"M512 76.8A435.2 435.2 0 1 0 947.2 512 435.71 435.71 0 0 0 512 76.8m0 819.2a384 384 0 1 1 384-384 384 384 0 0 1-384 384"}),o.createElement("path",{d:"M744.448 486.4h-204.8V281.6a25.6 25.6 0 1 0-51.2 0v204.8h-204.8a25.6 25.6 0 0 0 0 51.2h204.8v204.8a25.6 25.6 0 0 0 51.2 0V537.6h204.8a25.6 25.6 0 0 0 0-51.2"})),f=e=>o.createElement("svg",(0,d.A)({xmlns:"http://www.w3.org/2000/svg",width:128,height:128,className:"icon",viewBox:"0 0 1024 1024"},e),o.createElement("path",{d:"M512 76.8A435.2 435.2 0 1 0 947.2 512 435.71 435.71 0 0 0 512 76.8m0 819.2a384 384 0 1 1 384-384 384 384 0 0 1-384 384"}),o.createElement("path",{d:"M744.448 486.4H280.064a25.6 25.6 0 1 0 0 51.2h464.384a25.6 25.6 0 0 0 0-51.2"}));function h(e){let{shadowRoot:t,scale:n,scaleRange:d,onZoomChange:h,onReCenter:m}=e;const g=(0,s.useCurrentTheme)(),p=(0,o.useMemo)((()=>(0,c.VC)()),[]),y=(0,o.useRef)(null),w=100*d[0],x=100*d[1],E=100*n,k=(0,o.useMemo)((()=>({formatter:e=>`${e}%`,placement:"left",getPopupContainer:()=>y.current})),[]),b=(0,o.useCallback)((()=>{h(Math.min(E+5,x))}),[x,h,E]),C=(0,o.useCallback)((()=>{h(Math.max(E-5,w))}),[w,h,E]);return r().createElement(i.Ay,{theme:{algorithm:"dark-v2"===g?l.A.darkAlgorithm:l.A.defaultAlgorithm}},r().createElement(c.N7,{container:t,autoClear:!0,cache:p,hashPriority:"high"},r().createElement("div",{className:"zoom-bar",ref:y},r().createElement("div",{className:"center-button",onClick:m,role:"button"},r().createElement(u,null)),r().createElement("div",{className:"zoom-slider"},r().createElement("div",{className:"zoom-button",role:"button",onClick:b},r().createElement(v,null)),r().createElement(a.A,{min:w,max:x,value:E,step:5,vertical:!0,included:!1,tooltip:k,onChange:h}),r().createElement("div",{className:"zoom-button",role:"button",onClick:C},r().createElement(f,null))))))}},9127:(e,t,n)=>{n.d(t,{C:()=>c});var o=n(1030),r=n(7586),i=n.n(r),l=n(8802),a=n(531);function c(e){let{cells:t,layoutOptions:n,allowEdgeToArea:r}=e;const{nodePadding:c,...s}={nodePadding:0,rankdir:"TB",ranksep:50,edgesep:10,nodesep:50,...(0,o.pick)(n,["nodePadding","rankdir","ranksep","edgesep","nodesep","align"])},d=(0,l.D)(c);if(!t.some(a.N))return{getNodeView:()=>null,nodePaddings:d};const u=new(i().graphlib.Graph);u.setGraph(s),u.setDefaultEdgeLabel((function(){return{}}));for(const e of t)r&&(0,a.o6)(e)||(0,a.N)(e)?u.setNode(e.id,{id:e.id,width:e.view.width+d[1]+d[3],height:e.view.height+d[0]+d[2]}):(0,a.WW)(e)&&u.setEdge(e.source,e.target);return i().layout(u),{getNodeView:e=>u.node(e),nodePaddings:d}}},6170:(e,t,n)=>{n.d(t,{k:()=>v});var o=n(1030),r=n(6149),i=n(4842),l=n(1945),a=n(9418),c=n(3854),s=n(7931),d=n(531),u=n(8802);function v(e){let{cells:t,layoutOptions:n,center:v,fixedPosition:f,allowEdgeToArea:h}=e;const{nodePadding:m,collide:g}={nodePadding:0,...(0,o.pick)(n,["nodePadding"]),collide:!1!==(null==n?void 0:n.collide)&&{radiusDiff:18,strength:1,iterations:1,...!0===(null==n?void 0:n.collide)?null:null==n?void 0:n.collide}},p=(0,u.D)(m),y=[],w=[],x=new Map;for(const e of t)if(h&&(0,d.o6)(e)||(0,d.N)(e)){const t={id:e.id,width:e.view.width+p[1]+p[3],height:e.view.height+p[0]+p[2],...f?{fx:e.view.x,fy:e.view.y}:null};y.push(t),x.set(t.id,t)}else(0,d.WW)(e)&&w.push({source:e.source,target:e.target});const E=(0,r.A)(w).id((e=>e.id)),k=(0,i.A)(y).force("link",E).force("x",(0,l.A)(null==v?void 0:v[0])).force("y",(0,a.A)(null==v?void 0:v[1])).force("charge",(0,c.A)());return g&&k.force("collide",(0,s.A)().radius((e=>Math.sqrt(e.width**2+e.height**2)/2+g.radiusDiff)).strength(g.strength).iterations(g.iterations)),k.stop(),function(e){e.tick(Math.ceil(Math.log(e.alphaMin())/Math.log(1-e.alphaDecay())))}(k),{getNodeView:e=>x.get(e),nodePaddings:p}}},967:(e,t,n)=>{n.d(t,{V:()=>u,P:()=>v});var o=n(1030),r=n(8875),i=n(4059);function l(e,t){return{x:e.x+e.width/2,y:e.y+e.height/2,width:e.width+t,height:e.height+t}}var a=n(3033),c=n(3188),s=n(531);const d=["right","top","left","bottom"];function u(e,t,n,u){var p,y,w,x,E,k;const{type:b,vertices:C,exitPosition:M,entryPosition:I}=null!=n?n:{};if((0,s.jw)(b))return(0,c.h)(l(e,M?a.XK:a.p6),l(t,I?a.XK:a.p6),u,n);if(null!=C&&C.length){const n=C[0],o=C[C.length-1];let r,i,l,a;if(M)r=h(e,M);else{let i;if(C.length>1?i=C[1]:I&&(i=h(t,I)),i)r=m(n,e,n.y===i.y);else{const n=o.y<t.y||o.y>t.y+t.height?"ns":"ew";({point:r,direction:l}=g(e,t,C,n))}}if(I)i=h(t,I);else{let r;if(C.length>1?r=C[C.length-2]:M&&(r=h(e,M)),r)i=m(o,t,o.y===r.y);else{const o=n.x<e.x||n.x>e.x+e.width?"ew":"ns";({point:i,direction:a}=g(t,e,C.slice().reverse(),o))}}const{x:c,y:s}=r,{x:d,y:u}=i,f=[r,...C,i],p=[...C];return n&&n.x!==c&&n.y!==s&&p.unshift("ns"===l?{x:c,y:n.y}:"ew"===l?{x:n.x,y:s}:n.x===f[2].x?{x:c,y:n.y}:{x:n.x,y:s}),o&&o.x!==d&&o.y!==u&&p.push("ns"===a?{x:d,y:o.y}:"ew"===a?{x:o.x,y:u}:o.x===f[f.length-3].x?{x:d,y:o.y}:{x:o.x,y:u}),[r,...v(r,p,i),i]}const S=null!=M?M:f(t,e),L=null!=I?I:f(e,t),{x:z,y:P}=h(e,S),{x:R,y:N}=h(t,L),A=(0,r.X)(),T=null!==(p=null===(y=A.find((e=>e.x===S.x&&e.y===S.y)))||void 0===y?void 0:y.d)&&void 0!==p?p:d,H=null!==(w=null===(x=A.find((e=>e.x===L.x&&e.y===L.y)))||void 0===x?void 0:x.d)&&void 0!==w?w:d,D=[...T],W=[...H];z<R?((0,o.pull)(D,"left"),(0,o.pull)(W,"right")):((0,o.pull)(D,"right"),(0,o.pull)(W,"left")),P<N?((0,o.pull)(D,"top"),(0,o.pull)(W,"bottom")):((0,o.pull)(D,"bottom"),(0,o.pull)(W,"top"));const Z=null!==(E=D[0])&&void 0!==E?E:T[0],$=null!==(k=W[0])&&void 0!==k?k:H[0],B="left"===Z||"right"===Z?S.y:S.x,j="left"===$||"right"===$?L.y:L.x;return(0,i.o)(l(e,a.XK),l(t,a.XK),Z,$,B,j)}function v(e,t,n){const o=[];let r,i=e,l=0;for(;l<t.length;){const e=t[l],a=e.x!==i.x,c=e.y!==i.y;if(a||c){const c=a?"ew":"ns";if(c!==r){const a=l===t.length-1?n:t[l+1],s=a.x!==e.x,d=a.y!==e.y;(s||d)&&c!==(s?"ew":"ns")&&(r=c,o.push(e),i=e)}}l++}return o}function f(e,t){return t.y+t.height<e.y?{x:.5,y:1}:t.y>e.y+e.height?{x:.5,y:0}:t.x<e.x?{x:1,y:.5}:{x:0,y:.5}}function h(e,t){const n=a.XK/2;return{x:e.x-n+t.x*(e.width+a.XK),y:e.y-n+t.y*(e.height+a.XK)}}function m(e,t,n){let o,r,i,l,c;if(n?(o="y",r="x",i="height",l="width"):(o="x",r="y",i="width",l="height"),t[r]+t[l]<e[r]&&(c={[o]:.5,[r]:1}),t[r]>e[r]&&(c={[o]:.5,[r]:0}),c)return h(t,c);const s=t[o]<e[o]?1:0;return{[o]:t[o]-a.XK/2+s*(t[i]+a.XK),[r]:e[r]}}function g(e,t,n,o){let r,i,l,a,c,s,d,u;"ns"===o?(l="x",a="y",c="width",s="height",d="ns",u="ew"):(l="y",a="x",c="height",s="width",d="ew",u="ns");const v=n[0];if(v[l]>=e[l]&&v[l]<=e[l]+e[c])if(v[a]>e[a]+e[s])r={[l]:v[l],[a]:e[a]+e[s]},i=d;else if(v[a]<e[a])r={[l]:v[l],[a]:e[a]},i=d;else{var f;const o=null!==(f=n[1])&&void 0!==f?f:t;r={[l]:v[l],[a]:o[a]<v[a]?v[a]:e[a]+e[s]},i=d}else v[a]<e[a]?(r={[l]:e[l]+e[c]/2,[a]:e[a]},i=d):v[a]>e[a]+e[s]?(r={[l]:e[l]+e[c]/2,[a]:e[a]+e[s]},i=d):v[l]<e[l]?(r={[l]:e[l],[a]:v[a]},i=u):(r={[l]:e[l]+e[c],[a]:v[a]},i=u);return{point:r,direction:i}}},8875:(e,t,n)=>{n.d(t,{G:()=>l,X:()=>i});const o=[{x:0,y:0,d:["top","left"]},{x:.5,y:0,d:["top"]},{x:1,y:0,d:["top","right"]},{x:0,y:.5,d:["left"]},{x:1,y:.5,d:["right"]},{x:0,y:1,d:["bottom","left"]},{x:.5,y:1,d:["bottom"]},{x:1,y:1,d:["bottom","right"]}],r=o.map((e=>({x:e.x,y:e.y})));function i(){return o}function l(){return r}},1819:(e,t,n)=>{n.d(t,{J:()=>i});var o=n(8769),r=n(8185);function i(e){let{rootRef:t,activeTarget:n,doNotResetActiveTargetForSelector:i,doNotResetActiveTargetOutsideCanvas:l,onActiveTargetChange:a}=e;const c=null!=n?n:null,[s,d]=(0,o.useState)(c);(0,o.useEffect)((()=>{d((e=>(0,r.c)(e,c)?e:c))}),[c]);const u=(0,o.useRef)(!1);return(0,o.useEffect)((()=>{u.current?a(s):u.current=!0}),[s,a]),(0,o.useEffect)((()=>{if(!s)return;const e=e=>{const n=e.composedPath(),o=n.indexOf(t.current);(l?0!==o:!(o<=0)||i&&n.some((e=>e instanceof Element&&e.matches(i))))||d(null)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}),[s,l,i,t]),s}},5915:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(8769),r=n(531);function i(e,t){return e.find((e=>(0,r.o6)(e)&&e.id===t))}var l=n(967);function a(e){let{cells:t,lineConfMap:n}=e;return(0,o.useMemo)((()=>{const e=new WeakMap;for(const a of t)if((0,r.WW)(a)){var o;const c=n.get(a),s=i(t,a.source),d=i(t,a.target),u=(0,r.jw)(null===(o=a.view)||void 0===o?void 0:o.type)&&t.some((e=>{var t;return(0,r.WW)(e)&&e.source===a.target&&e.target===a.source&&(0,r.jw)(null===(t=e.view)||void 0===t?void 0:t.type)}))?c.parallelGap:0,v=s&&d&&null!=s.view.x&&null!=d.view.x?(0,l.V)(s.view,d.view,a.view,u):null;v&&e.set(a,{edge:a,points:v,source:s,target:d,parallelGap:u})}return e}),[t,n])}},1484:(e,t,n)=>{n.d(t,{g:()=>f});var o=n(8769),r=n(7566),i=n(9047),l=n(3033),a=n(531),c=n(908),s=n(6170),d=n(9127);const u=new Map([["center",.5],["left",0],["right",1],["top",0],["bottom",1]]);function v(e,t){if("string"==typeof e){const n=u.get(e);if(void 0!==n)return n;const o=e.match(/^(-?\d+(?:\.\d+)?)%$/);if(o)return Number(o[1])/100;console.error("Unexpected align origin %s:",t,e)}else{if("number"==typeof e)return e;console.error("Unexpected align origin %s, expected %s, received %s:",t,"string | number",typeof e,e)}return.5}function f(e){let{layout:t,layoutOptions:n,rootRef:u,cells:f,zoomable:h,zoomer:m,scaleRange:g,layoutKey:p,allowEdgeToArea:y,autoCenterWhenCellsChange:w,dispatch:x}=e;const[E,k]=(0,o.useState)("force"!==t&&"dagre"!==t),b=(0,o.useRef)(p),C=(0,o.useCallback)((()=>++b.current),[]),[M,I]=function(e){let{rootRef:t,cells:n,layoutInitialized:s,zoomable:d,zoomer:u,scaleRange:v,autoCenterWhenCellsChange:f}=e;const[h,m]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{n.some((e=>(0,a.N)(e)||(0,a.mH)(e)))&&!f||m(!1)}),[n,f]),(0,o.useEffect)((()=>{const e=t.current;if(!e||!s||h||!n.some((e=>(0,a.N)(e)||(0,a.mH)(e)))||n.some((e=>(0,a.N)(e)&&!e[l.CV])))return;const{k:o,x:f,y:g}=(0,c.r)(n,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:d?v:void 0});u.transform((0,r.A)(e),new i.uV(o,f,g)),m(!0)}),[n,h,s,t,v,d,u]),[h,m]}({rootRef:u,layoutInitialized:E,cells:f,zoomable:h,zoomer:m,scaleRange:g,autoCenterWhenCellsChange:w}),S=(0,o.useRef)(null);return(0,o.useEffect)((()=>{if(f.some((e=>(0,a.N)(e)&&!e[l.CV]))||0===f.length)return;if("force"!==t&&"dagre"!==t)return void k(!0);if(b.current!==p||(e=S.current,o=f.filter(a.nv),(null==e?void 0:e.length)===o.length&&e.every(((e,t)=>e===o[t]))))return;var e,o;let r,i;({getNodeView:r,nodePaddings:i}="force"===t?(0,s.k)({cells:f,layoutOptions:n,allowEdgeToArea:y}):(0,d.C)({cells:f,layoutOptions:n,allowEdgeToArea:y}));const c=function(e){const t=null!=e?e:[.5,.5];return[v(t[0],"x"),v(t[1],"y")]}(null==n?void 0:n.alignOrigin),u=f.map((e=>{if(y&&(0,a.o6)(e)||(0,a.N)(e)){const t=r(e.id);return{...e,view:{...e.view,x:t.x-t.width*c[0]+i[3],y:t.y-t.height*c[1]+i[0]},[l.xc]:!0}}return e}));S.current=u.filter(a.nv),x({type:"update-cells",payload:u}),k(!0)}),[f,x,t,p,n]),{centered:M,setCentered:I,getNextLayoutKey:C}}},7531:(e,t,n)=>{n.d(t,{I:()=>d,d:()=>c});var o=n(8769),r=n(2716),i=n(1030),l=n(531),a=n(3033);function c(e){let{cells:t,defaultEdgeLines:n,markerPrefix:c,lineConnector:f}=e;return(0,o.useMemo)((()=>{const e=[{strokeColor:a.mF,markerType:"arrow"}];let o=null;if(f){o={...v(),editingStrokeColor:"var(--palette-blue-5)",...(0,i.omitBy)(!0===f?{}:f,i.isUndefined)};const t=d(o);for(const n of t){const{placement:t,type:r}=n,i=null!=r?r:"arrow",l=u({strokeColor:o.strokeColor,markerType:i},e),a=u({strokeColor:o.editingStrokeColor,markerType:i},e);"start"===t?(o.$markerStartUrl=`url(#${c}${l})`,o.$editingStartMarkerUrl=`url(#${c}${a})`):(o.$markerEndUrl=`url(#${c}${l})`,o.$editingEndMarkerUrl=`url(#${c}${a})`)}}const h=new WeakMap;for(const o of t)if((0,l.WW)(o)){var m,g;const t=null!==(m=Array.isArray(n)?s(n.find((e=>(0,r.checkIfByTransform)(e,{edge:o}))),o):null===(g=r.__secret_internals.legacyDoTransform({edge:o},n))||void 0===g?void 0:g.find((e=>(0,r.checkIfOfComputed)(e))))&&void 0!==m?m:{},l={...v(),...(0,i.omitBy)(t,i.isUndefined),...(0,i.omitBy)(o.view,i.isUndefined)};void 0===l.parallelGap&&(l.parallelGap=l.interactStrokeWidth);const a=d(l);for(const t of a){var p,y;const{placement:n,type:o}=t,r=null!=o?o:"arrow",i=u({strokeColor:l.strokeColor,markerType:r},e);"start"===n?l.$markerStartUrl=`url(#${c}${i})`:l.$markerEndUrl=`url(#${c}${i})`;const a=null===(p=l.overrides)||void 0===p||null===(p=p.active)||void 0===p?void 0:p.strokeColor;if(a&&a!==l.strokeColor){const t=u({strokeColor:a,markerType:r},e);"start"===n?l.$activeMarkerStartUrl=`url(#${c}${t})`:l.$activeMarkerEndUrl=`url(#${c}${t})`}const s=null===(y=l.overrides)||void 0===y||null===(y=y.activeRelated)||void 0===y?void 0:y.strokeColor;if(s&&s!==l.strokeColor){const t=u({strokeColor:s,markerType:r},e);"start"===n?l.$activeRelatedMarkerStartUrl=`url(#${c}${t})`:l.$activeRelatedMarkerEndUrl=`url(#${c}${t})`}}h.set(o,l)}return{lineConfMap:h,lineConnectorConf:o,markers:e}}),[t,n,f,c])}function s(e,t){var n;if(null!=e&&null!==(n=e.label)&&void 0!==n&&n.useBrick){const{label:{useBrick:n,...o},...i}=e,l=r.__secret_internals.legacyDoTransform({edge:t},{...i,label:o});return{...l,label:{...l.label,useBrick:n}}}return r.__secret_internals.legacyDoTransform({edge:t},e)}function d(e){let t=[];return e.markers?t=e.markers:(e.showStartArrow&&t.push({type:"arrow",placement:"start"}),e.showEndArrow&&t.push({type:"arrow",placement:"end"})),t}function u(e,t){let n=(0,i.findIndex)(t,e);return-1===n&&(n=t.push(e)-1),n}function v(){return{type:"straight",dashed:!1,strokeColor:a.mF,strokeWidth:a.VO,interactStrokeWidth:a.Ie,showStartArrow:a.XV,showEndArrow:a.Ub,animate:{useAnimate:!1,duration:a.Be}}}},8197:(e,t,n)=>{n.d(t,{H:()=>l});var o=n(8769),r=n(531),i=n(3033);function l(e){let{cells:t,layout:n,centered:l}=e;return(0,o.useMemo)((()=>l&&t.every((e=>!(0,r.N)(e)||e[i.CV]&&("force"!==n&&"dagre"!==n||e[i.xc])))),[t,l,n])}},8091:(e,t,n)=>{n.d(t,{f:()=>v});var o,r,i,l=n(8769),a=n(7566),c=n(9047),s=n(3033);const d=/mac/i.test(null!==(o=null!==(r=null===(i=navigator.userAgentData)||void 0===i?void 0:i.platform)&&void 0!==r?r:navigator.platform)&&void 0!==o?o:navigator.userAgent);function u(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey&&d?10:1)}function v(e){let{rootRef:t,zoomable:n,scrollable:o,pannable:r,draggable:i,ctrlDraggable:d,scaleRange:v,onSwitchActiveTarget:f}=e;const[h,m]=(0,l.useState)(!1),[g,p]=(0,l.useState)({k:1,x:0,y:0}),y=(0,l.useMemo)((()=>null!=v?v:[s.sS,s.Yt]),[v]),w=(0,l.useMemo)((()=>(0,c.s_)().wheelDelta(u)),[]);return(0,l.useEffect)((()=>{let e=!1;w.scaleExtent(n?y:[1,1]).on("start",(()=>{e=!1,m(!0)})).on("zoom",(t=>{e=!0,p(t.transform)})).on("end",(()=>{m(!1),e||null==f||f(null)})).filter((e=>("wheel"===e.type||(d?i||e.ctrlKey:!e.ctrlKey))&&!e.button))}),[f,y,n,w,d,i]),(0,l.useEffect)((()=>{if(d){const e=e=>{e.ctrlKey&&e.preventDefault()};return document.addEventListener("contextmenu",e,!0),()=>{document.removeEventListener("contextmenu",e,!0)}}}),[d]),(0,l.useEffect)((()=>{const e=t.current;if(!e)return;const l=(0,a.A)(e),c=()=>{l.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(n||o||r)return(n||o)&&l.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),o&&(e.preventDefault(),w.translateBy(l,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),l.call(w).on("wheel",(e=>{e.preventDefault()})).on("dblclick.zoom",null),(i||d)&&r||l.on("mousedown.zoom",null),r||l.on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),c;c()}),[d,i,r,t,o,n,w]),{grabbing:h,transform:g,zoomer:w,scaleRange:y}}},6237:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(6758),r=n.n(o),i=n(935),l=n.n(i)()(r());l.push([e.id,'.zoom-bar{position:absolute;bottom:20px;right:20px;width:40px;scale:0.8}.zoom-slider,\n.center-button{width:100%;display:flex;align-items:center;border:1px solid var(--antd-background-color-base);border-radius:var(--larger-border-radius);box-shadow:var(--connected-overlay-shadow);background-color:var(--color-fill-bg-container-4)}.zoom-slider{height:140px;padding:8px 0;flex-direction:column}[role="button"]{cursor:pointer}.center-button{justify-content:center;margin-bottom:8px;height:40px}.center-button:hover{border-color:var(--antd-btn-default-hover-border-color)}.center-button path{fill:var(--antd-link-hover-color)}.center-button:hover path{fill:var(--palette-blue-7)}.zoom-button{font-size:16px;line-height:0}.zoom-button svg{width:1em;height:1em;fill:var(--antd-link-hover-color)}.zoom-slider .ant-slider-vertical{padding-left:5px;padding-right:5px}.zoom-slider .ant-slider-vertical .ant-slider-rail{width:2px}.zoom-slider .ant-slider-vertical .ant-slider-handle{width:6px;height:6px;left:3px}.zoom-slider .ant-slider .ant-slider-handle:hover::before,\n.zoom-slider .ant-slider .ant-slider-handle:focus::before,\n.zoom-slider .ant-slider .ant-slider-handle::before{width:10px;height:10px;left:-2px}.zoom-slider .ant-slider .ant-slider-handle:hover::after,\n.zoom-slider .ant-slider .ant-slider-handle:focus::after,\n.zoom-slider .ant-slider .ant-slider-handle::after{width:6px;height:6px;top:0;left:0}',""]);const a=l.toString()},3012:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(6758),r=n.n(o),i=n(935),l=n.n(i)()(r());l.push([e.id,"*{box-sizing:border-box}:host{display:block;position:relative;overflow:hidden;--animation-dasharray:48;--stroke-dashedoffset:96;--stroke-dottedoffset:24;--dasharray:4;--dotted:1}:host,\n.root{width:100%;height:100%}:host([hidden]){display:none}.root{opacity:0}.root.ready{opacity:1}.root:focus{outline:none}@keyframes solidAnimation{to{stroke-dashoffset:0}}@keyframes dashedAnimation{0%{stroke-dashoffset:var(--stroke-dashedoffset)}to{stroke-dashoffset:0}}@keyframes dottedAnimation{0%{stroke-dashoffset:var(--stroke-dottedoffset)}to{stroke-dashoffset:0}}.solid-animation{stroke-dasharray:var(--solid-length);stroke-dashoffset:var(--solid-length);animation:solidAnimation var(--time) linear infinite}.dashed-animation{animation:dashedAnimation var(--time) linear infinite}.dotted-animation{animation:dottedAnimation var(--time) linear infinite}.decorator-area .area,\n.decorator-container .container{fill:rgba(119,141,195,0.1);stroke:none;stroke-width:0}.node,\n.decorator-text{overflow:visible}.cell.active .decorator-area .area,\n.cell.active .decorator-container .container,\n.cell:not(.read-only) .decorator-container .container:hover,\n.allowEdgeToArea .decorator-area .area:hover,\n.cell.active .line-active-bg{stroke:var(--palette-blue-5);stroke-dasharray:var(--dasharray);stroke-width:1}.container-active .decorator-container .container{stroke:var(--palette-blue-5);stroke-width:1}.cell:not(.read-only){-webkit-user-select:none;user-select:none}.resize-handle{cursor:nwse-resize;opacity:0}.resize-handle rect{fill:transparent;stroke:none}.resize-handle path{fill:none;stroke:var(--palette-gray-5);stroke-width:1.5}.cell.active .decorator-area .resize-handle,\n.decorator-area:hover .resize-handle,\n.decorator-container:hover .resize-handle{opacity:1}.connect-line{pointer-events:none}.connect-line:not(.connecting){display:none}.editing-line{pointer-events:none;stroke-dasharray:var(--dasharray);stroke-width:1}.editing-line:not(.editing){display:none}.line.dashed{stroke-dasharray:var(--dasharray)}.line.dotted{stroke-dasharray:var(--dotted)}.cell.active .decorator-text .text-container{outline:1px dashed var(--palette-blue-5)}.decorator-text .text-container{width:max-content;padding:0.5em}.decorator-text .text:focus{outline:none}.cell.faded{opacity:0.3}.cell.container-active{opacity:1}.cell .node{pointer-events:none}.cell .node > *{position:fixed;pointer-events:auto}.degraded{pointer-events:bounding-box}.degraded circle{fill:rgb(119,141,195)}.degraded text{text-anchor:middle;fill:var(--antd-text-color)}.cell.active .degraded circle,\n.cell.active .degraded text,\n.degraded:hover circle,\n.degraded:hover text{fill:var(--color-brand)}.decorator-container{--defaultSize:24px}.decorator-container .text-container{display:flex;align-items:center;justify-content:center;padding:0.5em;text-align:center;font-size:16px;background-color:rgba(119,141,195,0.6);overflow:hidden}.decorator-container .horizontal{height:max-content;width:100%}.decorator-container .horizontal .text{min-height:var(--defaultSize)}.decorator-container .vertical{width:max-content;height:100%;writing-mode:vertical-lr;-webkit-text-orientation:upright;text-orientation:upright;letter-spacing:4px}.decorator-container .vertical .text{min-width:var(--defaultSize)}.line-label-container{overflow:visible;opacity:0}.line-label-container.ready{opacity:1}.line-label{position:absolute;display:block;transform:translate(-50%,-50%);white-space:pre-line;width:max-content;text-align:center}.line-label.text{font-size:11px;color:var(--color-secondary-text);font-weight:400;line-height:1.63636364}.motion:not(.visible){opacity:0}",""]);const a=l.toString()}}]);
2
- //# sourceMappingURL=8552.1ed604a7.js.map