khoj 2.0.0b16.dev0__py3-none-any.whl → 2.0.0b17.dev0__py3-none-any.whl
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.
- khoj/interface/compiled/404/index.html +2 -2
- khoj/interface/compiled/_next/static/chunks/02b2f66c-c89cf69943479389.js +53 -0
- khoj/interface/compiled/_next/static/chunks/1423.7b1e8bf760d28078.js +1 -0
- khoj/interface/compiled/_next/static/chunks/1585.3de407cd92842aed.js +55 -0
- khoj/interface/compiled/_next/static/chunks/1822.0cc2f58edae71bbb.js +56 -0
- khoj/interface/compiled/_next/static/chunks/1915-6e773cccaf87b915.js +1 -0
- khoj/interface/compiled/_next/static/chunks/{2117-080746c8e170c81a.js → 2117-7e4bce55446b5cd3.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/2327-115eb57f8f41544b.js +1 -0
- khoj/interface/compiled/_next/static/chunks/2526.8ac62b527c9ab703.js +43 -0
- khoj/interface/compiled/_next/static/chunks/2626.2125083a1ff3b80a.js +29 -0
- khoj/interface/compiled/_next/static/chunks/2684-2abc5091f765c441.js +20 -0
- khoj/interface/compiled/_next/static/chunks/273.c2bdf48df1dfc5ef.js +93 -0
- khoj/interface/compiled/_next/static/chunks/3.87fb50c162c65241.js +59 -0
- khoj/interface/compiled/_next/static/chunks/3192.d7a2786f846fe872.js +148 -0
- khoj/interface/compiled/_next/static/chunks/{3260-82d2521fab032ff1.js → 3260-babf79aa1083e03a.js} +18 -63
- khoj/interface/compiled/_next/static/chunks/3574.7a94c27e6a496a56.js +63 -0
- khoj/interface/compiled/_next/static/chunks/{3595-ac8e81e04ecb89cb.js → 3595-a015df928dccf883.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/3599.53651e350d023038.js +131 -0
- khoj/interface/compiled/_next/static/chunks/3852.822389f445c9b427.js +1 -0
- khoj/interface/compiled/_next/static/chunks/3933.a3b09abdf19b7458.js +1 -0
- khoj/interface/compiled/_next/static/chunks/4323.3b06bc313e4946af.js +215 -0
- khoj/interface/compiled/_next/static/chunks/4447-df6e3ef2d9adb809.js +1 -0
- khoj/interface/compiled/_next/static/chunks/453.f8a05823b9d15c24.js +1 -0
- khoj/interface/compiled/_next/static/chunks/490.91b737ff35d6fbc1.js +1 -0
- khoj/interface/compiled/_next/static/chunks/5097.1129f707069b361f.js +1 -0
- khoj/interface/compiled/_next/static/chunks/5111.c8d55e95447d7609.js +5 -0
- khoj/interface/compiled/_next/static/chunks/5689.a323537972b343b4.js +1 -0
- khoj/interface/compiled/_next/static/chunks/572.3357cc94e3adfcba.js +262 -0
- khoj/interface/compiled/_next/static/chunks/62.53fa01be73dcb16e.js +62 -0
- khoj/interface/compiled/_next/static/chunks/7079-7849663838636d48.js +1 -0
- khoj/interface/compiled/_next/static/chunks/7200-9f1d584275259536.js +1 -0
- khoj/interface/compiled/_next/static/chunks/7626-551c62355b7b1b4a.js +1 -0
- khoj/interface/compiled/_next/static/chunks/7811.c32bdc47a9144a63.js +1 -0
- khoj/interface/compiled/_next/static/chunks/7986.4901bc54aadf59c3.js +1 -0
- khoj/interface/compiled/_next/static/chunks/8288.4883743fa40672e2.js +24 -0
- khoj/interface/compiled/_next/static/chunks/8382.335eadce6afb5d4a.js +1 -0
- khoj/interface/compiled/_next/static/chunks/8501.771e24303bd21479.js +24 -0
- khoj/interface/compiled/_next/static/chunks/8623.525c35f02a86ca25.js +174 -0
- khoj/interface/compiled/_next/static/chunks/8927.ba4a68dd6424b88c.js +166 -0
- khoj/interface/compiled/_next/static/chunks/{8072-e1440cb482a0940e.js → 9002-bd3304de324360eb.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/9316-cfa655d664a6a959.js +1 -0
- khoj/interface/compiled/_next/static/chunks/9498.df45618893b18531.js +4 -0
- khoj/interface/compiled/_next/static/chunks/959.aa25ba53e976d0c1.js +36 -0
- khoj/interface/compiled/_next/static/chunks/9808-3cd28f0c0da0fd48.js +1 -0
- khoj/interface/compiled/_next/static/chunks/a764ac56.e65af2f7b1ecdaaa.js +136 -0
- khoj/interface/compiled/_next/static/chunks/app/agents/{page-e291b49977f43880.js → page-aa86693ebe6a688f.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/{layout-8639ff99d6c2fec6.js → layout-554744a3bb43b2f1.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/{page-1047097af99d31c7.js → page-224de8b2f24cd5a8.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/{layout-2ff3e18a6feae92a.js → layout-63ef3be8435d1c99.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/{page-ac7ed0a1aff1b145.js → page-60083b8e6276e6ad.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/{layout-c2de87a25fededbb.js → layout-a7ad6fe9355ea57a.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/{page-1567cac7b79a7c59.js → page-3699a0ef95d4a5ce.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/search/{page-3639e50ec3e9acfd.js → page-6ff3715005bdbb48.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/{layout-f88cedfe9ad4df7c.js → layout-30fa7eff8e7e01d5.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/{page-6081362437c82470.js → page-464010b2b4389d0d.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-819c6536c15e3d31.js → page-5b98a0ed1e0835bf.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/{main-fc8e0fefa2ef3d8c.js → main-0daa33fca37d54d4.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/webpack-0da03e0f0f1cfc6e.js +1 -0
- khoj/interface/compiled/_next/static/css/2945c4a857922f3b.css +1 -0
- khoj/interface/compiled/_next/static/css/{7889a30fe9c83846.css → d8ec94d00b6bf837.css} +1 -1
- khoj/interface/compiled/_next/static/media/140e5638e63f96c7-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/1755441e3a2fa970-s.p.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/4b23ab4cc10b07bc-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/b8c807255d58fc43-s.woff2 +0 -0
- khoj/interface/compiled/agents/index.html +2 -2
- khoj/interface/compiled/agents/index.txt +3 -3
- khoj/interface/compiled/automations/index.html +2 -2
- khoj/interface/compiled/automations/index.txt +4 -4
- khoj/interface/compiled/chat/index.html +2 -2
- khoj/interface/compiled/chat/index.txt +4 -4
- khoj/interface/compiled/index.html +2 -2
- khoj/interface/compiled/index.txt +3 -3
- khoj/interface/compiled/search/index.html +2 -2
- khoj/interface/compiled/search/index.txt +3 -3
- khoj/interface/compiled/settings/index.html +2 -2
- khoj/interface/compiled/settings/index.txt +5 -5
- khoj/interface/compiled/share/chat/index.html +2 -2
- khoj/interface/compiled/share/chat/index.txt +3 -3
- khoj/processor/conversation/openai/gpt.py +3 -5
- khoj/processor/conversation/openai/utils.py +12 -9
- khoj/routers/research.py +1 -1
- khoj/utils/helpers.py +2 -2
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b17.dev0.dist-info}/METADATA +4 -4
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b17.dev0.dist-info}/RECORD +90 -88
- khoj/interface/compiled/_next/static/chunks/1225.ecac11e7421504c4.js +0 -36
- khoj/interface/compiled/_next/static/chunks/1320.ae930ad00affe685.js +0 -5
- khoj/interface/compiled/_next/static/chunks/1327-e254819a9172cfa7.js +0 -20
- khoj/interface/compiled/_next/static/chunks/1915-5c6508f6ebb62a30.js +0 -1
- khoj/interface/compiled/_next/static/chunks/1940.d082758bd04e08ae.js +0 -4
- khoj/interface/compiled/_next/static/chunks/2327-438aaec1657c5ada.js +0 -1
- khoj/interface/compiled/_next/static/chunks/2475.57a0d0fd93d07af0.js +0 -93
- khoj/interface/compiled/_next/static/chunks/2481.5ce6524ba0a73f90.js +0 -55
- khoj/interface/compiled/_next/static/chunks/2939-4af3fd24b8ffc9ad.js +0 -1
- khoj/interface/compiled/_next/static/chunks/297.4c4c823ff6e3255b.js +0 -174
- khoj/interface/compiled/_next/static/chunks/3973.dc54a39586ab48be.js +0 -1
- khoj/interface/compiled/_next/static/chunks/4241.c1cd170f7f37ac59.js +0 -24
- khoj/interface/compiled/_next/static/chunks/4447-cd95608f8e93e711.js +0 -1
- khoj/interface/compiled/_next/static/chunks/4505.f09454a346269c3f.js +0 -117
- khoj/interface/compiled/_next/static/chunks/549.2bd27f59a91a9668.js +0 -148
- khoj/interface/compiled/_next/static/chunks/584.d7ce3505f169b706.js +0 -1
- khoj/interface/compiled/_next/static/chunks/6240.34f7c1fa692edd61.js +0 -24
- khoj/interface/compiled/_next/static/chunks/6d3fe5a5-f9f3c16e0bc0cdf9.js +0 -10
- khoj/interface/compiled/_next/static/chunks/7200-93ab0072359b8028.js +0 -1
- khoj/interface/compiled/_next/static/chunks/7553.f5ad54b1f6e92c49.js +0 -131
- khoj/interface/compiled/_next/static/chunks/7626-1b630f1654172341.js +0 -1
- khoj/interface/compiled/_next/static/chunks/764.dadd316e8e16d191.js +0 -63
- khoj/interface/compiled/_next/static/chunks/78.08169ab541abab4f.js +0 -43
- khoj/interface/compiled/_next/static/chunks/784.e03acf460df213d1.js +0 -1
- khoj/interface/compiled/_next/static/chunks/8086.8d39887215807fcd.js +0 -1
- khoj/interface/compiled/_next/static/chunks/8168.f074ab8c7c16d82d.js +0 -59
- khoj/interface/compiled/_next/static/chunks/8223.1705878fa7a09292.js +0 -1
- khoj/interface/compiled/_next/static/chunks/8483.94f6c9e2bee86f50.js +0 -215
- khoj/interface/compiled/_next/static/chunks/8810.fc0e479de78c7c61.js +0 -29
- khoj/interface/compiled/_next/static/chunks/8909.14ac3f43d0070cf1.js +0 -88
- khoj/interface/compiled/_next/static/chunks/9139-8ac4d9feb10f8869.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9167.098534184f03fe92.js +0 -56
- khoj/interface/compiled/_next/static/chunks/9537.e934ce37bf314509.js +0 -166
- khoj/interface/compiled/_next/static/chunks/9574.3fe8e26e95bf1c34.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9643.b34248df52ffc77c.js +0 -262
- khoj/interface/compiled/_next/static/chunks/9747.2fd9065b1435abb1.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9808-bd5d7361ad026094.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9922.98f2b2a9959b4ebe.js +0 -1
- khoj/interface/compiled/_next/static/chunks/webpack-820bd66958a5e279.js +0 -1
- khoj/interface/compiled/_next/static/css/821d0d60b0b6871d.css +0 -1
- khoj/interface/compiled/_next/static/media/2aa11a72f7f24b58-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/383a65b63658737d-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/85fe2766c5e6072a-s.woff2 +0 -0
- khoj/interface/compiled/_next/static/media/c4250770ab8708b6-s.p.woff2 +0 -0
- /khoj/interface/compiled/_next/static/chunks/{8667-50b03a89e82e0ba7.js → 8667-4b7790573b08c50d.js} +0 -0
- /khoj/interface/compiled/_next/static/{-vo0F0aVQi0xvwp3-9CX- → y0u6T-pNyjAaf0nVlKFLV}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{-vo0F0aVQi0xvwp3-9CX- → y0u6T-pNyjAaf0nVlKFLV}/_ssgManifest.js +0 -0
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b17.dev0.dist-info}/WHEEL +0 -0
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b17.dev0.dist-info}/entry_points.txt +0 -0
- {khoj-2.0.0b16.dev0.dist-info → khoj-2.0.0b17.dev0.dist-info}/licenses/LICENSE +0 -0
@@ -1,8 +1,8 @@
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="
|
1
|
+
<!DOCTYPE html><html lang="en" class="__variable_a95ab5 __variable_faafad"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/1755441e3a2fa970-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/1d8a05b60287ae6c-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/40381518f67e6cb9-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/77c207b095007c34-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/82ef96de0e8f4d8c-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/a6ecd16fa044d500-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/d8ec94d00b6bf837.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/5c7a72bad47e50b3.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/5b28ced915454767.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-0da03e0f0f1cfc6e.js"/><script src="/_next/static/chunks/fd9d1056-aa94101ec5388dba.js" async=""></script><script src="/_next/static/chunks/2117-7e4bce55446b5cd3.js" async=""></script><script src="/_next/static/chunks/main-app-de1f09df97a3cfc7.js" async=""></script><script src="/_next/static/chunks/7200-9f1d584275259536.js" async=""></script><script src="/_next/static/chunks/app/layout-a7ad6fe9355ea57a.js" async=""></script><meta name="robots" content="noindex"/><meta http-equiv="Content-Security-Policy" content="default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com https://accounts.google.com; img-src 'self' data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; frame-src 'self' https://accounts.google.com https://app.chatwoot.com; child-src 'self' https://app.chatwoot.com; object-src 'none';"/><title>404: This page could not be found.</title><title>Khoj AI - Ask Anything</title><meta name="description" content="Khoj is a personal research assistant. It helps you understand better and create faster."/><link rel="manifest" href="/static/khoj.webmanifest" crossorigin="use-credentials"/><meta name="keywords" content="research assistant, productivity, AI, Khoj, open source, model agnostic, research, productivity tool, personal assistant, personal research assistant, personal productivity assistant"/><meta property="og:title" content="Khoj AI"/><meta property="og:description" content="Khoj is a personal research assistant. It helps you understand better and create faster."/><meta property="og:url" content="https://app.khoj.dev/"/><meta property="og:site_name" content="Khoj AI"/><meta property="og:image" content="https://assets.khoj.dev/khoj_hero.png"/><meta property="og:image:width" content="940"/><meta property="og:image:height" content="525"/><meta property="og:image" content="https://assets.khoj.dev/khoj_lantern_256x256.png"/><meta property="og:image:width" content="256"/><meta property="og:image:height" content="256"/><meta property="og:image" content="https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Khoj AI"/><meta name="twitter:description" content="Khoj is a personal research assistant. It helps you understand better and create faster."/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_hero.png"/><meta name="twitter:image:width" content="940"/><meta name="twitter:image:height" content="525"/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_lantern_256x256.png"/><meta name="twitter:image:width" content="256"/><meta name="twitter:image:height" content="256"/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png"/><meta name="twitter:image:width" content="1200"/><meta name="twitter:image:height" content="630"/><link rel="icon" href="/static/assets/icons/khoj_lantern.ico"/><link rel="apple-touch-icon" href="/static/assets/icons/khoj_lantern_256x256.png"/><meta name="next-size-adjust"/><script>
|
2
2
|
try {
|
3
3
|
if (localStorage.getItem('theme') === 'dark' ||
|
4
4
|
(!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
5
5
|
document.documentElement.classList.add('dark');
|
6
6
|
}
|
7
7
|
} catch (e) {}
|
8
|
-
</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-820bd66958a5e279.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/1d8a05b60287ae6c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/40381518f67e6cb9-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/77c207b095007c34-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/82ef96de0e8f4d8c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/media/a6ecd16fa044d500-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n6:HL[\"/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n7:HL[\"/_next/static/media/c4250770ab8708b6-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n8:HL[\"/_next/static/css/7889a30fe9c83846.css\",\"style\"]\n9:HL[\"/_next/static/css/5c7a72bad47e50b3.css\",\"style\"]\na:HL[\"/_next/static/css/5b28ced915454767.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"b:I[12846,[],\"\"]\nd:I[4707,[],\"\"]\ne:I[36423,[],\"\"]\nf:I[85147,[\"7200\",\"static/chunks/7200-93ab0072359b8028.js\",\"3185\",\"static/chunks/app/layout-c2de87a25fededbb.js\"],\"ThemeProvider\"]\n15:I[61060,[],\"\"]\n10:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n11:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n12:{\"display\":\"inline-block\"}\n13:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n16:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$Lb\",null,{\"buildId\":\"-vo0F0aVQi0xvwp3-9CX-\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$Lc\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Le\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/7889a30fe9c83846.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/5c7a72bad47e50b3.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/5b28ced915454767.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_f36179 __variable_386ca1\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n try {\\n if (localStorage.getItem('theme') === 'dark' ||\\n (!localStorage.getItem('theme') \u0026\u0026 window.matchMedia('(prefers-color-scheme: dark)').matches)) {\\n document.documentElement.classList.add('dark');\\n }\\n } catch (e) {}\\n \"}}]}],[\"$\",\"meta\",null,{\"httpEquiv\":\"Content-Security-Policy\",\"content\":\"default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com https://accounts.google.com; img-src 'self' data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; frame-src 'self' https://accounts.google.com https://app.chatwoot.com; child-src 'self' https://app.chatwoot.com; object-src 'none';\"}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Le\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$10\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$11\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$12\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$13\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L14\"],\"globalErrorComponent\":\"$15\",\"missingSlots\":\"$W16\"}]\n"])</script><script>self.__next_f.push([1,"14:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Khoj AI - Ask Anything\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Khoj is a personal research assistant. It helps you understand better and create faster.\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/static/khoj.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"name\":\"keywords\",\"content\":\"research assistant, productivity, AI, Khoj, open source, model agnostic, research, productivity tool, personal assistant, personal research assistant, personal productivity assistant\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:title\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:description\",\"content\":\"Khoj is a personal research assistant. It helps you understand better and create faster.\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:url\",\"content\":\"https://app.khoj.dev/\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:site_name\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_hero.png\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:image:width\",\"content\":\"940\"}],[\"$\",\"meta\",\"12\",{\"property\":\"og:image:height\",\"content\":\"525\"}],[\"$\",\"meta\",\"13\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"14\",{\"property\":\"og:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"15\",{\"property\":\"og:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"16\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"17\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"18\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"19\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"20\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"21\",{\"name\":\"twitter:title\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"22\",{\"name\":\"twitter:description\",\"content\":\"Khoj is a personal research assistant. It helps you understand better and create faster.\"}],[\"$\",\"meta\",\"23\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_hero.png\"}],[\"$\",\"meta\",\"24\",{\"name\":\"twitter:image:width\",\"content\":\"940\"}],[\"$\",\"meta\",\"25\",{\"name\":\"twitter:image:height\",\"content\":\"525\"}],[\"$\",\"meta\",\"26\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"27\",{\"name\":\"twitter:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"28\",{\"name\":\"twitter:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"29\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"30\",{\"name\":\"twitter:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"31\",{\"name\":\"twitter:image:height\",\"content\":\"630\"}],[\"$\",\"link\",\"32\",{\"rel\":\"icon\",\"href\":\"/static/assets/icons/khoj_lantern.ico\"}],[\"$\",\"link\",\"33\",{\"rel\":\"apple-touch-icon\",\"href\":\"/static/assets/icons/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"34\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"c:null\n"])</script></body></html>
|
8
|
+
</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-0da03e0f0f1cfc6e.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/1755441e3a2fa970-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/1d8a05b60287ae6c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/40381518f67e6cb9-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/77c207b095007c34-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/media/82ef96de0e8f4d8c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n6:HL[\"/_next/static/media/a6ecd16fa044d500-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n7:HL[\"/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n8:HL[\"/_next/static/css/d8ec94d00b6bf837.css\",\"style\"]\n9:HL[\"/_next/static/css/5c7a72bad47e50b3.css\",\"style\"]\na:HL[\"/_next/static/css/5b28ced915454767.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"b:I[12846,[],\"\"]\nd:I[4707,[],\"\"]\ne:I[36423,[],\"\"]\nf:I[85147,[\"7200\",\"static/chunks/7200-9f1d584275259536.js\",\"3185\",\"static/chunks/app/layout-a7ad6fe9355ea57a.js\"],\"ThemeProvider\"]\n15:I[61060,[],\"\"]\n10:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n11:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n12:{\"display\":\"inline-block\"}\n13:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n16:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$Lb\",null,{\"buildId\":\"y0u6T-pNyjAaf0nVlKFLV\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$Lc\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Le\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/d8ec94d00b6bf837.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/5c7a72bad47e50b3.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/5b28ced915454767.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_a95ab5 __variable_faafad\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n try {\\n if (localStorage.getItem('theme') === 'dark' ||\\n (!localStorage.getItem('theme') \u0026\u0026 window.matchMedia('(prefers-color-scheme: dark)').matches)) {\\n document.documentElement.classList.add('dark');\\n }\\n } catch (e) {}\\n \"}}]}],[\"$\",\"meta\",null,{\"httpEquiv\":\"Content-Security-Policy\",\"content\":\"default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com https://accounts.google.com; img-src 'self' data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; frame-src 'self' https://accounts.google.com https://app.chatwoot.com; child-src 'self' https://app.chatwoot.com; object-src 'none';\"}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Le\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$10\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$11\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$12\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$13\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L14\"],\"globalErrorComponent\":\"$15\",\"missingSlots\":\"$W16\"}]\n"])</script><script>self.__next_f.push([1,"14:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Khoj AI - Ask Anything\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Khoj is a personal research assistant. It helps you understand better and create faster.\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/static/khoj.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"name\":\"keywords\",\"content\":\"research assistant, productivity, AI, Khoj, open source, model agnostic, research, productivity tool, personal assistant, personal research assistant, personal productivity assistant\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:title\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:description\",\"content\":\"Khoj is a personal research assistant. It helps you understand better and create faster.\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:url\",\"content\":\"https://app.khoj.dev/\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:site_name\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_hero.png\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:image:width\",\"content\":\"940\"}],[\"$\",\"meta\",\"12\",{\"property\":\"og:image:height\",\"content\":\"525\"}],[\"$\",\"meta\",\"13\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"14\",{\"property\":\"og:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"15\",{\"property\":\"og:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"16\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"17\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"18\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"19\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"20\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"21\",{\"name\":\"twitter:title\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"22\",{\"name\":\"twitter:description\",\"content\":\"Khoj is a personal research assistant. It helps you understand better and create faster.\"}],[\"$\",\"meta\",\"23\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_hero.png\"}],[\"$\",\"meta\",\"24\",{\"name\":\"twitter:image:width\",\"content\":\"940\"}],[\"$\",\"meta\",\"25\",{\"name\":\"twitter:image:height\",\"content\":\"525\"}],[\"$\",\"meta\",\"26\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"27\",{\"name\":\"twitter:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"28\",{\"name\":\"twitter:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"29\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"30\",{\"name\":\"twitter:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"31\",{\"name\":\"twitter:image:height\",\"content\":\"630\"}],[\"$\",\"link\",\"32\",{\"rel\":\"icon\",\"href\":\"/static/assets/icons/khoj_lantern.ico\"}],[\"$\",\"link\",\"33\",{\"rel\":\"apple-touch-icon\",\"href\":\"/static/assets/icons/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"34\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"c:null\n"])</script></body></html>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1627],{21216:function(t,e,a){a.d(e,{C1:function(){return c},Lf:function(){return ed},XO:function(){return $},Yn:function(){return ec},ZH:function(){return N},aH:function(){return ey},dW:function(){return eh},gU:function(){return eg},jr:function(){return y},us:function(){return B}});var l=a(10507),r=a(6072),i=a(66691),n=a(94705),s=a(55166),h=a(31954),o=a(84370),d=a(90705),c=(0,h.eW)(async(t,e,a)=>{let l,r;let d=e.useHtmlLabels||(0,s.ku)(s.nV()?.htmlLabels);l=a||"node default";let c=t.insert("g").attr("class",l).attr("id",e.domId||e.id),g=c.insert("g").attr("class","label").attr("style",(0,n.R7)(e.labelStyle));r=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let y=await (0,i.rw)(g,(0,s.oO)((0,n.SH)(r),(0,s.nV)()),{useHtmlLabels:d,width:e.width||s.nV().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),f=y.getBBox(),p=(e?.padding??0)/2;if(d){let t=y.children[0],e=(0,o.Ys)(y),a=t.getElementsByTagName("img");if(a){let t=""===r.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=(0,s.nV)().fontSize?(0,s.nV)().fontSize:window.getComputedStyle(document.body).fontSize,[a=s.vZ.fontSize]=(0,n.VG)(t),l=5*a+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";a(e)}(0,h.eW)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}return d?g.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):g.attr("transform","translate(0, "+-f.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:c,bbox:f,halfPadding:p,label:g}},"labelHelper"),g=(0,h.eW)(async(t,e,a)=>{let l=a.useHtmlLabels||(0,s.ku)(s.nV()?.flowchart?.htmlLabels),r=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,i.rw)(r,(0,s.oO)((0,n.SH)(e),(0,s.nV)()),{useHtmlLabels:l,width:a.width||s.nV()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=h.getBBox(),c=a.padding/2;if((0,s.ku)(s.nV()?.flowchart?.htmlLabels)){let t=h.children[0],e=(0,o.Ys)(h);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return l?r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):r.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),r.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:r}},"insertLabel"),y=(0,h.eW)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),f=(0,h.eW)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function p(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function u(t,e,a,l,r,i){let n=[],s=a-t,h=2*Math.PI/(s/i),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+r*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function m(t,e,a,l,r,i){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}(0,h.eW)(p,"createPathFromPoints"),(0,h.eW)(u,"generateFullSineWavePoints"),(0,h.eW)(m,"generateCirclePoints");var w=(0,h.eW)((t,e)=>{var a,l,r=t.x,i=t.y,n=e.x-r,s=e.y-i,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(n)*o?(s<0&&(o=-o),a=0===s?0:o*n/s,l=o):(n<0&&(h=-h),a=h,l=0===n?0:h*s/n),{x:r+a,y:i+l}},"intersectRect");function x(t,e){e&&t.attr("style",e)}async function b(t){let e=(0,o.Ys)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=e.append("xhtml:div"),l=(0,s.nV)(),r=t.label;t.label&&(0,s.l0)(t.label)&&(r=await (0,s.ur)(t.label.replace(s.SY.lineBreakRegex,"\n"),l));let i='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+r+"</span>";return a.html((0,s.oO)(i,l)),x(a,t.labelStyle),a.style("display","inline-block"),a.style("padding-right","1px"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,h.eW)(x,"applyStyle"),(0,h.eW)(b,"addHtmlLabel");var $=(0,h.eW)(async(t,e,a,l)=>{let r=t||"";if("object"==typeof r&&(r=r[0]),(0,s.ku)((0,s.nV)().flowchart.htmlLabels)){r=r.replace(/\\n|\n/g,"<br />"),h.cM.info("vertexText"+r);let t={isNode:l,label:(0,n.SH)(r).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e?e.replace("fill:","color:"):e};return await b(t)}{let t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));for(let e of"string"==typeof r?r.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(r)?r:[]){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),a?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=e.trim(),t.appendChild(l)}return t}},"createLabel"),k=(0,h.eW)((t,e,a,l,r)=>["M",t+r,e,"H",t+a-r,"A",r,r,0,0,1,t+a,e+r,"V",e+l-r,"A",r,r,0,0,1,t+a-r,e+l,"H",t+r,"A",r,r,0,0,1,t,e+l-r,"V",e+r,"A",r,r,0,0,1,t+r,e,"Z"].join(" "),"createRoundedRectPathD"),M=(0,h.eW)(async(t,e)=>{let a;h.cM.info("Creating subgraph rect for ",e.id,e);let n=(0,s.nV)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:x}=(0,r.UG)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s.ku)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.rw)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0}),D=S.getBBox();if((0,s.ku)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ys)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let W=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(W-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-W/2,B=e.y-v/2;if(h.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.Z.svg(b),l=(0,r._q)(e,{roughness:.7,fill:y,stroke:f,fillWeight:3,seed:g}),i=t.path(k(C,B,W,v,0),l);(a=b.insert(()=>(h.cM.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",x.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",B).attr("width",W).attr("height",v);let{subGraphTitleTopMargin:N}=(0,l.L)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+N})`),p){let t=M.select("span");t&&t.attr("style",p)}let A=a.node().getBBox();return e.offsetX=0,e.width=A.width,e.height=A.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return w(e,t)},{cluster:b,labelBBox:D}},"rect"),S=(0,h.eW)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.id),l=a.insert("rect",":first-child"),r=0*e.padding,i=r/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+r).attr("height",e.height+r).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return w(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),D=(0,h.eW)(async(t,e)=>{let a;let l=(0,s.nV)(),{themeVariables:r,handDrawnSeed:i}=l,{altBackground:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:g}=r,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),p=y.insert("g").attr("class","cluster-label"),u=y.append("rect"),m=p.node().appendChild(await $(e.label,e.labelStyle,void 0,!0)),x=m.getBBox();if((0,s.ku)(l.flowchart.htmlLabels)){let t=m.children[0],e=(0,o.Ys)(m);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}let b=0*e.padding,M=(e.width<=x.width+e.padding?x.width+e.padding:e.width)+b;e.width<=x.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+b,D=e.height+b-x.height-6,W=e.x-M/2,v=e.y-S/2;e.width=M;let C=e.y-e.height/2-b/2+x.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.Z.svg(y),r=e.rx||e.ry?l.path(k(W,v,M,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:i}):l.rectangle(W,v,M,S,{seed:i});a=y.insert(()=>r,":first-child");let s=l.rectangle(W,C,M,D,{fill:t?n:h,fillStyle:t?"hachure":"solid",stroke:g,seed:i});a=y.insert(()=>r,":first-child"),u=y.insert(()=>s)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",W).attr("y",v).attr("width",M).attr("height",S).attr("data-look",e.look),u.attr("class","inner").attr("x",W).attr("y",C).attr("width",M).attr("height",D);p.attr("transform",`translate(${e.x-x.width/2}, ${v+1-((0,s.ku)(l.flowchart.htmlLabels)?0:3)})`);let B=a.node().getBBox();return e.height=B.height,e.offsetX=0,e.offsetY=x.height-e.padding/2,e.labelBBox=x,e.intersect=function(t){return w(e,t)},{cluster:y,labelBBox:x}},"roundedWithTitle"),W=(0,h.eW)(async(t,e)=>{let a;h.cM.info("Creating subgraph rect for ",e.id,e);let n=(0,s.nV)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:x}=(0,r.UG)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s.ku)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.rw)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0,width:e.width}),D=S.getBBox();if((0,s.ku)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ys)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let W=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(W-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-W/2,B=e.y-v/2;if(h.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.Z.svg(b),l=(0,r._q)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),i=t.path(k(C,B,W,v,e.rx),l);(a=b.insert(()=>(h.cM.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",x.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",B).attr("width",W).attr("height",v);let{subGraphTitleTopMargin:N}=(0,l.L)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+N})`),p){let t=M.select("span");t&&t.attr("style",p)}let A=a.node().getBBox();return e.offsetX=0,e.width=A.width,e.height=A.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return w(e,t)},{cluster:b,labelBBox:D}},"kanbanSection"),v={rect:M,squareRect:M,roundedWithTitle:D,noteGroup:S,divider:(0,h.eW)((t,e)=>{let a;let{themeVariables:l,handDrawnSeed:r}=(0,s.nV)(),{nodeBorder:i}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),h=n.insert("g",":first-child"),o=0*e.padding,c=e.width+o;e.diff=-e.padding;let g=e.height+o,y=e.x-c/2,f=e.y-g/2;if(e.width=c,"handDrawn"===e.look){let t=d.Z.svg(n).rectangle(y,f,c,g,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:r});a=n.insert(()=>t,":first-child")}else(a=h.insert("rect",":first-child")).attr("class","divider").attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look);let p=a.node().getBBox();return e.height=p.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return w(e,t)},{cluster:n,labelBBox:{}}},"divider"),kanbanSection:W},C=new Map,B=(0,h.eW)(async(t,e)=>{let a=e.shape||"rect",l=await v[a](t,e);return C.set(e.id,l),l},"insertCluster"),N=(0,h.eW)(()=>{C=new Map},"clear");function A(t,e,a,l){var r=t.x,i=t.y,n=r-l.x,s=i-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<r&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<i&&(d=-d),{x:r+o,y:i+d}}function q(t,e,a){return A(t,e,e,a)}function R(t,e,a,l){{let r=e.y-t.y,i=t.x-e.x,n=e.x*t.y-t.x*e.y,s=r*a.x+i*a.y+n,h=r*l.x+i*l.y+n;if(0!==s&&0!==h&&_(s,h))return;let o=l.y-a.y,d=a.x-l.x,c=l.x*a.y-a.x*l.y,g=o*t.x+d*t.y+c,y=o*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&_(g,y))return;let f=r*d-o*i;if(0===f)return;let p=Math.abs(f/2),u=i*c-d*n;return{x:u<0?(u-p)/f:(u+p)/f,y:(u=o*n-r*c)<0?(u-p)/f:(u+p)/f}}}function _(t,e){return t*e>0}function L(t,e,a){let l=t.x,r=t.y,i=[],n=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let h=l-t.width/2-n,o=r-t.height/2-s;for(let l=0;l<e.length;l++){let r=e[l],n=e[l<e.length-1?l+1:0],s=R(t,a,{x:h+r.x,y:o+r.y},{x:h+n.x,y:o+n.y});s&&i.push(s)}return i.length?(i.length>1&&i.sort(function(t,e){let l=t.x-a.x,r=t.y-a.y,i=Math.sqrt(l*l+r*r),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return i<h?-1:i===h?0:1}),i[0]):t}(0,h.eW)(function(t,e){return t.intersect(e)},"intersectNode"),(0,h.eW)(A,"intersectEllipse"),(0,h.eW)(q,"intersectCircle"),(0,h.eW)(R,"intersectLine"),(0,h.eW)(_,"sameSign"),(0,h.eW)(L,"intersectPolygon");var P={circle:q,polygon:L,rect:w};function Z(t,e){let{labelStyles:a}=(0,r.UG)(e);e.labelStyle=a;let l=f(e),i=l;l||(i="anchor");let s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),{cssStyles:o}=e,c=d.Z.svg(s),g=(0,r._q)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let p=c.circle(0,0,2,g),u=s.insert(()=>p,":first-child");return u.attr("class","anchor").attr("style",(0,n.R7)(o)),y(e,u),e.intersect=function(t){return h.cM.info("Circle intersect",e,1,t),P.circle(e,1,t)},s}function U(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function G(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.width+e.padding+20,h=n.height+e.padding,o=h/2,g=o/(2.5+h/50),{cssStyles:u}=e,m=[{x:s/2,y:-h/2},{x:-s/2,y:-h/2},...U(-s/2,-h/2,-s/2,h/2,g,o,!1),{x:s/2,y:h/2},...U(s/2,h/2,s/2,-h/2,g,o,!0)],w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=p(m),$=w.path(b,x),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(${g/2}, 0)`),y(e,k),e.intersect=function(t){return P.polygon(e,m,t)},i}function I(t,e,a,l){return t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function T(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.height+e.padding,o=s.width+e.padding+12,g=-h,u=[{x:12,y:g},{x:o,y:g},{x:o,y:0},{x:0,y:0},{x:0,y:g+12},{x:12,y:g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(u),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${h/2})`),m&&a.attr("style",m)}else a=I(n,o,h,u);return i&&a.attr("style",i),y(e,a),e.intersect=function(t){return P.polygon(e,u,t)},n}function E(t,e){let{nodeStyles:a}=(0,r.UG)(e);e.label="";let l=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=d.Z.svg(l),o=(0,r._q)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let c=p(s),g=h.path(c,o),y=l.insert(()=>g,":first-child");return i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return P.polygon(e,s,t)},l}async function H(t,e,a){let l;let{labelStyles:i,nodeStyles:s}=(0,r.UG)(e);e.labelStyle=i;let{shapeSvg:o,bbox:g,halfPadding:p}=await c(t,e,f(e)),u=a?.padding??p,m=g.width/2+u,{cssStyles:w}=e;if("handDrawn"===e.look){let t=d.Z.svg(o),a=(0,r._q)(e,{}),i=t.circle(0,0,2*m,a);(l=o.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(w))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",m).attr("cx",0).attr("cy",0);return y(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return P.circle(t,a,e)},e.intersect=function(t){return h.cM.info("Circle intersect",e,m,t),P.circle(e,m,t)},o}function V(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,r={x:l/2*e,y:l/2*a},i={x:-(l/2)*e,y:l/2*a},n={x:-(l/2)*e,y:-(l/2)*a},s={x:l/2*e,y:-(l/2)*a};return`M ${i.x},${i.y} L ${s.x},${s.y}
|
2
|
+
M ${r.x},${r.y} L ${n.x},${n.y}`}function Y(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a,e.label="";let i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:s}=e,o=d.Z.svg(i),c=(0,r._q)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let g=o.circle(0,0,2*n,c),p=V(n),u=o.path(p,c),m=i.insert(()=>g,":first-child");return m.insert(()=>u),s&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),l&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",l),y(e,m),e.intersect=function(t){return h.cM.info("crossedCircle intersect",e,{radius:n,point:t}),P.circle(e,n,t)},i}function j(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}async function O(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...j(h/2,-o/2,g,30,-90,0),{x:-h/2-g,y:g},...j(h/2+2*g,-g,g,20,-180,-270),...j(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:-o/2},...j(h/2,o/2,g,20,0,90)],w=[{x:h/2,y:-o/2-g},{x:-h/2,y:-o/2-g},...j(h/2,-o/2,g,20,-90,0),{x:-h/2-g,y:-g},...j(h/2+.1*h,-g,g,20,-180,-270),...j(h/2+.1*h,g,g,20,-90,-180),{x:-h/2-g,y:o/2},...j(h/2,o/2,g,20,0,90),{x:-h/2,y:o/2+g},{x:h/2,y:o/2+g}],x=d.Z.svg(i),b=(0,r._q)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m).replace("Z",""),k=x.path($,b),M=p(w),S=x.path(M,{...b}),D=i.insert("g",":first-child");return D.insert(()=>S,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.attr("class","text"),u&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(${g}, 0)`),s.attr("transform",`translate(${-h/2+g-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return P.polygon(e,w,t)},i}function z(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:i,y:o})}return n}async function F(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...z(h/2,-o/2,g,20,-90,0),{x:h/2+g,y:-g},...z(h/2+2*g,-g,g,20,-180,-270),...z(h/2+2*g,g,g,20,-90,-180),{x:h/2+g,y:o/2},...z(h/2,o/2,g,20,0,90)],w=[{x:-h/2,y:-o/2-g},{x:h/2,y:-o/2-g},...z(h/2,-o/2,g,20,-90,0),{x:h/2+g,y:-g},...z(h/2+2*g,-g,g,20,-180,-270),...z(h/2+2*g,g,g,20,-90,-180),{x:h/2+g,y:o/2},...z(h/2,o/2,g,20,0,90),{x:h/2,y:o/2+g},{x:-h/2,y:o/2+g}],x=d.Z.svg(i),b=(0,r._q)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m).replace("Z",""),k=x.path($,b),M=p(w),S=x.path(M,{...b}),D=i.insert("g",":first-child");return D.insert(()=>S,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.attr("class","text"),u&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(${-g}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return P.polygon(e,w,t)},i}function X(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}async function J(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...X(h/2,-o/2,g,30,-90,0),{x:-h/2-g,y:g},...X(h/2+2*g,-g,g,20,-180,-270),...X(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:-o/2},...X(h/2,o/2,g,20,0,90)],w=[...X(-h/2+g+g/2,-o/2,g,20,-90,-180),{x:h/2-g/2,y:g},...X(-h/2-g/2,-g,g,20,0,90),...X(-h/2-g/2,g,g,20,-90,0),{x:h/2-g/2,y:-g},...X(-h/2+g+g/2,o/2,g,30,-180,-270)],x=[{x:h/2,y:-o/2-g},{x:-h/2,y:-o/2-g},...X(h/2,-o/2,g,20,-90,0),{x:-h/2-g,y:-g},...X(h/2+2*g,-g,g,20,-180,-270),...X(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:o/2},...X(h/2,o/2,g,20,0,90),{x:-h/2,y:o/2+g},{x:h/2-g-g/2,y:o/2+g},...X(-h/2+g+g/2,-o/2,g,20,-90,-180),{x:h/2-g/2,y:g},...X(-h/2-g/2,-g,g,20,0,90),...X(-h/2-g/2,g,g,20,-90,0),{x:h/2-g/2,y:-g},...X(-h/2+g+g/2,o/2,g,30,-180,-270)],b=d.Z.svg(i),$=(0,r._q)(e,{fill:"none"});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=p(m).replace("Z",""),M=b.path(k,$),S=p(w).replace("Z",""),D=b.path(S,$),W=p(x),v=b.path(W,{...$}),C=i.insert("g",":first-child");return C.insert(()=>v,":first-child").attr("stroke-opacity",0),C.insert(()=>M,":first-child"),C.insert(()=>D,":first-child"),C.attr("class","text"),u&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),C.attr("transform",`translate(${g-g/4}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,C),e.intersect=function(t){return P.polygon(e,x,t)},i}async function K(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(80,(n.width+(e.padding??0)*2)*1.25,e?.width??0),h=Math.max(20,n.height+(e.padding??0)*2,e?.height??0),o=h/2,{cssStyles:g}=e,u=d.Z.svg(i),w=(0,r._q)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let x=s-o,b=h/4,$=[{x:x,y:0},{x:b,y:0},{x:0,y:h/2},{x:b,y:h},{x:x,y:h},...m(-x,-h/2,o,50,270,90)],k=p($),M=u.path(k,w),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",g),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),S.attr("transform",`translate(${-s/2}, ${-h/2})`),y(e,S),e.intersect=function(t){return P.polygon(e,$,t)},i}(0,h.eW)(Z,"anchor"),(0,h.eW)(U,"generateArcPoints"),(0,h.eW)(G,"bowTieRect"),(0,h.eW)(I,"insertPolygonShape"),(0,h.eW)(T,"card"),(0,h.eW)(E,"choice"),(0,h.eW)(H,"circle"),(0,h.eW)(V,"createLine"),(0,h.eW)(Y,"crossedCircle"),(0,h.eW)(j,"generateCirclePoints"),(0,h.eW)(O,"curlyBraceLeft"),(0,h.eW)(z,"generateCirclePoints"),(0,h.eW)(F,"curlyBraceRight"),(0,h.eW)(X,"generateCirclePoints"),(0,h.eW)(J,"curlyBraces"),(0,h.eW)(K,"curvedTrapezoid");var Q=(0,h.eW)((t,e,a,l,r,i)=>`M${t},${e+i} a${r},${i} 0,0,0 ${a},0 a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l}`,"createCylinderPathD"),tt=(0,h.eW)((t,e,a,l,r,i)=>`M${t},${e+i} M${t+a},${e+i} a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l}`,"createOuterCylinderPathD"),te=(0,h.eW)((t,e,a,l,r,i)=>`M${t-a/2},${-l/2} a${r},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function ta(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+e.padding,e.width??0),p=g/2,u=p/(2.5+g/50),m=Math.max(h.height+u+e.padding,e.height??0),{cssStyles:w}=e;if("handDrawn"===e.look){let t=d.Z.svg(s),l=tt(0,0,g,m,p,u),i=te(0,u,g,m,p,u),n=t.path(l,(0,r._q)(e,{})),h=t.path(i,(0,r._q)(e,{fill:"none"}));a=s.insert(()=>h,":first-child"),(a=s.insert(()=>n,":first-child")).attr("class","basic label-container"),w&&a.attr("style",w)}else{let t=Q(0,0,g,m,p,u);a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.R7)(w)).attr("style",i)}return a.attr("label-offset-y",u),a.attr("transform",`translate(${-g/2}, ${-(m/2+u)})`),y(e,a),o.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(e.padding??0)/1.5-(h.y-(h.top??0))})`),e.intersect=function(t){let a=P.rect(e,t),l=a.x-(e.x??0);if(0!=p&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-u)){let r=u*u*(1-l*l/(p*p));r>0&&(r=Math.sqrt(r)),r=u-r,t.y-(e.y??0)>0&&(r=-r),a.y+=r}return a},s}async function tl(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+e.padding,o=n.height+e.padding,g=.2*o,p=-h/2,u=-o/2-g/2,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=w.polygon([{x:p,y:u+g},{x:-p,y:u+g},{x:-p,y:-u},{x:p,y:-u},{x:p,y:u},{x:-p,y:u},{x:-p,y:u+g}].map(t=>[t.x,t.y]),x),$=i.insert(()=>b,":first-child");return $.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",l),s.attr("transform",`translate(${p+(e.padding??0)/2-(n.x-(n.left??0))}, ${u+g+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,$),e.intersect=function(t){return P.rect(e,t)},i}async function tr(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g}=await c(t,e,f(e)),p=o.width/2+g+5,u=o.width/2+g,{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(s),l=(0,r._q)(e,{roughness:.2,strokeWidth:2.5}),i=(0,r._q)(e,{roughness:.2,strokeWidth:1.5}),h=t.circle(0,0,2*p,l),o=t.circle(0,0,2*u,i);(a=s.insert("g",":first-child")).attr("class",(0,n.R7)(e.cssClasses)).attr("style",(0,n.R7)(m)),a.node()?.appendChild(h),a.node()?.appendChild(o)}else{let t=(a=s.insert("g",":first-child")).insert("circle",":first-child"),e=a.insert("circle");a.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",p).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0)}return y(e,a),e.intersect=function(t){return h.cM.info("DoubleCircle intersect",e,p,t),P.circle(e,p,t)},s}function ti(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.label="",e.labelStyle=l;let n=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=d.Z.svg(n),{nodeBorder:c}=a,g=(0,r._q)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let p=o.circle(0,0,14,g),u=n.insert(()=>p,":first-child");return u.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),y(e,u),e.intersect=function(t){return h.cM.info("filledCircle intersect",e,{radius:7,point:t}),P.circle(e,7,t)},n}async function tn(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),o=n.width+(e.padding??0),g=o+n.height,u=o+n.height,m=[{x:0,y:-g},{x:u,y:-g},{x:u/2,y:0}],{cssStyles:w}=e,x=d.Z.svg(i),b=(0,r._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m),k=x.path($,b),M=i.insert(()=>k,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`);return w&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",w),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),e.width=o,e.height=g,y(e,M),s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-g/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return h.cM.info("Triangle intersect",e,m,t),P.polygon(e,m,t)},i}function ts(t,e,{dir:a,config:{state:l,themeVariables:i}}){let{nodeStyles:n}=(0,r.UG)(e);e.label="";let s=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,o=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===a&&(o=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));let g=-1*o/2,p=-1*c/2,u=d.Z.svg(s),m=(0,r._q)(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let w=u.rectangle(g,p,o,c,m),x=s.insert(()=>w,":first-child");h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),y(e,x);let b=l?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return P.rect(e,t)},s}async function th(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(80,n.width+(e.padding??0)*2,e?.width??0),o=Math.max(50,n.height+(e.padding??0)*2,e?.height??0),g=o/2,{cssStyles:u}=e,w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=[{x:-s/2,y:-o/2},{x:s/2-g,y:-o/2},...m(-s/2+g,0,g,50,90,270),{x:s/2-g,y:o/2},{x:-s/2,y:o/2}],$=p(b),k=w.path($,x),M=i.insert(()=>k,":first-child");return M.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",u),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),y(e,M),e.intersect=function(t){return h.cM.info("Pill intersect",e,{radius:g,point:t}),P.polygon(e,b,t)},i}async function to(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.height+(e.padding??0),h=n.width+(e.padding??0)*2.5,{cssStyles:o}=e,g=d.Z.svg(i),u=(0,r._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=h/2,w=m/6,x=s/2,b=(m+=w)-x/2,$=[{x:-b,y:-x},{x:0,y:-x},{x:b,y:-x},{x:m,y:0},{x:b,y:x},{x:0,y:x},{x:-b,y:x},{x:-m,y:0}],k=p($),M=g.path(k,u),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),e.width=h,e.height=s,y(e,S),e.intersect=function(t){return P.polygon(e,$,t)},i}async function td(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.label="",e.labelStyle=a;let{shapeSvg:i}=await c(t,e,f(e)),n=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,g=d.Z.svg(i),u=(0,r._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],w=p(m),x=g.path(w,u),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),b.attr("transform",`translate(${-n/2}, ${-s/2})`),y(e,b),e.intersect=function(t){return h.cM.info("Pill intersect",e,{points:m}),P.polygon(e,m,t)},i}async function tc(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,label:p}=await c(t,e,"icon-shape default"),u="t"===e.pos,{nodeBorder:m}=a,{stylesMap:w}=(0,r.dT)(e),x=-s/2,b=-s/2,$=e.label?8:0,k=d.Z.svg(g),M=(0,r._q)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle(x,b,s,s,M),D=Math.max(s,f.width),W=s+f.height+$,v=k.rectangle(-D/2,-W/2,D,W,{...M,fill:"transparent",stroke:"none"}),C=g.insert(()=>S,":first-child"),B=g.insert(()=>v);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,i.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${u?f.height/2+$/2-r/2-h:-f.height/2-$/2-r/2-h})`),t.attr("style",`color: ${w.get("stroke")??m};`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${u?-W/2:W/2-f.height})`),C.attr("transform",`translate(0,${u?f.height/2+$/2:-f.height/2-$/2})`),y(e,B),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=u?[{x:a-f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2+f.height+$},{x:a+s/2,y:l-r/2+f.height+$},{x:a+s/2,y:l+r/2},{x:a-s/2,y:l+r/2},{x:a-s/2,y:l-r/2+f.height+$},{x:a-f.width/2,y:l-r/2+f.height+$}]:[{x:a-s/2,y:l-r/2},{x:a+s/2,y:l-r/2},{x:a+s/2,y:l-r/2+s},{x:a+f.width/2,y:l-r/2+s},{x:a+f.width/2/2,y:l+r/2},{x:a-f.width/2,y:l+r/2},{x:a-f.width/2,y:l-r/2+s},{x:a-s/2,y:l-r/2+s}],P.polygon(e,i,t)},g}async function tg(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,label:p}=await c(t,e,"icon-shape default"),u=e.label?8:0,m="t"===e.pos,{nodeBorder:w,mainBkg:x}=a,{stylesMap:b}=(0,r.dT)(e),$=d.Z.svg(g),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=b.get("fill");k.stroke=M??x;let S=g.append("g");e.icon&&S.html(`<g>${await (0,i.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let D=S.node().getBBox(),W=D.width,v=D.height,C=D.x,B=D.y,N=Math.max(W,v)*Math.SQRT2+40,A=$.circle(0,0,N,k),q=Math.max(N,f.width),R=N+f.height+u,_=$.rectangle(-q/2,-R/2,q,R,{...k,fill:"transparent",stroke:"none"}),L=g.insert(()=>A,":first-child"),Z=g.insert(()=>_);return S.attr("transform",`translate(${-W/2-C},${m?f.height/2+u/2-v/2-B:-f.height/2-u/2-v/2-B})`),S.attr("style",`color: ${b.get("stroke")??w};`),p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-R/2:R/2-f.height})`),L.attr("transform",`translate(0,${m?f.height/2+u/2:-f.height/2-u/2})`),y(e,Z),e.intersect=function(t){return h.cM.info("iconSquare intersect",e,t),P.rect(e,t)},g}async function ty(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,halfPadding:p,label:u}=await c(t,e,"icon-shape default"),m="t"===e.pos,w=s+2*p,x=s+2*p,{nodeBorder:b,mainBkg:$}=a,{stylesMap:M}=(0,r.dT)(e),S=e.label?8:0,D=d.Z.svg(g),W=(0,r._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=M.get("fill");W.stroke=v??$;let C=D.path(k(-x/2,-w/2,x,w,5),W),B=Math.max(x,f.width),N=w+f.height+S,A=D.rectangle(-B/2,-N/2,B,N,{...W,fill:"transparent",stroke:"none"}),q=g.insert(()=>C,":first-child").attr("class","icon-shape2"),R=g.insert(()=>A);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,i.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${m?f.height/2+S/2-r/2-h:-f.height/2-S/2-r/2-h})`),t.attr("style",`color: ${M.get("stroke")??b};`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-N/2:N/2-f.height})`),q.attr("transform",`translate(0,${m?f.height/2+S/2:-f.height/2-S/2})`),y(e,R),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=m?[{x:a-f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2+f.height+S},{x:a+x/2,y:l-r/2+f.height+S},{x:a+x/2,y:l+r/2},{x:a-x/2,y:l+r/2},{x:a-x/2,y:l-r/2+f.height+S},{x:a-f.width/2,y:l-r/2+f.height+S}]:[{x:a-x/2,y:l-r/2},{x:a+x/2,y:l-r/2},{x:a+x/2,y:l-r/2+w},{x:a+f.width/2,y:l-r/2+w},{x:a+f.width/2/2,y:l+r/2},{x:a-f.width/2,y:l+r/2},{x:a-f.width/2,y:l-r/2+w},{x:a-x/2,y:l-r/2+w}],P.polygon(e,i,t)},g}async function tf(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,halfPadding:p,label:u}=await c(t,e,"icon-shape default"),m="t"===e.pos,w=s+2*p,x=s+2*p,{nodeBorder:b,mainBkg:$}=a,{stylesMap:M}=(0,r.dT)(e),S=e.label?8:0,D=d.Z.svg(g),W=(0,r._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=M.get("fill");W.stroke=v??$;let C=D.path(k(-x/2,-w/2,x,w,.1),W),B=Math.max(x,f.width),N=w+f.height+S,A=D.rectangle(-B/2,-N/2,B,N,{...W,fill:"transparent",stroke:"none"}),q=g.insert(()=>C,":first-child"),R=g.insert(()=>A);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,i.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${m?f.height/2+S/2-r/2-h:-f.height/2-S/2-r/2-h})`),t.attr("style",`color: ${M.get("stroke")??b};`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-N/2:N/2-f.height})`),q.attr("transform",`translate(0,${m?f.height/2+S/2:-f.height/2-S/2})`),y(e,R),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=m?[{x:a-f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2+f.height+S},{x:a+x/2,y:l-r/2+f.height+S},{x:a+x/2,y:l+r/2},{x:a-x/2,y:l+r/2},{x:a-x/2,y:l-r/2+f.height+S},{x:a-f.width/2,y:l-r/2+f.height+S}]:[{x:a-x/2,y:l-r/2},{x:a+x/2,y:l-r/2},{x:a+x/2,y:l-r/2+w},{x:a+f.width/2,y:l-r/2+w},{x:a+f.width/2/2,y:l+r/2},{x:a-f.width/2,y:l+r/2},{x:a-f.width/2,y:l-r/2+w},{x:a-x/2,y:l-r/2+w}],P.polygon(e,i,t)},g}async function tp(t,e,{config:{flowchart:a}}){let l=new Image;l.src=e?.img??"",await l.decode();let i=Number(l.naturalWidth.toString().replace("px","")),n=Number(l.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/n;let{labelStyles:s}=(0,r.UG)(e);e.labelStyle=s;let o=a?.wrappingWidth;e.defaultWidth=a?.wrappingWidth;let g=Math.max(e.label?o??0:0,e?.assetWidth??i),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:g,p="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(f,o??0);let{shapeSvg:u,bbox:m,label:w}=await c(t,e,"image-shape default"),x="t"===e.pos,b=-f/2,$=e.label?8:0,k=d.Z.svg(u),M=(0,r._q)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle(b,-p/2,f,p,M),D=Math.max(f,m.width),W=p+m.height+$,v=k.rectangle(-D/2,-W/2,D,W,{...M,fill:"none",stroke:"none"}),C=u.insert(()=>S,":first-child"),B=u.insert(()=>v);if(e.img){let t=u.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",p),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${x?W/2-p:-W/2})`)}return w.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-p/2-m.height/2-$/2:p/2-m.height/2+$/2})`),C.attr("transform",`translate(0,${x?m.height/2+$/2:-m.height/2-$/2})`),y(e,B),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=x?[{x:a-m.width/2,y:l-r/2},{x:a+m.width/2,y:l-r/2},{x:a+m.width/2,y:l-r/2+m.height+$},{x:a+f/2,y:l-r/2+m.height+$},{x:a+f/2,y:l+r/2},{x:a-f/2,y:l+r/2},{x:a-f/2,y:l-r/2+m.height+$},{x:a-m.width/2,y:l-r/2+m.height+$}]:[{x:a-f/2,y:l-r/2},{x:a+f/2,y:l-r/2},{x:a+f/2,y:l-r/2+p},{x:a+m.width/2,y:l-r/2+p},{x:a+m.width/2/2,y:l+r/2},{x:a-m.width/2,y:l+r/2},{x:a-m.width/2,y:l-r/2+p},{x:a-f/2,y:l-r/2+p}],P.polygon(e,i,t)},u}async function tu(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0)*2,e?.width??0),o=Math.max(s.height+(e.padding??0)*2,e?.height??0),g=[{x:0,y:0},{x:h,y:0},{x:h+3*o/6,y:-o},{x:-3*o/6,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=I(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return P.polygon(e,g,t)},n}async function tm(t,e,a){let l;let{labelStyles:i,nodeStyles:s}=(0,r.UG)(e);e.labelStyle=i;let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(o.width+2*a.labelPaddingX,e?.width||0),p=Math.max(o.height+2*a.labelPaddingY,e?.height||0),u=-g/2,m=-p/2,{rx:w,ry:x}=e,{cssStyles:b}=e;if(a?.rx&&a.ry&&(w=a.rx,x=a.ry),"handDrawn"===e.look){let t=d.Z.svg(h),a=(0,r._q)(e,{}),i=w||x?t.path(k(u,m,g,p,w||0),a):t.rectangle(u,m,g,p,a);(l=h.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(b))}else(l=h.insert("rect",":first-child")).attr("class","basic label-container").attr("style",s).attr("rx",(0,n.R7)(w)).attr("ry",(0,n.R7)(x)).attr("x",u).attr("y",m).attr("width",g).attr("height",p);return y(e,l),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return P.rect(e,t)},h}async function tw(t,e){let{shapeSvg:a,bbox:l,label:r}=await c(t,e,"label"),i=a.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),r.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),y(e,i),e.intersect=function(t){return P.rect(e,t)},a}async function tx(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),o=Math.max(s.height+(e.padding??0),e?.height??0),g=[{x:0,y:0},{x:h+3*o/6,y:0},{x:h,y:-o},{x:-(3*o)/6,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=I(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return P.polygon(e,g,t)},n}async function tb(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),o=Math.max(s.height+(e.padding??0),e?.height??0),g=[{x:-3*o/6,y:0},{x:h,y:0},{x:h+3*o/6,y:-o},{x:0,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=I(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return P.polygon(e,g,t)},n}function t$(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.label="",e.labelStyle=a;let i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),c=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],g=d.Z.svg(i),u=(0,r._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=p(c),w=g.path(m,u),x=i.insert(()=>w,":first-child");return n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),l&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",l),x.attr("transform",`translate(-${s/2},${-o})`),y(e,x),e.intersect=function(t){return h.cM.info("lightningBolt intersect",e,t),P.polygon(e,c,t)},i}(0,h.eW)(ta,"cylinder"),(0,h.eW)(tl,"dividedRectangle"),(0,h.eW)(tr,"doublecircle"),(0,h.eW)(ti,"filledCircle"),(0,h.eW)(tn,"flippedTriangle"),(0,h.eW)(ts,"forkJoin"),(0,h.eW)(th,"halfRoundedRectangle"),(0,h.eW)(to,"hexagon"),(0,h.eW)(td,"hourglass"),(0,h.eW)(tc,"icon"),(0,h.eW)(tg,"iconCircle"),(0,h.eW)(ty,"iconRounded"),(0,h.eW)(tf,"iconSquare"),(0,h.eW)(tp,"imageSquare"),(0,h.eW)(tu,"inv_trapezoid"),(0,h.eW)(tm,"drawRect"),(0,h.eW)(tw,"labelRect"),(0,h.eW)(tx,"lean_left"),(0,h.eW)(tb,"lean_right"),(0,h.eW)(t$,"lightningBolt");var tk=(0,h.eW)((t,e,a,l,r,i,n)=>`M${t},${e+i} a${r},${i} 0,0,0 ${a},0 a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l} M${t},${e+i+n} a${r},${i} 0,0,0 ${a},0`,"createCylinderPathD"),tM=(0,h.eW)((t,e,a,l,r,i,n)=>`M${t},${e+i} M${t+a},${e+i} a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l} M${t},${e+i+n} a${r},${i} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tS=(0,h.eW)((t,e,a,l,r,i)=>`M${t-a/2},${-l/2} a${r},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tD(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+(e.padding??0),e.width??0),p=g/2,u=p/(2.5+g/50),m=Math.max(h.height+u+(e.padding??0),e.height??0),w=.1*m,{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.Z.svg(s),l=tM(0,0,g,m,p,u,w),i=tS(0,u,g,m,p,u),n=(0,r._q)(e,{}),h=t.path(l,n),o=t.path(i,n);s.insert(()=>o,":first-child").attr("class","line"),(a=s.insert(()=>h,":first-child")).attr("class","basic label-container"),x&&a.attr("style",x)}else{let t=tk(0,0,g,m,p,u,w);a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.R7)(x)).attr("style",i)}return a.attr("label-offset-y",u),a.attr("transform",`translate(${-g/2}, ${-(m/2+u)})`),y(e,a),o.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+u-(h.y-(h.top??0))})`),e.intersect=function(t){let a=P.rect(e,t),l=a.x-(e.x??0);if(0!=p&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-u)){let r=u*u*(1-l*l/(p*p));r>0&&(r=Math.sqrt(r)),r=u-r,t.y-(e.y??0)>0&&(r=-r),a.y+=r}return a},s}async function tW(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,p=o+g,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=[{x:-h/2-h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:p/2},...u(-h/2-h/2*.1,p/2,h/2+h/2*.1,p/2,g,.8),{x:h/2+h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:-p/2},{x:-h/2,y:-p/2},{x:-h/2,y:p/2*1.1},{x:-h/2,y:-p/2}],$=w.polygon(b.map(t=>[t.x,t.y]),x),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)+h/2*.1/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g/2-(n.y-(n.top??0))})`),y(e,k),e.intersect=function(t){return P.polygon(e,b,t)},i}async function tv(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,u=-o/2,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{}),b=[{x:g-5,y:u+5},{x:g-5,y:u+o+5},{x:g+h-5,y:u+o+5},{x:g+h-5,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u+o-5},{x:g+h+5,y:u+o-5},{x:g+h+5,y:u-5},{x:g+5,y:u-5},{x:g+5,y:u},{x:g,y:u},{x:g,y:u+5}];"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=p(b),k=w.path($,x),M=p([{x:g,y:u+5},{x:g+h-5,y:u+5},{x:g+h-5,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u},{x:g,y:u}]),S=w.path(M,{...x,fill:"none"}),D=i.insert(()=>S,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),s.attr("transform",`translate(${-(n.width/2)-5-(n.x-(n.left??0))}, ${-(n.height/2)+5-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return P.polygon(e,b,t)},i}async function tC(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,m=o+g,w=-h/2,x=-m/2,{cssStyles:b}=e,$=u(w-5,x+m+5,w+h-5,x+m+5,g,.8),k=$?.[$.length-1],M=[{x:w-5,y:x+5},{x:w-5,y:x+m+5},...$,{x:w+h-5,y:k.y-5},{x:w+h,y:k.y-5},{x:w+h,y:k.y-10},{x:w+h+5,y:k.y-10},{x:w+h+5,y:x-5},{x:w+5,y:x-5},{x:w+5,y:x},{x:w,y:x},{x:w,y:x+5}],S=[{x:w,y:x+5},{x:w+h-5,y:x+5},{x:w+h-5,y:k.y-5},{x:w+h,y:k.y-5},{x:w+h,y:x},{x:w,y:x}],D=d.Z.svg(i),W=(0,r._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=p(M),C=D.path(v,W),B=p(S),N=D.path(B,W),A=i.insert(()=>C,":first-child");return A.insert(()=>N),A.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),A.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-(n.width/2)-5-(n.x-(n.left??0))}, ${-(n.height/2)+5-g/2-(n.y-(n.top??0))})`),y(e,A),e.intersect=function(t){return P.polygon(e,M,t)},i}async function tB(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l,e.useHtmlLabels||s.iE().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:n,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+(e.padding??0)*2,e?.width??0),p=Math.max(h.height+(e.padding??0)*2,e?.height??0),{cssStyles:u}=e,m=d.Z.svg(n),w=(0,r._q)(e,{fill:a.noteBkgColor,stroke:a.noteBorderColor});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let x=m.rectangle(-g/2,-p/2,g,p,w),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),y(e,b),e.intersect=function(t){return P.rect(e,t)},n}(0,h.eW)(tD,"linedCylinder"),(0,h.eW)(tW,"linedWaveEdgedRect"),(0,h.eW)(tv,"multiRect"),(0,h.eW)(tC,"multiWaveEdgedRectangle"),(0,h.eW)(tB,"note");var tN=(0,h.eW)((t,e,a)=>`M${t+a/2},${e} L${t+a},${e-a/2} L${t+a/2},${e-a} L${t},${e-a/2} Z`,"createDecisionBoxPathD");async function tA(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.width+e.padding+(s.height+e.padding),o=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}],{cssStyles:g}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=tN(0,0,h),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2+.5}, ${h/2})`),g&&a.attr("style",g)}else(a=I(n,h,h,o)).attr("transform",`translate(${-h/2+.5}, ${h/2})`);return i&&a.attr("style",i),y(e,a),e.calcIntersect=function(t,e){let a=t.width,l=P.polygon(t,[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],e);return{x:l.x-.5,y:l.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function tq(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0),e?.width??0),o=Math.max(n.height+(e.padding??0),e?.height??0),g=-h/2,u=-o/2,m=u/2,w=[{x:g+m,y:u},{x:g,y:0},{x:g+m,y:-u},{x:-g,y:-u},{x:-g,y:u}],{cssStyles:x}=e,b=d.Z.svg(i),$=(0,r._q)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=p(w),M=b.path(k,$),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",x),l&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),S.attr("transform",`translate(${-m/2},0)`),s.attr("transform",`translate(${-m/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),y(e,S),e.intersect=function(t){return P.polygon(e,w,t)},i}async function tR(t,e){let a,l,i;let{labelStyles:n,nodeStyles:c}=(0,r.UG)(e);e.labelStyle=n,a=e.cssClasses?"node "+e.cssClasses:"node default";let g=t.insert("g").attr("class",a).attr("id",e.domId||e.id),f=g.insert("g"),p=g.insert("g").attr("class","label").attr("style",c),u=e.description,m=e.label,w=p.node().appendChild(await $(m,e.labelStyle,!0,!0)),x={width:0,height:0};if((0,s.ku)(s.nV()?.flowchart?.htmlLabels)){let t=w.children[0],e=(0,o.Ys)(w);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}h.cM.info("Text 2",u);let b=u||[],M=w.getBBox(),S=p.node().appendChild(await $(b.join?b.join("<br/>"):b,e.labelStyle,!0,!0)),D=S.children[0],W=(0,o.Ys)(S);x=D.getBoundingClientRect(),W.attr("width",x.width),W.attr("height",x.height);let v=(e.padding||0)/2;(0,o.Ys)(S).attr("transform","translate( "+(x.width>M.width?0:(M.width-x.width)/2)+", "+(M.height+v+5)+")"),(0,o.Ys)(w).attr("transform","translate( "+(x.width<M.width?0:-(M.width-x.width)/2)+", 0)"),x=p.node().getBBox(),p.attr("transform","translate("+-x.width/2+", "+(-x.height/2-v+3)+")");let C=x.width+(e.padding||0),B=x.height+(e.padding||0),N=-x.width/2-v,A=-x.height/2-v;if("handDrawn"===e.look){let t=d.Z.svg(g),a=(0,r._q)(e,{}),n=t.path(k(N,A,C,B,e.rx||0),a),s=t.line(-x.width/2-v,-x.height/2-v+M.height+v,x.width/2+v,-x.height/2-v+M.height+v,a);i=g.insert(()=>(h.cM.debug("Rough node insert CXC",n),s),":first-child"),l=g.insert(()=>(h.cM.debug("Rough node insert CXC",n),n),":first-child")}else l=f.insert("rect",":first-child"),i=f.insert("line"),l.attr("class","outer title-state").attr("style",c).attr("x",-x.width/2-v).attr("y",-x.height/2-v).attr("width",x.width+(e.padding||0)).attr("height",x.height+(e.padding||0)),i.attr("class","divider").attr("x1",-x.width/2-v).attr("x2",x.width/2+v).attr("y1",-x.height/2-v+M.height+v).attr("y2",-x.height/2-v+M.height+v);return y(e,l),e.intersect=function(t){return P.rect(e,t)},g}function t_(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function tL(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=e?.padding??0,h=e?.padding??0,o=(e?.width?e?.width:n.width)+2*s,g=(e?.height?e?.height:n.height)+2*h,u=e.radius||5,m=e.taper||5,{cssStyles:w}=e,x=d.Z.svg(i),b=(0,r._q)(e,{});e.stroke&&(b.stroke=e.stroke),"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=[{x:-o/2+m,y:-g/2},{x:o/2-m,y:-g/2},...t_(o/2-m,-g/2,o/2,-g/2+m,u,u,!0),{x:o/2,y:-g/2+m},{x:o/2,y:g/2-m},...t_(o/2,g/2-m,o/2-m,g/2,u,u,!0),{x:o/2-m,y:g/2},{x:-o/2+m,y:g/2},...t_(-o/2+m,g/2,-o/2,g/2-m,u,u,!0),{x:-o/2,y:g/2-m},{x:-o/2,y:-g/2+m},...t_(-o/2,-g/2+m,-o/2+m,-g/2,u,u,!0)],k=p($),M=x.path(k,b),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",w),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),y(e,S),e.intersect=function(t){return P.polygon(e,$,t)},i}async function tP(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:s,label:h}=await c(t,e,f(e)),o=e?.padding??0,g=Math.max(s.width+(e.padding??0)*2,e?.width??0),p=Math.max(s.height+(e.padding??0)*2,e?.height??0),u=-s.width/2-o,m=-s.height/2-o,{cssStyles:w}=e,x=d.Z.svg(i),b=(0,r._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=x.polygon([{x:u,y:m},{x:u+g+8,y:m},{x:u+g+8,y:m+p},{x:u-8,y:m+p},{x:u-8,y:m},{x:u,y:m},{x:u,y:m+p}].map(t=>[t.x,t.y]),b),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container").attr("style",(0,n.R7)(w)),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),w&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),h.attr("transform",`translate(${-g/2+4+(e.padding??0)-(s.x-(s.left??0))},${-p/2+(e.padding??0)-(s.y-(s.top??0))})`),y(e,k),e.intersect=function(t){return P.rect(e,t)},i}async function tZ(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,u=-o/2,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=[{x:g,y:u},{x:g,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u-o/2}],$=p(b),k=w.path($,x),M=i.insert(()=>k,":first-child");return M.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",m),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),M.attr("transform",`translate(0, ${o/4})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))}, ${-o/4+(e.padding??0)-(n.y-(n.top??0))})`),y(e,M),e.intersect=function(t){return P.polygon(e,b,t)},i}async function tU(t,e){let a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)};return tm(t,e,a)}async function tG(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.height+e.padding,h=n.width+s/4+e.padding,o=s/2,{cssStyles:g}=e,u=d.Z.svg(i),w=(0,r._q)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let x=[{x:-h/2+o,y:-s/2},{x:h/2-o,y:-s/2},...m(-h/2+o,0,o,50,90,270),{x:h/2-o,y:s/2},...m(h/2-o,0,o,50,270,450)],b=p(x),$=u.path(b,w),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",g),l&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",l),y(e,k),e.intersect=function(t){return P.polygon(e,x,t)},i}async function tI(t,e){return tm(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function tT(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{cssStyles:n}=e,{lineColor:s,stateBorder:h,nodeBorder:o}=a,c=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),g=d.Z.svg(c),f=(0,r._q)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let p=g.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),u=h??o,m=g.circle(0,0,5,{...f,fill:u,stroke:u,strokeWidth:2,fillStyle:"solid"}),w=c.insert(()=>p,":first-child");return w.insert(()=>m),n&&w.selectAll("path").attr("style",n),i&&w.selectAll("path").attr("style",i),y(e,w),e.intersect=function(t){return P.circle(e,7,t)},c}function tE(t,e,{config:{themeVariables:a}}){let l;let{lineColor:i}=a,n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=d.Z.svg(n).circle(0,0,14,(0,r.TA)(i));(l=n.insert(()=>t)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(l=n.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return y(e,l),e.intersect=function(t){return P.circle(e,7,t)},n}async function tH(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:s}=await c(t,e,f(e)),h=(e?.padding||0)/2,o=s.width+e.padding,g=s.height+e.padding,p=-s.width/2-h,u=-s.height/2-h,m=[{x:0,y:0},{x:o,y:0},{x:o,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if("handDrawn"===e.look){let t=d.Z.svg(i),a=(0,r._q)(e,{}),l=t.rectangle(p-8,u,o+16,g,a),s=t.line(p,u,p,u+g,a),h=t.line(p+o,u,p+o,u+g,a);i.insert(()=>s,":first-child"),i.insert(()=>h,":first-child");let c=i.insert(()=>l,":first-child"),{cssStyles:f}=e;c.attr("class","basic label-container").attr("style",(0,n.R7)(f)),y(e,c)}else{let t=I(i,o,g,m);l&&t.attr("style",l),y(e,t)}return e.intersect=function(t){return P.polygon(e,m,t)},i}async function tV(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),o=-s/2,g=-h/2,u=.2*h,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{}),b=[{x:o-u/2,y:g},{x:o+s+u/2,y:g},{x:o+s+u/2,y:g+h},{x:o-u/2,y:g+h}];"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=p(b),k=w.path($,x),M=p([{x:o+s-u/2,y:g+h},{x:o+s+u/2,y:g+h},{x:o+s+u/2,y:g+h-.2*h}]),S=w.path(M,{...x,fillStyle:"solid"}),D=i.insert(()=>S,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),y(e,D),e.intersect=function(t){return P.polygon(e,b,t)},i}async function tY(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,m=.2*h,w=.2*o,x=o+g,{cssStyles:b}=e,$=d.Z.svg(i),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-h/2-h/2*.1,y:x/2},...u(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,g,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],S=-h/2+h/2*.1,D=-x/2-.4*w,W=[{x:S+h-m,y:(D+o)*1.4},{x:S+h,y:D+o-w},{x:S+h,y:(D+o)*.9},...u(S+h,(D+o)*1.3,S+h-m,(D+o)*1.5,-(.03*o),.5)],v=p(M),C=$.path(v,k),B=p(W),N=$.path(B,{...k,fillStyle:"solid"}),A=i.insert(()=>N,":first-child");return A.insert(()=>C,":first-child"),A.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),A.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g/2-(n.y-(n.top??0))})`),y(e,A),e.intersect=function(t){return P.polygon(e,M,t)},i}async function tj(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+e.padding,e?.width||0),h=Math.max(n.height+e.padding,e?.height||0),o=i.insert("rect",":first-child");return o.attr("class","text").attr("style",l).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-h/2).attr("width",s).attr("height",h),y(e,o),e.intersect=function(t){return P.rect(e,t)},i}(0,h.eW)(tA,"question"),(0,h.eW)(tq,"rect_left_inv_arrow"),(0,h.eW)(tR,"rectWithTitle"),(0,h.eW)(t_,"generateArcPoints"),(0,h.eW)(tL,"roundedRect"),(0,h.eW)(tP,"shadedProcess"),(0,h.eW)(tZ,"slopedRect"),(0,h.eW)(tU,"squareRect"),(0,h.eW)(tG,"stadium"),(0,h.eW)(tI,"state"),(0,h.eW)(tT,"stateEnd"),(0,h.eW)(tE,"stateStart"),(0,h.eW)(tH,"subroutine"),(0,h.eW)(tV,"taggedRect"),(0,h.eW)(tY,"taggedWaveEdgedRectangle"),(0,h.eW)(tj,"text");var tO=(0,h.eW)((t,e,a,l,r,i)=>`M${t},${e}
|
3
|
+
a${r},${i} 0,0,1 0,${-l}
|
4
|
+
l${a},0
|
5
|
+
a${r},${i} 0,0,1 0,${l}
|
6
|
+
M${a},${-l}
|
7
|
+
a${r},${i} 0,0,0 0,${l}
|
8
|
+
l${-a},0`,"createCylinderPathD"),tz=(0,h.eW)((t,e,a,l,r,i)=>`M${t},${e} M${t+a},${e} a${r},${i} 0,0,0 0,${-l} l${-a},0 a${r},${i} 0,0,0 0,${l} l${a},0`,"createOuterCylinderPathD"),tF=(0,h.eW)((t,e,a,l,r,i)=>`M${t+a/2},${-l/2} a${r},${i} 0,0,0 0,${l}`,"createInnerCylinderPathD");async function tX(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o,halfPadding:g}=await c(t,e,f(e)),p="neo"===e.look?2*g:g,u=h.height+p,m=u/2,w=m/(2.5+u/50),x=h.width+w+p,{cssStyles:b}=e;if("handDrawn"===e.look){let t=d.Z.svg(s),l=tz(0,0,x,u,w,m),i=tF(0,0,x,u,w,m),n=t.path(l,(0,r._q)(e,{})),h=t.path(i,(0,r._q)(e,{fill:"none"}));a=s.insert(()=>h,":first-child"),(a=s.insert(()=>n,":first-child")).attr("class","basic label-container"),b&&a.attr("style",b)}else{let t=tO(0,0,x,u,w,m);(a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.R7)(b)).attr("style",i)).attr("class","basic label-container"),b&&a.selectAll("path").attr("style",b),i&&a.selectAll("path").attr("style",i)}return a.attr("label-offset-x",w),a.attr("transform",`translate(${-x/2}, ${u/2} )`),o.attr("transform",`translate(${-(h.width/2)-w-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),y(e,a),e.intersect=function(t){let a=P.rect(e,t),l=a.y-(e.y??0);if(0!=m&&(Math.abs(l)<(e.height??0)/2||Math.abs(l)==(e.height??0)/2&&Math.abs(a.x-(e.x??0))>(e.width??0)/2-w)){let r=w*w*(1-l*l/(m*m));0!=r&&(r=Math.sqrt(Math.abs(r))),r=w-r,t.x-(e.x??0)>0&&(r=-r),a.x+=r}return a},s}async function tJ(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.width+e.padding,o=s.height+e.padding,g=[{x:-3*o/6,y:0},{x:h+3*o/6,y:0},{x:h,y:-o},{x:0,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=I(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return P.polygon(e,g,t)},n}async function tK(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(60,n.width+(e.padding??0)*2,e?.width??0),h=Math.max(20,n.height+(e.padding??0)*2,e?.height??0),{cssStyles:o}=e,g=d.Z.svg(i),u=(0,r._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=[{x:-s/2*.8,y:-h/2},{x:s/2*.8,y:-h/2},{x:s/2,y:-h/2*.6},{x:s/2,y:h/2},{x:-s/2,y:h/2},{x:-s/2,y:-h/2*.6}],w=p(m),x=g.path(w,u),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),y(e,b),e.intersect=function(t){return P.polygon(e,m,t)},i}async function tQ(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:o}=await c(t,e,f(e)),g=(0,s.ku)(s.nV().flowchart?.htmlLabels),u=n.width+(e.padding??0),m=u+n.height,w=u+n.height,x=[{x:0,y:0},{x:w,y:0},{x:w/2,y:-m}],{cssStyles:b}=e,$=d.Z.svg(i),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=p(x),S=$.path(M,k),D=i.insert(()=>S,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`);return b&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",b),l&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",l),e.width=u,e.height=m,y(e,D),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${m/2-(n.height+(e.padding??0)/(g?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(t){return h.cM.info("Triangle intersect",e,x,t),P.polygon(e,x,t)},i}async function t0(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/8,m=o+g,{cssStyles:w}=e,x=70-h,b=x>0?x/2:0,$=d.Z.svg(i),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-h/2-b,y:m/2},...u(-h/2-b,m/2,h/2+b,m/2,g,.8),{x:h/2+b,y:-m/2},{x:-h/2-b,y:-m/2}],S=p(M),D=$.path(S,k),W=i.insert(()=>D,":first-child");return W.attr("class","basic label-container"),w&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",w),l&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",l),W.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g-(n.y-(n.top??0))})`),y(e,W),e.intersect=function(t){return P.polygon(e,M,t)},i}async function t2(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),o=s/h,g=s,m=h;g>m*o?m=g/o:g=m*o,g=Math.max(g,100);let w=Math.min(.2*(m=Math.max(m,50)),m/4),x=m+2*w,{cssStyles:b}=e,$=d.Z.svg(i),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-g/2,y:x/2},...u(-g/2,x/2,g/2,x/2,w,1),{x:g/2,y:-x/2},...u(g/2,-x/2,-g/2,-x/2,w,-1)],S=p(M),D=$.path(S,k),W=i.insert(()=>D,":first-child");return W.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",l),y(e,W),e.intersect=function(t){return P.polygon(e,M,t)},i}async function t1(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,p=-o/2,{cssStyles:u}=e,m=d.Z.svg(i),w=(0,r._q)(e,{}),x=[{x:g-5,y:p-5},{x:g-5,y:p+o},{x:g+h,y:p+o},{x:g+h,y:p-5}],b=`M${g-5},${p-5} L${g+h},${p-5} L${g+h},${p+o} L${g-5},${p+o} L${g-5},${p-5}
|
9
|
+
M${g-5},${p} L${g+h},${p}
|
10
|
+
M${g},${p-5} L${g},${p+o}`;"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let $=m.path(b,w),k=i.insert(()=>$,":first-child");return k.attr("transform","translate(2.5, 2.5)"),k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),s.attr("transform",`translate(${-(n.width/2)+2.5-(n.x-(n.left??0))}, ${-(n.height/2)+2.5-(n.y-(n.top??0))})`),y(e,k),e.intersect=function(t){return P.polygon(e,x,t)},i}async function t5(t,e){if(e.alias&&(e.label=e.alias),"handDrawn"===e.look){let{themeVariables:a}=(0,s.iE)(),{background:l}=a,r={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${l}`]};await t5(t,r)}let a=(0,s.iE)();e.useHtmlLabels=a.htmlLabels;let l=a.er?.diagramPadding??10,i=a.er?.entityPadding??6,{cssStyles:h}=e,{labelStyles:c,nodeStyles:g}=(0,r.UG)(e);if(0===e.attributes.length&&e.label){let r={rx:0,ry:0,labelPaddingX:l,labelPaddingY:1.5*l,classes:""};(0,n.Cq)(e.label,a)+2*r.labelPaddingX<a.er.minEntityWidth&&(e.width=a.er.minEntityWidth);let i=await tm(t,e,r);if(!(0,s.ku)(a.htmlLabels)){let t=i.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return i}a.htmlLabels||(l*=1.25,i*=1.25);let p=f(e);p||(p="node default");let u=t.insert("g").attr("class",p).attr("id",e.domId||e.id),m=await t8(u,e.label??"",a,0,0,["name"],c);m.height+=i;let w=0,x=[],b=[],$=0,k=0,M=0,S=0,D=!0,W=!0;for(let t of e.attributes){let e=await t8(u,t.type,a,0,w,["attribute-type"],c);$=Math.max($,e.width+l);let r=await t8(u,t.name,a,0,w,["attribute-name"],c);k=Math.max(k,r.width+l);let n=await t8(u,t.keys.join(),a,0,w,["attribute-keys"],c);M=Math.max(M,n.width+l);let s=await t8(u,t.comment,a,0,w,["attribute-comment"],c);S=Math.max(S,s.width+l);let h=Math.max(e.height,r.height,n.height,s.height)+i;b.push({yOffset:w,rowHeight:h}),w+=h}let v=4;M<=l&&(D=!1,M=0,v--),S<=l&&(W=!1,S=0,v--);let C=u.node().getBBox();if(m.width+2*l-($+k+M+S)>0){let t=m.width+2*l-($+k+M+S);$+=t/v,k+=t/v,M>0&&(M+=t/v),S>0&&(S+=t/v)}let B=$+k+M+S,N=d.Z.svg(u),A=(0,r._q)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let q=0;b.length>0&&(q=b.reduce((t,e)=>t+(e?.rowHeight??0),0));let R=Math.max(C.width+2*l,e?.width||0,B),_=Math.max((q??0)+m.height,e?.height||0),L=-R/2,Z=-_/2;u.selectAll("g:not(:first-child)").each((t,e,a)=>{let r=(0,o.Ys)(a[e]),n=r.attr("transform"),s=0,h=0;if(n){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(s=parseFloat(t[1]),h=parseFloat(t[2]),r.attr("class").includes("attribute-name")?s+=$:r.attr("class").includes("attribute-keys")?s+=$+k:r.attr("class").includes("attribute-comment")&&(s+=$+k+M))}r.attr("transform",`translate(${L+l/2+s}, ${h+Z+m.height+i/2})`)}),u.select(".name").attr("transform","translate("+-m.width/2+", "+(Z+i/2)+")");let U=N.rectangle(L,Z,R,_,A),G=u.insert(()=>U,":first-child").attr("style",h.join("")),{themeVariables:I}=(0,s.iE)(),{rowEven:T,rowOdd:E,nodeBorder:H}=I;for(let[t,e]of(x.push(0),b.entries())){let a=(t+1)%2==0&&0!==e.yOffset,l=N.rectangle(L,m.height+Z+e?.yOffset,R,e?.rowHeight,{...A,fill:a?T:E,stroke:H});u.insert(()=>l,"g.label").attr("style",h.join("")).attr("class",`row-rect-${a?"even":"odd"}`)}let V=N.line(L,m.height+Z,R+L,m.height+Z,A);for(let t of(u.insert(()=>V).attr("class","divider"),V=N.line($+L,m.height+Z,$+L,_+Z,A),u.insert(()=>V).attr("class","divider"),D&&(V=N.line($+k+L,m.height+Z,$+k+L,_+Z,A),u.insert(()=>V).attr("class","divider")),W&&(V=N.line($+k+M+L,m.height+Z,$+k+M+L,_+Z,A),u.insert(()=>V).attr("class","divider")),x))V=N.line(L,m.height+Z+t,R+L,m.height+Z+t,A),u.insert(()=>V).attr("class","divider");if(y(e,G),g&&"handDrawn"!==e.look){let t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");u.selectAll("path").attr("style",e??""),u.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return P.rect(e,t)},u}async function t8(t,e,a,l=0,r=0,h=[],d=""){let c=t.insert("g").attr("class",`label ${h.join(" ")}`).attr("transform",`translate(${l}, ${r})`).attr("style",d);e!==(0,s.UO)(e)&&(e=(e=(0,s.UO)(e)).replaceAll("<","<").replaceAll(">",">"));let g=c.node().appendChild(await (0,i.rw)(c,e,{width:(0,n.Cq)(e,a)+100,style:d,useHtmlLabels:a.htmlLabels},a));if(e.includes("<")||e.includes(">")){let t=g.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let y=g.getBBox();if((0,s.ku)(a.htmlLabels)){let t=g.children[0];t.style.textAlign="start";let e=(0,o.Ys)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return y}async function t3(t,e,a,l,r=a.class.padding??12){let i=l?0:3,n=t.insert("g").attr("class",f(e)).attr("id",e.domId||e.id),s=null,h=null,o=null,d=null,c=0,g=0,y=0;if(s=n.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let t=e.annotations[0];await t4(s,{text:`\xab${t}\xbb`},0),c=s.node().getBBox().height}h=n.insert("g").attr("class","label-group text"),await t4(h,e,0,["font-weight: bolder"]);let p=h.node().getBBox();g=p.height,o=n.insert("g").attr("class","members-group text");let u=0;for(let t of e.members){let e=await t4(o,t,u,[t.parseClassifier()]);u+=e+i}(y=o.node().getBBox().height)<=0&&(y=r/2),d=n.insert("g").attr("class","methods-group text");let m=0;for(let t of e.methods){let e=await t4(d,t,m,[t.parseClassifier()]);m+=e+i}let w=n.node().getBBox();if(null!==s){let t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return h.attr("transform",`translate(${-p.width/2}, ${c})`),w=n.node().getBBox(),o.attr("transform",`translate(0, ${c+g+2*r})`),w=n.node().getBBox(),d.attr("transform",`translate(0, ${c+g+(y?y+4*r:2*r)})`),w=n.node().getBBox(),{shapeSvg:n,bbox:w}}async function t4(t,e,a,l=[]){let r;let d=t.insert("g").attr("class","label").attr("style",l.join("; ")),c=(0,s.iE)(),g="useHtmlLabels"in e?e.useHtmlLabels:(0,s.ku)(c.htmlLabels)??!0,y="";y="text"in e?e.text:e.label,!g&&y.startsWith("\\")&&(y=y.substring(1)),(0,s.l0)(y)&&(g=!0);let f=await (0,i.rw)(d,(0,s.uX)((0,n.SH)(y)),{width:(0,n.Cq)(y,c)+50,classes:"markdown-node-label",useHtmlLabels:g},c),p=1;if(g){let t=f.children[0],e=(0,o.Ys)(f);p=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(p+=t.innerHTML.split("<mrow>").length-1);let a=t.getElementsByTagName("img");if(a){let t=""===y.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=5*parseInt(c.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";a(e)}(0,h.eW)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}r=t.getBoundingClientRect(),e.attr("width",r.width),e.attr("height",r.height)}else{l.includes("font-weight: bolder")&&(0,o.Ys)(f).selectAll("tspan").attr("font-weight",""),p=f.children.length;let t=f.children[0];(""===f.textContent||f.textContent.includes(">"))&&(t.textContent=y[0]+y.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===y[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),r=f.getBBox()}return d.attr("transform","translate(0,"+(-r.height/(2*p)+a)+")"),r.height}async function t7(t,e){let a=(0,s.nV)(),l=a.class.padding??12,i=e.useHtmlLabels??(0,s.ku)(a.htmlLabels)??!0;e.annotations=e.annotations??[],e.members=e.members??[],e.methods=e.methods??[];let{shapeSvg:n,bbox:h}=await t3(t,e,a,i,l),{labelStyles:c,nodeStyles:g}=(0,r.UG)(e);e.labelStyle=c,e.cssStyles=e.styles||"";let f=e.styles?.join(";")||g||"";e.cssStyles||(e.cssStyles=f.replaceAll("!important","").split(";"));let p=0===e.members.length&&0===e.methods.length&&!a.class?.hideEmptyMembersBox,u=d.Z.svg(n),m=(0,r._q)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let w=h.width,x=h.height;0===e.members.length&&0===e.methods.length?x+=l:e.members.length>0&&0===e.methods.length&&(x+=2*l);let b=-w/2,$=-x/2,k=u.rectangle(b-l,$-l-(p?l:0===e.members.length&&0===e.methods.length?-l/2:0),w+2*l,x+2*l+(p?2*l:0===e.members.length&&0===e.methods.length?-l:0),m),M=n.insert(()=>k,":first-child");M.attr("class","basic label-container");let S=M.node().getBBox();n.selectAll(".text").each((t,a,r)=>{let s=(0,o.Ys)(r[a]),h=s.attr("transform"),d=0;if(h){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(h);t&&(d=parseFloat(t[2]))}let c=d+$+l-(p?l:0===e.members.length&&0===e.methods.length?-l/2:0);i||(c-=4);let g=b;(s.attr("class").includes("label-group")||s.attr("class").includes("annotation-group"))&&(g=-s.node()?.getBBox().width/2||0,n.selectAll("text").each(function(t,e,a){"middle"===window.getComputedStyle(a[e]).textAnchor&&(g=0)})),s.attr("transform",`translate(${g}, ${c})`)});let D=n.select(".annotation-group").node().getBBox().height-(p?l/2:0)||0,W=n.select(".label-group").node().getBBox().height-(p?l/2:0)||0,v=n.select(".members-group").node().getBBox().height-(p?l/2:0)||0;if(e.members.length>0||e.methods.length>0||p){let t=u.line(S.x,D+W+$+l,S.x+S.width,D+W+$+l,m);n.insert(()=>t).attr("class","divider").attr("style",f)}if(p||e.members.length>0||e.methods.length>0){let t=u.line(S.x,D+W+v+$+2*l+l,S.x+S.width,D+W+v+$+l+2*l,m);n.insert(()=>t).attr("class","divider").attr("style",f)}if("handDrawn"!==e.look&&n.selectAll("path").attr("style",f),M.select(":nth-child(2)").attr("style",f),n.selectAll(".divider").select("path").attr("style",f),e.labelStyle?n.selectAll("span").attr("style",e.labelStyle):n.selectAll("span").attr("style",f),!i){let t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(f);if(e){let t=e[0].replace("color","fill");n.selectAll("tspan").attr("style",t)}else if(c){let e=t.exec(c);if(e){let t=e[0].replace("color","fill");n.selectAll("tspan").attr("style",t)}}}return y(e,M),e.intersect=function(t){return P.rect(e,t)},n}async function t9(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let n="verifyMethod"in e,s=f(e),h=t.insert("g").attr("class",s).attr("id",e.domId??e.id),c=a=n?await t6(h,`<<${e.type}>>`,0,e.labelStyle):await t6(h,"<<Element>>",0,e.labelStyle),g=await t6(h,e.name,c,e.labelStyle+"; font-weight: bold;");if(c+=g+20,n){let t=await t6(h,`${e.requirementId?`ID: ${e.requirementId}`:""}`,c,e.labelStyle);c+=t;let a=await t6(h,`${e.text?`Text: ${e.text}`:""}`,c,e.labelStyle);c+=a;let l=await t6(h,`${e.risk?`Risk: ${e.risk}`:""}`,c,e.labelStyle);c+=l,await t6(h,`${e.verifyMethod?`Verification: ${e.verifyMethod}`:""}`,c,e.labelStyle)}else{let t=await t6(h,`${e.type?`Type: ${e.type}`:""}`,c,e.labelStyle);c+=t,await t6(h,`${e.docRef?`Doc Ref: ${e.docRef}`:""}`,c,e.labelStyle)}let p=(h.node()?.getBBox().width??200)+20,u=(h.node()?.getBBox().height??200)+20,m=-p/2,w=-u/2,x=d.Z.svg(h),b=(0,r._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=x.rectangle(m,w,p,u,b),k=h.insert(()=>$,":first-child");if(k.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((t,e,a)=>{let l=(0,o.Ys)(a[e]),r=l.attr("transform"),i=0,n=0;if(r){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(r);t&&(i=parseFloat(t[1]),n=parseFloat(t[2]))}let s=n-u/2,h=m+10;(0===e||1===e)&&(h=i),l.attr("transform",`translate(${h}, ${s+20})`)}),c>a+g+20){let t=x.line(m,w+a+g+20,m+p,w+a+g+20,b);h.insert(()=>t).attr("style",i)}return y(e,k),e.intersect=function(t){return P.rect(e,t)},h}async function t6(t,e,a,l=""){let r;if(""===e)return 0;let h=t.insert("g").attr("class","label").attr("style",l),d=(0,s.nV)(),c=d.htmlLabels??!0,g=await (0,i.rw)(h,(0,s.uX)((0,n.SH)(e)),{width:(0,n.Cq)(e,d)+50,classes:"markdown-node-label",useHtmlLabels:c,style:l},d);if(c){let t=g.children[0],e=(0,o.Ys)(g);r=t.getBoundingClientRect(),e.attr("width",r.width),e.attr("height",r.height)}else{for(let t of g.children[0].children)t.textContent=t.textContent.replaceAll(">",">").replaceAll("<","<"),l&&t.setAttribute("style",l);r=g.getBBox(),r.height+=6}return h.attr("transform",`translate(${-r.width/2},${-r.height/2+a})`),r.height}(0,h.eW)(tX,"tiltedCylinder"),(0,h.eW)(tJ,"trapezoid"),(0,h.eW)(tK,"trapezoidalPentagon"),(0,h.eW)(tQ,"triangle"),(0,h.eW)(t0,"waveEdgedRectangle"),(0,h.eW)(t2,"waveRectangle"),(0,h.eW)(t1,"windowPane"),(0,h.eW)(t5,"erBox"),(0,h.eW)(t8,"addText"),(0,h.eW)(t3,"textHelper"),(0,h.eW)(t4,"addText"),(0,h.eW)(t7,"classBox"),(0,h.eW)(t9,"requirementBox"),(0,h.eW)(t6,"addText");var et=(0,h.eW)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ee(t,e,{config:a}){let l,i,n,s;let{labelStyles:h,nodeStyles:o}=(0,r.UG)(e);e.labelStyle=h||"";let p=e.width;e.width=(e.width??200)-10;let{shapeSvg:u,bbox:m,label:w}=await c(t,e,f(e)),x=e.padding||10,b="";"ticket"in e&&e.ticket&&a?.kanban?.ticketBaseUrl&&(b=a?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),l=u.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",b).attr("target","_blank"));let $={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};l?{label:i,bbox:n}=await g(l,"ticket"in e&&e.ticket||"",$):{label:i,bbox:n}=await g(u,"ticket"in e&&e.ticket||"",$);let{label:M,bbox:S}=await g(u,"assigned"in e&&e.assigned||"",$);e.width=p;let D=e?.width||0,W=Math.max(n.height,S.height)/2,v=Math.max(m.height+20,e?.height||0)+W,C=-D/2,B=-v/2;w.attr("transform","translate("+(x-D/2)+", "+(-W-m.height/2)+")"),i.attr("transform","translate("+(x-D/2)+", "+(-W+m.height/2)+")"),M.attr("transform","translate("+(x+D/2-S.width-20)+", "+(-W+m.height/2)+")");let{rx:N,ry:A}=e,{cssStyles:q}=e;if("handDrawn"===e.look){let t=d.Z.svg(u),a=(0,r._q)(e,{}),l=N||A?t.path(k(C,B,D,v,N||0),a):t.rectangle(C,B,D,v,a);(s=u.insert(()=>l,":first-child")).attr("class","basic label-container").attr("style",q||null)}else{(s=u.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",o).attr("rx",N??5).attr("ry",A??5).attr("x",C).attr("y",B).attr("width",D).attr("height",v);let t="priority"in e&&e.priority;if(t){let e=u.append("line"),a=C+2,l=B+Math.floor((N??0)/2),r=B+v-Math.floor((N??0)/2);e.attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",r).attr("stroke-width","4").attr("stroke",et(t))}}return y(e,s),e.height=v,e.intersect=function(t){return P.rect(e,t)},u}async function ea(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g,label:p}=await c(t,e,f(e)),u=o.width+10*g,m=o.height+8*g,w=.15*u,{cssStyles:x}=e,b=o.width+20,$=o.height+20,k=Math.max(u,b),M=Math.max(m,$);p.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let S=`M0 0
|
11
|
+
a${w},${w} 1 0,0 ${.25*k},${-1*M*.1}
|
12
|
+
a${w},${w} 1 0,0 ${.25*k},0
|
13
|
+
a${w},${w} 1 0,0 ${.25*k},0
|
14
|
+
a${w},${w} 1 0,0 ${.25*k},${.1*M}
|
15
|
+
|
16
|
+
a${w},${w} 1 0,0 ${.15*k},${.33*M}
|
17
|
+
a${.8*w},${.8*w} 1 0,0 0,${.34*M}
|
18
|
+
a${w},${w} 1 0,0 ${-1*k*.15},${.33*M}
|
19
|
+
|
20
|
+
a${w},${w} 1 0,0 ${-1*k*.25},${.15*M}
|
21
|
+
a${w},${w} 1 0,0 ${-1*k*.25},0
|
22
|
+
a${w},${w} 1 0,0 ${-1*k*.25},0
|
23
|
+
a${w},${w} 1 0,0 ${-1*k*.25},${-1*M*.15}
|
24
|
+
|
25
|
+
a${w},${w} 1 0,0 ${-1*k*.1},${-1*M*.33}
|
26
|
+
a${.8*w},${.8*w} 1 0,0 0,${-1*M*.34}
|
27
|
+
a${w},${w} 1 0,0 ${.1*k},${-1*M*.33}
|
28
|
+
H0 V0 Z`;if("handDrawn"===e.look){let t=d.Z.svg(s),l=(0,r._q)(e,{}),i=t.path(S,l);(a=s.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(x))}else a=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",S);return a.attr("transform",`translate(${-k/2}, ${-M/2})`),y(e,a),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return h.cM.info("Bang intersect",e,t),P.rect(e,t)},s}async function el(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g,label:p}=await c(t,e,f(e)),u=o.width+2*g,m=o.height+2*g,w=.15*u,x=.25*u,b=.35*u,$=.2*u,{cssStyles:k}=e,M=`M0 0
|
29
|
+
a${w},${w} 0 0,1 ${.25*u},${-1*u*.1}
|
30
|
+
a${b},${b} 1 0,1 ${.4*u},${-1*u*.1}
|
31
|
+
a${x},${x} 1 0,1 ${.35*u},${.2*u}
|
32
|
+
|
33
|
+
a${w},${w} 1 0,1 ${.15*u},${.35*m}
|
34
|
+
a${$},${$} 1 0,1 ${-1*u*.15},${.65*m}
|
35
|
+
|
36
|
+
a${x},${w} 1 0,1 ${-1*u*.25},${.15*u}
|
37
|
+
a${b},${b} 1 0,1 ${-1*u*.5},0
|
38
|
+
a${w},${w} 1 0,1 ${-1*u*.25},${-1*u*.15}
|
39
|
+
|
40
|
+
a${w},${w} 1 0,1 ${-1*u*.1},${-1*m*.35}
|
41
|
+
a${$},${$} 1 0,1 ${.1*u},${-1*m*.65}
|
42
|
+
H0 V0 Z`;if("handDrawn"===e.look){let t=d.Z.svg(s),l=(0,r._q)(e,{}),i=t.path(M,l);(a=s.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(k))}else a=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",M);return p.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.attr("transform",`translate(${-u/2}, ${-m/2})`),y(e,a),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return h.cM.info("Cloud intersect",e,t),P.rect(e,t)},s}async function er(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,halfPadding:s,label:h}=await c(t,e,f(e)),o=n.width+8*s,d=n.height+2*s,g=`
|
43
|
+
M${-o/2} ${d/2-5}
|
44
|
+
v${-d+10}
|
45
|
+
q0,-5 5,-5
|
46
|
+
h${o-10}
|
47
|
+
q5,0 5,5
|
48
|
+
v${d-10}
|
49
|
+
q0,5 -5,5
|
50
|
+
h${-o+10}
|
51
|
+
q-5,0 -5,-5
|
52
|
+
Z
|
53
|
+
`,p=i.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",l).attr("d",g);return i.append("line").attr("class","node-line-").attr("x1",-o/2).attr("y1",d/2).attr("x2",o/2).attr("y2",d/2),h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),i.append(()=>h.node()),y(e,p),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return P.rect(e,t)},i}async function ei(t,e){let a={padding:e.padding??0};return H(t,e,a)}(0,h.eW)(ee,"kanbanItem"),(0,h.eW)(ea,"bang"),(0,h.eW)(el,"cloud"),(0,h.eW)(er,"defaultMindmapNode"),(0,h.eW)(ei,"mindmapCircle");var en=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:tU},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:tL},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:tG},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:tH},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ta},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:H},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ea},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:el},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:tA},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:to},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tb},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:tx},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:tJ},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:tu},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:tr},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:tj},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:T},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tP},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:tE},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:tT},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ts},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:td},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:O},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:F},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:J},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:t$},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:t0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:th},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tX},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tD},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:K},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:tl},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:tQ},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:t1},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ti},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:tK},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tn},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:tZ},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:tC},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tv},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:G},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Y},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tY},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:tV},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:t2},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:tq},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tW}],es=(0,h.eW)(()=>Object.fromEntries([...Object.entries({state:tI,choice:E,note:tB,rectWithTitle:tR,labelRect:tw,iconSquare:tf,iconCircle:tg,icon:tc,iconRounded:ty,imageSquare:tp,anchor:Z,kanbanItem:ee,mindmapCircle:ei,defaultMindmapNode:er,classBox:t7,erBox:t5,requirementBox:t9}),...en.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function eh(t){return t in es}(0,h.eW)(eh,"isValidShape");var eo=new Map;async function ed(t,e,a){let l,r;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let i=e.shape?es[e.shape]:void 0;if(!i)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let n;"sandbox"===a.config.securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),l=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n??null),r=await i(l,e,a)}else l=r=await i(t,e,a);return e.tooltip&&r.attr("title",e.tooltip),eo.set(e.id,l),e.haveCallback&&l.attr("class",l.attr("class")+" clickable"),l}(0,h.eW)(ed,"insertNode");var ec=(0,h.eW)((t,e)=>{eo.set(e.id,t)},"setNodeElem"),eg=(0,h.eW)(()=>{eo.clear()},"clear"),ey=(0,h.eW)(t=>{let e=eo.get(t.id);h.cM.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},"positionNode")}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1423],{57098:function(t,r,e){e.d(r,{A:function(){return n}});var a=e(31954),n=class{constructor(t){this.init=t,this.records=this.init()}static{(0,a.eW)(this,"ImperativeState")}reset(){this.records=this.init()}}},74464:function(t,r,e){e.d(r,{AD:function(){return u},AE:function(){return h},Mu:function(){return i},O:function(){return c},kc:function(){return x},rB:function(){return o},yU:function(){return l}});var a=e(55166),n=e(31954),s=e(59543),i=(0,n.eW)((t,r)=>{let e=t.append("rect");if(e.attr("x",r.x),e.attr("y",r.y),e.attr("fill",r.fill),e.attr("stroke",r.stroke),e.attr("width",r.width),e.attr("height",r.height),r.name&&e.attr("name",r.name),r.rx&&e.attr("rx",r.rx),r.ry&&e.attr("ry",r.ry),void 0!==r.attrs)for(let t in r.attrs)e.attr(t,r.attrs[t]);return r.class&&e.attr("class",r.class),e},"drawRect"),c=(0,n.eW)((t,r)=>{i(t,{x:r.startx,y:r.starty,width:r.stopx-r.startx,height:r.stopy-r.starty,fill:r.fill,stroke:r.stroke,class:"rect"}).lower()},"drawBackgroundRect"),l=(0,n.eW)((t,r)=>{let e=r.text.replace(a.Vw," "),n=t.append("text");n.attr("x",r.x),n.attr("y",r.y),n.attr("class","legend"),n.style("text-anchor",r.anchor),r.class&&n.attr("class",r.class);let s=n.append("tspan");return s.attr("x",r.x+2*r.textMargin),s.text(e),n},"drawText"),h=(0,n.eW)((t,r,e,a)=>{let n=t.append("image");n.attr("x",r),n.attr("y",e);let i=(0,s.N)(a);n.attr("xlink:href",i)},"drawImage"),o=(0,n.eW)((t,r,e,a)=>{let n=t.append("use");n.attr("x",r),n.attr("y",e);let i=(0,s.N)(a);n.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),x=(0,n.eW)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),u=(0,n.eW)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}}]);
|
@@ -0,0 +1,55 @@
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1585],{26160:function(t,e,i){var s=i(51778),n=i(29534);e.Z=(t,e)=>s.Z.lang.round(n.Z.parse(t)[e])},34577:function(t,e,i){i.d(e,{q:function(){return r}});var s=i(31954),n=i(84370),r=(0,s.eW)((t,e)=>{let i;return"sandbox"===e&&(i=(0,n.Ys)("#i"+t)),("sandbox"===e?(0,n.Ys)(i.nodes()[0].contentDocument.body):(0,n.Ys)("body")).select(`[id="${t}"]`)},"getDiagramElement")},23919:function(t,e,i){i.d(e,{j:function(){return r}});var s=i(55166),n=i(31954),r=(0,n.eW)((t,e,i,r)=>{t.attr("class",i);let{width:l,height:o,x:h,y:u}=a(t,e);(0,s.v2)(t,o,l,r);let y=c(h,u,l,o,e);t.attr("viewBox",y),n.cM.debug(`viewBox configured: ${y} with padding: ${e}`)},"setupViewPortForSVG"),a=(0,n.eW)((t,e)=>{let i=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+2*e,height:i.height+2*e,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),c=(0,n.eW)((t,e,i,s,n)=>`${t-n} ${e-n} ${i} ${s}`,"createViewBox")},61585:function(t,e,i){i.d(e,{diagram:function(){return b}});var s=i(34577),n=i(23919),r=i(55187);i(55397),i(35271),i(21216),i(10507),i(6072),i(66691);var a=i(94705),c=i(55166),l=i(31954),o=i(84370),h=i(26160),u=i(835),y=function(){var t=(0,l.eW)(function(t,e,i,s){for(i=i||{},s=t.length;s--;i[t[s]]=e);return i},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],i=[1,10],s=[1,11],n=[1,12],r=[1,13],a=[1,20],c=[1,21],o=[1,22],h=[1,23],u=[1,24],y=[1,19],d=[1,25],p=[1,26],_=[1,18],g=[1,33],b=[1,34],f=[1,35],m=[1,36],E=[1,37],k=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],O=[1,42],S=[1,43],T=[1,52],N=[40,50,68,69],A=[1,63],R=[1,61],I=[1,58],C=[1,62],x=[1,64],$=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],D=[63,64,65,66,67],v=[1,81],w=[1,80],M=[1,78],W=[1,79],L=[6,10,42,47],B=[6,10,13,41,42,47,48,49],F=[1,89],Y=[1,88],P=[1,87],Z=[19,56],G=[1,98],K=[1,97],z=[19,56,58,60],U={trace:(0,l.eW)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:(0,l.eW)(function(t,e,i,s,n,r,a){var c=r.length-1;switch(n){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:r[c-1].push(r[c]),this.$=r[c-1];break;case 4:case 5:case 55:case 78:case 62:case 63:case 66:this.$=r[c];break;case 8:s.addEntity(r[c-4]),s.addEntity(r[c-2]),s.addRelationship(r[c-4],r[c],r[c-2],r[c-3]);break;case 9:s.addEntity(r[c-8]),s.addEntity(r[c-4]),s.addRelationship(r[c-8],r[c],r[c-4],r[c-5]),s.setClass([r[c-8]],r[c-6]),s.setClass([r[c-4]],r[c-2]);break;case 10:s.addEntity(r[c-6]),s.addEntity(r[c-2]),s.addRelationship(r[c-6],r[c],r[c-2],r[c-3]),s.setClass([r[c-6]],r[c-4]);break;case 11:s.addEntity(r[c-6]),s.addEntity(r[c-4]),s.addRelationship(r[c-6],r[c],r[c-4],r[c-5]),s.setClass([r[c-4]],r[c-2]);break;case 12:s.addEntity(r[c-3]),s.addAttributes(r[c-3],r[c-1]);break;case 13:s.addEntity(r[c-5]),s.addAttributes(r[c-5],r[c-1]),s.setClass([r[c-5]],r[c-3]);break;case 14:s.addEntity(r[c-2]);break;case 15:s.addEntity(r[c-4]),s.setClass([r[c-4]],r[c-2]);break;case 16:s.addEntity(r[c]);break;case 17:s.addEntity(r[c-2]),s.setClass([r[c-2]],r[c]);break;case 18:s.addEntity(r[c-6],r[c-4]),s.addAttributes(r[c-6],r[c-1]);break;case 19:s.addEntity(r[c-8],r[c-6]),s.addAttributes(r[c-8],r[c-1]),s.setClass([r[c-8]],r[c-3]);break;case 20:s.addEntity(r[c-5],r[c-3]);break;case 21:s.addEntity(r[c-7],r[c-5]),s.setClass([r[c-7]],r[c-2]);break;case 22:s.addEntity(r[c-3],r[c-1]);break;case 23:s.addEntity(r[c-5],r[c-3]),s.setClass([r[c-5]],r[c]);break;case 24:case 25:this.$=r[c].trim(),s.setAccTitle(this.$);break;case 26:case 27:this.$=r[c].trim(),s.setAccDescription(this.$);break;case 32:s.setDirection("TB");break;case 33:s.setDirection("BT");break;case 34:s.setDirection("RL");break;case 35:s.setDirection("LR");break;case 36:this.$=r[c-3],s.addClass(r[c-2],r[c-1]);break;case 37:case 38:case 56:case 64:case 43:this.$=[r[c]];break;case 39:case 40:this.$=r[c-2].concat([r[c]]);break;case 41:this.$=r[c-2],s.setClass(r[c-1],r[c]);break;case 42:this.$=r[c-3],s.addCssStyles(r[c-2],r[c-1]);break;case 44:case 65:r[c-2].push(r[c]),this.$=r[c-2];break;case 46:this.$=r[c-1]+r[c];break;case 54:case 76:case 77:case 67:this.$=r[c].replace(/"/g,"");break;case 57:r[c].push(r[c-1]),this.$=r[c];break;case 58:this.$={type:r[c-1],name:r[c]};break;case 59:this.$={type:r[c-2],name:r[c-1],keys:r[c]};break;case 60:this.$={type:r[c-2],name:r[c-1],comment:r[c]};break;case 61:this.$={type:r[c-3],name:r[c-2],keys:r[c-1],comment:r[c]};break;case 68:this.$={cardA:r[c],relType:r[c-1],cardB:r[c-2]};break;case 69:this.$=s.Cardinality.ZERO_OR_ONE;break;case 70:this.$=s.Cardinality.ZERO_OR_MORE;break;case 71:this.$=s.Cardinality.ONE_OR_MORE;break;case 72:this.$=s.Cardinality.ONLY_ONE;break;case 73:this.$=s.Cardinality.MD_PARENT;break;case 74:this.$=s.Identification.NON_IDENTIFYING;break;case 75:this.$=s.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:i,24:s,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:c,35:o,36:h,37:u,40:y,43:d,44:p,50:_},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:27,11:9,22:i,24:s,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:c,35:o,36:h,37:u,40:y,43:d,44:p,50:_},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:g,64:b,65:f,66:m,67:E}),{23:[1,38]},{25:[1,39]},{27:[1,40]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(k,[2,54]),t(k,[2,55]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:41,40:O,41:S},{16:44,40:O,41:S},{16:45,40:O,41:S},t(e,[2,4]),{11:46,40:y,50:_},{16:47,40:O,41:S},{18:48,19:[1,49],51:50,52:51,56:T},{11:53,40:y,50:_},{62:54,68:[1,55],69:[1,56]},t(N,[2,69]),t(N,[2,70]),t(N,[2,71]),t(N,[2,72]),t(N,[2,73]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:A,38:57,41:R,42:I,45:59,46:60,48:C,49:x},t($,[2,37]),t($,[2,38]),{16:65,40:O,41:S,42:I},{13:A,38:66,41:R,42:I,45:59,46:60,48:C,49:x},{13:[1,67],15:[1,68]},t(e,[2,17],{61:32,12:69,17:[1,70],42:I,63:g,64:b,65:f,66:m,67:E}),{19:[1,71]},t(e,[2,14]),{18:72,19:[2,56],51:50,52:51,56:T},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:g,64:b,65:f,66:m,67:E},t(D,[2,74]),t(D,[2,75]),{6:v,10:w,39:77,42:M,47:W},{40:[1,82],41:[1,83]},t(L,[2,43],{46:84,13:A,41:R,48:C,49:x}),t(B,[2,45]),t(B,[2,50]),t(B,[2,51]),t(B,[2,52]),t(B,[2,53]),t(e,[2,41],{42:I}),{6:v,10:w,39:85,42:M,47:W},{14:86,40:F,50:Y,70:P},{16:90,40:O,41:S},{11:91,40:y,50:_},{18:92,19:[1,93],51:50,52:51,56:T},t(e,[2,12]),{19:[2,57]},t(Z,[2,58],{54:94,55:95,57:96,59:G,60:K}),t([19,56,59,60],[2,63]),t(e,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(e,[2,36]),{13:A,41:R,45:101,46:60,48:C,49:x},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t($,[2,39]),t($,[2,40]),t(B,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,76]),t(e,[2,77]),t(e,[2,78]),{13:[1,102],42:I},{13:[1,104],15:[1,103]},{19:[1,105]},t(e,[2,15]),t(Z,[2,59],{55:106,58:[1,107],60:K}),t(Z,[2,60]),t(z,[2,64]),t(Z,[2,67]),t(z,[2,66]),{18:108,19:[1,109],51:50,52:51,56:T},{16:110,40:O,41:S},t(L,[2,44],{46:84,13:A,41:R,48:C,49:x}),{14:111,40:F,50:Y,70:P},{16:112,40:O,41:S},{14:113,40:F,50:Y,70:P},t(e,[2,13]),t(Z,[2,61]),{57:114,59:G},{19:[1,115]},t(e,[2,20]),t(e,[2,23],{17:[1,116],42:I}),t(e,[2,11]),{13:[1,117],42:I},t(e,[2,10]),t(z,[2,65]),t(e,[2,18]),{18:118,19:[1,119],51:50,52:51,56:T},{14:120,40:F,50:Y,70:P},{19:[1,121]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:(0,l.eW)(function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},"parseError"),parse:(0,l.eW)(function(t){var e=this,i=[0],s=[],n=[null],r=[],a=this.table,c="",o=0,h=0,u=0,y=r.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p.yy[_]=this.yy[_]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var b=d.options&&d.options.ranges;function f(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.eW)(function(t){i.length=i.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,l.eW)(f,"lex");for(var m,E,k,O,S,T,N,A,R,I={};;){if(k=i[i.length-1],this.defaultActions[k]?O=this.defaultActions[k]:(null==m&&(m=f()),O=a[k]&&a[k][m]),void 0===O||!O.length||!O[0]){var C="";for(T in R=[],a[k])this.terminals_[T]&&T>2&&R.push("'"+this.terminals_[T]+"'");C=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:g,expected:R})}if(O[0]instanceof Array&&O.length>1)throw Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(O[0]){case 1:i.push(m),n.push(d.yytext),r.push(d.yylloc),i.push(O[1]),m=null,E?(m=E,E=null):(h=d.yyleng,c=d.yytext,o=d.yylineno,g=d.yylloc,u>0&&u--);break;case 2:if(N=this.productions_[O[1]][1],I.$=n[n.length-N],I._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},b&&(I._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),void 0!==(S=this.performAction.apply(I,[c,h,o,p.yy,O[1],n,r].concat(y))))return S;N&&(i=i.slice(0,-1*N*2),n=n.slice(0,-1*N),r=r.slice(0,-1*N)),i.push(this.productions_[O[1]][0]),n.push(I.$),r.push(I._$),A=a[i[i.length-2]][i[i.length-1]],i.push(A);break;case 3:return!0}}return!0},"parse")},j={EOF:1,parseError:(0,l.eW)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,l.eW)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.eW)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.eW)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===s.length?this.yylloc.first_column:0)+s[s.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.eW)(function(){return this._more=!0,this},"more"),reject:(0,l.eW)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.eW)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.eW)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.eW)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.eW)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.eW)(function(t,e){var i,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var r in n)this[r]=n[r];return!1},"test_match"),next:(0,l.eW)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,i,s,n=this._currentRules(),r=0;r<n.length;r++)if((i=this._input.match(this.rules[n[r]]))&&(!e||i[0].length>e[0].length)){if(e=i,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.eW)(function(){return this.next()||this.lex()},"lex"),begin:(0,l.eW)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.eW)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.eW)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.eW)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.eW)(function(t,e,i,s){switch(i){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:case 23:case 28:case 35:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:case 38:return 49;case 20:case 37:return 42;case 21:return 15;case 22:case 36:return 13;case 24:return 59;case 25:case 26:return 56;case 27:return 60;case 29:return this.popState(),19;case 30:case 73:return e.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 39:return this.begin("style"),37;case 40:return 43;case 41:case 45:case 46:case 59:return 63;case 42:case 43:case 44:case 52:case 54:case 61:return 65;case 47:case 48:case 49:case 50:case 51:case 53:case 60:return 64;case 55:case 56:case 57:case 58:return 66;case 62:return 67;case 63:case 66:case 67:case 68:return 68;case 64:case 65:return 69;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}};function V(){this.yy={}}return U.lexer=j,(0,l.eW)(V,"Parser"),V.prototype=U,U.Parser=V,new V}();y.parser=y;var d=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=c.GN,this.getAccTitle=c.eu,this.setAccDescription=c.U$,this.getAccDescription=c.Mx,this.setDiagramTitle=c.g2,this.getDiagramTitle=c.Kr,this.getConfig=(0,l.eW)(()=>(0,c.nV)().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,l.eW)(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,l.cM.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:(0,c.nV)().look??"default",cssClasses:"default",cssStyles:[]}),l.cM.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){let i;let s=this.addEntity(t);for(i=e.length-1;i>=0;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),s.attributes.push(e[i]),l.cM.debug("Added attribute ",e[i].name)}addRelationship(t,e,i,s){let n=this.entities.get(t),r=this.entities.get(i);if(!n||!r)return;let a={entityA:n.id,roleA:e,entityB:r.id,relSpec:s};this.relationships.push(a),l.cM.debug("Added new relationship :",a)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(let i of t){let t=this.classes.get(i);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}addCssStyles(t,e){for(let i of t){let t=this.entities.get(i);if(!e||!t)return;for(let i of e)t.cssStyles.push(i)}}addClass(t,e){t.forEach(t=>{let i=this.classes.get(t);void 0===i&&(i={id:t,styles:[],textStyles:[]},this.classes.set(t,i)),e&&e.forEach(function(t){if(/color/.exec(t)){let e=t.replace("fill","bgFill");i.textStyles.push(e)}i.styles.push(t)})})}setClass(t,e){for(let i of t){let t=this.entities.get(i);if(t)for(let i of e)t.cssClasses+=" "+i}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],(0,c.ZH)()}getData(){let t=[],e=[],i=(0,c.nV)();for(let e of this.entities.keys()){let i=this.entities.get(e);i&&(i.cssCompiledStyles=this.getCompiledStyles(i.cssClasses.split(" ")),t.push(i))}let s=0;for(let t of this.relationships){let n={id:(0,a.Ln)(t.entityA,t.entityB,{prefix:"id",counter:s++}),type:"normal",curve:"basis",start:t.entityA,end:t.entityB,label:t.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:t.relSpec.cardB.toLowerCase(),arrowTypeEnd:t.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==t.relSpec.relType?"solid":"dashed",look:i.look};e.push(n)}return{nodes:t,edges:e,other:{},config:i,direction:"TB"}}},p={};(0,l.r2)(p,{draw:()=>_});var _=(0,l.eW)(async function(t,e,i,h){l.cM.info("REF0:"),l.cM.info("Drawing er diagram (unified)",e);let{securityLevel:u,er:y,layout:d}=(0,c.nV)(),p=h.db.getData(),_=(0,s.q)(e,u);p.type=h.type,p.layoutAlgorithm=(0,r._b)(d),p.config.flowchart.nodeSpacing=y?.nodeSpacing||140,p.config.flowchart.rankSpacing=y?.rankSpacing||80,p.direction=h.db.getDirection(),p.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],p.diagramId=e,await (0,r.sY)(p,_),"elk"===p.layoutAlgorithm&&_.select(".edges").lower();let g=_.selectAll('[id*="-background"]');Array.from(g).length>0&&g.each(function(){let t=(0,o.Ys)(this),e=t.attr("id").replace("-background",""),i=_.select(`#${CSS.escape(e)}`);if(!i.empty()){let e=i.attr("transform");t.attr("transform",e)}}),a.w8.insertTitle(_,"erDiagramTitleText",y?.titleTopMargin??25,h.db.getDiagramTitle()),(0,n.j)(_,8,"erDiagram",y?.useMaxWidth??!0)},"draw"),g=(0,l.eW)((t,e)=>{let i=h.Z,s=i(t,"r"),n=i(t,"g"),r=i(t,"b");return u.Z(s,n,r,e)},"fade"),b={parser:y,get db(){return new d},renderer:p,styles:(0,l.eW)(t=>`
|
2
|
+
.entityBox {
|
3
|
+
fill: ${t.mainBkg};
|
4
|
+
stroke: ${t.nodeBorder};
|
5
|
+
}
|
6
|
+
|
7
|
+
.relationshipLabelBox {
|
8
|
+
fill: ${t.tertiaryColor};
|
9
|
+
opacity: 0.7;
|
10
|
+
background-color: ${t.tertiaryColor};
|
11
|
+
rect {
|
12
|
+
opacity: 0.5;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
.labelBkg {
|
17
|
+
background-color: ${g(t.tertiaryColor,.5)};
|
18
|
+
}
|
19
|
+
|
20
|
+
.edgeLabel .label {
|
21
|
+
fill: ${t.nodeBorder};
|
22
|
+
font-size: 14px;
|
23
|
+
}
|
24
|
+
|
25
|
+
.label {
|
26
|
+
font-family: ${t.fontFamily};
|
27
|
+
color: ${t.nodeTextColor||t.textColor};
|
28
|
+
}
|
29
|
+
|
30
|
+
.edge-pattern-dashed {
|
31
|
+
stroke-dasharray: 8,8;
|
32
|
+
}
|
33
|
+
|
34
|
+
.node rect,
|
35
|
+
.node circle,
|
36
|
+
.node ellipse,
|
37
|
+
.node polygon
|
38
|
+
{
|
39
|
+
fill: ${t.mainBkg};
|
40
|
+
stroke: ${t.nodeBorder};
|
41
|
+
stroke-width: 1px;
|
42
|
+
}
|
43
|
+
|
44
|
+
.relationshipLine {
|
45
|
+
stroke: ${t.lineColor};
|
46
|
+
stroke-width: 1;
|
47
|
+
fill: none;
|
48
|
+
}
|
49
|
+
|
50
|
+
.marker {
|
51
|
+
fill: none !important;
|
52
|
+
stroke: ${t.lineColor} !important;
|
53
|
+
stroke-width: 1;
|
54
|
+
}
|
55
|
+
`,"getStyles")}}}]);
|